path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
ajax/libs/react-native-web/0.13.12/vendor/react-native/Animated/createAnimatedComponent.js
cdnjs/cdnjs
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * * @format */ 'use strict'; function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } import { AnimatedEvent } from './AnimatedEvent'; import AnimatedProps from './nodes/AnimatedProps'; import React from 'react'; import invariant from 'fbjs/lib/invariant'; import setAndForwardRef from '../../../modules/setAndForwardRef'; function createAnimatedComponent(Component, defaultProps) { invariant(typeof Component !== 'function' || Component.prototype && Component.prototype.isReactComponent, '`createAnimatedComponent` does not support stateless functional components; ' + 'use a class component instead.'); var AnimatedComponent = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(AnimatedComponent, _React$Component); function AnimatedComponent(props) { var _this; _this = _React$Component.call(this, props) || this; _this._invokeAnimatedPropsCallbackOnMount = false; _this._eventDetachers = []; _this._animatedPropsCallback = function () { if (_this._component == null) { // AnimatedProps is created in will-mount because it's used in render. // But this callback may be invoked before mount in async mode, // In which case we should defer the setNativeProps() call. // React may throw away uncommitted work in async mode, // So a deferred call won't always be invoked. _this._invokeAnimatedPropsCallbackOnMount = true; } else if (AnimatedComponent.__skipSetNativeProps_FOR_TESTS_ONLY || typeof _this._component.setNativeProps !== 'function') { _this.forceUpdate(); } else if (!_this._propsAnimated.__isNative) { _this._component.setNativeProps(_this._propsAnimated.__getAnimatedValue()); } else { throw new Error('Attempting to run JS driven animation on animated ' + 'node that has been moved to "native" earlier by starting an ' + 'animation with `useNativeDriver: true`'); } }; _this._setComponentRef = setAndForwardRef({ getForwardedRef: function getForwardedRef() { return _this.props.forwardedRef; }, setLocalRef: function setLocalRef(ref) { _this._prevComponent = _this._component; _this._component = ref; // TODO: Delete this in a future release. if (ref != null && ref.getNode == null) { ref.getNode = function () { var _ref$constructor$name; console.warn('%s: Calling `getNode()` on the ref of an Animated component ' + 'is no longer necessary. You can now directly use the ref ' + 'instead. This method will be removed in a future release.', (_ref$constructor$name = ref.constructor.name) !== null && _ref$constructor$name !== void 0 ? _ref$constructor$name : '<<anonymous>>'); return ref; }; } } }); return _this; } var _proto = AnimatedComponent.prototype; _proto.componentWillUnmount = function componentWillUnmount() { this._propsAnimated && this._propsAnimated.__detach(); this._detachNativeEvents(); }; _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() { this._attachProps(this.props); }; _proto.componentDidMount = function componentDidMount() { if (this._invokeAnimatedPropsCallbackOnMount) { this._invokeAnimatedPropsCallbackOnMount = false; this._animatedPropsCallback(); } this._propsAnimated.setNativeView(this._component); this._attachNativeEvents(); }; _proto._attachNativeEvents = function _attachNativeEvents() { var _this2 = this; // Make sure to get the scrollable node for components that implement // `ScrollResponder.Mixin`. var scrollableNode = this._component && this._component.getScrollableNode ? this._component.getScrollableNode() : this._component; var _loop = function _loop(key) { var prop = _this2.props[key]; if (prop instanceof AnimatedEvent && prop.__isNative) { prop.__attach(scrollableNode, key); _this2._eventDetachers.push(function () { return prop.__detach(scrollableNode, key); }); } }; for (var key in this.props) { _loop(key); } }; _proto._detachNativeEvents = function _detachNativeEvents() { this._eventDetachers.forEach(function (remove) { return remove(); }); this._eventDetachers = []; } // The system is best designed when setNativeProps is implemented. It is // able to avoid re-rendering and directly set the attributes that changed. // However, setNativeProps can only be implemented on leaf native // components. If you want to animate a composite component, you need to // re-render it. In this case, we have a fallback that uses forceUpdate. ; _proto._attachProps = function _attachProps(nextProps) { var oldPropsAnimated = this._propsAnimated; this._propsAnimated = new AnimatedProps(nextProps, this._animatedPropsCallback); // When you call detach, it removes the element from the parent list // of children. If it goes to 0, then the parent also detaches itself // and so on. // An optimization is to attach the new elements and THEN detach the old // ones instead of detaching and THEN attaching. // This way the intermediate state isn't to go to 0 and trigger // this expensive recursive detaching to then re-attach everything on // the very next operation. oldPropsAnimated && oldPropsAnimated.__detach(); }; _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(newProps) { this._attachProps(newProps); }; _proto.componentDidUpdate = function componentDidUpdate(prevProps) { if (this._component !== this._prevComponent) { this._propsAnimated.setNativeView(this._component); } if (this._component !== this._prevComponent || prevProps !== this.props) { this._detachNativeEvents(); this._attachNativeEvents(); } }; _proto.render = function render() { var props = this._propsAnimated.__getValue(); return React.createElement(Component, _extends({}, defaultProps, props, { ref: this._setComponentRef // The native driver updates views directly through the UI thread so we // have to make sure the view doesn't get optimized away because it cannot // go through the NativeViewHierarchyManager since it operates on the shadow // thread. , collapsable: false })); }; return AnimatedComponent; }(React.Component); AnimatedComponent.__skipSetNativeProps_FOR_TESTS_ONLY = false; var propTypes = Component.propTypes; return React.forwardRef(function AnimatedComponentWrapper(props, ref) { return React.createElement(AnimatedComponent, _extends({}, props, ref == null ? null : { forwardedRef: ref })); }); } export default createAnimatedComponent;
ajax/libs/material-ui/4.9.4/es/SwipeableDrawer/SwipeArea.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import capitalize from '../utils/capitalize'; import { isHorizontal } from '../Drawer/Drawer'; export const styles = theme => ({ /* Styles applied to the root element. */ root: { position: 'fixed', top: 0, left: 0, bottom: 0, zIndex: theme.zIndex.drawer - 1 }, anchorLeft: { right: 'auto' }, anchorRight: { left: 'auto', right: 0 }, anchorTop: { bottom: 'auto', right: 0 }, anchorBottom: { top: 'auto', bottom: 0, right: 0 } }); /** * @ignore - internal component. */ const SwipeArea = React.forwardRef(function SwipeArea(props, ref) { const { anchor, classes, className, width } = props, other = _objectWithoutPropertiesLoose(props, ["anchor", "classes", "className", "width"]); return React.createElement("div", _extends({ className: clsx(classes.root, classes[`anchor${capitalize(anchor)}`], className), ref: ref, style: { [isHorizontal(anchor) ? 'width' : 'height']: width } }, other)); }); process.env.NODE_ENV !== "production" ? SwipeArea.propTypes = { /** * Side on which to attach the discovery area. */ anchor: PropTypes.oneOf(['left', 'top', 'right', 'bottom']).isRequired, /** * @ignore */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * The width of the left most (or right most) area in pixels where the * drawer can be swiped open from. */ width: PropTypes.number.isRequired } : void 0; export default withStyles(styles, { name: 'PrivateSwipeArea' })(SwipeArea);
ajax/libs/material-ui/5.0.0-alpha.17/utils/createSvgIcon.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import SvgIcon from '../SvgIcon'; /** * Private module reserved for @material-ui packages. */ export default function createSvgIcon(path, displayName) { const Component = (props, ref) => /*#__PURE__*/React.createElement(SvgIcon, _extends({ "data-testid": `${displayName}Icon`, ref: ref }, props), path); if (process.env.NODE_ENV !== 'production') { // Need to set `displayName` on the inner component for React.memo. // React prior to 16.14 ignores `displayName` on the wrapper. Component.displayName = `${displayName}Icon`; } Component.muiName = SvgIcon.muiName; return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component)); }
ajax/libs/material-ui/4.9.3/esm/Zoom/Zoom.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import { Transition } from 'react-transition-group'; import { duration } from '../styles/transitions'; import useTheme from '../styles/useTheme'; import { reflow, getTransitionProps } from '../transitions/utils'; import useForkRef from '../utils/useForkRef'; var styles = { entering: { transform: 'none' }, entered: { transform: 'none' } }; var defaultTimeout = { enter: duration.enteringScreen, exit: duration.leavingScreen }; /** * The Zoom transition can be used for the floating variant of the * [Button](/components/buttons/#floating-action-buttons) component. * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. */ var Zoom = React.forwardRef(function Zoom(props, ref) { var children = props.children, inProp = props.in, onEnter = props.onEnter, onExit = props.onExit, style = props.style, _props$timeout = props.timeout, timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout, other = _objectWithoutProperties(props, ["children", "in", "onEnter", "onExit", "style", "timeout"]); var theme = useTheme(); var handleRef = useForkRef(children.ref, ref); var handleEnter = function handleEnter(node, isAppearing) { reflow(node); // So the animation always start from the start. var transitionProps = getTransitionProps({ style: style, timeout: timeout }, { mode: 'enter' }); node.style.webkitTransition = theme.transitions.create('transform', transitionProps); node.style.transition = theme.transitions.create('transform', transitionProps); if (onEnter) { onEnter(node, isAppearing); } }; var handleExit = function handleExit(node) { var transitionProps = getTransitionProps({ style: style, timeout: timeout }, { mode: 'exit' }); node.style.webkitTransition = theme.transitions.create('transform', transitionProps); node.style.transition = theme.transitions.create('transform', transitionProps); if (onExit) { onExit(node); } }; return React.createElement(Transition, _extends({ appear: true, in: inProp, onEnter: handleEnter, onExit: handleExit, timeout: timeout }, other), function (state, childProps) { return React.cloneElement(children, _extends({ style: _extends({ transform: 'scale(0)', visibility: state === 'exited' && !inProp ? 'hidden' : undefined }, styles[state], {}, style, {}, children.props.style), ref: handleRef }, childProps)); }); }); process.env.NODE_ENV !== "production" ? Zoom.propTypes = { /** * A single child content element. */ children: PropTypes.element, /** * If `true`, the component will transition in. */ in: PropTypes.bool, /** * @ignore */ onEnter: PropTypes.func, /** * @ignore */ onExit: PropTypes.func, /** * @ignore */ style: PropTypes.object, /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. */ timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({ enter: PropTypes.number, exit: PropTypes.number })]) } : void 0; export default Zoom;
ajax/libs/react-native-web/0.0.0-10de98778/exports/Touchable/index.js
cdnjs/cdnjs
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * * @format */ 'use strict'; function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import AccessibilityUtil from '../../modules/AccessibilityUtil'; import BoundingDimensions from './BoundingDimensions'; import findNodeHandle from '../findNodeHandle'; import normalizeColor from 'normalize-css-color'; import Position from './Position'; import React from 'react'; import UIManager from '../UIManager'; import View from '../View'; var extractSingleTouch = function extractSingleTouch(nativeEvent) { var touches = nativeEvent.touches; var changedTouches = nativeEvent.changedTouches; var hasTouches = touches && touches.length > 0; var hasChangedTouches = changedTouches && changedTouches.length > 0; return !hasTouches && hasChangedTouches ? changedTouches[0] : hasTouches ? touches[0] : nativeEvent; }; /** * `Touchable`: Taps done right. * * You hook your `ResponderEventPlugin` events into `Touchable`. `Touchable` * will measure time/geometry and tells you when to give feedback to the user. * * ====================== Touchable Tutorial =============================== * The `Touchable` mixin helps you handle the "press" interaction. It analyzes * the geometry of elements, and observes when another responder (scroll view * etc) has stolen the touch lock. It notifies your component when it should * give feedback to the user. (bouncing/highlighting/unhighlighting). * * - When a touch was activated (typically you highlight) * - When a touch was deactivated (typically you unhighlight) * - When a touch was "pressed" - a touch ended while still within the geometry * of the element, and no other element (like scroller) has "stolen" touch * lock ("responder") (Typically you bounce the element). * * A good tap interaction isn't as simple as you might think. There should be a * slight delay before showing a highlight when starting a touch. If a * subsequent touch move exceeds the boundary of the element, it should * unhighlight, but if that same touch is brought back within the boundary, it * should rehighlight again. A touch can move in and out of that boundary * several times, each time toggling highlighting, but a "press" is only * triggered if that touch ends while within the element's boundary and no * scroller (or anything else) has stolen the lock on touches. * * To create a new type of component that handles interaction using the * `Touchable` mixin, do the following: * * - Initialize the `Touchable` state. * * getInitialState: function() { * return merge(this.touchableGetInitialState(), yourComponentState); * } * * - Choose the rendered component who's touches should start the interactive * sequence. On that rendered node, forward all `Touchable` responder * handlers. You can choose any rendered node you like. Choose a node whose * hit target you'd like to instigate the interaction sequence: * * // In render function: * return ( * <View * onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder} * onResponderTerminationRequest={this.touchableHandleResponderTerminationRequest} * onResponderGrant={this.touchableHandleResponderGrant} * onResponderMove={this.touchableHandleResponderMove} * onResponderRelease={this.touchableHandleResponderRelease} * onResponderTerminate={this.touchableHandleResponderTerminate}> * <View> * Even though the hit detection/interactions are triggered by the * wrapping (typically larger) node, we usually end up implementing * custom logic that highlights this inner one. * </View> * </View> * ); * * - You may set up your own handlers for each of these events, so long as you * also invoke the `touchable*` handlers inside of your custom handler. * * - Implement the handlers on your component class in order to provide * feedback to the user. See documentation for each of these class methods * that you should implement. * * touchableHandlePress: function() { * this.performBounceAnimation(); // or whatever you want to do. * }, * touchableHandleActivePressIn: function() { * this.beginHighlighting(...); // Whatever you like to convey activation * }, * touchableHandleActivePressOut: function() { * this.endHighlighting(...); // Whatever you like to convey deactivation * }, * * - There are more advanced methods you can implement (see documentation below): * touchableGetHighlightDelayMS: function() { * return 20; * } * // In practice, *always* use a predeclared constant (conserve memory). * touchableGetPressRectOffset: function() { * return {top: 20, left: 20, right: 20, bottom: 100}; * } */ /** * Touchable states. */ var States = { NOT_RESPONDER: 'NOT_RESPONDER', // Not the responder RESPONDER_INACTIVE_PRESS_IN: 'RESPONDER_INACTIVE_PRESS_IN', // Responder, inactive, in the `PressRect` RESPONDER_INACTIVE_PRESS_OUT: 'RESPONDER_INACTIVE_PRESS_OUT', // Responder, inactive, out of `PressRect` RESPONDER_ACTIVE_PRESS_IN: 'RESPONDER_ACTIVE_PRESS_IN', // Responder, active, in the `PressRect` RESPONDER_ACTIVE_PRESS_OUT: 'RESPONDER_ACTIVE_PRESS_OUT', // Responder, active, out of `PressRect` RESPONDER_ACTIVE_LONG_PRESS_IN: 'RESPONDER_ACTIVE_LONG_PRESS_IN', // Responder, active, in the `PressRect`, after long press threshold RESPONDER_ACTIVE_LONG_PRESS_OUT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT', // Responder, active, out of `PressRect`, after long press threshold ERROR: 'ERROR' }; /* * Quick lookup map for states that are considered to be "active" */ var baseStatesConditions = { NOT_RESPONDER: false, RESPONDER_INACTIVE_PRESS_IN: false, RESPONDER_INACTIVE_PRESS_OUT: false, RESPONDER_ACTIVE_PRESS_IN: false, RESPONDER_ACTIVE_PRESS_OUT: false, RESPONDER_ACTIVE_LONG_PRESS_IN: false, RESPONDER_ACTIVE_LONG_PRESS_OUT: false, ERROR: false }; var IsActive = _objectSpread({}, baseStatesConditions, { RESPONDER_ACTIVE_PRESS_OUT: true, RESPONDER_ACTIVE_PRESS_IN: true }); /** * Quick lookup for states that are considered to be "pressing" and are * therefore eligible to result in a "selection" if the press stops. */ var IsPressingIn = _objectSpread({}, baseStatesConditions, { RESPONDER_INACTIVE_PRESS_IN: true, RESPONDER_ACTIVE_PRESS_IN: true, RESPONDER_ACTIVE_LONG_PRESS_IN: true }); var IsLongPressingIn = _objectSpread({}, baseStatesConditions, { RESPONDER_ACTIVE_LONG_PRESS_IN: true }); /** * Inputs to the state machine. */ var Signals = { DELAY: 'DELAY', RESPONDER_GRANT: 'RESPONDER_GRANT', RESPONDER_RELEASE: 'RESPONDER_RELEASE', RESPONDER_TERMINATED: 'RESPONDER_TERMINATED', ENTER_PRESS_RECT: 'ENTER_PRESS_RECT', LEAVE_PRESS_RECT: 'LEAVE_PRESS_RECT', LONG_PRESS_DETECTED: 'LONG_PRESS_DETECTED' }; /** * Mapping from States x Signals => States */ var Transitions = { NOT_RESPONDER: { DELAY: States.ERROR, RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN, RESPONDER_RELEASE: States.ERROR, RESPONDER_TERMINATED: States.ERROR, ENTER_PRESS_RECT: States.ERROR, LEAVE_PRESS_RECT: States.ERROR, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_INACTIVE_PRESS_IN: { DELAY: States.RESPONDER_ACTIVE_PRESS_IN, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_INACTIVE_PRESS_OUT: { DELAY: States.RESPONDER_ACTIVE_PRESS_OUT, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_ACTIVE_PRESS_IN: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN }, RESPONDER_ACTIVE_PRESS_OUT: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_ACTIVE_LONG_PRESS_IN: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT, LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN }, RESPONDER_ACTIVE_LONG_PRESS_OUT: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, error: { DELAY: States.NOT_RESPONDER, RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.NOT_RESPONDER, LEAVE_PRESS_RECT: States.NOT_RESPONDER, LONG_PRESS_DETECTED: States.NOT_RESPONDER } }; // ==== Typical Constants for integrating into UI components ==== // var HIT_EXPAND_PX = 20; // var HIT_VERT_OFFSET_PX = 10; var HIGHLIGHT_DELAY_MS = 130; var PRESS_EXPAND_PX = 20; var LONG_PRESS_THRESHOLD = 500; var LONG_PRESS_DELAY_MS = LONG_PRESS_THRESHOLD - HIGHLIGHT_DELAY_MS; var LONG_PRESS_ALLOWED_MOVEMENT = 10; // Default amount "active" region protrudes beyond box /** * By convention, methods prefixed with underscores are meant to be @private, * and not @protected. Mixers shouldn't access them - not even to provide them * as callback handlers. * * * ========== Geometry ========= * `Touchable` only assumes that there exists a `HitRect` node. The `PressRect` * is an abstract box that is extended beyond the `HitRect`. * * +--------------------------+ * | | - "Start" events in `HitRect` cause `HitRect` * | +--------------------+ | to become the responder. * | | +--------------+ | | - `HitRect` is typically expanded around * | | | | | | the `VisualRect`, but shifted downward. * | | | VisualRect | | | - After pressing down, after some delay, * | | | | | | and before letting up, the Visual React * | | +--------------+ | | will become "active". This makes it eligible * | | HitRect | | for being highlighted (so long as the * | +--------------------+ | press remains in the `PressRect`). * | PressRect o | * +----------------------|---+ * Out Region | * +-----+ This gap between the `HitRect` and * `PressRect` allows a touch to move far away * from the original hit rect, and remain * highlighted, and eligible for a "Press". * Customize this via * `touchableGetPressRectOffset()`. * * * * ======= State Machine ======= * * +-------------+ <---+ RESPONDER_RELEASE * |NOT_RESPONDER| * +-------------+ <---+ RESPONDER_TERMINATED * + * | RESPONDER_GRANT (HitRect) * v * +---------------------------+ DELAY +-------------------------+ T + DELAY +------------------------------+ * |RESPONDER_INACTIVE_PRESS_IN|+-------->|RESPONDER_ACTIVE_PRESS_IN| +------------> |RESPONDER_ACTIVE_LONG_PRESS_IN| * +---------------------------+ +-------------------------+ +------------------------------+ * + ^ + ^ + ^ * |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ * |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT * | | | | | | * v + v + v + * +----------------------------+ DELAY +--------------------------+ +-------------------------------+ * |RESPONDER_INACTIVE_PRESS_OUT|+------->|RESPONDER_ACTIVE_PRESS_OUT| |RESPONDER_ACTIVE_LONG_PRESS_OUT| * +----------------------------+ +--------------------------+ +-------------------------------+ * * T + DELAY => LONG_PRESS_DELAY_MS + DELAY * * Not drawn are the side effects of each transition. The most important side * effect is the `touchableHandlePress` abstract method invocation that occurs * when a responder is released while in either of the "Press" states. * * The other important side effects are the highlight abstract method * invocations (internal callbacks) to be implemented by the mixer. * * * @lends Touchable.prototype */ var TouchableMixin = { // HACK (part 1): basic support for touchable interactions using a keyboard componentDidMount: function componentDidMount() { var _this = this; this._touchableNode = findNodeHandle(this); if (this._touchableNode && this._touchableNode.addEventListener) { this._touchableBlurListener = function (e) { if (_this._isTouchableKeyboardActive) { if (_this.state.touchable.touchState && _this.state.touchable.touchState !== States.NOT_RESPONDER) { _this.touchableHandleResponderTerminate({ nativeEvent: e }); } _this._isTouchableKeyboardActive = false; } }; this._touchableNode.addEventListener('blur', this._touchableBlurListener); } }, /** * Clear all timeouts on unmount */ componentWillUnmount: function componentWillUnmount() { if (this._touchableNode && this._touchableNode.addEventListener) { this._touchableNode.removeEventListener('blur', this._touchableBlurListener); } this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout); this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout); this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); }, /** * It's prefer that mixins determine state in this way, having the class * explicitly mix the state in the one and only `getInitialState` method. * * @return {object} State object to be placed inside of * `this.state.touchable`. */ touchableGetInitialState: function touchableGetInitialState() { return { touchable: { touchState: undefined, responderID: null } }; }, // ==== Hooks to Gesture Responder system ==== /** * Must return true if embedded in a native platform scroll view. */ touchableHandleResponderTerminationRequest: function touchableHandleResponderTerminationRequest() { return !this.props.rejectResponderTermination; }, /** * Must return true to start the process of `Touchable`. */ touchableHandleStartShouldSetResponder: function touchableHandleStartShouldSetResponder() { return !this.props.disabled; }, /** * Return true to cancel press on long press. */ touchableLongPressCancelsPress: function touchableLongPressCancelsPress() { return true; }, /** * Place as callback for a DOM element's `onResponderGrant` event. * @param {SyntheticEvent} e Synthetic event from event system. * */ touchableHandleResponderGrant: function touchableHandleResponderGrant(e) { var dispatchID = e.currentTarget; // Since e is used in a callback invoked on another event loop // (as in setTimeout etc), we need to call e.persist() on the // event to make sure it doesn't get reused in the event object pool. e.persist(); this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); this.pressOutDelayTimeout = null; this.state.touchable.touchState = States.NOT_RESPONDER; this.state.touchable.responderID = dispatchID; this._receiveSignal(Signals.RESPONDER_GRANT, e); var delayMS = this.touchableGetHighlightDelayMS !== undefined ? Math.max(this.touchableGetHighlightDelayMS(), 0) : HIGHLIGHT_DELAY_MS; delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS; if (delayMS !== 0) { this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), delayMS); } else { this._handleDelay(e); } var longDelayMS = this.touchableGetLongPressDelayMS !== undefined ? Math.max(this.touchableGetLongPressDelayMS(), 10) : LONG_PRESS_DELAY_MS; longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS; this.longPressDelayTimeout = setTimeout(this._handleLongDelay.bind(this, e), longDelayMS + delayMS); }, /** * Place as callback for a DOM element's `onResponderRelease` event. */ touchableHandleResponderRelease: function touchableHandleResponderRelease(e) { this.pressInLocation = null; this._receiveSignal(Signals.RESPONDER_RELEASE, e); }, /** * Place as callback for a DOM element's `onResponderTerminate` event. */ touchableHandleResponderTerminate: function touchableHandleResponderTerminate(e) { this.pressInLocation = null; this._receiveSignal(Signals.RESPONDER_TERMINATED, e); }, /** * Place as callback for a DOM element's `onResponderMove` event. */ touchableHandleResponderMove: function touchableHandleResponderMove(e) { // Measurement may not have returned yet. if (!this.state.touchable.positionOnActivate) { return; } var positionOnActivate = this.state.touchable.positionOnActivate; var dimensionsOnActivate = this.state.touchable.dimensionsOnActivate; var pressRectOffset = this.touchableGetPressRectOffset ? this.touchableGetPressRectOffset() : { left: PRESS_EXPAND_PX, right: PRESS_EXPAND_PX, top: PRESS_EXPAND_PX, bottom: PRESS_EXPAND_PX }; var pressExpandLeft = pressRectOffset.left; var pressExpandTop = pressRectOffset.top; var pressExpandRight = pressRectOffset.right; var pressExpandBottom = pressRectOffset.bottom; var hitSlop = this.touchableGetHitSlop ? this.touchableGetHitSlop() : null; if (hitSlop) { pressExpandLeft += hitSlop.left || 0; pressExpandTop += hitSlop.top || 0; pressExpandRight += hitSlop.right || 0; pressExpandBottom += hitSlop.bottom || 0; } var touch = extractSingleTouch(e.nativeEvent); var pageX = touch && touch.pageX; var pageY = touch && touch.pageY; if (this.pressInLocation) { var movedDistance = this._getDistanceBetweenPoints(pageX, pageY, this.pressInLocation.pageX, this.pressInLocation.pageY); if (movedDistance > LONG_PRESS_ALLOWED_MOVEMENT) { this._cancelLongPressDelayTimeout(); } } var isTouchWithinActive = pageX > positionOnActivate.left - pressExpandLeft && pageY > positionOnActivate.top - pressExpandTop && pageX < positionOnActivate.left + dimensionsOnActivate.width + pressExpandRight && pageY < positionOnActivate.top + dimensionsOnActivate.height + pressExpandBottom; if (isTouchWithinActive) { var prevState = this.state.touchable.touchState; this._receiveSignal(Signals.ENTER_PRESS_RECT, e); var curState = this.state.touchable.touchState; if (curState === States.RESPONDER_INACTIVE_PRESS_IN && prevState !== States.RESPONDER_INACTIVE_PRESS_IN) { // fix for t7967420 this._cancelLongPressDelayTimeout(); } } else { this._cancelLongPressDelayTimeout(); this._receiveSignal(Signals.LEAVE_PRESS_RECT, e); } }, /** * Invoked when the item receives focus. Mixers might override this to * visually distinguish the `VisualRect` so that the user knows that it * currently has the focus. Most platforms only support a single element being * focused at a time, in which case there may have been a previously focused * element that was blurred just prior to this. This can be overridden when * using `Touchable.Mixin.withoutDefaultFocusAndBlur`. */ touchableHandleFocus: function touchableHandleFocus(e) { this.props.onFocus && this.props.onFocus(e); }, /** * Invoked when the item loses focus. Mixers might override this to * visually distinguish the `VisualRect` so that the user knows that it * no longer has focus. Most platforms only support a single element being * focused at a time, in which case the focus may have moved to another. * This can be overridden when using * `Touchable.Mixin.withoutDefaultFocusAndBlur`. */ touchableHandleBlur: function touchableHandleBlur(e) { this.props.onBlur && this.props.onBlur(e); }, // ==== Abstract Application Callbacks ==== /** * Invoked when the item should be highlighted. Mixers should implement this * to visually distinguish the `VisualRect` so that the user knows that * releasing a touch will result in a "selection" (analog to click). * * @abstract * touchableHandleActivePressIn: function, */ /** * Invoked when the item is "active" (in that it is still eligible to become * a "select") but the touch has left the `PressRect`. Usually the mixer will * want to unhighlight the `VisualRect`. If the user (while pressing) moves * back into the `PressRect` `touchableHandleActivePressIn` will be invoked * again and the mixer should probably highlight the `VisualRect` again. This * event will not fire on an `touchEnd/mouseUp` event, only move events while * the user is depressing the mouse/touch. * * @abstract * touchableHandleActivePressOut: function */ /** * Invoked when the item is "selected" - meaning the interaction ended by * letting up while the item was either in the state * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`. * * @abstract * touchableHandlePress: function */ /** * Invoked when the item is long pressed - meaning the interaction ended by * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will * be called as it normally is. If `touchableHandleLongPress` is provided, by * default any `touchableHandlePress` callback will not be invoked. To * override this default behavior, override `touchableLongPressCancelsPress` * to return false. As a result, `touchableHandlePress` will be called when * lifting up, even if `touchableHandleLongPress` has also been called. * * @abstract * touchableHandleLongPress: function */ /** * Returns the number of millis to wait before triggering a highlight. * * @abstract * touchableGetHighlightDelayMS: function */ /** * Returns the amount to extend the `HitRect` into the `PressRect`. Positive * numbers mean the size expands outwards. * * @abstract * touchableGetPressRectOffset: function */ // ==== Internal Logic ==== /** * Measures the `HitRect` node on activation. The Bounding rectangle is with * respect to viewport - not page, so adding the `pageXOffset/pageYOffset` * should result in points that are in the same coordinate system as an * event's `globalX/globalY` data values. * * - Consider caching this for the lifetime of the component, or possibly * being able to share this cache between any `ScrollMap` view. * * @sideeffects * @private */ _remeasureMetricsOnActivation: function _remeasureMetricsOnActivation() { var tag = this.state.touchable.responderID; if (tag == null) { return; } UIManager.measure(tag, this._handleQueryLayout); }, _handleQueryLayout: function _handleQueryLayout(l, t, w, h, globalX, globalY) { //don't do anything UIManager failed to measure node if (!l && !t && !w && !h && !globalX && !globalY) { return; } this.state.touchable.positionOnActivate && Position.release(this.state.touchable.positionOnActivate); this.state.touchable.dimensionsOnActivate && // $FlowFixMe BoundingDimensions.release(this.state.touchable.dimensionsOnActivate); this.state.touchable.positionOnActivate = Position.getPooled(globalX, globalY); // $FlowFixMe this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(w, h); }, _handleDelay: function _handleDelay(e) { this.touchableDelayTimeout = null; this._receiveSignal(Signals.DELAY, e); }, _handleLongDelay: function _handleLongDelay(e) { this.longPressDelayTimeout = null; var curState = this.state.touchable.touchState; if (curState !== States.RESPONDER_ACTIVE_PRESS_IN && curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN) { console.error('Attempted to transition from state `' + curState + '` to `' + States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. This is ' + 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.'); } else { this._receiveSignal(Signals.LONG_PRESS_DETECTED, e); } }, /** * Receives a state machine signal, performs side effects of the transition * and stores the new state. Validates the transition as well. * * @param {Signals} signal State machine signal. * @throws Error if invalid state transition or unrecognized signal. * @sideeffects */ _receiveSignal: function _receiveSignal(signal, e) { var responderID = this.state.touchable.responderID; var curState = this.state.touchable.touchState; var nextState = Transitions[curState] && Transitions[curState][signal]; if (!responderID && signal === Signals.RESPONDER_RELEASE) { return; } if (!nextState) { throw new Error('Unrecognized signal `' + signal + '` or state `' + curState + '` for Touchable responder `' + responderID + '`'); } if (nextState === States.ERROR) { throw new Error('Touchable cannot transition from `' + curState + '` to `' + signal + '` for responder `' + responderID + '`'); } if (curState !== nextState) { this._performSideEffectsForTransition(curState, nextState, signal, e); this.state.touchable.touchState = nextState; } }, _cancelLongPressDelayTimeout: function _cancelLongPressDelayTimeout() { this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout); this.longPressDelayTimeout = null; }, _isHighlight: function _isHighlight(state) { return state === States.RESPONDER_ACTIVE_PRESS_IN || state === States.RESPONDER_ACTIVE_LONG_PRESS_IN; }, _savePressInLocation: function _savePressInLocation(e) { var touch = extractSingleTouch(e.nativeEvent); var pageX = touch && touch.pageX; var pageY = touch && touch.pageY; var locationX = touch && touch.locationX; var locationY = touch && touch.locationY; this.pressInLocation = { pageX: pageX, pageY: pageY, locationX: locationX, locationY: locationY }; }, _getDistanceBetweenPoints: function _getDistanceBetweenPoints(aX, aY, bX, bY) { var deltaX = aX - bX; var deltaY = aY - bY; return Math.sqrt(deltaX * deltaX + deltaY * deltaY); }, /** * Will perform a transition between touchable states, and identify any * highlighting or unhighlighting that must be performed for this particular * transition. * * @param {States} curState Current Touchable state. * @param {States} nextState Next Touchable state. * @param {Signal} signal Signal that triggered the transition. * @param {Event} e Native event. * @sideeffects */ _performSideEffectsForTransition: function _performSideEffectsForTransition(curState, nextState, signal, e) { var curIsHighlight = this._isHighlight(curState); var newIsHighlight = this._isHighlight(nextState); var isFinalSignal = signal === Signals.RESPONDER_TERMINATED || signal === Signals.RESPONDER_RELEASE; if (isFinalSignal) { this._cancelLongPressDelayTimeout(); } var isInitialTransition = curState === States.NOT_RESPONDER && nextState === States.RESPONDER_INACTIVE_PRESS_IN; var isActiveTransition = !IsActive[curState] && IsActive[nextState]; if (isInitialTransition || isActiveTransition) { this._remeasureMetricsOnActivation(); } if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) { this.touchableHandleLongPress && this.touchableHandleLongPress(e); } if (newIsHighlight && !curIsHighlight) { this._startHighlight(e); } else if (!newIsHighlight && curIsHighlight) { this._endHighlight(e); } if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) { var hasLongPressHandler = !!this.props.onLongPress; var pressIsLongButStillCallOnPress = IsLongPressingIn[curState] && ( // We *are* long pressing.. // But either has no long handler !hasLongPressHandler || !this.touchableLongPressCancelsPress()); // or we're told to ignore it. var shouldInvokePress = !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress; if (shouldInvokePress && this.touchableHandlePress) { if (!newIsHighlight && !curIsHighlight) { // we never highlighted because of delay, but we should highlight now this._startHighlight(e); this._endHighlight(e); } this.touchableHandlePress(e); } } this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout); this.touchableDelayTimeout = null; }, _playTouchSound: function _playTouchSound() { UIManager.playTouchSound(); }, _startHighlight: function _startHighlight(e) { this._savePressInLocation(e); this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e); }, _endHighlight: function _endHighlight(e) { var _this2 = this; if (this.touchableHandleActivePressOut) { if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) { this.pressOutDelayTimeout = setTimeout(function () { _this2.touchableHandleActivePressOut(e); }, this.touchableGetPressOutDelayMS()); } else { this.touchableHandleActivePressOut(e); } } }, // HACK (part 2): basic support for touchable interactions using a keyboard (including // delays and longPress) touchableHandleKeyEvent: function touchableHandleKeyEvent(e) { var type = e.type, key = e.key; if (key === 'Enter' || key === ' ') { if (type === 'keydown') { if (!this._isTouchableKeyboardActive) { if (!this.state.touchable.touchState || this.state.touchable.touchState === States.NOT_RESPONDER) { this.touchableHandleResponderGrant(e); this._isTouchableKeyboardActive = true; } } } else if (type === 'keyup') { if (this._isTouchableKeyboardActive) { if (this.state.touchable.touchState && this.state.touchable.touchState !== States.NOT_RESPONDER) { this.touchableHandleResponderRelease(e); this._isTouchableKeyboardActive = false; } } } e.stopPropagation(); // prevent the default behaviour unless the Touchable functions as a link // and Enter is pressed if (!(key === 'Enter' && AccessibilityUtil.propsToAriaRole(this.props) === 'link')) { e.preventDefault(); } } }, withoutDefaultFocusAndBlur: {} }; /** * Provide an optional version of the mixin where `touchableHandleFocus` and * `touchableHandleBlur` can be overridden. This allows appropriate defaults to * be set on TV platforms, without breaking existing implementations of * `Touchable`. */ var touchableHandleFocus = TouchableMixin.touchableHandleFocus, touchableHandleBlur = TouchableMixin.touchableHandleBlur, TouchableMixinWithoutDefaultFocusAndBlur = _objectWithoutPropertiesLoose(TouchableMixin, ["touchableHandleFocus", "touchableHandleBlur"]); TouchableMixin.withoutDefaultFocusAndBlur = TouchableMixinWithoutDefaultFocusAndBlur; var Touchable = { Mixin: TouchableMixin, TOUCH_TARGET_DEBUG: false, // Highlights all touchable targets. Toggle with Inspector. /** * Renders a debugging overlay to visualize touch target with hitSlop (might not work on Android). */ renderDebugView: function renderDebugView(_ref) { var color = _ref.color, hitSlop = _ref.hitSlop; if (!Touchable.TOUCH_TARGET_DEBUG) { return null; } if (process.env.NODE_ENV !== 'production') { throw Error('Touchable.TOUCH_TARGET_DEBUG should not be enabled in prod!'); } var debugHitSlopStyle = {}; hitSlop = hitSlop || { top: 0, bottom: 0, left: 0, right: 0 }; for (var key in hitSlop) { debugHitSlopStyle[key] = -hitSlop[key]; } var normalizedColor = normalizeColor(color); if (typeof normalizedColor !== 'number') { return null; } var hexColor = '#' + ('00000000' + normalizedColor.toString(16)).substr(-8); return React.createElement(View, { pointerEvents: "none", style: _objectSpread({ position: 'absolute', borderColor: hexColor.slice(0, -2) + '55', // More opaque borderWidth: 1, borderStyle: 'dashed', backgroundColor: hexColor.slice(0, -2) + '0F' }, debugHitSlopStyle) }); } }; export default Touchable;
ajax/libs/react-native-web/0.11.2/vendor/react-native/SectionList/index.js
cdnjs/cdnjs
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * * @format */ import UnimplementedView from '../../../modules/UnimplementedView'; import Platform from '../../../exports/Platform'; import React from 'react'; import ScrollView from '../../../exports/ScrollView'; import VirtualizedSectionList from '../VirtualizedSectionList'; var defaultProps = _objectSpread({}, VirtualizedSectionList.defaultProps, { stickySectionHeadersEnabled: Platform.OS === 'ios' }); /** * A performant interface for rendering sectioned lists, supporting the most handy features: * * - Fully cross-platform. * - Configurable viewability callbacks. * - List header support. * - List footer support. * - Item separator support. * - Section header support. * - Section separator support. * - Heterogeneous data and item rendering support. * - Pull to Refresh. * - Scroll loading. * * If you don't need section support and want a simpler interface, use * [`<FlatList>`](/react-native/docs/flatlist.html). * * Simple Examples: * * <SectionList * renderItem={({item}) => <ListItem title={item} />} * renderSectionHeader={({section}) => <Header title={section.title} />} * sections={[ // homogeneous rendering between sections * {data: [...], title: ...}, * {data: [...], title: ...}, * {data: [...], title: ...}, * ]} * /> * * <SectionList * sections={[ // heterogeneous rendering between sections * {data: [...], renderItem: ...}, * {data: [...], renderItem: ...}, * {data: [...], renderItem: ...}, * ]} * /> * * This is a convenience wrapper around [`<VirtualizedList>`](docs/virtualizedlist.html), * and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed * here, along with the following caveats: * * - Internal state is not preserved when content scrolls out of the render window. Make sure all * your data is captured in the item data or external stores like Flux, Redux, or Relay. * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow- * equal. Make sure that everything your `renderItem` function depends on is passed as a prop * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on * changes. This includes the `data` prop and parent component state. * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously * offscreen. This means it's possible to scroll faster than the fill rate and momentarily see * blank content. This is a tradeoff that can be adjusted to suit the needs of each application, * and we are working on improving it behind the scenes. * - By default, the list looks for a `key` prop on each item and uses that for the React key. * Alternatively, you can provide a custom `keyExtractor` prop. * */ var SectionList = /*#__PURE__*/ function (_React$PureComponent) { _inheritsLoose(SectionList, _React$PureComponent); function SectionList() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this; _this._captureRef = function (ref) { /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment * suppresses an error when upgrading Flow's support for React. To see the * error delete this comment and run Flow. */ _this._wrapperListRef = ref; }; return _this; } var _proto = SectionList.prototype; /** * Scrolls to the item at the specified `sectionIndex` and `itemIndex` (within the section) * positioned in the viewable area such that `viewPosition` 0 places it at the top (and may be * covered by a sticky header), 1 at the bottom, and 0.5 centered in the middle. `viewOffset` is a * fixed number of pixels to offset the final target position, e.g. to compensate for sticky * headers. * * Note: cannot scroll to locations outside the render window without specifying the * `getItemLayout` prop. */ _proto.scrollToLocation = function scrollToLocation(params) { this._wrapperListRef.scrollToLocation(params); } /** * Tells the list an interaction has occurred, which should trigger viewability calculations, e.g. * if `waitForInteractions` is true and the user has not scrolled. This is typically called by * taps on items or by navigation actions. */ ; _proto.recordInteraction = function recordInteraction() { var listRef = this._wrapperListRef && this._wrapperListRef.getListRef(); listRef && listRef.recordInteraction(); } /** * Displays the scroll indicators momentarily. * * @platform ios */ ; _proto.flashScrollIndicators = function flashScrollIndicators() { var listRef = this._wrapperListRef && this._wrapperListRef.getListRef(); listRef && listRef.flashScrollIndicators(); } /** * Provides a handle to the underlying scroll responder. */ ; _proto.getScrollResponder = function getScrollResponder() { var listRef = this._wrapperListRef && this._wrapperListRef.getListRef(); if (listRef) { return listRef.getScrollResponder(); } }; _proto.getScrollableNode = function getScrollableNode() { var listRef = this._wrapperListRef && this._wrapperListRef.getListRef(); if (listRef) { return listRef.getScrollableNode(); } }; _proto.setNativeProps = function setNativeProps(props) { var listRef = this._wrapperListRef && this._wrapperListRef.getListRef(); if (listRef) { listRef.setNativeProps(props); } }; _proto.render = function render() { var List = this.props.legacyImplementation ? UnimplementedView : VirtualizedSectionList; /* $FlowFixMe(>=0.66.0 site=react_native_fb) This comment suppresses an * error found when Flow v0.66 was deployed. To see the error delete this * comment and run Flow. */ return React.createElement(List, _extends({}, this.props, { ref: this._captureRef })); }; return SectionList; }(React.PureComponent); SectionList.defaultProps = defaultProps; export default SectionList;
ajax/libs/material-ui/4.9.4/esm/Slider/ValueLabel.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; var styles = function styles(theme) { return { thumb: { '&$open': { '& $offset': { transform: 'scale(1) translateY(-10px)' } } }, open: {}, offset: _extends({ zIndex: 1 }, theme.typography.body2, { fontSize: theme.typography.pxToRem(12), lineHeight: 1.2, transition: theme.transitions.create(['transform'], { duration: theme.transitions.duration.shortest }), top: -34, transformOrigin: 'bottom center', transform: 'scale(0)', position: 'absolute' }), circle: { display: 'flex', alignItems: 'center', justifyContent: 'center', width: 32, height: 32, borderRadius: '50% 50% 50% 0', backgroundColor: 'currentColor', transform: 'rotate(-45deg)' }, label: { color: theme.palette.primary.contrastText, transform: 'rotate(45deg)' } }; }; /** * @ignore - internal component. */ function ValueLabel(props) { var children = props.children, classes = props.classes, className = props.className, open = props.open, value = props.value, valueLabelDisplay = props.valueLabelDisplay; if (valueLabelDisplay === 'off') { return children; } return React.cloneElement(children, { className: clsx(children.props.className, (open || valueLabelDisplay === 'on') && classes.open, classes.thumb) }, React.createElement("span", { className: clsx(classes.offset, className) }, React.createElement("span", { className: classes.circle }, React.createElement("span", { className: classes.label }, value)))); } export default withStyles(styles, { name: 'PrivateValueLabel' })(ValueLabel);
ajax/libs/material-ui/4.9.2/es/OutlinedInput/NotchedOutline.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import useTheme from '../styles/useTheme'; import capitalize from '../utils/capitalize'; export const styles = theme => { return { /* Styles applied to the root element. */ root: { position: 'absolute', bottom: 0, right: 0, top: -5, left: 0, margin: 0, padding: 0, paddingLeft: 8, pointerEvents: 'none', borderRadius: 'inherit', borderStyle: 'solid', borderWidth: 1 }, /* Styles applied to the legend element when `labelWidth` is provided. */ legend: { textAlign: 'left', padding: 0, lineHeight: '11px', // sync with `height` in `legend` styles transition: theme.transitions.create('width', { duration: 150, easing: theme.transitions.easing.easeOut }) }, /* Styles applied to the legend element. */ legendLabelled: { display: 'block', width: 'auto', textAlign: 'left', padding: 0, height: 11, // sync with `lineHeight` in `legend` styles fontSize: '0.75em', visibility: 'hidden', maxWidth: 0.01, transition: theme.transitions.create('max-width', { duration: 50, easing: theme.transitions.easing.easeOut }), '& span': { paddingLeft: 5, paddingRight: 5 } }, /* Styles applied to the legend element is notched. */ legendNotched: { maxWidth: 1000, transition: theme.transitions.create('max-width', { duration: 100, easing: theme.transitions.easing.easeOut, delay: 50 }) } }; }; /** * @ignore - internal component. */ const NotchedOutline = React.forwardRef(function NotchedOutline(props, ref) { const { classes, className, label, labelWidth: labelWidthProp, notched, style } = props, other = _objectWithoutPropertiesLoose(props, ["children", "classes", "className", "label", "labelWidth", "notched", "style"]); const theme = useTheme(); const align = theme.direction === 'rtl' ? 'right' : 'left'; if (label !== undefined) { return React.createElement("fieldset", _extends({ "aria-hidden": true, className: clsx(classes.root, className), ref: ref, style: style }, other), React.createElement("legend", { className: clsx(classes.legendLabelled, notched && classes.legendNotched) }, label ? React.createElement("span", null, label) : React.createElement("span", { dangerouslySetInnerHTML: { __html: '&#8203;' } }))); } const labelWidth = labelWidthProp > 0 ? labelWidthProp * 0.75 + 8 : 0.01; return React.createElement("fieldset", _extends({ "aria-hidden": true, style: _extends({ [`padding${capitalize(align)}`]: 8 }, style), className: clsx(classes.root, className), ref: ref }, other), React.createElement("legend", { className: classes.legend, style: { // IE 11: fieldset with legend does not render // a border radius. This maintains consistency // by always having a legend rendered width: notched ? labelWidth : 0.01 } }, React.createElement("span", { dangerouslySetInnerHTML: { __html: '&#8203;' } }))); }); process.env.NODE_ENV !== "production" ? NotchedOutline.propTypes = { /** * The content of the component. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object, /** * @ignore */ className: PropTypes.string, /** * The label. */ label: PropTypes.node, /** * The width of the label. */ labelWidth: PropTypes.number.isRequired, /** * If `true`, the outline is notched to accommodate the label. */ notched: PropTypes.bool.isRequired, /** * @ignore */ style: PropTypes.object } : void 0; export default withStyles(styles, { name: 'PrivateNotchedOutline' })(NotchedOutline);
ajax/libs/material-ui/4.9.3/es/internal/svg-icons/Close.js
cdnjs/cdnjs
import React from 'react'; import createSvgIcon from './createSvgIcon'; /** * @ignore - internal component. */ export default createSvgIcon(React.createElement("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), 'Close');
ajax/libs/material-ui/4.9.3/esm/TablePagination/TablePagination.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import { chainPropTypes } from '@material-ui/utils'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import InputBase from '../InputBase'; import MenuItem from '../MenuItem'; import Select from '../Select'; import TableCell from '../TableCell'; import Toolbar from '../Toolbar'; import Typography from '../Typography'; import TablePaginationActions from './TablePaginationActions'; export var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: { color: theme.palette.text.primary, fontSize: theme.typography.pxToRem(14), overflow: 'auto', // Increase the specificity to override TableCell. '&:last-child': { padding: 0 } }, /* Styles applied to the Toolbar component. */ toolbar: { minHeight: 52, paddingRight: 2 }, /* Styles applied to the spacer element. */ spacer: { flex: '1 1 100%' }, /* Styles applied to the caption Typography components if `variant="caption"`. */ caption: { flexShrink: 0 }, /* Styles applied to the Select component root element. */ selectRoot: { // `.selectRoot` should be merged with `.input` in v5. marginRight: 32, marginLeft: 8 }, /* Styles applied to the Select component `select` class. */ select: { paddingLeft: 8, paddingRight: 24, textAlign: 'right', textAlignLast: 'right' // Align <select> on Chrome. }, // TODO v5: remove /* Styles applied to the Select component `icon` class. */ selectIcon: {}, /* Styles applied to the `InputBase` component. */ input: { color: 'inherit', fontSize: 'inherit', flexShrink: 0 }, /* Styles applied to the MenuItem component. */ menuItem: {}, /* Styles applied to the internal `TablePaginationActions` component. */ actions: { flexShrink: 0, marginLeft: 20 } }; }; var defaultLabelDisplayedRows = function defaultLabelDisplayedRows(_ref) { var from = _ref.from, to = _ref.to, count = _ref.count; return "".concat(from, "-").concat(to === -1 ? count : to, " of ").concat(count !== -1 ? count : "more than ".concat(to)); }; var defaultRowsPerPageOptions = [10, 25, 50, 100]; /** * A `TableCell` based component for placing inside `TableFooter` for pagination. */ var TablePagination = React.forwardRef(function TablePagination(props, ref) { var _props$ActionsCompone = props.ActionsComponent, ActionsComponent = _props$ActionsCompone === void 0 ? TablePaginationActions : _props$ActionsCompone, backIconButtonProps = props.backIconButtonProps, _props$backIconButton = props.backIconButtonText, backIconButtonText = _props$backIconButton === void 0 ? 'Previous page' : _props$backIconButton, classes = props.classes, className = props.className, colSpanProp = props.colSpan, _props$component = props.component, Component = _props$component === void 0 ? TableCell : _props$component, count = props.count, _props$labelDisplayed = props.labelDisplayedRows, labelDisplayedRows = _props$labelDisplayed === void 0 ? defaultLabelDisplayedRows : _props$labelDisplayed, _props$labelRowsPerPa = props.labelRowsPerPage, labelRowsPerPage = _props$labelRowsPerPa === void 0 ? 'Rows per page:' : _props$labelRowsPerPa, nextIconButtonProps = props.nextIconButtonProps, _props$nextIconButton = props.nextIconButtonText, nextIconButtonText = _props$nextIconButton === void 0 ? 'Next page' : _props$nextIconButton, onChangePage = props.onChangePage, onChangeRowsPerPage = props.onChangeRowsPerPage, page = props.page, rowsPerPage = props.rowsPerPage, _props$rowsPerPageOpt = props.rowsPerPageOptions, rowsPerPageOptions = _props$rowsPerPageOpt === void 0 ? defaultRowsPerPageOptions : _props$rowsPerPageOpt, _props$SelectProps = props.SelectProps, SelectProps = _props$SelectProps === void 0 ? {} : _props$SelectProps, other = _objectWithoutProperties(props, ["ActionsComponent", "backIconButtonProps", "backIconButtonText", "classes", "className", "colSpan", "component", "count", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "nextIconButtonText", "onChangePage", "onChangeRowsPerPage", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps"]); var colSpan; if (Component === TableCell || Component === 'td') { colSpan = colSpanProp || 1000; // col-span over everything } var MenuItemComponent = SelectProps.native ? 'option' : MenuItem; return React.createElement(Component, _extends({ className: clsx(classes.root, className), colSpan: colSpan, ref: ref }, other), React.createElement(Toolbar, { className: classes.toolbar }, React.createElement("div", { className: classes.spacer }), rowsPerPageOptions.length > 1 && React.createElement(Typography, { color: "inherit", variant: "body2", className: classes.caption }, labelRowsPerPage), rowsPerPageOptions.length > 1 && React.createElement(Select, _extends({ classes: { select: classes.select, icon: classes.selectIcon }, input: React.createElement(InputBase, { className: clsx(classes.input, classes.selectRoot) }), value: rowsPerPage, onChange: onChangeRowsPerPage }, SelectProps), rowsPerPageOptions.map(function (rowsPerPageOption) { return React.createElement(MenuItemComponent, { className: classes.menuItem, key: rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption, value: rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption }, rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption); })), React.createElement(Typography, { color: "inherit", variant: "body2", className: classes.caption }, labelDisplayedRows({ from: count === 0 ? 0 : page * rowsPerPage + 1, to: count !== -1 ? Math.min(count, (page + 1) * rowsPerPage) : (page + 1) * rowsPerPage, count: count, page: page })), React.createElement(ActionsComponent, { className: classes.actions, backIconButtonProps: _extends({ title: backIconButtonText, 'aria-label': backIconButtonText }, backIconButtonProps), count: count, nextIconButtonProps: _extends({ title: nextIconButtonText, 'aria-label': nextIconButtonText }, nextIconButtonProps), onChangePage: onChangePage, page: page, rowsPerPage: rowsPerPage }))); }); process.env.NODE_ENV !== "production" ? TablePagination.propTypes = { /** * The component used for displaying the actions. * Either a string to use a DOM element or a component. */ ActionsComponent: PropTypes.elementType, /** * Props applied to the back arrow [`IconButton`](/api/icon-button/) component. */ backIconButtonProps: PropTypes.object, /** * Text label for the back arrow icon button. * * For localization purposes, you can use the provided [translations](/guides/localization/). */ backIconButtonText: PropTypes.string, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * @ignore */ colSpan: PropTypes.number, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: PropTypes.elementType, /** * The total number of rows. * * To enable server side pagination for an unknown number of items, provide -1. */ count: PropTypes.number.isRequired, /** * Customize the displayed rows label. * * For localization purposes, you can use the provided [translations](/guides/localization/). */ labelDisplayedRows: PropTypes.func, /** * Customize the rows per page label. Invoked with a `{ from, to, count, page }` * object. * * For localization purposes, you can use the provided [translations](/guides/localization/). */ labelRowsPerPage: PropTypes.node, /** * Props applied to the next arrow [`IconButton`](/api/icon-button/) element. */ nextIconButtonProps: PropTypes.object, /** * Text label for the next arrow icon button. * * For localization purposes, you can use the provided [translations](/guides/localization/). */ nextIconButtonText: PropTypes.string, /** * Callback fired when the page is changed. * * @param {object} event The event source of the callback. * @param {number} page The page selected. */ onChangePage: PropTypes.func.isRequired, /** * Callback fired when the number of rows per page is changed. * * @param {object} event The event source of the callback. */ onChangeRowsPerPage: PropTypes.func, /** * The zero-based index of the current page. */ page: chainPropTypes(PropTypes.number.isRequired, function (props) { var count = props.count, page = props.page, rowsPerPage = props.rowsPerPage; var newLastPage = Math.max(0, Math.ceil(count / rowsPerPage) - 1); if (page < 0 || page > newLastPage) { return new Error('Material-UI: the page prop of a TablePagination is out of range ' + "(0 to ".concat(newLastPage, ", but page is ").concat(page, ").")); } return null; }), /** * The number of rows per page. */ rowsPerPage: PropTypes.number.isRequired, /** * Customizes the options of the rows per page select field. If less than two options are * available, no select field will be displayed. */ rowsPerPageOptions: PropTypes.array, /** * Props applied to the rows per page [`Select`](/api/select/) element. */ SelectProps: PropTypes.object } : void 0; export default withStyles(styles, { name: 'MuiTablePagination' })(TablePagination);
ajax/libs/primereact/7.0.1/divider/divider.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { classNames } from 'primereact/utils'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Divider = /*#__PURE__*/function (_Component) { _inherits(Divider, _Component); var _super = _createSuper(Divider); function Divider() { _classCallCheck(this, Divider); return _super.apply(this, arguments); } _createClass(Divider, [{ key: "isHorizontal", get: function get() { return this.props.layout === 'horizontal'; } }, { key: "isVertical", get: function get() { return this.props.layout === 'vertical'; } }, { key: "render", value: function render() { var dividerClassName = classNames("p-divider p-component p-divider-".concat(this.props.layout, " p-divider-").concat(this.props.type), { 'p-divider-left': this.isHorizontal && (!this.props.align || this.props.align === 'left'), 'p-divider-right': this.isHorizontal && this.props.align === 'right', 'p-divider-center': this.isHorizontal && this.props.align === 'center' || this.isVertical && (!this.props.align || this.props.align === 'center'), 'p-divider-top': this.isVertical && this.props.align === 'top', 'p-divider-bottom': this.isVertical && this.props.align === 'bottom' }, this.props.className); return /*#__PURE__*/React.createElement("div", { className: dividerClassName, style: this.props.style, role: "separator" }, /*#__PURE__*/React.createElement("div", { className: "p-divider-content" }, this.props.children)); } }]); return Divider; }(Component); _defineProperty(Divider, "defaultProps", { align: null, layout: 'horizontal', type: 'solid', style: null, className: null }); export { Divider };
ajax/libs/react-native-web/0.0.0-c60417ab3/exports/ScrollView/index.js
cdnjs/cdnjs
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import createReactClass from 'create-react-class'; import dismissKeyboard from '../../modules/dismissKeyboard'; import invariant from 'fbjs/lib/invariant'; import ScrollResponder from '../../modules/ScrollResponder'; import ScrollViewBase from './ScrollViewBase'; import StyleSheet from '../StyleSheet'; import View from '../View'; import React from 'react'; var emptyObject = {}; /* eslint-disable react/prefer-es6-class */ var ScrollView = createReactClass({ displayName: "ScrollView", mixins: [ScrollResponder.Mixin], getInitialState: function getInitialState() { return this.scrollResponderMixinGetInitialState(); }, flashScrollIndicators: function flashScrollIndicators() { this.scrollResponderFlashScrollIndicators(); }, setNativeProps: function setNativeProps(props) { if (this._scrollNodeRef) { this._scrollNodeRef.setNativeProps(props); } }, /** * Returns a reference to the underlying scroll responder, which supports * operations like `scrollTo`. All ScrollView-like components should * implement this method so that they can be composed while providing access * to the underlying scroll responder's methods. */ getScrollResponder: function getScrollResponder() { return this; }, getScrollableNode: function getScrollableNode() { return this._scrollNodeRef; }, getInnerViewNode: function getInnerViewNode() { return this._innerViewRef; }, /** * Scrolls to a given x, y offset, either immediately or with a smooth animation. * Syntax: * * scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) * * Note: The weird argument signature is due to the fact that, for historical reasons, * the function also accepts separate arguments as as alternative to the options object. * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. */ scrollTo: function scrollTo(y, x, animated) { if (typeof y === 'number') { console.warn('`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.'); } else { var _ref = y || emptyObject; x = _ref.x; y = _ref.y; animated = _ref.animated; } this.getScrollResponder().scrollResponderScrollTo({ x: x || 0, y: y || 0, animated: animated !== false }); }, /** * If this is a vertical ScrollView scrolls to the bottom. * If this is a horizontal ScrollView scrolls to the right. * * Use `scrollToEnd({ animated: true })` for smooth animated scrolling, * `scrollToEnd({ animated: false })` for immediate scrolling. * If no options are passed, `animated` defaults to true. */ scrollToEnd: function scrollToEnd(options) { // Default to true var animated = (options && options.animated) !== false; var horizontal = this.props.horizontal; var scrollResponder = this.getScrollResponder(); var scrollResponderNode = scrollResponder.scrollResponderGetScrollableNode(); var x = horizontal ? scrollResponderNode.scrollWidth : 0; var y = horizontal ? 0 : scrollResponderNode.scrollHeight; scrollResponder.scrollResponderScrollTo({ x: x, y: y, animated: animated }); }, render: function render() { var _this$props = this.props, contentContainerStyle = _this$props.contentContainerStyle, horizontal = _this$props.horizontal, onContentSizeChange = _this$props.onContentSizeChange, refreshControl = _this$props.refreshControl, stickyHeaderIndices = _this$props.stickyHeaderIndices, pagingEnabled = _this$props.pagingEnabled, keyboardDismissMode = _this$props.keyboardDismissMode, onScroll = _this$props.onScroll, other = _objectWithoutPropertiesLoose(_this$props, ["contentContainerStyle", "horizontal", "onContentSizeChange", "refreshControl", "stickyHeaderIndices", "pagingEnabled", "keyboardDismissMode", "onScroll"]); if (process.env.NODE_ENV !== 'production' && this.props.style) { var style = StyleSheet.flatten(this.props.style); var childLayoutProps = ['alignItems', 'justifyContent'].filter(function (prop) { return style && style[prop] !== undefined; }); invariant(childLayoutProps.length === 0, "ScrollView child layout (" + JSON.stringify(childLayoutProps) + ") " + 'must be applied through the contentContainerStyle prop.'); } var contentSizeChangeProps = {}; if (onContentSizeChange) { contentSizeChangeProps = { onLayout: this._handleContentOnLayout }; } var hasStickyHeaderIndices = !horizontal && Array.isArray(stickyHeaderIndices); var children = hasStickyHeaderIndices || pagingEnabled ? React.Children.map(this.props.children, function (child, i) { var isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1; if (child != null && (isSticky || pagingEnabled)) { return React.createElement(View, { style: StyleSheet.compose(isSticky && styles.stickyHeader, pagingEnabled && styles.pagingEnabledChild) }, child); } else { return child; } }) : this.props.children; var contentContainer = React.createElement(View, _extends({}, contentSizeChangeProps, { children: children, collapsable: false, ref: this._setInnerViewRef, style: StyleSheet.compose(horizontal && styles.contentContainerHorizontal, contentContainerStyle) })); var baseStyle = horizontal ? styles.baseHorizontal : styles.baseVertical; var pagingEnabledStyle = horizontal ? styles.pagingEnabledHorizontal : styles.pagingEnabledVertical; var props = _objectSpread({}, other, { style: [baseStyle, pagingEnabled && pagingEnabledStyle, this.props.style], onTouchStart: this.scrollResponderHandleTouchStart, onTouchMove: this.scrollResponderHandleTouchMove, onTouchEnd: this.scrollResponderHandleTouchEnd, onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag, onScrollEndDrag: this.scrollResponderHandleScrollEndDrag, onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin, onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd, onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder, onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture, onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder, onScroll: this._handleScroll, onResponderGrant: this.scrollResponderHandleResponderGrant, onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest, onResponderTerminate: this.scrollResponderHandleTerminate, onResponderRelease: this.scrollResponderHandleResponderRelease, onResponderReject: this.scrollResponderHandleResponderReject }); var ScrollViewClass = ScrollViewBase; invariant(ScrollViewClass !== undefined, 'ScrollViewClass must not be undefined'); if (refreshControl) { return React.cloneElement(refreshControl, { style: props.style }, React.createElement(ScrollViewClass, _extends({}, props, { ref: this._setScrollNodeRef, style: baseStyle }), contentContainer)); } return React.createElement(ScrollViewClass, _extends({}, props, { ref: this._setScrollNodeRef }), contentContainer); }, _handleContentOnLayout: function _handleContentOnLayout(e) { var _e$nativeEvent$layout = e.nativeEvent.layout, width = _e$nativeEvent$layout.width, height = _e$nativeEvent$layout.height; this.props.onContentSizeChange(width, height); }, _handleScroll: function _handleScroll(e) { if (process.env.NODE_ENV !== 'production') { if (this.props.onScroll && this.props.scrollEventThrottle == null) { console.log('You specified `onScroll` on a <ScrollView> but not ' + '`scrollEventThrottle`. You will only receive one event. ' + 'Using `16` you get all the events but be aware that it may ' + "cause frame drops, use a bigger number if you don't need as " + 'much precision.'); } } if (this.props.keyboardDismissMode === 'on-drag') { dismissKeyboard(); } this.scrollResponderHandleScroll(e); }, _setInnerViewRef: function _setInnerViewRef(component) { this._innerViewRef = component; }, _setScrollNodeRef: function _setScrollNodeRef(component) { this._scrollNodeRef = component; } }); var commonStyle = { flexGrow: 1, flexShrink: 1, // Enable hardware compositing in modern browsers. // Creates a new layer with its own backing surface that can significantly // improve scroll performance. transform: [{ translateZ: 0 }], // iOS native scrolling WebkitOverflowScrolling: 'touch' }; var styles = StyleSheet.create({ baseVertical: _objectSpread({}, commonStyle, { flexDirection: 'column', overflowX: 'hidden', overflowY: 'auto' }), baseHorizontal: _objectSpread({}, commonStyle, { flexDirection: 'row', overflowX: 'auto', overflowY: 'hidden' }), contentContainerHorizontal: { flexDirection: 'row' }, stickyHeader: { position: 'sticky', top: 0, zIndex: 10 }, pagingEnabledHorizontal: { scrollSnapType: 'x mandatory' }, pagingEnabledVertical: { scrollSnapType: 'y mandatory' }, pagingEnabledChild: { scrollSnapAlign: 'start' } }); export default ScrollView;
ajax/libs/primereact/7.2.0/datascroller/datascroller.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { ObjectUtils, classNames } from 'primereact/utils'; import { localeOption } from 'primereact/api'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var DataScroller = /*#__PURE__*/function (_Component) { _inherits(DataScroller, _Component); var _super = _createSuper(DataScroller); function DataScroller(props) { var _this; _classCallCheck(this, DataScroller); _this = _super.call(this, props); _this.state = {}; _this.dataToRender = []; _this.value = _this.props.value; _this.first = 0; return _this; } _createClass(DataScroller, [{ key: "handleDataChange", value: function handleDataChange() { if (this.props.lazy) { this.dataToRender = this.value; this.setState({ dataToRender: this.dataToRender }); } else { this.load(); } } }, { key: "load", value: function load() { if (this.props.lazy) { if (this.props.onLazyLoad) { this.props.onLazyLoad(this.createLazyLoadMetadata()); } this.first = this.first + this.props.rows; } else { if (this.value) { for (var i = this.first; i < this.first + this.props.rows; i++) { if (i >= this.value.length) { break; } this.dataToRender.push(this.value[i]); } if (this.value.length !== 0) { this.first = this.first + this.props.rows; } this.setState({ dataToRender: this.dataToRender }); } } } }, { key: "reset", value: function reset() { this.first = 0; this.dataToRender = []; this.setState({ dataToRender: this.dataToRender }); this.load(); } }, { key: "isEmpty", value: function isEmpty() { return !this.dataToRender || this.dataToRender.length === 0; } }, { key: "createLazyLoadMetadata", value: function createLazyLoadMetadata() { return { first: this.first, rows: this.props.rows }; } }, { key: "bindScrollListener", value: function bindScrollListener() { var _this2 = this; if (this.props.inline) { this.scrollFunction = function () { var scrollTop = _this2.contentElement.scrollTop, scrollHeight = _this2.contentElement.scrollHeight, viewportHeight = _this2.contentElement.clientHeight; if (scrollTop >= scrollHeight * _this2.props.buffer - viewportHeight) { _this2.load(); } }; this.contentElement.addEventListener('scroll', this.scrollFunction); } else { this.scrollFunction = function () { var docBody = document.body, docElement = document.documentElement, scrollTop = window.pageYOffset || document.documentElement.scrollTop, winHeight = docElement.clientHeight, docHeight = Math.max(docBody.scrollHeight, docBody.offsetHeight, winHeight, docElement.scrollHeight, docElement.offsetHeight); if (scrollTop >= docHeight * _this2.props.buffer - winHeight) { _this2.load(); } }; window.addEventListener('scroll', this.scrollFunction); } } }, { key: "unbindScrollListener", value: function unbindScrollListener() { if (this.scrollFunction) { if (this.props.inline) { this.contentElement.removeEventListener('scroll', this.scrollFunction); this.contentElement = null; } else if (!this.props.loader) { window.removeEventListener('scroll', this.scrollFunction); } } this.scrollFunction = null; } }, { key: "componentDidMount", value: function componentDidMount() { this.load(); if (!this.props.loader) { this.bindScrollListener(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { var newValue = this.props.value; if (newValue && this.value !== newValue) { this.value = newValue; this.first = 0; this.dataToRender = []; this.handleDataChange(); } if (prevProps.loader !== this.props.loader && this.props.loader) { this.unbindScrollListener(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.scrollFunction) { this.unbindScrollListener(); } } }, { key: "renderHeader", value: function renderHeader() { if (this.props.header) { return /*#__PURE__*/React.createElement("div", { className: "p-datascroller-header" }, this.props.header); } return null; } }, { key: "renderFooter", value: function renderFooter() { if (this.props.footer) { return /*#__PURE__*/React.createElement("div", { className: "p-datascroller-footer" }, this.props.footer); } return null; } }, { key: "renderItem", value: function renderItem(value, index) { var content = this.props.itemTemplate ? this.props.itemTemplate(value) : value; return /*#__PURE__*/React.createElement("li", { key: index + '_datascrollitem' }, content); } }, { key: "renderEmptyMessage", value: function renderEmptyMessage() { var content = ObjectUtils.getJSXElement(this.props.emptyMessage, this.props) || localeOption('emptyMessage'); return /*#__PURE__*/React.createElement("li", null, content); } }, { key: "renderContent", value: function renderContent() { var _this3 = this; var content = this.state.dataToRender && this.state.dataToRender.length ? this.state.dataToRender.map(function (val, i) { return _this3.renderItem(val, i); }) : this.renderEmptyMessage(); return /*#__PURE__*/React.createElement("div", { ref: function ref(el) { return _this3.contentElement = el; }, className: "p-datascroller-content", style: { 'maxHeight': this.props.scrollHeight } }, /*#__PURE__*/React.createElement("ul", { className: "p-datascroller-list" }, content)); } }, { key: "render", value: function render() { var className = classNames('p-datascroller p-component', this.props.className, { 'p-datascroller-inline': this.props.inline }); var header = this.renderHeader(); var footer = this.renderFooter(); var content = this.renderContent(); return /*#__PURE__*/React.createElement("div", { id: this.props.id, className: className }, header, content, footer); } }]); return DataScroller; }(Component); _defineProperty(DataScroller, "defaultProps", { id: null, value: null, rows: 0, inline: false, scrollHeight: null, loader: false, buffer: 0.9, style: null, className: null, onLazyLoad: null, emptyMessage: null, itemTemplate: null, header: null, footer: null, lazy: false }); export { DataScroller };
ajax/libs/material-ui/4.9.14/es/utils/createSvgIcon.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import SvgIcon from '../SvgIcon'; /** * Private module reserved for @material-ui/x packages. */ export default function createSvgIcon(path, displayName) { const Component = React.memo(React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(SvgIcon, _extends({ ref: ref }, props), path))); if (process.env.NODE_ENV !== 'production') { Component.displayName = `${displayName}Icon`; } Component.muiName = SvgIcon.muiName; return Component; }
ajax/libs/react-native-web/0.12.2/exports/Touchable/index.js
cdnjs/cdnjs
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * * @format */ 'use strict'; function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import AccessibilityUtil from '../../modules/AccessibilityUtil'; import BoundingDimensions from './BoundingDimensions'; import findNodeHandle from '../findNodeHandle'; import normalizeColor from 'normalize-css-color'; import Position from './Position'; import React from 'react'; import UIManager from '../UIManager'; import View from '../View'; var extractSingleTouch = function extractSingleTouch(nativeEvent) { var touches = nativeEvent.touches; var changedTouches = nativeEvent.changedTouches; var hasTouches = touches && touches.length > 0; var hasChangedTouches = changedTouches && changedTouches.length > 0; return !hasTouches && hasChangedTouches ? changedTouches[0] : hasTouches ? touches[0] : nativeEvent; }; /** * `Touchable`: Taps done right. * * You hook your `ResponderEventPlugin` events into `Touchable`. `Touchable` * will measure time/geometry and tells you when to give feedback to the user. * * ====================== Touchable Tutorial =============================== * The `Touchable` mixin helps you handle the "press" interaction. It analyzes * the geometry of elements, and observes when another responder (scroll view * etc) has stolen the touch lock. It notifies your component when it should * give feedback to the user. (bouncing/highlighting/unhighlighting). * * - When a touch was activated (typically you highlight) * - When a touch was deactivated (typically you unhighlight) * - When a touch was "pressed" - a touch ended while still within the geometry * of the element, and no other element (like scroller) has "stolen" touch * lock ("responder") (Typically you bounce the element). * * A good tap interaction isn't as simple as you might think. There should be a * slight delay before showing a highlight when starting a touch. If a * subsequent touch move exceeds the boundary of the element, it should * unhighlight, but if that same touch is brought back within the boundary, it * should rehighlight again. A touch can move in and out of that boundary * several times, each time toggling highlighting, but a "press" is only * triggered if that touch ends while within the element's boundary and no * scroller (or anything else) has stolen the lock on touches. * * To create a new type of component that handles interaction using the * `Touchable` mixin, do the following: * * - Initialize the `Touchable` state. * * getInitialState: function() { * return merge(this.touchableGetInitialState(), yourComponentState); * } * * - Choose the rendered component who's touches should start the interactive * sequence. On that rendered node, forward all `Touchable` responder * handlers. You can choose any rendered node you like. Choose a node whose * hit target you'd like to instigate the interaction sequence: * * // In render function: * return ( * <View * onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder} * onResponderTerminationRequest={this.touchableHandleResponderTerminationRequest} * onResponderGrant={this.touchableHandleResponderGrant} * onResponderMove={this.touchableHandleResponderMove} * onResponderRelease={this.touchableHandleResponderRelease} * onResponderTerminate={this.touchableHandleResponderTerminate}> * <View> * Even though the hit detection/interactions are triggered by the * wrapping (typically larger) node, we usually end up implementing * custom logic that highlights this inner one. * </View> * </View> * ); * * - You may set up your own handlers for each of these events, so long as you * also invoke the `touchable*` handlers inside of your custom handler. * * - Implement the handlers on your component class in order to provide * feedback to the user. See documentation for each of these class methods * that you should implement. * * touchableHandlePress: function() { * this.performBounceAnimation(); // or whatever you want to do. * }, * touchableHandleActivePressIn: function() { * this.beginHighlighting(...); // Whatever you like to convey activation * }, * touchableHandleActivePressOut: function() { * this.endHighlighting(...); // Whatever you like to convey deactivation * }, * * - There are more advanced methods you can implement (see documentation below): * touchableGetHighlightDelayMS: function() { * return 20; * } * // In practice, *always* use a predeclared constant (conserve memory). * touchableGetPressRectOffset: function() { * return {top: 20, left: 20, right: 20, bottom: 100}; * } */ /** * Touchable states. */ var States = { NOT_RESPONDER: 'NOT_RESPONDER', // Not the responder RESPONDER_INACTIVE_PRESS_IN: 'RESPONDER_INACTIVE_PRESS_IN', // Responder, inactive, in the `PressRect` RESPONDER_INACTIVE_PRESS_OUT: 'RESPONDER_INACTIVE_PRESS_OUT', // Responder, inactive, out of `PressRect` RESPONDER_ACTIVE_PRESS_IN: 'RESPONDER_ACTIVE_PRESS_IN', // Responder, active, in the `PressRect` RESPONDER_ACTIVE_PRESS_OUT: 'RESPONDER_ACTIVE_PRESS_OUT', // Responder, active, out of `PressRect` RESPONDER_ACTIVE_LONG_PRESS_IN: 'RESPONDER_ACTIVE_LONG_PRESS_IN', // Responder, active, in the `PressRect`, after long press threshold RESPONDER_ACTIVE_LONG_PRESS_OUT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT', // Responder, active, out of `PressRect`, after long press threshold ERROR: 'ERROR' }; /* * Quick lookup map for states that are considered to be "active" */ var baseStatesConditions = { NOT_RESPONDER: false, RESPONDER_INACTIVE_PRESS_IN: false, RESPONDER_INACTIVE_PRESS_OUT: false, RESPONDER_ACTIVE_PRESS_IN: false, RESPONDER_ACTIVE_PRESS_OUT: false, RESPONDER_ACTIVE_LONG_PRESS_IN: false, RESPONDER_ACTIVE_LONG_PRESS_OUT: false, ERROR: false }; var IsActive = _objectSpread({}, baseStatesConditions, { RESPONDER_ACTIVE_PRESS_OUT: true, RESPONDER_ACTIVE_PRESS_IN: true }); /** * Quick lookup for states that are considered to be "pressing" and are * therefore eligible to result in a "selection" if the press stops. */ var IsPressingIn = _objectSpread({}, baseStatesConditions, { RESPONDER_INACTIVE_PRESS_IN: true, RESPONDER_ACTIVE_PRESS_IN: true, RESPONDER_ACTIVE_LONG_PRESS_IN: true }); var IsLongPressingIn = _objectSpread({}, baseStatesConditions, { RESPONDER_ACTIVE_LONG_PRESS_IN: true }); /** * Inputs to the state machine. */ var Signals = { DELAY: 'DELAY', RESPONDER_GRANT: 'RESPONDER_GRANT', RESPONDER_RELEASE: 'RESPONDER_RELEASE', RESPONDER_TERMINATED: 'RESPONDER_TERMINATED', ENTER_PRESS_RECT: 'ENTER_PRESS_RECT', LEAVE_PRESS_RECT: 'LEAVE_PRESS_RECT', LONG_PRESS_DETECTED: 'LONG_PRESS_DETECTED' }; /** * Mapping from States x Signals => States */ var Transitions = { NOT_RESPONDER: { DELAY: States.ERROR, RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN, RESPONDER_RELEASE: States.ERROR, RESPONDER_TERMINATED: States.ERROR, ENTER_PRESS_RECT: States.ERROR, LEAVE_PRESS_RECT: States.ERROR, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_INACTIVE_PRESS_IN: { DELAY: States.RESPONDER_ACTIVE_PRESS_IN, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_INACTIVE_PRESS_OUT: { DELAY: States.RESPONDER_ACTIVE_PRESS_OUT, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_ACTIVE_PRESS_IN: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN }, RESPONDER_ACTIVE_PRESS_OUT: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_ACTIVE_LONG_PRESS_IN: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT, LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN }, RESPONDER_ACTIVE_LONG_PRESS_OUT: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, error: { DELAY: States.NOT_RESPONDER, RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.NOT_RESPONDER, LEAVE_PRESS_RECT: States.NOT_RESPONDER, LONG_PRESS_DETECTED: States.NOT_RESPONDER } }; // ==== Typical Constants for integrating into UI components ==== // var HIT_EXPAND_PX = 20; // var HIT_VERT_OFFSET_PX = 10; var HIGHLIGHT_DELAY_MS = 130; var PRESS_EXPAND_PX = 20; var LONG_PRESS_THRESHOLD = 500; var LONG_PRESS_DELAY_MS = LONG_PRESS_THRESHOLD - HIGHLIGHT_DELAY_MS; var LONG_PRESS_ALLOWED_MOVEMENT = 10; // Default amount "active" region protrudes beyond box /** * By convention, methods prefixed with underscores are meant to be @private, * and not @protected. Mixers shouldn't access them - not even to provide them * as callback handlers. * * * ========== Geometry ========= * `Touchable` only assumes that there exists a `HitRect` node. The `PressRect` * is an abstract box that is extended beyond the `HitRect`. * * +--------------------------+ * | | - "Start" events in `HitRect` cause `HitRect` * | +--------------------+ | to become the responder. * | | +--------------+ | | - `HitRect` is typically expanded around * | | | | | | the `VisualRect`, but shifted downward. * | | | VisualRect | | | - After pressing down, after some delay, * | | | | | | and before letting up, the Visual React * | | +--------------+ | | will become "active". This makes it eligible * | | HitRect | | for being highlighted (so long as the * | +--------------------+ | press remains in the `PressRect`). * | PressRect o | * +----------------------|---+ * Out Region | * +-----+ This gap between the `HitRect` and * `PressRect` allows a touch to move far away * from the original hit rect, and remain * highlighted, and eligible for a "Press". * Customize this via * `touchableGetPressRectOffset()`. * * * * ======= State Machine ======= * * +-------------+ <---+ RESPONDER_RELEASE * |NOT_RESPONDER| * +-------------+ <---+ RESPONDER_TERMINATED * + * | RESPONDER_GRANT (HitRect) * v * +---------------------------+ DELAY +-------------------------+ T + DELAY +------------------------------+ * |RESPONDER_INACTIVE_PRESS_IN|+-------->|RESPONDER_ACTIVE_PRESS_IN| +------------> |RESPONDER_ACTIVE_LONG_PRESS_IN| * +---------------------------+ +-------------------------+ +------------------------------+ * + ^ + ^ + ^ * |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ * |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT * | | | | | | * v + v + v + * +----------------------------+ DELAY +--------------------------+ +-------------------------------+ * |RESPONDER_INACTIVE_PRESS_OUT|+------->|RESPONDER_ACTIVE_PRESS_OUT| |RESPONDER_ACTIVE_LONG_PRESS_OUT| * +----------------------------+ +--------------------------+ +-------------------------------+ * * T + DELAY => LONG_PRESS_DELAY_MS + DELAY * * Not drawn are the side effects of each transition. The most important side * effect is the `touchableHandlePress` abstract method invocation that occurs * when a responder is released while in either of the "Press" states. * * The other important side effects are the highlight abstract method * invocations (internal callbacks) to be implemented by the mixer. * * * @lends Touchable.prototype */ var TouchableMixin = { // HACK (part 1): basic support for touchable interactions using a keyboard componentDidMount: function componentDidMount() { var _this = this; this._touchableNode = findNodeHandle(this); if (this._touchableNode && this._touchableNode.addEventListener) { this._touchableBlurListener = function (e) { if (_this._isTouchableKeyboardActive) { if (_this.state.touchable.touchState && _this.state.touchable.touchState !== States.NOT_RESPONDER) { _this.touchableHandleResponderTerminate({ nativeEvent: e }); } _this._isTouchableKeyboardActive = false; } }; this._touchableNode.addEventListener('blur', this._touchableBlurListener); } }, /** * Clear all timeouts on unmount */ componentWillUnmount: function componentWillUnmount() { if (this._touchableNode && this._touchableNode.addEventListener) { this._touchableNode.removeEventListener('blur', this._touchableBlurListener); } this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout); this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout); this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); }, /** * It's prefer that mixins determine state in this way, having the class * explicitly mix the state in the one and only `getInitialState` method. * * @return {object} State object to be placed inside of * `this.state.touchable`. */ touchableGetInitialState: function touchableGetInitialState() { return { touchable: { touchState: undefined, responderID: null } }; }, // ==== Hooks to Gesture Responder system ==== /** * Must return true if embedded in a native platform scroll view. */ touchableHandleResponderTerminationRequest: function touchableHandleResponderTerminationRequest() { return !this.props.rejectResponderTermination; }, /** * Must return true to start the process of `Touchable`. */ touchableHandleStartShouldSetResponder: function touchableHandleStartShouldSetResponder() { return !this.props.disabled; }, /** * Return true to cancel press on long press. */ touchableLongPressCancelsPress: function touchableLongPressCancelsPress() { return true; }, /** * Place as callback for a DOM element's `onResponderGrant` event. * @param {SyntheticEvent} e Synthetic event from event system. * */ touchableHandleResponderGrant: function touchableHandleResponderGrant(e) { var dispatchID = e.currentTarget; // Since e is used in a callback invoked on another event loop // (as in setTimeout etc), we need to call e.persist() on the // event to make sure it doesn't get reused in the event object pool. e.persist(); this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); this.pressOutDelayTimeout = null; this.state.touchable.touchState = States.NOT_RESPONDER; this.state.touchable.responderID = dispatchID; this._receiveSignal(Signals.RESPONDER_GRANT, e); var delayMS = this.touchableGetHighlightDelayMS !== undefined ? Math.max(this.touchableGetHighlightDelayMS(), 0) : HIGHLIGHT_DELAY_MS; delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS; if (delayMS !== 0) { this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), delayMS); } else { this._handleDelay(e); } var longDelayMS = this.touchableGetLongPressDelayMS !== undefined ? Math.max(this.touchableGetLongPressDelayMS(), 10) : LONG_PRESS_DELAY_MS; longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS; this.longPressDelayTimeout = setTimeout(this._handleLongDelay.bind(this, e), longDelayMS + delayMS); }, /** * Place as callback for a DOM element's `onResponderRelease` event. */ touchableHandleResponderRelease: function touchableHandleResponderRelease(e) { this.pressInLocation = null; this._receiveSignal(Signals.RESPONDER_RELEASE, e); }, /** * Place as callback for a DOM element's `onResponderTerminate` event. */ touchableHandleResponderTerminate: function touchableHandleResponderTerminate(e) { this.pressInLocation = null; this._receiveSignal(Signals.RESPONDER_TERMINATED, e); }, /** * Place as callback for a DOM element's `onResponderMove` event. */ touchableHandleResponderMove: function touchableHandleResponderMove(e) { // Measurement may not have returned yet. if (!this.state.touchable.positionOnActivate) { return; } var positionOnActivate = this.state.touchable.positionOnActivate; var dimensionsOnActivate = this.state.touchable.dimensionsOnActivate; var pressRectOffset = this.touchableGetPressRectOffset ? this.touchableGetPressRectOffset() : { left: PRESS_EXPAND_PX, right: PRESS_EXPAND_PX, top: PRESS_EXPAND_PX, bottom: PRESS_EXPAND_PX }; var pressExpandLeft = pressRectOffset.left; var pressExpandTop = pressRectOffset.top; var pressExpandRight = pressRectOffset.right; var pressExpandBottom = pressRectOffset.bottom; var hitSlop = this.touchableGetHitSlop ? this.touchableGetHitSlop() : null; if (hitSlop) { pressExpandLeft += hitSlop.left || 0; pressExpandTop += hitSlop.top || 0; pressExpandRight += hitSlop.right || 0; pressExpandBottom += hitSlop.bottom || 0; } var touch = extractSingleTouch(e.nativeEvent); var pageX = touch && touch.pageX; var pageY = touch && touch.pageY; if (this.pressInLocation) { var movedDistance = this._getDistanceBetweenPoints(pageX, pageY, this.pressInLocation.pageX, this.pressInLocation.pageY); if (movedDistance > LONG_PRESS_ALLOWED_MOVEMENT) { this._cancelLongPressDelayTimeout(); } } var isTouchWithinActive = pageX > positionOnActivate.left - pressExpandLeft && pageY > positionOnActivate.top - pressExpandTop && pageX < positionOnActivate.left + dimensionsOnActivate.width + pressExpandRight && pageY < positionOnActivate.top + dimensionsOnActivate.height + pressExpandBottom; if (isTouchWithinActive) { var prevState = this.state.touchable.touchState; this._receiveSignal(Signals.ENTER_PRESS_RECT, e); var curState = this.state.touchable.touchState; if (curState === States.RESPONDER_INACTIVE_PRESS_IN && prevState !== States.RESPONDER_INACTIVE_PRESS_IN) { // fix for t7967420 this._cancelLongPressDelayTimeout(); } } else { this._cancelLongPressDelayTimeout(); this._receiveSignal(Signals.LEAVE_PRESS_RECT, e); } }, /** * Invoked when the item receives focus. Mixers might override this to * visually distinguish the `VisualRect` so that the user knows that it * currently has the focus. Most platforms only support a single element being * focused at a time, in which case there may have been a previously focused * element that was blurred just prior to this. This can be overridden when * using `Touchable.Mixin.withoutDefaultFocusAndBlur`. */ touchableHandleFocus: function touchableHandleFocus(e) { this.props.onFocus && this.props.onFocus(e); }, /** * Invoked when the item loses focus. Mixers might override this to * visually distinguish the `VisualRect` so that the user knows that it * no longer has focus. Most platforms only support a single element being * focused at a time, in which case the focus may have moved to another. * This can be overridden when using * `Touchable.Mixin.withoutDefaultFocusAndBlur`. */ touchableHandleBlur: function touchableHandleBlur(e) { this.props.onBlur && this.props.onBlur(e); }, // ==== Abstract Application Callbacks ==== /** * Invoked when the item should be highlighted. Mixers should implement this * to visually distinguish the `VisualRect` so that the user knows that * releasing a touch will result in a "selection" (analog to click). * * @abstract * touchableHandleActivePressIn: function, */ /** * Invoked when the item is "active" (in that it is still eligible to become * a "select") but the touch has left the `PressRect`. Usually the mixer will * want to unhighlight the `VisualRect`. If the user (while pressing) moves * back into the `PressRect` `touchableHandleActivePressIn` will be invoked * again and the mixer should probably highlight the `VisualRect` again. This * event will not fire on an `touchEnd/mouseUp` event, only move events while * the user is depressing the mouse/touch. * * @abstract * touchableHandleActivePressOut: function */ /** * Invoked when the item is "selected" - meaning the interaction ended by * letting up while the item was either in the state * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`. * * @abstract * touchableHandlePress: function */ /** * Invoked when the item is long pressed - meaning the interaction ended by * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will * be called as it normally is. If `touchableHandleLongPress` is provided, by * default any `touchableHandlePress` callback will not be invoked. To * override this default behavior, override `touchableLongPressCancelsPress` * to return false. As a result, `touchableHandlePress` will be called when * lifting up, even if `touchableHandleLongPress` has also been called. * * @abstract * touchableHandleLongPress: function */ /** * Returns the number of millis to wait before triggering a highlight. * * @abstract * touchableGetHighlightDelayMS: function */ /** * Returns the amount to extend the `HitRect` into the `PressRect`. Positive * numbers mean the size expands outwards. * * @abstract * touchableGetPressRectOffset: function */ // ==== Internal Logic ==== /** * Measures the `HitRect` node on activation. The Bounding rectangle is with * respect to viewport - not page, so adding the `pageXOffset/pageYOffset` * should result in points that are in the same coordinate system as an * event's `globalX/globalY` data values. * * - Consider caching this for the lifetime of the component, or possibly * being able to share this cache between any `ScrollMap` view. * * @sideeffects * @private */ _remeasureMetricsOnActivation: function _remeasureMetricsOnActivation() { var tag = this.state.touchable.responderID; if (tag == null) { return; } UIManager.measure(tag, this._handleQueryLayout); }, _handleQueryLayout: function _handleQueryLayout(l, t, w, h, globalX, globalY) { //don't do anything UIManager failed to measure node if (!l && !t && !w && !h && !globalX && !globalY) { return; } this.state.touchable.positionOnActivate && Position.release(this.state.touchable.positionOnActivate); this.state.touchable.dimensionsOnActivate && // $FlowFixMe BoundingDimensions.release(this.state.touchable.dimensionsOnActivate); this.state.touchable.positionOnActivate = Position.getPooled(globalX, globalY); // $FlowFixMe this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(w, h); }, _handleDelay: function _handleDelay(e) { this.touchableDelayTimeout = null; this._receiveSignal(Signals.DELAY, e); }, _handleLongDelay: function _handleLongDelay(e) { this.longPressDelayTimeout = null; var curState = this.state.touchable.touchState; if (curState !== States.RESPONDER_ACTIVE_PRESS_IN && curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN) { console.error('Attempted to transition from state `' + curState + '` to `' + States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. This is ' + 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.'); } else { this._receiveSignal(Signals.LONG_PRESS_DETECTED, e); } }, /** * Receives a state machine signal, performs side effects of the transition * and stores the new state. Validates the transition as well. * * @param {Signals} signal State machine signal. * @throws Error if invalid state transition or unrecognized signal. * @sideeffects */ _receiveSignal: function _receiveSignal(signal, e) { var responderID = this.state.touchable.responderID; var curState = this.state.touchable.touchState; var nextState = Transitions[curState] && Transitions[curState][signal]; if (!responderID && signal === Signals.RESPONDER_RELEASE) { return; } if (!nextState) { throw new Error('Unrecognized signal `' + signal + '` or state `' + curState + '` for Touchable responder `' + responderID + '`'); } if (nextState === States.ERROR) { throw new Error('Touchable cannot transition from `' + curState + '` to `' + signal + '` for responder `' + responderID + '`'); } if (curState !== nextState) { this._performSideEffectsForTransition(curState, nextState, signal, e); this.state.touchable.touchState = nextState; } }, _cancelLongPressDelayTimeout: function _cancelLongPressDelayTimeout() { this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout); this.longPressDelayTimeout = null; }, _isHighlight: function _isHighlight(state) { return state === States.RESPONDER_ACTIVE_PRESS_IN || state === States.RESPONDER_ACTIVE_LONG_PRESS_IN; }, _savePressInLocation: function _savePressInLocation(e) { var touch = extractSingleTouch(e.nativeEvent); var pageX = touch && touch.pageX; var pageY = touch && touch.pageY; var locationX = touch && touch.locationX; var locationY = touch && touch.locationY; this.pressInLocation = { pageX: pageX, pageY: pageY, locationX: locationX, locationY: locationY }; }, _getDistanceBetweenPoints: function _getDistanceBetweenPoints(aX, aY, bX, bY) { var deltaX = aX - bX; var deltaY = aY - bY; return Math.sqrt(deltaX * deltaX + deltaY * deltaY); }, /** * Will perform a transition between touchable states, and identify any * highlighting or unhighlighting that must be performed for this particular * transition. * * @param {States} curState Current Touchable state. * @param {States} nextState Next Touchable state. * @param {Signal} signal Signal that triggered the transition. * @param {Event} e Native event. * @sideeffects */ _performSideEffectsForTransition: function _performSideEffectsForTransition(curState, nextState, signal, e) { var curIsHighlight = this._isHighlight(curState); var newIsHighlight = this._isHighlight(nextState); var isFinalSignal = signal === Signals.RESPONDER_TERMINATED || signal === Signals.RESPONDER_RELEASE; if (isFinalSignal) { this._cancelLongPressDelayTimeout(); } var isInitialTransition = curState === States.NOT_RESPONDER && nextState === States.RESPONDER_INACTIVE_PRESS_IN; var isActiveTransition = !IsActive[curState] && IsActive[nextState]; if (isInitialTransition || isActiveTransition) { this._remeasureMetricsOnActivation(); } if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) { this.touchableHandleLongPress && this.touchableHandleLongPress(e); } if (newIsHighlight && !curIsHighlight) { this._startHighlight(e); } else if (!newIsHighlight && curIsHighlight) { this._endHighlight(e); } if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) { var hasLongPressHandler = !!this.props.onLongPress; var pressIsLongButStillCallOnPress = IsLongPressingIn[curState] && ( // We *are* long pressing.. // But either has no long handler !hasLongPressHandler || !this.touchableLongPressCancelsPress()); // or we're told to ignore it. var shouldInvokePress = !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress; if (shouldInvokePress && this.touchableHandlePress) { if (!newIsHighlight && !curIsHighlight) { // we never highlighted because of delay, but we should highlight now this._startHighlight(e); this._endHighlight(e); } this.touchableHandlePress(e); } } this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout); this.touchableDelayTimeout = null; }, _playTouchSound: function _playTouchSound() { UIManager.playTouchSound(); }, _startHighlight: function _startHighlight(e) { this._savePressInLocation(e); this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e); }, _endHighlight: function _endHighlight(e) { var _this2 = this; if (this.touchableHandleActivePressOut) { if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) { this.pressOutDelayTimeout = setTimeout(function () { _this2.touchableHandleActivePressOut(e); }, this.touchableGetPressOutDelayMS()); } else { this.touchableHandleActivePressOut(e); } } }, // HACK (part 2): basic support for touchable interactions using a keyboard (including // delays and longPress) touchableHandleKeyEvent: function touchableHandleKeyEvent(e) { var type = e.type, key = e.key; if (key === 'Enter' || key === ' ') { if (type === 'keydown') { if (!this._isTouchableKeyboardActive) { if (!this.state.touchable.touchState || this.state.touchable.touchState === States.NOT_RESPONDER) { this.touchableHandleResponderGrant(e); this._isTouchableKeyboardActive = true; } } } else if (type === 'keyup') { if (this._isTouchableKeyboardActive) { if (this.state.touchable.touchState && this.state.touchable.touchState !== States.NOT_RESPONDER) { this.touchableHandleResponderRelease(e); this._isTouchableKeyboardActive = false; } } } e.stopPropagation(); // prevent the default behaviour unless the Touchable functions as a link // and Enter is pressed if (!(key === 'Enter' && AccessibilityUtil.propsToAriaRole(this.props) === 'link')) { e.preventDefault(); } } }, withoutDefaultFocusAndBlur: {} }; /** * Provide an optional version of the mixin where `touchableHandleFocus` and * `touchableHandleBlur` can be overridden. This allows appropriate defaults to * be set on TV platforms, without breaking existing implementations of * `Touchable`. */ var touchableHandleFocus = TouchableMixin.touchableHandleFocus, touchableHandleBlur = TouchableMixin.touchableHandleBlur, TouchableMixinWithoutDefaultFocusAndBlur = _objectWithoutPropertiesLoose(TouchableMixin, ["touchableHandleFocus", "touchableHandleBlur"]); TouchableMixin.withoutDefaultFocusAndBlur = TouchableMixinWithoutDefaultFocusAndBlur; var Touchable = { Mixin: TouchableMixin, TOUCH_TARGET_DEBUG: false, // Highlights all touchable targets. Toggle with Inspector. /** * Renders a debugging overlay to visualize touch target with hitSlop (might not work on Android). */ renderDebugView: function renderDebugView(_ref) { var color = _ref.color, hitSlop = _ref.hitSlop; if (!Touchable.TOUCH_TARGET_DEBUG) { return null; } if (process.env.NODE_ENV !== 'production') { throw Error('Touchable.TOUCH_TARGET_DEBUG should not be enabled in prod!'); } var debugHitSlopStyle = {}; hitSlop = hitSlop || { top: 0, bottom: 0, left: 0, right: 0 }; for (var key in hitSlop) { debugHitSlopStyle[key] = -hitSlop[key]; } var normalizedColor = normalizeColor(color); if (typeof normalizedColor !== 'number') { return null; } var hexColor = '#' + ('00000000' + normalizedColor.toString(16)).substr(-8); return React.createElement(View, { pointerEvents: "none", style: _objectSpread({ position: 'absolute', borderColor: hexColor.slice(0, -2) + '55', // More opaque borderWidth: 1, borderStyle: 'dashed', backgroundColor: hexColor.slice(0, -2) + '0F' }, debugHitSlopStyle) }); } }; export default Touchable;
ajax/libs/primereact/6.5.1/confirmdialog/confirmdialog.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { DomHandler, classNames, ObjectUtils, Portal } from 'primereact/core'; import { Dialog } from 'primereact/dialog'; import { Button } from 'primereact/button'; import { localeOption } from 'primereact/api'; function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function confirmDialog(props) { var appendTo = props.appendTo || document.body; var confirmDialogWrapper = document.createDocumentFragment(); DomHandler.appendChild(confirmDialogWrapper, appendTo); props = _objectSpread(_objectSpread({}, props), { visible: props.visible === undefined ? true : props.visible }); var confirmDialogEl = /*#__PURE__*/React.createElement(ConfirmDialog, props); ReactDOM.render(confirmDialogEl, confirmDialogWrapper); var updateConfirmDialog = function updateConfirmDialog(newProps) { props = _objectSpread(_objectSpread({}, props), newProps); ReactDOM.render( /*#__PURE__*/React.cloneElement(confirmDialogEl, props), confirmDialogWrapper); }; return { _destroy: function _destroy() { ReactDOM.unmountComponentAtNode(confirmDialogWrapper); }, show: function show() { updateConfirmDialog({ visible: true, onHide: function onHide() { updateConfirmDialog({ visible: false }); // reset } }); }, hide: function hide() { updateConfirmDialog({ visible: false }); }, update: function update(newProps) { updateConfirmDialog(newProps); } }; } var ConfirmDialog = /*#__PURE__*/function (_Component) { _inherits(ConfirmDialog, _Component); var _super = _createSuper(ConfirmDialog); function ConfirmDialog(props) { var _this; _classCallCheck(this, ConfirmDialog); _this = _super.call(this, props); _this.state = { visible: props.visible }; _this.reject = _this.reject.bind(_assertThisInitialized(_this)); _this.accept = _this.accept.bind(_assertThisInitialized(_this)); _this.hide = _this.hide.bind(_assertThisInitialized(_this)); return _this; } _createClass(ConfirmDialog, [{ key: "acceptLabel", value: function acceptLabel() { return this.props.acceptLabel || localeOption('accept'); } }, { key: "rejectLabel", value: function rejectLabel() { return this.props.rejectLabel || localeOption('reject'); } }, { key: "accept", value: function accept() { if (this.props.accept) { this.props.accept(); } this.hide('accept'); } }, { key: "reject", value: function reject() { if (this.props.reject) { this.props.reject(); } this.hide('reject'); } }, { key: "show", value: function show() { this.setState({ visible: true }); } }, { key: "hide", value: function hide(result) { var _this2 = this; this.setState({ visible: false }, function () { if (_this2.props.onHide) { _this2.props.onHide(result); } }); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.visible !== this.props.visible) { this.setState({ visible: this.props.visible }); } } }, { key: "renderFooter", value: function renderFooter() { var acceptClassName = classNames('p-confirm-dialog-accept', this.props.acceptClassName); var rejectClassName = classNames('p-confirm-dialog-reject', { 'p-button-text': !this.props.rejectClassName }, this.props.rejectClassName); var content = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, { label: this.rejectLabel(), icon: this.props.rejectIcon, className: rejectClassName, onClick: this.reject }), /*#__PURE__*/React.createElement(Button, { label: this.acceptLabel(), icon: this.props.acceptIcon, className: acceptClassName, onClick: this.accept, autoFocus: true })); if (this.props.footer) { var defaultContentOptions = { accept: this.accept, reject: this.reject, acceptClassName: acceptClassName, rejectClassName: rejectClassName, acceptLabel: this.acceptLabel(), rejectLabel: this.rejectLabel(), element: content, props: this.props }; return ObjectUtils.getJSXElement(this.props.footer, defaultContentOptions); } return content; } }, { key: "renderElement", value: function renderElement() { var className = classNames('p-confirm-dialog', this.props.className); var iconClassName = classNames('p-confirm-dialog-icon', this.props.icon); var dialogProps = ObjectUtils.findDiffKeys(this.props, ConfirmDialog.defaultProps); var message = ObjectUtils.getJSXElement(this.props.message, this.props); var footer = this.renderFooter(); return /*#__PURE__*/React.createElement(Dialog, _extends({ visible: this.state.visible }, dialogProps, { className: className, footer: footer, onHide: this.hide, breakpoints: this.props.breakpoints }), /*#__PURE__*/React.createElement("i", { className: iconClassName }), /*#__PURE__*/React.createElement("span", { className: "p-confirm-dialog-message" }, message)); } }, { key: "render", value: function render() { var element = this.renderElement(); return /*#__PURE__*/React.createElement(Portal, { element: element, appendTo: this.props.appendTo }); } }]); return ConfirmDialog; }(Component); _defineProperty(ConfirmDialog, "defaultProps", { visible: false, message: null, rejectLabel: null, acceptLabel: null, icon: null, rejectIcon: null, acceptIcon: null, rejectClassName: null, acceptClassName: null, className: null, appendTo: null, footer: null, breakpoints: null, onHide: null, accept: null, reject: null }); export { ConfirmDialog, confirmDialog };
ajax/libs/primereact/6.6.0-rc.1/accordion/accordion.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { UniqueComponentId, classNames, ObjectUtils, CSSTransition } from 'primereact/core'; function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var AccordionTab = /*#__PURE__*/function (_Component) { _inherits(AccordionTab, _Component); var _super = _createSuper(AccordionTab); function AccordionTab() { _classCallCheck(this, AccordionTab); return _super.apply(this, arguments); } return AccordionTab; }(Component); _defineProperty(AccordionTab, "defaultProps", { header: null, disabled: false, headerStyle: null, headerClassName: null, headerTemplate: null, contentStyle: null, contentClassName: null }); var Accordion = /*#__PURE__*/function (_Component2) { _inherits(Accordion, _Component2); var _super2 = _createSuper(Accordion); function Accordion(props) { var _this; _classCallCheck(this, Accordion); _this = _super2.call(this, props); var state = { id: _this.props.id }; if (!_this.props.onTabChange) { state = _objectSpread(_objectSpread({}, state), {}, { activeIndex: props.activeIndex }); } _this.state = state; _this.contentWrappers = []; return _this; } _createClass(Accordion, [{ key: "onTabHeaderClick", value: function onTabHeaderClick(event, tab, index) { if (!tab.props.disabled) { var selected = this.isSelected(index); var newActiveIndex = null; if (this.props.multiple) { var indexes = (this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex) || []; if (selected) indexes = indexes.filter(function (i) { return i !== index; });else indexes = [].concat(_toConsumableArray(indexes), [index]); newActiveIndex = indexes; } else { newActiveIndex = selected ? null : index; } var callback = selected ? this.props.onTabClose : this.props.onTabOpen; if (callback) { callback({ originalEvent: event, index: index }); } if (this.props.onTabChange) { this.props.onTabChange({ originalEvent: event, index: newActiveIndex }); } else { this.setState({ activeIndex: newActiveIndex }); } } event.preventDefault(); } }, { key: "isSelected", value: function isSelected(index) { var activeIndex = this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex; return this.props.multiple ? activeIndex && activeIndex.indexOf(index) >= 0 : activeIndex === index; } }, { key: "componentDidMount", value: function componentDidMount() { if (!this.state.id) { this.setState({ id: UniqueComponentId() }); } } }, { key: "renderTabHeader", value: function renderTabHeader(tab, selected, index) { var _classNames, _this2 = this; var tabHeaderClass = classNames('p-accordion-header', { 'p-highlight': selected, 'p-disabled': tab.props.disabled }, tab.props.headerClassName); var iconClassName = classNames('p-accordion-toggle-icon', (_classNames = {}, _defineProperty(_classNames, "".concat(this.props.expandIcon), !selected), _defineProperty(_classNames, "".concat(this.props.collapseIcon), selected), _classNames)); var id = this.state.id + '_header_' + index; var ariaControls = this.state.id + '_content_' + index; var tabIndex = tab.props.disabled ? -1 : null; var header = tab.props.headerTemplate ? ObjectUtils.getJSXElement(tab.props.headerTemplate, tab.props) : /*#__PURE__*/React.createElement("span", { className: "p-accordion-header-text" }, tab.props.header); return /*#__PURE__*/React.createElement("div", { className: tabHeaderClass, style: tab.props.headerStyle }, /*#__PURE__*/React.createElement("a", { href: '#' + ariaControls, id: id, className: "p-accordion-header-link", "aria-controls": ariaControls, role: "tab", "aria-expanded": selected, onClick: function onClick(event) { return _this2.onTabHeaderClick(event, tab, index); }, tabIndex: tabIndex }, /*#__PURE__*/React.createElement("span", { className: iconClassName }), header)); } }, { key: "renderTabContent", value: function renderTabContent(tab, selected, index) { var className = classNames('p-toggleable-content', tab.props.contentClassName); var id = this.state.id + '_content_' + index; var toggleableContentRef = /*#__PURE__*/React.createRef(); return /*#__PURE__*/React.createElement(CSSTransition, { nodeRef: toggleableContentRef, classNames: "p-toggleable-content", timeout: { enter: 1000, exit: 450 }, in: selected, unmountOnExit: true, options: this.props.transitionOptions }, /*#__PURE__*/React.createElement("div", { ref: toggleableContentRef, id: id, className: className, style: tab.props.contentStyle, role: "region", "aria-labelledby": this.state.id + '_header_' + index }, /*#__PURE__*/React.createElement("div", { className: "p-accordion-content" }, tab.props.children))); } }, { key: "renderTab", value: function renderTab(tab, index) { var selected = this.isSelected(index); var tabHeader = this.renderTabHeader(tab, selected, index); var tabContent = this.renderTabContent(tab, selected, index); var tabClassName = classNames('p-accordion-tab', { 'p-accordion-tab-active': selected }); return /*#__PURE__*/React.createElement("div", { key: tab.props.header, className: tabClassName }, tabHeader, tabContent); } }, { key: "renderTabs", value: function renderTabs() { var _this3 = this; return React.Children.map(this.props.children, function (tab, index) { if (tab && tab.type === AccordionTab) { return _this3.renderTab(tab, index); } }); } }, { key: "render", value: function render() { var _this4 = this; var className = classNames('p-accordion p-component', this.props.className); var tabs = this.renderTabs(); return /*#__PURE__*/React.createElement("div", { ref: function ref(el) { return _this4.container = el; }, id: this.state.id, className: className, style: this.props.style }, tabs); } }]); return Accordion; }(Component); _defineProperty(Accordion, "defaultProps", { id: null, activeIndex: null, className: null, style: null, multiple: false, expandIcon: 'pi pi-chevron-right', collapseIcon: 'pi pi-chevron-down', transitionOptions: null, onTabOpen: null, onTabClose: null, onTabChange: null }); export { Accordion, AccordionTab };
ajax/libs/primereact/6.6.0-rc.1/fieldset/fieldset.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { UniqueComponentId, CSSTransition, classNames, Ripple } from 'primereact/core'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Fieldset = /*#__PURE__*/function (_Component) { _inherits(Fieldset, _Component); var _super = _createSuper(Fieldset); function Fieldset(props) { var _this; _classCallCheck(this, Fieldset); _this = _super.call(this, props); var state = { id: props.id }; if (!_this.props.onToggle) { state = _objectSpread(_objectSpread({}, state), {}, { collapsed: props.collapsed }); } _this.state = state; _this.toggle = _this.toggle.bind(_assertThisInitialized(_this)); _this.contentRef = /*#__PURE__*/React.createRef(); return _this; } _createClass(Fieldset, [{ key: "toggle", value: function toggle(event) { if (this.props.toggleable) { var collapsed = this.props.onToggle ? this.props.collapsed : this.state.collapsed; if (collapsed) this.expand(event);else this.collapse(event); if (this.props.onToggle) { this.props.onToggle({ originalEvent: event, value: !collapsed }); } } event.preventDefault(); } }, { key: "expand", value: function expand(event) { if (!this.props.onToggle) { this.setState({ collapsed: false }); } if (this.props.onExpand) { this.props.onExpand(event); } } }, { key: "collapse", value: function collapse(event) { if (!this.props.onToggle) { this.setState({ collapsed: true }); } if (this.props.onCollapse) { this.props.onCollapse(event); } } }, { key: "isCollapsed", value: function isCollapsed() { return this.props.toggleable ? this.props.onToggle ? this.props.collapsed : this.state.collapsed : false; } }, { key: "componentDidMount", value: function componentDidMount() { if (!this.state.id) { this.setState({ id: UniqueComponentId() }); } } }, { key: "renderContent", value: function renderContent(collapsed) { var id = this.state.id + '_content'; return /*#__PURE__*/React.createElement(CSSTransition, { nodeRef: this.contentRef, classNames: "p-toggleable-content", timeout: { enter: 1000, exit: 450 }, in: !collapsed, unmountOnExit: true, options: this.props.transitionOptions }, /*#__PURE__*/React.createElement("div", { ref: this.contentRef, id: id, className: "p-toggleable-content", "aria-hidden": collapsed, role: "region", "aria-labelledby": this.state.id + '_header' }, /*#__PURE__*/React.createElement("div", { className: "p-fieldset-content" }, this.props.children))); } }, { key: "renderToggleIcon", value: function renderToggleIcon(collapsed) { if (this.props.toggleable) { var className = classNames('p-fieldset-toggler pi', { 'pi-plus': collapsed, 'pi-minus': !collapsed }); return /*#__PURE__*/React.createElement("span", { className: className }); } return null; } }, { key: "renderLegendContent", value: function renderLegendContent(collapsed) { if (this.props.toggleable) { var toggleIcon = this.renderToggleIcon(collapsed); var ariaControls = this.state.id + '_content'; return /*#__PURE__*/React.createElement("a", { href: '#' + ariaControls, "aria-controls": ariaControls, id: this.state.id + '_header', "aria-expanded": !collapsed, tabIndex: this.props.toggleable ? null : -1 }, toggleIcon, /*#__PURE__*/React.createElement("span", { className: "p-fieldset-legend-text" }, this.props.legend), /*#__PURE__*/React.createElement(Ripple, null)); } return /*#__PURE__*/React.createElement("span", { className: "p-fieldset-legend-text", id: this.state.id + '_header' }, this.props.legend); } }, { key: "renderLegend", value: function renderLegend(collapsed) { var legendContent = this.renderLegendContent(collapsed); if (this.props.legend != null || this.props.toggleable) { return /*#__PURE__*/React.createElement("legend", { className: "p-fieldset-legend p-unselectable-text", onClick: this.toggle }, legendContent); } } }, { key: "render", value: function render() { var className = classNames('p-fieldset p-component', this.props.className, { 'p-fieldset-toggleable': this.props.toggleable }); var collapsed = this.isCollapsed(); var legend = this.renderLegend(collapsed); var content = this.renderContent(collapsed); return /*#__PURE__*/React.createElement("fieldset", { id: this.props.id, className: className, style: this.props.style, onClick: this.props.onClick }, legend, content); } }]); return Fieldset; }(Component); _defineProperty(Fieldset, "defaultProps", { id: null, legend: null, className: null, style: null, toggleable: null, collapsed: null, transitionOptions: null, onExpand: null, onCollapse: null, onToggle: null, onClick: null }); export { Fieldset };
ajax/libs/material-ui/5.0.0-alpha.15/legacy/styles/useTheme.js
cdnjs/cdnjs
import { useTheme as useThemeWithoutDefault } from '@material-ui/styles'; import React from 'react'; import defaultTheme from './defaultTheme'; export default function useTheme() { var theme = useThemeWithoutDefault() || defaultTheme; if (process.env.NODE_ENV !== 'production') { // eslint-disable-next-line react-hooks/rules-of-hooks React.useDebugValue(theme); } return theme; }
ajax/libs/primereact/7.0.1/knob/knob.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { classNames } from 'primereact/utils'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Knob = /*#__PURE__*/function (_Component) { _inherits(Knob, _Component); var _super = _createSuper(Knob); function Knob(props) { var _this; _classCallCheck(this, Knob); _this = _super.call(this, props); _this.state = {}; _this.radius = 40; _this.midX = 50; _this.midY = 50; _this.minRadians = 4 * Math.PI / 3; _this.maxRadians = -Math.PI / 3; _this.onClick = _this.onClick.bind(_assertThisInitialized(_this)); _this.onMouseDown = _this.onMouseDown.bind(_assertThisInitialized(_this)); _this.onMouseUp = _this.onMouseUp.bind(_assertThisInitialized(_this)); _this.onTouchStart = _this.onTouchStart.bind(_assertThisInitialized(_this)); _this.onTouchEnd = _this.onTouchEnd.bind(_assertThisInitialized(_this)); _this.onMouseMove = _this.onMouseMove.bind(_assertThisInitialized(_this)); _this.onTouchMove = _this.onTouchMove.bind(_assertThisInitialized(_this)); return _this; } _createClass(Knob, [{ key: "updateValue", value: function updateValue(offsetX, offsetY) { var dx = offsetX - this.props.size / 2; var dy = this.props.size / 2 - offsetY; var angle = Math.atan2(dy, dx); var start = -Math.PI / 2 - Math.PI / 6; this.updateModel(angle, start); } }, { key: "updateModel", value: function updateModel(angle, start) { var mappedValue; if (angle > this.maxRadians) mappedValue = this.mapRange(angle, this.minRadians, this.maxRadians, this.props.min, this.props.max);else if (angle < start) mappedValue = this.mapRange(angle + 2 * Math.PI, this.minRadians, this.maxRadians, this.props.min, this.props.max);else return; if (this.props.onChange) { var newValue = Math.round((mappedValue - this.props.min) / this.props.step) * this.props.step + this.props.min; this.props.onChange({ value: newValue }); } } }, { key: "mapRange", value: function mapRange(x, inMin, inMax, outMin, outMax) { return (x - inMin) * (outMax - outMin) / (inMax - inMin) + outMin; } }, { key: "onClick", value: function onClick(event) { if (!this.props.disabled && !this.props.readOnly) { this.updateValue(event.nativeEvent.offsetX, event.nativeEvent.offsetY); } } }, { key: "onMouseDown", value: function onMouseDown(event) { if (!this.props.disabled && !this.props.readOnly) { this.windowMouseMoveListener = this.onMouseMove; this.windowMouseUpListener = this.onMouseUp; window.addEventListener('mousemove', this.windowMouseMoveListener); window.addEventListener('mouseup', this.windowMouseUpListener); event.preventDefault(); } } }, { key: "onMouseUp", value: function onMouseUp(event) { if (!this.props.disabled && !this.props.readOnly) { window.removeEventListener('mousemove', this.windowMouseMoveListener); window.removeEventListener('mouseup', this.windowMouseUpListener); this.windowMouseMoveListener = null; this.windowMouseUpListener = null; event.preventDefault(); } } }, { key: "onTouchStart", value: function onTouchStart(event) { if (!this.props.disabled && !this.props.readOnly) { this.windowTouchMoveListener = this.onTouchMove; this.windowTouchEndListener = this.onTouchEnd; window.addEventListener('touchmove', this.windowTouchMoveListener, { passive: false, cancelable: false }); window.addEventListener('touchend', this.windowTouchEndListener); } } }, { key: "onTouchEnd", value: function onTouchEnd(event) { if (!this.props.disabled && !this.props.readOnly) { window.removeEventListener('touchmove', this.windowTouchMoveListener); window.removeEventListener('touchend', this.windowTouchEndListener); this.windowTouchMoveListener = null; this.windowTouchEndListener = null; } } }, { key: "onMouseMove", value: function onMouseMove(event) { if (!this.props.disabled && !this.props.readOnly) { this.updateValue(event.offsetX, event.offsetY); event.preventDefault(); } } }, { key: "onTouchMove", value: function onTouchMove(event) { if (!this.props.disabled && !this.props.readOnly && event.touches.length === 1) { var rect = this.element.getBoundingClientRect(); var touch = event.targetTouches.item(0); var offsetX = touch.clientX - rect.left; var offsetY = touch.clientY - rect.top; this.updateValue(offsetX, offsetY); event.preventDefault(); } } }, { key: "rangePath", value: function rangePath() { return "M ".concat(this.minX(), " ").concat(this.minY(), " A ").concat(this.radius, " ").concat(this.radius, " 0 1 1 ").concat(this.maxX(), " ").concat(this.maxY()); } }, { key: "valuePath", value: function valuePath() { return "M ".concat(this.zeroX(), " ").concat(this.zeroY(), " A ").concat(this.radius, " ").concat(this.radius, " 0 ").concat(this.largeArc(), " ").concat(this.sweep(), " ").concat(this.valueX(), " ").concat(this.valueY()); } }, { key: "zeroRadians", value: function zeroRadians() { if (this.props.min > 0 && this.props.max > 0) return this.mapRange(this.props.min, this.props.min, this.props.max, this.minRadians, this.maxRadians);else return this.mapRange(0, this.props.min, this.props.max, this.minRadians, this.maxRadians); } }, { key: "valueRadians", value: function valueRadians() { return this.mapRange(this.props.value, this.props.min, this.props.max, this.minRadians, this.maxRadians); } }, { key: "minX", value: function minX() { return this.midX + Math.cos(this.minRadians) * this.radius; } }, { key: "minY", value: function minY() { return this.midY - Math.sin(this.minRadians) * this.radius; } }, { key: "maxX", value: function maxX() { return this.midX + Math.cos(this.maxRadians) * this.radius; } }, { key: "maxY", value: function maxY() { return this.midY - Math.sin(this.maxRadians) * this.radius; } }, { key: "zeroX", value: function zeroX() { return this.midX + Math.cos(this.zeroRadians()) * this.radius; } }, { key: "zeroY", value: function zeroY() { return this.midY - Math.sin(this.zeroRadians()) * this.radius; } }, { key: "valueX", value: function valueX() { return this.midX + Math.cos(this.valueRadians()) * this.radius; } }, { key: "valueY", value: function valueY() { return this.midY - Math.sin(this.valueRadians()) * this.radius; } }, { key: "largeArc", value: function largeArc() { return Math.abs(this.zeroRadians() - this.valueRadians()) < Math.PI ? 0 : 1; } }, { key: "sweep", value: function sweep() { return this.valueRadians() > this.zeroRadians() ? 0 : 1; } }, { key: "valueToDisplay", value: function valueToDisplay() { return this.props.valueTemplate.replace("{value}", this.props.value.toString()); } }, { key: "render", value: function render() { var _this2 = this; var containerClassName = classNames('p-knob p-component', { 'p-disabled': this.props.disabled }, this.props.className); var text = this.props.showValue && /*#__PURE__*/React.createElement("text", { x: 50, y: 57, textAnchor: 'middle', fill: this.props.textColor, className: 'p-knob-text', name: this.props.name }, this.valueToDisplay()); return /*#__PURE__*/React.createElement("div", { id: this.props.id, className: containerClassName, style: this.props.style, ref: function ref(el) { return _this2.element = el; } }, /*#__PURE__*/React.createElement("svg", { viewBox: "0 0 100 100", width: this.props.size, height: this.props.size, onClick: this.onClick, onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp, onTouchStart: this.onTouchStart, onTouchEnd: this.onTouchEnd }, /*#__PURE__*/React.createElement("path", { d: this.rangePath(), strokeWidth: this.props.strokeWidth, stroke: this.props.rangeColor, className: 'p-knob-range' }), /*#__PURE__*/React.createElement("path", { d: this.valuePath(), strokeWidth: this.props.strokeWidth, stroke: this.props.valueColor, className: 'p-knob-value' }), text)); } }]); return Knob; }(Component); _defineProperty(Knob, "defaultProps", { id: null, style: null, className: null, value: null, size: 100, disabled: false, readOnly: false, showValue: true, step: 1, min: 0, max: 100, strokeWidth: 14, name: null, valueColor: 'var(--primary-color, Black)', rangeColor: 'var(--surface-d, LightGray)', textColor: 'var(--text-color-secondary, Black)', valueTemplate: '{value}', onChange: null }); export { Knob };
ajax/libs/primereact/7.0.0-rc.2/card/card.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { ObjectUtils, classNames } from 'primereact/core'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Card = /*#__PURE__*/function (_Component) { _inherits(Card, _Component); var _super = _createSuper(Card); function Card() { _classCallCheck(this, Card); return _super.apply(this, arguments); } _createClass(Card, [{ key: "renderHeader", value: function renderHeader() { if (this.props.header) { return /*#__PURE__*/React.createElement("div", { className: "p-card-header" }, ObjectUtils.getJSXElement(this.props.header, this.props)); } return null; } }, { key: "renderBody", value: function renderBody() { var title = this.props.title && /*#__PURE__*/React.createElement("div", { className: "p-card-title" }, ObjectUtils.getJSXElement(this.props.title, this.props)); var subTitle = this.props.subTitle && /*#__PURE__*/React.createElement("div", { className: "p-card-subtitle" }, ObjectUtils.getJSXElement(this.props.subTitle, this.props)); var children = this.props.children && /*#__PURE__*/React.createElement("div", { className: "p-card-content" }, this.props.children); var footer = this.props.footer && /*#__PURE__*/React.createElement("div", { className: "p-card-footer" }, ObjectUtils.getJSXElement(this.props.footer, this.props)); return /*#__PURE__*/React.createElement("div", { className: "p-card-body" }, title, subTitle, children, footer); } }, { key: "render", value: function render() { var header = this.renderHeader(); var body = this.renderBody(); var className = classNames('p-card p-component', this.props.className); return /*#__PURE__*/React.createElement("div", { className: className, style: this.props.style, id: this.props.id }, header, body); } }]); return Card; }(Component); _defineProperty(Card, "defaultProps", { id: null, header: null, footer: null, title: null, subTitle: null, style: null, className: null }); export { Card };
ajax/libs/material-ui/4.9.4/esm/LinearProgress/LinearProgress.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import capitalize from '../utils/capitalize'; import withStyles from '../styles/withStyles'; import { darken, lighten } from '../styles/colorManipulator'; import useTheme from '../styles/useTheme'; var TRANSITION_DURATION = 4; // seconds export var styles = function styles(theme) { var getColor = function getColor(color) { return theme.palette.type === 'light' ? lighten(color, 0.62) : darken(color, 0.5); }; var backgroundPrimary = getColor(theme.palette.primary.main); var backgroundSecondary = getColor(theme.palette.secondary.main); return { /* Styles applied to the root element. */ root: { position: 'relative', overflow: 'hidden', height: 4 }, /* Styles applied to the root and bar2 element if `color="primary"`; bar2 if `variant="buffer"`. */ colorPrimary: { backgroundColor: backgroundPrimary }, /* Styles applied to the root and bar2 elements if `color="secondary"`; bar2 if `variant="buffer"`. */ colorSecondary: { backgroundColor: backgroundSecondary }, /* Styles applied to the root element if `variant="determinate"`. */ determinate: {}, /* Styles applied to the root element if `variant="indeterminate"`. */ indeterminate: {}, /* Styles applied to the root element if `variant="buffer"`. */ buffer: { backgroundColor: 'transparent' }, /* Styles applied to the root element if `variant="query"`. */ query: { transform: 'rotate(180deg)' }, /* Styles applied to the additional bar element if `variant="buffer"`. */ dashed: { position: 'absolute', marginTop: 0, height: '100%', width: '100%', animation: '$buffer 3s infinite linear' }, /* Styles applied to the additional bar element if `variant="buffer"` and `color="primary"`. */ dashedColorPrimary: { backgroundImage: "radial-gradient(".concat(backgroundPrimary, " 0%, ").concat(backgroundPrimary, " 16%, transparent 42%)"), backgroundSize: '10px 10px', backgroundPosition: '0px -23px' }, /* Styles applied to the additional bar element if `variant="buffer"` and `color="secondary"`. */ dashedColorSecondary: { backgroundImage: "radial-gradient(".concat(backgroundSecondary, " 0%, ").concat(backgroundSecondary, " 16%, transparent 42%)"), backgroundSize: '10px 10px', backgroundPosition: '0px -23px' }, /* Styles applied to the layered bar1 and bar2 elements. */ bar: { width: '100%', position: 'absolute', left: 0, bottom: 0, top: 0, transition: 'transform 0.2s linear', transformOrigin: 'left' }, /* Styles applied to the bar elements if `color="primary"`; bar2 if `variant` not "buffer". */ barColorPrimary: { backgroundColor: theme.palette.primary.main }, /* Styles applied to the bar elements if `color="secondary"`; bar2 if `variant` not "buffer". */ barColorSecondary: { backgroundColor: theme.palette.secondary.main }, /* Styles applied to the bar1 element if `variant="indeterminate or query"`. */ bar1Indeterminate: { width: 'auto', animation: '$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite' }, /* Styles applied to the bar1 element if `variant="determinate"`. */ bar1Determinate: { transition: "transform .".concat(TRANSITION_DURATION, "s linear") }, /* Styles applied to the bar1 element if `variant="buffer"`. */ bar1Buffer: { zIndex: 1, transition: "transform .".concat(TRANSITION_DURATION, "s linear") }, /* Styles applied to the bar2 element if `variant="indeterminate or query"`. */ bar2Indeterminate: { width: 'auto', animation: '$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite' }, /* Styles applied to the bar2 element if `variant="buffer"`. */ bar2Buffer: { transition: "transform .".concat(TRANSITION_DURATION, "s linear") }, // Legends: // || represents the viewport // - represents a light background // x represents a dark background '@keyframes indeterminate1': { // |-----|---x-||-----||-----| '0%': { left: '-35%', right: '100%' }, // |-----|-----||-----||xxxx-| '60%': { left: '100%', right: '-90%' }, '100%': { left: '100%', right: '-90%' } }, '@keyframes indeterminate2': { // |xxxxx|xxxxx||-----||-----| '0%': { left: '-200%', right: '100%' }, // |-----|-----||-----||-x----| '60%': { left: '107%', right: '-8%' }, '100%': { left: '107%', right: '-8%' } }, '@keyframes buffer': { '0%': { opacity: 1, backgroundPosition: '0px -23px' }, '50%': { opacity: 0, backgroundPosition: '0px -23px' }, '100%': { opacity: 1, backgroundPosition: '-200px -23px' } } }; }; /** * ## ARIA * * If the progress bar is describing the loading progress of a particular region of a page, * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy` * attribute to `true` on that region until it has finished loading. */ var LinearProgress = React.forwardRef(function LinearProgress(props, ref) { var classes = props.classes, className = props.className, _props$color = props.color, color = _props$color === void 0 ? 'primary' : _props$color, value = props.value, valueBuffer = props.valueBuffer, _props$variant = props.variant, variant = _props$variant === void 0 ? 'indeterminate' : _props$variant, other = _objectWithoutProperties(props, ["classes", "className", "color", "value", "valueBuffer", "variant"]); var theme = useTheme(); var rootProps = {}; var inlineStyles = { bar1: {}, bar2: {} }; if (variant === 'determinate' || variant === 'buffer') { if (value !== undefined) { rootProps['aria-valuenow'] = Math.round(value); var transform = value - 100; if (theme.direction === 'rtl') { transform = -transform; } inlineStyles.bar1.transform = "translateX(".concat(transform, "%)"); } else if (process.env.NODE_ENV !== 'production') { console.error('Material-UI: you need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress .'); } } if (variant === 'buffer') { if (valueBuffer !== undefined) { var _transform = (valueBuffer || 0) - 100; if (theme.direction === 'rtl') { _transform = -_transform; } inlineStyles.bar2.transform = "translateX(".concat(_transform, "%)"); } else if (process.env.NODE_ENV !== 'production') { console.error('Material-UI: you need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.'); } } return React.createElement("div", _extends({ className: clsx(classes.root, classes["color".concat(capitalize(color))], className, { 'determinate': classes.determinate, 'indeterminate': classes.indeterminate, 'buffer': classes.buffer, 'query': classes.query }[variant]), role: "progressbar" }, rootProps, { ref: ref }, other), variant === 'buffer' ? React.createElement("div", { className: clsx(classes.dashed, classes["dashedColor".concat(capitalize(color))]) }) : null, React.createElement("div", { className: clsx(classes.bar, classes["barColor".concat(capitalize(color))], (variant === 'indeterminate' || variant === 'query') && classes.bar1Indeterminate, { 'determinate': classes.bar1Determinate, 'buffer': classes.bar1Buffer }[variant]), style: inlineStyles.bar1 }), variant === 'determinate' ? null : React.createElement("div", { className: clsx(classes.bar, (variant === 'indeterminate' || variant === 'query') && classes.bar2Indeterminate, variant === 'buffer' ? [classes["color".concat(capitalize(color))], classes.bar2Buffer] : classes["barColor".concat(capitalize(color))]), style: inlineStyles.bar2 })); }); process.env.NODE_ENV !== "production" ? LinearProgress.propTypes = { /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * The color of the component. It supports those theme colors that make sense for this component. */ color: PropTypes.oneOf(['primary', 'secondary']), /** * The value of the progress indicator for the determinate and buffer variants. * Value between 0 and 100. */ value: PropTypes.number, /** * The value for the buffer variant. * Value between 0 and 100. */ valueBuffer: PropTypes.number, /** * The variant to use. * Use indeterminate or query when there is no progress value. */ variant: PropTypes.oneOf(['determinate', 'indeterminate', 'buffer', 'query']) } : void 0; export default withStyles(styles, { name: 'MuiLinearProgress' })(LinearProgress);
ajax/libs/primereact/7.0.0-rc.1/splitbutton/splitbutton.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { Button } from 'primereact/button'; import { classNames, ObjectUtils, CSSTransition, Portal, OverlayService, ZIndexUtils, DomHandler, ConnectedOverlayScrollHandler, UniqueComponentId, tip } from 'primereact/core'; import PrimeReact from 'primereact/api'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var SplitButtonItem = /*#__PURE__*/function (_Component) { _inherits(SplitButtonItem, _Component); var _super = _createSuper$2(SplitButtonItem); function SplitButtonItem(props) { var _this; _classCallCheck(this, SplitButtonItem); _this = _super.call(this, props); _this.onClick = _this.onClick.bind(_assertThisInitialized(_this)); return _this; } _createClass(SplitButtonItem, [{ key: "onClick", value: function onClick(e) { if (this.props.menuitem.command) { this.props.menuitem.command({ originalEvent: e, item: this.props.menuitem }); } if (this.props.onItemClick) { this.props.onItemClick(e); } e.preventDefault(); } }, { key: "renderSeparator", value: function renderSeparator() { return /*#__PURE__*/React.createElement("li", { className: "p-menu-separator", role: "separator" }); } }, { key: "renderMenuitem", value: function renderMenuitem() { var _this2 = this; var _this$props$menuitem = this.props.menuitem, disabled = _this$props$menuitem.disabled, icon = _this$props$menuitem.icon, label = _this$props$menuitem.label, template = _this$props$menuitem.template, url = _this$props$menuitem.url, target = _this$props$menuitem.target; var className = classNames('p-menuitem-link', { 'p-disabled': disabled }); var iconClassName = classNames('p-menuitem-icon', icon); icon = icon && /*#__PURE__*/React.createElement("span", { className: iconClassName }); label = label && /*#__PURE__*/React.createElement("span", { className: "p-menuitem-text" }, label); var content = /*#__PURE__*/React.createElement("a", { href: url || '#', role: "menuitem", className: className, target: target, onClick: this.onClick }, icon, label); if (template) { var defaultContentOptions = { onClick: function onClick(event) { return _this2.onClick(event); }, className: className, labelClassName: 'p-menuitem-text', iconClassName: iconClassName, element: content, props: this.props }; content = ObjectUtils.getJSXElement(template, this.props.menuitem, defaultContentOptions); } return /*#__PURE__*/React.createElement("li", { className: "p-menuitem", role: "none" }, content); } }, { key: "renderItem", value: function renderItem() { if (this.props.menuitem.separator) { return this.renderSeparator(); } return this.renderMenuitem(); } }, { key: "render", value: function render() { var item = this.renderItem(); return item; } }]); return SplitButtonItem; }(Component); _defineProperty(SplitButtonItem, "defaultProps", { menuitem: null, onItemClick: null }); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var SplitButtonPanelComponent = /*#__PURE__*/function (_Component) { _inherits(SplitButtonPanelComponent, _Component); var _super = _createSuper$1(SplitButtonPanelComponent); function SplitButtonPanelComponent() { _classCallCheck(this, SplitButtonPanelComponent); return _super.apply(this, arguments); } _createClass(SplitButtonPanelComponent, [{ key: "renderElement", value: function renderElement() { var className = classNames('p-menu p-menu-overlay p-component', this.props.menuClassName); return /*#__PURE__*/React.createElement(CSSTransition, { nodeRef: this.props.forwardRef, classNames: "p-connected-overlay", in: this.props.in, timeout: { enter: 120, exit: 100 }, options: this.props.transitionOptions, unmountOnExit: true, onEnter: this.props.onEnter, onEntered: this.props.onEntered, onExit: this.props.onExit, onExited: this.props.onExited }, /*#__PURE__*/React.createElement("div", { ref: this.props.forwardRef, className: className, style: this.props.menuStyle, id: this.props.id, onClick: this.onClick }, /*#__PURE__*/React.createElement("ul", { className: "p-menu-list p-reset", role: "menu" }, this.props.children))); } }, { key: "render", value: function render() { var element = this.renderElement(); return /*#__PURE__*/React.createElement(Portal, { element: element, appendTo: this.props.appendTo }); } }]); return SplitButtonPanelComponent; }(Component); _defineProperty(SplitButtonPanelComponent, "defaultProps", { appendTo: null, menuStyle: null, menuClassName: null, id: null, onClick: null }); var SplitButtonPanel = /*#__PURE__*/React.forwardRef(function (props, ref) { return /*#__PURE__*/React.createElement(SplitButtonPanelComponent, _extends({ forwardRef: ref }, props)); }); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var SplitButton = /*#__PURE__*/function (_Component) { _inherits(SplitButton, _Component); var _super = _createSuper(SplitButton); function SplitButton(props) { var _this; _classCallCheck(this, SplitButton); _this = _super.call(this, props); _this.state = { id: props.id, overlayVisible: false }; _this.onDropdownButtonClick = _this.onDropdownButtonClick.bind(_assertThisInitialized(_this)); _this.onItemClick = _this.onItemClick.bind(_assertThisInitialized(_this)); _this.onOverlayEnter = _this.onOverlayEnter.bind(_assertThisInitialized(_this)); _this.onOverlayEntered = _this.onOverlayEntered.bind(_assertThisInitialized(_this)); _this.onOverlayExit = _this.onOverlayExit.bind(_assertThisInitialized(_this)); _this.onOverlayExited = _this.onOverlayExited.bind(_assertThisInitialized(_this)); _this.onPanelClick = _this.onPanelClick.bind(_assertThisInitialized(_this)); _this.overlayRef = /*#__PURE__*/React.createRef(); return _this; } _createClass(SplitButton, [{ key: "onPanelClick", value: function onPanelClick(event) { OverlayService.emit('overlay-click', { originalEvent: event, target: this.container }); } }, { key: "onDropdownButtonClick", value: function onDropdownButtonClick() { if (this.state.overlayVisible) this.hide();else this.show(); } }, { key: "onItemClick", value: function onItemClick() { this.hide(); } }, { key: "show", value: function show() { this.setState({ overlayVisible: true }); } }, { key: "hide", value: function hide() { this.setState({ overlayVisible: false }); } }, { key: "onOverlayEnter", value: function onOverlayEnter() { ZIndexUtils.set('overlay', this.overlayRef.current); this.alignOverlay(); } }, { key: "onOverlayEntered", value: function onOverlayEntered() { this.bindDocumentClickListener(); this.bindScrollListener(); this.bindResizeListener(); this.props.onShow && this.props.onShow(); } }, { key: "onOverlayExit", value: function onOverlayExit() { this.unbindDocumentClickListener(); this.unbindScrollListener(); this.unbindResizeListener(); } }, { key: "onOverlayExited", value: function onOverlayExited() { ZIndexUtils.clear(this.overlayRef.current); this.props.onHide && this.props.onHide(); } }, { key: "alignOverlay", value: function alignOverlay() { DomHandler.alignOverlay(this.overlayRef.current, this.defaultButton.parentElement, this.props.appendTo || PrimeReact.appendTo); } }, { key: "bindDocumentClickListener", value: function bindDocumentClickListener() { var _this2 = this; if (!this.documentClickListener) { this.documentClickListener = function (event) { if (_this2.state.overlayVisible && _this2.isOutsideClicked(event)) { _this2.hide(); } }; document.addEventListener('click', this.documentClickListener); } } }, { key: "bindScrollListener", value: function bindScrollListener() { var _this3 = this; if (!this.scrollHandler) { this.scrollHandler = new ConnectedOverlayScrollHandler(this.container, function () { if (_this3.state.overlayVisible) { _this3.hide(); } }); } this.scrollHandler.bindScrollListener(); } }, { key: "unbindScrollListener", value: function unbindScrollListener() { if (this.scrollHandler) { this.scrollHandler.unbindScrollListener(); } } }, { key: "bindResizeListener", value: function bindResizeListener() { var _this4 = this; if (!this.resizeListener) { this.resizeListener = function () { if (_this4.state.overlayVisible && !DomHandler.isAndroid()) { _this4.hide(); } }; window.addEventListener('resize', this.resizeListener); } } }, { key: "unbindResizeListener", value: function unbindResizeListener() { if (this.resizeListener) { window.removeEventListener('resize', this.resizeListener); this.resizeListener = null; } } }, { key: "isOutsideClicked", value: function isOutsideClicked(event) { return this.container && this.overlayRef && this.overlayRef.current && !this.overlayRef.current.contains(event.target); } }, { key: "unbindDocumentClickListener", value: function unbindDocumentClickListener() { if (this.documentClickListener) { document.removeEventListener('click', this.documentClickListener); this.documentClickListener = null; } } }, { key: "componentDidMount", value: function componentDidMount() { if (!this.state.id) { this.setState({ id: UniqueComponentId() }); } if (this.props.tooltip) { this.renderTooltip(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) { if (this.tooltip) this.tooltip.update(_objectSpread({ content: this.props.tooltip }, this.props.tooltipOptions || {}));else this.renderTooltip(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.unbindDocumentClickListener(); this.unbindResizeListener(); if (this.scrollHandler) { this.scrollHandler.destroy(); this.scrollHandler = null; } if (this.tooltip) { this.tooltip.destroy(); this.tooltip = null; } ZIndexUtils.clear(this.overlayRef.current); } }, { key: "renderTooltip", value: function renderTooltip() { this.tooltip = tip({ target: this.container, content: this.props.tooltip, options: this.props.tooltipOptions }); } }, { key: "renderItems", value: function renderItems() { var _this5 = this; if (this.props.model) { return this.props.model.map(function (menuitem, index) { return /*#__PURE__*/React.createElement(SplitButtonItem, { menuitem: menuitem, key: index, onItemClick: _this5.onItemClick }); }); } return null; } }, { key: "render", value: function render() { var _this6 = this; var className = classNames('p-splitbutton p-component', this.props.className, { 'p-disabled': this.props.disabled }); var items = this.renderItems(); var buttonContent = this.props.buttonTemplate ? ObjectUtils.getJSXElement(this.props.buttonTemplate, this.props) : null; return /*#__PURE__*/React.createElement("div", { id: this.state.id, className: className, style: this.props.style, ref: function ref(el) { return _this6.container = el; } }, /*#__PURE__*/React.createElement(Button, { ref: function ref(el) { return _this6.defaultButton = el; }, type: "button", className: "p-splitbutton-defaultbutton", icon: this.props.icon, label: this.props.label, onClick: this.props.onClick, disabled: this.props.disabled, tabIndex: this.props.tabIndex }, buttonContent), /*#__PURE__*/React.createElement(Button, { type: "button", className: "p-splitbutton-menubutton", icon: this.props.dropdownIcon, onClick: this.onDropdownButtonClick, disabled: this.props.disabled, "aria-expanded": this.state.overlayVisible, "aria-haspopup": true, "aria-owns": this.state.id + '_overlay' }), /*#__PURE__*/React.createElement(SplitButtonPanel, { ref: this.overlayRef, appendTo: this.props.appendTo, id: this.state.id + '_overlay', menuStyle: this.props.menuStyle, menuClassName: this.props.menuClassName, onClick: this.onPanelClick, in: this.state.overlayVisible, onEnter: this.onOverlayEnter, onEntered: this.onOverlayEntered, onExit: this.onOverlayExit, onExited: this.onOverlayExited, transitionOptions: this.props.transitionOptions }, items)); } }]); return SplitButton; }(Component); _defineProperty(SplitButton, "defaultProps", { id: null, label: null, icon: null, model: null, disabled: null, style: null, className: null, menuStyle: null, menuClassName: null, tabIndex: null, appendTo: null, tooltip: null, tooltipOptions: null, buttonTemplate: null, transitionOptions: null, dropdownIcon: 'pi pi-chevron-down', onClick: null, onShow: null, onHide: null }); export { SplitButton };
ajax/libs/react-native-web/0.0.0-376ccc31b/exports/createElement/index.js
cdnjs/cdnjs
/** * Copyright (c) Nicolas Gallagher. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import AccessibilityUtil from '../../modules/AccessibilityUtil'; import createDOMProps from '../../modules/createDOMProps'; import React from 'react'; var createElement = function createElement(component, props) { // Use equivalent platform elements where possible. var accessibilityComponent; if (component && component.constructor === String) { accessibilityComponent = AccessibilityUtil.propsToAccessibilityComponent(props); } var Component = accessibilityComponent || component; var domProps = createDOMProps(Component, props); for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { children[_key - 2] = arguments[_key]; } return React.createElement.apply(React, [Component, domProps].concat(children)); }; export default createElement;
ajax/libs/react-native-web/0.14.6/exports/AppRegistry/renderApplication.js
cdnjs/cdnjs
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import AppContainer from './AppContainer'; import invariant from 'fbjs/lib/invariant'; import render, { hydrate } from '../render'; import styleResolver from '../StyleSheet/styleResolver'; import React from 'react'; export default function renderApplication(RootComponent, WrapperComponent, callback, options) { var shouldHydrate = options.hydrate, initialProps = options.initialProps, rootTag = options.rootTag; var renderFn = shouldHydrate ? hydrate : render; invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag); renderFn(React.createElement(AppContainer, { rootTag: rootTag, WrapperComponent: WrapperComponent }, React.createElement(RootComponent, initialProps)), rootTag, callback); } export function getApplication(RootComponent, initialProps, WrapperComponent) { var element = React.createElement(AppContainer, { rootTag: {}, WrapperComponent: WrapperComponent }, React.createElement(RootComponent, initialProps)); // Don't escape CSS text var getStyleElement = function getStyleElement(props) { var sheet = styleResolver.getStyleSheet(); return React.createElement("style", _extends({}, props, { dangerouslySetInnerHTML: { __html: sheet.textContent }, id: sheet.id })); }; return { element: element, getStyleElement: getStyleElement }; }
ajax/libs/react-native-web/0.13.9/exports/YellowBox/index.js
cdnjs/cdnjs
/** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import React from 'react'; import UnimplementedView from '../../modules/UnimplementedView'; function YellowBox(props) { return React.createElement(UnimplementedView, props); } YellowBox.ignoreWarnings = function () {}; export default YellowBox;
ajax/libs/primereact/6.5.0-rc.1/listbox/listbox.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { DomHandler, classNames, ObjectUtils, FilterUtils } from 'primereact/utils'; import { Ripple } from 'primereact/ripple'; import { InputText } from 'primereact/inputtext'; import { tip } from 'primereact/tooltip'; import { VirtualScroller } from 'primereact/virtualscroller'; function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$1(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread(); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var propTypes = {exports: {}}; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; var ReactPropTypesSecret_1 = ReactPropTypesSecret$1; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = ReactPropTypesSecret_1; function emptyFunction() {} function emptyFunctionWithReset() {} emptyFunctionWithReset.resetWarningCache = emptyFunction; var factoryWithThrowingShims = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; } shim.isRequired = shim; function getShim() { return shim; } // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod propTypes.exports = factoryWithThrowingShims(); } var PropTypes = propTypes.exports; function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var ListBoxItem = /*#__PURE__*/function (_Component) { _inherits(ListBoxItem, _Component); var _super = _createSuper$2(ListBoxItem); function ListBoxItem(props) { var _this; _classCallCheck(this, ListBoxItem); _this = _super.call(this, props); _this.onClick = _this.onClick.bind(_assertThisInitialized(_this)); _this.onTouchEnd = _this.onTouchEnd.bind(_assertThisInitialized(_this)); _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this)); return _this; } _createClass(ListBoxItem, [{ key: "onClick", value: function onClick(event) { if (this.props.onClick) { this.props.onClick({ originalEvent: event, option: this.props.option }); } event.preventDefault(); } }, { key: "onTouchEnd", value: function onTouchEnd(event) { if (this.props.onTouchEnd) { this.props.onTouchEnd({ originalEvent: event, option: this.props.option }); } } }, { key: "onKeyDown", value: function onKeyDown(event) { var item = event.currentTarget; switch (event.which) { //down case 40: var nextItem = this.findNextItem(item); if (nextItem) { nextItem.focus(); } event.preventDefault(); break; //up case 38: var prevItem = this.findPrevItem(item); if (prevItem) { prevItem.focus(); } event.preventDefault(); break; //enter case 13: this.onClick(event); event.preventDefault(); break; } } }, { key: "findNextItem", value: function findNextItem(item) { var nextItem = item.nextElementSibling; if (nextItem) return DomHandler.hasClass(nextItem, 'p-disabled') || DomHandler.hasClass(nextItem, 'p-listbox-item-group') ? this.findNextItem(nextItem) : nextItem;else return null; } }, { key: "findPrevItem", value: function findPrevItem(item) { var prevItem = item.previousElementSibling; if (prevItem) return DomHandler.hasClass(prevItem, 'p-disabled') || DomHandler.hasClass(prevItem, 'p-listbox-item-group') ? this.findPrevItem(prevItem) : prevItem;else return null; } }, { key: "render", value: function render() { var className = classNames('p-listbox-item', { 'p-highlight': this.props.selected, 'p-disabled': this.props.disabled }, this.props.option.className); var content = this.props.template ? ObjectUtils.getJSXElement(this.props.template, this.props.option) : this.props.label; return /*#__PURE__*/React.createElement("li", { className: className, onClick: this.onClick, onTouchEnd: this.onTouchEnd, onKeyDown: this.onKeyDown, tabIndex: this.props.tabIndex, "aria-label": this.props.label, key: this.props.label, role: "option", "aria-selected": this.props.selected }, content, /*#__PURE__*/React.createElement(Ripple, null)); } }]); return ListBoxItem; }(Component); _defineProperty(ListBoxItem, "defaultProps", { option: null, label: null, selected: false, disabled: false, tabIndex: null, onClick: null, onTouchEnd: null, template: null }); _defineProperty(ListBoxItem, "propTypes", { option: PropTypes.any, label: PropTypes.string, selected: PropTypes.bool, disabled: PropTypes.bool, tabIndex: PropTypes.number, onClick: PropTypes.func, onTouchEnd: PropTypes.func, template: PropTypes.any }); function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var ListBoxHeader = /*#__PURE__*/function (_Component) { _inherits(ListBoxHeader, _Component); var _super = _createSuper$1(ListBoxHeader); function ListBoxHeader(props) { var _this; _classCallCheck(this, ListBoxHeader); _this = _super.call(this, props); _this.onFilter = _this.onFilter.bind(_assertThisInitialized(_this)); return _this; } _createClass(ListBoxHeader, [{ key: "onFilter", value: function onFilter(event) { if (this.props.onFilter) { this.props.onFilter({ originalEvent: event, value: event.target.value }); } } }, { key: "render", value: function render() { return /*#__PURE__*/React.createElement("div", { className: "p-listbox-header" }, /*#__PURE__*/React.createElement("div", { className: "p-listbox-filter-container" }, /*#__PURE__*/React.createElement(InputText, { type: "text", value: this.props.filter, onChange: this.onFilter, className: "p-listbox-filter", disabled: this.props.disabled, placeholder: this.props.filterPlaceholder }), /*#__PURE__*/React.createElement("span", { className: "p-listbox-filter-icon pi pi-search" }))); } }]); return ListBoxHeader; }(Component); _defineProperty(ListBoxHeader, "defaultProps", { filter: null, filterPlaceholder: null, disabled: false, onFilter: null }); _defineProperty(ListBoxHeader, "propTypes", { filter: PropTypes.string, filterPlaceholder: PropTypes.string, disabled: PropTypes.bool, onFilter: PropTypes.func }); function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var ListBox = /*#__PURE__*/function (_Component) { _inherits(ListBox, _Component); var _super = _createSuper(ListBox); function ListBox(props) { var _this; _classCallCheck(this, ListBox); _this = _super.call(this, props); _this.state = {}; if (!_this.props.onFilterValueChange) { _this.state.filterValue = ''; } _this.onFilter = _this.onFilter.bind(_assertThisInitialized(_this)); _this.onOptionSelect = _this.onOptionSelect.bind(_assertThisInitialized(_this)); _this.onOptionTouchEnd = _this.onOptionTouchEnd.bind(_assertThisInitialized(_this)); return _this; } _createClass(ListBox, [{ key: "componentDidMount", value: function componentDidMount() { if (this.props.tooltip) { this.renderTooltip(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) { if (this.tooltip) this.tooltip.update(_objectSpread({ content: this.props.tooltip }, this.props.tooltipOptions || {}));else this.renderTooltip(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.tooltip) { this.tooltip.destroy(); this.tooltip = null; } } }, { key: "renderTooltip", value: function renderTooltip() { this.tooltip = tip({ target: this.element, content: this.props.tooltip, options: this.props.tooltipOptions }); } }, { key: "getFilterValue", value: function getFilterValue() { return (this.props.onFilterValueChange ? this.props.filterValue : this.state.filterValue) || ''; } }, { key: "onOptionSelect", value: function onOptionSelect(event) { var option = event.option; if (this.props.disabled || this.isOptionDisabled(option)) { return; } if (this.props.multiple) this.onOptionSelectMultiple(event.originalEvent, option);else this.onOptionSelectSingle(event.originalEvent, option); this.optionTouched = false; } }, { key: "onOptionTouchEnd", value: function onOptionTouchEnd() { if (this.props.disabled) { return; } this.optionTouched = true; } }, { key: "onOptionSelectSingle", value: function onOptionSelectSingle(event, option) { var selected = this.isSelected(option); var valueChanged = false; var value = null; var metaSelection = this.optionTouched ? false : this.props.metaKeySelection; if (metaSelection) { var metaKey = event.metaKey || event.ctrlKey; if (selected) { if (metaKey) { value = null; valueChanged = true; } } else { value = this.getOptionValue(option); valueChanged = true; } } else { value = selected ? null : this.getOptionValue(option); valueChanged = true; } if (valueChanged) { this.updateModel(event, value); } } }, { key: "onOptionSelectMultiple", value: function onOptionSelectMultiple(event, option) { var selected = this.isSelected(option); var valueChanged = false; var value = null; var metaSelection = this.optionTouched ? false : this.props.metaKeySelection; if (metaSelection) { var metaKey = event.metaKey || event.ctrlKey; if (selected) { if (metaKey) value = this.removeOption(option);else value = [this.getOptionValue(option)]; valueChanged = true; } else { value = metaKey ? this.props.value || [] : []; value = [].concat(_toConsumableArray(value), [this.getOptionValue(option)]); valueChanged = true; } } else { if (selected) value = this.removeOption(option);else value = [].concat(_toConsumableArray(this.props.value || []), [this.getOptionValue(option)]); valueChanged = true; } if (valueChanged) { this.props.onChange({ originalEvent: event, value: value, stopPropagation: function stopPropagation() {}, preventDefault: function preventDefault() {}, target: { name: this.props.name, id: this.props.id, value: value } }); } } }, { key: "onFilter", value: function onFilter(event) { var originalEvent = event.originalEvent, value = event.value; if (this.props.onFilterValueChange) { this.props.onFilterValueChange({ originalEvent: originalEvent, value: value }); } else { this.setState({ filterValue: value }); } } }, { key: "updateModel", value: function updateModel(event, value) { if (this.props.onChange) { this.props.onChange({ originalEvent: event, value: value, stopPropagation: function stopPropagation() {}, preventDefault: function preventDefault() {}, target: { name: this.props.name, id: this.props.id, value: value } }); } } }, { key: "removeOption", value: function removeOption(option) { var _this2 = this; return this.props.value.filter(function (val) { return !ObjectUtils.equals(val, _this2.getOptionValue(option), _this2.props.dataKey); }); } }, { key: "isSelected", value: function isSelected(option) { var selected = false; var optionValue = this.getOptionValue(option); if (this.props.multiple) { if (this.props.value) { var _iterator = _createForOfIteratorHelper(this.props.value), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var val = _step.value; if (ObjectUtils.equals(val, optionValue, this.props.dataKey)) { selected = true; break; } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } } } else { selected = ObjectUtils.equals(this.props.value, optionValue, this.props.dataKey); } return selected; } }, { key: "filter", value: function filter(option) { var filterValue = this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale); var optionLabel = this.getOptionLabel(option).toLocaleLowerCase(this.props.filterLocale); return optionLabel.indexOf(filterValue) > -1; } }, { key: "hasFilter", value: function hasFilter() { var filter = this.getFilterValue(); return filter && filter.trim().length > 0; } }, { key: "getOptionLabel", value: function getOptionLabel(option) { return this.props.optionLabel ? ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option; } }, { key: "getOptionValue", value: function getOptionValue(option) { return this.props.optionValue ? ObjectUtils.resolveFieldData(option, this.props.optionValue) : option && option['value'] !== undefined ? option['value'] : option; } }, { key: "getOptionRenderKey", value: function getOptionRenderKey(option) { return this.props.dataKey ? ObjectUtils.resolveFieldData(option, this.props.dataKey) : this.getOptionLabel(option); } }, { key: "isOptionDisabled", value: function isOptionDisabled(option) { if (this.props.optionDisabled) { return ObjectUtils.isFunction(this.props.optionDisabled) ? this.props.optionDisabled(option) : ObjectUtils.resolveFieldData(option, this.props.optionDisabled); } return option && option['disabled'] !== undefined ? option['disabled'] : false; } }, { key: "getOptionGroupRenderKey", value: function getOptionGroupRenderKey(optionGroup) { return ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel); } }, { key: "getOptionGroupLabel", value: function getOptionGroupLabel(optionGroup) { return ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel); } }, { key: "getOptionGroupChildren", value: function getOptionGroupChildren(optionGroup) { return ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupChildren); } }, { key: "getVisibleOptions", value: function getVisibleOptions() { if (this.hasFilter()) { var filterValue = this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale); var searchFields = this.props.filterBy ? this.props.filterBy.split(',') : [this.props.optionLabel || 'label']; if (this.props.optionGroupLabel) { var filteredGroups = []; var _iterator2 = _createForOfIteratorHelper(this.props.options), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var optgroup = _step2.value; var filteredSubOptions = FilterUtils.filter(this.getOptionGroupChildren(optgroup), searchFields, filterValue, this.props.filterMatchMode, this.props.filterLocale); if (filteredSubOptions && filteredSubOptions.length) { filteredGroups.push(_objectSpread(_objectSpread({}, optgroup), { items: filteredSubOptions })); } } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } return filteredGroups; } else { return FilterUtils.filter(this.props.options, searchFields, filterValue, this.props.filterMatchMode, this.props.filterLocale); } } else { return this.props.options; } } }, { key: "renderGroupChildren", value: function renderGroupChildren(optionGroup) { var _this3 = this; var groupChildren = this.getOptionGroupChildren(optionGroup); return groupChildren.map(function (option, j) { var optionLabel = _this3.getOptionLabel(option); var optionKey = j + '_' + _this3.getOptionRenderKey(option); var disabled = _this3.isOptionDisabled(option); var tabIndex = disabled ? null : _this3.props.tabIndex || 0; return /*#__PURE__*/React.createElement(ListBoxItem, { key: optionKey, label: optionLabel, option: option, template: _this3.props.itemTemplate, selected: _this3.isSelected(option), onClick: _this3.onOptionSelect, onTouchEnd: _this3.onOptionTouchEnd, tabIndex: tabIndex, disabled: disabled }); }); } }, { key: "renderItem", value: function renderItem(option, index) { if (this.props.optionGroupLabel) { var groupContent = this.props.optionGroupTemplate ? ObjectUtils.getJSXElement(this.props.optionGroupTemplate, option, index) : this.getOptionGroupLabel(option); var groupChildrenContent = this.renderGroupChildren(option); var key = index + '_' + this.getOptionGroupRenderKey(option); return /*#__PURE__*/React.createElement(React.Fragment, { key: key }, /*#__PURE__*/React.createElement("li", { className: "p-listbox-item-group" }, groupContent), groupChildrenContent); } else { var optionLabel = this.getOptionLabel(option); var optionKey = index + '_' + this.getOptionRenderKey(option); var disabled = this.isOptionDisabled(option); var tabIndex = disabled ? null : this.props.tabIndex || 0; return /*#__PURE__*/React.createElement(ListBoxItem, { key: optionKey, label: optionLabel, option: option, template: this.props.itemTemplate, selected: this.isSelected(option), onClick: this.onOptionSelect, onTouchEnd: this.onOptionTouchEnd, tabIndex: tabIndex, disabled: disabled }); } } }, { key: "renderItems", value: function renderItems(visibleOptions) { var _this4 = this; if (visibleOptions && visibleOptions.length) { return visibleOptions.map(function (option, index) { return _this4.renderItem(option, index); }); } return null; } }, { key: "renderList", value: function renderList(visibleOptions) { var _this5 = this; if (this.props.virtualScrollerOptions) { var virtualScrollerProps = _objectSpread(_objectSpread({}, this.props.virtualScrollerOptions), { items: visibleOptions, itemTemplate: function itemTemplate(item, options) { return item && _this5.renderItem(item, options.index); }, contentTemplate: function contentTemplate(options) { var className = classNames('p-listbox-list', options.className); return /*#__PURE__*/React.createElement("ul", { ref: options.ref, className: className, role: "listbox", "aria-multiselectable": _this5.props.multiple }, options.children); } }); return /*#__PURE__*/React.createElement(VirtualScroller, _extends({ ref: function ref(el) { return _this5.virtualScrollerRef = el; } }, virtualScrollerProps)); } else { var items = this.renderItems(visibleOptions); return /*#__PURE__*/React.createElement("ul", { className: "p-listbox-list", role: "listbox", "aria-multiselectable": this.props.multiple }, items); } } }, { key: "render", value: function render() { var _this6 = this; var className = classNames('p-listbox p-component', { 'p-disabled': this.props.disabled }, this.props.className); var listClassName = classNames('p-listbox-list-wrapper', this.props.listClassName); var visibleOptions = this.getVisibleOptions(); var list = this.renderList(visibleOptions); var header; if (this.props.filter) { header = /*#__PURE__*/React.createElement(ListBoxHeader, { filter: this.getFilterValue(), onFilter: this.onFilter, disabled: this.props.disabled, filterPlaceholder: this.props.filterPlaceholder }); } return /*#__PURE__*/React.createElement("div", { ref: function ref(el) { return _this6.element = el; }, id: this.props.id, className: className, style: this.props.style }, header, /*#__PURE__*/React.createElement("div", { ref: function ref(el) { return _this6.wrapper = el; }, className: listClassName, style: this.props.listStyle }, list)); } }]); return ListBox; }(Component); _defineProperty(ListBox, "defaultProps", { id: null, value: null, options: null, optionLabel: null, optionValue: null, optionDisabled: null, optionGroupLabel: null, optionGroupChildren: null, optionGroupTemplate: null, itemTemplate: null, style: null, listStyle: null, listClassName: null, className: null, virtualScrollerOptions: null, disabled: null, dataKey: null, multiple: false, metaKeySelection: false, filter: false, filterBy: null, filterValue: null, filterMatchMode: 'contains', filterPlaceholder: null, filterLocale: undefined, tabIndex: 0, tooltip: null, tooltipOptions: null, ariaLabelledBy: null, onChange: null, onFilterValueChange: null }); _defineProperty(ListBox, "propTypes", { id: PropTypes.string, value: PropTypes.any, options: PropTypes.array, optionLabel: PropTypes.string, optionValue: PropTypes.string, optionDisabled: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), optionGroupLabel: PropTypes.string, optionGroupChildren: PropTypes.string, optionGroupTemplate: PropTypes.any, itemTemplate: PropTypes.any, style: PropTypes.object, listStyle: PropTypes.object, listClassName: PropTypes.string, className: PropTypes.string, virtualScrollerOptions: PropTypes.object, disabled: PropTypes.bool, dataKey: PropTypes.string, multiple: PropTypes.bool, metaKeySelection: PropTypes.bool, filter: PropTypes.bool, filterBy: PropTypes.string, filterValue: PropTypes.string, filterMatchMode: PropTypes.string, filterPlaceholder: PropTypes.string, filterLocale: PropTypes.string, tabIndex: PropTypes.number, tooltip: PropTypes.string, tooltipOptions: PropTypes.object, ariaLabelledBy: PropTypes.string, onChange: PropTypes.func, onFilterValueChange: PropTypes.func }); export { ListBox };
ajax/libs/boardgame-io/0.49.4/esm/react.js
cdnjs/cdnjs
import 'nanoid/non-secure'; import './Debug-2fab6ce8.js'; import 'redux'; import './turn-order-406c4349.js'; import 'immer'; import 'lodash.isplainobject'; import './reducer-52d26818.js'; import 'rfc6902'; import './initialize-1b5f9063.js'; import './transport-ce07b771.js'; import { C as Client$1 } from './client-29adb7d5.js'; import 'flatted'; import 'setimmediate'; import { M as MCTSBot } from './ai-6828953e.js'; import { L as LobbyClient } from './client-5f57c3f2.js'; import React from 'react'; import PropTypes from 'prop-types'; import Cookies from 'react-cookies'; import './util-1961e301.js'; import { S as SocketIO, L as Local } from './socketio-e84bb3bd.js'; import './master-3075f8ab.js'; import './filter-player-view-7cb2b79d.js'; import 'socket.io-client'; /* * Copyright 2017 The boardgame.io Authors * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ /** * Client * * boardgame.io React client. * * @param {...object} game - The return value of `Game`. * @param {...object} numPlayers - The number of players. * @param {...object} board - The React component for the game. * @param {...object} loading - (optional) The React component for the loading state. * @param {...object} multiplayer - Set to a falsy value or a transportFactory, e.g., SocketIO() * @param {...object} debug - Enables the Debug UI. * @param {...object} enhancer - Optional enhancer to send to the Redux store * * Returns: * A React component that wraps board and provides an * API through props for it to interact with the framework * and dispatch actions such as MAKE_MOVE, GAME_EVENT, RESET, * UNDO and REDO. */ function Client(opts) { var _a; const { game, numPlayers, board, multiplayer, enhancer } = opts; let { loading, debug } = opts; // Component that is displayed before the client has synced // with the game master. if (loading === undefined) { const Loading = () => React.createElement("div", { className: "bgio-loading" }, "connecting..."); loading = Loading; } /* * WrappedBoard * * The main React component that wraps the passed in * board component and adds the API to its props. */ return _a = class WrappedBoard extends React.Component { constructor(props) { super(props); if (debug === undefined) { debug = props.debug; } this.client = Client$1({ game, debug, numPlayers, multiplayer, matchID: props.matchID, playerID: props.playerID, credentials: props.credentials, enhancer, }); } componentDidMount() { this.unsubscribe = this.client.subscribe(() => this.forceUpdate()); this.client.start(); } componentWillUnmount() { this.client.stop(); this.unsubscribe(); } componentDidUpdate(prevProps) { if (this.props.matchID != prevProps.matchID) { this.client.updateMatchID(this.props.matchID); } if (this.props.playerID != prevProps.playerID) { this.client.updatePlayerID(this.props.playerID); } if (this.props.credentials != prevProps.credentials) { this.client.updateCredentials(this.props.credentials); } } render() { const state = this.client.getState(); if (state === null) { return React.createElement(loading); } let _board = null; if (board) { _board = React.createElement(board, { ...state, ...this.props, isMultiplayer: !!multiplayer, moves: this.client.moves, events: this.client.events, matchID: this.client.matchID, playerID: this.client.playerID, reset: this.client.reset, undo: this.client.undo, redo: this.client.redo, log: this.client.log, matchData: this.client.matchData, sendChatMessage: this.client.sendChatMessage, chatMessages: this.client.chatMessages, }); } return React.createElement("div", { className: "bgio-client" }, _board); } }, _a.propTypes = { // The ID of a game to connect to. // Only relevant in multiplayer. matchID: PropTypes.string, // The ID of the player associated with this client. // Only relevant in multiplayer. playerID: PropTypes.string, // This client's authentication credentials. // Only relevant in multiplayer. credentials: PropTypes.string, // Enable / disable the Debug UI. debug: PropTypes.any, }, _a.defaultProps = { matchID: 'default', playerID: null, credentials: null, debug: true, }, _a; } /* * Copyright 2018 The boardgame.io Authors * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ class _LobbyConnectionImpl { constructor({ server, gameComponents, playerName, playerCredentials, }) { this.client = new LobbyClient({ server }); this.gameComponents = gameComponents; this.playerName = playerName || 'Visitor'; this.playerCredentials = playerCredentials; this.matches = []; } async refresh() { try { this.matches = []; const games = await this.client.listGames(); for (const game of games) { if (!this._getGameComponents(game)) continue; const { matches } = await this.client.listMatches(game); this.matches.push(...matches); } } catch (error) { throw new Error('failed to retrieve list of matches (' + error + ')'); } } _getMatchInstance(matchID) { for (const inst of this.matches) { if (inst['matchID'] === matchID) return inst; } } _getGameComponents(gameName) { for (const comp of this.gameComponents) { if (comp.game.name === gameName) return comp; } } _findPlayer(playerName) { for (const inst of this.matches) { if (inst.players.some((player) => player.name === playerName)) return inst; } } async join(gameName, matchID, playerID) { try { let inst = this._findPlayer(this.playerName); if (inst) { throw new Error('player has already joined ' + inst.matchID); } inst = this._getMatchInstance(matchID); if (!inst) { throw new Error('game instance ' + matchID + ' not found'); } const json = await this.client.joinMatch(gameName, matchID, { playerID, playerName: this.playerName, }); inst.players[Number.parseInt(playerID)].name = this.playerName; this.playerCredentials = json.playerCredentials; } catch (error) { throw new Error('failed to join match ' + matchID + ' (' + error + ')'); } } async leave(gameName, matchID) { try { const inst = this._getMatchInstance(matchID); if (!inst) throw new Error('match instance not found'); for (const player of inst.players) { if (player.name === this.playerName) { await this.client.leaveMatch(gameName, matchID, { playerID: player.id.toString(), credentials: this.playerCredentials, }); delete player.name; delete this.playerCredentials; return; } } throw new Error('player not found in match'); } catch (error) { throw new Error('failed to leave match ' + matchID + ' (' + error + ')'); } } async disconnect() { const inst = this._findPlayer(this.playerName); if (inst) { await this.leave(inst.gameName, inst.matchID); } this.matches = []; this.playerName = 'Visitor'; } async create(gameName, numPlayers) { try { const comp = this._getGameComponents(gameName); if (!comp) throw new Error('game not found'); if (numPlayers < comp.game.minPlayers || numPlayers > comp.game.maxPlayers) throw new Error('invalid number of players ' + numPlayers); await this.client.createMatch(gameName, { numPlayers }); } catch (error) { throw new Error('failed to create match for ' + gameName + ' (' + error + ')'); } } } /** * LobbyConnection * * Lobby model. * * @param {string} server - '<host>:<port>' of the server. * @param {Array} gameComponents - A map of Board and Game objects for the supported games. * @param {string} playerName - The name of the player. * @param {string} playerCredentials - The credentials currently used by the player, if any. * * Returns: * A JS object that synchronizes the list of running game instances with the server and provides an API to create/join/start instances. */ function LobbyConnection(opts) { return new _LobbyConnectionImpl(opts); } /* * Copyright 2018 The boardgame.io Authors. * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ class LobbyLoginForm extends React.Component { constructor() { super(...arguments); this.state = { playerName: this.props.playerName, nameErrorMsg: '', }; this.onClickEnter = () => { if (this.state.playerName === '') return; this.props.onEnter(this.state.playerName); }; this.onKeyPress = (event) => { if (event.key === 'Enter') { this.onClickEnter(); } }; this.onChangePlayerName = (event) => { const name = event.target.value.trim(); this.setState({ playerName: name, nameErrorMsg: name.length > 0 ? '' : 'empty player name', }); }; } render() { return (React.createElement("div", null, React.createElement("p", { className: "phase-title" }, "Choose a player name:"), React.createElement("input", { type: "text", value: this.state.playerName, onChange: this.onChangePlayerName, onKeyPress: this.onKeyPress }), React.createElement("span", { className: "buttons" }, React.createElement("button", { className: "buttons", onClick: this.onClickEnter }, "Enter")), React.createElement("br", null), React.createElement("span", { className: "error-msg" }, this.state.nameErrorMsg, React.createElement("br", null)))); } } LobbyLoginForm.defaultProps = { playerName: '', }; /* * Copyright 2018 The boardgame.io Authors. * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ class LobbyMatchInstance extends React.Component { constructor() { super(...arguments); this._createSeat = (player) => { return player.name || '[free]'; }; this._createButtonJoin = (inst, seatId) => (React.createElement("button", { key: 'button-join-' + inst.matchID, onClick: () => this.props.onClickJoin(inst.gameName, inst.matchID, '' + seatId) }, "Join")); this._createButtonLeave = (inst) => (React.createElement("button", { key: 'button-leave-' + inst.matchID, onClick: () => this.props.onClickLeave(inst.gameName, inst.matchID) }, "Leave")); this._createButtonPlay = (inst, seatId) => (React.createElement("button", { key: 'button-play-' + inst.matchID, onClick: () => this.props.onClickPlay(inst.gameName, { matchID: inst.matchID, playerID: '' + seatId, numPlayers: inst.players.length, }) }, "Play")); this._createButtonSpectate = (inst) => (React.createElement("button", { key: 'button-spectate-' + inst.matchID, onClick: () => this.props.onClickPlay(inst.gameName, { matchID: inst.matchID, numPlayers: inst.players.length, }) }, "Spectate")); this._createInstanceButtons = (inst) => { const playerSeat = inst.players.find((player) => player.name === this.props.playerName); const freeSeat = inst.players.find((player) => !player.name); if (playerSeat && freeSeat) { // already seated: waiting for match to start return this._createButtonLeave(inst); } if (freeSeat) { // at least 1 seat is available return this._createButtonJoin(inst, freeSeat.id); } // match is full if (playerSeat) { return (React.createElement("div", null, [ this._createButtonPlay(inst, playerSeat.id), this._createButtonLeave(inst), ])); } // allow spectating return this._createButtonSpectate(inst); }; } render() { const match = this.props.match; let status = 'OPEN'; if (!match.players.some((player) => !player.name)) { status = 'RUNNING'; } return (React.createElement("tr", { key: 'line-' + match.matchID }, React.createElement("td", { key: 'cell-name-' + match.matchID }, match.gameName), React.createElement("td", { key: 'cell-status-' + match.matchID }, status), React.createElement("td", { key: 'cell-seats-' + match.matchID }, match.players.map((player) => this._createSeat(player)).join(', ')), React.createElement("td", { key: 'cell-buttons-' + match.matchID }, this._createInstanceButtons(match)))); } } /* * Copyright 2018 The boardgame.io Authors. * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ class LobbyCreateMatchForm extends React.Component { constructor(props) { super(props); this.state = { selectedGame: 0, numPlayers: 2, }; this._createGameNameOption = (game, idx) => { return (React.createElement("option", { key: 'name-option-' + idx, value: idx }, game.game.name)); }; this._createNumPlayersOption = (idx) => { return (React.createElement("option", { key: 'num-option-' + idx, value: idx }, idx)); }; this._createNumPlayersRange = (game) => { return Array.from({ length: game.maxPlayers + 1 }) .map((_, i) => i) .slice(game.minPlayers); }; this.onChangeNumPlayers = (event) => { this.setState({ numPlayers: Number.parseInt(event.target.value), }); }; this.onChangeSelectedGame = (event) => { const idx = Number.parseInt(event.target.value); this.setState({ selectedGame: idx, numPlayers: this.props.games[idx].game.minPlayers, }); }; this.onClickCreate = () => { this.props.createMatch(this.props.games[this.state.selectedGame].game.name, this.state.numPlayers); }; /* fix min and max number of players */ for (const game of props.games) { const matchDetails = game.game; if (!matchDetails.minPlayers) { matchDetails.minPlayers = 1; } if (!matchDetails.maxPlayers) { matchDetails.maxPlayers = 4; } console.assert(matchDetails.maxPlayers >= matchDetails.minPlayers); } this.state = { selectedGame: 0, numPlayers: props.games[0].game.minPlayers, }; } render() { return (React.createElement("div", null, React.createElement("select", { value: this.state.selectedGame, onChange: (evt) => this.onChangeSelectedGame(evt) }, this.props.games.map((game, index) => this._createGameNameOption(game, index))), React.createElement("span", null, "Players:"), React.createElement("select", { value: this.state.numPlayers, onChange: this.onChangeNumPlayers }, this._createNumPlayersRange(this.props.games[this.state.selectedGame].game).map((number) => this._createNumPlayersOption(number))), React.createElement("span", { className: "buttons" }, React.createElement("button", { onClick: this.onClickCreate }, "Create")))); } } /* * Copyright 2018 The boardgame.io Authors. * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ var LobbyPhases; (function (LobbyPhases) { LobbyPhases["ENTER"] = "enter"; LobbyPhases["PLAY"] = "play"; LobbyPhases["LIST"] = "list"; })(LobbyPhases || (LobbyPhases = {})); /** * Lobby * * React lobby component. * * @param {Array} gameComponents - An array of Board and Game objects for the supported games. * @param {string} lobbyServer - Address of the lobby server (for example 'localhost:8000'). * If not set, defaults to the server that served the page. * @param {string} gameServer - Address of the game server (for example 'localhost:8001'). * If not set, defaults to the server that served the page. * @param {function} clientFactory - Function that is used to create the game clients. * @param {number} refreshInterval - Interval between server updates (default: 2000ms). * @param {bool} debug - Enable debug information (default: false). * * Returns: * A React component that provides a UI to create, list, join, leave, play or * spectate matches (game instances). */ class Lobby extends React.Component { constructor(props) { super(props); this.state = { phase: LobbyPhases.ENTER, playerName: 'Visitor', runningMatch: null, errorMsg: '', credentialStore: {}, }; this._createConnection = (props) => { const name = this.state.playerName; this.connection = LobbyConnection({ server: props.lobbyServer, gameComponents: props.gameComponents, playerName: name, playerCredentials: this.state.credentialStore[name], }); }; this._updateCredentials = (playerName, credentials) => { this.setState((prevState) => { // clone store or componentDidUpdate will not be triggered const store = Object.assign({}, prevState.credentialStore); store[playerName] = credentials; return { credentialStore: store }; }); }; this._updateConnection = async () => { await this.connection.refresh(); this.forceUpdate(); }; this._enterLobby = (playerName) => { this.setState({ playerName, phase: LobbyPhases.LIST }); }; this._exitLobby = async () => { await this.connection.disconnect(); this.setState({ phase: LobbyPhases.ENTER, errorMsg: '' }); }; this._createMatch = async (gameName, numPlayers) => { try { await this.connection.create(gameName, numPlayers); await this.connection.refresh(); // rerender this.setState({}); } catch (error) { this.setState({ errorMsg: error.message }); } }; this._joinMatch = async (gameName, matchID, playerID) => { try { await this.connection.join(gameName, matchID, playerID); await this.connection.refresh(); this._updateCredentials(this.connection.playerName, this.connection.playerCredentials); } catch (error) { this.setState({ errorMsg: error.message }); } }; this._leaveMatch = async (gameName, matchID) => { try { await this.connection.leave(gameName, matchID); await this.connection.refresh(); this._updateCredentials(this.connection.playerName, this.connection.playerCredentials); } catch (error) { this.setState({ errorMsg: error.message }); } }; this._startMatch = (gameName, matchOpts) => { const gameCode = this.connection._getGameComponents(gameName); if (!gameCode) { this.setState({ errorMsg: 'game ' + gameName + ' not supported', }); return; } let multiplayer = undefined; if (matchOpts.numPlayers > 1) { multiplayer = this.props.gameServer ? SocketIO({ server: this.props.gameServer }) : SocketIO(); } if (matchOpts.numPlayers == 1) { const maxPlayers = gameCode.game.maxPlayers; const bots = {}; for (let i = 1; i < maxPlayers; i++) { bots[i + ''] = MCTSBot; } multiplayer = Local({ bots }); } const app = this.props.clientFactory({ game: gameCode.game, board: gameCode.board, debug: this.props.debug, multiplayer, }); const match = { app: app, matchID: matchOpts.matchID, playerID: matchOpts.numPlayers > 1 ? matchOpts.playerID : '0', credentials: this.connection.playerCredentials, }; this.setState({ phase: LobbyPhases.PLAY, runningMatch: match }); }; this._exitMatch = () => { this.setState({ phase: LobbyPhases.LIST, runningMatch: null }); }; this._getPhaseVisibility = (phase) => { return this.state.phase !== phase ? 'hidden' : 'phase'; }; this.renderMatches = (matches, playerName) => { return matches.map((match) => { const { matchID, gameName, players } = match; return (React.createElement(LobbyMatchInstance, { key: 'instance-' + matchID, match: { matchID, gameName, players: Object.values(players) }, playerName: playerName, onClickJoin: this._joinMatch, onClickLeave: this._leaveMatch, onClickPlay: this._startMatch })); }); }; this._createConnection(this.props); } componentDidMount() { const cookie = Cookies.load('lobbyState') || {}; if (cookie.phase && cookie.phase === LobbyPhases.PLAY) { cookie.phase = LobbyPhases.LIST; } this.setState({ phase: cookie.phase || LobbyPhases.ENTER, playerName: cookie.playerName || 'Visitor', credentialStore: cookie.credentialStore || {}, }); this._startRefreshInterval(); } componentDidUpdate(prevProps, prevState) { const name = this.state.playerName; const creds = this.state.credentialStore[name]; if (prevState.phase !== this.state.phase || prevState.credentialStore[name] !== creds || prevState.playerName !== name) { this._createConnection(this.props); this._updateConnection(); const cookie = { phase: this.state.phase, playerName: name, credentialStore: this.state.credentialStore, }; Cookies.save('lobbyState', cookie, { path: '/' }); } if (prevProps.refreshInterval !== this.props.refreshInterval) { this._startRefreshInterval(); } } componentWillUnmount() { this._clearRefreshInterval(); } _startRefreshInterval() { this._clearRefreshInterval(); this._currentInterval = setInterval(this._updateConnection, this.props.refreshInterval); } _clearRefreshInterval() { clearInterval(this._currentInterval); } render() { const { gameComponents, renderer } = this.props; const { errorMsg, playerName, phase, runningMatch } = this.state; if (renderer) { return renderer({ errorMsg, gameComponents, matches: this.connection.matches, phase, playerName, runningMatch, handleEnterLobby: this._enterLobby, handleExitLobby: this._exitLobby, handleCreateMatch: this._createMatch, handleJoinMatch: this._joinMatch, handleLeaveMatch: this._leaveMatch, handleExitMatch: this._exitMatch, handleRefreshMatches: this._updateConnection, handleStartMatch: this._startMatch, }); } return (React.createElement("div", { id: "lobby-view", style: { padding: 50 } }, React.createElement("div", { className: this._getPhaseVisibility(LobbyPhases.ENTER) }, React.createElement(LobbyLoginForm, { key: playerName, playerName: playerName, onEnter: this._enterLobby })), React.createElement("div", { className: this._getPhaseVisibility(LobbyPhases.LIST) }, React.createElement("p", null, "Welcome, ", playerName), React.createElement("div", { className: "phase-title", id: "match-creation" }, React.createElement("span", null, "Create a match:"), React.createElement(LobbyCreateMatchForm, { games: gameComponents, createMatch: this._createMatch })), React.createElement("p", { className: "phase-title" }, "Join a match:"), React.createElement("div", { id: "instances" }, React.createElement("table", null, React.createElement("tbody", null, this.renderMatches(this.connection.matches, playerName))), React.createElement("span", { className: "error-msg" }, errorMsg, React.createElement("br", null))), React.createElement("p", { className: "phase-title" }, "Matches that become empty are automatically deleted.")), React.createElement("div", { className: this._getPhaseVisibility(LobbyPhases.PLAY) }, runningMatch && (React.createElement(runningMatch.app, { matchID: runningMatch.matchID, playerID: runningMatch.playerID, credentials: runningMatch.credentials })), React.createElement("div", { className: "buttons", id: "match-exit" }, React.createElement("button", { onClick: this._exitMatch }, "Exit match"))), React.createElement("div", { className: "buttons", id: "lobby-exit" }, React.createElement("button", { onClick: this._exitLobby }, "Exit lobby")))); } } Lobby.propTypes = { gameComponents: PropTypes.array.isRequired, lobbyServer: PropTypes.string, gameServer: PropTypes.string, debug: PropTypes.bool, clientFactory: PropTypes.func, refreshInterval: PropTypes.number, }; Lobby.defaultProps = { debug: false, clientFactory: Client, refreshInterval: 2000, }; export { Client, Lobby };
ajax/libs/react-native-web/0.0.0-b096cd2d/modules/UnimplementedView/index.js
cdnjs/cdnjs
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import View from '../../exports/View'; import React from 'react'; /** * Common implementation for a simple stubbed view. */ var UnimplementedView = /*#__PURE__*/function (_React$Component) { _inheritsLoose(UnimplementedView, _React$Component); function UnimplementedView() { return _React$Component.apply(this, arguments) || this; } var _proto = UnimplementedView.prototype; _proto.setNativeProps = function setNativeProps() {// Do nothing. }; _proto.render = function render() { return /*#__PURE__*/React.createElement(View, { style: [unimplementedViewStyles, this.props.style] }, this.props.children); }; return UnimplementedView; }(React.Component); var unimplementedViewStyles = process.env.NODE_ENV !== 'production' ? { alignSelf: 'flex-start', borderColor: 'red', borderWidth: 1 } : {}; export default UnimplementedView;
ajax/libs/primereact/7.2.0/chip/chip.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { IconUtils, classNames, ObjectUtils } from 'primereact/utils'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Chip = /*#__PURE__*/function (_Component) { _inherits(Chip, _Component); var _super = _createSuper(Chip); function Chip(props) { var _this; _classCallCheck(this, Chip); _this = _super.call(this, props); _this.state = { visible: true }; _this.close = _this.close.bind(_assertThisInitialized(_this)); _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this)); return _this; } _createClass(Chip, [{ key: "onKeyDown", value: function onKeyDown(event) { if (event.keyCode === 13) { // enter this.close(event); } } }, { key: "close", value: function close(event) { var _this2 = this; event.persist(); this.setState({ visible: false }, function () { if (_this2.props.onRemove) { _this2.props.onRemove(event); } }); } }, { key: "renderContent", value: function renderContent() { var _this3 = this; var content = []; if (this.props.image) { var onError = function onError(e) { if (_this3.props.onImageError) { _this3.props.onImageError(e); } }; content.push( /*#__PURE__*/React.createElement("img", { key: "image", src: this.props.image, alt: this.props.imageAlt, onError: onError })); } else if (this.props.icon) { content.push(IconUtils.getJSXIcon(this.props.icon, { key: 'icon', className: 'p-chip-icon' }, { props: this.props })); } if (this.props.label) { content.push( /*#__PURE__*/React.createElement("span", { key: "label", className: "p-chip-text" }, this.props.label)); } if (this.props.removable) { content.push(IconUtils.getJSXIcon(this.props.removeIcon, { key: 'removeIcon', tabIndex: 0, className: 'p-chip-remove-icon', onClick: this.close, onKeyDown: this.onKeyDown }, { props: this.props })); } return content; } }, { key: "renderElement", value: function renderElement() { var containerClassName = classNames('p-chip p-component', { 'p-chip-image': this.props.image != null }, this.props.className); var content = this.props.template ? ObjectUtils.getJSXElement(this.props.template, this.props) : this.renderContent(); return /*#__PURE__*/React.createElement("div", { className: containerClassName, style: this.props.style }, content); } }, { key: "render", value: function render() { return this.state.visible && this.renderElement(); } }]); return Chip; }(Component); _defineProperty(Chip, "defaultProps", { label: null, icon: null, image: null, removable: false, removeIcon: 'pi pi-times-circle', className: null, style: null, template: null, imageAlt: 'chip', onImageError: null, onRemove: null }); export { Chip };
ajax/libs/primereact/6.6.0-rc.1/timeline/timeline.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { ObjectUtils, classNames } from 'primereact/core'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Timeline = /*#__PURE__*/function (_Component) { _inherits(Timeline, _Component); var _super = _createSuper(Timeline); function Timeline() { _classCallCheck(this, Timeline); return _super.apply(this, arguments); } _createClass(Timeline, [{ key: "getKey", value: function getKey(item, index) { return this.props.dataKey ? ObjectUtils.resolveFieldData(item, this.props.dataKey) : "pr_id__".concat(index); } }, { key: "renderEvents", value: function renderEvents() { var _this = this; return this.props.value && this.props.value.map(function (item, index) { var opposite = ObjectUtils.getJSXElement(_this.props.opposite, item, index); var marker = ObjectUtils.getJSXElement(_this.props.marker, item, index) || /*#__PURE__*/React.createElement("div", { className: "p-timeline-event-marker" }); var connector = index !== _this.props.value.length - 1 && /*#__PURE__*/React.createElement("div", { className: "p-timeline-event-connector" }); var content = ObjectUtils.getJSXElement(_this.props.content, item, index); return /*#__PURE__*/React.createElement("div", { key: _this.getKey(item, index), className: "p-timeline-event" }, /*#__PURE__*/React.createElement("div", { className: "p-timeline-event-opposite" }, opposite), /*#__PURE__*/React.createElement("div", { className: "p-timeline-event-separator" }, marker, connector), /*#__PURE__*/React.createElement("div", { className: "p-timeline-event-content" }, content)); }); } }, { key: "render", value: function render() { var _classNames; var containerClassName = classNames('p-timeline p-component', (_classNames = {}, _defineProperty(_classNames, "p-timeline-".concat(this.props.align), true), _defineProperty(_classNames, "p-timeline-".concat(this.props.layout), true), _classNames), this.props.className); var events = this.renderEvents(); return /*#__PURE__*/React.createElement("div", { id: this.props.id, className: containerClassName, style: this.props.style }, events); } }]); return Timeline; }(Component); _defineProperty(Timeline, "defaultProps", { id: null, value: null, align: 'left', layout: 'vertical', dataKey: null, className: null, style: null, opposite: null, marker: null, content: null }); export { Timeline };
ajax/libs/material-ui/5.0.0-alpha.16/modern/utils/createSvgIcon.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import SvgIcon from '../SvgIcon'; /** * Private module reserved for @material-ui packages. */ export default function createSvgIcon(path, displayName) { const Component = (props, ref) => /*#__PURE__*/React.createElement(SvgIcon, _extends({ "data-testid": `${displayName}Icon`, ref: ref }, props), path); if (process.env.NODE_ENV !== 'production') { // Need to set `displayName` on the inner component for React.memo. // React prior to 16.14 ignores `displayName` on the wrapper. Component.displayName = `${displayName}Icon`; } Component.muiName = SvgIcon.muiName; return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component)); }
ajax/libs/primereact/7.0.1/accordion/accordion.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { UniqueComponentId, classNames, ObjectUtils, IconUtils } from 'primereact/utils'; import { CSSTransition } from 'primereact/csstransition'; function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var AccordionTab = /*#__PURE__*/function (_Component) { _inherits(AccordionTab, _Component); var _super = _createSuper(AccordionTab); function AccordionTab() { _classCallCheck(this, AccordionTab); return _super.apply(this, arguments); } return AccordionTab; }(Component); _defineProperty(AccordionTab, "defaultProps", { header: null, disabled: false, headerStyle: null, headerClassName: null, headerTemplate: null, contentStyle: null, contentClassName: null }); var Accordion = /*#__PURE__*/function (_Component2) { _inherits(Accordion, _Component2); var _super2 = _createSuper(Accordion); function Accordion(props) { var _this; _classCallCheck(this, Accordion); _this = _super2.call(this, props); var state = { id: _this.props.id }; if (!_this.props.onTabChange) { state = _objectSpread(_objectSpread({}, state), {}, { activeIndex: props.activeIndex }); } _this.state = state; return _this; } _createClass(Accordion, [{ key: "shouldTabRender", value: function shouldTabRender(tab) { return tab && tab.type === AccordionTab; } }, { key: "onTabHeaderClick", value: function onTabHeaderClick(event, tab, index) { if (!tab.props.disabled) { var selected = this.isSelected(index); var newActiveIndex = null; if (this.props.multiple) { var indexes = (this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex) || []; if (selected) indexes = indexes.filter(function (i) { return i !== index; });else indexes = [].concat(_toConsumableArray(indexes), [index]); newActiveIndex = indexes; } else { newActiveIndex = selected ? null : index; } var callback = selected ? this.props.onTabClose : this.props.onTabOpen; if (callback) { callback({ originalEvent: event, index: index }); } if (this.props.onTabChange) { this.props.onTabChange({ originalEvent: event, index: newActiveIndex }); } else { this.setState({ activeIndex: newActiveIndex }); } } event.preventDefault(); } }, { key: "isSelected", value: function isSelected(index) { var activeIndex = this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex; return this.props.multiple ? activeIndex && activeIndex.indexOf(index) >= 0 : activeIndex === index; } }, { key: "componentDidMount", value: function componentDidMount() { if (!this.state.id) { this.setState({ id: UniqueComponentId() }); } } }, { key: "renderTabHeader", value: function renderTabHeader(tab, selected, index) { var _this2 = this; var tabHeaderClass = classNames('p-accordion-header', { 'p-highlight': selected, 'p-disabled': tab.props.disabled }, tab.props.headerClassName); var id = this.state.id + '_header_' + index; var ariaControls = this.state.id + '_content_' + index; var tabIndex = tab.props.disabled ? -1 : null; var header = tab.props.headerTemplate ? ObjectUtils.getJSXElement(tab.props.headerTemplate, tab.props) : /*#__PURE__*/React.createElement("span", { className: "p-accordion-header-text" }, tab.props.header); var icon = selected ? this.props.collapseIcon : this.props.expandIcon; return /*#__PURE__*/React.createElement("div", { className: tabHeaderClass, style: tab.props.headerStyle }, /*#__PURE__*/React.createElement("a", { href: '#' + ariaControls, id: id, className: "p-accordion-header-link", "aria-controls": ariaControls, role: "tab", "aria-expanded": selected, onClick: function onClick(event) { return _this2.onTabHeaderClick(event, tab, index); }, tabIndex: tabIndex }, IconUtils.getJSXIcon(icon, { className: 'p-accordion-toggle-icon' }, { props: this.props, selected: selected }), header)); } }, { key: "renderTabContent", value: function renderTabContent(tab, selected, index) { var className = classNames('p-toggleable-content', tab.props.contentClassName); var id = this.state.id + '_content_' + index; var toggleableContentRef = /*#__PURE__*/React.createRef(); return /*#__PURE__*/React.createElement(CSSTransition, { nodeRef: toggleableContentRef, classNames: "p-toggleable-content", timeout: { enter: 1000, exit: 450 }, in: selected, unmountOnExit: true, options: this.props.transitionOptions }, /*#__PURE__*/React.createElement("div", { ref: toggleableContentRef, id: id, className: className, style: tab.props.contentStyle, role: "region", "aria-labelledby": this.state.id + '_header_' + index }, /*#__PURE__*/React.createElement("div", { className: "p-accordion-content" }, tab.props.children))); } }, { key: "renderTab", value: function renderTab(tab, index) { var selected = this.isSelected(index); var tabHeader = this.renderTabHeader(tab, selected, index); var tabContent = this.renderTabContent(tab, selected, index); var tabClassName = classNames('p-accordion-tab', { 'p-accordion-tab-active': selected }); return /*#__PURE__*/React.createElement("div", { key: tab.props.header, className: tabClassName }, tabHeader, tabContent); } }, { key: "renderTabs", value: function renderTabs() { var _this3 = this; return React.Children.map(this.props.children, function (tab, index) { if (_this3.shouldTabRender(tab)) { return _this3.renderTab(tab, index); } }); } }, { key: "render", value: function render() { var _this4 = this; var className = classNames('p-accordion p-component', this.props.className); var tabs = this.renderTabs(); return /*#__PURE__*/React.createElement("div", { ref: function ref(el) { return _this4.container = el; }, id: this.state.id, className: className, style: this.props.style }, tabs); } }]); return Accordion; }(Component); _defineProperty(Accordion, "defaultProps", { id: null, activeIndex: null, className: null, style: null, multiple: false, expandIcon: 'pi pi-chevron-right', collapseIcon: 'pi pi-chevron-down', transitionOptions: null, onTabOpen: null, onTabClose: null, onTabChange: null }); export { Accordion, AccordionTab };
ajax/libs/material-ui/4.9.3/es/GridListTile/GridListTile.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import debounce from '../utils/debounce'; import withStyles from '../styles/withStyles'; import isMuiElement from '../utils/isMuiElement'; export const styles = { /* Styles applied to the root element. */ root: { boxSizing: 'border-box', flexShrink: 0 }, /* Styles applied to the `div` element that wraps the children. */ tile: { position: 'relative', display: 'block', // In case it's not rendered with a div. height: '100%', overflow: 'hidden' }, /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */ imgFullHeight: { height: '100%', transform: 'translateX(-50%)', position: 'relative', left: '50%' }, /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */ imgFullWidth: { width: '100%', position: 'relative', transform: 'translateY(-50%)', top: '50%' } }; const fit = (imgEl, classes) => { if (!imgEl || !imgEl.complete) { return; } if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) { imgEl.classList.remove(...classes.imgFullWidth.split(' ')); imgEl.classList.add(...classes.imgFullHeight.split(' ')); } else { imgEl.classList.remove(...classes.imgFullHeight.split(' ')); imgEl.classList.add(...classes.imgFullWidth.split(' ')); } }; function ensureImageCover(imgEl, classes) { if (!imgEl) { return; } if (imgEl.complete) { fit(imgEl, classes); } else { imgEl.addEventListener('load', () => { fit(imgEl, classes); }); } } const GridListTile = React.forwardRef(function GridListTile(props, ref) { // cols rows default values are for docs only const { children, classes, className, // eslint-disable-next-line no-unused-vars cols = 1, component: Component = 'li', // eslint-disable-next-line no-unused-vars rows = 1 } = props, other = _objectWithoutPropertiesLoose(props, ["children", "classes", "className", "cols", "component", "rows"]); const imgRef = React.useRef(null); React.useEffect(() => { ensureImageCover(imgRef.current, classes); }); React.useEffect(() => { const handleResize = debounce(() => { fit(imgRef.current, classes); }); window.addEventListener('resize', handleResize); return () => { handleResize.clear(); window.removeEventListener('resize', handleResize); }; }, [classes]); return React.createElement(Component, _extends({ className: clsx(classes.root, className), ref: ref }, other), React.createElement("div", { className: classes.tile }, React.Children.map(children, child => { if (!React.isValidElement(child)) { return null; } if (child.type === 'img' || isMuiElement(child, ['Image'])) { return React.cloneElement(child, { ref: imgRef }); } return child; }))); }); process.env.NODE_ENV !== "production" ? GridListTile.propTypes = { /** * Theoretically you can pass any node as children, but the main use case is to pass an img, * in which case GridListTile takes care of making the image "cover" available space * (similar to `background-size: cover` or to `object-fit: cover`). */ children: PropTypes.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * Width of the tile in number of grid cells. */ cols: PropTypes.number, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: PropTypes.elementType, /** * Height of the tile in number of grid cells. */ rows: PropTypes.number } : void 0; export default withStyles(styles, { name: 'MuiGridListTile' })(GridListTile);
ajax/libs/material-ui/4.9.3/esm/RadioGroup/RadioGroupContext.js
cdnjs/cdnjs
import React from 'react'; /** * @ignore - internal component. */ var RadioGroupContext = React.createContext(); if (process.env.NODE_ENV !== 'production') { RadioGroupContext.displayName = 'RadioGroupContext'; } export default RadioGroupContext;
ajax/libs/material-ui/4.9.2/esm/withWidth/withWidth.js
cdnjs/cdnjs
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import { getDisplayName } from '@material-ui/utils'; import { getThemeProps } from '@material-ui/styles'; import hoistNonReactStatics from 'hoist-non-react-statics'; import useTheme from '../styles/useTheme'; import { keys as breakpointKeys } from '../styles/createBreakpoints'; import useMediaQuery from '../useMediaQuery'; // By default, returns true if screen width is the same or greater than the given breakpoint. export var isWidthUp = function isWidthUp(breakpoint, width) { var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; if (inclusive) { return breakpointKeys.indexOf(breakpoint) <= breakpointKeys.indexOf(width); } return breakpointKeys.indexOf(breakpoint) < breakpointKeys.indexOf(width); }; // By default, returns true if screen width is the same or less than the given breakpoint. export var isWidthDown = function isWidthDown(breakpoint, width) { var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; if (inclusive) { return breakpointKeys.indexOf(width) <= breakpointKeys.indexOf(breakpoint); } return breakpointKeys.indexOf(width) < breakpointKeys.indexOf(breakpoint); }; var useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect; var withWidth = function withWidth() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return function (Component) { var _options$withTheme = options.withTheme, withThemeOption = _options$withTheme === void 0 ? false : _options$withTheme, _options$noSSR = options.noSSR, noSSR = _options$noSSR === void 0 ? false : _options$noSSR, initialWidthOption = options.initialWidth; function WithWidth(props) { var contextTheme = useTheme(); var theme = props.theme || contextTheme; var _getThemeProps = getThemeProps({ theme: theme, name: 'MuiWithWidth', props: _extends({}, props) }), initialWidth = _getThemeProps.initialWidth, width = _getThemeProps.width, other = _objectWithoutProperties(_getThemeProps, ["initialWidth", "width"]); var _React$useState = React.useState(false), mountedState = _React$useState[0], setMountedState = _React$useState[1]; useEnhancedEffect(function () { setMountedState(true); }, []); /** * innerWidth |xs sm md lg xl * |-------|-------|-------|-------|------> * width | xs | sm | md | lg | xl */ var keys = _toConsumableArray(theme.breakpoints.keys).reverse(); var widthComputed = keys.reduce(function (output, key) { // eslint-disable-next-line react-hooks/rules-of-hooks var matches = useMediaQuery(theme.breakpoints.up(key)); return !output && matches ? key : output; }, null); var more = _extends({ width: width || (mountedState || noSSR ? widthComputed : undefined) || initialWidth || initialWidthOption }, withThemeOption ? { theme: theme } : {}, {}, other); // When rendering the component on the server, // we have no idea about the client browser screen width. // In order to prevent blinks and help the reconciliation of the React tree // we are not rendering the child component. // // An alternative is to use the `initialWidth` property. if (more.width === undefined) { return null; } return React.createElement(Component, more); } process.env.NODE_ENV !== "production" ? WithWidth.propTypes = { /** * As `window.innerWidth` is unavailable on the server, * we default to rendering an empty component during the first mount. * You might want to use an heuristic to approximate * the screen width of the client browser screen width. * * For instance, you could be using the user-agent or the client-hints. * https://caniuse.com/#search=client%20hint */ initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), /** * @ignore */ theme: PropTypes.object, /** * Bypass the width calculation logic. */ width: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']) } : void 0; if (process.env.NODE_ENV !== 'production') { WithWidth.displayName = "WithWidth(".concat(getDisplayName(Component), ")"); } hoistNonReactStatics(WithWidth, Component); return WithWidth; }; }; export default withWidth;
ajax/libs/react-native-web/0.0.0-51f9ab73e/exports/RefreshControl/index.js
cdnjs/cdnjs
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import View from '../View'; import React from 'react'; function RefreshControl(props) { var colors = props.colors, enabled = props.enabled, onRefresh = props.onRefresh, progressBackgroundColor = props.progressBackgroundColor, progressViewOffset = props.progressViewOffset, refreshing = props.refreshing, size = props.size, tintColor = props.tintColor, title = props.title, titleColor = props.titleColor, rest = _objectWithoutPropertiesLoose(props, ["colors", "enabled", "onRefresh", "progressBackgroundColor", "progressViewOffset", "refreshing", "size", "tintColor", "title", "titleColor"]); return ( /*#__PURE__*/ React.createElement(View, rest) ); } export default RefreshControl;
ajax/libs/material-ui/4.9.13/es/utils/createSvgIcon.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import SvgIcon from '../SvgIcon'; /** * Private module reserved for @material-ui/x packages. */ export default function createSvgIcon(path, displayName) { const Component = React.memo(React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(SvgIcon, _extends({ ref: ref }, props), path))); if (process.env.NODE_ENV !== 'production') { Component.displayName = `${displayName}Icon`; } Component.muiName = SvgIcon.muiName; return Component; }
ajax/libs/react-native-web/0.0.0-da3429ed3/exports/RefreshControl/index.js
cdnjs/cdnjs
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import View from '../View'; import React from 'react'; function RefreshControl(props) { var colors = props.colors, enabled = props.enabled, onRefresh = props.onRefresh, progressBackgroundColor = props.progressBackgroundColor, progressViewOffset = props.progressViewOffset, refreshing = props.refreshing, size = props.size, tintColor = props.tintColor, title = props.title, titleColor = props.titleColor, rest = _objectWithoutPropertiesLoose(props, ["colors", "enabled", "onRefresh", "progressBackgroundColor", "progressViewOffset", "refreshing", "size", "tintColor", "title", "titleColor"]); return React.createElement(View, rest); } export default RefreshControl;
ajax/libs/react-native-web/0.12.1/exports/ScrollView/index.js
cdnjs/cdnjs
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import createReactClass from 'create-react-class'; import dismissKeyboard from '../../modules/dismissKeyboard'; import findNodeHandle from '../findNodeHandle'; import invariant from 'fbjs/lib/invariant'; import ScrollResponder from '../../modules/ScrollResponder'; import ScrollViewBase from './ScrollViewBase'; import StyleSheet from '../StyleSheet'; import View from '../View'; import React from 'react'; var emptyObject = {}; /* eslint-disable react/prefer-es6-class */ var ScrollView = createReactClass({ displayName: "ScrollView", mixins: [ScrollResponder.Mixin], getInitialState: function getInitialState() { return this.scrollResponderMixinGetInitialState(); }, flashScrollIndicators: function flashScrollIndicators() { this.scrollResponderFlashScrollIndicators(); }, setNativeProps: function setNativeProps(props) { if (this._scrollViewRef) { this._scrollViewRef.setNativeProps(props); } }, /** * Returns a reference to the underlying scroll responder, which supports * operations like `scrollTo`. All ScrollView-like components should * implement this method so that they can be composed while providing access * to the underlying scroll responder's methods. */ getScrollResponder: function getScrollResponder() { return this; }, getScrollableNode: function getScrollableNode() { return findNodeHandle(this._scrollViewRef); }, getInnerViewNode: function getInnerViewNode() { return findNodeHandle(this._innerViewRef); }, /** * Scrolls to a given x, y offset, either immediately or with a smooth animation. * Syntax: * * scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) * * Note: The weird argument signature is due to the fact that, for historical reasons, * the function also accepts separate arguments as as alternative to the options object. * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. */ scrollTo: function scrollTo(y, x, animated) { if (typeof y === 'number') { console.warn('`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.'); } else { var _ref = y || emptyObject; x = _ref.x; y = _ref.y; animated = _ref.animated; } this.getScrollResponder().scrollResponderScrollTo({ x: x || 0, y: y || 0, animated: animated !== false }); }, /** * If this is a vertical ScrollView scrolls to the bottom. * If this is a horizontal ScrollView scrolls to the right. * * Use `scrollToEnd({ animated: true })` for smooth animated scrolling, * `scrollToEnd({ animated: false })` for immediate scrolling. * If no options are passed, `animated` defaults to true. */ scrollToEnd: function scrollToEnd(options) { // Default to true var animated = (options && options.animated) !== false; var horizontal = this.props.horizontal; var scrollResponder = this.getScrollResponder(); var scrollResponderNode = scrollResponder.scrollResponderGetScrollableNode(); var x = horizontal ? scrollResponderNode.scrollWidth : 0; var y = horizontal ? 0 : scrollResponderNode.scrollHeight; scrollResponder.scrollResponderScrollTo({ x: x, y: y, animated: animated }); }, /** * Deprecated, do not use. */ scrollWithoutAnimationTo: function scrollWithoutAnimationTo(y, x) { if (y === void 0) { y = 0; } if (x === void 0) { x = 0; } console.warn('`scrollWithoutAnimationTo` is deprecated. Use `scrollTo` instead'); this.scrollTo({ x: x, y: y, animated: false }); }, render: function render() { var _this$props = this.props, contentContainerStyle = _this$props.contentContainerStyle, horizontal = _this$props.horizontal, onContentSizeChange = _this$props.onContentSizeChange, refreshControl = _this$props.refreshControl, stickyHeaderIndices = _this$props.stickyHeaderIndices, pagingEnabled = _this$props.pagingEnabled, keyboardDismissMode = _this$props.keyboardDismissMode, onScroll = _this$props.onScroll, other = _objectWithoutPropertiesLoose(_this$props, ["contentContainerStyle", "horizontal", "onContentSizeChange", "refreshControl", "stickyHeaderIndices", "pagingEnabled", "keyboardDismissMode", "onScroll"]); if (process.env.NODE_ENV !== 'production' && this.props.style) { var style = StyleSheet.flatten(this.props.style); var childLayoutProps = ['alignItems', 'justifyContent'].filter(function (prop) { return style && style[prop] !== undefined; }); invariant(childLayoutProps.length === 0, "ScrollView child layout (" + JSON.stringify(childLayoutProps) + ") " + 'must be applied through the contentContainerStyle prop.'); } var contentSizeChangeProps = {}; if (onContentSizeChange) { contentSizeChangeProps = { onLayout: this._handleContentOnLayout }; } var hasStickyHeaderIndices = !horizontal && Array.isArray(stickyHeaderIndices); var children = hasStickyHeaderIndices || pagingEnabled ? React.Children.map(this.props.children, function (child, i) { var isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1; if (child != null && (isSticky || pagingEnabled)) { return React.createElement(View, { style: StyleSheet.compose(isSticky && styles.stickyHeader, pagingEnabled && styles.pagingEnabledChild) }, child); } else { return child; } }) : this.props.children; var contentContainer = React.createElement(View, _extends({}, contentSizeChangeProps, { children: children, collapsable: false, ref: this._setInnerViewRef, style: StyleSheet.compose(horizontal && styles.contentContainerHorizontal, contentContainerStyle) })); var baseStyle = horizontal ? styles.baseHorizontal : styles.baseVertical; var pagingEnabledStyle = horizontal ? styles.pagingEnabledHorizontal : styles.pagingEnabledVertical; var props = _objectSpread({}, other, { style: [baseStyle, pagingEnabled && pagingEnabledStyle, this.props.style], onTouchStart: this.scrollResponderHandleTouchStart, onTouchMove: this.scrollResponderHandleTouchMove, onTouchEnd: this.scrollResponderHandleTouchEnd, onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag, onScrollEndDrag: this.scrollResponderHandleScrollEndDrag, onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin, onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd, onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder, onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture, onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder, onScroll: this._handleScroll, onResponderGrant: this.scrollResponderHandleResponderGrant, onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest, onResponderTerminate: this.scrollResponderHandleTerminate, onResponderRelease: this.scrollResponderHandleResponderRelease, onResponderReject: this.scrollResponderHandleResponderReject }); var ScrollViewClass = ScrollViewBase; invariant(ScrollViewClass !== undefined, 'ScrollViewClass must not be undefined'); if (refreshControl) { return React.cloneElement(refreshControl, { style: props.style }, React.createElement(ScrollViewClass, _extends({}, props, { ref: this._setScrollViewRef, style: baseStyle }), contentContainer)); } return React.createElement(ScrollViewClass, _extends({}, props, { ref: this._setScrollViewRef }), contentContainer); }, _handleContentOnLayout: function _handleContentOnLayout(e) { var _e$nativeEvent$layout = e.nativeEvent.layout, width = _e$nativeEvent$layout.width, height = _e$nativeEvent$layout.height; this.props.onContentSizeChange(width, height); }, _handleScroll: function _handleScroll(e) { if (process.env.NODE_ENV !== 'production') { if (this.props.onScroll && this.props.scrollEventThrottle == null) { console.log('You specified `onScroll` on a <ScrollView> but not ' + '`scrollEventThrottle`. You will only receive one event. ' + 'Using `16` you get all the events but be aware that it may ' + "cause frame drops, use a bigger number if you don't need as " + 'much precision.'); } } if (this.props.keyboardDismissMode === 'on-drag') { dismissKeyboard(); } this.scrollResponderHandleScroll(e); }, _setInnerViewRef: function _setInnerViewRef(component) { this._innerViewRef = component; }, _setScrollViewRef: function _setScrollViewRef(component) { this._scrollViewRef = component; } }); var commonStyle = { flexGrow: 1, flexShrink: 1, // Enable hardware compositing in modern browsers. // Creates a new layer with its own backing surface that can significantly // improve scroll performance. transform: [{ translateZ: 0 }], // iOS native scrolling WebkitOverflowScrolling: 'touch' }; var styles = StyleSheet.create({ baseVertical: _objectSpread({}, commonStyle, { flexDirection: 'column', overflowX: 'hidden', overflowY: 'auto' }), baseHorizontal: _objectSpread({}, commonStyle, { flexDirection: 'row', overflowX: 'auto', overflowY: 'hidden' }), contentContainerHorizontal: { flexDirection: 'row' }, stickyHeader: { position: 'sticky', top: 0, zIndex: 10 }, pagingEnabledHorizontal: { scrollSnapType: 'x mandatory' }, pagingEnabledVertical: { scrollSnapType: 'y mandatory' }, pagingEnabledChild: { scrollSnapAlign: 'start' } }); export default ScrollView;
ajax/libs/material-ui/4.9.2/es/SwipeableDrawer/SwipeableDrawer.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import { elementTypeAcceptingRef } from '@material-ui/utils'; import Drawer, { getAnchor, isHorizontal } from '../Drawer/Drawer'; import ownerDocument from '../utils/ownerDocument'; import useEventCallback from '../utils/useEventCallback'; import { duration } from '../styles/transitions'; import useTheme from '../styles/useTheme'; import { getTransitionProps } from '../transitions/utils'; import NoSsr from '../NoSsr'; import SwipeArea from './SwipeArea'; // This value is closed to what browsers are using internally to // trigger a native scroll. const UNCERTAINTY_THRESHOLD = 3; // px // We can only have one node at the time claiming ownership for handling the swipe. // Otherwise, the UX would be confusing. // That's why we use a singleton here. let nodeThatClaimedTheSwipe = null; // Exported for test purposes. export function reset() { nodeThatClaimedTheSwipe = null; } function calculateCurrentX(anchor, touches) { return anchor === 'right' ? document.body.offsetWidth - touches[0].pageX : touches[0].pageX; } function calculateCurrentY(anchor, touches) { return anchor === 'bottom' ? window.innerHeight - touches[0].clientY : touches[0].clientY; } function getMaxTranslate(horizontalSwipe, paperInstance) { return horizontalSwipe ? paperInstance.clientWidth : paperInstance.clientHeight; } function getTranslate(currentTranslate, startLocation, open, maxTranslate) { return Math.min(Math.max(open ? startLocation - currentTranslate : maxTranslate + startLocation - currentTranslate, 0), maxTranslate); } function getDomTreeShapes(element, rootNode) { // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L129 let domTreeShapes = []; while (element && element !== rootNode) { const style = window.getComputedStyle(element); if ( // Ignore the scroll children if the element is absolute positioned. style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden style.getPropertyValue('overflow-x') === 'hidden') { domTreeShapes = []; } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) { // Ignore the nodes that have no width. // Keep elements with a scroll domTreeShapes.push(element); } element = element.parentElement; } return domTreeShapes; } function findNativeHandler({ domTreeShapes, start, current, anchor }) { // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L175 const axisProperties = { scrollPosition: { x: 'scrollLeft', y: 'scrollTop' }, scrollLength: { x: 'scrollWidth', y: 'scrollHeight' }, clientLength: { x: 'clientWidth', y: 'clientHeight' } }; return domTreeShapes.some(shape => { // Determine if we are going backward or forward. let goingForward = current >= start; if (anchor === 'top' || anchor === 'left') { goingForward = !goingForward; } const axis = anchor === 'left' || anchor === 'right' ? 'x' : 'y'; const scrollPosition = shape[axisProperties.scrollPosition[axis]]; const areNotAtStart = scrollPosition > 0; const areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]]; if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) { return shape; } return null; }); } const disableSwipeToOpenDefault = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent); const transitionDurationDefault = { enter: duration.enteringScreen, exit: duration.leavingScreen }; const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect; const SwipeableDrawer = React.forwardRef(function SwipeableDrawer(props, ref) { const { anchor = 'left', disableBackdropTransition = false, disableDiscovery = false, disableSwipeToOpen = disableSwipeToOpenDefault, hideBackdrop, hysteresis = 0.52, minFlingVelocity = 450, ModalProps: { BackdropProps } = {}, onClose, onOpen, open, PaperProps = {}, SwipeAreaProps, swipeAreaWidth = 20, transitionDuration = transitionDurationDefault, variant = 'temporary' } = props, ModalPropsProp = _objectWithoutPropertiesLoose(props.ModalProps, ["BackdropProps"]), other = _objectWithoutPropertiesLoose(props, ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"]); const theme = useTheme(); const [maybeSwiping, setMaybeSwiping] = React.useState(false); const swipeInstance = React.useRef({ isSwiping: null }); const swipeAreaRef = React.useRef(); const backdropRef = React.useRef(); const paperRef = React.useRef(); const touchDetected = React.useRef(false); // Ref for transition duration based on / to match swipe speed const calculatedDurationRef = React.useRef(); // Use a ref so the open value used is always up to date inside useCallback. useEnhancedEffect(() => { calculatedDurationRef.current = null; }, [open]); const setPosition = React.useCallback((translate, options = {}) => { const { mode = null, changeTransition = true } = options; const anchorRtl = getAnchor(theme, anchor); const rtlTranslateMultiplier = ['right', 'bottom'].indexOf(anchorRtl) !== -1 ? 1 : -1; const horizontalSwipe = isHorizontal(anchor); const transform = horizontalSwipe ? `translate(${rtlTranslateMultiplier * translate}px, 0)` : `translate(0, ${rtlTranslateMultiplier * translate}px)`; const drawerStyle = paperRef.current.style; drawerStyle.webkitTransform = transform; drawerStyle.transform = transform; let transition = ''; if (mode) { transition = theme.transitions.create('all', getTransitionProps({ timeout: transitionDuration }, { mode })); } if (changeTransition) { drawerStyle.webkitTransition = transition; drawerStyle.transition = transition; } if (!disableBackdropTransition && !hideBackdrop) { const backdropStyle = backdropRef.current.style; backdropStyle.opacity = 1 - translate / getMaxTranslate(horizontalSwipe, paperRef.current); if (changeTransition) { backdropStyle.webkitTransition = transition; backdropStyle.transition = transition; } } }, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]); const handleBodyTouchEnd = useEventCallback(event => { if (!touchDetected.current) { return; } nodeThatClaimedTheSwipe = null; touchDetected.current = false; setMaybeSwiping(false); // The swipe wasn't started. if (!swipeInstance.current.isSwiping) { swipeInstance.current.isSwiping = null; return; } swipeInstance.current.isSwiping = null; const anchorRtl = getAnchor(theme, anchor); const horizontal = isHorizontal(anchor); let current; if (horizontal) { current = calculateCurrentX(anchorRtl, event.changedTouches); } else { current = calculateCurrentY(anchorRtl, event.changedTouches); } const startLocation = horizontal ? swipeInstance.current.startX : swipeInstance.current.startY; const maxTranslate = getMaxTranslate(horizontal, paperRef.current); const currentTranslate = getTranslate(current, startLocation, open, maxTranslate); const translateRatio = currentTranslate / maxTranslate; if (Math.abs(swipeInstance.current.velocity) > minFlingVelocity) { // Calculate transition duration to match swipe speed calculatedDurationRef.current = Math.abs((maxTranslate - currentTranslate) / swipeInstance.current.velocity) * 1000; } if (open) { if (swipeInstance.current.velocity > minFlingVelocity || translateRatio > hysteresis) { onClose(); } else { // Reset the position, the swipe was aborted. setPosition(0, { mode: 'exit' }); } return; } if (swipeInstance.current.velocity < -minFlingVelocity || 1 - translateRatio > hysteresis) { onOpen(); } else { // Reset the position, the swipe was aborted. setPosition(getMaxTranslate(horizontal, paperRef.current), { mode: 'enter' }); } }); const handleBodyTouchMove = useEventCallback(event => { // the ref may be null when a parent component updates while swiping if (!paperRef.current || !touchDetected.current) { return; } // We are not supposed to handle this touch move because the swipe was started in a scrollable container in the drawer if (nodeThatClaimedTheSwipe != null && nodeThatClaimedTheSwipe !== swipeInstance.current) { return; } const anchorRtl = getAnchor(theme, anchor); const horizontalSwipe = isHorizontal(anchor); const currentX = calculateCurrentX(anchorRtl, event.touches); const currentY = calculateCurrentY(anchorRtl, event.touches); if (open && paperRef.current.contains(event.target) && nodeThatClaimedTheSwipe == null) { const domTreeShapes = getDomTreeShapes(event.target, paperRef.current); const nativeHandler = findNativeHandler({ domTreeShapes, start: horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY, current: horizontalSwipe ? currentX : currentY, anchor }); if (nativeHandler) { nodeThatClaimedTheSwipe = nativeHandler; return; } nodeThatClaimedTheSwipe = swipeInstance.current; } // We don't know yet. if (swipeInstance.current.isSwiping == null) { const dx = Math.abs(currentX - swipeInstance.current.startX); const dy = Math.abs(currentY - swipeInstance.current.startY); // We are likely to be swiping, let's prevent the scroll event on iOS. if (dx > dy) { if (event.cancelable) { event.preventDefault(); } } const definitelySwiping = horizontalSwipe ? dx > dy && dx > UNCERTAINTY_THRESHOLD : dy > dx && dy > UNCERTAINTY_THRESHOLD; if (definitelySwiping === true || (horizontalSwipe ? dy > UNCERTAINTY_THRESHOLD : dx > UNCERTAINTY_THRESHOLD)) { swipeInstance.current.isSwiping = definitelySwiping; if (!definitelySwiping) { handleBodyTouchEnd(event); return; } // Shift the starting point. swipeInstance.current.startX = currentX; swipeInstance.current.startY = currentY; // Compensate for the part of the drawer displayed on touch start. if (!disableDiscovery && !open) { if (horizontalSwipe) { swipeInstance.current.startX -= swipeAreaWidth; } else { swipeInstance.current.startY -= swipeAreaWidth; } } } } if (!swipeInstance.current.isSwiping) { return; } const maxTranslate = getMaxTranslate(horizontalSwipe, paperRef.current); let startLocation = horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY; if (open && !swipeInstance.current.paperHit) { startLocation = Math.min(startLocation, maxTranslate); } const translate = getTranslate(horizontalSwipe ? currentX : currentY, startLocation, open, maxTranslate); if (open) { if (!swipeInstance.current.paperHit) { const paperHit = horizontalSwipe ? currentX < maxTranslate : currentY < maxTranslate; if (paperHit) { swipeInstance.current.paperHit = true; swipeInstance.current.startX = currentX; swipeInstance.current.startY = currentY; } else { return; } } else if (translate === 0) { swipeInstance.current.startX = currentX; swipeInstance.current.startY = currentY; } } if (swipeInstance.current.lastTranslate === null) { swipeInstance.current.lastTranslate = translate; swipeInstance.current.lastTime = performance.now() + 1; } const velocity = (translate - swipeInstance.current.lastTranslate) / (performance.now() - swipeInstance.current.lastTime) * 1e3; // Low Pass filter. swipeInstance.current.velocity = swipeInstance.current.velocity * 0.4 + velocity * 0.6; swipeInstance.current.lastTranslate = translate; swipeInstance.current.lastTime = performance.now(); // We are swiping, let's prevent the scroll event on iOS. if (event.cancelable) { event.preventDefault(); } setPosition(translate); }); const handleBodyTouchStart = useEventCallback(event => { // We are not supposed to handle this touch move. // Example of use case: ignore the event if there is a Slider. if (event.defaultPrevented) { return; } // We can only have one node at the time claiming ownership for handling the swipe. if (event.muiHandled) { return; } // At least one element clogs the drawer interaction zone. if (open && !backdropRef.current.contains(event.target) && !paperRef.current.contains(event.target)) { return; } const anchorRtl = getAnchor(theme, anchor); const horizontalSwipe = isHorizontal(anchor); const currentX = calculateCurrentX(anchorRtl, event.touches); const currentY = calculateCurrentY(anchorRtl, event.touches); if (!open) { if (disableSwipeToOpen || event.target !== swipeAreaRef.current) { return; } if (horizontalSwipe) { if (currentX > swipeAreaWidth) { return; } } else if (currentY > swipeAreaWidth) { return; } } event.muiHandled = true; nodeThatClaimedTheSwipe = null; swipeInstance.current.startX = currentX; swipeInstance.current.startY = currentY; setMaybeSwiping(true); if (!open && paperRef.current) { // The ref may be null when a parent component updates while swiping. setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 20 : -swipeAreaWidth), { changeTransition: false }); } swipeInstance.current.velocity = 0; swipeInstance.current.lastTime = null; swipeInstance.current.lastTranslate = null; swipeInstance.current.paperHit = false; touchDetected.current = true; }); React.useEffect(() => { if (variant === 'temporary') { const doc = ownerDocument(paperRef.current); doc.addEventListener('touchstart', handleBodyTouchStart); doc.addEventListener('touchmove', handleBodyTouchMove, { passive: false }); doc.addEventListener('touchend', handleBodyTouchEnd); return () => { doc.removeEventListener('touchstart', handleBodyTouchStart); doc.removeEventListener('touchmove', handleBodyTouchMove, { passive: false }); doc.removeEventListener('touchend', handleBodyTouchEnd); }; } return undefined; }, [variant, handleBodyTouchStart, handleBodyTouchMove, handleBodyTouchEnd]); React.useEffect(() => () => { // We need to release the lock. if (nodeThatClaimedTheSwipe === swipeInstance.current) { nodeThatClaimedTheSwipe = null; } }, []); React.useEffect(() => { if (!open) { setMaybeSwiping(false); } }, [open]); const handleBackdropRef = React.useCallback(instance => { // #StrictMode ready backdropRef.current = ReactDOM.findDOMNode(instance); }, []); const handlePaperRef = React.useCallback(instance => { // #StrictMode ready paperRef.current = ReactDOM.findDOMNode(instance); }, []); return React.createElement(React.Fragment, null, React.createElement(Drawer, _extends({ open: variant === 'temporary' && maybeSwiping ? true : open, variant: variant, ModalProps: _extends({ BackdropProps: _extends({}, BackdropProps, { ref: handleBackdropRef }) }, ModalPropsProp), PaperProps: _extends({}, PaperProps, { style: _extends({ pointerEvents: variant === 'temporary' && !open ? 'none' : '' }, PaperProps.style), ref: handlePaperRef }), anchor: anchor, transitionDuration: calculatedDurationRef.current || transitionDuration, onClose: onClose, ref: ref }, other)), !disableSwipeToOpen && variant === 'temporary' && React.createElement(NoSsr, null, React.createElement(SwipeArea, _extends({ anchor: anchor, ref: swipeAreaRef, width: swipeAreaWidth }, SwipeAreaProps)))); }); process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes = { /** * @ignore */ anchor: PropTypes.oneOf(['left', 'top', 'right', 'bottom']), /** * The content of the component. */ children: PropTypes.node, /** * Disable the backdrop transition. * This can improve the FPS on low-end devices. */ disableBackdropTransition: PropTypes.bool, /** * If `true`, touching the screen near the edge of the drawer will not slide in the drawer a bit * to promote accidental discovery of the swipe gesture. */ disableDiscovery: PropTypes.bool, /** * If `true`, swipe to open is disabled. This is useful in browsers where swiping triggers * navigation actions. Swipe to open is disabled on iOS browsers by default. */ disableSwipeToOpen: PropTypes.bool, /** * @ignore */ hideBackdrop: PropTypes.bool, /** * Affects how far the drawer must be opened/closed to change his state. * Specified as percent (0-1) of the width of the drawer */ hysteresis: PropTypes.number, /** * Defines, from which (average) velocity on, the swipe is * defined as complete although hysteresis isn't reached. * Good threshold is between 250 - 1000 px/s */ minFlingVelocity: PropTypes.number, /** * @ignore */ ModalProps: PropTypes.shape({ BackdropProps: PropTypes.shape({ component: elementTypeAcceptingRef }) }), /** * Callback fired when the component requests to be closed. * * @param {object} event The event source of the callback. */ onClose: PropTypes.func.isRequired, /** * Callback fired when the component requests to be opened. * * @param {object} event The event source of the callback. */ onOpen: PropTypes.func.isRequired, /** * If `true`, the drawer is open. */ open: PropTypes.bool.isRequired, /** * @ignore */ PaperProps: PropTypes.shape({ component: elementTypeAcceptingRef, style: PropTypes.object }), /** * Props applied to the swipe area element. */ SwipeAreaProps: PropTypes.object, /** * The width of the left most (or right most) area in pixels where the * drawer can be swiped open from. */ swipeAreaWidth: PropTypes.number, /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. */ transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({ enter: PropTypes.number, exit: PropTypes.number })]), /** * @ignore */ variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary']) } : void 0; export default SwipeableDrawer;
ajax/libs/react-native-web/0.11.3/exports/CheckBox/index.js
cdnjs/cdnjs
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import applyNativeMethods from '../../modules/applyNativeMethods'; import ColorPropType from '../ColorPropType'; import createElement from '../createElement'; import StyleSheet from '../StyleSheet'; import UIManager from '../UIManager'; import View from '../View'; import ViewPropTypes from '../ViewPropTypes'; import React, { Component } from 'react'; import { bool, func } from 'prop-types'; var CheckBox = /*#__PURE__*/ function (_Component) { _inheritsLoose(CheckBox, _Component); function CheckBox() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _Component.call.apply(_Component, [this].concat(args)) || this; _this._handleChange = function (event) { var _this$props = _this.props, onChange = _this$props.onChange, onValueChange = _this$props.onValueChange; var value = event.nativeEvent.target.checked; event.nativeEvent.value = value; onChange && onChange(event); onValueChange && onValueChange(value); }; _this._setCheckboxRef = function (element) { _this._checkboxElement = element; }; return _this; } var _proto = CheckBox.prototype; _proto.blur = function blur() { UIManager.blur(this._checkboxElement); }; _proto.focus = function focus() { UIManager.focus(this._checkboxElement); }; _proto.render = function render() { var _this$props2 = this.props, color = _this$props2.color, disabled = _this$props2.disabled, onChange = _this$props2.onChange, onValueChange = _this$props2.onValueChange, style = _this$props2.style, value = _this$props2.value, other = _objectWithoutPropertiesLoose(_this$props2, ["color", "disabled", "onChange", "onValueChange", "style", "value"]); var fakeControl = React.createElement(View, { style: [styles.fakeControl, value && styles.fakeControlChecked, // custom color value && color && { backgroundColor: color, borderColor: color }, disabled && styles.fakeControlDisabled, value && disabled && styles.fakeControlCheckedAndDisabled] }); var nativeControl = createElement('input', { checked: value, disabled: disabled, onChange: this._handleChange, ref: this._setCheckboxRef, style: [styles.nativeControl, styles.cursorInherit], type: 'checkbox' }); return React.createElement(View, _extends({}, other, { style: [styles.root, style, disabled && styles.cursorDefault] }), fakeControl, nativeControl); }; return CheckBox; }(Component); CheckBox.displayName = 'CheckBox'; CheckBox.defaultProps = { disabled: false, value: false }; CheckBox.propTypes = process.env.NODE_ENV !== "production" ? _objectSpread({}, ViewPropTypes, { color: ColorPropType, disabled: bool, onChange: func, onValueChange: func, value: bool }) : {}; var styles = StyleSheet.create({ root: { cursor: 'pointer', height: 16, userSelect: 'none', width: 16 }, cursorDefault: { cursor: 'default' }, cursorInherit: { cursor: 'inherit' }, fakeControl: { alignItems: 'center', backgroundColor: '#fff', borderColor: '#657786', borderRadius: 2, borderStyle: 'solid', borderWidth: 2, height: '100%', justifyContent: 'center', width: '100%' }, fakeControlChecked: { backgroundColor: '#009688', backgroundImage: 'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K")', backgroundRepeat: 'no-repeat', borderColor: '#009688' }, fakeControlDisabled: { borderColor: '#CCD6DD' }, fakeControlCheckedAndDisabled: { backgroundColor: '#AAB8C2', borderColor: '#AAB8C2' }, nativeControl: _objectSpread({}, StyleSheet.absoluteFillObject, { height: '100%', margin: 0, opacity: 0, padding: 0, width: '100%' }) }); export default applyNativeMethods(CheckBox);
ajax/libs/material-ui/4.9.2/es/test-utils/RenderMode.js
cdnjs/cdnjs
import React from 'react'; import * as PropTypes from 'prop-types'; const Context = React.createContext(); if (process.env.NODE_ENV !== 'production') { Context.displayName = 'RenderContext'; } /** * @ignore - internal component. */ export function RenderContext({ children }) { return React.createElement(Context.Provider, { value: "render" }, children); } process.env.NODE_ENV !== "production" ? RenderContext.propTypes = { children: PropTypes.node.isRequired } : void 0; export function useIsSsr() { return React.useContext(Context) === 'render'; }
ajax/libs/material-ui/4.9.3/es/Grid/Grid.js
cdnjs/cdnjs
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import _extends from "@babel/runtime/helpers/esm/extends"; // A grid component using the following libs as inspiration. // // For the implementation: // - https://getbootstrap.com/docs/4.3/layout/grid/ // - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css // - https://github.com/roylee0704/react-flexbox-grid // - https://material.angularjs.org/latest/layout/introduction // // Follow this flexbox Guide to better understand the underlying model: // - https://css-tricks.com/snippets/css/a-guide-to-flexbox/ import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import requirePropFactory from '../utils/requirePropFactory'; const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; function generateGrid(globalStyles, theme, breakpoint) { const styles = {}; GRID_SIZES.forEach(size => { const key = `grid-${breakpoint}-${size}`; if (size === true) { // For the auto layouting styles[key] = { flexBasis: 0, flexGrow: 1, maxWidth: '100%' }; return; } if (size === 'auto') { styles[key] = { flexBasis: 'auto', flexGrow: 0, maxWidth: 'none' }; return; } // Keep 7 significant numbers. const width = `${Math.round(size / 12 * 10e7) / 10e5}%`; // Close to the bootstrap implementation: // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41 styles[key] = { flexBasis: width, flexGrow: 0, maxWidth: width }; }); // No need for a media query for the first size. if (breakpoint === 'xs') { _extends(globalStyles, styles); } else { globalStyles[theme.breakpoints.up(breakpoint)] = styles; } } function getOffset(val, div = 1) { const parse = parseFloat(val); return `${parse / div}${String(val).replace(String(parse), '') || 'px'}`; } function generateGutter(theme, breakpoint) { const styles = {}; SPACINGS.forEach(spacing => { const themeSpacing = theme.spacing(spacing); if (themeSpacing === 0) { return; } styles[`spacing-${breakpoint}-${spacing}`] = { margin: `-${getOffset(themeSpacing, 2)}`, width: `calc(100% + ${getOffset(themeSpacing)})`, '& > $item': { padding: getOffset(themeSpacing, 2) } }; }); return styles; } // Default CSS values // flex: '0 1 auto', // flexDirection: 'row', // alignItems: 'flex-start', // flexWrap: 'nowrap', // justifyContent: 'flex-start', export const styles = theme => _extends({ /* Styles applied to the root element */ root: {}, /* Styles applied to the root element if `container={true}`. */ container: { boxSizing: 'border-box', display: 'flex', flexWrap: 'wrap', width: '100%' }, /* Styles applied to the root element if `item={true}`. */ item: { boxSizing: 'border-box', margin: '0' // For instance, it's useful when used with a `figure` element. }, /* Styles applied to the root element if `zeroMinWidth={true}`. */ zeroMinWidth: { minWidth: 0 }, /* Styles applied to the root element if `direction="column"`. */ 'direction-xs-column': { flexDirection: 'column' }, /* Styles applied to the root element if `direction="column-reverse"`. */ 'direction-xs-column-reverse': { flexDirection: 'column-reverse' }, /* Styles applied to the root element if `direction="rwo-reverse"`. */ 'direction-xs-row-reverse': { flexDirection: 'row-reverse' }, /* Styles applied to the root element if `wrap="nowrap"`. */ 'wrap-xs-nowrap': { flexWrap: 'nowrap' }, /* Styles applied to the root element if `wrap="reverse"`. */ 'wrap-xs-wrap-reverse': { flexWrap: 'wrap-reverse' }, /* Styles applied to the root element if `alignItems="center"`. */ 'align-items-xs-center': { alignItems: 'center' }, /* Styles applied to the root element if `alignItems="flex-start"`. */ 'align-items-xs-flex-start': { alignItems: 'flex-start' }, /* Styles applied to the root element if `alignItems="flex-end"`. */ 'align-items-xs-flex-end': { alignItems: 'flex-end' }, /* Styles applied to the root element if `alignItems="baseline"`. */ 'align-items-xs-baseline': { alignItems: 'baseline' }, /* Styles applied to the root element if `alignContent="center"`. */ 'align-content-xs-center': { alignContent: 'center' }, /* Styles applied to the root element if `alignContent="flex-start"`. */ 'align-content-xs-flex-start': { alignContent: 'flex-start' }, /* Styles applied to the root element if `alignContent="flex-end"`. */ 'align-content-xs-flex-end': { alignContent: 'flex-end' }, /* Styles applied to the root element if `alignContent="space-between"`. */ 'align-content-xs-space-between': { alignContent: 'space-between' }, /* Styles applied to the root element if `alignContent="space-around"`. */ 'align-content-xs-space-around': { alignContent: 'space-around' }, /* Styles applied to the root element if `justify="center"`. */ 'justify-xs-center': { justifyContent: 'center' }, /* Styles applied to the root element if `justify="flex-end"`. */ 'justify-xs-flex-end': { justifyContent: 'flex-end' }, /* Styles applied to the root element if `justify="space-between"`. */ 'justify-xs-space-between': { justifyContent: 'space-between' }, /* Styles applied to the root element if `justify="space-around"`. */ 'justify-xs-space-around': { justifyContent: 'space-around' }, /* Styles applied to the root element if `justify="space-evenly"`. */ 'justify-xs-space-evenly': { justifyContent: 'space-evenly' } }, generateGutter(theme, 'xs'), {}, theme.breakpoints.keys.reduce((accumulator, key) => { // Use side effect over immutability for better performance. generateGrid(accumulator, theme, key); return accumulator; }, {})); const Grid = React.forwardRef(function Grid(props, ref) { const { alignContent = 'stretch', alignItems = 'stretch', classes, className: classNameProp, component: Component = 'div', container = false, direction = 'row', item = false, justify = 'flex-start', lg = false, md = false, sm = false, spacing = 0, wrap = 'wrap', xl = false, xs = false, zeroMinWidth = false } = props, other = _objectWithoutPropertiesLoose(props, ["alignContent", "alignItems", "classes", "className", "component", "container", "direction", "item", "justify", "lg", "md", "sm", "spacing", "wrap", "xl", "xs", "zeroMinWidth"]); const className = clsx(classes.root, classNameProp, container && [classes.container, spacing !== 0 && classes[`spacing-xs-${String(spacing)}`]], item && classes.item, zeroMinWidth && classes.zeroMinWidth, direction !== 'row' && classes[`direction-xs-${String(direction)}`], wrap !== 'wrap' && classes[`wrap-xs-${String(wrap)}`], alignItems !== 'stretch' && classes[`align-items-xs-${String(alignItems)}`], alignContent !== 'stretch' && classes[`align-content-xs-${String(alignContent)}`], justify !== 'flex-start' && classes[`justify-xs-${String(justify)}`], xs !== false && classes[`grid-xs-${String(xs)}`], sm !== false && classes[`grid-sm-${String(sm)}`], md !== false && classes[`grid-md-${String(md)}`], lg !== false && classes[`grid-lg-${String(lg)}`], xl !== false && classes[`grid-xl-${String(xl)}`]); return React.createElement(Component, _extends({ className: className, ref: ref }, other)); }); process.env.NODE_ENV !== "production" ? Grid.propTypes = { /** * Defines the `align-content` style property. * It's applied for all screen sizes. */ alignContent: PropTypes.oneOf(['stretch', 'center', 'flex-start', 'flex-end', 'space-between', 'space-around']), /** * Defines the `align-items` style property. * It's applied for all screen sizes. */ alignItems: PropTypes.oneOf(['flex-start', 'center', 'flex-end', 'stretch', 'baseline']), /** * The content of the component. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: PropTypes.elementType, /** * If `true`, the component will have the flex *container* behavior. * You should be wrapping *items* with a *container*. */ container: PropTypes.bool, /** * Defines the `flex-direction` style property. * It is applied for all screen sizes. */ direction: PropTypes.oneOf(['row', 'row-reverse', 'column', 'column-reverse']), /** * If `true`, the component will have the flex *item* behavior. * You should be wrapping *items* with a *container*. */ item: PropTypes.bool, /** * Defines the `justify-content` style property. * It is applied for all screen sizes. */ justify: PropTypes.oneOf(['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly']), /** * Defines the number of grids the component is going to use. * It's applied for the `lg` breakpoint and wider screens if not overridden. */ lg: PropTypes.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), /** * Defines the number of grids the component is going to use. * It's applied for the `md` breakpoint and wider screens if not overridden. */ md: PropTypes.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), /** * Defines the number of grids the component is going to use. * It's applied for the `sm` breakpoint and wider screens if not overridden. */ sm: PropTypes.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), /** * Defines the space between the type `item` component. * It can only be used on a type `container` component. */ spacing: PropTypes.oneOf(SPACINGS), /** * Defines the `flex-wrap` style property. * It's applied for all screen sizes. */ wrap: PropTypes.oneOf(['nowrap', 'wrap', 'wrap-reverse']), /** * Defines the number of grids the component is going to use. * It's applied for the `xl` breakpoint and wider screens. */ xl: PropTypes.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), /** * Defines the number of grids the component is going to use. * It's applied for all the screen sizes with the lowest priority. */ xs: PropTypes.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), /** * If `true`, it sets `min-width: 0` on the item. * Refer to the limitations section of the documentation to better understand the use case. */ zeroMinWidth: PropTypes.bool } : void 0; const StyledGrid = withStyles(styles, { name: 'MuiGrid' })(Grid); if (process.env.NODE_ENV !== 'production') { const requireProp = requirePropFactory('Grid'); StyledGrid.propTypes = _extends({}, StyledGrid.propTypes, { alignContent: requireProp('container'), alignItems: requireProp('container'), direction: requireProp('container'), justify: requireProp('container'), lg: requireProp('item'), md: requireProp('item'), sm: requireProp('item'), spacing: requireProp('container'), wrap: requireProp('container'), xs: requireProp('item'), zeroMinWidth: requireProp('item') }); } export default StyledGrid;
ajax/libs/react-native-web/0.12.2/modules/UnimplementedView/index.js
cdnjs/cdnjs
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import View from '../../exports/View'; import React from 'react'; /** * Common implementation for a simple stubbed view. */ var UnimplementedView = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(UnimplementedView, _React$Component); function UnimplementedView() { return _React$Component.apply(this, arguments) || this; } var _proto = UnimplementedView.prototype; _proto.setNativeProps = function setNativeProps() {// Do nothing. // This method is required in order to use this view as a Touchable* child. // See ensureComponentIsNative.js for more info }; _proto.render = function render() { return React.createElement(View, { style: [unimplementedViewStyles, this.props.style] }, this.props.children); }; return UnimplementedView; }(React.Component); var unimplementedViewStyles = process.env.NODE_ENV !== 'production' ? { alignSelf: 'flex-start', borderColor: 'red', borderWidth: 1 } : {}; export default UnimplementedView;
ajax/libs/material-ui/4.9.4/esm/Tooltip/Tooltip.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { elementAcceptingRef } from '@material-ui/utils'; import { fade } from '../styles/colorManipulator'; import withStyles from '../styles/withStyles'; import capitalize from '../utils/capitalize'; import Grow from '../Grow'; import Popper from '../Popper'; import useForkRef from '../utils/useForkRef'; import setRef from '../utils/setRef'; import { useIsFocusVisible } from '../utils/focusVisible'; import useControlled from '../utils/useControlled'; import useTheme from '../styles/useTheme'; function round(value) { return Math.round(value * 1e5) / 1e5; } function arrowGenerator() { return { '&[x-placement*="bottom"] $arrow': { flip: false, top: 0, left: 0, marginTop: '-0.95em', marginLeft: 4, marginRight: 4, width: '2em', height: '1em', '&::before': { flip: false, borderWidth: '0 1em 1em 1em', borderColor: 'transparent transparent currentcolor transparent' } }, '&[x-placement*="top"] $arrow': { flip: false, bottom: 0, left: 0, marginBottom: '-0.95em', marginLeft: 4, marginRight: 4, width: '2em', height: '1em', '&::before': { flip: false, borderWidth: '1em 1em 0 1em', borderColor: 'currentcolor transparent transparent transparent' } }, '&[x-placement*="right"] $arrow': { flip: false, left: 0, marginLeft: '-0.95em', marginTop: 4, marginBottom: 4, height: '2em', width: '1em', '&::before': { flip: false, borderWidth: '1em 1em 1em 0', borderColor: 'transparent currentcolor transparent transparent' } }, '&[x-placement*="left"] $arrow': { flip: false, right: 0, marginRight: '-0.95em', marginTop: 4, marginBottom: 4, height: '2em', width: '1em', '&::before': { flip: false, borderWidth: '1em 0 1em 1em', borderColor: 'transparent transparent transparent currentcolor' } } }; } export var styles = function styles(theme) { return { /* Styles applied to the Popper component. */ popper: { zIndex: theme.zIndex.tooltip, pointerEvents: 'none', flip: false // disable jss-rtl plugin }, /* Styles applied to the Popper component if `interactive={true}`. */ popperInteractive: { pointerEvents: 'auto' }, /* Styles applied to the Popper component if `arrow={true}`. */ popperArrow: arrowGenerator(), /* Styles applied to the tooltip (label wrapper) element. */ tooltip: { backgroundColor: fade(theme.palette.grey[700], 0.9), borderRadius: theme.shape.borderRadius, color: theme.palette.common.white, fontFamily: theme.typography.fontFamily, padding: '4px 8px', fontSize: theme.typography.pxToRem(10), lineHeight: "".concat(round(14 / 10), "em"), maxWidth: 300, wordWrap: 'break-word', fontWeight: theme.typography.fontWeightMedium }, /* Styles applied to the tooltip (label wrapper) element if `arrow={true}`. */ tooltipArrow: { position: 'relative', margin: '0' }, /* Styles applied to the arrow element. */ arrow: { position: 'absolute', fontSize: 6, color: fade(theme.palette.grey[700], 0.9), '&::before': { content: '""', margin: 'auto', display: 'block', width: 0, height: 0, borderStyle: 'solid' } }, /* Styles applied to the tooltip (label wrapper) element if the tooltip is opened by touch. */ touch: { padding: '8px 16px', fontSize: theme.typography.pxToRem(14), lineHeight: "".concat(round(16 / 14), "em"), fontWeight: theme.typography.fontWeightRegular }, /* Styles applied to the tooltip (label wrapper) element if `placement` contains "left". */ tooltipPlacementLeft: _defineProperty({ transformOrigin: 'right center', margin: '0 24px ' }, theme.breakpoints.up('sm'), { margin: '0 14px' }), /* Styles applied to the tooltip (label wrapper) element if `placement` contains "right". */ tooltipPlacementRight: _defineProperty({ transformOrigin: 'left center', margin: '0 24px' }, theme.breakpoints.up('sm'), { margin: '0 14px' }), /* Styles applied to the tooltip (label wrapper) element if `placement` contains "top". */ tooltipPlacementTop: _defineProperty({ transformOrigin: 'center bottom', margin: '24px 0' }, theme.breakpoints.up('sm'), { margin: '14px 0' }), /* Styles applied to the tooltip (label wrapper) element if `placement` contains "bottom". */ tooltipPlacementBottom: _defineProperty({ transformOrigin: 'center top', margin: '24px 0' }, theme.breakpoints.up('sm'), { margin: '14px 0' }) }; }; var hystersisOpen = false; var hystersisTimer = null; export function testReset() { hystersisOpen = false; clearTimeout(hystersisTimer); } var Tooltip = React.forwardRef(function Tooltip(props, ref) { var _props$arrow = props.arrow, arrow = _props$arrow === void 0 ? false : _props$arrow, children = props.children, classes = props.classes, _props$disableFocusLi = props.disableFocusListener, disableFocusListener = _props$disableFocusLi === void 0 ? false : _props$disableFocusLi, _props$disableHoverLi = props.disableHoverListener, disableHoverListener = _props$disableHoverLi === void 0 ? false : _props$disableHoverLi, _props$disableTouchLi = props.disableTouchListener, disableTouchListener = _props$disableTouchLi === void 0 ? false : _props$disableTouchLi, _props$enterDelay = props.enterDelay, enterDelay = _props$enterDelay === void 0 ? 200 : _props$enterDelay, _props$enterNextDelay = props.enterNextDelay, enterNextDelay = _props$enterNextDelay === void 0 ? 0 : _props$enterNextDelay, _props$enterTouchDela = props.enterTouchDelay, enterTouchDelay = _props$enterTouchDela === void 0 ? 700 : _props$enterTouchDela, idProp = props.id, _props$interactive = props.interactive, interactive = _props$interactive === void 0 ? false : _props$interactive, _props$leaveDelay = props.leaveDelay, leaveDelay = _props$leaveDelay === void 0 ? 0 : _props$leaveDelay, _props$leaveTouchDela = props.leaveTouchDelay, leaveTouchDelay = _props$leaveTouchDela === void 0 ? 1500 : _props$leaveTouchDela, onClose = props.onClose, onOpen = props.onOpen, openProp = props.open, _props$placement = props.placement, placement = _props$placement === void 0 ? 'bottom' : _props$placement, PopperProps = props.PopperProps, title = props.title, _props$TransitionComp = props.TransitionComponent, TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp, TransitionProps = props.TransitionProps, other = _objectWithoutProperties(props, ["arrow", "children", "classes", "disableFocusListener", "disableHoverListener", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "id", "interactive", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperProps", "title", "TransitionComponent", "TransitionProps"]); var theme = useTheme(); var _React$useState = React.useState(), childNode = _React$useState[0], setChildNode = _React$useState[1]; var _React$useState2 = React.useState(null), arrowRef = _React$useState2[0], setArrowRef = _React$useState2[1]; var ignoreNonTouchEvents = React.useRef(false); var closeTimer = React.useRef(); var enterTimer = React.useRef(); var leaveTimer = React.useRef(); var touchTimer = React.useRef(); var _useControlled = useControlled({ controlled: openProp, default: false, name: 'Tooltip' }), _useControlled2 = _slicedToArray(_useControlled, 2), openState = _useControlled2[0], setOpenState = _useControlled2[1]; var open = openState; if (process.env.NODE_ENV !== 'production') { // eslint-disable-next-line react-hooks/rules-of-hooks var _React$useRef = React.useRef(openProp !== undefined), isControlled = _React$useRef.current; // eslint-disable-next-line react-hooks/rules-of-hooks React.useEffect(function () { if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') { console.error(['Material-UI: you are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n')); } }, [title, childNode, isControlled]); } var _React$useState3 = React.useState(), defaultId = _React$useState3[0], setDefaultId = _React$useState3[1]; var id = idProp || defaultId; React.useEffect(function () { if (!open || defaultId) { return; } // Fallback to this default id when possible. // Use the random value for client-side rendering only. // We can't use it server-side. setDefaultId("mui-tooltip-".concat(Math.round(Math.random() * 1e5))); }, [open, defaultId]); React.useEffect(function () { return function () { clearTimeout(closeTimer.current); clearTimeout(enterTimer.current); clearTimeout(leaveTimer.current); clearTimeout(touchTimer.current); }; }, []); var handleOpen = function handleOpen(event) { clearTimeout(hystersisTimer); hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip. // We can skip rerendering when the tooltip is already open. // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue. setOpenState(true); if (onOpen) { onOpen(event); } }; var handleEnter = function handleEnter(event) { var childrenProps = children.props; if (event.type === 'mouseover' && childrenProps.onMouseOver && event.currentTarget === childNode) { childrenProps.onMouseOver(event); } if (ignoreNonTouchEvents.current && event.type !== 'touchstart') { return; } // Remove the title ahead of time. // We don't want to wait for the next render commit. // We would risk displaying two tooltips at the same time (native + this one). if (childNode) { childNode.removeAttribute('title'); } clearTimeout(enterTimer.current); clearTimeout(leaveTimer.current); if (enterDelay || hystersisOpen && enterNextDelay) { event.persist(); enterTimer.current = setTimeout(function () { handleOpen(event); }, hystersisOpen ? enterNextDelay : enterDelay); } else { handleOpen(event); } }; var _useIsFocusVisible = useIsFocusVisible(), isFocusVisible = _useIsFocusVisible.isFocusVisible, onBlurVisible = _useIsFocusVisible.onBlurVisible, focusVisibleRef = _useIsFocusVisible.ref; var _React$useState4 = React.useState(false), childIsFocusVisible = _React$useState4[0], setChildIsFocusVisible = _React$useState4[1]; var handleBlur = function handleBlur() { if (childIsFocusVisible) { setChildIsFocusVisible(false); onBlurVisible(); } }; var handleFocus = function handleFocus(event) { // Workaround for https://github.com/facebook/react/issues/7769 // The autoFocus of React might trigger the event before the componentDidMount. // We need to account for this eventuality. if (!childNode) { setChildNode(event.currentTarget); } if (isFocusVisible(event)) { setChildIsFocusVisible(true); handleEnter(event); } var childrenProps = children.props; if (childrenProps.onFocus && event.currentTarget === childNode) { childrenProps.onFocus(event); } }; var handleClose = function handleClose(event) { clearTimeout(hystersisTimer); hystersisTimer = setTimeout(function () { hystersisOpen = false; }, 800 + leaveDelay); setOpenState(false); if (onClose) { onClose(event); } clearTimeout(closeTimer.current); closeTimer.current = setTimeout(function () { ignoreNonTouchEvents.current = false; }, theme.transitions.duration.shortest); }; var handleLeave = function handleLeave(event) { var childrenProps = children.props; if (event.type === 'blur') { if (childrenProps.onBlur && event.currentTarget === childNode) { childrenProps.onBlur(event); } handleBlur(event); } if (event.type === 'mouseleave' && childrenProps.onMouseLeave && event.currentTarget === childNode) { childrenProps.onMouseLeave(event); } clearTimeout(enterTimer.current); clearTimeout(leaveTimer.current); event.persist(); leaveTimer.current = setTimeout(function () { handleClose(event); }, leaveDelay); }; var handleTouchStart = function handleTouchStart(event) { ignoreNonTouchEvents.current = true; var childrenProps = children.props; if (childrenProps.onTouchStart) { childrenProps.onTouchStart(event); } clearTimeout(leaveTimer.current); clearTimeout(closeTimer.current); clearTimeout(touchTimer.current); event.persist(); touchTimer.current = setTimeout(function () { handleEnter(event); }, enterTouchDelay); }; var handleTouchEnd = function handleTouchEnd(event) { if (children.props.onTouchEnd) { children.props.onTouchEnd(event); } clearTimeout(touchTimer.current); clearTimeout(leaveTimer.current); event.persist(); leaveTimer.current = setTimeout(function () { handleClose(event); }, leaveTouchDelay); }; var handleUseRef = useForkRef(setChildNode, ref); var handleFocusRef = useForkRef(focusVisibleRef, handleUseRef); // can be removed once we drop support for non ref forwarding class components var handleOwnRef = React.useCallback(function (instance) { // #StrictMode ready setRef(handleFocusRef, ReactDOM.findDOMNode(instance)); }, [handleFocusRef]); var handleRef = useForkRef(children.ref, handleOwnRef); // There is no point in displaying an empty tooltip. if (title === '') { open = false; } // For accessibility and SEO concerns, we render the title to the DOM node when // the tooltip is hidden. However, we have made a tradeoff when // `disableHoverListener` is set. This title logic is disabled. // It's allowing us to keep the implementation size minimal. // We are open to change the tradeoff. var shouldShowNativeTitle = !open && !disableHoverListener; var childrenProps = _extends({ 'aria-describedby': open ? id : null, title: shouldShowNativeTitle && typeof title === 'string' ? title : null }, other, {}, children.props, { className: clsx(other.className, children.props.className) }); if (!disableTouchListener) { childrenProps.onTouchStart = handleTouchStart; childrenProps.onTouchEnd = handleTouchEnd; } if (!disableHoverListener) { childrenProps.onMouseOver = handleEnter; childrenProps.onMouseLeave = handleLeave; } if (!disableFocusListener) { childrenProps.onFocus = handleFocus; childrenProps.onBlur = handleLeave; } var interactiveWrapperListeners = interactive ? { onMouseOver: childrenProps.onMouseOver, onMouseLeave: childrenProps.onMouseLeave, onFocus: childrenProps.onFocus, onBlur: childrenProps.onBlur } : {}; if (process.env.NODE_ENV !== 'production') { if (children.props.title) { console.error(['Material-UI: you have provided a `title` prop to the child of <Tooltip />.', "Remove this title prop `".concat(children.props.title, "` or the Tooltip component.")].join('\n')); } } // Avoid the creation of a new Popper.js instance at each render. var popperOptions = React.useMemo(function () { return { modifiers: { arrow: { enabled: Boolean(arrowRef), element: arrowRef } } }; }, [arrowRef]); return React.createElement(React.Fragment, null, React.cloneElement(children, _extends({ ref: handleRef }, childrenProps)), React.createElement(Popper, _extends({ className: clsx(classes.popper, interactive && classes.popperInteractive, arrow && classes.popperArrow), placement: placement, anchorEl: childNode, open: childNode ? open : false, id: childrenProps['aria-describedby'], transition: true, popperOptions: popperOptions }, interactiveWrapperListeners, PopperProps), function (_ref) { var placementInner = _ref.placement, TransitionPropsInner = _ref.TransitionProps; return React.createElement(TransitionComponent, _extends({ timeout: theme.transitions.duration.shorter }, TransitionPropsInner, TransitionProps), React.createElement("div", { className: clsx(classes.tooltip, classes["tooltipPlacement".concat(capitalize(placementInner.split('-')[0]))], ignoreNonTouchEvents.current && classes.touch, arrow && classes.tooltipArrow) }, title, arrow ? React.createElement("span", { className: classes.arrow, ref: setArrowRef }) : null)); })); }); process.env.NODE_ENV !== "production" ? Tooltip.propTypes = { /** * If `true`, adds an arrow to the tooltip. */ arrow: PropTypes.bool, /** * Tooltip reference element. */ children: elementAcceptingRef.isRequired, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * Do not respond to focus events. */ disableFocusListener: PropTypes.bool, /** * Do not respond to hover events. */ disableHoverListener: PropTypes.bool, /** * Do not respond to long press touch events. */ disableTouchListener: PropTypes.bool, /** * The number of milliseconds to wait before showing the tooltip. * This prop won't impact the enter touch delay (`enterTouchDelay`). */ enterDelay: PropTypes.number, /** * The number of milliseconds to wait before showing the tooltip when one was already recently opened. */ enterNextDelay: PropTypes.number, /** * The number of milliseconds a user must touch the element before showing the tooltip. */ enterTouchDelay: PropTypes.number, /** * This prop is used to help implement the accessibility logic. * If you don't provide this prop. It falls back to a randomly generated id. */ id: PropTypes.string, /** * Makes a tooltip interactive, i.e. will not close when the user * hovers over the tooltip before the `leaveDelay` is expired. */ interactive: PropTypes.bool, /** * The number of milliseconds to wait before hiding the tooltip. * This prop won't impact the leave touch delay (`leaveTouchDelay`). */ leaveDelay: PropTypes.number, /** * The number of milliseconds after the user stops touching an element before hiding the tooltip. */ leaveTouchDelay: PropTypes.number, /** * Callback fired when the component requests to be closed. * * @param {object} event The event source of the callback. */ onClose: PropTypes.func, /** * Callback fired when the component requests to be open. * * @param {object} event The event source of the callback. */ onOpen: PropTypes.func, /** * If `true`, the tooltip is shown. */ open: PropTypes.bool, /** * Tooltip placement. */ placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']), /** * Props applied to the [`Popper`](/api/popper/) element. */ PopperProps: PropTypes.object, /** * Tooltip title. Zero-length titles string are never displayed. */ title: PropTypes.node.isRequired, /** * The component used for the transition. * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent: PropTypes.elementType, /** * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element. */ TransitionProps: PropTypes.object } : void 0; export default withStyles(styles, { name: 'MuiTooltip' })(Tooltip);
ajax/libs/react-native-web/0.0.0-7cbe1609b/exports/YellowBox/index.js
cdnjs/cdnjs
/** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import React from 'react'; import UnimplementedView from '../../modules/UnimplementedView'; function YellowBox(props) { return React.createElement(UnimplementedView, props); } YellowBox.ignoreWarnings = function () {}; export default YellowBox;
ajax/libs/material-ui/4.9.3/es/Container/Container.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import capitalize from '../utils/capitalize'; export const styles = theme => ({ /* Styles applied to the root element. */ root: { width: '100%', marginLeft: 'auto', boxSizing: 'border-box', marginRight: 'auto', paddingLeft: theme.spacing(2), paddingRight: theme.spacing(2), [theme.breakpoints.up('sm')]: { paddingLeft: theme.spacing(3), paddingRight: theme.spacing(3) } }, /* Styles applied to the root element if `disableGutters={true}`. */ disableGutters: { paddingLeft: 0, paddingRight: 0 }, /* Styles applied to the root element if `fixed={true}`. */ fixed: Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => { const value = theme.breakpoints.values[breakpoint]; if (value !== 0) { acc[theme.breakpoints.up(breakpoint)] = { maxWidth: value }; } return acc; }, {}), /* Styles applied to the root element if `maxWidth="xs"`. */ maxWidthXs: { [theme.breakpoints.up('xs')]: { maxWidth: Math.max(theme.breakpoints.values.xs, 444) } }, /* Styles applied to the root element if `maxWidth="sm"`. */ maxWidthSm: { [theme.breakpoints.up('sm')]: { maxWidth: theme.breakpoints.values.sm } }, /* Styles applied to the root element if `maxWidth="md"`. */ maxWidthMd: { [theme.breakpoints.up('md')]: { maxWidth: theme.breakpoints.values.md } }, /* Styles applied to the root element if `maxWidth="lg"`. */ maxWidthLg: { [theme.breakpoints.up('lg')]: { maxWidth: theme.breakpoints.values.lg } }, /* Styles applied to the root element if `maxWidth="xl"`. */ maxWidthXl: { [theme.breakpoints.up('xl')]: { maxWidth: theme.breakpoints.values.xl } } }); const Container = React.forwardRef(function Container(props, ref) { const { classes, className, component: Component = 'div', disableGutters = false, fixed = false, maxWidth = 'lg' } = props, other = _objectWithoutPropertiesLoose(props, ["classes", "className", "component", "disableGutters", "fixed", "maxWidth"]); return React.createElement(Component, _extends({ className: clsx(classes.root, className, fixed && classes.fixed, disableGutters && classes.disableGutters, maxWidth !== false && classes[`maxWidth${capitalize(String(maxWidth))}`]), ref: ref }, other)); }); process.env.NODE_ENV !== "production" ? Container.propTypes = { children: PropTypes.node.isRequired, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: PropTypes.elementType, /** * If `true`, the left and right padding is removed. */ disableGutters: PropTypes.bool, /** * Set the max-width to match the min-width of the current breakpoint. * This is useful if you'd prefer to design for a fixed set of sizes * instead of trying to accommodate a fully fluid viewport. * It's fluid by default. */ fixed: PropTypes.bool, /** * Determine the max-width of the container. * The container width grows with the size of the screen. * Set to `false` to disable `maxWidth`. */ maxWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]) } : void 0; export default withStyles(styles, { name: 'MuiContainer' })(Container);
ajax/libs/material-ui/5.0.0-alpha.10/esm/utils/createSvgIcon.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import SvgIcon from '../SvgIcon'; /** * Private module reserved for @material-ui packages. */ export default function createSvgIcon(path, displayName) { var Component = function Component(props, ref) { return /*#__PURE__*/React.createElement(SvgIcon, _extends({ ref: ref }, props), path); }; if (process.env.NODE_ENV !== 'production') { // Need to set `displayName` on the inner component for React.memo. // React prior to 16.14 ignores `displayName` on the wrapper. Component.displayName = "".concat(displayName, "Icon"); } Component.muiName = SvgIcon.muiName; return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component)); }
ajax/libs/material-ui/4.9.2/esm/ListSubheader/ListSubheader.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import capitalize from '../utils/capitalize'; export var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: { boxSizing: 'border-box', lineHeight: '48px', listStyle: 'none', color: theme.palette.text.secondary, fontFamily: theme.typography.fontFamily, fontWeight: theme.typography.fontWeightMedium, fontSize: theme.typography.pxToRem(14) }, /* Styles applied to the root element if `color="primary"`. */ colorPrimary: { color: theme.palette.primary.main }, /* Styles applied to the root element if `color="inherit"`. */ colorInherit: { color: 'inherit' }, /* Styles applied to the inner `component` element if `disableGutters={false}`. */ gutters: { paddingLeft: 16, paddingRight: 16 }, /* Styles applied to the root element if `inset={true}`. */ inset: { paddingLeft: 72 }, /* Styles applied to the root element if `disableSticky={false}`. */ sticky: { position: 'sticky', top: 0, zIndex: 1, backgroundColor: 'inherit' } }; }; var ListSubheader = React.forwardRef(function ListSubheader(props, ref) { var classes = props.classes, className = props.className, _props$color = props.color, color = _props$color === void 0 ? 'default' : _props$color, _props$component = props.component, Component = _props$component === void 0 ? 'li' : _props$component, _props$disableGutters = props.disableGutters, disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters, _props$disableSticky = props.disableSticky, disableSticky = _props$disableSticky === void 0 ? false : _props$disableSticky, _props$inset = props.inset, inset = _props$inset === void 0 ? false : _props$inset, other = _objectWithoutProperties(props, ["classes", "className", "color", "component", "disableGutters", "disableSticky", "inset"]); return React.createElement(Component, _extends({ className: clsx(classes.root, className, color !== 'default' && classes["color".concat(capitalize(color))], inset && classes.inset, !disableSticky && classes.sticky, !disableGutters && classes.gutters), ref: ref }, other)); }); process.env.NODE_ENV !== "production" ? ListSubheader.propTypes = { /** * The content of the component. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * The color of the component. It supports those theme colors that make sense for this component. */ color: PropTypes.oneOf(['default', 'primary', 'inherit']), /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: PropTypes.elementType, /** * If `true`, the List Subheader will not have gutters. */ disableGutters: PropTypes.bool, /** * If `true`, the List Subheader will not stick to the top during scroll. */ disableSticky: PropTypes.bool, /** * If `true`, the List Subheader will be indented. */ inset: PropTypes.bool } : void 0; export default withStyles(styles, { name: 'MuiListSubheader' })(ListSubheader);
ajax/libs/primereact/7.2.1/accordion/accordion.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { UniqueComponentId, classNames, ObjectUtils, IconUtils } from 'primereact/utils'; import { CSSTransition } from 'primereact/csstransition'; function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var AccordionTab = /*#__PURE__*/function (_Component) { _inherits(AccordionTab, _Component); var _super = _createSuper(AccordionTab); function AccordionTab() { _classCallCheck(this, AccordionTab); return _super.apply(this, arguments); } return _createClass(AccordionTab); }(Component); _defineProperty(AccordionTab, "defaultProps", { header: null, disabled: false, style: null, className: null, headerStyle: null, headerClassName: null, headerTemplate: null, contentStyle: null, contentClassName: null }); var Accordion = /*#__PURE__*/function (_Component2) { _inherits(Accordion, _Component2); var _super2 = _createSuper(Accordion); function Accordion(props) { var _this; _classCallCheck(this, Accordion); _this = _super2.call(this, props); var state = { id: _this.props.id }; if (!_this.props.onTabChange) { state = _objectSpread(_objectSpread({}, state), {}, { activeIndex: props.activeIndex }); } _this.state = state; return _this; } _createClass(Accordion, [{ key: "shouldTabRender", value: function shouldTabRender(tab) { return tab && tab.type === AccordionTab; } }, { key: "onTabHeaderClick", value: function onTabHeaderClick(event, tab, index) { if (!tab.props.disabled) { var selected = this.isSelected(index); var newActiveIndex = null; if (this.props.multiple) { var indexes = (this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex) || []; if (selected) indexes = indexes.filter(function (i) { return i !== index; });else indexes = [].concat(_toConsumableArray(indexes), [index]); newActiveIndex = indexes; } else { newActiveIndex = selected ? null : index; } var callback = selected ? this.props.onTabClose : this.props.onTabOpen; if (callback) { callback({ originalEvent: event, index: index }); } if (this.props.onTabChange) { this.props.onTabChange({ originalEvent: event, index: newActiveIndex }); } else { this.setState({ activeIndex: newActiveIndex }); } } event.preventDefault(); } }, { key: "isSelected", value: function isSelected(index) { var activeIndex = this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex; return this.props.multiple ? activeIndex && activeIndex.indexOf(index) >= 0 : activeIndex === index; } }, { key: "componentDidMount", value: function componentDidMount() { if (!this.state.id) { this.setState({ id: UniqueComponentId() }); } } }, { key: "renderTabHeader", value: function renderTabHeader(tab, selected, index) { var _this2 = this; var style = _objectSpread(_objectSpread({}, tab.props.headerStyle || {}), tab.props.style || {}); var className = classNames('p-accordion-header', { 'p-highlight': selected, 'p-disabled': tab.props.disabled }, tab.props.headerClassName, tab.props.className); var id = this.state.id + '_header_' + index; var ariaControls = this.state.id + '_content_' + index; var tabIndex = tab.props.disabled ? -1 : null; var header = tab.props.headerTemplate ? ObjectUtils.getJSXElement(tab.props.headerTemplate, tab.props) : /*#__PURE__*/React.createElement("span", { className: "p-accordion-header-text" }, tab.props.header); var icon = selected ? this.props.collapseIcon : this.props.expandIcon; return /*#__PURE__*/React.createElement("div", { className: className, style: style }, /*#__PURE__*/React.createElement("a", { href: '#' + ariaControls, id: id, className: "p-accordion-header-link", "aria-controls": ariaControls, role: "tab", "aria-expanded": selected, onClick: function onClick(event) { return _this2.onTabHeaderClick(event, tab, index); }, tabIndex: tabIndex }, IconUtils.getJSXIcon(icon, { className: 'p-accordion-toggle-icon' }, { props: this.props, selected: selected }), header)); } }, { key: "renderTabContent", value: function renderTabContent(tab, selected, index) { var style = _objectSpread(_objectSpread({}, tab.props.contentStyle || {}), tab.props.style || {}); var className = classNames('p-toggleable-content', tab.props.contentClassName, tab.props.className); var id = this.state.id + '_content_' + index; var toggleableContentRef = /*#__PURE__*/React.createRef(); return /*#__PURE__*/React.createElement(CSSTransition, { nodeRef: toggleableContentRef, classNames: "p-toggleable-content", timeout: { enter: 1000, exit: 450 }, "in": selected, unmountOnExit: true, options: this.props.transitionOptions }, /*#__PURE__*/React.createElement("div", { ref: toggleableContentRef, id: id, className: className, style: style, role: "region", "aria-labelledby": this.state.id + '_header_' + index }, /*#__PURE__*/React.createElement("div", { className: "p-accordion-content" }, tab.props.children))); } }, { key: "renderTab", value: function renderTab(tab, index) { var selected = this.isSelected(index); var tabHeader = this.renderTabHeader(tab, selected, index); var tabContent = this.renderTabContent(tab, selected, index); var tabClassName = classNames('p-accordion-tab', { 'p-accordion-tab-active': selected }); return /*#__PURE__*/React.createElement("div", { key: tab.props.header, className: tabClassName }, tabHeader, tabContent); } }, { key: "renderTabs", value: function renderTabs() { var _this3 = this; return React.Children.map(this.props.children, function (tab, index) { if (_this3.shouldTabRender(tab)) { return _this3.renderTab(tab, index); } }); } }, { key: "render", value: function render() { var _this4 = this; var className = classNames('p-accordion p-component', this.props.className); var tabs = this.renderTabs(); return /*#__PURE__*/React.createElement("div", { ref: function ref(el) { return _this4.container = el; }, id: this.state.id, className: className, style: this.props.style }, tabs); } }]); return Accordion; }(Component); _defineProperty(Accordion, "defaultProps", { id: null, activeIndex: null, className: null, style: null, multiple: false, expandIcon: 'pi pi-chevron-right', collapseIcon: 'pi pi-chevron-down', transitionOptions: null, onTabOpen: null, onTabClose: null, onTabChange: null }); export { Accordion, AccordionTab };
ajax/libs/react-native-web/0.12.1/exports/Image/index.js
cdnjs/cdnjs
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import applyNativeMethods from '../../modules/applyNativeMethods'; import createElement from '../createElement'; import css from '../StyleSheet/css'; import { getAssetByID } from '../../modules/AssetRegistry'; import resolveShadowValue from '../StyleSheet/resolveShadowValue'; import ImageLoader from '../../modules/ImageLoader'; import ImageUriCache from './ImageUriCache'; import StyleSheet from '../StyleSheet'; import TextAncestorContext from '../Text/TextAncestorContext'; import View from '../View'; import React from 'react'; var STATUS_ERRORED = 'ERRORED'; var STATUS_LOADED = 'LOADED'; var STATUS_LOADING = 'LOADING'; var STATUS_PENDING = 'PENDING'; var STATUS_IDLE = 'IDLE'; var getImageState = function getImageState(uri, shouldDisplaySource) { return shouldDisplaySource ? STATUS_LOADED : uri ? STATUS_PENDING : STATUS_IDLE; }; var resolveAssetDimensions = function resolveAssetDimensions(source) { if (typeof source === 'number') { var _getAssetByID = getAssetByID(source), height = _getAssetByID.height, width = _getAssetByID.width; return { height: height, width: width }; } else if (typeof source === 'object') { var _height = source.height, _width = source.width; return { height: _height, width: _width }; } }; var svgDataUriPattern = /^(data:image\/svg\+xml;utf8,)(.*)/; var resolveAssetUri = function resolveAssetUri(source) { var uri = ''; if (typeof source === 'number') { // get the URI from the packager var asset = getAssetByID(source); var scale = asset.scales[0]; var scaleSuffix = scale !== 1 ? "@" + scale + "x" : ''; uri = asset ? asset.httpServerLocation + "/" + asset.name + scaleSuffix + "." + asset.type : ''; } else if (typeof source === 'string') { uri = source; } else if (source && typeof source.uri === 'string') { uri = source.uri; } if (uri) { var match = uri.match(svgDataUriPattern); // inline SVG markup may contain characters (e.g., #, ") that need to be escaped if (match) { var prefix = match[1], svg = match[2]; var encodedSvg = encodeURIComponent(svg); return "" + prefix + encodedSvg; } } return uri; }; var filterId = 0; var createTintColorSVG = function createTintColorSVG(tintColor, id) { return tintColor && id != null ? React.createElement("svg", { style: { position: 'absolute', height: 0, visibility: 'hidden', width: 0 } }, React.createElement("defs", null, React.createElement("filter", { id: "tint-" + id }, React.createElement("feFlood", { floodColor: "" + tintColor }), React.createElement("feComposite", { in2: "SourceAlpha", operator: "atop" })))) : null; }; var Image = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(Image, _React$Component); Image.getSize = function getSize(uri, success, failure) { ImageLoader.getSize(uri, success, failure); }; Image.prefetch = function prefetch(uri) { return ImageLoader.prefetch(uri).then(function () { // Add the uri to the cache so it can be immediately displayed when used // but also immediately remove it to correctly reflect that it has no active references ImageUriCache.add(uri); ImageUriCache.remove(uri); }); }; Image.queryCache = function queryCache(uris) { var result = {}; uris.forEach(function (u) { if (ImageUriCache.has(u)) { result[u] = 'disk/memory'; } }); return Promise.resolve(result); }; function Image(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; // If an image has been loaded before, render it immediately _this._filterId = 0; _this._imageRef = null; _this._imageRequestId = null; _this._imageState = null; _this._isMounted = false; _this._createLayoutHandler = function (resizeMode) { var onLayout = _this.props.onLayout; if (resizeMode === 'center' || resizeMode === 'repeat' || onLayout) { return function (e) { var layout = e.nativeEvent.layout; onLayout && onLayout(e); _this.setState(function () { return { layout: layout }; }); }; } }; _this._getBackgroundSize = function (resizeMode) { if (_this._imageRef && (resizeMode === 'center' || resizeMode === 'repeat')) { var _this$_imageRef = _this._imageRef, naturalHeight = _this$_imageRef.naturalHeight, naturalWidth = _this$_imageRef.naturalWidth; var _this$state$layout = _this.state.layout, height = _this$state$layout.height, width = _this$state$layout.width; if (naturalHeight && naturalWidth && height && width) { var scaleFactor = Math.min(1, width / naturalWidth, height / naturalHeight); var x = Math.ceil(scaleFactor * naturalWidth); var y = Math.ceil(scaleFactor * naturalHeight); return { backgroundSize: x + "px " + y + "px" }; } } }; _this._onError = function () { var _this$props = _this.props, onError = _this$props.onError, source = _this$props.source; _this._updateImageState(STATUS_ERRORED); if (onError) { onError({ nativeEvent: { error: "Failed to load resource " + resolveAssetUri(source) + " (404)" } }); } _this._onLoadEnd(); }; _this._onLoad = function (e) { var _this$props2 = _this.props, onLoad = _this$props2.onLoad, source = _this$props2.source; var event = { nativeEvent: e }; ImageUriCache.add(resolveAssetUri(source)); _this._updateImageState(STATUS_LOADED); if (onLoad) { onLoad(event); } _this._onLoadEnd(); }; _this._setImageRef = function (ref) { _this._imageRef = ref; }; var uri = resolveAssetUri(props.source); var shouldDisplaySource = ImageUriCache.has(uri); _this.state = { layout: {}, shouldDisplaySource: shouldDisplaySource }; _this._imageState = getImageState(uri, shouldDisplaySource); _this._filterId = filterId; filterId++; return _this; } var _proto = Image.prototype; _proto.componentDidMount = function componentDidMount() { this._isMounted = true; if (this._imageState === STATUS_PENDING) { this._createImageLoader(); } else if (this._imageState === STATUS_LOADED) { this._onLoad({ target: this._imageRef }); } }; _proto.componentDidUpdate = function componentDidUpdate(prevProps) { var prevUri = resolveAssetUri(prevProps.source); var uri = resolveAssetUri(this.props.source); var hasDefaultSource = this.props.defaultSource != null; if (prevUri !== uri) { ImageUriCache.remove(prevUri); var isPreviouslyLoaded = ImageUriCache.has(uri); isPreviouslyLoaded && ImageUriCache.add(uri); this._updateImageState(getImageState(uri, isPreviouslyLoaded), hasDefaultSource); } else if (hasDefaultSource && prevProps.defaultSource !== this.props.defaultSource) { this._updateImageState(this._imageState, hasDefaultSource); } if (this._imageState === STATUS_PENDING) { this._createImageLoader(); } }; _proto.componentWillUnmount = function componentWillUnmount() { var uri = resolveAssetUri(this.props.source); ImageUriCache.remove(uri); this._destroyImageLoader(); this._isMounted = false; }; _proto.renderImage = function renderImage(hasTextAncestor) { var shouldDisplaySource = this.state.shouldDisplaySource; var _this$props3 = this.props, accessibilityLabel = _this$props3.accessibilityLabel, accessibilityRelationship = _this$props3.accessibilityRelationship, accessibilityRole = _this$props3.accessibilityRole, accessibilityState = _this$props3.accessibilityState, accessible = _this$props3.accessible, blurRadius = _this$props3.blurRadius, defaultSource = _this$props3.defaultSource, draggable = _this$props3.draggable, importantForAccessibility = _this$props3.importantForAccessibility, nativeID = _this$props3.nativeID, pointerEvents = _this$props3.pointerEvents, resizeMode = _this$props3.resizeMode, source = _this$props3.source, testID = _this$props3.testID; if (process.env.NODE_ENV !== 'production') { if (this.props.children) { throw new Error('The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.'); } } var selectedSource = shouldDisplaySource ? source : defaultSource; var displayImageUri = resolveAssetUri(selectedSource); var imageSizeStyle = resolveAssetDimensions(selectedSource); var backgroundImage = displayImageUri ? "url(\"" + displayImageUri + "\")" : null; var flatStyle = _objectSpread({}, StyleSheet.flatten(this.props.style)); var finalResizeMode = resizeMode || flatStyle.resizeMode || 'cover'; // CSS filters var filters = []; var tintColor = flatStyle.tintColor; if (flatStyle.filter) { filters.push(flatStyle.filter); } if (blurRadius) { filters.push("blur(" + blurRadius + "px)"); } if (flatStyle.shadowOffset) { var shadowString = resolveShadowValue(flatStyle); if (shadowString) { filters.push("drop-shadow(" + shadowString + ")"); } } if (flatStyle.tintColor) { filters.push("url(#tint-" + this._filterId + ")"); } // these styles were converted to filters delete flatStyle.shadowColor; delete flatStyle.shadowOpacity; delete flatStyle.shadowOffset; delete flatStyle.shadowRadius; delete flatStyle.tintColor; // these styles are not supported on View delete flatStyle.overlayColor; delete flatStyle.resizeMode; // Accessibility image allows users to trigger the browser's image context menu var hiddenImage = displayImageUri ? createElement('img', { alt: accessibilityLabel || '', classList: [classes.accessibilityImage], draggable: draggable || false, ref: this._setImageRef, src: displayImageUri }) : null; return React.createElement(View, { accessibilityLabel: accessibilityLabel, accessibilityRelationship: accessibilityRelationship, accessibilityRole: accessibilityRole, accessibilityState: accessibilityState, accessible: accessible, importantForAccessibility: importantForAccessibility, nativeID: nativeID, onLayout: this._createLayoutHandler(finalResizeMode), pointerEvents: pointerEvents, style: [styles.root, hasTextAncestor && styles.inline, imageSizeStyle, flatStyle], testID: testID }, React.createElement(View, { style: [styles.image, resizeModeStyles[finalResizeMode], this._getBackgroundSize(finalResizeMode), backgroundImage && { backgroundImage: backgroundImage }, filters.length > 0 && { filter: filters.join(' ') }] }), hiddenImage, createTintColorSVG(tintColor, this._filterId)); }; _proto.render = function render() { var _this2 = this; return React.createElement(TextAncestorContext.Consumer, null, function (hasTextAncestor) { return _this2.renderImage(hasTextAncestor); }); }; _proto._createImageLoader = function _createImageLoader() { var source = this.props.source; this._destroyImageLoader(); var uri = resolveAssetUri(source); this._imageRequestId = ImageLoader.load(uri, this._onLoad, this._onError); this._onLoadStart(); }; _proto._destroyImageLoader = function _destroyImageLoader() { if (this._imageRequestId) { ImageLoader.abort(this._imageRequestId); this._imageRequestId = null; } }; _proto._onLoadEnd = function _onLoadEnd() { var onLoadEnd = this.props.onLoadEnd; if (onLoadEnd) { onLoadEnd(); } }; _proto._onLoadStart = function _onLoadStart() { var _this$props4 = this.props, defaultSource = _this$props4.defaultSource, onLoadStart = _this$props4.onLoadStart; this._updateImageState(STATUS_LOADING, defaultSource != null); if (onLoadStart) { onLoadStart(); } }; _proto._updateImageState = function _updateImageState(status, hasDefaultSource) { if (hasDefaultSource === void 0) { hasDefaultSource = false; } this._imageState = status; var shouldDisplaySource = this._imageState === STATUS_LOADED || this._imageState === STATUS_LOADING && !hasDefaultSource; // only triggers a re-render when the image is loading and has no default image (to support PJPEG), loaded, or failed if (shouldDisplaySource !== this.state.shouldDisplaySource) { if (this._isMounted) { this.setState(function () { return { shouldDisplaySource: shouldDisplaySource }; }); } } }; return Image; }(React.Component); Image.displayName = 'Image'; var classes = css.create({ accessibilityImage: _objectSpread({}, StyleSheet.absoluteFillObject, { height: '100%', opacity: 0, width: '100%', zIndex: -1 }) }); var styles = StyleSheet.create({ root: { flexBasis: 'auto', overflow: 'hidden', zIndex: 0 }, inline: { display: 'inline-flex' }, image: _objectSpread({}, StyleSheet.absoluteFillObject, { backgroundColor: 'transparent', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'cover', height: '100%', width: '100%', zIndex: -1 }) }); var resizeModeStyles = StyleSheet.create({ center: { backgroundSize: 'auto' }, contain: { backgroundSize: 'contain' }, cover: { backgroundSize: 'cover' }, none: { backgroundPosition: '0 0', backgroundSize: 'auto' }, repeat: { backgroundPosition: '0 0', backgroundRepeat: 'repeat', backgroundSize: 'auto' }, stretch: { backgroundSize: '100% 100%' } }); export default applyNativeMethods(Image);
ajax/libs/react-instantsearch/4.3.0/Connectors.js
cdnjs/cdnjs
/*! ReactInstantSearch 4.3.0 | © Algolia, inc. | https://community.algolia.com/react-instantsearch */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) : typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) : (factory((global.ReactInstantSearch = global.ReactInstantSearch || {}, global.ReactInstantSearch.Connectors = {}),global.React)); }(this, (function (exports,React) { 'use strict'; var React__default = 'default' in React ? React['default'] : React; /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } var _baseTimes = baseTimes; var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; var _freeGlobal = freeGlobal; /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = _freeGlobal || freeSelf || Function('return this')(); var _root = root; /** Built-in value references. */ var Symbol$1 = _root.Symbol; var _Symbol = Symbol$1; /** Used for built-in method references. */ var objectProto$2 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$2 = objectProto$2.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto$2.toString; /** Built-in value references. */ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty$2.call(value, symToStringTag$1), tag = value[symToStringTag$1]; try { value[symToStringTag$1] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag$1] = tag; } else { delete value[symToStringTag$1]; } } return result; } var _getRawTag = getRawTag; /** Used for built-in method references. */ var objectProto$3 = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString$1 = objectProto$3.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString$1.call(value); } var _objectToString = objectToString; /** `Object#toString` result references. */ var nullTag = '[object Null]'; var undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? _getRawTag(value) : _objectToString(value); } var _baseGetTag = baseGetTag; /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } var isObjectLike_1 = isObjectLike; /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike_1(value) && _baseGetTag(value) == argsTag; } var _baseIsArguments = baseIsArguments; /** Used for built-in method references. */ var objectProto$1 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$1 = objectProto$1.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto$1.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) { return isObjectLike_1(value) && hasOwnProperty$1.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; var isArguments_1 = isArguments; /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; var isArray_1 = isArray; /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } var stubFalse_1 = stubFalse; var isBuffer_1 = createCommonjsModule(function (module, exports) { /** Detect free variable `exports`. */ var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? _root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse_1; module.exports = isBuffer; }); /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (typeof value == 'number' || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } var _isIndex = isIndex; /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER$1 = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1; } var isLength_1 = isLength; /** `Object#toString` result references. */ var argsTag$1 = '[object Arguments]'; var arrayTag = '[object Array]'; var boolTag = '[object Boolean]'; var dateTag = '[object Date]'; var errorTag = '[object Error]'; var funcTag = '[object Function]'; var mapTag = '[object Map]'; var numberTag = '[object Number]'; var objectTag = '[object Object]'; var regexpTag = '[object RegExp]'; var setTag = '[object Set]'; var stringTag = '[object String]'; var weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]'; var dataViewTag = '[object DataView]'; var float32Tag = '[object Float32Array]'; var float64Tag = '[object Float64Array]'; var int8Tag = '[object Int8Array]'; var int16Tag = '[object Int16Array]'; var int32Tag = '[object Int32Array]'; var uint8Tag = '[object Uint8Array]'; var uint8ClampedTag = '[object Uint8ClampedArray]'; var uint16Tag = '[object Uint16Array]'; var uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike_1(value) && isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)]; } var _baseIsTypedArray = baseIsTypedArray; /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } var _baseUnary = baseUnary; var _nodeUtil = createCommonjsModule(function (module, exports) { /** Detect free variable `exports`. */ var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && _freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; }); /* Node.js helper references. */ var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray; var isTypedArray_1 = isTypedArray; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray_1(value), isArg = !isArr && isArguments_1(value), isBuff = !isArr && !isArg && isBuffer_1(value), isType = !isArr && !isArg && !isBuff && isTypedArray_1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? _baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. _isIndex(key, length) ))) { result.push(key); } } return result; } var _arrayLikeKeys = arrayLikeKeys; /** Used for built-in method references. */ var objectProto$5 = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5; return value === proto; } var _isPrototype = isPrototype; /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } var _overArg = overArg; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = _overArg(Object.keys, Object); var _nativeKeys = nativeKeys; /** Used for built-in method references. */ var objectProto$4 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$3 = objectProto$4.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!_isPrototype(object)) { return _nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty$3.call(object, key) && key != 'constructor') { result.push(key); } } return result; } var _baseKeys = baseKeys; /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } var isObject_1 = isObject; /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]'; var funcTag$1 = '[object Function]'; var genTag = '[object GeneratorFunction]'; var proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject_1(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = _baseGetTag(value); return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag; } var isFunction_1 = isFunction; /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength_1(value.length) && !isFunction_1(value); } var isArrayLike_1 = isArrayLike; /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object); } var keys_1 = keys; /** Used to detect overreaching core-js shims. */ var coreJsData = _root['__core-js_shared__']; var _coreJsData = coreJsData; /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } var _isMasked = isMasked; /** Used for built-in method references. */ var funcProto$1 = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString$1 = funcProto$1.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString$1.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } var _toSource = toSource; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype; var objectProto$6 = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty$4 = objectProto$6.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty$4).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject_1(value) || _isMasked(value)) { return false; } var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor; return pattern.test(_toSource(value)); } var _baseIsNative = baseIsNative; /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } var _getValue = getValue; /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = _getValue(object, key); return _baseIsNative(value) ? value : undefined; } var _getNative = getNative; /* Built-in method references that are verified to be native. */ var nativeCreate = _getNative(Object, 'create'); var _nativeCreate = nativeCreate; /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; this.size = 0; } var _hashClear = hashClear; /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } var _hashDelete = hashDelete; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto$7 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$5 = objectProto$7.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (_nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty$5.call(data, key) ? data[key] : undefined; } var _hashGet = hashGet; /** Used for built-in method references. */ var objectProto$8 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$6 = objectProto$8.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key); } var _hashHas = hashHas; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value; return this; } var _hashSet = hashSet; /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = _hashClear; Hash.prototype['delete'] = _hashDelete; Hash.prototype.get = _hashGet; Hash.prototype.has = _hashHas; Hash.prototype.set = _hashSet; var _Hash = Hash; /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } var _listCacheClear = listCacheClear; /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } var eq_1 = eq; /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq_1(array[length][0], key)) { return length; } } return -1; } var _assocIndexOf = assocIndexOf; /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = _assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } var _listCacheDelete = listCacheDelete; /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = _assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } var _listCacheGet = listCacheGet; /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return _assocIndexOf(this.__data__, key) > -1; } var _listCacheHas = listCacheHas; /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = _assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } var _listCacheSet = listCacheSet; /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = _listCacheClear; ListCache.prototype['delete'] = _listCacheDelete; ListCache.prototype.get = _listCacheGet; ListCache.prototype.has = _listCacheHas; ListCache.prototype.set = _listCacheSet; var _ListCache = ListCache; /* Built-in method references that are verified to be native. */ var Map = _getNative(_root, 'Map'); var _Map = Map; /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new _Hash, 'map': new (_Map || _ListCache), 'string': new _Hash }; } var _mapCacheClear = mapCacheClear; /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } var _isKeyable = isKeyable; /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return _isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } var _getMapData = getMapData; /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = _getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } var _mapCacheDelete = mapCacheDelete; /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return _getMapData(this, key).get(key); } var _mapCacheGet = mapCacheGet; /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return _getMapData(this, key).has(key); } var _mapCacheHas = mapCacheHas; /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = _getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } var _mapCacheSet = mapCacheSet; /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = _mapCacheClear; MapCache.prototype['delete'] = _mapCacheDelete; MapCache.prototype.get = _mapCacheGet; MapCache.prototype.has = _mapCacheHas; MapCache.prototype.set = _mapCacheSet; var _MapCache = MapCache; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED$2 = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED$2); return this; } var _setCacheAdd = setCacheAdd; /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } var _setCacheHas = setCacheHas; /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new _MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; SetCache.prototype.has = _setCacheHas; var _SetCache = SetCache; /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } var _baseFindIndex = baseFindIndex; /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } var _baseIsNaN = baseIsNaN; /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } var _strictIndexOf = strictIndexOf; /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { return value === value ? _strictIndexOf(array, value, fromIndex) : _baseFindIndex(array, _baseIsNaN, fromIndex); } var _baseIndexOf = baseIndexOf; /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && _baseIndexOf(array, value, 0) > -1; } var _arrayIncludes = arrayIncludes; /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { return true; } } return false; } var _arrayIncludesWith = arrayIncludesWith; /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } var _arrayMap = arrayMap; /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } var _cacheHas = cacheHas; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * The base implementation of methods like `_.difference` without support * for excluding multiple arrays or iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Array} values The values to exclude. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of filtered values. */ function baseDifference(array, values, iteratee, comparator) { var index = -1, includes = _arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length; if (!length) { return result; } if (iteratee) { values = _arrayMap(values, _baseUnary(iteratee)); } if (comparator) { includes = _arrayIncludesWith; isCommon = false; } else if (values.length >= LARGE_ARRAY_SIZE) { includes = _cacheHas; isCommon = false; values = new _SetCache(values); } outer: while (++index < length) { var value = array[index], computed = iteratee == null ? value : iteratee(value); value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var valuesIndex = valuesLength; while (valuesIndex--) { if (values[valuesIndex] === computed) { continue outer; } } result.push(value); } else if (!includes(values, computed, comparator)) { result.push(value); } } return result; } var _baseDifference = baseDifference; /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } var _arrayPush = arrayPush; /** Built-in value references. */ var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined; /** * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { return isArray_1(value) || isArguments_1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } var _isFlattenable = isFlattenable; /** * The base implementation of `_.flatten` with support for restricting flattening. * * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = _isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). baseFlatten(value, depth - 1, predicate, isStrict, result); } else { _arrayPush(result, value); } } else if (!isStrict) { result[result.length] = value; } } return result; } var _baseFlatten = baseFlatten; /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } var identity_1 = identity; /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } var _apply = apply; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return _apply(func, this, otherArgs); }; } var _overRest = overRest; /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } var constant_1 = constant; var defineProperty = (function() { try { var func = _getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); var _defineProperty = defineProperty; /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !_defineProperty ? identity_1 : function(func, string) { return _defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant_1(string), 'writable': true }); }; var _baseSetToString = baseSetToString; /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800; var HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } var _shortOut = shortOut; /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = _shortOut(_baseSetToString); var _setToString = setToString; /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return _setToString(_overRest(func, start, identity_1), func + ''); } var _baseRest = baseRest; /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike_1(value) && isArrayLike_1(value); } var isArrayLikeObject_1 = isArrayLikeObject; /** * Creates an array of `array` values not included in the other given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. The order and references of result values are * determined by the first array. * * **Note:** Unlike `_.pullAll`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. * @see _.without, _.xor * @example * * _.difference([2, 1], [2, 3]); * // => [1] */ var difference = _baseRest(function(array, values) { return isArrayLikeObject_1(array) ? _baseDifference(array, _baseFlatten(values, 1, isArrayLikeObject_1, true)) : []; }); var difference_1 = difference; /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new _ListCache; this.size = 0; } var _stackClear = stackClear; /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } var _stackDelete = stackDelete; /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } var _stackGet = stackGet; /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } var _stackHas = stackHas; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE$1 = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof _ListCache) { var pairs = data.__data__; if (!_Map || (pairs.length < LARGE_ARRAY_SIZE$1 - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new _MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } var _stackSet = stackSet; /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new _ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = _stackClear; Stack.prototype['delete'] = _stackDelete; Stack.prototype.get = _stackGet; Stack.prototype.has = _stackHas; Stack.prototype.set = _stackSet; var _Stack = Stack; /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } var _arrayEach = arrayEach; /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && _defineProperty) { _defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } var _baseAssignValue = baseAssignValue; /** Used for built-in method references. */ var objectProto$9 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$7 = objectProto$9.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty$7.call(object, key) && eq_1(objValue, value)) || (value === undefined && !(key in object))) { _baseAssignValue(object, key, value); } } var _assignValue = assignValue; /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { _baseAssignValue(object, key, newValue); } else { _assignValue(object, key, newValue); } } return object; } var _copyObject = copyObject; /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && _copyObject(source, keys_1(source), object); } var _baseAssign = baseAssign; /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } var _nativeKeysIn = nativeKeysIn; /** Used for built-in method references. */ var objectProto$10 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$8 = objectProto$10.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!isObject_1(object)) { return _nativeKeysIn(object); } var isProto = _isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty$8.call(object, key)))) { result.push(key); } } return result; } var _baseKeysIn = baseKeysIn; /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn$1(object) { return isArrayLike_1(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object); } var keysIn_1 = keysIn$1; /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && _copyObject(source, keysIn_1(source), object); } var _baseAssignIn = baseAssignIn; var _cloneBuffer = createCommonjsModule(function (module, exports) { /** Detect free variable `exports`. */ var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? _root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; }); /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } var _copyArray = copyArray; /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } var _arrayFilter = arrayFilter; /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } var stubArray_1 = stubArray; /** Used for built-in method references. */ var objectProto$11 = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable$1 = objectProto$11.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) { if (object == null) { return []; } object = Object(object); return _arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable$1.call(object, symbol); }); }; var _getSymbols = getSymbols; /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return _copyObject(source, _getSymbols(source), object); } var _copySymbols = copySymbols; /** Built-in value references. */ var getPrototype = _overArg(Object.getPrototypeOf, Object); var _getPrototype = getPrototype; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols$1 = Object.getOwnPropertySymbols; /** * Creates an array of the own and inherited enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbolsIn = !nativeGetSymbols$1 ? stubArray_1 : function(object) { var result = []; while (object) { _arrayPush(result, _getSymbols(object)); object = _getPrototype(object); } return result; }; var _getSymbolsIn = getSymbolsIn; /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return _copyObject(source, _getSymbolsIn(source), object); } var _copySymbolsIn = copySymbolsIn; /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object)); } var _baseGetAllKeys = baseGetAllKeys; /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return _baseGetAllKeys(object, keys_1, _getSymbols); } var _getAllKeys = getAllKeys; /** * Creates an array of own and inherited enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeysIn(object) { return _baseGetAllKeys(object, keysIn_1, _getSymbolsIn); } var _getAllKeysIn = getAllKeysIn; /* Built-in method references that are verified to be native. */ var DataView = _getNative(_root, 'DataView'); var _DataView = DataView; /* Built-in method references that are verified to be native. */ var Promise$1 = _getNative(_root, 'Promise'); var _Promise = Promise$1; /* Built-in method references that are verified to be native. */ var Set = _getNative(_root, 'Set'); var _Set = Set; /* Built-in method references that are verified to be native. */ var WeakMap = _getNative(_root, 'WeakMap'); var _WeakMap = WeakMap; /** `Object#toString` result references. */ var mapTag$2 = '[object Map]'; var objectTag$2 = '[object Object]'; var promiseTag = '[object Promise]'; var setTag$2 = '[object Set]'; var weakMapTag$2 = '[object WeakMap]'; var dataViewTag$2 = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = _toSource(_DataView); var mapCtorString = _toSource(_Map); var promiseCtorString = _toSource(_Promise); var setCtorString = _toSource(_Set); var weakMapCtorString = _toSource(_WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = _baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$2) || (_Map && getTag(new _Map) != mapTag$2) || (_Promise && getTag(_Promise.resolve()) != promiseTag) || (_Set && getTag(new _Set) != setTag$2) || (_WeakMap && getTag(new _WeakMap) != weakMapTag$2)) { getTag = function(value) { var result = _baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : undefined, ctorString = Ctor ? _toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag$2; case mapCtorString: return mapTag$2; case promiseCtorString: return promiseTag; case setCtorString: return setTag$2; case weakMapCtorString: return weakMapTag$2; } } return result; }; } var _getTag = getTag; /** Used for built-in method references. */ var objectProto$12 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$9 = objectProto$12.hasOwnProperty; /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty$9.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } var _initCloneArray = initCloneArray; /** Built-in value references. */ var Uint8Array = _root.Uint8Array; var _Uint8Array = Uint8Array; /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new _Uint8Array(result).set(new _Uint8Array(arrayBuffer)); return result; } var _cloneArrayBuffer = cloneArrayBuffer; /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? _cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } var _cloneDataView = cloneDataView; /** * Adds the key-value `pair` to `map`. * * @private * @param {Object} map The map to modify. * @param {Array} pair The key-value pair to add. * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { // Don't return `map.set` because it's not chainable in IE 11. map.set(pair[0], pair[1]); return map; } var _addMapEntry = addMapEntry; /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } var _arrayReduce = arrayReduce; /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } var _mapToArray = mapToArray; /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG$2 = 1; /** * Creates a clone of `map`. * * @private * @param {Object} map The map to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned map. */ function cloneMap(map, isDeep, cloneFunc) { var array = isDeep ? cloneFunc(_mapToArray(map), CLONE_DEEP_FLAG$2) : _mapToArray(map); return _arrayReduce(array, _addMapEntry, new map.constructor); } var _cloneMap = cloneMap; /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } var _cloneRegExp = cloneRegExp; /** * Adds `value` to `set`. * * @private * @param {Object} set The set to modify. * @param {*} value The value to add. * @returns {Object} Returns `set`. */ function addSetEntry(set, value) { // Don't return `set.add` because it's not chainable in IE 11. set.add(value); return set; } var _addSetEntry = addSetEntry; /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } var _setToArray = setToArray; /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG$3 = 1; /** * Creates a clone of `set`. * * @private * @param {Object} set The set to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned set. */ function cloneSet(set, isDeep, cloneFunc) { var array = isDeep ? cloneFunc(_setToArray(set), CLONE_DEEP_FLAG$3) : _setToArray(set); return _arrayReduce(array, _addSetEntry, new set.constructor); } var _cloneSet = cloneSet; /** Used to convert symbols to primitives and strings. */ var symbolProto = _Symbol ? _Symbol.prototype : undefined; var symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } var _cloneSymbol = cloneSymbol; /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } var _cloneTypedArray = cloneTypedArray; /** `Object#toString` result references. */ var boolTag$2 = '[object Boolean]'; var dateTag$2 = '[object Date]'; var mapTag$3 = '[object Map]'; var numberTag$2 = '[object Number]'; var regexpTag$2 = '[object RegExp]'; var setTag$3 = '[object Set]'; var stringTag$2 = '[object String]'; var symbolTag$1 = '[object Symbol]'; var arrayBufferTag$2 = '[object ArrayBuffer]'; var dataViewTag$3 = '[object DataView]'; var float32Tag$2 = '[object Float32Array]'; var float64Tag$2 = '[object Float64Array]'; var int8Tag$2 = '[object Int8Array]'; var int16Tag$2 = '[object Int16Array]'; var int32Tag$2 = '[object Int32Array]'; var uint8Tag$2 = '[object Uint8Array]'; var uint8ClampedTag$2 = '[object Uint8ClampedArray]'; var uint16Tag$2 = '[object Uint16Array]'; var uint32Tag$2 = '[object Uint32Array]'; /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, cloneFunc, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag$2: return _cloneArrayBuffer(object); case boolTag$2: case dateTag$2: return new Ctor(+object); case dataViewTag$3: return _cloneDataView(object, isDeep); case float32Tag$2: case float64Tag$2: case int8Tag$2: case int16Tag$2: case int32Tag$2: case uint8Tag$2: case uint8ClampedTag$2: case uint16Tag$2: case uint32Tag$2: return _cloneTypedArray(object, isDeep); case mapTag$3: return _cloneMap(object, isDeep, cloneFunc); case numberTag$2: case stringTag$2: return new Ctor(object); case regexpTag$2: return _cloneRegExp(object); case setTag$3: return _cloneSet(object, isDeep, cloneFunc); case symbolTag$1: return _cloneSymbol(object); } } var _initCloneByTag = initCloneByTag; /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject_1(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); var _baseCreate = baseCreate; /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !_isPrototype(object)) ? _baseCreate(_getPrototype(object)) : {}; } var _initCloneObject = initCloneObject; /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG$1 = 1; var CLONE_FLAT_FLAG$1 = 2; var CLONE_SYMBOLS_FLAG$1 = 4; /** `Object#toString` result references. */ var argsTag$2 = '[object Arguments]'; var arrayTag$1 = '[object Array]'; var boolTag$1 = '[object Boolean]'; var dateTag$1 = '[object Date]'; var errorTag$1 = '[object Error]'; var funcTag$2 = '[object Function]'; var genTag$1 = '[object GeneratorFunction]'; var mapTag$1 = '[object Map]'; var numberTag$1 = '[object Number]'; var objectTag$1 = '[object Object]'; var regexpTag$1 = '[object RegExp]'; var setTag$1 = '[object Set]'; var stringTag$1 = '[object String]'; var symbolTag = '[object Symbol]'; var weakMapTag$1 = '[object WeakMap]'; var arrayBufferTag$1 = '[object ArrayBuffer]'; var dataViewTag$1 = '[object DataView]'; var float32Tag$1 = '[object Float32Array]'; var float64Tag$1 = '[object Float64Array]'; var int8Tag$1 = '[object Int8Array]'; var int16Tag$1 = '[object Int16Array]'; var int32Tag$1 = '[object Int32Array]'; var uint8Tag$1 = '[object Uint8Array]'; var uint8ClampedTag$1 = '[object Uint8ClampedArray]'; var uint16Tag$1 = '[object Uint16Array]'; var uint32Tag$1 = '[object Uint32Array]'; /** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag$2] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag$1] = cloneableTags[float64Tag$1] = cloneableTags[int8Tag$1] = cloneableTags[int16Tag$1] = cloneableTags[int32Tag$1] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag] = cloneableTags[uint8Tag$1] = cloneableTags[uint8ClampedTag$1] = cloneableTags[uint16Tag$1] = cloneableTags[uint32Tag$1] = true; cloneableTags[errorTag$1] = cloneableTags[funcTag$2] = cloneableTags[weakMapTag$1] = false; /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} bitmask The bitmask flags. * 1 - Deep clone * 2 - Flatten inherited properties * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$1; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject_1(value)) { return value; } var isArr = isArray_1(value); if (isArr) { result = _initCloneArray(value); if (!isDeep) { return _copyArray(value, result); } } else { var tag = _getTag(value), isFunc = tag == funcTag$2 || tag == genTag$1; if (isBuffer_1(value)) { return _cloneBuffer(value, isDeep); } if (tag == objectTag$1 || tag == argsTag$2 || (isFunc && !object)) { result = (isFlat || isFunc) ? {} : _initCloneObject(value); if (!isDeep) { return isFlat ? _copySymbolsIn(value, _baseAssignIn(result, value)) : _copySymbols(value, _baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = _initCloneByTag(value, tag, baseClone, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new _Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); var keysFunc = isFull ? (isFlat ? _getAllKeysIn : _getAllKeys) : (isFlat ? keysIn : keys_1); var props = isArr ? undefined : keysFunc(value); _arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). _assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } var _baseClone = baseClone; /** `Object#toString` result references. */ var symbolTag$2 = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike_1(value) && _baseGetTag(value) == symbolTag$2); } var isSymbol_1 = isSymbol; /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; var reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray_1(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol_1(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } var _isKey = isKey; /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || _MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = _MapCache; var memoize_1 = memoize; /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize_1(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } var _memoizeCapped = memoizeCapped; /** Used to match property names within property paths. */ var reLeadingDot = /^\./; var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = _memoizeCapped(function(string) { var result = []; if (reLeadingDot.test(string)) { result.push(''); } string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); var _stringToPath = stringToPath; /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined; var symbolToString = symbolProto$1 ? symbolProto$1.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray_1(value)) { // Recursively convert values (susceptible to call stack limits). return _arrayMap(value, baseToString) + ''; } if (isSymbol_1(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } var _baseToString = baseToString; /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : _baseToString(value); } var toString_1 = toString; /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray_1(value)) { return value; } return _isKey(value, object) ? [value] : _stringToPath(toString_1(value)); } var _castPath = castPath; /** * Gets the last element of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to query. * @returns {*} Returns the last element of `array`. * @example * * _.last([1, 2, 3]); * // => 3 */ function last(array) { var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } var last_1 = last; /** Used as references for various `Number` constants. */ var INFINITY$1 = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol_1(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result; } var _toKey = toKey; /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = _castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[_toKey(path[index++])]; } return (index && index == length) ? object : undefined; } var _baseGet = baseGet; /** * The base implementation of `_.slice` without an iteratee call guard. * * @private * @param {Array} array The array to slice. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the slice of `array`. */ function baseSlice(array, start, end) { var index = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : (length + start); } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } var _baseSlice = baseSlice; /** * Gets the parent value at `path` of `object`. * * @private * @param {Object} object The object to query. * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value. */ function parent(object, path) { return path.length < 2 ? object : _baseGet(object, _baseSlice(path, 0, -1)); } var _parent = parent; /** * The base implementation of `_.unset`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The property path to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ function baseUnset(object, path) { path = _castPath(path, object); object = _parent(object, path); return object == null || delete object[_toKey(last_1(path))]; } var _baseUnset = baseUnset; /** `Object#toString` result references. */ var objectTag$3 = '[object Object]'; /** Used for built-in method references. */ var funcProto$2 = Function.prototype; var objectProto$13 = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString$2 = funcProto$2.toString; /** Used to check objects for own properties. */ var hasOwnProperty$10 = objectProto$13.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString$2.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag$3) { return false; } var proto = _getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty$10.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString$2.call(Ctor) == objectCtorString; } var isPlainObject_1 = isPlainObject; /** * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain * objects. * * @private * @param {*} value The value to inspect. * @param {string} key The key of the property to inspect. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. */ function customOmitClone(value) { return isPlainObject_1(value) ? undefined : value; } var _customOmitClone = customOmitClone; /** * Flattens `array` a single level deep. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flatten([1, [2, [3, [4]], 5]]); * // => [1, 2, [3, [4]], 5] */ function flatten(array) { var length = array == null ? 0 : array.length; return length ? _baseFlatten(array, 1) : []; } var flatten_1 = flatten; /** * A specialized version of `baseRest` which flattens the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @returns {Function} Returns the new function. */ function flatRest(func) { return _setToString(_overRest(func, undefined, flatten_1), func + ''); } var _flatRest = flatRest; /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1; var CLONE_FLAT_FLAG = 2; var CLONE_SYMBOLS_FLAG = 4; /** * The opposite of `_.pick`; this method creates an object composed of the * own and inherited enumerable property paths of `object` that are not omitted. * * **Note:** This method is considerably slower than `_.pick`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to omit. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ var omit = _flatRest(function(object, paths) { var result = {}; if (object == null) { return result; } var isDeep = false; paths = _arrayMap(paths, function(path) { path = _castPath(path, object); isDeep || (isDeep = path.length > 1); return path; }); _copyObject(object, _getAllKeysIn(object), result); if (isDeep) { result = _baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, _customOmitClone); } var length = paths.length; while (length--) { _baseUnset(result, paths[length]); } return result; }); var omit_1 = omit; var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}; // shim for using process in browser // based off https://github.com/defunctzombie/node-process/blob/master/browser.js function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout() { throw new Error('clearTimeout has not been defined'); } var cachedSetTimeout = defaultSetTimout; var cachedClearTimeout = defaultClearTimeout; if (typeof global$1.setTimeout === 'function') { cachedSetTimeout = setTimeout; } if (typeof global$1.clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch (e) { try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch (e) { // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e) { try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e) { // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while (len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } function nextTick(fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } } // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; var title = 'browser'; var platform = 'browser'; var browser = true; var env = {}; var argv = []; var version = ''; // empty string to avoid regexp issues var versions = {}; var release = {}; var config = {}; function noop() {} var on = noop; var addListener = noop; var once = noop; var off = noop; var removeListener = noop; var removeAllListeners = noop; var emit = noop; function binding(name) { throw new Error('process.binding is not supported'); } function cwd() { return '/'; } function chdir(dir) { throw new Error('process.chdir is not supported'); } function umask() { return 0; } // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js var performance = global$1.performance || {}; var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function () { return new Date().getTime(); }; // generate timestamp or delta // see http://nodejs.org/api/process.html#process_process_hrtime function hrtime(previousTimestamp) { var clocktime = performanceNow.call(performance) * 1e-3; var seconds = Math.floor(clocktime); var nanoseconds = Math.floor(clocktime % 1 * 1e9); if (previousTimestamp) { seconds = seconds - previousTimestamp[0]; nanoseconds = nanoseconds - previousTimestamp[1]; if (nanoseconds < 0) { seconds--; nanoseconds += 1e9; } } return [seconds, nanoseconds]; } var startTime = new Date(); function uptime() { var currentTime = new Date(); var dif = currentTime - startTime; return dif / 1000; } var process = { nextTick: nextTick, title: title, browser: browser, env: env, argv: argv, version: version, versions: versions, on: on, addListener: addListener, once: once, off: off, removeListener: removeListener, removeAllListeners: removeAllListeners, emit: emit, binding: binding, cwd: cwd, chdir: chdir, umask: umask, hrtime: hrtime, platform: platform, release: release, config: config, uptime: uptime }; /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } var _arraySome = arraySome; /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG$1 = 1; var COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!_arraySome(other, function(othValue, othIndex) { if (!_cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } var _equalArrays = equalArrays; /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG$2 = 1; var COMPARE_UNORDERED_FLAG$1 = 2; /** `Object#toString` result references. */ var boolTag$3 = '[object Boolean]'; var dateTag$3 = '[object Date]'; var errorTag$2 = '[object Error]'; var mapTag$4 = '[object Map]'; var numberTag$3 = '[object Number]'; var regexpTag$3 = '[object RegExp]'; var setTag$4 = '[object Set]'; var stringTag$3 = '[object String]'; var symbolTag$3 = '[object Symbol]'; var arrayBufferTag$3 = '[object ArrayBuffer]'; var dataViewTag$4 = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto$2 = _Symbol ? _Symbol.prototype : undefined; var symbolValueOf$1 = symbolProto$2 ? symbolProto$2.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag$4: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag$3: if ((object.byteLength != other.byteLength) || !equalFunc(new _Uint8Array(object), new _Uint8Array(other))) { return false; } return true; case boolTag$3: case dateTag$3: case numberTag$3: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq_1(+object, +other); case errorTag$2: return object.name == other.name && object.message == other.message; case regexpTag$3: case stringTag$3: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag$4: var convert = _mapToArray; case setTag$4: var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2; convert || (convert = _setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG$1; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag$3: if (symbolValueOf$1) { return symbolValueOf$1.call(object) == symbolValueOf$1.call(other); } } return false; } var _equalByTag = equalByTag; /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG$3 = 1; /** Used for built-in method references. */ var objectProto$15 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$12 = objectProto$15.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = _getAllKeys(object), objLength = objProps.length, othProps = _getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty$12.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } var _equalObjects = equalObjects; /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag$3 = '[object Arguments]'; var arrayTag$2 = '[object Array]'; var objectTag$4 = '[object Object]'; /** Used for built-in method references. */ var objectProto$14 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$11 = objectProto$14.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray_1(object), othIsArr = isArray_1(other), objTag = objIsArr ? arrayTag$2 : _getTag(object), othTag = othIsArr ? arrayTag$2 : _getTag(other); objTag = objTag == argsTag$3 ? objectTag$4 : objTag; othTag = othTag == argsTag$3 ? objectTag$4 : othTag; var objIsObj = objTag == objectTag$4, othIsObj = othTag == objectTag$4, isSameTag = objTag == othTag; if (isSameTag && isBuffer_1(object)) { if (!isBuffer_1(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new _Stack); return (objIsArr || isTypedArray_1(object)) ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty$11.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty$11.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new _Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new _Stack); return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); } var _baseIsEqualDeep = baseIsEqualDeep; /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike_1(value) && !isObjectLike_1(other))) { return value !== value && other !== other; } return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } var _baseIsEqual = baseIsEqual; /** * Performs a deep comparison between two values to determine if they are * equivalent. * * **Note:** This method supports comparing arrays, array buffers, booleans, * date objects, error objects, maps, numbers, `Object` objects, regexes, * sets, strings, symbols, and typed arrays. `Object` objects are compared * by their own, not inherited, enumerable properties. Functions and DOM * nodes are compared by strict equality, i.e. `===`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true * * object === other; * // => false */ function isEqual(value, other) { return _baseIsEqual(value, other); } var isEqual_1 = isEqual; /** Used for built-in method references. */ var objectProto$16 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$13 = objectProto$16.hasOwnProperty; /** * The base implementation of `_.has` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { return object != null && hasOwnProperty$13.call(object, key); } var _baseHas = baseHas; /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = _castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = _toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength_1(length) && _isIndex(key, length) && (isArray_1(object) || isArguments_1(object)); } var _hasPath = hasPath; /** * Checks if `path` is a direct property of `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = { 'a': { 'b': 2 } }; * var other = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.has(object, 'a'); * // => true * * _.has(object, 'a.b'); * // => true * * _.has(object, ['a', 'b']); * // => true * * _.has(other, 'a'); * // => false */ function has(object, path) { return object != null && _hasPath(object, path, _baseHas); } var has_1 = has; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ 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. */ var emptyFunction = 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; }; var emptyFunction_1 = emptyFunction; function invariant(condition, format, a, b, c, d, e, f) { 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(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } var invariant_1 = invariant; /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty$14 = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty$14.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; var ReactPropTypesSecret_1 = ReactPropTypesSecret; var factoryWithThrowingShims = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret_1) { // It is still safe when called from React. return; } invariant_1( false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); } shim.isRequired = shim; function getShim() { return shim; } // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim }; ReactPropTypes.checkPropTypes = emptyFunction_1; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; var propTypes = createCommonjsModule(function (module) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = factoryWithThrowingShims(); } }); /** `Object#toString` result references. */ var mapTag$5 = '[object Map]'; var setTag$5 = '[object Set]'; /** Used for built-in method references. */ var objectProto$17 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$15 = objectProto$17.hasOwnProperty; /** * Checks if `value` is an empty object, collection, map, or set. * * Objects are considered empty if they have no own enumerable string keyed * properties. * * Array-like values such as `arguments` objects, arrays, buffers, strings, or * jQuery-like collections are considered empty if they have a `length` of `0`. * Similarly, maps and sets are considered empty if they have a `size` of `0`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * * _.isEmpty(null); * // => true * * _.isEmpty(true); * // => true * * _.isEmpty(1); * // => true * * _.isEmpty([1, 2, 3]); * // => false * * _.isEmpty({ 'a': 1 }); * // => false */ function isEmpty(value) { if (value == null) { return true; } if (isArrayLike_1(value) && (isArray_1(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer_1(value) || isTypedArray_1(value) || isArguments_1(value))) { return !value.length; } var tag = _getTag(value); if (tag == mapTag$5 || tag == setTag$5) { return !value.size; } if (_isPrototype(value)) { return !_baseKeys(value).length; } for (var key in value) { if (hasOwnProperty$15.call(value, key)) { return false; } } return true; } var isEmpty_1 = isEmpty; // From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js function shallowEqual(objA, objB) { if (objA === objB) { return true; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. var hasOwn = Object.prototype.hasOwnProperty; for (var i = 0; i < keysA.length; i++) { if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { return false; } } return true; } function getDisplayName(Component$$1) { return Component$$1.displayName || Component$$1.name || 'UnknownComponent'; } function removeEmptyKey(obj) { Object.keys(obj).forEach(function (key) { var value = obj[key]; if (isEmpty_1(value) && isPlainObject_1(value)) { delete obj[key]; } else if (isPlainObject_1(value)) { removeEmptyKey(value); } }); return obj; } var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; var createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var defineProperty$2 = function (obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }; var possibleConstructorReturn = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }; var slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var toConsumableArray = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }; /** * @typedef {object} ConnectorDescription * @property {string} displayName - the displayName used by the wrapper * @property {function} refine - a function to filter the local state * @property {function} getSearchParameters - function transforming the local state to a SearchParameters * @property {function} getMetadata - metadata of the widget * @property {function} transitionState - hook after the state has changed * @property {function} getProvidedProps - transform the state into props passed to the wrapped component. * Receives (props, widgetStates, searchState, metadata) and returns the local state. * @property {function} getId - Receives props and return the id that will be used to identify the widget * @property {function} cleanUp - hook when the widget will unmount. Receives (props, searchState) and return a cleaned state. * @property {object} propTypes - PropTypes forwarded to the wrapped component. * @property {object} defaultProps - default values for the props */ /** * Connectors are the HOC used to transform React components * into InstantSearch widgets. * In order to simplify the construction of such connectors * `createConnector` takes a description and transform it into * a connector. * @param {ConnectorDescription} connectorDesc the description of the connector * @return {Connector} a function that wraps a component into * an instantsearch connected one. */ function createConnector(connectorDesc) { if (!connectorDesc.displayName) { throw new Error('`createConnector` requires you to provide a `displayName` property.'); } var hasRefine = has_1(connectorDesc, 'refine'); var hasSearchForFacetValues = has_1(connectorDesc, 'searchForFacetValues'); var hasSearchParameters = has_1(connectorDesc, 'getSearchParameters'); var hasMetadata = has_1(connectorDesc, 'getMetadata'); var hasTransitionState = has_1(connectorDesc, 'transitionState'); var hasCleanUp = has_1(connectorDesc, 'cleanUp'); var isWidget = hasSearchParameters || hasMetadata || hasTransitionState; return function (Composed) { var _class, _temp, _initialiseProps; return _temp = _class = function (_Component) { inherits(Connector, _Component); function Connector(props, context) { classCallCheck(this, Connector); var _this = possibleConstructorReturn(this, (Connector.__proto__ || Object.getPrototypeOf(Connector)).call(this, props, context)); _initialiseProps.call(_this); var _context$ais = context.ais, store = _context$ais.store, widgetsManager = _context$ais.widgetsManager; var canRender = false; _this.state = { props: _this.getProvidedProps(_extends({}, props, { canRender: canRender })), canRender: canRender // use to know if a component is rendered (browser), or not (server). }; _this.unsubscribe = store.subscribe(function () { if (_this.state.canRender) { _this.setState({ props: _this.getProvidedProps(_extends({}, _this.props, { canRender: _this.state.canRender })) }); } }); if (isWidget) { _this.unregisterWidget = widgetsManager.registerWidget(_this); } return _this; } createClass(Connector, [{ key: 'getMetadata', value: function getMetadata(nextWidgetsState) { if (hasMetadata) { return connectorDesc.getMetadata.call(this, this.props, nextWidgetsState); } return {}; } }, { key: 'getSearchParameters', value: function getSearchParameters(searchParameters) { if (hasSearchParameters) { return connectorDesc.getSearchParameters.call(this, searchParameters, this.props, this.context.ais.store.getState().widgets); } return null; } }, { key: 'transitionState', value: function transitionState(prevWidgetsState, nextWidgetsState) { if (hasTransitionState) { return connectorDesc.transitionState.call(this, this.props, prevWidgetsState, nextWidgetsState); } return nextWidgetsState; } }, { key: 'componentDidMount', value: function componentDidMount() { this.setState({ canRender: true }); } }, { key: 'componentWillMount', value: function componentWillMount() { if (connectorDesc.getSearchParameters) { this.context.ais.onSearchParameters(connectorDesc.getSearchParameters, this.context, this.props); } } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if (!isEqual_1(this.props, nextProps)) { this.setState({ props: this.getProvidedProps(nextProps) }); if (isWidget) { // Since props might have changed, we need to re-run getSearchParameters // and getMetadata with the new props. this.context.ais.widgetsManager.update(); if (connectorDesc.transitionState) { this.context.ais.onSearchStateChange(connectorDesc.transitionState.call(this, nextProps, this.context.ais.store.getState().widgets, this.context.ais.store.getState().widgets)); } } } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.unsubscribe(); if (isWidget) { this.unregisterWidget(); // will schedule an update if (hasCleanUp) { var newState = connectorDesc.cleanUp.call(this, this.props, this.context.ais.store.getState().widgets); this.context.ais.store.setState(_extends({}, this.context.ais.store.getState(), { widgets: newState })); this.context.ais.onSearchStateChange(removeEmptyKey(newState)); } } } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps, nextState) { var propsEqual = shallowEqual(this.props, nextProps); if (this.state.props === null || nextState.props === null) { if (this.state.props === nextState.props) { return !propsEqual; } return true; } return !propsEqual || !shallowEqual(this.state.props, nextState.props); } }, { key: 'render', value: function render() { var _this2 = this; if (this.state.props === null) { return null; } var refineProps = hasRefine ? { refine: this.refine, createURL: this.createURL } : {}; var searchForFacetValuesProps = hasSearchForFacetValues ? { searchForItems: this.searchForFacetValues, searchForFacetValues: function searchForFacetValues(facetName, query) { _this2.searchForFacetValues(facetName, query); } } : {}; return React__default.createElement(Composed, _extends({}, this.props, this.state.props, refineProps, searchForFacetValuesProps)); } }]); return Connector; }(React.Component), _class.displayName = connectorDesc.displayName + '(' + getDisplayName(Composed) + ')', _class.defaultClassNames = Composed.defaultClassNames, _class.propTypes = connectorDesc.propTypes, _class.defaultProps = connectorDesc.defaultProps, _class.contextTypes = { // @TODO: more precise state manager propType ais: propTypes.object.isRequired, multiIndexContext: propTypes.object }, _initialiseProps = function _initialiseProps() { var _this3 = this; this.getProvidedProps = function (props) { var store = _this3.context.ais.store; var _store$getState = store.getState(), results = _store$getState.results, searching = _store$getState.searching, error = _store$getState.error, widgets = _store$getState.widgets, metadata = _store$getState.metadata, resultsFacetValues = _store$getState.resultsFacetValues, searchingForFacetValues = _store$getState.searchingForFacetValues, isSearchStalled = _store$getState.isSearchStalled; var searchResults = { results: results, searching: searching, error: error, searchingForFacetValues: searchingForFacetValues, isSearchStalled: isSearchStalled }; return connectorDesc.getProvidedProps.call(_this3, props, widgets, searchResults, metadata, resultsFacetValues); }; this.refine = function () { var _connectorDesc$refine; for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this3.context.ais.onInternalStateUpdate((_connectorDesc$refine = connectorDesc.refine).call.apply(_connectorDesc$refine, [_this3, _this3.props, _this3.context.ais.store.getState().widgets].concat(args))); }; this.searchForFacetValues = function () { for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } _this3.context.ais.onSearchForFacetValues(connectorDesc.searchForFacetValues.apply(connectorDesc, [_this3.props, _this3.context.ais.store.getState().widgets].concat(args))); }; this.createURL = function () { var _connectorDesc$refine2; for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } return _this3.context.ais.createHrefForState((_connectorDesc$refine2 = connectorDesc.refine).call.apply(_connectorDesc$refine2, [_this3, _this3.props, _this3.context.ais.store.getState().widgets].concat(args))); }; this.cleanUp = function () { var _connectorDesc$cleanU; for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { args[_key4] = arguments[_key4]; } return (_connectorDesc$cleanU = connectorDesc.cleanUp).call.apply(_connectorDesc$cleanU, [_this3].concat(args)); }; }, _temp; }; } /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get$1(object, path, defaultValue) { var result = object == null ? undefined : _baseGet(object, path); return result === undefined ? defaultValue : result; } var get_1 = get$1; function getIndex(context) { return context && context.multiIndexContext ? context.multiIndexContext.targetedIndex : context.ais.mainTargetedIndex; } function getResults(searchResults, context) { if (searchResults.results && !searchResults.results.hits) { return searchResults.results[getIndex(context)] ? searchResults.results[getIndex(context)] : null; } else { return searchResults.results ? searchResults.results : null; } } function hasMultipleIndex(context) { return context && context.multiIndexContext; } // eslint-disable-next-line max-params function refineValue(searchState, nextRefinement, context, resetPage, namespace) { if (hasMultipleIndex(context)) { return namespace ? refineMultiIndexWithNamespace(searchState, nextRefinement, context, resetPage, namespace) : refineMultiIndex(searchState, nextRefinement, context, resetPage); } else { // When we have a multi index page with shared widgets we should also // reset their page to 1 if the resetPage is provided. Otherwise the // indices will always be reset // see: https://github.com/algolia/react-instantsearch/issues/310 // see: https://github.com/algolia/react-instantsearch/issues/637 if (searchState.indices && resetPage) { Object.keys(searchState.indices).forEach(function (targetedIndex) { searchState = refineValue(searchState, { page: 1 }, { multiIndexContext: { targetedIndex: targetedIndex } }, true, namespace); }); } return namespace ? refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) : refineSingleIndex(searchState, nextRefinement, resetPage); } } function refineMultiIndex(searchState, nextRefinement, context, resetPage) { var page = resetPage ? { page: 1 } : undefined; var index = getIndex(context); var state = has_1(searchState, 'indices.' + index) ? _extends({}, searchState.indices, defineProperty$2({}, index, _extends({}, searchState.indices[index], nextRefinement, page))) : _extends({}, searchState.indices, defineProperty$2({}, index, _extends({}, nextRefinement, page))); return _extends({}, searchState, { indices: state }); } function refineSingleIndex(searchState, nextRefinement, resetPage) { var page = resetPage ? { page: 1 } : undefined; return _extends({}, searchState, nextRefinement, page); } // eslint-disable-next-line max-params function refineMultiIndexWithNamespace(searchState, nextRefinement, context, resetPage, namespace) { var _babelHelpers$extends3; var index = getIndex(context); var page = resetPage ? { page: 1 } : undefined; var state = has_1(searchState, 'indices.' + index) ? _extends({}, searchState.indices, defineProperty$2({}, index, _extends({}, searchState.indices[index], (_babelHelpers$extends3 = {}, defineProperty$2(_babelHelpers$extends3, namespace, _extends({}, searchState.indices[index][namespace], nextRefinement)), defineProperty$2(_babelHelpers$extends3, 'page', 1), _babelHelpers$extends3)))) : _extends({}, searchState.indices, defineProperty$2({}, index, _extends(defineProperty$2({}, namespace, nextRefinement), page))); return _extends({}, searchState, { indices: state }); } function refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) { var page = resetPage ? { page: 1 } : undefined; return _extends({}, searchState, defineProperty$2({}, namespace, _extends({}, searchState[namespace], nextRefinement)), page); } function getNamespaceAndAttributeName(id) { var parts = id.match(/^([^.]*)\.(.*)/); var namespace = parts && parts[1]; var attributeName = parts && parts[2]; return { namespace: namespace, attributeName: attributeName }; } // eslint-disable-next-line max-params function getCurrentRefinementValue(props, searchState, context, id, defaultValue, refinementsCallback) { var index = getIndex(context); var _getNamespaceAndAttri = getNamespaceAndAttributeName(id), namespace = _getNamespaceAndAttri.namespace, attributeName = _getNamespaceAndAttri.attributeName; var refinements = hasMultipleIndex(context) && searchState.indices && namespace && searchState.indices['' + index] && has_1(searchState.indices['' + index][namespace], '' + attributeName) || hasMultipleIndex(context) && searchState.indices && has_1(searchState, 'indices.' + index + '.' + id) || !hasMultipleIndex(context) && namespace && has_1(searchState[namespace], attributeName) || !hasMultipleIndex(context) && has_1(searchState, id); if (refinements) { var currentRefinement = void 0; if (hasMultipleIndex(context)) { currentRefinement = namespace ? get_1(searchState.indices['' + index][namespace], attributeName) : get_1(searchState.indices[index], id); } else { currentRefinement = namespace ? get_1(searchState[namespace], attributeName) : get_1(searchState, id); } return refinementsCallback(currentRefinement); } if (props.defaultRefinement) { return props.defaultRefinement; } return defaultValue; } function cleanUpValue(searchState, context, id) { var index = getIndex(context); var _getNamespaceAndAttri2 = getNamespaceAndAttributeName(id), namespace = _getNamespaceAndAttri2.namespace, attributeName = _getNamespaceAndAttri2.attributeName; if (hasMultipleIndex(context)) { return namespace ? _extends({}, searchState, { indices: _extends({}, searchState.indices, defineProperty$2({}, index, _extends({}, searchState.indices[index], defineProperty$2({}, namespace, omit_1(searchState.indices[index][namespace], '' + attributeName))))) }) : omit_1(searchState, 'indices.' + index + '.' + id); } else { return namespace ? _extends({}, searchState, defineProperty$2({}, namespace, omit_1(searchState[namespace], '' + attributeName))) : omit_1(searchState, '' + id); } } function getId() { return 'configure'; } var connectConfigure = createConnector({ displayName: 'AlgoliaConfigure', getProvidedProps: function getProvidedProps() { return {}; }, getSearchParameters: function getSearchParameters(searchParameters, props) { var items = omit_1(props, 'children'); return searchParameters.setQueryParameters(items); }, transitionState: function transitionState(props, prevSearchState, nextSearchState) { var id = getId(); var items = omit_1(props, 'children'); var nonPresentKeys = this._props ? difference_1(keys_1(this._props), keys_1(props)) : []; this._props = props; var nextValue = defineProperty$2({}, id, _extends({}, omit_1(nextSearchState[id], nonPresentKeys), items)); return refineValue(nextSearchState, nextValue, this.context); }, cleanUp: function cleanUp(props, searchState) { var id = getId(); var index = getIndex(this.context); var subState = hasMultipleIndex(this.context) && searchState.indices ? searchState.indices[index] : searchState; var configureKeys = subState && subState[id] ? Object.keys(subState[id]) : []; var configureState = configureKeys.reduce(function (acc, item) { if (!props[item]) { acc[item] = subState[id][item]; } return acc; }, {}); var nextValue = defineProperty$2({}, id, configureState); return refineValue(searchState, nextValue, this.context); } }); /** * connectCurrentRefinements connector provides the logic to build a widget that will * give the user the ability to remove all or some of the filters that were * set. * @name connectCurrentRefinements * @kind connector * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @propType {function} [clearsQuery=false] - Pass true to also clear the search query * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {array.<{label: string, attributeName: string, currentRefinement: string || object, items: array, value: function}>} items - all the filters, the `value` is to pass to the `refine` function for removing all currentrefinements, `label` is for the display. When existing several refinements for the same atribute name, then you get a nested `items` object that contains a `label` and a `value` function to use to remove a single filter. `attributeName` and `currentRefinement` are metadata containing row values. * @providedPropType {string} query - the search query */ var connectCurrentRefinements = createConnector({ displayName: 'AlgoliaCurrentRefinements', propTypes: { transformItems: propTypes.func }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata) { var items = metadata.reduce(function (res, meta) { if (typeof meta.items !== 'undefined') { if (!props.clearsQuery && meta.id === 'query') { return res; } else { if (props.clearsQuery && meta.id === 'query' && meta.items[0].currentRefinement === '') { return res; } return res.concat(meta.items); } } return res; }, []); return { items: props.transformItems ? props.transformItems(items) : items, canRefine: items.length > 0 }; }, refine: function refine(props, searchState, items) { // `value` corresponds to our internal clear function computed in each connector metadata. var refinementsToClear = items instanceof Array ? items.map(function (item) { return item.value; }) : [items]; return refinementsToClear.reduce(function (res, clear) { return clear(res); }, searchState); } }); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** * The base implementation of methods like `_.intersection`, without support * for iteratee shorthands, that accepts an array of arrays to inspect. * * @private * @param {Array} arrays The arrays to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of shared values. */ function baseIntersection(arrays, iteratee, comparator) { var includes = comparator ? _arrayIncludesWith : _arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = []; while (othIndex--) { var array = arrays[othIndex]; if (othIndex && iteratee) { array = _arrayMap(array, _baseUnary(iteratee)); } maxLength = nativeMin(array.length, maxLength); caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) ? new _SetCache(othIndex && array) : undefined; } array = arrays[0]; var index = -1, seen = caches[0]; outer: while (++index < length && result.length < maxLength) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = (comparator || value !== 0) ? value : 0; if (!(seen ? _cacheHas(seen, computed) : includes(result, computed, comparator) )) { othIndex = othLength; while (--othIndex) { var cache = caches[othIndex]; if (!(cache ? _cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator)) ) { continue outer; } } if (seen) { seen.push(computed); } result.push(value); } } return result; } var _baseIntersection = baseIntersection; /** * Casts `value` to an empty array if it's not an array like object. * * @private * @param {*} value The value to inspect. * @returns {Array|Object} Returns the cast array-like object. */ function castArrayLikeObject(value) { return isArrayLikeObject_1(value) ? value : []; } var _castArrayLikeObject = castArrayLikeObject; /** * Creates an array of unique values that are included in all given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. The order and references of result values are * determined by the first array. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @returns {Array} Returns the new array of intersecting values. * @example * * _.intersection([2, 1], [2, 3]); * // => [2] */ var intersection = _baseRest(function(arrays) { var mapped = _arrayMap(arrays, _castArrayLikeObject); return (mapped.length && mapped[0] === arrays[0]) ? _baseIntersection(mapped) : []; }); var intersection_1 = intersection; /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } var _createBaseFor = createBaseFor; /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = _createBaseFor(); var _baseFor = baseFor; /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && _baseFor(object, iteratee, keys_1); } var _baseForOwn = baseForOwn; /** * Casts `value` to `identity` if it's not a function. * * @private * @param {*} value The value to inspect. * @returns {Function} Returns cast function. */ function castFunction(value) { return typeof value == 'function' ? value : identity_1; } var _castFunction = castFunction; /** * Iterates over own enumerable string keyed properties of an object and * invokes `iteratee` for each property. The iteratee is invoked with three * arguments: (value, key, object). Iteratee functions may exit iteration * early by explicitly returning `false`. * * @static * @memberOf _ * @since 0.3.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. * @see _.forOwnRight * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.forOwn(new Foo, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { return object && _baseForOwn(object, _castFunction(iteratee)); } var forOwn_1 = forOwn; /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike_1(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } var _createBaseEach = createBaseEach; /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = _createBaseEach(_baseForOwn); var _baseEach = baseEach; /** * Iterates over elements of `collection` and invokes `iteratee` for each element. * The iteratee is invoked with three arguments: (value, index|key, collection). * Iteratee functions may exit iteration early by explicitly returning `false`. * * **Note:** As with other "Collections" methods, objects with a "length" * property are iterated like arrays. To avoid this behavior use `_.forIn` * or `_.forOwn` for object iteration. * * @static * @memberOf _ * @since 0.1.0 * @alias each * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. * @see _.forEachRight * @example * * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. * * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { var func = isArray_1(collection) ? _arrayEach : _baseEach; return func(collection, _castFunction(iteratee)); } var forEach_1 = forEach; /** * The base implementation of `_.filter` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function baseFilter(collection, predicate) { var result = []; _baseEach(collection, function(value, index, collection) { if (predicate(value, index, collection)) { result.push(value); } }); return result; } var _baseFilter = baseFilter; /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG$4 = 1; var COMPARE_UNORDERED_FLAG$2 = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new _Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$4 | COMPARE_UNORDERED_FLAG$2, customizer, stack) : result )) { return false; } } } return true; } var _baseIsMatch = baseIsMatch; /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject_1(value); } var _isStrictComparable = isStrictComparable; /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys_1(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, _isStrictComparable(value)]; } return result; } var _getMatchData = getMatchData; /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } var _matchesStrictComparable = matchesStrictComparable; /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = _getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return _matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || _baseIsMatch(object, source, matchData); }; } var _baseMatches = baseMatches; /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } var _baseHasIn = baseHasIn; /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && _hasPath(object, path, _baseHasIn); } var hasIn_1 = hasIn; /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG$5 = 1; var COMPARE_UNORDERED_FLAG$3 = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (_isKey(path) && _isStrictComparable(srcValue)) { return _matchesStrictComparable(_toKey(path), srcValue); } return function(object) { var objValue = get_1(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn_1(object, path) : _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$5 | COMPARE_UNORDERED_FLAG$3); }; } var _baseMatchesProperty = baseMatchesProperty; /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } var _baseProperty = baseProperty; /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return _baseGet(object, path); }; } var _basePropertyDeep = basePropertyDeep; /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path); } var property_1 = property; /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity_1; } if (typeof value == 'object') { return isArray_1(value) ? _baseMatchesProperty(value[0], value[1]) : _baseMatches(value); } return property_1(value); } var _baseIteratee = baseIteratee; /** * Iterates over elements of `collection`, returning an array of all elements * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * **Note:** Unlike `_.remove`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false } * ]; * * _.filter(users, function(o) { return !o.active; }); * // => objects for ['fred'] * * // The `_.matches` iteratee shorthand. * _.filter(users, { 'age': 36, 'active': true }); * // => objects for ['barney'] * * // The `_.matchesProperty` iteratee shorthand. * _.filter(users, ['active', false]); * // => objects for ['fred'] * * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] */ function filter(collection, predicate) { var func = isArray_1(collection) ? _arrayFilter : _baseFilter; return func(collection, _baseIteratee(predicate, 3)); } var filter_1 = filter; /** * The base implementation of `_.map` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { var index = -1, result = isArrayLike_1(collection) ? Array(collection.length) : []; _baseEach(collection, function(value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } var _baseMap = baseMap; /** * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * * function square(n) { * return n * n; * } * * _.map([4, 8], square); * // => [16, 64] * * _.map({ 'a': 4, 'b': 8 }, square); * // => [16, 64] (iteration order is not guaranteed) * * var users = [ * { 'user': 'barney' }, * { 'user': 'fred' } * ]; * * // The `_.property` iteratee shorthand. * _.map(users, 'user'); * // => ['barney', 'fred'] */ function map(collection, iteratee) { var func = isArray_1(collection) ? _arrayMap : _baseMap; return func(collection, _baseIteratee(iteratee, 3)); } var map_1 = map; /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} accumulator The initial value. * @param {boolean} initAccum Specify using the first or last element of * `collection` as the initial value. * @param {Function} eachFunc The function to iterate over `collection`. * @returns {*} Returns the accumulated value. */ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { eachFunc(collection, function(value, index, collection) { accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection); }); return accumulator; } var _baseReduce = baseReduce; /** * Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` * is not given, the first element of `collection` is used as the initial * value. The iteratee is invoked with four arguments: * (accumulator, value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.reduce`, `_.reduceRight`, and `_.transform`. * * The guarded methods are: * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, * and `sortBy` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. * @see _.reduceRight * @example * * _.reduce([1, 2], function(sum, n) { * return sum + n; * }, 0); * // => 3 * * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { * (result[value] || (result[value] = [])).push(key); * return result; * }, {}); * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) */ function reduce(collection, iteratee, accumulator) { var func = isArray_1(collection) ? _arrayReduce : _baseReduce, initAccum = arguments.length < 3; return func(collection, _baseIteratee(iteratee, 4), accumulator, initAccum, _baseEach); } var reduce_1 = reduce; /** Used as references for various `Number` constants. */ var NAN = 0 / 0; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol_1(value)) { return NAN; } if (isObject_1(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject_1(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } var toNumber_1 = toNumber; /** Used as references for various `Number` constants. */ var INFINITY$2 = 1 / 0; var MAX_INTEGER = 1.7976931348623157e+308; /** * Converts `value` to a finite number. * * @static * @memberOf _ * @since 4.12.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted number. * @example * * _.toFinite(3.2); * // => 3.2 * * _.toFinite(Number.MIN_VALUE); * // => 5e-324 * * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * * _.toFinite('3.2'); * // => 3.2 */ function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber_1(value); if (value === INFINITY$2 || value === -INFINITY$2) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } return value === value ? value : 0; } var toFinite_1 = toFinite; /** * Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); * // => 0 * * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { var result = toFinite_1(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; } var toInteger_1 = toInteger; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax$1 = Math.max; /** * Gets the index at which the first occurrence of `value` is found in `array` * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the * offset from the end of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. * @example * * _.indexOf([1, 2, 1, 2], 2); * // => 1 * * // Search from the `fromIndex`. * _.indexOf([1, 2, 1, 2], 2, 2); * // => 3 */ function indexOf(array, value, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger_1(fromIndex); if (index < 0) { index = nativeMax$1(length + index, 0); } return _baseIndexOf(array, value, index); } var indexOf_1 = indexOf; /** `Object#toString` result references. */ var numberTag$4 = '[object Number]'; /** * Checks if `value` is classified as a `Number` primitive or object. * * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are * classified as numbers, use the `_.isFinite` method. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); * // => true * * _.isNumber(Number.MIN_VALUE); * // => true * * _.isNumber(Infinity); * // => true * * _.isNumber('3'); * // => false */ function isNumber(value) { return typeof value == 'number' || (isObjectLike_1(value) && _baseGetTag(value) == numberTag$4); } var isNumber_1 = isNumber; /** * Checks if `value` is `NaN`. * * **Note:** This method is based on * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for * `undefined` and other non-number values. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. * @example * * _.isNaN(NaN); * // => true * * _.isNaN(new Number(NaN)); * // => true * * isNaN(undefined); * // => true * * _.isNaN(undefined); * // => false */ function isNaN$1(value) { // An `NaN` primitive is the only value that is not equal to itself. // Perform the `toStringTag` check first to avoid errors with some // ActiveX objects in IE. return isNumber_1(value) && value != +value; } var _isNaN = isNaN$1; /** * Checks if `value` is `undefined`. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. * @example * * _.isUndefined(void 0); * // => true * * _.isUndefined(null); * // => false */ function isUndefined(value) { return value === undefined; } var isUndefined_1 = isUndefined; /** `Object#toString` result references. */ var stringTag$4 = '[object String]'; /** * Checks if `value` is classified as a `String` primitive or object. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); * // => true * * _.isString(1); * // => false */ function isString(value) { return typeof value == 'string' || (!isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag$4); } var isString_1 = isString; /** * Creates a `_.find` or `_.findLast` function. * * @private * @param {Function} findIndexFunc The function to find the collection index. * @returns {Function} Returns the new find function. */ function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object(collection); if (!isArrayLike_1(collection)) { var iteratee = _baseIteratee(predicate, 3); collection = keys_1(collection); predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } var index = findIndexFunc(collection, predicate, fromIndex); return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; }; } var _createFind = createFind; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax$2 = Math.max; /** * This method is like `_.find` except that it returns the index of the first * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ * @since 1.1.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * _.findIndex(users, function(o) { return o.user == 'barney'; }); * // => 0 * * // The `_.matches` iteratee shorthand. * _.findIndex(users, { 'user': 'fred', 'active': false }); * // => 1 * * // The `_.matchesProperty` iteratee shorthand. * _.findIndex(users, ['active', false]); * // => 0 * * // The `_.property` iteratee shorthand. * _.findIndex(users, 'active'); * // => 2 */ function findIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger_1(fromIndex); if (index < 0) { index = nativeMax$2(length + index, 0); } return _baseFindIndex(array, _baseIteratee(predicate, 3), index); } var findIndex_1 = findIndex; /** * Iterates over elements of `collection`, returning the first element * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false }, * { 'user': 'pebbles', 'age': 1, 'active': true } * ]; * * _.find(users, function(o) { return o.age < 40; }); * // => object for 'barney' * * // The `_.matches` iteratee shorthand. * _.find(users, { 'age': 1, 'active': true }); * // => object for 'pebbles' * * // The `_.matchesProperty` iteratee shorthand. * _.find(users, ['active', false]); * // => object for 'fred' * * // The `_.property` iteratee shorthand. * _.find(users, 'active'); * // => object for 'barney' */ var find = _createFind(findIndex_1); var find_1 = find; /** * Casts `array` to a slice if it's needed. * * @private * @param {Array} array The array to inspect. * @param {number} start The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the cast slice. */ function castSlice(array, start, end) { var length = array.length; end = end === undefined ? length : end; return (!start && end >= length) ? array : _baseSlice(array, start, end); } var _castSlice = castSlice; /** * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol * that is not found in the character symbols. * * @private * @param {Array} strSymbols The string symbols to inspect. * @param {Array} chrSymbols The character symbols to find. * @returns {number} Returns the index of the last unmatched string symbol. */ function charsEndIndex(strSymbols, chrSymbols) { var index = strSymbols.length; while (index-- && _baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} return index; } var _charsEndIndex = charsEndIndex; /** * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol * that is not found in the character symbols. * * @private * @param {Array} strSymbols The string symbols to inspect. * @param {Array} chrSymbols The character symbols to find. * @returns {number} Returns the index of the first unmatched string symbol. */ function charsStartIndex(strSymbols, chrSymbols) { var index = -1, length = strSymbols.length; while (++index < length && _baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} return index; } var _charsStartIndex = charsStartIndex; /** * Converts an ASCII `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function asciiToArray(string) { return string.split(''); } var _asciiToArray = asciiToArray; /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff'; var rsComboMarksRange = '\\u0300-\\u036f'; var reComboHalfMarksRange = '\\ufe20-\\ufe2f'; var rsComboSymbolsRange = '\\u20d0-\\u20ff'; var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; var rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsZWJ = '\\u200d'; /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** * Checks if `string` contains Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a symbol is found, else `false`. */ function hasUnicode(string) { return reHasUnicode.test(string); } var _hasUnicode = hasUnicode; /** Used to compose unicode character classes. */ var rsAstralRange$1 = '\\ud800-\\udfff'; var rsComboMarksRange$1 = '\\u0300-\\u036f'; var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f'; var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff'; var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1; var rsVarRange$1 = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsAstral = '[' + rsAstralRange$1 + ']'; var rsCombo = '[' + rsComboRange$1 + ']'; var rsFitz = '\\ud83c[\\udffb-\\udfff]'; var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')'; var rsNonAstral = '[^' + rsAstralRange$1 + ']'; var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'; var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'; var rsZWJ$1 = '\\u200d'; /** Used to compose unicode regexes. */ var reOptMod = rsModifier + '?'; var rsOptVar = '[' + rsVarRange$1 + ']?'; var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*'; var rsSeq = rsOptVar + reOptMod + rsOptJoin; var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** * Converts a Unicode `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function unicodeToArray(string) { return string.match(reUnicode) || []; } var _unicodeToArray = unicodeToArray; /** * Converts `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function stringToArray(string) { return _hasUnicode(string) ? _unicodeToArray(string) : _asciiToArray(string); } var _stringToArray = stringToArray; /** Used to match leading and trailing whitespace. */ var reTrim$1 = /^\s+|\s+$/g; /** * Removes leading and trailing whitespace or specified characters from `string`. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to trim. * @param {string} [chars=whitespace] The characters to trim. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {string} Returns the trimmed string. * @example * * _.trim(' abc '); * // => 'abc' * * _.trim('-_-abc-_-', '_-'); * // => 'abc' * * _.map([' foo ', ' bar '], _.trim); * // => ['foo', 'bar'] */ function trim(string, chars, guard) { string = toString_1(string); if (string && (guard || chars === undefined)) { return string.replace(reTrim$1, ''); } if (!string || !(chars = _baseToString(chars))) { return string; } var strSymbols = _stringToArray(string), chrSymbols = _stringToArray(chars), start = _charsStartIndex(strSymbols, chrSymbols), end = _charsEndIndex(strSymbols, chrSymbols) + 1; return _castSlice(strSymbols, start, end).join(''); } var trim_1 = trim; /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject_1(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike_1(object) && _isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq_1(object[index], value); } return false; } var _isIterateeCall = isIterateeCall; /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return _baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && _isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } var _createAssigner = createAssigner; /** * This method is like `_.assignIn` except that it accepts `customizer` * which is invoked to produce the assigned values. If `customizer` returns * `undefined`, assignment is handled by the method instead. The `customizer` * is invoked with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.0.0 * @alias extendWith * @category Object * @param {Object} object The destination object. * @param {...Object} sources The source objects. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. * @see _.assignWith * @example * * function customizer(objValue, srcValue) { * return _.isUndefined(objValue) ? srcValue : objValue; * } * * var defaults = _.partialRight(_.assignInWith, customizer); * * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ var assignInWith = _createAssigner(function(object, source, srcIndex, customizer) { _copyObject(source, keysIn_1(source), object, customizer); }); var assignInWith_1 = assignInWith; /** Used for built-in method references. */ var objectProto$18 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$16 = objectProto$18.hasOwnProperty; /** * Used by `_.defaults` to customize its `_.assignIn` use to assign properties * of source objects to the destination object for all destination properties * that resolve to `undefined`. * * @private * @param {*} objValue The destination value. * @param {*} srcValue The source value. * @param {string} key The key of the property to assign. * @param {Object} object The parent object of `objValue`. * @returns {*} Returns the value to assign. */ function customDefaultsAssignIn(objValue, srcValue, key, object) { if (objValue === undefined || (eq_1(objValue, objectProto$18[key]) && !hasOwnProperty$16.call(object, key))) { return srcValue; } return objValue; } var _customDefaultsAssignIn = customDefaultsAssignIn; /** * Assigns own and inherited enumerable string keyed properties of source * objects to the destination object for all destination properties that * resolve to `undefined`. Source objects are applied from left to right. * Once a property is set, additional values of the same property are ignored. * * **Note:** This method mutates `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.defaultsDeep * @example * * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ var defaults$1 = _baseRest(function(args) { args.push(undefined, _customDefaultsAssignIn); return _apply(assignInWith_1, undefined, args); }); var defaults_1 = defaults$1; /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq_1(object[key], value)) || (value === undefined && !(key in object))) { _baseAssignValue(object, key, value); } } var _assignMergeValue = assignMergeValue; /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return _copyObject(value, keysIn_1(value)); } var toPlainObject_1 = toPlainObject; /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = object[key], srcValue = source[key], stacked = stack.get(srcValue); if (stacked) { _assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = isArray_1(srcValue), isBuff = !isArr && isBuffer_1(srcValue), isTyped = !isArr && !isBuff && isTypedArray_1(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray_1(objValue)) { newValue = objValue; } else if (isArrayLikeObject_1(objValue)) { newValue = _copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = _cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = _cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject_1(srcValue) || isArguments_1(srcValue)) { newValue = objValue; if (isArguments_1(objValue)) { newValue = toPlainObject_1(objValue); } else if (!isObject_1(objValue) || (srcIndex && isFunction_1(objValue))) { newValue = _initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } _assignMergeValue(object, key, newValue); } var _baseMergeDeep = baseMergeDeep; /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } _baseFor(source, function(srcValue, key) { if (isObject_1(srcValue)) { stack || (stack = new _Stack); _baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(object[key], srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } _assignMergeValue(object, key, newValue); } }, keysIn_1); } var _baseMerge = baseMerge; /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = _createAssigner(function(object, source, srcIndex) { _baseMerge(object, source, srcIndex); }); var merge_1 = merge; function valToNumber(v) { if (isNumber_1(v)) { return v; } else if (isString_1(v)) { return parseFloat(v); } else if (isArray_1(v)) { return map_1(v, valToNumber); } throw new Error('The value should be a number, a parseable string or an array of those.'); } var valToNumber_1 = valToNumber; function filterState(state, filters) { var partialState = {}; var attributeFilters = filter_1(filters, function(f) { return f.indexOf('attribute:') !== -1; }); var attributes = map_1(attributeFilters, function(aF) { return aF.split(':')[1]; }); if (indexOf_1(attributes, '*') === -1) { forEach_1(attributes, function(attr) { if (state.isConjunctiveFacet(attr) && state.isFacetRefined(attr)) { if (!partialState.facetsRefinements) partialState.facetsRefinements = {}; partialState.facetsRefinements[attr] = state.facetsRefinements[attr]; } if (state.isDisjunctiveFacet(attr) && state.isDisjunctiveFacetRefined(attr)) { if (!partialState.disjunctiveFacetsRefinements) partialState.disjunctiveFacetsRefinements = {}; partialState.disjunctiveFacetsRefinements[attr] = state.disjunctiveFacetsRefinements[attr]; } if (state.isHierarchicalFacet(attr) && state.isHierarchicalFacetRefined(attr)) { if (!partialState.hierarchicalFacetsRefinements) partialState.hierarchicalFacetsRefinements = {}; partialState.hierarchicalFacetsRefinements[attr] = state.hierarchicalFacetsRefinements[attr]; } var numericRefinements = state.getNumericRefinements(attr); if (!isEmpty_1(numericRefinements)) { if (!partialState.numericRefinements) partialState.numericRefinements = {}; partialState.numericRefinements[attr] = state.numericRefinements[attr]; } }); } else { if (!isEmpty_1(state.numericRefinements)) { partialState.numericRefinements = state.numericRefinements; } if (!isEmpty_1(state.facetsRefinements)) partialState.facetsRefinements = state.facetsRefinements; if (!isEmpty_1(state.disjunctiveFacetsRefinements)) { partialState.disjunctiveFacetsRefinements = state.disjunctiveFacetsRefinements; } if (!isEmpty_1(state.hierarchicalFacetsRefinements)) { partialState.hierarchicalFacetsRefinements = state.hierarchicalFacetsRefinements; } } var searchParameters = filter_1( filters, function(f) { return f.indexOf('attribute:') === -1; } ); forEach_1( searchParameters, function(parameterKey) { partialState[parameterKey] = state[parameterKey]; } ); return partialState; } var filterState_1 = filterState; /** * Functions to manipulate refinement lists * * The RefinementList is not formally defined through a prototype but is based * on a specific structure. * * @module SearchParameters.refinementList * * @typedef {string[]} SearchParameters.refinementList.Refinements * @typedef {Object.<string, SearchParameters.refinementList.Refinements>} SearchParameters.refinementList.RefinementList */ var lib = { /** * Adds a refinement to a RefinementList * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} value the value of the refinement, if the value is not a string it will be converted * @return {RefinementList} a new and updated refinement list */ addRefinement: function addRefinement(refinementList, attribute, value) { if (lib.isRefined(refinementList, attribute, value)) { return refinementList; } var valueAsString = '' + value; var facetRefinement = !refinementList[attribute] ? [valueAsString] : refinementList[attribute].concat(valueAsString); var mod = {}; mod[attribute] = facetRefinement; return defaults_1({}, mod, refinementList); }, /** * Removes refinement(s) for an attribute: * - if the value is specified removes the refinement for the value on the attribute * - if no value is specified removes all the refinements for this attribute * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} [value] the value of the refinement * @return {RefinementList} a new and updated refinement lst */ removeRefinement: function removeRefinement(refinementList, attribute, value) { if (isUndefined_1(value)) { return lib.clearRefinement(refinementList, attribute); } var valueAsString = '' + value; return lib.clearRefinement(refinementList, function(v, f) { return attribute === f && valueAsString === v; }); }, /** * Toggles the refinement value for an attribute. * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} value the value of the refinement * @return {RefinementList} a new and updated list */ toggleRefinement: function toggleRefinement(refinementList, attribute, value) { if (isUndefined_1(value)) throw new Error('toggleRefinement should be used with a value'); if (lib.isRefined(refinementList, attribute, value)) { return lib.removeRefinement(refinementList, attribute, value); } return lib.addRefinement(refinementList, attribute, value); }, /** * Clear all or parts of a RefinementList. Depending on the arguments, three * kinds of behavior can happen: * - if no attribute is provided: clears the whole list * - if an attribute is provided as a string: clears the list for the specific attribute * - if an attribute is provided as a function: discards the elements for which the function returns true * @param {RefinementList} refinementList the initial list * @param {string} [attribute] the attribute or function to discard * @param {string} [refinementType] optional parameter to give more context to the attribute function * @return {RefinementList} a new and updated refinement list */ clearRefinement: function clearRefinement(refinementList, attribute, refinementType) { if (isUndefined_1(attribute)) { return {}; } else if (isString_1(attribute)) { return omit_1(refinementList, attribute); } else if (isFunction_1(attribute)) { return reduce_1(refinementList, function(memo, values, key) { var facetList = filter_1(values, function(value) { return !attribute(value, key, refinementType); }); if (!isEmpty_1(facetList)) memo[key] = facetList; return memo; }, {}); } }, /** * Test if the refinement value is used for the attribute. If no refinement value * is provided, test if the refinementList contains any refinement for the * given attribute. * @param {RefinementList} refinementList the list of refinement * @param {string} attribute name of the attribute * @param {string} [refinementValue] value of the filter/refinement * @return {boolean} */ isRefined: function isRefined(refinementList, attribute, refinementValue) { var indexOf = indexOf_1; var containsRefinements = !!refinementList[attribute] && refinementList[attribute].length > 0; if (isUndefined_1(refinementValue) || !containsRefinements) { return containsRefinements; } var refinementValueAsString = '' + refinementValue; return indexOf(refinementList[attribute], refinementValueAsString) !== -1; } }; var RefinementList = lib; /** * like _.find but using _.isEqual to be able to use it * to find arrays. * @private * @param {any[]} array array to search into * @param {any} searchedValue the value we're looking for * @return {any} the searched value or undefined */ function findArray(array, searchedValue) { return find_1(array, function(currentValue) { return isEqual_1(currentValue, searchedValue); }); } /** * The facet list is the structure used to store the list of values used to * filter a single attribute. * @typedef {string[]} SearchParameters.FacetList */ /** * Structure to store numeric filters with the operator as the key. The supported operators * are `=`, `>`, `<`, `>=`, `<=` and `!=`. * @typedef {Object.<string, Array.<number|number[]>>} SearchParameters.OperatorList */ /** * SearchParameters is the data structure that contains all the information * usable for making a search to Algolia API. It doesn't do the search itself, * nor does it contains logic about the parameters. * It is an immutable object, therefore it has been created in a way that each * changes does not change the object itself but returns a copy with the * modification. * This object should probably not be instantiated outside of the helper. It will * be provided when needed. This object is documented for reference as you'll * get it from events generated by the {@link AlgoliaSearchHelper}. * If need be, instantiate the Helper from the factory function {@link SearchParameters.make} * @constructor * @classdesc contains all the parameters of a search * @param {object|SearchParameters} newParameters existing parameters or partial object * for the properties of a new SearchParameters * @see SearchParameters.make * @example <caption>SearchParameters of the first query in * <a href="http://demos.algolia.com/instant-search-demo/">the instant search demo</a></caption> { "query": "", "disjunctiveFacets": [ "customerReviewCount", "category", "salePrice_range", "manufacturer" ], "maxValuesPerFacet": 30, "page": 0, "hitsPerPage": 10, "facets": [ "type", "shipping" ] } */ function SearchParameters(newParameters) { var params = newParameters ? SearchParameters._parseNumbers(newParameters) : {}; /** * Targeted index. This parameter is mandatory. * @member {string} */ this.index = params.index || ''; // Query /** * Query string of the instant search. The empty string is a valid query. * @member {string} * @see https://www.algolia.com/doc/rest#param-query */ this.query = params.query || ''; // Facets /** * This attribute contains the list of all the conjunctive facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * @member {string[]} */ this.facets = params.facets || []; /** * This attribute contains the list of all the disjunctive facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * @member {string[]} */ this.disjunctiveFacets = params.disjunctiveFacets || []; /** * This attribute contains the list of all the hierarchical facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * Hierarchical facets are a sub type of disjunctive facets that * let you filter faceted attributes hierarchically. * @member {string[]|object[]} */ this.hierarchicalFacets = params.hierarchicalFacets || []; // Refinements /** * This attribute contains all the filters that need to be * applied on the conjunctive facets. Each facet must be properly * defined in the `facets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.facetsRefinements = params.facetsRefinements || {}; /** * This attribute contains all the filters that need to be * excluded from the conjunctive facets. Each facet must be properly * defined in the `facets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters excluded for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.facetsExcludes = params.facetsExcludes || {}; /** * This attribute contains all the filters that need to be * applied on the disjunctive facets. Each facet must be properly * defined in the `disjunctiveFacets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.disjunctiveFacetsRefinements = params.disjunctiveFacetsRefinements || {}; /** * This attribute contains all the filters that need to be * applied on the numeric attributes. * * The key is the name of the attribute, and the value is the * filters to apply to this attribute. * * When querying algolia, the values stored in this attribute will * be translated into the `numericFilters` attribute. * @member {Object.<string, SearchParameters.OperatorList>} */ this.numericRefinements = params.numericRefinements || {}; /** * This attribute contains all the tags used to refine the query. * * When querying algolia, the values stored in this attribute will * be translated into the `tagFilters` attribute. * @member {string[]} */ this.tagRefinements = params.tagRefinements || []; /** * This attribute contains all the filters that need to be * applied on the hierarchical facets. Each facet must be properly * defined in the `hierarchicalFacets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. The FacetList values * are structured as a string that contain the values for each level * separated by the configured separator. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.hierarchicalFacetsRefinements = params.hierarchicalFacetsRefinements || {}; /** * Contains the numeric filters in the raw format of the Algolia API. Setting * this parameter is not compatible with the usage of numeric filters methods. * @see https://www.algolia.com/doc/javascript#numericFilters * @member {string} */ this.numericFilters = params.numericFilters; /** * Contains the tag filters in the raw format of the Algolia API. Setting this * parameter is not compatible with the of the add/remove/toggle methods of the * tag api. * @see https://www.algolia.com/doc/rest#param-tagFilters * @member {string} */ this.tagFilters = params.tagFilters; /** * Contains the optional tag filters in the raw format of the Algolia API. * @see https://www.algolia.com/doc/rest#param-tagFilters * @member {string} */ this.optionalTagFilters = params.optionalTagFilters; /** * Contains the optional facet filters in the raw format of the Algolia API. * @see https://www.algolia.com/doc/rest#param-tagFilters * @member {string} */ this.optionalFacetFilters = params.optionalFacetFilters; // Misc. parameters /** * Number of hits to be returned by the search API * @member {number} * @see https://www.algolia.com/doc/rest#param-hitsPerPage */ this.hitsPerPage = params.hitsPerPage; /** * Number of values for each faceted attribute * @member {number} * @see https://www.algolia.com/doc/rest#param-maxValuesPerFacet */ this.maxValuesPerFacet = params.maxValuesPerFacet; /** * The current page number * @member {number} * @see https://www.algolia.com/doc/rest#param-page */ this.page = params.page || 0; /** * How the query should be treated by the search engine. * Possible values: prefixAll, prefixLast, prefixNone * @see https://www.algolia.com/doc/rest#param-queryType * @member {string} */ this.queryType = params.queryType; /** * How the typo tolerance behave in the search engine. * Possible values: true, false, min, strict * @see https://www.algolia.com/doc/rest#param-typoTolerance * @member {string} */ this.typoTolerance = params.typoTolerance; /** * Number of characters to wait before doing one character replacement. * @see https://www.algolia.com/doc/rest#param-minWordSizefor1Typo * @member {number} */ this.minWordSizefor1Typo = params.minWordSizefor1Typo; /** * Number of characters to wait before doing a second character replacement. * @see https://www.algolia.com/doc/rest#param-minWordSizefor2Typos * @member {number} */ this.minWordSizefor2Typos = params.minWordSizefor2Typos; /** * Configure the precision of the proximity ranking criterion * @see https://www.algolia.com/doc/rest#param-minProximity */ this.minProximity = params.minProximity; /** * Should the engine allow typos on numerics. * @see https://www.algolia.com/doc/rest#param-allowTyposOnNumericTokens * @member {boolean} */ this.allowTyposOnNumericTokens = params.allowTyposOnNumericTokens; /** * Should the plurals be ignored * @see https://www.algolia.com/doc/rest#param-ignorePlurals * @member {boolean} */ this.ignorePlurals = params.ignorePlurals; /** * Restrict which attribute is searched. * @see https://www.algolia.com/doc/rest#param-restrictSearchableAttributes * @member {string} */ this.restrictSearchableAttributes = params.restrictSearchableAttributes; /** * Enable the advanced syntax. * @see https://www.algolia.com/doc/rest#param-advancedSyntax * @member {boolean} */ this.advancedSyntax = params.advancedSyntax; /** * Enable the analytics * @see https://www.algolia.com/doc/rest#param-analytics * @member {boolean} */ this.analytics = params.analytics; /** * Tag of the query in the analytics. * @see https://www.algolia.com/doc/rest#param-analyticsTags * @member {string} */ this.analyticsTags = params.analyticsTags; /** * Enable the synonyms * @see https://www.algolia.com/doc/rest#param-synonyms * @member {boolean} */ this.synonyms = params.synonyms; /** * Should the engine replace the synonyms in the highlighted results. * @see https://www.algolia.com/doc/rest#param-replaceSynonymsInHighlight * @member {boolean} */ this.replaceSynonymsInHighlight = params.replaceSynonymsInHighlight; /** * Add some optional words to those defined in the dashboard * @see https://www.algolia.com/doc/rest#param-optionalWords * @member {string} */ this.optionalWords = params.optionalWords; /** * Possible values are "lastWords" "firstWords" "allOptional" "none" (default) * @see https://www.algolia.com/doc/rest#param-removeWordsIfNoResults * @member {string} */ this.removeWordsIfNoResults = params.removeWordsIfNoResults; /** * List of attributes to retrieve * @see https://www.algolia.com/doc/rest#param-attributesToRetrieve * @member {string} */ this.attributesToRetrieve = params.attributesToRetrieve; /** * List of attributes to highlight * @see https://www.algolia.com/doc/rest#param-attributesToHighlight * @member {string} */ this.attributesToHighlight = params.attributesToHighlight; /** * Code to be embedded on the left part of the highlighted results * @see https://www.algolia.com/doc/rest#param-highlightPreTag * @member {string} */ this.highlightPreTag = params.highlightPreTag; /** * Code to be embedded on the right part of the highlighted results * @see https://www.algolia.com/doc/rest#param-highlightPostTag * @member {string} */ this.highlightPostTag = params.highlightPostTag; /** * List of attributes to snippet * @see https://www.algolia.com/doc/rest#param-attributesToSnippet * @member {string} */ this.attributesToSnippet = params.attributesToSnippet; /** * Enable the ranking informations in the response, set to 1 to activate * @see https://www.algolia.com/doc/rest#param-getRankingInfo * @member {number} */ this.getRankingInfo = params.getRankingInfo; /** * Remove duplicates based on the index setting attributeForDistinct * @see https://www.algolia.com/doc/rest#param-distinct * @member {boolean|number} */ this.distinct = params.distinct; /** * Center of the geo search. * @see https://www.algolia.com/doc/rest#param-aroundLatLng * @member {string} */ this.aroundLatLng = params.aroundLatLng; /** * Center of the search, retrieve from the user IP. * @see https://www.algolia.com/doc/rest#param-aroundLatLngViaIP * @member {boolean} */ this.aroundLatLngViaIP = params.aroundLatLngViaIP; /** * Radius of the geo search. * @see https://www.algolia.com/doc/rest#param-aroundRadius * @member {number} */ this.aroundRadius = params.aroundRadius; /** * Precision of the geo search. * @see https://www.algolia.com/doc/rest#param-aroundPrecision * @member {number} */ this.minimumAroundRadius = params.minimumAroundRadius; /** * Precision of the geo search. * @see https://www.algolia.com/doc/rest#param-minimumAroundRadius * @member {number} */ this.aroundPrecision = params.aroundPrecision; /** * Geo search inside a box. * @see https://www.algolia.com/doc/rest#param-insideBoundingBox * @member {string} */ this.insideBoundingBox = params.insideBoundingBox; /** * Geo search inside a polygon. * @see https://www.algolia.com/doc/rest#param-insidePolygon * @member {string} */ this.insidePolygon = params.insidePolygon; /** * Allows to specify an ellipsis character for the snippet when we truncate the text * (added before and after if truncated). * The default value is an empty string and we recommend to set it to "…" * @see https://www.algolia.com/doc/rest#param-insidePolygon * @member {string} */ this.snippetEllipsisText = params.snippetEllipsisText; /** * Allows to specify some attributes name on which exact won't be applied. * Attributes are separated with a comma (for example "name,address" ), you can also use a * JSON string array encoding (for example encodeURIComponent('["name","address"]') ). * By default the list is empty. * @see https://www.algolia.com/doc/rest#param-disableExactOnAttributes * @member {string|string[]} */ this.disableExactOnAttributes = params.disableExactOnAttributes; /** * Applies 'exact' on single word queries if the word contains at least 3 characters * and is not a stop word. * Can take two values: true or false. * By default, its set to false. * @see https://www.algolia.com/doc/rest#param-enableExactOnSingleWordQuery * @member {boolean} */ this.enableExactOnSingleWordQuery = params.enableExactOnSingleWordQuery; // Undocumented parameters, still needed otherwise we fail this.offset = params.offset; this.length = params.length; var self = this; forOwn_1(params, function checkForUnknownParameter(paramValue, paramName) { if (SearchParameters.PARAMETERS.indexOf(paramName) === -1) { self[paramName] = paramValue; } }); } /** * List all the properties in SearchParameters and therefore all the known Algolia properties * This doesn't contain any beta/hidden features. * @private */ SearchParameters.PARAMETERS = keys_1(new SearchParameters()); /** * @private * @param {object} partialState full or part of a state * @return {object} a new object with the number keys as number */ SearchParameters._parseNumbers = function(partialState) { // Do not reparse numbers in SearchParameters, they ought to be parsed already if (partialState instanceof SearchParameters) return partialState; var numbers = {}; var numberKeys = [ 'aroundPrecision', 'aroundRadius', 'getRankingInfo', 'minWordSizefor2Typos', 'minWordSizefor1Typo', 'page', 'maxValuesPerFacet', 'distinct', 'minimumAroundRadius', 'hitsPerPage', 'minProximity' ]; forEach_1(numberKeys, function(k) { var value = partialState[k]; if (isString_1(value)) { var parsedValue = parseFloat(value); numbers[k] = _isNaN(parsedValue) ? value : parsedValue; } }); if (partialState.numericRefinements) { var numericRefinements = {}; forEach_1(partialState.numericRefinements, function(operators, attribute) { numericRefinements[attribute] = {}; forEach_1(operators, function(values, operator) { var parsedValues = map_1(values, function(v) { if (isArray_1(v)) { return map_1(v, function(vPrime) { if (isString_1(vPrime)) { return parseFloat(vPrime); } return vPrime; }); } else if (isString_1(v)) { return parseFloat(v); } return v; }); numericRefinements[attribute][operator] = parsedValues; }); }); numbers.numericRefinements = numericRefinements; } return merge_1({}, partialState, numbers); }; /** * Factory for SearchParameters * @param {object|SearchParameters} newParameters existing parameters or partial * object for the properties of a new SearchParameters * @return {SearchParameters} frozen instance of SearchParameters */ SearchParameters.make = function makeSearchParameters(newParameters) { var instance = new SearchParameters(newParameters); forEach_1(newParameters.hierarchicalFacets, function(facet) { if (facet.rootPath) { var currentRefinement = instance.getHierarchicalRefinement(facet.name); if (currentRefinement.length > 0 && currentRefinement[0].indexOf(facet.rootPath) !== 0) { instance = instance.clearRefinements(facet.name); } // get it again in case it has been cleared currentRefinement = instance.getHierarchicalRefinement(facet.name); if (currentRefinement.length === 0) { instance = instance.toggleHierarchicalFacetRefinement(facet.name, facet.rootPath); } } }); return instance; }; /** * Validates the new parameters based on the previous state * @param {SearchParameters} currentState the current state * @param {object|SearchParameters} parameters the new parameters to set * @return {Error|null} Error if the modification is invalid, null otherwise */ SearchParameters.validate = function(currentState, parameters) { var params = parameters || {}; if (currentState.tagFilters && params.tagRefinements && params.tagRefinements.length > 0) { return new Error( '[Tags] Cannot switch from the managed tag API to the advanced API. It is probably ' + 'an error, if it is really what you want, you should first clear the tags with clearTags method.'); } if (currentState.tagRefinements.length > 0 && params.tagFilters) { return new Error( '[Tags] Cannot switch from the advanced tag API to the managed API. It is probably ' + 'an error, if it is not, you should first clear the tags with clearTags method.'); } if (currentState.numericFilters && params.numericRefinements && !isEmpty_1(params.numericRefinements)) { return new Error( "[Numeric filters] Can't switch from the advanced to the managed API. It" + ' is probably an error, if this is really what you want, you have to first' + ' clear the numeric filters.'); } if (!isEmpty_1(currentState.numericRefinements) && params.numericFilters) { return new Error( "[Numeric filters] Can't switch from the managed API to the advanced. It" + ' is probably an error, if this is really what you want, you have to first' + ' clear the numeric filters.'); } return null; }; SearchParameters.prototype = { constructor: SearchParameters, /** * Remove all refinements (disjunctive + conjunctive + excludes + numeric filters) * @method * @param {undefined|string|SearchParameters.clearCallback} [attribute] optional string or function * - If not given, means to clear all the filters. * - If `string`, means to clear all refinements for the `attribute` named filter. * - If `function`, means to clear all the refinements that return truthy values. * @return {SearchParameters} */ clearRefinements: function clearRefinements(attribute) { var clear = RefinementList.clearRefinement; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(attribute), facetsRefinements: clear(this.facetsRefinements, attribute, 'conjunctiveFacet'), facetsExcludes: clear(this.facetsExcludes, attribute, 'exclude'), disjunctiveFacetsRefinements: clear(this.disjunctiveFacetsRefinements, attribute, 'disjunctiveFacet'), hierarchicalFacetsRefinements: clear(this.hierarchicalFacetsRefinements, attribute, 'hierarchicalFacet') }); }, /** * Remove all the refined tags from the SearchParameters * @method * @return {SearchParameters} */ clearTags: function clearTags() { if (this.tagFilters === undefined && this.tagRefinements.length === 0) return this; return this.setQueryParameters({ tagFilters: undefined, tagRefinements: [] }); }, /** * Set the index. * @method * @param {string} index the index name * @return {SearchParameters} */ setIndex: function setIndex(index) { if (index === this.index) return this; return this.setQueryParameters({ index: index }); }, /** * Query setter * @method * @param {string} newQuery value for the new query * @return {SearchParameters} */ setQuery: function setQuery(newQuery) { if (newQuery === this.query) return this; return this.setQueryParameters({ query: newQuery }); }, /** * Page setter * @method * @param {number} newPage new page number * @return {SearchParameters} */ setPage: function setPage(newPage) { if (newPage === this.page) return this; return this.setQueryParameters({ page: newPage }); }, /** * Facets setter * The facets are the simple facets, used for conjunctive (and) faceting. * @method * @param {string[]} facets all the attributes of the algolia records used for conjunctive faceting * @return {SearchParameters} */ setFacets: function setFacets(facets) { return this.setQueryParameters({ facets: facets }); }, /** * Disjunctive facets setter * Change the list of disjunctive (or) facets the helper chan handle. * @method * @param {string[]} facets all the attributes of the algolia records used for disjunctive faceting * @return {SearchParameters} */ setDisjunctiveFacets: function setDisjunctiveFacets(facets) { return this.setQueryParameters({ disjunctiveFacets: facets }); }, /** * HitsPerPage setter * Hits per page represents the number of hits retrieved for this query * @method * @param {number} n number of hits retrieved per page of results * @return {SearchParameters} */ setHitsPerPage: function setHitsPerPage(n) { if (this.hitsPerPage === n) return this; return this.setQueryParameters({ hitsPerPage: n }); }, /** * typoTolerance setter * Set the value of typoTolerance * @method * @param {string} typoTolerance new value of typoTolerance ("true", "false", "min" or "strict") * @return {SearchParameters} */ setTypoTolerance: function setTypoTolerance(typoTolerance) { if (this.typoTolerance === typoTolerance) return this; return this.setQueryParameters({ typoTolerance: typoTolerance }); }, /** * Add a numeric filter for a given attribute * When value is an array, they are combined with OR * When value is a single value, it will combined with AND * @method * @param {string} attribute attribute to set the filter on * @param {string} operator operator of the filter (possible values: =, >, >=, <, <=, !=) * @param {number | number[]} value value of the filter * @return {SearchParameters} * @example * // for price = 50 or 40 * searchparameter.addNumericRefinement('price', '=', [50, 40]); * @example * // for size = 38 and 40 * searchparameter.addNumericRefinement('size', '=', 38); * searchparameter.addNumericRefinement('size', '=', 40); */ addNumericRefinement: function(attribute, operator, v) { var value = valToNumber_1(v); if (this.isNumericRefined(attribute, operator, value)) return this; var mod = merge_1({}, this.numericRefinements); mod[attribute] = merge_1({}, mod[attribute]); if (mod[attribute][operator]) { // Array copy mod[attribute][operator] = mod[attribute][operator].slice(); // Add the element. Concat can't be used here because value can be an array. mod[attribute][operator].push(value); } else { mod[attribute][operator] = [value]; } return this.setQueryParameters({ numericRefinements: mod }); }, /** * Get the list of conjunctive refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getConjunctiveRefinements: function(facetName) { if (!this.isConjunctiveFacet(facetName)) { throw new Error(facetName + ' is not defined in the facets attribute of the helper configuration'); } return this.facetsRefinements[facetName] || []; }, /** * Get the list of disjunctive refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getDisjunctiveRefinements: function(facetName) { if (!this.isDisjunctiveFacet(facetName)) { throw new Error( facetName + ' is not defined in the disjunctiveFacets attribute of the helper configuration' ); } return this.disjunctiveFacetsRefinements[facetName] || []; }, /** * Get the list of hierarchical refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getHierarchicalRefinement: function(facetName) { // we send an array but we currently do not support multiple // hierarchicalRefinements for a hierarchicalFacet return this.hierarchicalFacetsRefinements[facetName] || []; }, /** * Get the list of exclude refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getExcludeRefinements: function(facetName) { if (!this.isConjunctiveFacet(facetName)) { throw new Error(facetName + ' is not defined in the facets attribute of the helper configuration'); } return this.facetsExcludes[facetName] || []; }, /** * Remove all the numeric filter for a given (attribute, operator) * @method * @param {string} attribute attribute to set the filter on * @param {string} [operator] operator of the filter (possible values: =, >, >=, <, <=, !=) * @param {number} [number] the value to be removed * @return {SearchParameters} */ removeNumericRefinement: function(attribute, operator, paramValue) { if (paramValue !== undefined) { var paramValueAsNumber = valToNumber_1(paramValue); if (!this.isNumericRefined(attribute, operator, paramValueAsNumber)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute && value.op === operator && isEqual_1(value.val, paramValueAsNumber); }) }); } else if (operator !== undefined) { if (!this.isNumericRefined(attribute, operator)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute && value.op === operator; }) }); } if (!this.isNumericRefined(attribute)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute; }) }); }, /** * Get the list of numeric refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {SearchParameters.OperatorList[]} list of refinements */ getNumericRefinements: function(facetName) { return this.numericRefinements[facetName] || {}; }, /** * Return the current refinement for the (attribute, operator) * @param {string} attribute of the record * @param {string} operator applied * @return {number} value of the refinement */ getNumericRefinement: function(attribute, operator) { return this.numericRefinements[attribute] && this.numericRefinements[attribute][operator]; }, /** * Clear numeric filters. * @method * @private * @param {string|SearchParameters.clearCallback} [attribute] optional string or function * - If not given, means to clear all the filters. * - If `string`, means to clear all refinements for the `attribute` named filter. * - If `function`, means to clear all the refinements that return truthy values. * @return {Object.<string, OperatorList>} */ _clearNumericRefinements: function _clearNumericRefinements(attribute) { if (isUndefined_1(attribute)) { return {}; } else if (isString_1(attribute)) { return omit_1(this.numericRefinements, attribute); } else if (isFunction_1(attribute)) { return reduce_1(this.numericRefinements, function(memo, operators, key) { var operatorList = {}; forEach_1(operators, function(values, operator) { var outValues = []; forEach_1(values, function(value) { var predicateResult = attribute({val: value, op: operator}, key, 'numeric'); if (!predicateResult) outValues.push(value); }); if (!isEmpty_1(outValues)) operatorList[operator] = outValues; }); if (!isEmpty_1(operatorList)) memo[key] = operatorList; return memo; }, {}); } }, /** * Add a facet to the facets attribute of the helper configuration, if it * isn't already present. * @method * @param {string} facet facet name to add * @return {SearchParameters} */ addFacet: function addFacet(facet) { if (this.isConjunctiveFacet(facet)) { return this; } return this.setQueryParameters({ facets: this.facets.concat([facet]) }); }, /** * Add a disjunctive facet to the disjunctiveFacets attribute of the helper * configuration, if it isn't already present. * @method * @param {string} facet disjunctive facet name to add * @return {SearchParameters} */ addDisjunctiveFacet: function addDisjunctiveFacet(facet) { if (this.isDisjunctiveFacet(facet)) { return this; } return this.setQueryParameters({ disjunctiveFacets: this.disjunctiveFacets.concat([facet]) }); }, /** * Add a hierarchical facet to the hierarchicalFacets attribute of the helper * configuration. * @method * @param {object} hierarchicalFacet hierarchical facet to add * @return {SearchParameters} * @throws will throw an error if a hierarchical facet with the same name was already declared */ addHierarchicalFacet: function addHierarchicalFacet(hierarchicalFacet) { if (this.isHierarchicalFacet(hierarchicalFacet.name)) { throw new Error( 'Cannot declare two hierarchical facets with the same name: `' + hierarchicalFacet.name + '`'); } return this.setQueryParameters({ hierarchicalFacets: this.hierarchicalFacets.concat([hierarchicalFacet]) }); }, /** * Add a refinement on a "normal" facet * @method * @param {string} facet attribute to apply the faceting on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addFacetRefinement: function addFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this; return this.setQueryParameters({ facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value) }); }, /** * Exclude a value from a "normal" facet * @method * @param {string} facet attribute to apply the exclusion on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addExcludeRefinement: function addExcludeRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this; return this.setQueryParameters({ facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value) }); }, /** * Adds a refinement on a disjunctive facet. * @method * @param {string} facet attribute to apply the faceting on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addDisjunctiveFacetRefinement: function addDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this; return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.addRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * addTagRefinement adds a tag to the list used to filter the results * @param {string} tag tag to be added * @return {SearchParameters} */ addTagRefinement: function addTagRefinement(tag) { if (this.isTagRefined(tag)) return this; var modification = { tagRefinements: this.tagRefinements.concat(tag) }; return this.setQueryParameters(modification); }, /** * Remove a facet from the facets attribute of the helper configuration, if it * is present. * @method * @param {string} facet facet name to remove * @return {SearchParameters} */ removeFacet: function removeFacet(facet) { if (!this.isConjunctiveFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ facets: filter_1(this.facets, function(f) { return f !== facet; }) }); }, /** * Remove a disjunctive facet from the disjunctiveFacets attribute of the * helper configuration, if it is present. * @method * @param {string} facet disjunctive facet name to remove * @return {SearchParameters} */ removeDisjunctiveFacet: function removeDisjunctiveFacet(facet) { if (!this.isDisjunctiveFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ disjunctiveFacets: filter_1(this.disjunctiveFacets, function(f) { return f !== facet; }) }); }, /** * Remove a hierarchical facet from the hierarchicalFacets attribute of the * helper configuration, if it is present. * @method * @param {string} facet hierarchical facet name to remove * @return {SearchParameters} */ removeHierarchicalFacet: function removeHierarchicalFacet(facet) { if (!this.isHierarchicalFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ hierarchicalFacets: filter_1(this.hierarchicalFacets, function(f) { return f.name !== facet; }) }); }, /** * Remove a refinement set on facet. If a value is provided, it will clear the * refinement for the given value, otherwise it will clear all the refinement * values for the faceted attribute. * @method * @param {string} facet name of the attribute used for faceting * @param {string} [value] value used to filter * @return {SearchParameters} */ removeFacetRefinement: function removeFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this; return this.setQueryParameters({ facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value) }); }, /** * Remove a negative refinement on a facet * @method * @param {string} facet name of the attribute used for faceting * @param {string} value value used to filter * @return {SearchParameters} */ removeExcludeRefinement: function removeExcludeRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this; return this.setQueryParameters({ facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value) }); }, /** * Remove a refinement on a disjunctive facet * @method * @param {string} facet name of the attribute used for faceting * @param {string} value value used to filter * @return {SearchParameters} */ removeDisjunctiveFacetRefinement: function removeDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this; return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.removeRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * Remove a tag from the list of tag refinements * @method * @param {string} tag the tag to remove * @return {SearchParameters} */ removeTagRefinement: function removeTagRefinement(tag) { if (!this.isTagRefined(tag)) return this; var modification = { tagRefinements: filter_1(this.tagRefinements, function(t) { return t !== tag; }) }; return this.setQueryParameters(modification); }, /** * Generic toggle refinement method to use with facet, disjunctive facets * and hierarchical facets * @param {string} facet the facet to refine * @param {string} value the associated value * @return {SearchParameters} * @throws will throw an error if the facet is not declared in the settings of the helper * @deprecated since version 2.19.0, see {@link SearchParameters#toggleFacetRefinement} */ toggleRefinement: function toggleRefinement(facet, value) { return this.toggleFacetRefinement(facet, value); }, /** * Generic toggle refinement method to use with facet, disjunctive facets * and hierarchical facets * @param {string} facet the facet to refine * @param {string} value the associated value * @return {SearchParameters} * @throws will throw an error if the facet is not declared in the settings of the helper */ toggleFacetRefinement: function toggleFacetRefinement(facet, value) { if (this.isHierarchicalFacet(facet)) { return this.toggleHierarchicalFacetRefinement(facet, value); } else if (this.isConjunctiveFacet(facet)) { return this.toggleConjunctiveFacetRefinement(facet, value); } else if (this.isDisjunctiveFacet(facet)) { return this.toggleDisjunctiveFacetRefinement(facet, value); } throw new Error('Cannot refine the undeclared facet ' + facet + '; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets'); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleConjunctiveFacetRefinement: function toggleConjunctiveFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return this.setQueryParameters({ facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleExcludeFacetRefinement: function toggleExcludeFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return this.setQueryParameters({ facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleDisjunctiveFacetRefinement: function toggleDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.toggleRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleHierarchicalFacetRefinement: function toggleHierarchicalFacetRefinement(facet, value) { if (!this.isHierarchicalFacet(facet)) { throw new Error( facet + ' is not defined in the hierarchicalFacets attribute of the helper configuration'); } var separator = this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(facet)); var mod = {}; var upOneOrMultipleLevel = this.hierarchicalFacetsRefinements[facet] !== undefined && this.hierarchicalFacetsRefinements[facet].length > 0 && ( // remove current refinement: // refinement was 'beer > IPA', call is toggleRefine('beer > IPA'), refinement should be `beer` this.hierarchicalFacetsRefinements[facet][0] === value || // remove a parent refinement of the current refinement: // - refinement was 'beer > IPA > Flying dog' // - call is toggleRefine('beer > IPA') // - refinement should be `beer` this.hierarchicalFacetsRefinements[facet][0].indexOf(value + separator) === 0 ); if (upOneOrMultipleLevel) { if (value.indexOf(separator) === -1) { // go back to root level mod[facet] = []; } else { mod[facet] = [value.slice(0, value.lastIndexOf(separator))]; } } else { mod[facet] = [value]; } return this.setQueryParameters({ hierarchicalFacetsRefinements: defaults_1({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Adds a refinement on a hierarchical facet. * @param {string} facet the facet name * @param {string} path the hierarchical facet path * @return {SearchParameter} the new state * @throws Error if the facet is not defined or if the facet is refined */ addHierarchicalFacetRefinement: function(facet, path) { if (this.isHierarchicalFacetRefined(facet)) { throw new Error(facet + ' is already refined.'); } var mod = {}; mod[facet] = [path]; return this.setQueryParameters({ hierarchicalFacetsRefinements: defaults_1({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Removes the refinement set on a hierarchical facet. * @param {string} facet the facet name * @return {SearchParameter} the new state * @throws Error if the facet is not defined or if the facet is not refined */ removeHierarchicalFacetRefinement: function(facet) { if (!this.isHierarchicalFacetRefined(facet)) { throw new Error(facet + ' is not refined.'); } var mod = {}; mod[facet] = []; return this.setQueryParameters({ hierarchicalFacetsRefinements: defaults_1({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Switch the tag refinement * @method * @param {string} tag the tag to remove or add * @return {SearchParameters} */ toggleTagRefinement: function toggleTagRefinement(tag) { if (this.isTagRefined(tag)) { return this.removeTagRefinement(tag); } return this.addTagRefinement(tag); }, /** * Test if the facet name is from one of the disjunctive facets * @method * @param {string} facet facet name to test * @return {boolean} */ isDisjunctiveFacet: function(facet) { return indexOf_1(this.disjunctiveFacets, facet) > -1; }, /** * Test if the facet name is from one of the hierarchical facets * @method * @param {string} facetName facet name to test * @return {boolean} */ isHierarchicalFacet: function(facetName) { return this.getHierarchicalFacetByName(facetName) !== undefined; }, /** * Test if the facet name is from one of the conjunctive/normal facets * @method * @param {string} facet facet name to test * @return {boolean} */ isConjunctiveFacet: function(facet) { return indexOf_1(this.facets, facet) > -1; }, /** * Returns true if the facet is refined, either for a specific value or in * general. * @method * @param {string} facet name of the attribute for used for faceting * @param {string} value, optional value. If passed will test that this value * is filtering the given facet. * @return {boolean} returns true if refined */ isFacetRefined: function isFacetRefined(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return RefinementList.isRefined(this.facetsRefinements, facet, value); }, /** * Returns true if the facet contains exclusions or if a specific value is * excluded. * * @method * @param {string} facet name of the attribute for used for faceting * @param {string} [value] optional value. If passed will test that this value * is filtering the given facet. * @return {boolean} returns true if refined */ isExcludeRefined: function isExcludeRefined(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return RefinementList.isRefined(this.facetsExcludes, facet, value); }, /** * Returns true if the facet contains a refinement, or if a value passed is a * refinement for the facet. * @method * @param {string} facet name of the attribute for used for faceting * @param {string} value optional, will test if the value is used for refinement * if there is one, otherwise will test if the facet contains any refinement * @return {boolean} */ isDisjunctiveFacetRefined: function isDisjunctiveFacetRefined(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value); }, /** * Returns true if the facet contains a refinement, or if a value passed is a * refinement for the facet. * @method * @param {string} facet name of the attribute for used for faceting * @param {string} value optional, will test if the value is used for refinement * if there is one, otherwise will test if the facet contains any refinement * @return {boolean} */ isHierarchicalFacetRefined: function isHierarchicalFacetRefined(facet, value) { if (!this.isHierarchicalFacet(facet)) { throw new Error( facet + ' is not defined in the hierarchicalFacets attribute of the helper configuration'); } var refinements = this.getHierarchicalRefinement(facet); if (!value) { return refinements.length > 0; } return indexOf_1(refinements, value) !== -1; }, /** * Test if the triple (attribute, operator, value) is already refined. * If only the attribute and the operator are provided, it tests if the * contains any refinement value. * @method * @param {string} attribute attribute for which the refinement is applied * @param {string} [operator] operator of the refinement * @param {string} [value] value of the refinement * @return {boolean} true if it is refined */ isNumericRefined: function isNumericRefined(attribute, operator, value) { if (isUndefined_1(value) && isUndefined_1(operator)) { return !!this.numericRefinements[attribute]; } var isOperatorDefined = this.numericRefinements[attribute] && !isUndefined_1(this.numericRefinements[attribute][operator]); if (isUndefined_1(value) || !isOperatorDefined) { return isOperatorDefined; } var parsedValue = valToNumber_1(value); var isAttributeValueDefined = !isUndefined_1( findArray(this.numericRefinements[attribute][operator], parsedValue) ); return isOperatorDefined && isAttributeValueDefined; }, /** * Returns true if the tag refined, false otherwise * @method * @param {string} tag the tag to check * @return {boolean} */ isTagRefined: function isTagRefined(tag) { return indexOf_1(this.tagRefinements, tag) !== -1; }, /** * Returns the list of all disjunctive facets refined * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {string[]} */ getRefinedDisjunctiveFacets: function getRefinedDisjunctiveFacets() { // attributes used for numeric filter can also be disjunctive var disjunctiveNumericRefinedFacets = intersection_1( keys_1(this.numericRefinements), this.disjunctiveFacets ); return keys_1(this.disjunctiveFacetsRefinements) .concat(disjunctiveNumericRefinedFacets) .concat(this.getRefinedHierarchicalFacets()); }, /** * Returns the list of all disjunctive facets refined * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {string[]} */ getRefinedHierarchicalFacets: function getRefinedHierarchicalFacets() { return intersection_1( // enforce the order between the two arrays, // so that refinement name index === hierarchical facet index map_1(this.hierarchicalFacets, 'name'), keys_1(this.hierarchicalFacetsRefinements) ); }, /** * Returned the list of all disjunctive facets not refined * @method * @return {string[]} */ getUnrefinedDisjunctiveFacets: function() { var refinedFacets = this.getRefinedDisjunctiveFacets(); return filter_1(this.disjunctiveFacets, function(f) { return indexOf_1(refinedFacets, f) === -1; }); }, managedParameters: [ 'index', 'facets', 'disjunctiveFacets', 'facetsRefinements', 'facetsExcludes', 'disjunctiveFacetsRefinements', 'numericRefinements', 'tagRefinements', 'hierarchicalFacets', 'hierarchicalFacetsRefinements' ], getQueryParams: function getQueryParams() { var managedParameters = this.managedParameters; var queryParams = {}; forOwn_1(this, function(paramValue, paramName) { if (indexOf_1(managedParameters, paramName) === -1 && paramValue !== undefined) { queryParams[paramName] = paramValue; } }); return queryParams; }, /** * Let the user retrieve any parameter value from the SearchParameters * @param {string} paramName name of the parameter * @return {any} the value of the parameter */ getQueryParameter: function getQueryParameter(paramName) { if (!this.hasOwnProperty(paramName)) { throw new Error( "Parameter '" + paramName + "' is not an attribute of SearchParameters " + '(http://algolia.github.io/algoliasearch-helper-js/docs/SearchParameters.html)'); } return this[paramName]; }, /** * Let the user set a specific value for a given parameter. Will return the * same instance if the parameter is invalid or if the value is the same as the * previous one. * @method * @param {string} parameter the parameter name * @param {any} value the value to be set, must be compliant with the definition * of the attribute on the object * @return {SearchParameters} the updated state */ setQueryParameter: function setParameter(parameter, value) { if (this[parameter] === value) return this; var modification = {}; modification[parameter] = value; return this.setQueryParameters(modification); }, /** * Let the user set any of the parameters with a plain object. * @method * @param {object} params all the keys and the values to be updated * @return {SearchParameters} a new updated instance */ setQueryParameters: function setQueryParameters(params) { if (!params) return this; var error = SearchParameters.validate(this, params); if (error) { throw error; } var parsedParams = SearchParameters._parseNumbers(params); return this.mutateMe(function mergeWith(newInstance) { var ks = keys_1(params); forEach_1(ks, function(k) { newInstance[k] = parsedParams[k]; }); return newInstance; }); }, /** * Returns an object with only the selected attributes. * @param {string[]} filters filters to retrieve only a subset of the state. It * accepts strings that can be either attributes of the SearchParameters (e.g. hitsPerPage) * or attributes of the index with the notation 'attribute:nameOfMyAttribute' * @return {object} */ filter: function(filters) { return filterState_1(this, filters); }, /** * Helper function to make it easier to build new instances from a mutating * function * @private * @param {function} fn newMutableState -> previousState -> () function that will * change the value of the newMutable to the desired state * @return {SearchParameters} a new instance with the specified modifications applied */ mutateMe: function mutateMe(fn) { var newState = new this.constructor(this); fn(newState, this); return newState; }, /** * Helper function to get the hierarchicalFacet separator or the default one (`>`) * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.separator or `>` as default */ _getHierarchicalFacetSortBy: function(hierarchicalFacet) { return hierarchicalFacet.sortBy || ['isRefined:desc', 'name:asc']; }, /** * Helper function to get the hierarchicalFacet separator or the default one (`>`) * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.separator or `>` as default */ _getHierarchicalFacetSeparator: function(hierarchicalFacet) { return hierarchicalFacet.separator || ' > '; }, /** * Helper function to get the hierarchicalFacet prefix path or null * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.rootPath or null as default */ _getHierarchicalRootPath: function(hierarchicalFacet) { return hierarchicalFacet.rootPath || null; }, /** * Helper function to check if we show the parent level of the hierarchicalFacet * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.showParentLevel or true as default */ _getHierarchicalShowParentLevel: function(hierarchicalFacet) { if (typeof hierarchicalFacet.showParentLevel === 'boolean') { return hierarchicalFacet.showParentLevel; } return true; }, /** * Helper function to get the hierarchicalFacet by it's name * @param {string} hierarchicalFacetName * @return {object} a hierarchicalFacet */ getHierarchicalFacetByName: function(hierarchicalFacetName) { return find_1( this.hierarchicalFacets, {name: hierarchicalFacetName} ); }, /** * Get the current breadcrumb for a hierarchical facet, as an array * @param {string} facetName Hierarchical facet name * @return {array.<string>} the path as an array of string */ getHierarchicalFacetBreadcrumb: function(facetName) { if (!this.isHierarchicalFacet(facetName)) { throw new Error( 'Cannot get the breadcrumb of an unknown hierarchical facet: `' + facetName + '`'); } var refinement = this.getHierarchicalRefinement(facetName)[0]; if (!refinement) return []; var separator = this._getHierarchicalFacetSeparator( this.getHierarchicalFacetByName(facetName) ); var path = refinement.split(separator); return map_1(path, trim_1); } }; /** * Callback used for clearRefinement method * @callback SearchParameters.clearCallback * @param {OperatorList|FacetList} value the value of the filter * @param {string} key the current attribute name * @param {string} type `numeric`, `disjunctiveFacet`, `conjunctiveFacet`, `hierarchicalFacet` or `exclude` * depending on the type of facet * @return {boolean} `true` if the element should be removed. `false` otherwise. */ var SearchParameters_1 = SearchParameters; /** * Creates an array with all falsey values removed. The values `false`, `null`, * `0`, `""`, `undefined`, and `NaN` are falsey. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to compact. * @returns {Array} Returns the new array of filtered values. * @example * * _.compact([0, 1, false, 2, '', 3]); * // => [1, 2, 3] */ function compact(array) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value) { result[resIndex++] = value; } } return result; } var compact_1 = compact; /** * The base implementation of `_.sum` and `_.sumBy` without support for * iteratee shorthands. * * @private * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {number} Returns the sum. */ function baseSum(array, iteratee) { var result, index = -1, length = array.length; while (++index < length) { var current = iteratee(array[index]); if (current !== undefined) { result = result === undefined ? current : (result + current); } } return result; } var _baseSum = baseSum; /** * This method is like `_.sum` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the value to be summed. * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the sum. * @example * * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; * * _.sumBy(objects, function(o) { return o.n; }); * // => 20 * * // The `_.property` iteratee shorthand. * _.sumBy(objects, 'n'); * // => 20 */ function sumBy(array, iteratee) { return (array && array.length) ? _baseSum(array, _baseIteratee(iteratee, 2)) : 0; } var sumBy_1 = sumBy; /** * The base implementation of `_.values` and `_.valuesIn` which creates an * array of `object` property values corresponding to the property names * of `props`. * * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. * @returns {Object} Returns the array of property values. */ function baseValues(object, props) { return _arrayMap(props, function(key) { return object[key]; }); } var _baseValues = baseValues; /** * Creates an array of the own enumerable string keyed property values of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property values. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.values(new Foo); * // => [1, 2] (iteration order is not guaranteed) * * _.values('hi'); * // => ['h', 'i'] */ function values(object) { return object == null ? [] : _baseValues(object, keys_1(object)); } var values_1 = values; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax$3 = Math.max; /** * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as * the offset from the end of `collection`. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object|string} collection The collection to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. * @returns {boolean} Returns `true` if `value` is found, else `false`. * @example * * _.includes([1, 2, 3], 1); * // => true * * _.includes([1, 2, 3], 1, 2); * // => false * * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { collection = isArrayLike_1(collection) ? collection : values_1(collection); fromIndex = (fromIndex && !guard) ? toInteger_1(fromIndex) : 0; var length = collection.length; if (fromIndex < 0) { fromIndex = nativeMax$3(length + fromIndex, 0); } return isString_1(collection) ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) : (!!length && _baseIndexOf(collection, value, fromIndex) > -1); } var includes_1 = includes; /** * The base implementation of `_.sortBy` which uses `comparer` to define the * sort order of `array` and replaces criteria objects with their corresponding * values. * * @private * @param {Array} array The array to sort. * @param {Function} comparer The function to define sort order. * @returns {Array} Returns `array`. */ function baseSortBy(array, comparer) { var length = array.length; array.sort(comparer); while (length--) { array[length] = array[length].value; } return array; } var _baseSortBy = baseSortBy; /** * Compares values to sort them in ascending order. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {number} Returns the sort order indicator for `value`. */ function compareAscending(value, other) { if (value !== other) { var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol_1(value); var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol_1(other); if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || (valIsNull && othIsDefined && othIsReflexive) || (!valIsDefined && othIsReflexive) || !valIsReflexive) { return 1; } if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || (othIsNull && valIsDefined && valIsReflexive) || (!othIsDefined && valIsReflexive) || !othIsReflexive) { return -1; } } return 0; } var _compareAscending = compareAscending; /** * Used by `_.orderBy` to compare multiple properties of a value to another * and stable sort them. * * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, * specify an order of "desc" for descending or "asc" for ascending sort order * of corresponding values. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {boolean[]|string[]} orders The order to sort by for each property. * @returns {number} Returns the sort order indicator for `object`. */ function compareMultiple(object, other, orders) { var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; while (++index < length) { var result = _compareAscending(objCriteria[index], othCriteria[index]); if (result) { if (index >= ordersLength) { return result; } var order = orders[index]; return result * (order == 'desc' ? -1 : 1); } } // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications // that causes it, under certain circumstances, to provide the same value for // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 // for more details. // // This also ensures a stable sort in V8 and other engines. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. return object.index - other.index; } var _compareMultiple = compareMultiple; /** * The base implementation of `_.orderBy` without param guards. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. * @param {string[]} orders The sort orders of `iteratees`. * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { var index = -1; iteratees = _arrayMap(iteratees.length ? iteratees : [identity_1], _baseUnary(_baseIteratee)); var result = _baseMap(collection, function(value, key, collection) { var criteria = _arrayMap(iteratees, function(iteratee) { return iteratee(value); }); return { 'criteria': criteria, 'index': ++index, 'value': value }; }); return _baseSortBy(result, function(object, other) { return _compareMultiple(object, other, orders); }); } var _baseOrderBy = baseOrderBy; /** * This method is like `_.sortBy` except that it allows specifying the sort * orders of the iteratees to sort by. If `orders` is unspecified, all values * are sorted in ascending order. Otherwise, specify an order of "desc" for * descending or "asc" for ascending sort order of corresponding values. * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] * The iteratees to sort by. * @param {string[]} [orders] The sort orders of `iteratees`. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. * @returns {Array} Returns the new sorted array. * @example * * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 34 }, * { 'user': 'fred', 'age': 40 }, * { 'user': 'barney', 'age': 36 } * ]; * * // Sort by `user` in ascending order and by `age` in descending order. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ function orderBy(collection, iteratees, orders, guard) { if (collection == null) { return []; } if (!isArray_1(iteratees)) { iteratees = iteratees == null ? [] : [iteratees]; } orders = guard ? undefined : orders; if (!isArray_1(orders)) { orders = orders == null ? [] : [orders]; } return _baseOrderBy(collection, iteratees, orders); } var orderBy_1 = orderBy; /** Used to store function metadata. */ var metaMap = _WeakMap && new _WeakMap; var _metaMap = metaMap; /** * The base implementation of `setData` without support for hot loop shorting. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ var baseSetData = !_metaMap ? identity_1 : function(func, data) { _metaMap.set(func, data); return func; }; var _baseSetData = baseSetData; /** * Creates a function that produces an instance of `Ctor` regardless of * whether it was invoked as part of a `new` expression or by `call` or `apply`. * * @private * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { case 0: return new Ctor; case 1: return new Ctor(args[0]); case 2: return new Ctor(args[0], args[1]); case 3: return new Ctor(args[0], args[1], args[2]); case 4: return new Ctor(args[0], args[1], args[2], args[3]); case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } var thisBinding = _baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args); // Mimic the constructor's `return` behavior. // See https://es5.github.io/#x13.2.2 for more details. return isObject_1(result) ? result : thisBinding; }; } var _createCtor = createCtor; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$1 = 1; /** * Creates a function that wraps `func` to invoke it with the optional `this` * binding of `thisArg`. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ function createBind(func, bitmask, thisArg) { var isBind = bitmask & WRAP_BIND_FLAG$1, Ctor = _createCtor(func); function wrapper() { var fn = (this && this !== _root && this instanceof wrapper) ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; } var _createBind = createBind; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax$5 = Math.max; /** * Creates an array that is the composition of partially applied arguments, * placeholders, and provided arguments into a single array of arguments. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgs(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax$5(argsLength - holdersLength, 0), result = Array(leftLength + rangeLength), isUncurried = !isCurried; while (++leftIndex < leftLength) { result[leftIndex] = partials[leftIndex]; } while (++argsIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[holders[argsIndex]] = args[argsIndex]; } } while (rangeLength--) { result[leftIndex++] = args[argsIndex++]; } return result; } var _composeArgs = composeArgs; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax$6 = Math.max; /** * This function is like `composeArgs` except that the arguments composition * is tailored for `_.partialRight`. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgsRight(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax$6(argsLength - holdersLength, 0), result = Array(rangeLength + rightLength), isUncurried = !isCurried; while (++argsIndex < rangeLength) { result[argsIndex] = args[argsIndex]; } var offset = argsIndex; while (++rightIndex < rightLength) { result[offset + rightIndex] = partials[rightIndex]; } while (++holdersIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[offset + holders[holdersIndex]] = args[argsIndex++]; } } return result; } var _composeArgsRight = composeArgsRight; /** * Gets the number of `placeholder` occurrences in `array`. * * @private * @param {Array} array The array to inspect. * @param {*} placeholder The placeholder to search for. * @returns {number} Returns the placeholder count. */ function countHolders(array, placeholder) { var length = array.length, result = 0; while (length--) { if (array[length] === placeholder) { ++result; } } return result; } var _countHolders = countHolders; /** * The function whose prototype chain sequence wrappers inherit from. * * @private */ function baseLodash() { // No operation performed. } var _baseLodash = baseLodash; /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; /** * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. * * @private * @constructor * @param {*} value The value to wrap. */ function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } // Ensure `LazyWrapper` is an instance of `baseLodash`. LazyWrapper.prototype = _baseCreate(_baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; var _LazyWrapper = LazyWrapper; /** * This method returns `undefined`. * * @static * @memberOf _ * @since 2.3.0 * @category Util * @example * * _.times(2, _.noop); * // => [undefined, undefined] */ function noop$1() { // No operation performed. } var noop_1 = noop$1; /** * Gets metadata for `func`. * * @private * @param {Function} func The function to query. * @returns {*} Returns the metadata for `func`. */ var getData = !_metaMap ? noop_1 : function(func) { return _metaMap.get(func); }; var _getData = getData; /** Used to lookup unminified function names. */ var realNames = {}; var _realNames = realNames; /** Used for built-in method references. */ var objectProto$19 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$17 = objectProto$19.hasOwnProperty; /** * Gets the name of `func`. * * @private * @param {Function} func The function to query. * @returns {string} Returns the function name. */ function getFuncName(func) { var result = (func.name + ''), array = _realNames[result], length = hasOwnProperty$17.call(_realNames, result) ? array.length : 0; while (length--) { var data = array[length], otherFunc = data.func; if (otherFunc == null || otherFunc == func) { return data.name; } } return result; } var _getFuncName = getFuncName; /** * The base constructor for creating `lodash` wrapper objects. * * @private * @param {*} value The value to wrap. * @param {boolean} [chainAll] Enable explicit method chain sequences. */ function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !!chainAll; this.__index__ = 0; this.__values__ = undefined; } LodashWrapper.prototype = _baseCreate(_baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; var _LodashWrapper = LodashWrapper; /** * Creates a clone of `wrapper`. * * @private * @param {Object} wrapper The wrapper to clone. * @returns {Object} Returns the cloned wrapper. */ function wrapperClone(wrapper) { if (wrapper instanceof _LazyWrapper) { return wrapper.clone(); } var result = new _LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); result.__actions__ = _copyArray(wrapper.__actions__); result.__index__ = wrapper.__index__; result.__values__ = wrapper.__values__; return result; } var _wrapperClone = wrapperClone; /** Used for built-in method references. */ var objectProto$20 = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$18 = objectProto$20.hasOwnProperty; /** * Creates a `lodash` object which wraps `value` to enable implicit method * chain sequences. Methods that operate on and return arrays, collections, * and functions can be chained together. Methods that retrieve a single value * or may return a primitive value will automatically end the chain sequence * and return the unwrapped value. Otherwise, the value must be unwrapped * with `_#value`. * * Explicit chain sequences, which must be unwrapped with `_#value`, may be * enabled using `_.chain`. * * The execution of chained methods is lazy, that is, it's deferred until * `_#value` is implicitly or explicitly called. * * Lazy evaluation allows several methods to support shortcut fusion. * Shortcut fusion is an optimization to merge iteratee calls; this avoids * the creation of intermediate arrays and can greatly reduce the number of * iteratee executions. Sections of a chain sequence qualify for shortcut * fusion if the section is applied to an array and iteratees accept only * one argument. The heuristic for whether a section qualifies for shortcut * fusion is subject to change. * * Chaining is supported in custom builds as long as the `_#value` method is * directly or indirectly included in the build. * * In addition to lodash methods, wrappers have `Array` and `String` methods. * * The wrapper `Array` methods are: * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` * * The wrapper `String` methods are: * `replace` and `split` * * The wrapper methods that support shortcut fusion are: * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` * * The chainable wrapper methods are: * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, * `zipObject`, `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, * `upperFirst`, `value`, and `words` * * @name _ * @constructor * @category Seq * @param {*} value The value to wrap in a `lodash` instance. * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * function square(n) { * return n * n; * } * * var wrapped = _([1, 2, 3]); * * // Returns an unwrapped value. * wrapped.reduce(_.add); * // => 6 * * // Returns a wrapped value. * var squares = wrapped.map(square); * * _.isArray(squares); * // => false * * _.isArray(squares.value()); * // => true */ function lodash(value) { if (isObjectLike_1(value) && !isArray_1(value) && !(value instanceof _LazyWrapper)) { if (value instanceof _LodashWrapper) { return value; } if (hasOwnProperty$18.call(value, '__wrapped__')) { return _wrapperClone(value); } } return new _LodashWrapper(value); } // Ensure wrappers are instances of `baseLodash`. lodash.prototype = _baseLodash.prototype; lodash.prototype.constructor = lodash; var wrapperLodash = lodash; /** * Checks if `func` has a lazy counterpart. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` has a lazy counterpart, * else `false`. */ function isLaziable(func) { var funcName = _getFuncName(func), other = wrapperLodash[funcName]; if (typeof other != 'function' || !(funcName in _LazyWrapper.prototype)) { return false; } if (func === other) { return true; } var data = _getData(other); return !!data && func === data[0]; } var _isLaziable = isLaziable; /** * Sets metadata for `func`. * * **Note:** If this function becomes hot, i.e. is invoked a lot in a short * period of time, it will trip its breaker and transition to an identity * function to avoid garbage collection pauses in V8. See * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) * for more details. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ var setData = _shortOut(_baseSetData); var _setData = setData; /** Used to match wrap detail comments. */ var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/; var reSplitDetails = /,? & /; /** * Extracts wrapper details from the `source` body comment. * * @private * @param {string} source The source to inspect. * @returns {Array} Returns the wrapper details. */ function getWrapDetails(source) { var match = source.match(reWrapDetails); return match ? match[1].split(reSplitDetails) : []; } var _getWrapDetails = getWrapDetails; /** Used to match wrap detail comments. */ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; /** * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private * @param {string} source The source to modify. * @returns {Array} details The details to insert. * @returns {string} Returns the modified source. */ function insertWrapDetails(source, details) { var length = details.length; if (!length) { return source; } var lastIndex = length - 1; details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; details = details.join(length > 2 ? ', ' : ' '); return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); } var _insertWrapDetails = insertWrapDetails; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$4 = 1; var WRAP_BIND_KEY_FLAG$3 = 2; var WRAP_CURRY_FLAG$3 = 8; var WRAP_CURRY_RIGHT_FLAG$2 = 16; var WRAP_PARTIAL_FLAG$3 = 32; var WRAP_PARTIAL_RIGHT_FLAG$2 = 64; var WRAP_ARY_FLAG$1 = 128; var WRAP_REARG_FLAG = 256; var WRAP_FLIP_FLAG$1 = 512; /** Used to associate wrap methods with their bit flags. */ var wrapFlags = [ ['ary', WRAP_ARY_FLAG$1], ['bind', WRAP_BIND_FLAG$4], ['bindKey', WRAP_BIND_KEY_FLAG$3], ['curry', WRAP_CURRY_FLAG$3], ['curryRight', WRAP_CURRY_RIGHT_FLAG$2], ['flip', WRAP_FLIP_FLAG$1], ['partial', WRAP_PARTIAL_FLAG$3], ['partialRight', WRAP_PARTIAL_RIGHT_FLAG$2], ['rearg', WRAP_REARG_FLAG] ]; /** * Updates wrapper `details` based on `bitmask` flags. * * @private * @returns {Array} details The details to modify. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Array} Returns `details`. */ function updateWrapDetails(details, bitmask) { _arrayEach(wrapFlags, function(pair) { var value = '_.' + pair[0]; if ((bitmask & pair[1]) && !_arrayIncludes(details, value)) { details.push(value); } }); return details.sort(); } var _updateWrapDetails = updateWrapDetails; /** * Sets the `toString` method of `wrapper` to mimic the source of `reference` * with wrapper details in a comment at the top of the source body. * * @private * @param {Function} wrapper The function to modify. * @param {Function} reference The reference function. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Function} Returns `wrapper`. */ function setWrapToString(wrapper, reference, bitmask) { var source = (reference + ''); return _setToString(wrapper, _insertWrapDetails(source, _updateWrapDetails(_getWrapDetails(source), bitmask))); } var _setWrapToString = setWrapToString; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$3 = 1; var WRAP_BIND_KEY_FLAG$2 = 2; var WRAP_CURRY_BOUND_FLAG = 4; var WRAP_CURRY_FLAG$2 = 8; var WRAP_PARTIAL_FLAG$2 = 32; var WRAP_PARTIAL_RIGHT_FLAG$1 = 64; /** * Creates a function that wraps `func` to continue currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & WRAP_CURRY_FLAG$2, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials; bitmask |= (isCurry ? WRAP_PARTIAL_FLAG$2 : WRAP_PARTIAL_RIGHT_FLAG$1); bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG$1 : WRAP_PARTIAL_FLAG$2); if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { bitmask &= ~(WRAP_BIND_FLAG$3 | WRAP_BIND_KEY_FLAG$2); } var newData = [ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity ]; var result = wrapFunc.apply(undefined, newData); if (_isLaziable(func)) { _setData(result, newData); } result.placeholder = placeholder; return _setWrapToString(result, func, bitmask); } var _createRecurry = createRecurry; /** * Gets the argument placeholder value for `func`. * * @private * @param {Function} func The function to inspect. * @returns {*} Returns the placeholder value. */ function getHolder(func) { var object = func; return object.placeholder; } var _getHolder = getHolder; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin$1 = Math.min; /** * Reorder `array` according to the specified indexes where the element at * the first index is assigned as the first element, the element at * the second index is assigned as the second element, and so on. * * @private * @param {Array} array The array to reorder. * @param {Array} indexes The arranged array indexes. * @returns {Array} Returns `array`. */ function reorder(array, indexes) { var arrLength = array.length, length = nativeMin$1(indexes.length, arrLength), oldArray = _copyArray(array); while (length--) { var index = indexes[length]; array[length] = _isIndex(index, arrLength) ? oldArray[index] : undefined; } return array; } var _reorder = reorder; /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; /** * Replaces all `placeholder` elements in `array` with an internal placeholder * and returns an array of their indexes. * * @private * @param {Array} array The array to modify. * @param {*} placeholder The placeholder to replace. * @returns {Array} Returns the new array of placeholder indexes. */ function replaceHolders(array, placeholder) { var index = -1, length = array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value === placeholder || value === PLACEHOLDER) { array[index] = PLACEHOLDER; result[resIndex++] = index; } } return result; } var _replaceHolders = replaceHolders; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$2 = 1; var WRAP_BIND_KEY_FLAG$1 = 2; var WRAP_CURRY_FLAG$1 = 8; var WRAP_CURRY_RIGHT_FLAG$1 = 16; var WRAP_ARY_FLAG = 128; var WRAP_FLIP_FLAG = 512; /** * Creates a function that wraps `func` to invoke it with optional `this` * binding of `thisArg`, partial application, and currying. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [partialsRight] The arguments to append to those provided * to the new function. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG$2, isBindKey = bitmask & WRAP_BIND_KEY_FLAG$1, isCurried = bitmask & (WRAP_CURRY_FLAG$1 | WRAP_CURRY_RIGHT_FLAG$1), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined : _createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { var placeholder = _getHolder(wrapper), holdersCount = _countHolders(args, placeholder); } if (partials) { args = _composeArgs(args, partials, holders, isCurried); } if (partialsRight) { args = _composeArgsRight(args, partialsRight, holdersRight, isCurried); } length -= holdersCount; if (isCurried && length < arity) { var newHolders = _replaceHolders(args, placeholder); return _createRecurry( func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; length = args.length; if (argPos) { args = _reorder(args, argPos); } else if (isFlip && length > 1) { args.reverse(); } if (isAry && ary < length) { args.length = ary; } if (this && this !== _root && this instanceof wrapper) { fn = Ctor || _createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } var _createHybrid = createHybrid; /** * Creates a function that wraps `func` to enable currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createCurry(func, bitmask, arity) { var Ctor = _createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, placeholder = _getHolder(wrapper); while (index--) { args[index] = arguments[index]; } var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) ? [] : _replaceHolders(args, placeholder); length -= holders.length; if (length < arity) { return _createRecurry( func, bitmask, _createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== _root && this instanceof wrapper) ? Ctor : func; return _apply(fn, this, args); } return wrapper; } var _createCurry = createCurry; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$5 = 1; /** * Creates a function that wraps `func` to invoke it with the `this` binding * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & WRAP_BIND_FLAG$5, Ctor = _createCtor(func); function wrapper() { var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn = (this && this !== _root && this instanceof wrapper) ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; } while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } return _apply(fn, isBind ? thisArg : this, args); } return wrapper; } var _createPartial = createPartial; /** Used as the internal argument placeholder. */ var PLACEHOLDER$1 = '__lodash_placeholder__'; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$6 = 1; var WRAP_BIND_KEY_FLAG$4 = 2; var WRAP_CURRY_BOUND_FLAG$1 = 4; var WRAP_CURRY_FLAG$4 = 8; var WRAP_ARY_FLAG$2 = 128; var WRAP_REARG_FLAG$1 = 256; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin$2 = Math.min; /** * Merges the function metadata of `source` into `data`. * * Merging metadata reduces the number of wrappers used to invoke a function. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` * may be applied regardless of execution order. Methods like `_.ary` and * `_.rearg` modify function arguments, making the order in which they are * executed important, preventing the merging of metadata. However, we make * an exception for a safe combined case where curried functions have `_.ary` * and or `_.rearg` applied. * * @private * @param {Array} data The destination metadata. * @param {Array} source The source metadata. * @returns {Array} Returns `data`. */ function mergeData(data, source) { var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG$6 | WRAP_BIND_KEY_FLAG$4 | WRAP_ARY_FLAG$2); var isCombo = ((srcBitmask == WRAP_ARY_FLAG$2) && (bitmask == WRAP_CURRY_FLAG$4)) || ((srcBitmask == WRAP_ARY_FLAG$2) && (bitmask == WRAP_REARG_FLAG$1) && (data[7].length <= source[8])) || ((srcBitmask == (WRAP_ARY_FLAG$2 | WRAP_REARG_FLAG$1)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG$4)); // Exit early if metadata can't be merged. if (!(isCommon || isCombo)) { return data; } // Use source `thisArg` if available. if (srcBitmask & WRAP_BIND_FLAG$6) { data[2] = source[2]; // Set when currying a bound function. newBitmask |= bitmask & WRAP_BIND_FLAG$6 ? 0 : WRAP_CURRY_BOUND_FLAG$1; } // Compose partial arguments. var value = source[3]; if (value) { var partials = data[3]; data[3] = partials ? _composeArgs(partials, value, source[4]) : value; data[4] = partials ? _replaceHolders(data[3], PLACEHOLDER$1) : source[4]; } // Compose partial right arguments. value = source[5]; if (value) { partials = data[5]; data[5] = partials ? _composeArgsRight(partials, value, source[6]) : value; data[6] = partials ? _replaceHolders(data[5], PLACEHOLDER$1) : source[6]; } // Use source `argPos` if available. value = source[7]; if (value) { data[7] = value; } // Use source `ary` if it's smaller. if (srcBitmask & WRAP_ARY_FLAG$2) { data[8] = data[8] == null ? source[8] : nativeMin$2(data[8], source[8]); } // Use source `arity` if one is not provided. if (data[9] == null) { data[9] = source[9]; } // Use source `func` and merge bitmasks. data[0] = source[0]; data[1] = newBitmask; return data; } var _mergeData = mergeData; /** Error message constants. */ var FUNC_ERROR_TEXT$1 = 'Expected a function'; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; var WRAP_BIND_KEY_FLAG = 2; var WRAP_CURRY_FLAG = 8; var WRAP_CURRY_RIGHT_FLAG = 16; var WRAP_PARTIAL_FLAG$1 = 32; var WRAP_PARTIAL_RIGHT_FLAG = 64; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax$4 = Math.max; /** * Creates a function that either curries or invokes `func` with optional * `this` binding and partially applied arguments. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. * 1 - `_.bind` * 2 - `_.bindKey` * 4 - `_.curry` or `_.curryRight` of a bound function * 8 - `_.curry` * 16 - `_.curryRight` * 32 - `_.partial` * 64 - `_.partialRight` * 128 - `_.rearg` * 256 - `_.ary` * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT$1); } var length = partials ? partials.length : 0; if (!length) { bitmask &= ~(WRAP_PARTIAL_FLAG$1 | WRAP_PARTIAL_RIGHT_FLAG); partials = holders = undefined; } ary = ary === undefined ? ary : nativeMax$4(toInteger_1(ary), 0); arity = arity === undefined ? arity : toInteger_1(arity); length -= holders ? holders.length : 0; if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; partials = holders = undefined; } var data = isBindKey ? undefined : _getData(func); var newData = [ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity ]; if (data) { _mergeData(newData, data); } func = newData[0]; bitmask = newData[1]; thisArg = newData[2]; partials = newData[3]; holders = newData[4]; arity = newData[9] = newData[9] === undefined ? (isBindKey ? 0 : func.length) : nativeMax$4(newData[9] - length, 0); if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == WRAP_BIND_FLAG) { var result = _createBind(func, bitmask, thisArg); } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { result = _createCurry(func, bitmask, arity); } else if ((bitmask == WRAP_PARTIAL_FLAG$1 || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG$1)) && !holders.length) { result = _createPartial(func, bitmask, thisArg, partials); } else { result = _createHybrid.apply(undefined, newData); } var setter = data ? _baseSetData : _setData; return _setWrapToString(setter(result, newData), func, bitmask); } var _createWrap = createWrap; /** Used to compose bitmasks for function metadata. */ var WRAP_PARTIAL_FLAG = 32; /** * Creates a function that invokes `func` with `partials` prepended to the * arguments it receives. This method is like `_.bind` except it does **not** * alter the `this` binding. * * The `_.partial.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. * * **Note:** This method doesn't set the "length" property of partially * applied functions. * * @static * @memberOf _ * @since 0.2.0 * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new partially applied function. * @example * * function greet(greeting, name) { * return greeting + ' ' + name; * } * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); * // => 'hello fred' * * // Partially applied with placeholders. * var greetFred = _.partial(greet, _, 'fred'); * greetFred('hi'); * // => 'hi fred' */ var partial = _baseRest(function(func, partials) { var holders = _replaceHolders(partials, _getHolder(partial)); return _createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); }); // Assign default placeholders. partial.placeholder = {}; var partial_1 = partial; /** Used to compose bitmasks for function metadata. */ var WRAP_PARTIAL_RIGHT_FLAG$3 = 64; /** * This method is like `_.partial` except that partially applied arguments * are appended to the arguments it receives. * * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. * * **Note:** This method doesn't set the "length" property of partially * applied functions. * * @static * @memberOf _ * @since 1.0.0 * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new partially applied function. * @example * * function greet(greeting, name) { * return greeting + ' ' + name; * } * * var greetFred = _.partialRight(greet, 'fred'); * greetFred('hi'); * // => 'hi fred' * * // Partially applied with placeholders. * var sayHelloTo = _.partialRight(greet, 'hello', _); * sayHelloTo('fred'); * // => 'hello fred' */ var partialRight = _baseRest(function(func, partials) { var holders = _replaceHolders(partials, _getHolder(partialRight)); return _createWrap(func, WRAP_PARTIAL_RIGHT_FLAG$3, undefined, partials, holders); }); // Assign default placeholders. partialRight.placeholder = {}; var partialRight_1 = partialRight; /** * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. * @param {number} [lower] The lower bound. * @param {number} upper The upper bound. * @returns {number} Returns the clamped number. */ function baseClamp(number, lower, upper) { if (number === number) { if (upper !== undefined) { number = number <= upper ? number : upper; } if (lower !== undefined) { number = number >= lower ? number : lower; } } return number; } var _baseClamp = baseClamp; /** * Checks if `string` starts with the given target string. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=0] The position to search from. * @returns {boolean} Returns `true` if `string` starts with `target`, * else `false`. * @example * * _.startsWith('abc', 'a'); * // => true * * _.startsWith('abc', 'b'); * // => false * * _.startsWith('abc', 'b', 1); * // => true */ function startsWith(string, target, position) { string = toString_1(string); position = position == null ? 0 : _baseClamp(toInteger_1(position), 0, string.length); target = _baseToString(target); return string.slice(position, position + target.length) == target; } var startsWith_1 = startsWith; /** * Transform sort format from user friendly notation to lodash format * @param {string[]} sortBy array of predicate of the form "attribute:order" * @return {array.<string[]>} array containing 2 elements : attributes, orders */ var formatSort = function formatSort(sortBy, defaults) { return reduce_1(sortBy, function preparePredicate(out, sortInstruction) { var sortInstructions = sortInstruction.split(':'); if (defaults && sortInstructions.length === 1) { var similarDefault = find_1(defaults, function(predicate) { return startsWith_1(predicate, sortInstruction[0]); }); if (similarDefault) { sortInstructions = similarDefault.split(':'); } } out[0].push(sortInstructions[0]); out[1].push(sortInstructions[1]); return out; }, [[], []]); }; /** * The base implementation of `_.set`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { if (!isObject_1(object)) { return object; } path = _castPath(path, object); var index = -1, length = path.length, lastIndex = length - 1, nested = object; while (nested != null && ++index < length) { var key = _toKey(path[index]), newValue = value; if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; if (newValue === undefined) { newValue = isObject_1(objValue) ? objValue : (_isIndex(path[index + 1]) ? [] : {}); } } _assignValue(nested, key, newValue); nested = nested[key]; } return object; } var _baseSet = baseSet; /** * The base implementation of `_.pickBy` without support for iteratee shorthands. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ function basePickBy(object, paths, predicate) { var index = -1, length = paths.length, result = {}; while (++index < length) { var path = paths[index], value = _baseGet(object, path); if (predicate(value, path)) { _baseSet(result, _castPath(path, object), value); } } return result; } var _basePickBy = basePickBy; /** * Creates an object composed of the `object` properties `predicate` returns * truthy for. The predicate is invoked with two arguments: (value, key). * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The source object. * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pickBy(object, _.isNumber); * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { if (object == null) { return {}; } var props = _arrayMap(_getAllKeysIn(object), function(prop) { return [prop]; }); predicate = _baseIteratee(predicate); return _basePickBy(object, props, function(value, path) { return predicate(value, path[0]); }); } var pickBy_1 = pickBy; var generateHierarchicalTree_1 = generateTrees; function generateTrees(state) { return function generate(hierarchicalFacetResult, hierarchicalFacetIndex) { var hierarchicalFacet = state.hierarchicalFacets[hierarchicalFacetIndex]; var hierarchicalFacetRefinement = state.hierarchicalFacetsRefinements[hierarchicalFacet.name] && state.hierarchicalFacetsRefinements[hierarchicalFacet.name][0] || ''; var hierarchicalSeparator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var hierarchicalRootPath = state._getHierarchicalRootPath(hierarchicalFacet); var hierarchicalShowParentLevel = state._getHierarchicalShowParentLevel(hierarchicalFacet); var sortBy = formatSort(state._getHierarchicalFacetSortBy(hierarchicalFacet)); var generateTreeFn = generateHierarchicalTree(sortBy, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel, hierarchicalFacetRefinement); var results = hierarchicalFacetResult; if (hierarchicalRootPath) { results = hierarchicalFacetResult.slice(hierarchicalRootPath.split(hierarchicalSeparator).length); } return reduce_1(results, generateTreeFn, { name: state.hierarchicalFacets[hierarchicalFacetIndex].name, count: null, // root level, no count isRefined: true, // root level, always refined path: null, // root level, no path data: null }); }; } function generateHierarchicalTree(sortBy, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel, currentRefinement) { return function generateTree(hierarchicalTree, hierarchicalFacetResult, currentHierarchicalLevel) { var parent = hierarchicalTree; if (currentHierarchicalLevel > 0) { var level = 0; parent = hierarchicalTree; while (level < currentHierarchicalLevel) { parent = parent && find_1(parent.data, {isRefined: true}); level++; } } // we found a refined parent, let's add current level data under it if (parent) { // filter values in case an object has multiple categories: // { // categories: { // level0: ['beers', 'bières'], // level1: ['beers > IPA', 'bières > Belges'] // } // } // // If parent refinement is `beers`, then we do not want to have `bières > Belges` // showing up var onlyMatchingValuesFn = filterFacetValues(parent.path || hierarchicalRootPath, currentRefinement, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel); parent.data = orderBy_1( map_1( pickBy_1(hierarchicalFacetResult.data, onlyMatchingValuesFn), formatHierarchicalFacetValue(hierarchicalSeparator, currentRefinement) ), sortBy[0], sortBy[1] ); } return hierarchicalTree; }; } function filterFacetValues(parentPath, currentRefinement, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel) { return function(facetCount, facetValue) { // we want the facetValue is a child of hierarchicalRootPath if (hierarchicalRootPath && (facetValue.indexOf(hierarchicalRootPath) !== 0 || hierarchicalRootPath === facetValue)) { return false; } // we always want root levels (only when there is no prefix path) return !hierarchicalRootPath && facetValue.indexOf(hierarchicalSeparator) === -1 || // if there is a rootPath, being root level mean 1 level under rootPath hierarchicalRootPath && facetValue.split(hierarchicalSeparator).length - hierarchicalRootPath.split(hierarchicalSeparator).length === 1 || // if current refinement is a root level and current facetValue is a root level, // keep the facetValue facetValue.indexOf(hierarchicalSeparator) === -1 && currentRefinement.indexOf(hierarchicalSeparator) === -1 || // currentRefinement is a child of the facet value currentRefinement.indexOf(facetValue) === 0 || // facetValue is a child of the current parent, add it facetValue.indexOf(parentPath + hierarchicalSeparator) === 0 && (hierarchicalShowParentLevel || facetValue.indexOf(currentRefinement) === 0); }; } function formatHierarchicalFacetValue(hierarchicalSeparator, currentRefinement) { return function format(facetCount, facetValue) { return { name: trim_1(last_1(facetValue.split(hierarchicalSeparator))), path: facetValue, count: facetCount, isRefined: currentRefinement === facetValue || currentRefinement.indexOf(facetValue + hierarchicalSeparator) === 0, data: null }; }; } /** * @typedef SearchResults.Facet * @type {object} * @property {string} name name of the attribute in the record * @property {object} data the faceting data: value, number of entries * @property {object} stats undefined unless facet_stats is retrieved from algolia */ /** * @typedef SearchResults.HierarchicalFacet * @type {object} * @property {string} name name of the current value given the hierarchical level, trimmed. * If root node, you get the facet name * @property {number} count number of objects matching this hierarchical value * @property {string} path the current hierarchical value full path * @property {boolean} isRefined `true` if the current value was refined, `false` otherwise * @property {HierarchicalFacet[]} data sub values for the current level */ /** * @typedef SearchResults.FacetValue * @type {object} * @property {string} name the facet value itself * @property {number} count times this facet appears in the results * @property {boolean} isRefined is the facet currently selected * @property {boolean} isExcluded is the facet currently excluded (only for conjunctive facets) */ /** * @typedef Refinement * @type {object} * @property {string} type the type of filter used: * `numeric`, `facet`, `exclude`, `disjunctive`, `hierarchical` * @property {string} attributeName name of the attribute used for filtering * @property {string} name the value of the filter * @property {number} numericValue the value as a number. Only for numeric filters. * @property {string} operator the operator used. Only for numeric filters. * @property {number} count the number of computed hits for this filter. Only on facets. * @property {boolean} exhaustive if the count is exhaustive */ function getIndices(obj) { var indices = {}; forEach_1(obj, function(val, idx) { indices[val] = idx; }); return indices; } function assignFacetStats(dest, facetStats, key) { if (facetStats && facetStats[key]) { dest.stats = facetStats[key]; } } function findMatchingHierarchicalFacetFromAttributeName(hierarchicalFacets, hierarchicalAttributeName) { return find_1( hierarchicalFacets, function facetKeyMatchesAttribute(hierarchicalFacet) { return includes_1(hierarchicalFacet.attributes, hierarchicalAttributeName); } ); } /*eslint-disable */ /** * Constructor for SearchResults * @class * @classdesc SearchResults contains the results of a query to Algolia using the * {@link AlgoliaSearchHelper}. * @param {SearchParameters} state state that led to the response * @param {array.<object>} results the results from algolia client * @example <caption>SearchResults of the first query in * <a href="http://demos.algolia.com/instant-search-demo">the instant search demo</a></caption> { "hitsPerPage": 10, "processingTimeMS": 2, "facets": [ { "name": "type", "data": { "HardGood": 6627, "BlackTie": 550, "Music": 665, "Software": 131, "Game": 456, "Movie": 1571 }, "exhaustive": false }, { "exhaustive": false, "data": { "Free shipping": 5507 }, "name": "shipping" } ], "hits": [ { "thumbnailImage": "http://img.bbystatic.com/BestBuy_US/images/products/1688/1688832_54x108_s.gif", "_highlightResult": { "shortDescription": { "matchLevel": "none", "value": "Safeguard your PC, Mac, Android and iOS devices with comprehensive Internet protection", "matchedWords": [] }, "category": { "matchLevel": "none", "value": "Computer Security Software", "matchedWords": [] }, "manufacturer": { "matchedWords": [], "value": "Webroot", "matchLevel": "none" }, "name": { "value": "Webroot SecureAnywhere Internet Security (3-Device) (1-Year Subscription) - Mac/Windows", "matchedWords": [], "matchLevel": "none" } }, "image": "http://img.bbystatic.com/BestBuy_US/images/products/1688/1688832_105x210_sc.jpg", "shipping": "Free shipping", "bestSellingRank": 4, "shortDescription": "Safeguard your PC, Mac, Android and iOS devices with comprehensive Internet protection", "url": "http://www.bestbuy.com/site/webroot-secureanywhere-internet-security-3-devi…d=1219060687969&skuId=1688832&cmp=RMX&ky=2d3GfEmNIzjA0vkzveHdZEBgpPCyMnLTJ", "name": "Webroot SecureAnywhere Internet Security (3-Device) (1-Year Subscription) - Mac/Windows", "category": "Computer Security Software", "salePrice_range": "1 - 50", "objectID": "1688832", "type": "Software", "customerReviewCount": 5980, "salePrice": 49.99, "manufacturer": "Webroot" }, .... ], "nbHits": 10000, "disjunctiveFacets": [ { "exhaustive": false, "data": { "5": 183, "12": 112, "7": 149, ... }, "name": "customerReviewCount", "stats": { "max": 7461, "avg": 157.939, "min": 1 } }, { "data": { "Printer Ink": 142, "Wireless Speakers": 60, "Point & Shoot Cameras": 48, ... }, "name": "category", "exhaustive": false }, { "exhaustive": false, "data": { "> 5000": 2, "1 - 50": 6524, "501 - 2000": 566, "201 - 500": 1501, "101 - 200": 1360, "2001 - 5000": 47 }, "name": "salePrice_range" }, { "data": { "Dynex™": 202, "Insignia™": 230, "PNY": 72, ... }, "name": "manufacturer", "exhaustive": false } ], "query": "", "nbPages": 100, "page": 0, "index": "bestbuy" } **/ /*eslint-enable */ function SearchResults(state, results) { var mainSubResponse = results[0]; this._rawResults = results; /** * query used to generate the results * @member {string} */ this.query = mainSubResponse.query; /** * The query as parsed by the engine given all the rules. * @member {string} */ this.parsedQuery = mainSubResponse.parsedQuery; /** * all the records that match the search parameters. Each record is * augmented with a new attribute `_highlightResult` * which is an object keyed by attribute and with the following properties: * - `value` : the value of the facet highlighted (html) * - `matchLevel`: full, partial or none depending on how the query terms match * @member {object[]} */ this.hits = mainSubResponse.hits; /** * index where the results come from * @member {string} */ this.index = mainSubResponse.index; /** * number of hits per page requested * @member {number} */ this.hitsPerPage = mainSubResponse.hitsPerPage; /** * total number of hits of this query on the index * @member {number} */ this.nbHits = mainSubResponse.nbHits; /** * total number of pages with respect to the number of hits per page and the total number of hits * @member {number} */ this.nbPages = mainSubResponse.nbPages; /** * current page * @member {number} */ this.page = mainSubResponse.page; /** * sum of the processing time of all the queries * @member {number} */ this.processingTimeMS = sumBy_1(results, 'processingTimeMS'); /** * The position if the position was guessed by IP. * @member {string} * @example "48.8637,2.3615", */ this.aroundLatLng = mainSubResponse.aroundLatLng; /** * The radius computed by Algolia. * @member {string} * @example "126792922", */ this.automaticRadius = mainSubResponse.automaticRadius; /** * String identifying the server used to serve this request. * @member {string} * @example "c7-use-2.algolia.net", */ this.serverUsed = mainSubResponse.serverUsed; /** * Boolean that indicates if the computation of the counts did time out. * @deprecated * @member {boolean} */ this.timeoutCounts = mainSubResponse.timeoutCounts; /** * Boolean that indicates if the computation of the hits did time out. * @deprecated * @member {boolean} */ this.timeoutHits = mainSubResponse.timeoutHits; /** * True if the counts of the facets is exhaustive * @member {boolean} */ this.exhaustiveFacetsCount = mainSubResponse.exhaustiveFacetsCount; /** * True if the number of hits is exhaustive * @member {boolean} */ this.exhaustiveNbHits = mainSubResponse.exhaustiveNbHits; /** * Contains the userData if they are set by a [query rule](https://www.algolia.com/doc/guides/query-rules/query-rules-overview/). * @member {object[]} */ this.userData = mainSubResponse.userData; /** * disjunctive facets results * @member {SearchResults.Facet[]} */ this.disjunctiveFacets = []; /** * disjunctive facets results * @member {SearchResults.HierarchicalFacet[]} */ this.hierarchicalFacets = map_1(state.hierarchicalFacets, function initFutureTree() { return []; }); /** * other facets results * @member {SearchResults.Facet[]} */ this.facets = []; var disjunctiveFacets = state.getRefinedDisjunctiveFacets(); var facetsIndices = getIndices(state.facets); var disjunctiveFacetsIndices = getIndices(state.disjunctiveFacets); var nextDisjunctiveResult = 1; var self = this; // Since we send request only for disjunctive facets that have been refined, // we get the facets informations from the first, general, response. forEach_1(mainSubResponse.facets, function(facetValueObject, facetKey) { var hierarchicalFacet = findMatchingHierarchicalFacetFromAttributeName( state.hierarchicalFacets, facetKey ); if (hierarchicalFacet) { // Place the hierarchicalFacet data at the correct index depending on // the attributes order that was defined at the helper initialization var facetIndex = hierarchicalFacet.attributes.indexOf(facetKey); var idxAttributeName = findIndex_1(state.hierarchicalFacets, {name: hierarchicalFacet.name}); self.hierarchicalFacets[idxAttributeName][facetIndex] = { attribute: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; } else { var isFacetDisjunctive = indexOf_1(state.disjunctiveFacets, facetKey) !== -1; var isFacetConjunctive = indexOf_1(state.facets, facetKey) !== -1; var position; if (isFacetDisjunctive) { position = disjunctiveFacetsIndices[facetKey]; self.disjunctiveFacets[position] = { name: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; assignFacetStats(self.disjunctiveFacets[position], mainSubResponse.facets_stats, facetKey); } if (isFacetConjunctive) { position = facetsIndices[facetKey]; self.facets[position] = { name: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; assignFacetStats(self.facets[position], mainSubResponse.facets_stats, facetKey); } } }); // Make sure we do not keep holes within the hierarchical facets this.hierarchicalFacets = compact_1(this.hierarchicalFacets); // aggregate the refined disjunctive facets forEach_1(disjunctiveFacets, function(disjunctiveFacet) { var result = results[nextDisjunctiveResult]; var hierarchicalFacet = state.getHierarchicalFacetByName(disjunctiveFacet); // There should be only item in facets. forEach_1(result.facets, function(facetResults, dfacet) { var position; if (hierarchicalFacet) { position = findIndex_1(state.hierarchicalFacets, {name: hierarchicalFacet.name}); var attributeIndex = findIndex_1(self.hierarchicalFacets[position], {attribute: dfacet}); // previous refinements and no results so not able to find it if (attributeIndex === -1) { return; } self.hierarchicalFacets[position][attributeIndex].data = merge_1( {}, self.hierarchicalFacets[position][attributeIndex].data, facetResults ); } else { position = disjunctiveFacetsIndices[dfacet]; var dataFromMainRequest = mainSubResponse.facets && mainSubResponse.facets[dfacet] || {}; self.disjunctiveFacets[position] = { name: dfacet, data: defaults_1({}, facetResults, dataFromMainRequest), exhaustive: result.exhaustiveFacetsCount }; assignFacetStats(self.disjunctiveFacets[position], result.facets_stats, dfacet); if (state.disjunctiveFacetsRefinements[dfacet]) { forEach_1(state.disjunctiveFacetsRefinements[dfacet], function(refinementValue) { // add the disjunctive refinements if it is no more retrieved if (!self.disjunctiveFacets[position].data[refinementValue] && indexOf_1(state.disjunctiveFacetsRefinements[dfacet], refinementValue) > -1) { self.disjunctiveFacets[position].data[refinementValue] = 0; } }); } } }); nextDisjunctiveResult++; }); // if we have some root level values for hierarchical facets, merge them forEach_1(state.getRefinedHierarchicalFacets(), function(refinedFacet) { var hierarchicalFacet = state.getHierarchicalFacetByName(refinedFacet); var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var currentRefinement = state.getHierarchicalRefinement(refinedFacet); // if we are already at a root refinement (or no refinement at all), there is no // root level values request if (currentRefinement.length === 0 || currentRefinement[0].split(separator).length < 2) { return; } var result = results[nextDisjunctiveResult]; forEach_1(result.facets, function(facetResults, dfacet) { var position = findIndex_1(state.hierarchicalFacets, {name: hierarchicalFacet.name}); var attributeIndex = findIndex_1(self.hierarchicalFacets[position], {attribute: dfacet}); // previous refinements and no results so not able to find it if (attributeIndex === -1) { return; } // when we always get root levels, if the hits refinement is `beers > IPA` (count: 5), // then the disjunctive values will be `beers` (count: 100), // but we do not want to display // | beers (100) // > IPA (5) // We want // | beers (5) // > IPA (5) var defaultData = {}; if (currentRefinement.length > 0) { var root = currentRefinement[0].split(separator)[0]; defaultData[root] = self.hierarchicalFacets[position][attributeIndex].data[root]; } self.hierarchicalFacets[position][attributeIndex].data = defaults_1( defaultData, facetResults, self.hierarchicalFacets[position][attributeIndex].data ); }); nextDisjunctiveResult++; }); // add the excludes forEach_1(state.facetsExcludes, function(excludes, facetName) { var position = facetsIndices[facetName]; self.facets[position] = { name: facetName, data: mainSubResponse.facets[facetName], exhaustive: mainSubResponse.exhaustiveFacetsCount }; forEach_1(excludes, function(facetValue) { self.facets[position] = self.facets[position] || {name: facetName}; self.facets[position].data = self.facets[position].data || {}; self.facets[position].data[facetValue] = 0; }); }); this.hierarchicalFacets = map_1(this.hierarchicalFacets, generateHierarchicalTree_1(state)); this.facets = compact_1(this.facets); this.disjunctiveFacets = compact_1(this.disjunctiveFacets); this._state = state; } /** * Get a facet object with its name * @deprecated * @param {string} name name of the faceted attribute * @return {SearchResults.Facet} the facet object */ SearchResults.prototype.getFacetByName = function(name) { var predicate = {name: name}; return find_1(this.facets, predicate) || find_1(this.disjunctiveFacets, predicate) || find_1(this.hierarchicalFacets, predicate); }; /** * Get the facet values of a specified attribute from a SearchResults object. * @private * @param {SearchResults} results the search results to search in * @param {string} attribute name of the faceted attribute to search for * @return {array|object} facet values. For the hierarchical facets it is an object. */ function extractNormalizedFacetValues(results, attribute) { var predicate = {name: attribute}; if (results._state.isConjunctiveFacet(attribute)) { var facet = find_1(results.facets, predicate); if (!facet) return []; return map_1(facet.data, function(v, k) { return { name: k, count: v, isRefined: results._state.isFacetRefined(attribute, k), isExcluded: results._state.isExcludeRefined(attribute, k) }; }); } else if (results._state.isDisjunctiveFacet(attribute)) { var disjunctiveFacet = find_1(results.disjunctiveFacets, predicate); if (!disjunctiveFacet) return []; return map_1(disjunctiveFacet.data, function(v, k) { return { name: k, count: v, isRefined: results._state.isDisjunctiveFacetRefined(attribute, k) }; }); } else if (results._state.isHierarchicalFacet(attribute)) { return find_1(results.hierarchicalFacets, predicate); } } /** * Sort nodes of a hierarchical facet results * @private * @param {HierarchicalFacet} node node to upon which we want to apply the sort */ function recSort(sortFn, node) { if (!node.data || node.data.length === 0) { return node; } var children = map_1(node.data, partial_1(recSort, sortFn)); var sortedChildren = sortFn(children); var newNode = merge_1({}, node, {data: sortedChildren}); return newNode; } SearchResults.DEFAULT_SORT = ['isRefined:desc', 'count:desc', 'name:asc']; function vanillaSortFn(order, data) { return data.sort(order); } /** * Get a the list of values for a given facet attribute. Those values are sorted * refinement first, descending count (bigger value on top), and name ascending * (alphabetical order). The sort formula can overridden using either string based * predicates or a function. * * This method will return all the values returned by the Algolia engine plus all * the values already refined. This means that it can happen that the * `maxValuesPerFacet` [configuration](https://www.algolia.com/doc/rest-api/search#param-maxValuesPerFacet) * might not be respected if you have facet values that are already refined. * @param {string} attribute attribute name * @param {object} opts configuration options. * @param {Array.<string> | function} opts.sortBy * When using strings, it consists of * the name of the [FacetValue](#SearchResults.FacetValue) or the * [HierarchicalFacet](#SearchResults.HierarchicalFacet) attributes with the * order (`asc` or `desc`). For example to order the value by count, the * argument would be `['count:asc']`. * * If only the attribute name is specified, the ordering defaults to the one * specified in the default value for this attribute. * * When not specified, the order is * ascending. This parameter can also be a function which takes two facet * values and should return a number, 0 if equal, 1 if the first argument is * bigger or -1 otherwise. * * The default value for this attribute `['isRefined:desc', 'count:desc', 'name:asc']` * @return {FacetValue[]|HierarchicalFacet} depending on the type of facet of * the attribute requested (hierarchical, disjunctive or conjunctive) * @example * helper.on('results', function(content){ * //get values ordered only by name ascending using the string predicate * content.getFacetValues('city', {sortBy: ['name:asc']}); * //get values ordered only by count ascending using a function * content.getFacetValues('city', { * // this is equivalent to ['count:asc'] * sortBy: function(a, b) { * if (a.count === b.count) return 0; * if (a.count > b.count) return 1; * if (b.count > a.count) return -1; * } * }); * }); */ SearchResults.prototype.getFacetValues = function(attribute, opts) { var facetValues = extractNormalizedFacetValues(this, attribute); if (!facetValues) throw new Error(attribute + ' is not a retrieved facet.'); var options = defaults_1({}, opts, {sortBy: SearchResults.DEFAULT_SORT}); if (isArray_1(options.sortBy)) { var order = formatSort(options.sortBy, SearchResults.DEFAULT_SORT); if (isArray_1(facetValues)) { return orderBy_1(facetValues, order[0], order[1]); } // If facetValues is not an array, it's an object thus a hierarchical facet object return recSort(partialRight_1(orderBy_1, order[0], order[1]), facetValues); } else if (isFunction_1(options.sortBy)) { if (isArray_1(facetValues)) { return facetValues.sort(options.sortBy); } // If facetValues is not an array, it's an object thus a hierarchical facet object return recSort(partial_1(vanillaSortFn, options.sortBy), facetValues); } throw new Error( 'options.sortBy is optional but if defined it must be ' + 'either an array of string (predicates) or a sorting function' ); }; /** * Returns the facet stats if attribute is defined and the facet contains some. * Otherwise returns undefined. * @param {string} attribute name of the faceted attribute * @return {object} The stats of the facet */ SearchResults.prototype.getFacetStats = function(attribute) { if (this._state.isConjunctiveFacet(attribute)) { return getFacetStatsIfAvailable(this.facets, attribute); } else if (this._state.isDisjunctiveFacet(attribute)) { return getFacetStatsIfAvailable(this.disjunctiveFacets, attribute); } throw new Error(attribute + ' is not present in `facets` or `disjunctiveFacets`'); }; function getFacetStatsIfAvailable(facetList, facetName) { var data = find_1(facetList, {name: facetName}); return data && data.stats; } /** * Returns all refinements for all filters + tags. It also provides * additional information: count and exhausistivity for each filter. * * See the [refinement type](#Refinement) for an exhaustive view of the available * data. * * @return {Array.<Refinement>} all the refinements */ SearchResults.prototype.getRefinements = function() { var state = this._state; var results = this; var res = []; forEach_1(state.facetsRefinements, function(refinements, attributeName) { forEach_1(refinements, function(name) { res.push(getRefinement(state, 'facet', attributeName, name, results.facets)); }); }); forEach_1(state.facetsExcludes, function(refinements, attributeName) { forEach_1(refinements, function(name) { res.push(getRefinement(state, 'exclude', attributeName, name, results.facets)); }); }); forEach_1(state.disjunctiveFacetsRefinements, function(refinements, attributeName) { forEach_1(refinements, function(name) { res.push(getRefinement(state, 'disjunctive', attributeName, name, results.disjunctiveFacets)); }); }); forEach_1(state.hierarchicalFacetsRefinements, function(refinements, attributeName) { forEach_1(refinements, function(name) { res.push(getHierarchicalRefinement(state, attributeName, name, results.hierarchicalFacets)); }); }); forEach_1(state.numericRefinements, function(operators, attributeName) { forEach_1(operators, function(values, operator) { forEach_1(values, function(value) { res.push({ type: 'numeric', attributeName: attributeName, name: value, numericValue: value, operator: operator }); }); }); }); forEach_1(state.tagRefinements, function(name) { res.push({type: 'tag', attributeName: '_tags', name: name}); }); return res; }; function getRefinement(state, type, attributeName, name, resultsFacets) { var facet = find_1(resultsFacets, {name: attributeName}); var count = get_1(facet, 'data[' + name + ']'); var exhaustive = get_1(facet, 'exhaustive'); return { type: type, attributeName: attributeName, name: name, count: count || 0, exhaustive: exhaustive || false }; } function getHierarchicalRefinement(state, attributeName, name, resultsFacets) { var facet = find_1(resultsFacets, {name: attributeName}); var facetDeclaration = state.getHierarchicalFacetByName(attributeName); var splitted = name.split(facetDeclaration.separator); var configuredName = splitted[splitted.length - 1]; for (var i = 0; facet !== undefined && i < splitted.length; ++i) { facet = find_1(facet.data, {name: splitted[i]}); } var count = get_1(facet, 'count'); var exhaustive = get_1(facet, 'exhaustive'); return { type: 'hierarchical', attributeName: attributeName, name: configuredName, count: count || 0, exhaustive: exhaustive || false }; } var SearchResults_1 = SearchResults; var isBufferBrowser = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; }; var inherits_browser = createCommonjsModule(function (module) { if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor; var TempCtor = function () {}; TempCtor.prototype = superCtor.prototype; ctor.prototype = new TempCtor(); ctor.prototype.constructor = ctor; }; } }); var util = createCommonjsModule(function (module, exports) { // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var formatRegExp = /%[sdj%]/g; exports.format = function(f) { if (!isString(f)) { var objects = []; for (var i = 0; i < arguments.length; i++) { objects.push(inspect(arguments[i])); } return objects.join(' '); } var i = 1; var args = arguments; var len = args.length; var str = String(f).replace(formatRegExp, function(x) { if (x === '%%') return '%'; if (i >= len) return x; switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); case '%j': try { return JSON.stringify(args[i++]); } catch (_) { return '[Circular]'; } default: return x; } }); for (var x = args[i]; i < len; x = args[++i]) { if (isNull(x) || !isObject(x)) { str += ' ' + x; } else { str += ' ' + inspect(x); } } return str; }; // Mark that a method should not be used. // Returns a modified function which warns once by default. // If --no-deprecation is set, then it is a no-op. exports.deprecate = function(fn, msg) { // Allow for deprecating things in the process of starting up. if (isUndefined(commonjsGlobal.process)) { return function() { return exports.deprecate(fn, msg).apply(this, arguments); }; } if (process.noDeprecation === true) { return fn; } var warned = false; function deprecated() { if (!warned) { if (process.throwDeprecation) { throw new Error(msg); } else if (process.traceDeprecation) { console.trace(msg); } else { console.error(msg); } warned = true; } return fn.apply(this, arguments); } return deprecated; }; var debugs = {}; var debugEnviron; exports.debuglog = function(set) { if (isUndefined(debugEnviron)) debugEnviron = process.env.NODE_DEBUG || ''; set = set.toUpperCase(); if (!debugs[set]) { if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { var pid = process.pid; debugs[set] = function() { var msg = exports.format.apply(exports, arguments); console.error('%s %d: %s', set, pid, msg); }; } else { debugs[set] = function() {}; } } return debugs[set]; }; /** * Echos the value of a value. Trys to print the value out * in the best way possible given the different types. * * @param {Object} obj The object to print out. * @param {Object} opts Optional options object that alters the output. */ /* legacy: obj, showHidden, depth, colors*/ function inspect(obj, opts) { // default options var ctx = { seen: [], stylize: stylizeNoColor }; // legacy... if (arguments.length >= 3) ctx.depth = arguments[2]; if (arguments.length >= 4) ctx.colors = arguments[3]; if (isBoolean(opts)) { // legacy... ctx.showHidden = opts; } else if (opts) { // got an "options" object exports._extend(ctx, opts); } // set default options if (isUndefined(ctx.showHidden)) ctx.showHidden = false; if (isUndefined(ctx.depth)) ctx.depth = 2; if (isUndefined(ctx.colors)) ctx.colors = false; if (isUndefined(ctx.customInspect)) ctx.customInspect = true; if (ctx.colors) ctx.stylize = stylizeWithColor; return formatValue(ctx, obj, ctx.depth); } exports.inspect = inspect; // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics inspect.colors = { 'bold' : [1, 22], 'italic' : [3, 23], 'underline' : [4, 24], 'inverse' : [7, 27], 'white' : [37, 39], 'grey' : [90, 39], 'black' : [30, 39], 'blue' : [34, 39], 'cyan' : [36, 39], 'green' : [32, 39], 'magenta' : [35, 39], 'red' : [31, 39], 'yellow' : [33, 39] }; // Don't use 'blue' not visible on cmd.exe inspect.styles = { 'special': 'cyan', 'number': 'yellow', 'boolean': 'yellow', 'undefined': 'grey', 'null': 'bold', 'string': 'green', 'date': 'magenta', // "name": intentionally not styling 'regexp': 'red' }; function stylizeWithColor(str, styleType) { var style = inspect.styles[styleType]; if (style) { return '\u001b[' + inspect.colors[style][0] + 'm' + str + '\u001b[' + inspect.colors[style][1] + 'm'; } else { return str; } } function stylizeNoColor(str, styleType) { return str; } function arrayToHash(array) { var hash = {}; array.forEach(function(val, idx) { hash[val] = true; }); return hash; } function formatValue(ctx, value, recurseTimes) { // Provide a hook for user-specified inspect functions. // Check that value is an object with an inspect function on it if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check. !(value.constructor && value.constructor.prototype === value)) { var ret = value.inspect(recurseTimes, ctx); if (!isString(ret)) { ret = formatValue(ctx, ret, recurseTimes); } return ret; } // Primitive types cannot have properties var primitive = formatPrimitive(ctx, value); if (primitive) { return primitive; } // Look up the keys of the object. var keys = Object.keys(value); var visibleKeys = arrayToHash(keys); if (ctx.showHidden) { keys = Object.getOwnPropertyNames(value); } // IE doesn't make error fields non-enumerable // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { return formatError(value); } // Some type of object without properties can be shortcutted. if (keys.length === 0) { if (isFunction(value)) { var name = value.name ? ': ' + value.name : ''; return ctx.stylize('[Function' + name + ']', 'special'); } if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } if (isDate(value)) { return ctx.stylize(Date.prototype.toString.call(value), 'date'); } if (isError(value)) { return formatError(value); } } var base = '', array = false, braces = ['{', '}']; // Make Array say that they are Array if (isArray(value)) { array = true; braces = ['[', ']']; } // Make functions say that they are functions if (isFunction(value)) { var n = value.name ? ': ' + value.name : ''; base = ' [Function' + n + ']'; } // Make RegExps say that they are RegExps if (isRegExp(value)) { base = ' ' + RegExp.prototype.toString.call(value); } // Make dates with properties first say the date if (isDate(value)) { base = ' ' + Date.prototype.toUTCString.call(value); } // Make error with message first say the error if (isError(value)) { base = ' ' + formatError(value); } if (keys.length === 0 && (!array || value.length == 0)) { return braces[0] + base + braces[1]; } if (recurseTimes < 0) { if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } else { return ctx.stylize('[Object]', 'special'); } } ctx.seen.push(value); var output; if (array) { output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); } else { output = keys.map(function(key) { return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); }); } ctx.seen.pop(); return reduceToSingleString(output, base, braces); } function formatPrimitive(ctx, value) { if (isUndefined(value)) return ctx.stylize('undefined', 'undefined'); if (isString(value)) { var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') .replace(/'/g, "\\'") .replace(/\\"/g, '"') + '\''; return ctx.stylize(simple, 'string'); } if (isNumber(value)) return ctx.stylize('' + value, 'number'); if (isBoolean(value)) return ctx.stylize('' + value, 'boolean'); // For some reason typeof null is "object", so special case here. if (isNull(value)) return ctx.stylize('null', 'null'); } function formatError(value) { return '[' + Error.prototype.toString.call(value) + ']'; } function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { var output = []; for (var i = 0, l = value.length; i < l; ++i) { if (hasOwnProperty(value, String(i))) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true)); } else { output.push(''); } } keys.forEach(function(key) { if (!key.match(/^\d+$/)) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true)); } }); return output; } function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { var name, str, desc; desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; if (desc.get) { if (desc.set) { str = ctx.stylize('[Getter/Setter]', 'special'); } else { str = ctx.stylize('[Getter]', 'special'); } } else { if (desc.set) { str = ctx.stylize('[Setter]', 'special'); } } if (!hasOwnProperty(visibleKeys, key)) { name = '[' + key + ']'; } if (!str) { if (ctx.seen.indexOf(desc.value) < 0) { if (isNull(recurseTimes)) { str = formatValue(ctx, desc.value, null); } else { str = formatValue(ctx, desc.value, recurseTimes - 1); } if (str.indexOf('\n') > -1) { if (array) { str = str.split('\n').map(function(line) { return ' ' + line; }).join('\n').substr(2); } else { str = '\n' + str.split('\n').map(function(line) { return ' ' + line; }).join('\n'); } } } else { str = ctx.stylize('[Circular]', 'special'); } } if (isUndefined(name)) { if (array && key.match(/^\d+$/)) { return str; } name = JSON.stringify('' + key); if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { name = name.substr(1, name.length - 2); name = ctx.stylize(name, 'name'); } else { name = name.replace(/'/g, "\\'") .replace(/\\"/g, '"') .replace(/(^"|"$)/g, "'"); name = ctx.stylize(name, 'string'); } } return name + ': ' + str; } function reduceToSingleString(output, base, braces) { var numLinesEst = 0; var length = output.reduce(function(prev, cur) { numLinesEst++; if (cur.indexOf('\n') >= 0) numLinesEst++; return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; }, 0); if (length > 60) { return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; } return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; } // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. function isArray(ar) { return Array.isArray(ar); } exports.isArray = isArray; function isBoolean(arg) { return typeof arg === 'boolean'; } exports.isBoolean = isBoolean; function isNull(arg) { return arg === null; } exports.isNull = isNull; function isNullOrUndefined(arg) { return arg == null; } exports.isNullOrUndefined = isNullOrUndefined; function isNumber(arg) { return typeof arg === 'number'; } exports.isNumber = isNumber; function isString(arg) { return typeof arg === 'string'; } exports.isString = isString; function isSymbol(arg) { return typeof arg === 'symbol'; } exports.isSymbol = isSymbol; function isUndefined(arg) { return arg === void 0; } exports.isUndefined = isUndefined; function isRegExp(re) { return isObject(re) && objectToString(re) === '[object RegExp]'; } exports.isRegExp = isRegExp; function isObject(arg) { return typeof arg === 'object' && arg !== null; } exports.isObject = isObject; function isDate(d) { return isObject(d) && objectToString(d) === '[object Date]'; } exports.isDate = isDate; function isError(e) { return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error); } exports.isError = isError; function isFunction(arg) { return typeof arg === 'function'; } exports.isFunction = isFunction; function isPrimitive(arg) { return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || // ES6 symbol typeof arg === 'undefined'; } exports.isPrimitive = isPrimitive; exports.isBuffer = isBufferBrowser; function objectToString(o) { return Object.prototype.toString.call(o); } function pad(n) { return n < 10 ? '0' + n.toString(10) : n.toString(10); } var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; // 26 Feb 16:19:34 function timestamp() { var d = new Date(); var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':'); return [d.getDate(), months[d.getMonth()], time].join(' '); } // log is just a thin wrapper to console.log that prepends a timestamp exports.log = function() { console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); }; /** * Inherit the prototype methods from one constructor into another. * * The Function.prototype.inherits from lang.js rewritten as a standalone * function (not on Function.prototype). NOTE: If this file is to be loaded * during bootstrapping this function needs to be rewritten using some native * functions as prototype setup using normal JavaScript does not work as * expected during bootstrapping (see mirror.js in r114903). * * @param {function} ctor Constructor function which needs to inherit the * prototype. * @param {function} superCtor Constructor function to inherit prototype from. */ exports.inherits = inherits_browser; exports._extend = function(origin, add) { // Don't do anything if add isn't an object if (!add || !isObject(add)) return origin; var keys = Object.keys(add); var i = keys.length; while (i--) { origin[keys[i]] = add[keys[i]]; } return origin; }; function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } }); var util_1 = util.format; var util_2 = util.deprecate; var util_3 = util.debuglog; var util_4 = util.inspect; var util_5 = util.isArray; var util_6 = util.isBoolean; var util_7 = util.isNull; var util_8 = util.isNullOrUndefined; var util_9 = util.isNumber; var util_10 = util.isString; var util_11 = util.isSymbol; var util_12 = util.isUndefined; var util_13 = util.isRegExp; var util_14 = util.isObject; var util_15 = util.isDate; var util_16 = util.isError; var util_17 = util.isFunction; var util_18 = util.isPrimitive; var util_19 = util.isBuffer; var util_20 = util.log; var util_21 = util.inherits; var util_22 = util._extend; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners || undefined; } var events = EventEmitter; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. EventEmitter.defaultMaxListeners = 10; // Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. EventEmitter.prototype.setMaxListeners = function(n) { if (!isNumber$2(n) || n < 0 || isNaN(n)) throw TypeError('n must be a positive number'); this._maxListeners = n; return this; }; EventEmitter.prototype.emit = function(type) { var er, handler, len, args, i, listeners; if (!this._events) this._events = {}; // If there is no 'error' event listener then throw. if (type === 'error') { if (!this._events.error || (isObject$2(this._events.error) && !this._events.error.length)) { er = arguments[1]; if (er instanceof Error) { throw er; // Unhandled 'error' event } else { // At least give some kind of context to the user var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); err.context = er; throw err; } } } handler = this._events[type]; if (isUndefined$2(handler)) return false; if (isFunction$2(handler)) { switch (arguments.length) { // fast cases case 1: handler.call(this); break; case 2: handler.call(this, arguments[1]); break; case 3: handler.call(this, arguments[1], arguments[2]); break; // slower default: args = Array.prototype.slice.call(arguments, 1); handler.apply(this, args); } } else if (isObject$2(handler)) { args = Array.prototype.slice.call(arguments, 1); listeners = handler.slice(); len = listeners.length; for (i = 0; i < len; i++) listeners[i].apply(this, args); } return true; }; EventEmitter.prototype.addListener = function(type, listener) { var m; if (!isFunction$2(listener)) throw TypeError('listener must be a function'); if (!this._events) this._events = {}; // To avoid recursion in the case that type === "newListener"! Before // adding it to the listeners, first emit "newListener". if (this._events.newListener) this.emit('newListener', type, isFunction$2(listener.listener) ? listener.listener : listener); if (!this._events[type]) // Optimize the case of one listener. Don't need the extra array object. this._events[type] = listener; else if (isObject$2(this._events[type])) // If we've already got an array, just append. this._events[type].push(listener); else // Adding the second element, need to change to array. this._events[type] = [this._events[type], listener]; // Check for listener leak if (isObject$2(this._events[type]) && !this._events[type].warned) { if (!isUndefined$2(this._maxListeners)) { m = this._maxListeners; } else { m = EventEmitter.defaultMaxListeners; } if (m && m > 0 && this._events[type].length > m) { this._events[type].warned = true; console.error('(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length); if (typeof console.trace === 'function') { // not supported in IE 10 console.trace(); } } } return this; }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.once = function(type, listener) { if (!isFunction$2(listener)) throw TypeError('listener must be a function'); var fired = false; function g() { this.removeListener(type, g); if (!fired) { fired = true; listener.apply(this, arguments); } } g.listener = listener; this.on(type, g); return this; }; // emits a 'removeListener' event iff the listener was removed EventEmitter.prototype.removeListener = function(type, listener) { var list, position, length, i; if (!isFunction$2(listener)) throw TypeError('listener must be a function'); if (!this._events || !this._events[type]) return this; list = this._events[type]; length = list.length; position = -1; if (list === listener || (isFunction$2(list.listener) && list.listener === listener)) { delete this._events[type]; if (this._events.removeListener) this.emit('removeListener', type, listener); } else if (isObject$2(list)) { for (i = length; i-- > 0;) { if (list[i] === listener || (list[i].listener && list[i].listener === listener)) { position = i; break; } } if (position < 0) return this; if (list.length === 1) { list.length = 0; delete this._events[type]; } else { list.splice(position, 1); } if (this._events.removeListener) this.emit('removeListener', type, listener); } return this; }; EventEmitter.prototype.removeAllListeners = function(type) { var key, listeners; if (!this._events) return this; // not listening for removeListener, no need to emit if (!this._events.removeListener) { if (arguments.length === 0) this._events = {}; else if (this._events[type]) delete this._events[type]; return this; } // emit removeListener for all listeners on all events if (arguments.length === 0) { for (key in this._events) { if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = {}; return this; } listeners = this._events[type]; if (isFunction$2(listeners)) { this.removeListener(type, listeners); } else if (listeners) { // LIFO order while (listeners.length) this.removeListener(type, listeners[listeners.length - 1]); } delete this._events[type]; return this; }; EventEmitter.prototype.listeners = function(type) { var ret; if (!this._events || !this._events[type]) ret = []; else if (isFunction$2(this._events[type])) ret = [this._events[type]]; else ret = this._events[type].slice(); return ret; }; EventEmitter.prototype.listenerCount = function(type) { if (this._events) { var evlistener = this._events[type]; if (isFunction$2(evlistener)) return 1; else if (evlistener) return evlistener.length; } return 0; }; EventEmitter.listenerCount = function(emitter, type) { return emitter.listenerCount(type); }; function isFunction$2(arg) { return typeof arg === 'function'; } function isNumber$2(arg) { return typeof arg === 'number'; } function isObject$2(arg) { return typeof arg === 'object' && arg !== null; } function isUndefined$2(arg) { return arg === void 0; } /** * A DerivedHelper is a way to create sub requests to * Algolia from a main helper. * @class * @classdesc The DerivedHelper provides an event based interface for search callbacks: * - search: when a search is triggered using the `search()` method. * - result: when the response is retrieved from Algolia and is processed. * This event contains a {@link SearchResults} object and the * {@link SearchParameters} corresponding to this answer. */ function DerivedHelper(mainHelper, fn) { this.main = mainHelper; this.fn = fn; this.lastResults = null; } util.inherits(DerivedHelper, events.EventEmitter); /** * Detach this helper from the main helper * @return {undefined} * @throws Error if the derived helper is already detached */ DerivedHelper.prototype.detach = function() { this.removeAllListeners(); this.main.detachDerivedHelper(this); }; DerivedHelper.prototype.getModifiedState = function(parameters) { return this.fn(parameters); }; var DerivedHelper_1 = DerivedHelper; var requestBuilder = { /** * Get all the queries to send to the client, those queries can used directly * with the Algolia client. * @private * @return {object[]} The queries */ _getQueries: function getQueries(index, state) { var queries = []; // One query for the hits queries.push({ indexName: index, params: requestBuilder._getHitsSearchParams(state) }); // One for each disjunctive facets forEach_1(state.getRefinedDisjunctiveFacets(), function(refinedFacet) { queries.push({ indexName: index, params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet) }); }); // maybe more to get the root level of hierarchical facets when activated forEach_1(state.getRefinedHierarchicalFacets(), function(refinedFacet) { var hierarchicalFacet = state.getHierarchicalFacetByName(refinedFacet); var currentRefinement = state.getHierarchicalRefinement(refinedFacet); // if we are deeper than level 0 (starting from `beer > IPA`) // we want to get the root values var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); if (currentRefinement.length > 0 && currentRefinement[0].split(separator).length > 1) { queries.push({ indexName: index, params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet, true) }); } }); return queries; }, /** * Build search parameters used to fetch hits * @private * @return {object.<string, any>} */ _getHitsSearchParams: function(state) { var facets = state.facets .concat(state.disjunctiveFacets) .concat(requestBuilder._getHitsHierarchicalFacetsAttributes(state)); var facetFilters = requestBuilder._getFacetFilters(state); var numericFilters = requestBuilder._getNumericFilters(state); var tagFilters = requestBuilder._getTagFilters(state); var additionalParams = { facets: facets, tagFilters: tagFilters }; if (facetFilters.length > 0) { additionalParams.facetFilters = facetFilters; } if (numericFilters.length > 0) { additionalParams.numericFilters = numericFilters; } return merge_1(state.getQueryParams(), additionalParams); }, /** * Build search parameters used to fetch a disjunctive facet * @private * @param {string} facet the associated facet name * @param {boolean} hierarchicalRootLevel ?? FIXME * @return {object} */ _getDisjunctiveFacetSearchParams: function(state, facet, hierarchicalRootLevel) { var facetFilters = requestBuilder._getFacetFilters(state, facet, hierarchicalRootLevel); var numericFilters = requestBuilder._getNumericFilters(state, facet); var tagFilters = requestBuilder._getTagFilters(state); var additionalParams = { hitsPerPage: 1, page: 0, attributesToRetrieve: [], attributesToHighlight: [], attributesToSnippet: [], tagFilters: tagFilters, analytics: false }; var hierarchicalFacet = state.getHierarchicalFacetByName(facet); if (hierarchicalFacet) { additionalParams.facets = requestBuilder._getDisjunctiveHierarchicalFacetAttribute( state, hierarchicalFacet, hierarchicalRootLevel ); } else { additionalParams.facets = facet; } if (numericFilters.length > 0) { additionalParams.numericFilters = numericFilters; } if (facetFilters.length > 0) { additionalParams.facetFilters = facetFilters; } return merge_1(state.getQueryParams(), additionalParams); }, /** * Return the numeric filters in an algolia request fashion * @private * @param {string} [facetName] the name of the attribute for which the filters should be excluded * @return {string[]} the numeric filters in the algolia format */ _getNumericFilters: function(state, facetName) { if (state.numericFilters) { return state.numericFilters; } var numericFilters = []; forEach_1(state.numericRefinements, function(operators, attribute) { forEach_1(operators, function(values, operator) { if (facetName !== attribute) { forEach_1(values, function(value) { if (isArray_1(value)) { var vs = map_1(value, function(v) { return attribute + operator + v; }); numericFilters.push(vs); } else { numericFilters.push(attribute + operator + value); } }); } }); }); return numericFilters; }, /** * Return the tags filters depending * @private * @return {string} */ _getTagFilters: function(state) { if (state.tagFilters) { return state.tagFilters; } return state.tagRefinements.join(','); }, /** * Build facetFilters parameter based on current refinements. The array returned * contains strings representing the facet filters in the algolia format. * @private * @param {string} [facet] if set, the current disjunctive facet * @return {array.<string>} */ _getFacetFilters: function(state, facet, hierarchicalRootLevel) { var facetFilters = []; forEach_1(state.facetsRefinements, function(facetValues, facetName) { forEach_1(facetValues, function(facetValue) { facetFilters.push(facetName + ':' + facetValue); }); }); forEach_1(state.facetsExcludes, function(facetValues, facetName) { forEach_1(facetValues, function(facetValue) { facetFilters.push(facetName + ':-' + facetValue); }); }); forEach_1(state.disjunctiveFacetsRefinements, function(facetValues, facetName) { if (facetName === facet || !facetValues || facetValues.length === 0) return; var orFilters = []; forEach_1(facetValues, function(facetValue) { orFilters.push(facetName + ':' + facetValue); }); facetFilters.push(orFilters); }); forEach_1(state.hierarchicalFacetsRefinements, function(facetValues, facetName) { var facetValue = facetValues[0]; if (facetValue === undefined) { return; } var hierarchicalFacet = state.getHierarchicalFacetByName(facetName); var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var rootPath = state._getHierarchicalRootPath(hierarchicalFacet); var attributeToRefine; var attributesIndex; // we ask for parent facet values only when the `facet` is the current hierarchical facet if (facet === facetName) { // if we are at the root level already, no need to ask for facet values, we get them from // the hits query if (facetValue.indexOf(separator) === -1 || (!rootPath && hierarchicalRootLevel === true) || (rootPath && rootPath.split(separator).length === facetValue.split(separator).length)) { return; } if (!rootPath) { attributesIndex = facetValue.split(separator).length - 2; facetValue = facetValue.slice(0, facetValue.lastIndexOf(separator)); } else { attributesIndex = rootPath.split(separator).length - 1; facetValue = rootPath; } attributeToRefine = hierarchicalFacet.attributes[attributesIndex]; } else { attributesIndex = facetValue.split(separator).length - 1; attributeToRefine = hierarchicalFacet.attributes[attributesIndex]; } if (attributeToRefine) { facetFilters.push([attributeToRefine + ':' + facetValue]); } }); return facetFilters; }, _getHitsHierarchicalFacetsAttributes: function(state) { var out = []; return reduce_1( state.hierarchicalFacets, // ask for as much levels as there's hierarchical refinements function getHitsAttributesForHierarchicalFacet(allAttributes, hierarchicalFacet) { var hierarchicalRefinement = state.getHierarchicalRefinement(hierarchicalFacet.name)[0]; // if no refinement, ask for root level if (!hierarchicalRefinement) { allAttributes.push(hierarchicalFacet.attributes[0]); return allAttributes; } var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var level = hierarchicalRefinement.split(separator).length; var newAttributes = hierarchicalFacet.attributes.slice(0, level + 1); return allAttributes.concat(newAttributes); }, out); }, _getDisjunctiveHierarchicalFacetAttribute: function(state, hierarchicalFacet, rootLevel) { var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); if (rootLevel === true) { var rootPath = state._getHierarchicalRootPath(hierarchicalFacet); var attributeIndex = 0; if (rootPath) { attributeIndex = rootPath.split(separator).length; } return [hierarchicalFacet.attributes[attributeIndex]]; } var hierarchicalRefinement = state.getHierarchicalRefinement(hierarchicalFacet.name)[0] || ''; // if refinement is 'beers > IPA > Flying dog', // then we want `facets: ['beers > IPA']` as disjunctive facet (parent level values) var parentLevel = hierarchicalRefinement.split(separator).length - 1; return hierarchicalFacet.attributes.slice(0, parentLevel + 1); }, getSearchForFacetQuery: function(facetName, query, maxFacetHits, state) { var stateForSearchForFacetValues = state.isDisjunctiveFacet(facetName) ? state.clearRefinements(facetName) : state; var searchForFacetSearchParameters = { facetQuery: query, facetName: facetName }; if (typeof maxFacetHits === 'number') { searchForFacetSearchParameters.maxFacetHits = maxFacetHits; } var queries = merge_1(requestBuilder._getHitsSearchParams(stateForSearchForFacetValues), searchForFacetSearchParameters); return queries; } }; var requestBuilder_1 = requestBuilder; /** * The base implementation of `_.invert` and `_.invertBy` which inverts * `object` with values transformed by `iteratee` and set by `setter`. * * @private * @param {Object} object The object to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform values. * @param {Object} accumulator The initial inverted object. * @returns {Function} Returns `accumulator`. */ function baseInverter(object, setter, iteratee, accumulator) { _baseForOwn(object, function(value, key, object) { setter(accumulator, iteratee(value), key, object); }); return accumulator; } var _baseInverter = baseInverter; /** * Creates a function like `_.invertBy`. * * @private * @param {Function} setter The function to set accumulator values. * @param {Function} toIteratee The function to resolve iteratees. * @returns {Function} Returns the new inverter function. */ function createInverter(setter, toIteratee) { return function(object, iteratee) { return _baseInverter(object, setter, toIteratee(iteratee), {}); }; } var _createInverter = createInverter; /** * Creates an object composed of the inverted keys and values of `object`. * If `object` contains duplicate values, subsequent values overwrite * property assignments of previous values. * * @static * @memberOf _ * @since 0.7.0 * @category Object * @param {Object} object The object to invert. * @returns {Object} Returns the new inverted object. * @example * * var object = { 'a': 1, 'b': 2, 'c': 1 }; * * _.invert(object); * // => { '1': 'c', '2': 'b' } */ var invert = _createInverter(function(result, value, key) { result[value] = key; }, constant_1(identity_1)); var invert_1 = invert; var keys2Short = { advancedSyntax: 'aS', allowTyposOnNumericTokens: 'aTONT', analyticsTags: 'aT', analytics: 'a', aroundLatLngViaIP: 'aLLVIP', aroundLatLng: 'aLL', aroundPrecision: 'aP', aroundRadius: 'aR', attributesToHighlight: 'aTH', attributesToRetrieve: 'aTR', attributesToSnippet: 'aTS', disjunctiveFacetsRefinements: 'dFR', disjunctiveFacets: 'dF', distinct: 'd', facetsExcludes: 'fE', facetsRefinements: 'fR', facets: 'f', getRankingInfo: 'gRI', hierarchicalFacetsRefinements: 'hFR', hierarchicalFacets: 'hF', highlightPostTag: 'hPoT', highlightPreTag: 'hPrT', hitsPerPage: 'hPP', ignorePlurals: 'iP', index: 'idx', insideBoundingBox: 'iBB', insidePolygon: 'iPg', length: 'l', maxValuesPerFacet: 'mVPF', minimumAroundRadius: 'mAR', minProximity: 'mP', minWordSizefor1Typo: 'mWS1T', minWordSizefor2Typos: 'mWS2T', numericFilters: 'nF', numericRefinements: 'nR', offset: 'o', optionalWords: 'oW', page: 'p', queryType: 'qT', query: 'q', removeWordsIfNoResults: 'rWINR', replaceSynonymsInHighlight: 'rSIH', restrictSearchableAttributes: 'rSA', synonyms: 's', tagFilters: 'tF', tagRefinements: 'tR', typoTolerance: 'tT', optionalTagFilters: 'oTF', optionalFacetFilters: 'oFF', snippetEllipsisText: 'sET', disableExactOnAttributes: 'dEOA', enableExactOnSingleWordQuery: 'eEOSWQ' }; var short2Keys = invert_1(keys2Short); var shortener = { /** * All the keys of the state, encoded. * @const */ ENCODED_PARAMETERS: keys_1(short2Keys), /** * Decode a shorten attribute * @param {string} shortKey the shorten attribute * @return {string} the decoded attribute, undefined otherwise */ decode: function(shortKey) { return short2Keys[shortKey]; }, /** * Encode an attribute into a short version * @param {string} key the attribute * @return {string} the shorten attribute */ encode: function(key) { return keys2Short[key]; } }; var utils = createCommonjsModule(function (module, exports) { var has = Object.prototype.hasOwnProperty; var hexTable = (function () { var array = []; for (var i = 0; i < 256; ++i) { array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } return array; }()); var compactQueue = function compactQueue(queue) { var obj; while (queue.length) { var item = queue.pop(); obj = item.obj[item.prop]; if (Array.isArray(obj)) { var compacted = []; for (var j = 0; j < obj.length; ++j) { if (typeof obj[j] !== 'undefined') { compacted.push(obj[j]); } } item.obj[item.prop] = compacted; } } return obj; }; exports.arrayToObject = function arrayToObject(source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i]; } } return obj; }; exports.merge = function merge(target, source, options) { if (!source) { return target; } if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); } else if (typeof target === 'object') { if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { target[source] = true; } } else { return [target, source]; } return target; } if (typeof target !== 'object') { return [target].concat(source); } var mergeTarget = target; if (Array.isArray(target) && !Array.isArray(source)) { mergeTarget = exports.arrayToObject(target, options); } if (Array.isArray(target) && Array.isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { if (target[i] && typeof target[i] === 'object') { target[i] = exports.merge(target[i], item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function (acc, key) { var value = source[key]; if (has.call(acc, key)) { acc[key] = exports.merge(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; exports.assign = function assignSingleSource(target, source) { return Object.keys(source).reduce(function (acc, key) { acc[key] = source[key]; return acc; }, target); }; exports.decode = function (str) { try { return decodeURIComponent(str.replace(/\+/g, ' ')); } catch (e) { return str; } }; exports.encode = function encode(str) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } var string = typeof str === 'string' ? str : String(str); var out = ''; for (var i = 0; i < string.length; ++i) { var c = string.charCodeAt(i); if ( c === 0x2D // - || c === 0x2E // . || c === 0x5F // _ || c === 0x7E // ~ || (c >= 0x30 && c <= 0x39) // 0-9 || (c >= 0x41 && c <= 0x5A) // a-z || (c >= 0x61 && c <= 0x7A) // A-Z ) { out += string.charAt(i); continue; } if (c < 0x80) { out = out + hexTable[c]; continue; } if (c < 0x800) { out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; } return out; }; exports.compact = function compact(value) { var queue = [{ obj: { o: value }, prop: 'o' }]; var refs = []; for (var i = 0; i < queue.length; ++i) { var item = queue[i]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); for (var j = 0; j < keys.length; ++j) { var key = keys[j]; var val = obj[key]; if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { queue.push({ obj: obj, prop: key }); refs.push(val); } } } return compactQueue(queue); }; exports.isRegExp = function isRegExp(obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; exports.isBuffer = function isBuffer(obj) { if (obj === null || typeof obj === 'undefined') { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; }); var utils_1 = utils.arrayToObject; var utils_2 = utils.merge; var utils_3 = utils.assign; var utils_4 = utils.decode; var utils_5 = utils.encode; var utils_6 = utils.compact; var utils_7 = utils.isRegExp; var utils_8 = utils.isBuffer; var replace = String.prototype.replace; var percentTwenties = /%20/g; var formats = { 'default': 'RFC3986', formatters: { RFC1738: function (value) { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { return value; } }, RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; var arrayPrefixGenerators = { brackets: function brackets(prefix) { // eslint-disable-line func-name-matching return prefix + '[]'; }, indices: function indices(prefix, key) { // eslint-disable-line func-name-matching return prefix + '[' + key + ']'; }, repeat: function repeat(prefix) { // eslint-disable-line func-name-matching return prefix; } }; var toISO = Date.prototype.toISOString; var defaults$3 = { delimiter: '&', encode: true, encoder: utils.encode, encodeValuesOnly: false, serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; var stringify = function stringify( // eslint-disable-line func-name-matching object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly ) { var obj = object; if (typeof filter === 'function') { obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); } else if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults$3.encoder) : prefix; } obj = ''; } if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$3.encoder); return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$3.encoder))]; } return [formatter(prefix) + '=' + formatter(String(obj))]; } var values = []; if (typeof obj === 'undefined') { return values; } var objKeys; if (Array.isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } if (Array.isArray(obj)) { values = values.concat(stringify( obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } else { values = values.concat(stringify( obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } } return values; }; var stringify_1 = function (object, opts) { var obj = object; var options = opts ? utils.assign({}, opts) : {}; if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } var delimiter = typeof options.delimiter === 'undefined' ? defaults$3.delimiter : options.delimiter; var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults$3.strictNullHandling; var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults$3.skipNulls; var encode = typeof options.encode === 'boolean' ? options.encode : defaults$3.encode; var encoder = typeof options.encoder === 'function' ? options.encoder : defaults$3.encoder; var sort = typeof options.sort === 'function' ? options.sort : null; var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults$3.serializeDate; var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults$3.encodeValuesOnly; if (typeof options.format === 'undefined') { options.format = formats['default']; } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { throw new TypeError('Unknown format option provided.'); } var formatter = formats.formatters[options.format]; var objKeys; var filter; if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); } else if (Array.isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; if (typeof obj !== 'object' || obj === null) { return ''; } var arrayFormat; if (options.arrayFormat in arrayPrefixGenerators) { arrayFormat = options.arrayFormat; } else if ('indices' in options) { arrayFormat = options.indices ? 'indices' : 'repeat'; } else { arrayFormat = 'indices'; } var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; if (!objKeys) { objKeys = Object.keys(obj); } if (sort) { objKeys.sort(sort); } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } keys = keys.concat(stringify( obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode ? encoder : null, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } var joined = keys.join(delimiter); var prefix = options.addQueryPrefix === true ? '?' : ''; return joined.length > 0 ? prefix + joined : ''; }; var has$1 = Object.prototype.hasOwnProperty; var defaults$4 = { allowDots: false, allowPrototypes: false, arrayLimit: 20, decoder: utils.decode, delimiter: '&', depth: 5, parameterLimit: 1000, plainObjects: false, strictNullHandling: false }; var parseValues = function parseQueryStringValues(str, options) { var obj = {}; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); for (var i = 0; i < parts.length; ++i) { var part = parts[i]; var bracketEqualsPos = part.indexOf(']='); var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; var key, val; if (pos === -1) { key = options.decoder(part, defaults$4.decoder); val = options.strictNullHandling ? null : ''; } else { key = options.decoder(part.slice(0, pos), defaults$4.decoder); val = options.decoder(part.slice(pos + 1), defaults$4.decoder); } if (has$1.call(obj, key)) { obj[key] = [].concat(obj[key]).concat(val); } else { obj[key] = val; } } return obj; }; var parseObject = function (chain, val, options) { var leaf = val; for (var i = chain.length - 1; i >= 0; --i) { var obj; var root = chain[i]; if (root === '[]') { obj = []; obj = obj.concat(leaf); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; var index = parseInt(cleanRoot, 10); if ( !isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit) ) { obj = []; obj[index] = leaf; } else { obj[cleanRoot] = leaf; } } leaf = obj; } return leaf; }; var parseKeys = function parseQueryStringKeys(givenKey, val, options) { if (!givenKey) { return; } // Transform dot notation to bracket notation var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; // The regex chunks var brackets = /(\[[^[\]]*])/; var child = /(\[[^[\]]*])/g; // Get the parent var segment = brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; // Stash the parent if it exists var keys = []; if (parent) { // If we aren't using plain objects, optionally prefix keys // that would overwrite object prototype properties if (!options.plainObjects && has$1.call(Object.prototype, parent)) { if (!options.allowPrototypes) { return; } } keys.push(parent); } // Loop through children appending to the array until we hit depth var i = 0; while ((segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has$1.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; } } keys.push(segment[1]); } // If there's a remainder, just add whatever is left if (segment) { keys.push('[' + key.slice(segment.index) + ']'); } return parseObject(keys, val, options); }; var parse = function (str, opts) { var options = opts ? utils.assign({}, opts) : {}; if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { throw new TypeError('Decoder has to be a function.'); } options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults$4.delimiter; options.depth = typeof options.depth === 'number' ? options.depth : defaults$4.depth; options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults$4.arrayLimit; options.parseArrays = options.parseArrays !== false; options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults$4.decoder; options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults$4.allowDots; options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults$4.plainObjects; options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults$4.allowPrototypes; options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults$4.parameterLimit; options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults$4.strictNullHandling; if (str === '' || str === null || typeof str === 'undefined') { return options.plainObjects ? Object.create(null) : {}; } var tempObj = typeof str === 'string' ? parseValues(str, options) : str; var obj = options.plainObjects ? Object.create(null) : {}; // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options); obj = utils.merge(obj, newObj, options); } return utils.compact(obj); }; var lib$1 = { formats: formats, parse: parse, stringify: stringify_1 }; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$7 = 1; var WRAP_PARTIAL_FLAG$4 = 32; /** * Creates a function that invokes `func` with the `this` binding of `thisArg` * and `partials` prepended to the arguments it receives. * * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to bind. * @param {*} thisArg The `this` binding of `func`. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new bound function. * @example * * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; * } * * var object = { 'user': 'fred' }; * * var bound = _.bind(greet, object, 'hi'); * bound('!'); * // => 'hi fred!' * * // Bound with placeholders. * var bound = _.bind(greet, object, _, '!'); * bound('hi'); * // => 'hi fred!' */ var bind = _baseRest(function(func, thisArg, partials) { var bitmask = WRAP_BIND_FLAG$7; if (partials.length) { var holders = _replaceHolders(partials, _getHolder(bind)); bitmask |= WRAP_PARTIAL_FLAG$4; } return _createWrap(func, bitmask, thisArg, partials, holders); }); // Assign default placeholders. bind.placeholder = {}; var bind_1 = bind; /** * The base implementation of `_.pick` without support for individual * property identifiers. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @returns {Object} Returns the new object. */ function basePick(object, paths) { return _basePickBy(object, paths, function(value, path) { return hasIn_1(object, path); }); } var _basePick = basePick; /** * Creates an object composed of the picked `object` properties. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ var pick = _flatRest(function(object, paths) { return object == null ? {} : _basePick(object, paths); }); var pick_1 = pick; /** * The opposite of `_.mapValues`; this method creates an object with the * same values as `object` and keys generated by running each own enumerable * string keyed property of `object` thru `iteratee`. The iteratee is invoked * with three arguments: (value, key, object). * * @static * @memberOf _ * @since 3.8.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapValues * @example * * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { * return key + value; * }); * // => { 'a1': 1, 'b2': 2 } */ function mapKeys(object, iteratee) { var result = {}; iteratee = _baseIteratee(iteratee, 3); _baseForOwn(object, function(value, key, object) { _baseAssignValue(result, iteratee(value, key, object), value); }); return result; } var mapKeys_1 = mapKeys; /** * Creates an object with the same keys as `object` and values generated * by running each own enumerable string keyed property of `object` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, key, object). * * @static * @memberOf _ * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example * * var users = { * 'fred': { 'user': 'fred', 'age': 40 }, * 'pebbles': { 'user': 'pebbles', 'age': 1 } * }; * * _.mapValues(users, function(o) { return o.age; }); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) * * // The `_.property` iteratee shorthand. * _.mapValues(users, 'age'); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) */ function mapValues(object, iteratee) { var result = {}; iteratee = _baseIteratee(iteratee, 3); _baseForOwn(object, function(value, key, object) { _baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } var mapValues_1 = mapValues; /** * Module containing the functions to serialize and deserialize * {SearchParameters} in the query string format * @module algoliasearchHelper.url */ var encode = utils.encode; function recursiveEncode(input) { if (isPlainObject_1(input)) { return mapValues_1(input, recursiveEncode); } if (isArray_1(input)) { return map_1(input, recursiveEncode); } if (isString_1(input)) { return encode(input); } return input; } var refinementsParameters = ['dFR', 'fR', 'nR', 'hFR', 'tR']; var stateKeys = shortener.ENCODED_PARAMETERS; function sortQueryStringValues(prefixRegexp, invertedMapping, a, b) { if (prefixRegexp !== null) { a = a.replace(prefixRegexp, ''); b = b.replace(prefixRegexp, ''); } a = invertedMapping[a] || a; b = invertedMapping[b] || b; if (stateKeys.indexOf(a) !== -1 || stateKeys.indexOf(b) !== -1) { if (a === 'q') return -1; if (b === 'q') return 1; var isARefinements = refinementsParameters.indexOf(a) !== -1; var isBRefinements = refinementsParameters.indexOf(b) !== -1; if (isARefinements && !isBRefinements) { return 1; } else if (isBRefinements && !isARefinements) { return -1; } } return a.localeCompare(b); } /** * Read a query string and return an object containing the state * @param {string} queryString the query string that will be decoded * @param {object} [options] accepted options : * - prefix : the prefix used for the saved attributes, you have to provide the * same that was used for serialization * - mapping : map short attributes to another value e.g. {q: 'query'} * @return {object} partial search parameters object (same properties than in the * SearchParameters but not exhaustive) */ var getStateFromQueryString = function(queryString, options) { var prefixForParameters = options && options.prefix || ''; var mapping = options && options.mapping || {}; var invertedMapping = invert_1(mapping); var partialStateWithPrefix = lib$1.parse(queryString); var prefixRegexp = new RegExp('^' + prefixForParameters); var partialState = mapKeys_1( partialStateWithPrefix, function(v, k) { var hasPrefix = prefixForParameters && prefixRegexp.test(k); var unprefixedKey = hasPrefix ? k.replace(prefixRegexp, '') : k; var decodedKey = shortener.decode(invertedMapping[unprefixedKey] || unprefixedKey); return decodedKey || unprefixedKey; } ); var partialStateWithParsedNumbers = SearchParameters_1._parseNumbers(partialState); return pick_1(partialStateWithParsedNumbers, SearchParameters_1.PARAMETERS); }; /** * Retrieve an object of all the properties that are not understandable as helper * parameters. * @param {string} queryString the query string to read * @param {object} [options] the options * - prefixForParameters : prefix used for the helper configuration keys * - mapping : map short attributes to another value e.g. {q: 'query'} * @return {object} the object containing the parsed configuration that doesn't * to the helper */ var getUnrecognizedParametersInQueryString = function(queryString, options) { var prefixForParameters = options && options.prefix; var mapping = options && options.mapping || {}; var invertedMapping = invert_1(mapping); var foreignConfig = {}; var config = lib$1.parse(queryString); if (prefixForParameters) { var prefixRegexp = new RegExp('^' + prefixForParameters); forEach_1(config, function(v, key) { if (!prefixRegexp.test(key)) foreignConfig[key] = v; }); } else { forEach_1(config, function(v, key) { if (!shortener.decode(invertedMapping[key] || key)) foreignConfig[key] = v; }); } return foreignConfig; }; /** * Generate a query string for the state passed according to the options * @param {SearchParameters} state state to serialize * @param {object} [options] May contain the following parameters : * - prefix : prefix in front of the keys * - mapping : map short attributes to another value e.g. {q: 'query'} * - moreAttributes : more values to be added in the query string. Those values * won't be prefixed. * - safe : get safe urls for use in emails, chat apps or any application auto linking urls. * All parameters and values will be encoded in a way that it's safe to share them. * Default to false for legacy reasons () * @return {string} the query string */ var getQueryStringFromState = function(state, options) { var moreAttributes = options && options.moreAttributes; var prefixForParameters = options && options.prefix || ''; var mapping = options && options.mapping || {}; var safe = options && options.safe || false; var invertedMapping = invert_1(mapping); var stateForUrl = safe ? state : recursiveEncode(state); var encodedState = mapKeys_1( stateForUrl, function(v, k) { var shortK = shortener.encode(k); return prefixForParameters + (mapping[shortK] || shortK); } ); var prefixRegexp = prefixForParameters === '' ? null : new RegExp('^' + prefixForParameters); var sort = bind_1(sortQueryStringValues, null, prefixRegexp, invertedMapping); if (!isEmpty_1(moreAttributes)) { var stateQs = lib$1.stringify(encodedState, {encode: safe, sort: sort}); var moreQs = lib$1.stringify(moreAttributes, {encode: safe}); if (!stateQs) return moreQs; return stateQs + '&' + moreQs; } return lib$1.stringify(encodedState, {encode: safe, sort: sort}); }; var url = { getStateFromQueryString: getStateFromQueryString, getUnrecognizedParametersInQueryString: getUnrecognizedParametersInQueryString, getQueryStringFromState: getQueryStringFromState }; var version$1 = '2.22.0'; /** * Event triggered when a parameter is set or updated * @event AlgoliaSearchHelper#event:change * @property {SearchParameters} state the current parameters with the latest changes applied * @property {SearchResults} lastResults the previous results received from Algolia. `null` before * the first request * @example * helper.on('change', function(state, lastResults) { * console.log('The parameters have changed'); * }); */ /** * Event triggered when a main search is sent to Algolia * @event AlgoliaSearchHelper#event:search * @property {SearchParameters} state the parameters used for this search * @property {SearchResults} lastResults the results from the previous search. `null` if * it is the first search. * @example * helper.on('search', function(state, lastResults) { * console.log('Search sent'); * }); */ /** * Event triggered when a search using `searchForFacetValues` is sent to Algolia * @event AlgoliaSearchHelper#event:searchForFacetValues * @property {SearchParameters} state the parameters used for this search * it is the first search. * @property {string} facet the facet searched into * @property {string} query the query used to search in the facets * @example * helper.on('searchForFacetValues', function(state, facet, query) { * console.log('searchForFacetValues sent'); * }); */ /** * Event triggered when a search using `searchOnce` is sent to Algolia * @event AlgoliaSearchHelper#event:searchOnce * @property {SearchParameters} state the parameters used for this search * it is the first search. * @example * helper.on('searchOnce', function(state) { * console.log('searchOnce sent'); * }); */ /** * Event triggered when the results are retrieved from Algolia * @event AlgoliaSearchHelper#event:result * @property {SearchResults} results the results received from Algolia * @property {SearchParameters} state the parameters used to query Algolia. Those might * be different from the one in the helper instance (for example if the network is unreliable). * @example * helper.on('result', function(results, state) { * console.log('Search results received'); * }); */ /** * Event triggered when Algolia sends back an error. For example, if an unknown parameter is * used, the error can be caught using this event. * @event AlgoliaSearchHelper#event:error * @property {Error} error the error returned by the Algolia. * @example * helper.on('error', function(error) { * console.log('Houston we got a problem.'); * }); */ /** * Event triggered when the queue of queries have been depleted (with any result or outdated queries) * @event AlgoliaSearchHelper#event:searchQueueEmpty * @example * helper.on('searchQueueEmpty', function() { * console.log('No more search pending'); * // This is received before the result event if we're not expecting new results * }); * * helper.search(); */ /** * Initialize a new AlgoliaSearchHelper * @class * @classdesc The AlgoliaSearchHelper is a class that ease the management of the * search. It provides an event based interface for search callbacks: * - change: when the internal search state is changed. * This event contains a {@link SearchParameters} object and the * {@link SearchResults} of the last result if any. * - search: when a search is triggered using the `search()` method. * - result: when the response is retrieved from Algolia and is processed. * This event contains a {@link SearchResults} object and the * {@link SearchParameters} corresponding to this answer. * - error: when the response is an error. This event contains the error returned by the server. * @param {AlgoliaSearch} client an AlgoliaSearch client * @param {string} index the index name to query * @param {SearchParameters | object} options an object defining the initial * config of the search. It doesn't have to be a {SearchParameters}, * just an object containing the properties you need from it. */ function AlgoliaSearchHelper(client, index, options) { if (!client.addAlgoliaAgent) console.log('Please upgrade to the newest version of the JS Client.'); // eslint-disable-line else if (!doesClientAgentContainsHelper(client)) client.addAlgoliaAgent('JS Helper ' + version$1); this.setClient(client); var opts = options || {}; opts.index = index; this.state = SearchParameters_1.make(opts); this.lastResults = null; this._queryId = 0; this._lastQueryIdReceived = -1; this.derivedHelpers = []; this._currentNbQueries = 0; } util.inherits(AlgoliaSearchHelper, events.EventEmitter); /** * Start the search with the parameters set in the state. When the * method is called, it triggers a `search` event. The results will * be available through the `result` event. If an error occurs, an * `error` will be fired instead. * @return {AlgoliaSearchHelper} * @fires search * @fires result * @fires error * @chainable */ AlgoliaSearchHelper.prototype.search = function() { this._search(); return this; }; /** * Gets the search query parameters that would be sent to the Algolia Client * for the hits * @return {object} Query Parameters */ AlgoliaSearchHelper.prototype.getQuery = function() { var state = this.state; return requestBuilder_1._getHitsSearchParams(state); }; /** * Start a search using a modified version of the current state. This method does * not trigger the helper lifecycle and does not modify the state kept internally * by the helper. This second aspect means that the next search call will be the * same as a search call before calling searchOnce. * @param {object} options can contain all the parameters that can be set to SearchParameters * plus the index * @param {function} [callback] optional callback executed when the response from the * server is back. * @return {promise|undefined} if a callback is passed the method returns undefined * otherwise it returns a promise containing an object with two keys : * - content with a SearchResults * - state with the state used for the query as a SearchParameters * @example * // Changing the number of records returned per page to 1 * // This example uses the callback API * var state = helper.searchOnce({hitsPerPage: 1}, * function(error, content, state) { * // if an error occurred it will be passed in error, otherwise its value is null * // content contains the results formatted as a SearchResults * // state is the instance of SearchParameters used for this search * }); * @example * // Changing the number of records returned per page to 1 * // This example uses the promise API * var state1 = helper.searchOnce({hitsPerPage: 1}) * .then(promiseHandler); * * function promiseHandler(res) { * // res contains * // { * // content : SearchResults * // state : SearchParameters (the one used for this specific search) * // } * } */ AlgoliaSearchHelper.prototype.searchOnce = function(options, cb) { var tempState = !options ? this.state : this.state.setQueryParameters(options); var queries = requestBuilder_1._getQueries(tempState.index, tempState); var self = this; this._currentNbQueries++; this.emit('searchOnce', tempState); if (cb) { return this.client.search( queries, function(err, content) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); if (err) cb(err, null, tempState); else cb(err, new SearchResults_1(tempState, content.results), tempState); } ); } return this.client.search(queries).then(function(content) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); return { content: new SearchResults_1(tempState, content.results), state: tempState, _originalResponse: content }; }, function(e) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); throw e; }); }; /** * Structure of each result when using * [`searchForFacetValues()`](reference.html#AlgoliaSearchHelper#searchForFacetValues) * @typedef FacetSearchHit * @type {object} * @property {string} value the facet value * @property {string} highlighted the facet value highlighted with the query string * @property {number} count number of occurrence of this facet value * @property {boolean} isRefined true if the value is already refined */ /** * Structure of the data resolved by the * [`searchForFacetValues()`](reference.html#AlgoliaSearchHelper#searchForFacetValues) * promise. * @typedef FacetSearchResult * @type {object} * @property {FacetSearchHit} facetHits the results for this search for facet values * @property {number} processingTimeMS time taken by the query inside the engine */ /** * Search for facet values based on an query and the name of a faceted attribute. This * triggers a search and will return a promise. On top of using the query, it also sends * the parameters from the state so that the search is narrowed down to only the possible values. * * See the description of [FacetSearchResult](reference.html#FacetSearchResult) * @param {string} facet the name of the faceted attribute * @param {string} query the string query for the search * @param {number} maxFacetHits the maximum number values returned. Should be > 0 and <= 100 * @return {promise<FacetSearchResult>} the results of the search */ AlgoliaSearchHelper.prototype.searchForFacetValues = function(facet, query, maxFacetHits) { var state = this.state; var index = this.client.initIndex(this.state.index); var isDisjunctive = state.isDisjunctiveFacet(facet); var algoliaQuery = requestBuilder_1.getSearchForFacetQuery(facet, query, maxFacetHits, this.state); this._currentNbQueries++; var self = this; this.emit('searchForFacetValues', state, facet, query); return index.searchForFacetValues(algoliaQuery).then(function addIsRefined(content) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); content.facetHits = forEach_1(content.facetHits, function(f) { f.isRefined = isDisjunctive ? state.isDisjunctiveFacetRefined(facet, f.value) : state.isFacetRefined(facet, f.value); }); return content; }, function(e) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); throw e; }); }; /** * Sets the text query used for the search. * * This method resets the current page to 0. * @param {string} q the user query * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setQuery = function(q) { this.state = this.state.setPage(0).setQuery(q); this._change(); return this; }; /** * Remove all the types of refinements except tags. A string can be provided to remove * only the refinements of a specific attribute. For more advanced use case, you can * provide a function instead. This function should follow the * [clearCallback definition](#SearchParameters.clearCallback). * * This method resets the current page to 0. * @param {string} [name] optional name of the facet / attribute on which we want to remove all refinements * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * // Removing all the refinements * helper.clearRefinements().search(); * @example * // Removing all the filters on a the category attribute. * helper.clearRefinements('category').search(); * @example * // Removing only the exclude filters on the category facet. * helper.clearRefinements(function(value, attribute, type) { * return type === 'exclude' && attribute === 'category'; * }).search(); */ AlgoliaSearchHelper.prototype.clearRefinements = function(name) { this.state = this.state.setPage(0).clearRefinements(name); this._change(); return this; }; /** * Remove all the tag filters. * * This method resets the current page to 0. * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.clearTags = function() { this.state = this.state.setPage(0).clearTags(); this._change(); return this; }; /** * Adds a disjunctive filter to a faceted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addDisjunctiveFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).addDisjunctiveFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addDisjunctiveFacetRefinement} */ AlgoliaSearchHelper.prototype.addDisjunctiveRefine = function() { return this.addDisjunctiveFacetRefinement.apply(this, arguments); }; /** * Adds a refinement on a hierarchical facet. It will throw * an exception if the facet is not defined or if the facet * is already refined. * * This method resets the current page to 0. * @param {string} facet the facet name * @param {string} path the hierarchical facet path * @return {AlgoliaSearchHelper} * @throws Error if the facet is not defined or if the facet is refined * @chainable * @fires change */ AlgoliaSearchHelper.prototype.addHierarchicalFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).addHierarchicalFacetRefinement(facet, value); this._change(); return this; }; /** * Adds a an numeric filter to an attribute with the `operator` and `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} attribute the attribute on which the numeric filter applies * @param {string} operator the operator of the filter * @param {number} value the value of the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addNumericRefinement = function(attribute, operator, value) { this.state = this.state.setPage(0).addNumericRefinement(attribute, operator, value); this._change(); return this; }; /** * Adds a filter to a faceted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).addFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addFacetRefinement} */ AlgoliaSearchHelper.prototype.addRefine = function() { return this.addFacetRefinement.apply(this, arguments); }; /** * Adds a an exclusion filter to a faceted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addFacetExclusion = function(facet, value) { this.state = this.state.setPage(0).addExcludeRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addFacetExclusion} */ AlgoliaSearchHelper.prototype.addExclude = function() { return this.addFacetExclusion.apply(this, arguments); }; /** * Adds a tag filter with the `tag` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} tag the tag to add to the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addTag = function(tag) { this.state = this.state.setPage(0).addTagRefinement(tag); this._change(); return this; }; /** * Removes an numeric filter to an attribute with the `operator` and `value` provided. If the * filter is not set, it doesn't change the filters. * * Some parameters are optional, triggering different behavior: * - if the value is not provided, then all the numeric value will be removed for the * specified attribute/operator couple. * - if the operator is not provided either, then all the numeric filter on this attribute * will be removed. * * This method resets the current page to 0. * @param {string} attribute the attribute on which the numeric filter applies * @param {string} [operator] the operator of the filter * @param {number} [value] the value of the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeNumericRefinement = function(attribute, operator, value) { this.state = this.state.setPage(0).removeNumericRefinement(attribute, operator, value); this._change(); return this; }; /** * Removes a disjunctive filter to a faceted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeDisjunctiveFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).removeDisjunctiveFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeDisjunctiveFacetRefinement} */ AlgoliaSearchHelper.prototype.removeDisjunctiveRefine = function() { return this.removeDisjunctiveFacetRefinement.apply(this, arguments); }; /** * Removes the refinement set on a hierarchical facet. * @param {string} facet the facet name * @return {AlgoliaSearchHelper} * @throws Error if the facet is not defined or if the facet is not refined * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeHierarchicalFacetRefinement = function(facet) { this.state = this.state.setPage(0).removeHierarchicalFacetRefinement(facet); this._change(); return this; }; /** * Removes a filter to a faceted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).removeFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeFacetRefinement} */ AlgoliaSearchHelper.prototype.removeRefine = function() { return this.removeFacetRefinement.apply(this, arguments); }; /** * Removes an exclusion filter to a faceted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeFacetExclusion = function(facet, value) { this.state = this.state.setPage(0).removeExcludeRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeFacetExclusion} */ AlgoliaSearchHelper.prototype.removeExclude = function() { return this.removeFacetExclusion.apply(this, arguments); }; /** * Removes a tag filter with the `tag` provided. If the * filter is not set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} tag tag to remove from the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeTag = function(tag) { this.state = this.state.setPage(0).removeTagRefinement(tag); this._change(); return this; }; /** * Adds or removes an exclusion filter to a faceted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleFacetExclusion = function(facet, value) { this.state = this.state.setPage(0).toggleExcludeFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#toggleFacetExclusion} */ AlgoliaSearchHelper.prototype.toggleExclude = function() { return this.toggleFacetExclusion.apply(this, arguments); }; /** * Adds or removes a filter to a faceted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method can be used for conjunctive, disjunctive and hierarchical filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @throws Error will throw an error if the facet is not declared in the settings of the helper * @fires change * @chainable * @deprecated since version 2.19.0, see {@link AlgoliaSearchHelper#toggleFacetRefinement} */ AlgoliaSearchHelper.prototype.toggleRefinement = function(facet, value) { return this.toggleFacetRefinement(facet, value); }; /** * Adds or removes a filter to a faceted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method can be used for conjunctive, disjunctive and hierarchical filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @throws Error will throw an error if the facet is not declared in the settings of the helper * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).toggleFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#toggleFacetRefinement} */ AlgoliaSearchHelper.prototype.toggleRefine = function() { return this.toggleFacetRefinement.apply(this, arguments); }; /** * Adds or removes a tag filter with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method resets the current page to 0. * @param {string} tag tag to remove or add * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleTag = function(tag) { this.state = this.state.setPage(0).toggleTagRefinement(tag); this._change(); return this; }; /** * Increments the page number by one. * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * helper.setPage(0).nextPage().getPage(); * // returns 1 */ AlgoliaSearchHelper.prototype.nextPage = function() { return this.setPage(this.state.page + 1); }; /** * Decrements the page number by one. * @fires change * @return {AlgoliaSearchHelper} * @chainable * @example * helper.setPage(1).previousPage().getPage(); * // returns 0 */ AlgoliaSearchHelper.prototype.previousPage = function() { return this.setPage(this.state.page - 1); }; /** * @private */ function setCurrentPage(page) { if (page < 0) throw new Error('Page requested below 0.'); this.state = this.state.setPage(page); this._change(); return this; } /** * Change the current page * @deprecated * @param {number} page The page number * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setCurrentPage = setCurrentPage; /** * Updates the current page. * @function * @param {number} page The page number * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setPage = setCurrentPage; /** * Updates the name of the index that will be targeted by the query. * * This method resets the current page to 0. * @param {string} name the index name * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setIndex = function(name) { this.state = this.state.setPage(0).setIndex(name); this._change(); return this; }; /** * Update a parameter of the search. This method reset the page * * The complete list of parameters is available on the * [Algolia website](https://www.algolia.com/doc/rest#query-an-index). * The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts) * or benefit from higher-level APIs (all the kind of filters and facets have their own API) * * This method resets the current page to 0. * @param {string} parameter name of the parameter to update * @param {any} value new value of the parameter * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * helper.setQueryParameter('hitsPerPage', 20).search(); */ AlgoliaSearchHelper.prototype.setQueryParameter = function(parameter, value) { var newState = this.state.setPage(0).setQueryParameter(parameter, value); if (this.state === newState) return this; this.state = newState; this._change(); return this; }; /** * Set the whole state (warning: will erase previous state) * @param {SearchParameters} newState the whole new state * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setState = function(newState) { this.state = SearchParameters_1.make(newState); this._change(); return this; }; /** * Get the current search state stored in the helper. This object is immutable. * @param {string[]} [filters] optional filters to retrieve only a subset of the state * @return {SearchParameters|object} if filters is specified a plain object is * returned containing only the requested fields, otherwise return the unfiltered * state * @example * // Get the complete state as stored in the helper * helper.getState(); * @example * // Get a part of the state with all the refinements on attributes and the query * helper.getState(['query', 'attribute:category']); */ AlgoliaSearchHelper.prototype.getState = function(filters) { if (filters === undefined) return this.state; return this.state.filter(filters); }; /** * DEPRECATED Get part of the state as a query string. By default, the output keys will not * be prefixed and will only take the applied refinements and the query. * @deprecated * @param {object} [options] May contain the following parameters : * * **filters** : possible values are all the keys of the [SearchParameters](#searchparameters), `index` for * the index, all the refinements with `attribute:*` or for some specific attributes with * `attribute:theAttribute` * * **prefix** : prefix in front of the keys * * **moreAttributes** : more values to be added in the query string. Those values * won't be prefixed. * @return {string} the query string */ AlgoliaSearchHelper.prototype.getStateAsQueryString = function getStateAsQueryString(options) { var filters = options && options.filters || ['query', 'attribute:*']; var partialState = this.getState(filters); return url.getQueryStringFromState(partialState, options); }; /** * DEPRECATED Read a query string and return an object containing the state. Use * url module. * @deprecated * @static * @param {string} queryString the query string that will be decoded * @param {object} options accepted options : * - prefix : the prefix used for the saved attributes, you have to provide the * same that was used for serialization * @return {object} partial search parameters object (same properties than in the * SearchParameters but not exhaustive) * @see {@link url#getStateFromQueryString} */ AlgoliaSearchHelper.getConfigurationFromQueryString = url.getStateFromQueryString; /** * DEPRECATED Retrieve an object of all the properties that are not understandable as helper * parameters. Use url module. * @deprecated * @static * @param {string} queryString the query string to read * @param {object} options the options * - prefixForParameters : prefix used for the helper configuration keys * @return {object} the object containing the parsed configuration that doesn't * to the helper */ AlgoliaSearchHelper.getForeignConfigurationInQueryString = url.getUnrecognizedParametersInQueryString; /** * DEPRECATED Overrides part of the state with the properties stored in the provided query * string. * @deprecated * @param {string} queryString the query string containing the informations to url the state * @param {object} options optional parameters : * - prefix : prefix used for the algolia parameters * - triggerChange : if set to true the state update will trigger a change event */ AlgoliaSearchHelper.prototype.setStateFromQueryString = function(queryString, options) { var triggerChange = options && options.triggerChange || false; var configuration = url.getStateFromQueryString(queryString, options); var updatedState = this.state.setQueryParameters(configuration); if (triggerChange) this.setState(updatedState); else this.overrideStateWithoutTriggeringChangeEvent(updatedState); }; /** * Override the current state without triggering a change event. * Do not use this method unless you know what you are doing. (see the example * for a legit use case) * @param {SearchParameters} newState the whole new state * @return {AlgoliaSearchHelper} * @example * helper.on('change', function(state){ * // In this function you might want to find a way to store the state in the url/history * updateYourURL(state) * }) * window.onpopstate = function(event){ * // This is naive though as you should check if the state is really defined etc. * helper.overrideStateWithoutTriggeringChangeEvent(event.state).search() * } * @chainable */ AlgoliaSearchHelper.prototype.overrideStateWithoutTriggeringChangeEvent = function(newState) { this.state = new SearchParameters_1(newState); return this; }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasRefinements} */ AlgoliaSearchHelper.prototype.isRefined = function(facet, value) { if (this.state.isConjunctiveFacet(facet)) { return this.state.isFacetRefined(facet, value); } else if (this.state.isDisjunctiveFacet(facet)) { return this.state.isDisjunctiveFacetRefined(facet, value); } throw new Error(facet + ' is not properly defined in this helper configuration' + '(use the facets or disjunctiveFacets keys to configure it)'); }; /** * Check if an attribute has any numeric, conjunctive, disjunctive or hierarchical filters. * @param {string} attribute the name of the attribute * @return {boolean} true if the attribute is filtered by at least one value * @example * // hasRefinements works with numeric, conjunctive, disjunctive and hierarchical filters * helper.hasRefinements('price'); // false * helper.addNumericRefinement('price', '>', 100); * helper.hasRefinements('price'); // true * * helper.hasRefinements('color'); // false * helper.addFacetRefinement('color', 'blue'); * helper.hasRefinements('color'); // true * * helper.hasRefinements('material'); // false * helper.addDisjunctiveFacetRefinement('material', 'plastic'); * helper.hasRefinements('material'); // true * * helper.hasRefinements('categories'); // false * helper.toggleFacetRefinement('categories', 'kitchen > knife'); * helper.hasRefinements('categories'); // true * */ AlgoliaSearchHelper.prototype.hasRefinements = function(attribute) { if (!isEmpty_1(this.state.getNumericRefinements(attribute))) { return true; } else if (this.state.isConjunctiveFacet(attribute)) { return this.state.isFacetRefined(attribute); } else if (this.state.isDisjunctiveFacet(attribute)) { return this.state.isDisjunctiveFacetRefined(attribute); } else if (this.state.isHierarchicalFacet(attribute)) { return this.state.isHierarchicalFacetRefined(attribute); } // there's currently no way to know that the user did call `addNumericRefinement` at some point // thus we cannot distinguish if there once was a numeric refinement that was cleared // so we will return false in every other situations to be consistent // while what we should do here is throw because we did not find the attribute in any type // of refinement return false; }; /** * Check if a value is excluded for a specific faceted attribute. If the value * is omitted then the function checks if there is any excluding refinements. * * @param {string} facet name of the attribute for used for faceting * @param {string} [value] optional value. If passed will test that this value * is filtering the given facet. * @return {boolean} true if refined * @example * helper.isExcludeRefined('color'); // false * helper.isExcludeRefined('color', 'blue') // false * helper.isExcludeRefined('color', 'red') // false * * helper.addFacetExclusion('color', 'red'); * * helper.isExcludeRefined('color'); // true * helper.isExcludeRefined('color', 'blue') // false * helper.isExcludeRefined('color', 'red') // true */ AlgoliaSearchHelper.prototype.isExcluded = function(facet, value) { return this.state.isExcludeRefined(facet, value); }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasRefinements} */ AlgoliaSearchHelper.prototype.isDisjunctiveRefined = function(facet, value) { return this.state.isDisjunctiveFacetRefined(facet, value); }; /** * Check if the string is a currently filtering tag. * @param {string} tag tag to check * @return {boolean} */ AlgoliaSearchHelper.prototype.hasTag = function(tag) { return this.state.isTagRefined(tag); }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasTag} */ AlgoliaSearchHelper.prototype.isTagRefined = function() { return this.hasTagRefinements.apply(this, arguments); }; /** * Get the name of the currently used index. * @return {string} * @example * helper.setIndex('highestPrice_products').getIndex(); * // returns 'highestPrice_products' */ AlgoliaSearchHelper.prototype.getIndex = function() { return this.state.index; }; function getCurrentPage() { return this.state.page; } /** * Get the currently selected page * @deprecated * @return {number} the current page */ AlgoliaSearchHelper.prototype.getCurrentPage = getCurrentPage; /** * Get the currently selected page * @function * @return {number} the current page */ AlgoliaSearchHelper.prototype.getPage = getCurrentPage; /** * Get all the tags currently set to filters the results. * * @return {string[]} The list of tags currently set. */ AlgoliaSearchHelper.prototype.getTags = function() { return this.state.tagRefinements; }; /** * Get a parameter of the search by its name. It is possible that a parameter is directly * defined in the index dashboard, but it will be undefined using this method. * * The complete list of parameters is * available on the * [Algolia website](https://www.algolia.com/doc/rest#query-an-index). * The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts) * or benefit from higher-level APIs (all the kind of filters have their own API) * @param {string} parameterName the parameter name * @return {any} the parameter value * @example * var hitsPerPage = helper.getQueryParameter('hitsPerPage'); */ AlgoliaSearchHelper.prototype.getQueryParameter = function(parameterName) { return this.state.getQueryParameter(parameterName); }; /** * Get the list of refinements for a given attribute. This method works with * conjunctive, disjunctive, excluding and numerical filters. * * See also SearchResults#getRefinements * * @param {string} facetName attribute name used for faceting * @return {Array.<FacetRefinement|NumericRefinement>} All Refinement are objects that contain a value, and * a type. Numeric also contains an operator. * @example * helper.addNumericRefinement('price', '>', 100); * helper.getRefinements('price'); * // [ * // { * // "value": [ * // 100 * // ], * // "operator": ">", * // "type": "numeric" * // } * // ] * @example * helper.addFacetRefinement('color', 'blue'); * helper.addFacetExclusion('color', 'red'); * helper.getRefinements('color'); * // [ * // { * // "value": "blue", * // "type": "conjunctive" * // }, * // { * // "value": "red", * // "type": "exclude" * // } * // ] * @example * helper.addDisjunctiveFacetRefinement('material', 'plastic'); * // [ * // { * // "value": "plastic", * // "type": "disjunctive" * // } * // ] */ AlgoliaSearchHelper.prototype.getRefinements = function(facetName) { var refinements = []; if (this.state.isConjunctiveFacet(facetName)) { var conjRefinements = this.state.getConjunctiveRefinements(facetName); forEach_1(conjRefinements, function(r) { refinements.push({ value: r, type: 'conjunctive' }); }); var excludeRefinements = this.state.getExcludeRefinements(facetName); forEach_1(excludeRefinements, function(r) { refinements.push({ value: r, type: 'exclude' }); }); } else if (this.state.isDisjunctiveFacet(facetName)) { var disjRefinements = this.state.getDisjunctiveRefinements(facetName); forEach_1(disjRefinements, function(r) { refinements.push({ value: r, type: 'disjunctive' }); }); } var numericRefinements = this.state.getNumericRefinements(facetName); forEach_1(numericRefinements, function(value, operator) { refinements.push({ value: value, operator: operator, type: 'numeric' }); }); return refinements; }; /** * Return the current refinement for the (attribute, operator) * @param {string} attribute of the record * @param {string} operator applied * @return {number} value of the refinement */ AlgoliaSearchHelper.prototype.getNumericRefinement = function(attribute, operator) { return this.state.getNumericRefinement(attribute, operator); }; /** * Get the current breadcrumb for a hierarchical facet, as an array * @param {string} facetName Hierarchical facet name * @return {array.<string>} the path as an array of string */ AlgoliaSearchHelper.prototype.getHierarchicalFacetBreadcrumb = function(facetName) { return this.state.getHierarchicalFacetBreadcrumb(facetName); }; // /////////// PRIVATE /** * Perform the underlying queries * @private * @return {undefined} * @fires search * @fires result * @fires error */ AlgoliaSearchHelper.prototype._search = function() { var state = this.state; var mainQueries = requestBuilder_1._getQueries(state.index, state); var states = [{ state: state, queriesCount: mainQueries.length, helper: this }]; this.emit('search', state, this.lastResults); var derivedQueries = map_1(this.derivedHelpers, function(derivedHelper) { var derivedState = derivedHelper.getModifiedState(state); var queries = requestBuilder_1._getQueries(derivedState.index, derivedState); states.push({ state: derivedState, queriesCount: queries.length, helper: derivedHelper }); derivedHelper.emit('search', derivedState, derivedHelper.lastResults); return queries; }); var queries = mainQueries.concat(flatten_1(derivedQueries)); var queryId = this._queryId++; this._currentNbQueries++; this.client.search(queries, this._dispatchAlgoliaResponse.bind(this, states, queryId)); }; /** * Transform the responses as sent by the server and transform them into a user * usable object that merge the results of all the batch requests. It will dispatch * over the different helper + derived helpers (when there are some). * @private * @param {array.<{SearchParameters, AlgoliaQueries, AlgoliaSearchHelper}>} * state state used for to generate the request * @param {number} queryId id of the current request * @param {Error} err error if any, null otherwise * @param {object} content content of the response * @return {undefined} */ AlgoliaSearchHelper.prototype._dispatchAlgoliaResponse = function(states, queryId, err, content) { // FIXME remove the number of outdated queries discarded instead of just one if (queryId < this._lastQueryIdReceived) { // Outdated answer return; } this._currentNbQueries -= (queryId - this._lastQueryIdReceived); this._lastQueryIdReceived = queryId; if (err) { this.emit('error', err); if (this._currentNbQueries === 0) this.emit('searchQueueEmpty'); } else { if (this._currentNbQueries === 0) this.emit('searchQueueEmpty'); var results = content.results; forEach_1(states, function(s) { var state = s.state; var queriesCount = s.queriesCount; var helper = s.helper; var specificResults = results.splice(0, queriesCount); var formattedResponse = helper.lastResults = new SearchResults_1(state, specificResults); helper.emit('result', formattedResponse, state); }); } }; AlgoliaSearchHelper.prototype.containsRefinement = function(query, facetFilters, numericFilters, tagFilters) { return query || facetFilters.length !== 0 || numericFilters.length !== 0 || tagFilters.length !== 0; }; /** * Test if there are some disjunctive refinements on the facet * @private * @param {string} facet the attribute to test * @return {boolean} */ AlgoliaSearchHelper.prototype._hasDisjunctiveRefinements = function(facet) { return this.state.disjunctiveRefinements[facet] && this.state.disjunctiveRefinements[facet].length > 0; }; AlgoliaSearchHelper.prototype._change = function() { this.emit('change', this.state, this.lastResults); }; /** * Clears the cache of the underlying Algolia client. * @return {AlgoliaSearchHelper} */ AlgoliaSearchHelper.prototype.clearCache = function() { this.client.clearCache(); return this; }; /** * Updates the internal client instance. If the reference of the clients * are equal then no update is actually done. * @param {AlgoliaSearch} newClient an AlgoliaSearch client * @return {AlgoliaSearchHelper} */ AlgoliaSearchHelper.prototype.setClient = function(newClient) { if (this.client === newClient) return this; if (newClient.addAlgoliaAgent && !doesClientAgentContainsHelper(newClient)) newClient.addAlgoliaAgent('JS Helper ' + version$1); this.client = newClient; return this; }; /** * Gets the instance of the currently used client. * @return {AlgoliaSearch} */ AlgoliaSearchHelper.prototype.getClient = function() { return this.client; }; /** * Creates an derived instance of the Helper. A derived helper * is a way to request other indices synchronised with the lifecycle * of the main Helper. This mechanism uses the multiqueries feature * of Algolia to aggregate all the requests in a single network call. * * This method takes a function that is used to create a new SearchParameter * that will be used to create requests to Algolia. Those new requests * are created just before the `search` event. The signature of the function * is `SearchParameters -> SearchParameters`. * * This method returns a new DerivedHelper which is an EventEmitter * that fires the same `search`, `result` and `error` events. Those * events, however, will receive data specific to this DerivedHelper * and the SearchParameters that is returned by the call of the * parameter function. * @param {function} fn SearchParameters -> SearchParameters * @return {DerivedHelper} */ AlgoliaSearchHelper.prototype.derive = function(fn) { var derivedHelper = new DerivedHelper_1(this, fn); this.derivedHelpers.push(derivedHelper); return derivedHelper; }; /** * This method detaches a derived Helper from the main one. Prefer using the one from the * derived helper itself, to remove the event listeners too. * @private * @return {undefined} * @throws Error */ AlgoliaSearchHelper.prototype.detachDerivedHelper = function(derivedHelper) { var pos = this.derivedHelpers.indexOf(derivedHelper); if (pos === -1) throw new Error('Derived helper already detached'); this.derivedHelpers.splice(pos, 1); }; /** * This method returns true if there is currently at least one on-going search. * @return {boolean} true if there is a search pending */ AlgoliaSearchHelper.prototype.hasPendingRequests = function() { return this._currentNbQueries > 0; }; /** * @typedef AlgoliaSearchHelper.NumericRefinement * @type {object} * @property {number[]} value the numbers that are used for filtering this attribute with * the operator specified. * @property {string} operator the faceting data: value, number of entries * @property {string} type will be 'numeric' */ /** * @typedef AlgoliaSearchHelper.FacetRefinement * @type {object} * @property {string} value the string use to filter the attribute * @property {string} type the type of filter: 'conjunctive', 'disjunctive', 'exclude' */ /* * This function tests if the _ua parameter of the client * already contains the JS Helper UA */ function doesClientAgentContainsHelper(client) { // this relies on JS Client internal variable, this might break if implementation changes var currentAgent = client._ua; return !currentAgent ? false : currentAgent.indexOf('JS Helper') !== -1; } var algoliasearch_helper = AlgoliaSearchHelper; /** * The algoliasearchHelper module is the function that will let its * contains everything needed to use the Algoliasearch * Helper. It is a also a function that instanciate the helper. * To use the helper, you also need the Algolia JS client v3. * @example * //using the UMD build * var client = algoliasearch('latency', '6be0576ff61c053d5f9a3225e2a90f76'); * var helper = algoliasearchHelper(client, 'bestbuy', { * facets: ['shipping'], * disjunctiveFacets: ['category'] * }); * helper.on('result', function(result) { * console.log(result); * }); * helper.toggleRefine('Movies & TV Shows') * .toggleRefine('Free shipping') * .search(); * @example * // The helper is an event emitter using the node API * helper.on('result', updateTheResults); * helper.once('result', updateTheResults); * helper.removeListener('result', updateTheResults); * helper.removeAllListeners('result'); * @module algoliasearchHelper * @param {AlgoliaSearch} client an AlgoliaSearch client * @param {string} index the name of the index to query * @param {SearchParameters|object} opts an object defining the initial config of the search. It doesn't have to be a {SearchParameters}, just an object containing the properties you need from it. * @return {AlgoliaSearchHelper} */ function algoliasearchHelper(client, index, opts) { return new algoliasearch_helper(client, index, opts); } /** * The version currently used * @member module:algoliasearchHelper.version * @type {number} */ algoliasearchHelper.version = version$1; /** * Constructor for the Helper. * @member module:algoliasearchHelper.AlgoliaSearchHelper * @type {AlgoliaSearchHelper} */ algoliasearchHelper.AlgoliaSearchHelper = algoliasearch_helper; /** * Constructor for the object containing all the parameters of the search. * @member module:algoliasearchHelper.SearchParameters * @type {SearchParameters} */ algoliasearchHelper.SearchParameters = SearchParameters_1; /** * Constructor for the object containing the results of the search. * @member module:algoliasearchHelper.SearchResults * @type {SearchResults} */ algoliasearchHelper.SearchResults = SearchResults_1; /** * URL tools to generate query string and parse them from/into * SearchParameters * @member module:algoliasearchHelper.url * @type {object} {@link url} * */ algoliasearchHelper.url = url; var algoliasearchHelper_1 = algoliasearchHelper; var algoliasearchHelper_4 = algoliasearchHelper_1.SearchParameters; var getId$1 = function getId(props) { return props.attributes[0]; }; var namespace = 'hierarchicalMenu'; function getCurrentRefinement(props, searchState, context) { return getCurrentRefinementValue(props, searchState, context, namespace + '.' + getId$1(props), null, function (currentRefinement) { if (currentRefinement === '') { return null; } return currentRefinement; }); } function getValue$2(path, props, searchState, context) { var id = props.id, attributes = props.attributes, separator = props.separator, rootPath = props.rootPath, showParentLevel = props.showParentLevel; var currentRefinement = getCurrentRefinement(props, searchState, context); var nextRefinement = void 0; if (currentRefinement === null) { nextRefinement = path; } else { var tmpSearchParameters = new algoliasearchHelper_4({ hierarchicalFacets: [{ name: id, attributes: attributes, separator: separator, rootPath: rootPath, showParentLevel: showParentLevel }] }); nextRefinement = tmpSearchParameters.toggleHierarchicalFacetRefinement(id, currentRefinement).toggleHierarchicalFacetRefinement(id, path).getHierarchicalRefinement(id)[0]; } return nextRefinement; } function transformValue(value, props, searchState, context) { return value.map(function (v) { return { label: v.name, value: getValue$2(v.path, props, searchState, context), count: v.count, isRefined: v.isRefined, items: v.data && transformValue(v.data, props, searchState, context) }; }); } var truncate = function truncate() { var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; return items.slice(0, limit).map(function () { var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return Array.isArray(item.items) ? _extends({}, item, { items: truncate(item.items, limit) }) : item; }); }; function _refine(props, searchState, nextRefinement, context) { var id = getId$1(props); var nextValue = defineProperty$2({}, id, nextRefinement || ''); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return cleanUpValue(searchState, context, namespace + '.' + getId$1(props)); } var sortBy = ['name:asc']; /** * connectHierarchicalMenu connector provides the logic to build a widget that will * give the user the ability to explore a tree-like structure. * This is commonly used for multi-level categorization of products on e-commerce * websites. From a UX point of view, we suggest not displaying more than two levels deep. * @name connectHierarchicalMenu * @requirements To use this widget, your attributes must be formatted in a specific way. * If you want for example to have a hiearchical menu of categories, objects in your index * should be formatted this way: * * ```json * { * "categories.lvl0": "products", * "categories.lvl1": "products > fruits", * "categories.lvl2": "products > fruits > citrus" * } * ``` * * It's also possible to provide more than one path for each level: * * ```json * { * "categories.lvl0": ["products", "goods"], * "categories.lvl1": ["products > fruits", "goods > to eat"] * } * ``` * * All attributes passed to the `attributes` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * * @kind connector * @propType {string} attributes - List of attributes to use to generate the hierarchy of the menu. See the example for the convention to follow. * @propType {string} [defaultRefinement] - the item value selected by default * @propType {boolean} [showMore=false] - Flag to activate the show more button, for toggling the number of items between limitMin and limitMax. * @propType {number} [limitMin=10] - The maximum number of items displayed. * @propType {number} [limitMax=20] - The maximum number of items displayed when the user triggers the show more. Not considered if `showMore` is false. * @propType {string} [separator='>'] - Specifies the level separator used in the data. * @propType {string[]} [rootPath=null] - The already selected and hidden path. * @propType {boolean} [showParentLevel=true] - Flag to set if the parent level should be displayed. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{items: object, count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the HierarchicalMenu can display. items has the same shape as parent items. */ var connectHierarchicalMenu = createConnector({ displayName: 'AlgoliaHierarchicalMenu', propTypes: { attributes: function attributes(props, propName, componentName) { var isNotString = function isNotString(val) { return typeof val !== 'string'; }; if (!Array.isArray(props[propName]) || props[propName].some(isNotString) || props[propName].length < 1) { return new Error('Invalid prop ' + propName + ' supplied to ' + componentName + '. Expected an Array of Strings'); } return undefined; }, separator: propTypes.string, rootPath: propTypes.string, showParentLevel: propTypes.bool, defaultRefinement: propTypes.string, showMore: propTypes.bool, limitMin: propTypes.number, limitMax: propTypes.number, transformItems: propTypes.func }, defaultProps: { showMore: false, limitMin: 10, limitMax: 20, separator: ' > ', rootPath: null, showParentLevel: true }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var id = getId$1(props); var results = getResults(searchResults, this.context); var isFacetPresent = Boolean(results) && Boolean(results.getFacetByName(id)); if (!isFacetPresent) { return { items: [], currentRefinement: getCurrentRefinement(props, searchState, this.context), canRefine: false }; } var limit = showMore ? limitMax : limitMin; var value = results.getFacetValues(id, { sortBy: sortBy }); var items = value.data ? transformValue(value.data, props, searchState, this.context) : []; var transformedItems = props.transformItems ? props.transformItems(items) : items; return { items: truncate(transformedItems, limit), currentRefinement: getCurrentRefinement(props, searchState, this.context), canRefine: items.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributes = props.attributes, separator = props.separator, rootPath = props.rootPath, showParentLevel = props.showParentLevel, showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var id = getId$1(props); var limit = showMore ? limitMax : limitMin; searchParameters = searchParameters.addHierarchicalFacet({ name: id, attributes: attributes, separator: separator, rootPath: rootPath, showParentLevel: showParentLevel }).setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit) }); var currentRefinement = getCurrentRefinement(props, searchState, this.context); if (currentRefinement !== null) { searchParameters = searchParameters.toggleHierarchicalFacetRefinement(id, currentRefinement); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var rootAttribute = props.attributes[0]; var id = getId$1(props); var currentRefinement = getCurrentRefinement(props, searchState, this.context); return { id: id, index: getIndex(this.context), items: !currentRefinement ? [] : [{ label: rootAttribute + ': ' + currentRefinement, attributeName: rootAttribute, value: function value(nextState) { return _refine(props, nextState, '', _this.context); }, currentRefinement: currentRefinement }] }; } }); /** * Find an highlighted attribute given an `attributeName` and an `highlightProperty`, parses it, * and provided an array of objects with the string value and a boolean if this * value is highlighted. * * In order to use this feature, highlight must be activated in the configuration of * the index. The `preTag` and `postTag` attributes are respectively highlightPreTag and * highligtPostTag in Algolia configuration. * * @param {string} preTag - string used to identify the start of an highlighted value * @param {string} postTag - string used to identify the end of an highlighted value * @param {string} highlightProperty - the property that contains the highlight structure in the results * @param {string} attributeName - the highlighted attribute to look for * @param {object} hit - the actual hit returned by Algolia. * @return {object[]} - An array of {value: string, isHighlighted: boolean}. */ function parseAlgoliaHit(_ref) { var _ref$preTag = _ref.preTag, preTag = _ref$preTag === undefined ? '<em>' : _ref$preTag, _ref$postTag = _ref.postTag, postTag = _ref$postTag === undefined ? '</em>' : _ref$postTag, highlightProperty = _ref.highlightProperty, attributeName = _ref.attributeName, hit = _ref.hit; if (!hit) throw new Error('`hit`, the matching record, must be provided'); var highlightObject = get_1(hit[highlightProperty], attributeName, {}); if (Array.isArray(highlightObject)) { return highlightObject.map(function (item) { return parseHighlightedAttribute({ preTag: preTag, postTag: postTag, highlightedValue: item.value }); }); } return parseHighlightedAttribute({ preTag: preTag, postTag: postTag, highlightedValue: highlightObject.value }); } /** * Parses an highlighted attribute into an array of objects with the string value, and * a boolean that indicated if this part is highlighted. * * @param {string} preTag - string used to identify the start of an highlighted value * @param {string} postTag - string used to identify the end of an highlighted value * @param {string} highlightedValue - highlighted attribute as returned by Algolia highlight feature * @return {object[]} - An array of {value: string, isDefined: boolean}. */ function parseHighlightedAttribute(_ref2) { var preTag = _ref2.preTag, postTag = _ref2.postTag, _ref2$highlightedValu = _ref2.highlightedValue, highlightedValue = _ref2$highlightedValu === undefined ? '' : _ref2$highlightedValu; var splitByPreTag = highlightedValue.split(preTag); var firstValue = splitByPreTag.shift(); var elements = firstValue === '' ? [] : [{ value: firstValue, isHighlighted: false }]; if (postTag === preTag) { var isHighlighted = true; splitByPreTag.forEach(function (split) { elements.push({ value: split, isHighlighted: isHighlighted }); isHighlighted = !isHighlighted; }); } else { splitByPreTag.forEach(function (split) { var splitByPostTag = split.split(postTag); elements.push({ value: splitByPostTag[0], isHighlighted: true }); if (splitByPostTag[1] !== '') { elements.push({ value: splitByPostTag[1], isHighlighted: false }); } }); } return elements; } var highlightTags = { highlightPreTag: "<ais-highlight-0000000000>", highlightPostTag: "</ais-highlight-0000000000>" }; var highlight = function highlight(_ref) { var attributeName = _ref.attributeName, hit = _ref.hit, highlightProperty = _ref.highlightProperty; return parseAlgoliaHit({ attributeName: attributeName, hit: hit, preTag: highlightTags.highlightPreTag, postTag: highlightTags.highlightPostTag, highlightProperty: highlightProperty }); }; /** * connectHighlight connector provides the logic to create an highlighter * component that will retrieve, parse and render an highlighted attribute * from an Algolia hit. * @name connectHighlight * @kind connector * @category connector * @providedPropType {function} highlight - function to retrieve and parse an attribute from a hit. It takes a configuration object with 3 attributes: `highlightProperty` which is the property that contains the highlight structure from the records, `attributeName` which is the name of the attribute (it can be either a string or an array of strings) to look for and `hit` which is the hit from Algolia. It returns an array of objects `{value: string, isHighlighted: boolean}. If the element that corresponds to the attributeName is an array of strings, it will return a nested array of objects. * @example * import React from 'react'; * import { connectHighlight } from 'react-instantsearch/connectors'; * import { InstantSearch, Hits } from 'react-instantsearch/dom'; * * const CustomHighlight = connectHighlight( * ({ highlight, attributeName, hit, highlightProperty }) => { * const parsedHit = highlight({ attributeName, hit, highlightProperty: '_highlightResult' }); * const highlightedHits = parsedHit.map(part => { * if (part.isHighlighted) return <mark>{part.value}</mark>; * return part.value; * }); * return <div>{highlightedHits}</div>; * } * ); * * const Hit = ({hit}) => * <p> * <CustomHighlight attributeName="description" hit={hit} /> * </p>; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea"> * <Hits hitComponent={Hit} /> * </InstantSearch> * ); * } */ var connectHighlight = createConnector({ displayName: 'AlgoliaHighlighter', propTypes: {}, getProvidedProps: function getProvidedProps() { return { highlight: highlight }; } }); /** * connectHits connector provides the logic to create connected * components that will render the results retrieved from * Algolia. * * To configure the number of hits retrieved, use [HitsPerPage widget](widgets/HitsPerPage.html), * [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or pass the hitsPerPage * prop to a [Configure](guide/Search_parameters.html) widget. * * **Warning:** you will need to use the **objectID** property available on every hit as a key * when iterating over them. This will ensure you have the best possible UI experience * especially on slow networks. * @name connectHits * @kind connector * @providedPropType {array.<object>} hits - the records that matched the search state * @example * import React from 'react'; * * import { Highlight, InstantSearch } from 'react-instantsearch/dom'; * import { connectHits } from 'react-instantsearch/connectors'; * const CustomHits = connectHits(({ hits }) => * <div> * {hits.map(hit => * <p key={hit.objectID}> * <Highlight attributeName="description" hit={hit} /> * </p> * )} * </div> * ); * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <CustomHits /> * </InstantSearch> * ); * } */ var connectHits = createConnector({ displayName: 'AlgoliaHits', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = getResults(searchResults, this.context); var hits = results ? results.hits : []; return { hits: hits }; }, /* Hits needs to be considered as a widget to trigger a search if no others widgets are used. * To be considered as a widget you need either getSearchParameters, getMetadata or getTransitionState * See createConnector.js * */ getSearchParameters: function getSearchParameters(searchParameters) { return searchParameters; } }); var getId$2 = function getId() { return 'query'; }; function getCurrentRefinement$1(props, searchState, context) { var id = getId$2(); return getCurrentRefinementValue(props, searchState, context, id, '', function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return ''; }); } function getHits(searchResults) { if (searchResults.results) { if (searchResults.results.hits && Array.isArray(searchResults.results.hits)) { return searchResults.results.hits; } else { return Object.keys(searchResults.results).reduce(function (hits, index) { return [].concat(toConsumableArray(hits), [{ index: index, hits: searchResults.results[index].hits }]); }, []); } } else { return []; } } function _refine$1(props, searchState, nextRefinement, context) { var id = getId$2(); var nextValue = defineProperty$2({}, id, nextRefinement); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage); } function _cleanUp$1(props, searchState, context) { return cleanUpValue(searchState, context, getId$2()); } /** * connectAutoComplete connector provides the logic to create connected * components that will render the results retrieved from * Algolia. * * To configure the number of hits retrieved, use [HitsPerPage widget](widgets/HitsPerPage.html), * [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or pass the hitsPerPage * prop to a [Configure](guide/Search_parameters.html) widget. * @name connectAutoComplete * @kind connector * @providedPropType {array.<object>} hits - the records that matched the search state. * @providedPropType {function} refine - a function to change the query. * @providedPropType {string} currentRefinement - the query to search for. */ var connectAutoComplete = createConnector({ displayName: 'AlgoliaAutoComplete', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { return { hits: getHits(searchResults), currentRefinement: getCurrentRefinement$1(props, searchState, this.context) }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$1(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$1(props, searchState, this.context); }, /* connectAutoComplete needs to be considered as a widget to trigger a search if no others widgets are used. * To be considered as a widget you need either getSearchParameters, getMetadata or getTransitionState * See createConnector.js * */ getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQuery(getCurrentRefinement$1(props, searchState, this.context)); } }); function getId$3() { return 'hitsPerPage'; } function getCurrentRefinement$2(props, searchState, context) { var id = getId$3(); return getCurrentRefinementValue(props, searchState, context, id, null, function (currentRefinement) { if (typeof currentRefinement === 'string') { return parseInt(currentRefinement, 10); } return currentRefinement; }); } /** * connectHitsPerPage connector provides the logic to create connected * components that will allow a user to choose to display more or less results from Algolia. * @name connectHitsPerPage * @kind connector * @propType {number} defaultRefinement - The number of items selected by default * @propType {{value: number, label: string}[]} items - List of hits per page options. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{isRefined: boolean, label?: string, value: number}>} items - the list of items the HitsPerPage can display. If no label provided, the value will be displayed. */ var connectHitsPerPage = createConnector({ displayName: 'AlgoliaHitsPerPage', propTypes: { defaultRefinement: propTypes.number.isRequired, items: propTypes.arrayOf(propTypes.shape({ label: propTypes.string, value: propTypes.number.isRequired })).isRequired, transformItems: propTypes.func }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement$2(props, searchState, this.context); var items = props.items.map(function (item) { return item.value === currentRefinement ? _extends({}, item, { isRefined: true }) : _extends({}, item, { isRefined: false }); }); return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { var id = getId$3(); var nextValue = defineProperty$2({}, id, nextRefinement); var resetPage = true; return refineValue(searchState, nextValue, this.context, resetPage); }, cleanUp: function cleanUp(props, searchState) { return cleanUpValue(searchState, this.context, getId$3()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setHitsPerPage(getCurrentRefinement$2(props, searchState, this.context)); }, getMetadata: function getMetadata() { return { id: getId$3() }; } }); function getId$4() { return 'page'; } function getCurrentRefinement$3(props, searchState, context) { var id = getId$4(); var page = 1; return getCurrentRefinementValue(props, searchState, context, id, page, function (currentRefinement) { if (typeof currentRefinement === 'string') { currentRefinement = parseInt(currentRefinement, 10); } return currentRefinement; }); } /** * InfiniteHits connector provides the logic to create connected * components that will render an continuous list of results retrieved from * Algolia. This connector provides a function to load more results. * @name connectInfiniteHits * @kind connector * @providedPropType {array.<object>} hits - the records that matched the search state * @providedPropType {boolean} hasMore - indicates if there are more pages to load * @providedPropType {function} refine - call to load more results */ var connectInfiniteHits = createConnector({ displayName: 'AlgoliaInfiniteHits', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = getResults(searchResults, this.context); if (!results) { this._allResults = []; return { hits: this._allResults, hasMore: false }; } var hits = results.hits, page = results.page, nbPages = results.nbPages; // If it is the same page we do not touch the page result list if (page === 0) { this._allResults = hits; } else if (page > this.previousPage) { this._allResults = [].concat(toConsumableArray(this._allResults), toConsumableArray(hits)); } else if (page < this.previousPage) { this._allResults = hits; } var lastPageIndex = nbPages - 1; var hasMore = page < lastPageIndex; this.previousPage = page; return { hits: this._allResults, hasMore: hasMore }; }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQueryParameters({ page: getCurrentRefinement$3(props, searchState, this.context) - 1 }); }, refine: function refine(props, searchState) { var id = getId$4(); var nextPage = getCurrentRefinement$3(props, searchState, this.context) + 1; var nextValue = defineProperty$2({}, id, nextPage); var resetPage = false; return refineValue(searchState, nextValue, this.context, resetPage); } }); var namespace$1 = 'menu'; function getId$5(props) { return props.attributeName; } function getCurrentRefinement$4(props, searchState, context) { return getCurrentRefinementValue(props, searchState, context, namespace$1 + '.' + getId$5(props), null, function (currentRefinement) { if (currentRefinement === '') { return null; } return currentRefinement; }); } function getValue$3(name, props, searchState, context) { var currentRefinement = getCurrentRefinement$4(props, searchState, context); return name === currentRefinement ? '' : name; } function _refine$2(props, searchState, nextRefinement, context) { var id = getId$5(props); var nextValue = defineProperty$2({}, id, nextRefinement ? nextRefinement : ''); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace$1); } function _cleanUp$2(props, searchState, context) { return cleanUpValue(searchState, context, namespace$1 + '.' + getId$5(props)); } var sortBy$1 = ['count:desc', 'name:asc']; /** * connectMenu connector provides the logic to build a widget that will * give the user the ability to choose a single value for a specific facet. * @name connectMenu * @requirements The attribute passed to the `attributeName` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * @kind connector * @propType {string} attributeName - the name of the attribute in the record * @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items * @propType {number} [limitMin=10] - the minimum number of diplayed items * @propType {number} [limitMax=20] - the maximun number of displayed items. Only used when showMore is set to `true` * @propType {string} [defaultRefinement] - the value of the item selected by default * @propType {boolean} [withSearchBox=false] - allow search inside values * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the Menu can display. * @providedPropType {function} searchForItems - a function to toggle a search inside items values * @providedPropType {boolean} isFromSearch - a boolean that says if the `items` props contains facet values from the global search or from the search inside items. */ var connectMenu = createConnector({ displayName: 'AlgoliaMenu', propTypes: { attributeName: propTypes.string.isRequired, showMore: propTypes.bool, limitMin: propTypes.number, limitMax: propTypes.number, defaultRefinement: propTypes.string, transformItems: propTypes.func, withSearchBox: propTypes.bool, searchForFacetValues: propTypes.bool // @deprecated }, defaultProps: { showMore: false, limitMin: 10, limitMax: 20 }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, meta, searchForFacetValuesResults) { var _this = this; var attributeName = props.attributeName, showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; var results = getResults(searchResults, this.context); var canRefine = Boolean(results) && Boolean(results.getFacetByName(attributeName)); var isFromSearch = Boolean(searchForFacetValuesResults && searchForFacetValuesResults[attributeName] && searchForFacetValuesResults.query !== ''); var withSearchBox = props.withSearchBox || props.searchForFacetValues; if (props.withSearchBox && this.context.multiIndexContext) { throw new Error('react-instantsearch: searching in *List is not available when used inside a' + ' multi index context'); } if (!canRefine) { return { items: [], currentRefinement: getCurrentRefinement$4(props, searchState, this.context), isFromSearch: isFromSearch, withSearchBox: withSearchBox, canRefine: canRefine }; } var items = isFromSearch ? searchForFacetValuesResults[attributeName].map(function (v) { return { label: v.value, value: getValue$3(v.value, props, searchState, _this.context), _highlightResult: { label: { value: v.highlighted } }, count: v.count, isRefined: v.isRefined }; }) : results.getFacetValues(attributeName, { sortBy: sortBy$1 }).map(function (v) { return { label: v.name, value: getValue$3(v.name, props, searchState, _this.context), count: v.count, isRefined: v.isRefined }; }); var sortedItems = withSearchBox && !isFromSearch ? orderBy_1(items, ['isRefined', 'count', 'label'], ['desc', 'desc', 'asc']) : items; var transformedItems = props.transformItems ? props.transformItems(sortedItems) : sortedItems; return { items: transformedItems.slice(0, limit), currentRefinement: getCurrentRefinement$4(props, searchState, this.context), isFromSearch: isFromSearch, withSearchBox: withSearchBox, canRefine: items.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$2(props, searchState, nextRefinement, this.context); }, searchForFacetValues: function searchForFacetValues(props, searchState, nextRefinement) { return { facetName: props.attributeName, query: nextRefinement }; }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$2(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName, showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; searchParameters = searchParameters.setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit) }); searchParameters = searchParameters.addDisjunctiveFacet(attributeName); var currentRefinement = getCurrentRefinement$4(props, searchState, this.context); if (currentRefinement !== null) { searchParameters = searchParameters.addDisjunctiveFacetRefinement(attributeName, currentRefinement); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this2 = this; var id = getId$5(props); var currentRefinement = getCurrentRefinement$4(props, searchState, this.context); return { id: id, index: getIndex(this.context), items: currentRefinement === null ? [] : [{ label: props.attributeName + ': ' + currentRefinement, attributeName: props.attributeName, value: function value(nextState) { return _refine$2(props, nextState, '', _this2.context); }, currentRefinement: currentRefinement }] }; } }); function stringifyItem(item) { if (typeof item.start === 'undefined' && typeof item.end === 'undefined') { return ''; } return (item.start ? item.start : '') + ':' + (item.end ? item.end : ''); } function parseItem(value) { if (value.length === 0) { return { start: null, end: null }; } var _value$split = value.split(':'), _value$split2 = slicedToArray(_value$split, 2), startStr = _value$split2[0], endStr = _value$split2[1]; return { start: startStr.length > 0 ? parseInt(startStr, 10) : null, end: endStr.length > 0 ? parseInt(endStr, 10) : null }; } var namespace$2 = 'multiRange'; function getId$6(props) { return props.attributeName; } function getCurrentRefinement$5(props, searchState, context) { return getCurrentRefinementValue(props, searchState, context, namespace$2 + '.' + getId$6(props), '', function (currentRefinement) { if (currentRefinement === '') { return ''; } return currentRefinement; }); } function isRefinementsRangeIncludesInsideItemRange(stats, start, end) { return stats.min > start && stats.min < end || stats.max > start && stats.max < end; } function isItemRangeIncludedInsideRefinementsRange(stats, start, end) { return start > stats.min && start < stats.max || end > stats.min && end < stats.max; } function itemHasRefinement(attributeName, results, value) { var stats = results.getFacetByName(attributeName) ? results.getFacetStats(attributeName) : null; var range = value.split(':'); var start = Number(range[0]) === 0 || value === '' ? Number.NEGATIVE_INFINITY : Number(range[0]); var end = Number(range[1]) === 0 || value === '' ? Number.POSITIVE_INFINITY : Number(range[1]); return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end))); } function _refine$3(props, searchState, nextRefinement, context) { var nextValue = defineProperty$2({}, getId$6(props, searchState), nextRefinement); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace$2); } function _cleanUp$3(props, searchState, context) { return cleanUpValue(searchState, context, namespace$2 + '.' + getId$6(props)); } /** * connectMultiRange connector provides the logic to build a widget that will * give the user the ability to select a range value for a numeric attribute. * Ranges are defined statically. * @name connectMultiRange * @requirements The attribute passed to the `attributeName` prop must be holding numerical values. * @kind connector * @propType {string} attributeName - the name of the attribute in the records * @propType {{label: string, start: number, end: number}[]} items - List of options. With a text label, and upper and lower bounds. * @propType {string} [defaultRefinement] - the value of the item selected by default, follow the shape of a `string` with a pattern of `'{start}:{end}'`. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to select a range. * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied. follow the shape of a `string` with a pattern of `'{start}:{end}'` which corresponds to the current selected item. For instance, when the selected item is `{start: 10, end: 20}`, the searchState of the widget is `'10:20'`. When `start` isn't defined, the searchState of the widget is `':{end}'`, and the same way around when `end` isn't defined. However, when neither `start` nor `end` are defined, the searchState is an empty string. * @providedPropType {array.<{isRefined: boolean, label: string, value: string, isRefined: boolean, noRefinement: boolean}>} items - the list of ranges the MultiRange can display. */ var connectMultiRange = createConnector({ displayName: 'AlgoliaMultiRange', propTypes: { id: propTypes.string, attributeName: propTypes.string.isRequired, items: propTypes.arrayOf(propTypes.shape({ label: propTypes.node, start: propTypes.number, end: propTypes.number })).isRequired, transformItems: propTypes.func }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var attributeName = props.attributeName; var currentRefinement = getCurrentRefinement$5(props, searchState, this.context); var results = getResults(searchResults, this.context); var items = props.items.map(function (item) { var value = stringifyItem(item); return { label: item.label, value: value, isRefined: value === currentRefinement, noRefinement: results ? itemHasRefinement(getId$6(props), results, value) : false }; }); var stats = results && results.getFacetByName(attributeName) ? results.getFacetStats(attributeName) : null; var refinedItem = find_1(items, function (item) { return item.isRefined === true; }); if (!items.some(function (item) { return item.value === ''; })) { items.push({ value: '', isRefined: isEmpty_1(refinedItem), noRefinement: !stats, label: 'All' }); } return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement, canRefine: items.length > 0 && items.some(function (item) { return item.noRefinement === false; }) }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$3(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$3(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName; var _parseItem = parseItem(getCurrentRefinement$5(props, searchState, this.context)), start = _parseItem.start, end = _parseItem.end; searchParameters = searchParameters.addDisjunctiveFacet(attributeName); if (start) { searchParameters = searchParameters.addNumericRefinement(attributeName, '>=', start); } if (end) { searchParameters = searchParameters.addNumericRefinement(attributeName, '<=', end); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId$6(props); var value = getCurrentRefinement$5(props, searchState, this.context); var items = []; var index = getIndex(this.context); if (value !== '') { var _find2 = find_1(props.items, function (item) { return stringifyItem(item) === value; }), label = _find2.label; items.push({ label: props.attributeName + ': ' + label, attributeName: props.attributeName, currentRefinement: label, value: function value(nextState) { return _refine$3(props, nextState, '', _this.context); } }); } return { id: id, index: index, items: items }; } }); function getId$7() { return 'page'; } function getCurrentRefinement$6(props, searchState, context) { var id = getId$7(); var page = 1; return getCurrentRefinementValue(props, searchState, context, id, page, function (currentRefinement) { if (typeof currentRefinement === 'string') { return parseInt(currentRefinement, 10); } return currentRefinement; }); } function _refine$4(props, searchState, nextPage, context) { var id = getId$7(); var nextValue = defineProperty$2({}, id, nextPage); var resetPage = false; return refineValue(searchState, nextValue, context, resetPage); } /** * connectPagination connector provides the logic to build a widget that will * let the user displays hits corresponding to a certain page. * @name connectPagination * @kind connector * @propType {boolean} [showFirst=true] - Display the first page link. * @propType {boolean} [showLast=false] - Display the last page link. * @propType {boolean} [showPrevious=true] - Display the previous page link. * @propType {boolean} [showNext=true] - Display the next page link. * @propType {number} [pagesPadding=3] - How many page links to display around the current page. * @propType {number} [maxPages=Infinity] - Maximum number of pages to display. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {number} nbPages - the total of existing pages * @providedPropType {number} currentRefinement - the page refinement currently applied */ var connectPagination = createConnector({ displayName: 'AlgoliaPagination', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = getResults(searchResults, this.context); if (!results) { return null; } var nbPages = results.nbPages; return { nbPages: nbPages, currentRefinement: getCurrentRefinement$6(props, searchState, this.context), canRefine: nbPages > 1 }; }, refine: function refine(props, searchState, nextPage) { return _refine$4(props, searchState, nextPage, this.context); }, cleanUp: function cleanUp(props, searchState) { return cleanUpValue(searchState, this.context, getId$7()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setPage(getCurrentRefinement$6(props, searchState, this.context) - 1); }, getMetadata: function getMetadata() { return { id: getId$7() }; } }); /** * connectPoweredBy connector provides the logic to build a widget that * will display a link to algolia. * @name connectPoweredBy * @kind connector * @providedPropType {string} url - the url to redirect to algolia */ var connectPoweredBy = createConnector({ displayName: 'AlgoliaPoweredBy', propTypes: {}, getProvidedProps: function getProvidedProps(props) { var url = 'https://www.algolia.com/?' + 'utm_source=react-instantsearch&' + 'utm_medium=website&' + ('utm_content=' + (props.canRender ? location.hostname : '') + '&') + 'utm_campaign=poweredby'; return { url: url }; } }); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsFinite = _root.isFinite; /** * Checks if `value` is a finite primitive number. * * **Note:** This method is based on * [`Number.isFinite`](https://mdn.io/Number/isFinite). * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. * @example * * _.isFinite(3); * // => true * * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false * * _.isFinite('3'); * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); } var _isFinite = isFinite; /** * connectRange connector provides the logic to create connected * components that will give the ability for a user to refine results using * a numeric range. * @name connectRange * @kind connector * @requirements The attribute passed to the `attributeName` prop must be holding numerical values. * @propType {string} attributeName - Name of the attribute for faceting * @propType {{min: number, max: number}} [defaultRefinement] - Default searchState of the widget containing the start and the end of the range. * @propType {number} [min] - Minimum value. When this isn't set, the minimum value will be automatically computed by Algolia using the data in the index. * @propType {number} [max] - Maximum value. When this isn't set, the maximum value will be automatically computed by Algolia using the data in the index. * @propType {number} [precision=2] - Number of digits after decimal point to use. * @providedPropType {function} refine - a function to select a range. * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied */ function getId$8(props) { return props.attributeName; } var namespace$3 = 'range'; function getCurrentRange(boundaries, stats, precision) { var pow = Math.pow(10, precision); var min = void 0; if (_isFinite(boundaries.min)) { min = boundaries.min; } else if (_isFinite(stats.min)) { min = stats.min; } else { min = undefined; } var max = void 0; if (_isFinite(boundaries.max)) { max = boundaries.max; } else if (_isFinite(stats.max)) { max = stats.max; } else { max = undefined; } return { min: min !== undefined ? Math.floor(min * pow) / pow : min, max: max !== undefined ? Math.ceil(max * pow) / pow : max }; } function getCurrentRefinement$7(props, searchState, currentRange, context) { var refinement = getCurrentRefinementValue(props, searchState, context, namespace$3 + '.' + getId$8(props), {}, function (currentRefinement) { var min = currentRefinement.min, max = currentRefinement.max; if (typeof min === 'string') { min = parseInt(min, 10); } if (typeof max === 'string') { max = parseInt(max, 10); } return { min: min, max: max }; }); var hasMinBound = props.min !== undefined; var hasMaxBound = props.max !== undefined; var hasMinRefinment = refinement.min !== undefined; var hasMaxRefinment = refinement.max !== undefined; if (hasMinBound && hasMinRefinment && refinement.min < currentRange.min) { throw Error("You can't provide min value lower than range."); } if (hasMaxBound && hasMaxRefinment && refinement.max > currentRange.max) { throw Error("You can't provide max value greater than range."); } if (hasMinBound && !hasMinRefinment) { refinement.min = currentRange.min; } if (hasMaxBound && !hasMaxRefinment) { refinement.max = currentRange.max; } return refinement; } function nextValueForRefinement(hasBound, isReset, range, value) { var next = void 0; if (!hasBound && range === value) { next = undefined; } else if (hasBound && isReset) { next = range; } else { next = value; } return next; } function _refine$5(props, searchState, nextRefinement, currentRange, context) { var nextMin = nextRefinement.min, nextMax = nextRefinement.max; var currentMinRange = currentRange.min, currentMaxRange = currentRange.max; var isMinReset = nextMin === undefined || nextMin === ''; var isMaxReset = nextMax === undefined || nextMax === ''; var nextMinAsNumber = !isMinReset ? parseFloat(nextMin) : undefined; var nextMaxAsNumber = !isMaxReset ? parseFloat(nextMax) : undefined; var isNextMinValid = isMinReset || _isFinite(nextMinAsNumber); var isNextMaxValid = isMaxReset || _isFinite(nextMaxAsNumber); if (!isNextMinValid || !isNextMaxValid) { throw Error("You can't provide non finite values to the range connector."); } if (nextMinAsNumber < currentMinRange) { throw Error("You can't provide min value lower than range."); } if (nextMaxAsNumber > currentMaxRange) { throw Error("You can't provide max value greater than range."); } var id = getId$8(props); var resetPage = true; var nextValue = defineProperty$2({}, id, { min: nextValueForRefinement(props.min !== undefined, isMinReset, currentMinRange, nextMinAsNumber), max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber) }); return refineValue(searchState, nextValue, context, resetPage, namespace$3); } function _cleanUp$4(props, searchState, context) { return cleanUpValue(searchState, context, namespace$3 + '.' + getId$8(props)); } var connectRange = createConnector({ displayName: 'AlgoliaRange', propTypes: { id: propTypes.string, attributeName: propTypes.string.isRequired, defaultRefinement: propTypes.shape({ min: propTypes.number.isRequired, max: propTypes.number.isRequired }), min: propTypes.number, max: propTypes.number, precision: propTypes.number }, defaultProps: { precision: 2 }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var attributeName = props.attributeName, precision = props.precision, minBound = props.min, maxBound = props.max; var results = getResults(searchResults, this.context); var stats = results ? results.getFacetStats(attributeName) || {} : {}; var count = results ? results.getFacetValues(attributeName).map(function (v) { return { value: v.name, count: v.count }; }) : []; var _getCurrentRange = getCurrentRange({ min: minBound, max: maxBound }, stats, precision), rangeMin = _getCurrentRange.min, rangeMax = _getCurrentRange.max; // The searchState is not always in sync with the helper state. For example // when we set boundaries on the first render the searchState don't have // the correct refinement. If this behaviour change in the upcoming version // we could store the range inside the searchState instead of rely on `this`. this._currentRange = { min: rangeMin, max: rangeMax }; var _getCurrentRefinement = getCurrentRefinement$7(props, searchState, this._currentRange, this.context), valueMin = _getCurrentRefinement.min, valueMax = _getCurrentRefinement.max; return { min: rangeMin, max: rangeMax, canRefine: count.length > 0, currentRefinement: { min: valueMin === undefined ? rangeMin : valueMin, max: valueMax === undefined ? rangeMax : valueMax }, count: count, precision: precision }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$5(props, searchState, nextRefinement, this._currentRange, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$4(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(params, props, searchState) { var attributeName = props.attributeName; var _getCurrentRefinement2 = getCurrentRefinement$7(props, searchState, this._currentRange, this.context), min = _getCurrentRefinement2.min, max = _getCurrentRefinement2.max; params = params.addDisjunctiveFacet(attributeName); if (min !== undefined) { params = params.addNumericRefinement(attributeName, '>=', min); } if (max !== undefined) { params = params.addNumericRefinement(attributeName, '<=', max); } return params; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var _currentRange = this._currentRange, minRange = _currentRange.min, maxRange = _currentRange.max; var _getCurrentRefinement3 = getCurrentRefinement$7(props, searchState, this._currentRange, this.context), minValue = _getCurrentRefinement3.min, maxValue = _getCurrentRefinement3.max; var items = []; var hasMin = minValue !== undefined; var hasMax = maxValue !== undefined; var shouldDisplayMinLabel = hasMin && minValue !== minRange; var shouldDisplayMaxLabel = hasMax && maxValue !== maxRange; if (shouldDisplayMinLabel || shouldDisplayMaxLabel) { var fragments = [hasMin ? minValue + ' <= ' : '', props.attributeName, hasMax ? ' <= ' + maxValue : '']; items.push({ label: fragments.join(''), attributeName: props.attributeName, value: function value(nextState) { return _refine$5(props, nextState, {}, _this._currentRange, _this.context); }, currentRefinement: { min: minValue, max: maxValue } }); } return { id: getId$8(props), index: getIndex(this.context), items: items }; } }); var namespace$4 = 'refinementList'; function getId$9(props) { return props.attributeName; } function getCurrentRefinement$8(props, searchState, context) { return getCurrentRefinementValue(props, searchState, context, namespace$4 + '.' + getId$9(props), [], function (currentRefinement) { if (typeof currentRefinement === 'string') { // All items were unselected if (currentRefinement === '') { return []; } // Only one item was in the searchState but we know it should be an array return [currentRefinement]; } return currentRefinement; }); } function getValue$4(name, props, searchState, context) { var currentRefinement = getCurrentRefinement$8(props, searchState, context); var isAnewValue = currentRefinement.indexOf(name) === -1; var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates : currentRefinement.filter(function (selectedValue) { return selectedValue !== name; }); // cannot use .splice(), it mutates return nextRefinement; } function _refine$6(props, searchState, nextRefinement, context) { var id = getId$9(props); // Setting the value to an empty string ensures that it is persisted in // the URL as an empty value. // This is necessary in the case where `defaultRefinement` contains one // item and we try to deselect it. `nextSelected` would be an empty array, // which would not be persisted to the URL. // {foo: ['bar']} => "foo[0]=bar" // {foo: []} => "" var nextValue = defineProperty$2({}, id, nextRefinement.length > 0 ? nextRefinement : ''); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace$4); } function _cleanUp$5(props, searchState, context) { return cleanUpValue(searchState, context, namespace$4 + '.' + getId$9(props)); } /** * connectRefinementList connector provides the logic to build a widget that will * give the user the ability to choose multiple values for a specific facet. * @name connectRefinementList * @kind connector * @requirements The attribute passed to the `attributeName` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * @propType {string} attributeName - the name of the attribute in the record * @propType {boolean} [withSearchBox=false] - allow search inside values * @propType {string} [operator=or] - How to apply the refinements. Possible values: 'or' or 'and'. * @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items * @propType {number} [limitMin=10] - the minimum number of displayed items * @propType {number} [limitMax=20] - the maximun number of displayed items. Only used when showMore is set to `true` * @propType {string[]} defaultRefinement - the values of the items selected by default. The searchState of this widget takes the form of a list of `string`s, which correspond to the values of all selected refinements. However, when there are no refinements selected, the value of the searchState is an empty string. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string[]} currentRefinement - the refinement currently applied * @providedPropType {array.<{count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the RefinementList can display. * @providedPropType {function} searchForItems - a function to toggle a search inside items values * @providedPropType {boolean} isFromSearch - a boolean that says if the `items` props contains facet values from the global search or from the search inside items. */ var sortBy$2 = ['isRefined', 'count:desc', 'name:asc']; var connectRefinementList = createConnector({ displayName: 'AlgoliaRefinementList', propTypes: { id: propTypes.string, attributeName: propTypes.string.isRequired, operator: propTypes.oneOf(['and', 'or']), showMore: propTypes.bool, limitMin: propTypes.number, limitMax: propTypes.number, defaultRefinement: propTypes.arrayOf(propTypes.oneOfType([propTypes.string, propTypes.number])), withSearchBox: propTypes.bool, searchForFacetValues: propTypes.bool, // @deprecated transformItems: propTypes.func }, defaultProps: { operator: 'or', showMore: false, limitMin: 10, limitMax: 20 }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata, searchForFacetValuesResults) { var _this = this; var attributeName = props.attributeName, showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; var results = getResults(searchResults, this.context); var canRefine = Boolean(results) && Boolean(results.getFacetByName(attributeName)); var isFromSearch = Boolean(searchForFacetValuesResults && searchForFacetValuesResults[attributeName] && searchForFacetValuesResults.query !== ''); var withSearchBox = props.withSearchBox || props.searchForFacetValues; if (props.withSearchBox && this.context.multiIndexContext) { throw new Error('react-instantsearch: searching in *List is not available when used inside a' + ' multi index context'); } if (!canRefine) { return { items: [], currentRefinement: getCurrentRefinement$8(props, searchState, this.context), canRefine: canRefine, isFromSearch: isFromSearch, withSearchBox: withSearchBox }; } var items = isFromSearch ? searchForFacetValuesResults[attributeName].map(function (v) { return { label: v.value, value: getValue$4(v.value, props, searchState, _this.context), _highlightResult: { label: { value: v.highlighted } }, count: v.count, isRefined: v.isRefined }; }) : results.getFacetValues(attributeName, { sortBy: sortBy$2 }).map(function (v) { return { label: v.name, value: getValue$4(v.name, props, searchState, _this.context), count: v.count, isRefined: v.isRefined }; }); var transformedItems = props.transformItems ? props.transformItems(items) : items; return { items: transformedItems.slice(0, limit), currentRefinement: getCurrentRefinement$8(props, searchState, this.context), isFromSearch: isFromSearch, withSearchBox: withSearchBox, canRefine: items.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$6(props, searchState, nextRefinement, this.context); }, searchForFacetValues: function searchForFacetValues(props, searchState, nextRefinement) { return { facetName: props.attributeName, query: nextRefinement }; }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$5(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName, operator = props.operator, showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet'; var addRefinementKey = addKey + 'Refinement'; searchParameters = searchParameters.setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit) }); searchParameters = searchParameters[addKey](attributeName); return getCurrentRefinement$8(props, searchState, this.context).reduce(function (res, val) { return res[addRefinementKey](attributeName, val); }, searchParameters); }, getMetadata: function getMetadata(props, searchState) { var id = getId$9(props); var context = this.context; return { id: id, index: getIndex(this.context), items: getCurrentRefinement$8(props, searchState, context).length > 0 ? [{ attributeName: props.attributeName, label: props.attributeName + ': ', currentRefinement: getCurrentRefinement$8(props, searchState, context), value: function value(nextState) { return _refine$6(props, nextState, [], context); }, items: getCurrentRefinement$8(props, searchState, context).map(function (item) { return { label: '' + item, value: function value(nextState) { var nextSelectedItems = getCurrentRefinement$8(props, nextState, context).filter(function (other) { return other !== item; }); return _refine$6(props, searchState, nextSelectedItems, context); } }; }) }] : [] }; } }); /** * connectScrollTo connector provides the logic to build a widget that will * let the page scroll to a certain point. * @name connectScrollTo * @kind connector * @propType {string} [scrollOn="page"] - Widget searchState key on which to listen for changes, default to the pagination widget. * @providedPropType {any} value - the current refinement applied to the widget listened by scrollTo * @providedPropType {boolean} hasNotChanged - indicates whether the refinement came from the scrollOn argument (for instance page by default) */ var connectScrollTo = createConnector({ displayName: 'AlgoliaScrollTo', propTypes: { scrollOn: propTypes.string }, defaultProps: { scrollOn: 'page' }, getProvidedProps: function getProvidedProps(props, searchState) { var id = props.scrollOn; var value = getCurrentRefinementValue(props, searchState, this.context, id, null, function (currentRefinement) { return currentRefinement; }); if (!this._prevSearchState) { this._prevSearchState = {}; } /* Get the subpart of the state that interest us*/ if (hasMultipleIndex(this.context)) { var index = getIndex(this.context); searchState = searchState.indices ? searchState.indices[index] : {}; } /* if there is a change in the app that has been triggered by another element than "props.scrollOn (id) or the Configure widget, we need to keep track of the search state to know if there's a change in the app that was not triggered by the props.scrollOn (id) or the Configure widget. This is useful when using ScrollTo in combination of Pagination. As pagination can be change by every widget, we want to scroll only if it cames from the pagination widget itself. We also remove the configure key from the search state to do this comparaison because for now configure values are not present in the search state before a first refinement has been made and will false the results. See: https://github.com/algolia/react-instantsearch/issues/164 */ var cleanedSearchState = omit_1(omit_1(searchState, 'configure'), id); var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState); this._prevSearchState = cleanedSearchState; return { value: value, hasNotChanged: hasNotChanged }; } }); var getId$10 = function getId(props) { return props.attributes[0]; }; var namespace$5 = 'hierarchicalMenu'; function _refine$7(props, searchState, nextRefinement, context) { var id = getId$10(props); var nextValue = defineProperty$2({}, id, nextRefinement || ''); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace$5); } function transformValue$1(values) { return values.reduce(function (acc, item) { if (item.isRefined) { acc.push({ label: item.name, // If dealing with a nested "items", "value" is equal to the previous value concatenated with the current label // If dealing with the first level, "value" is equal to the current label value: item.path }); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one if (item.data) { acc = acc.concat(transformValue$1(item.data, acc)); } } return acc; }, []); } /** * The breadcrumb component is s a type of secondary navigation scheme that * reveals the user’s location in a website or web application. * * @name connectBreadcrumb * @requirements To use this widget, your attributes must be formatted in a specific way. * If you want for example to have a Breadcrumb of categories, objects in your index * should be formatted this way: * * ```json * { * "categories.lvl0": "products", * "categories.lvl1": "products > fruits", * "categories.lvl2": "products > fruits > citrus" * } * ``` * * It's also possible to provide more than one path for each level: * * ```json * { * "categories.lvl0": ["products", "goods"], * "categories.lvl1": ["products > fruits", "goods > to eat"] * } * ``` * * All attributes passed to the `attributes` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * * @kind connector * @propType {string} attributes - List of attributes to use to generate the hierarchy of the menu. See the example for the convention to follow. * @propType {string} {React.Element} [separator=' > '] - Specifies the level separator used in the data. * @propType {string} [rootURL=null] - The root element's URL (the originating page). * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {array.<{items: object, count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the Breadcrumb can display. */ var connectBreadcrumb = createConnector({ displayName: 'AlgoliaBreadcrumb', propTypes: { attributes: function attributes(props, propName, componentName) { var isNotString = function isNotString(val) { return typeof val !== 'string'; }; if (!Array.isArray(props[propName]) || props[propName].some(isNotString) || props[propName].length < 1) { return new Error('Invalid prop ' + propName + ' supplied to ' + componentName + '. Expected an Array of Strings'); } return undefined; }, rootURL: propTypes.string, separator: propTypes.oneOfType([propTypes.string, propTypes.element]), transformItems: propTypes.func }, defaultProps: { rootURL: null, separator: ' > ' }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var id = getId$10(props); var results = getResults(searchResults, this.context); var isFacetPresent = Boolean(results) && Boolean(results.getFacetByName(id)); if (!isFacetPresent) { return { items: [], canRefine: false }; } var values = results.getFacetValues(id); var items = values.data ? transformValue$1(values.data) : []; var transformedItems = props.transformItems ? props.transformItems(items) : items; return { canRefine: transformedItems.length > 0, items: transformedItems }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$7(props, searchState, nextRefinement, this.context); } }); function getId$11() { return 'query'; } function getCurrentRefinement$9(props, searchState, context) { var id = getId$11(props); return getCurrentRefinementValue(props, searchState, context, id, '', function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return ''; }); } function _refine$8(props, searchState, nextRefinement, context) { var id = getId$11(); var nextValue = defineProperty$2({}, id, nextRefinement); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage); } function _cleanUp$6(props, searchState, context) { return cleanUpValue(searchState, context, getId$11()); } /** * connectSearchBox connector provides the logic to build a widget that will * let the user search for a query. * @name connectSearchBox * @kind connector * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the query to search for. * @providedPropType {boolean} isSearchStalled - a flag that indicates if react-is has detected that searches are stalled. */ var connectSearchBox = createConnector({ displayName: 'AlgoliaSearchBox', propTypes: { defaultRefinement: propTypes.string }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { return { currentRefinement: getCurrentRefinement$9(props, searchState, this.context), isSearchStalled: searchResults.isSearchStalled }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$8(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$6(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQuery(getCurrentRefinement$9(props, searchState, this.context)); }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId$11(props); var currentRefinement = getCurrentRefinement$9(props, searchState, this.context); return { id: id, index: getIndex(this.context), items: currentRefinement === null ? [] : [{ label: id + ': ' + currentRefinement, value: function value(nextState) { return _refine$8(props, nextState, '', _this.context); }, currentRefinement: currentRefinement }] }; } }); function getId$12() { return 'sortBy'; } function getCurrentRefinement$10(props, searchState, context) { var id = getId$12(props); return getCurrentRefinementValue(props, searchState, context, id, null, function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return null; }); } /** * The connectSortBy connector provides the logic to build a widget that will * display a list of indices. This allows a user to change how the hits are being sorted. * @name connectSortBy * @requirements Algolia handles sorting by creating replica indices. [Read more about sorting](https://www.algolia.com/doc/guides/relevance/sorting/) on * the Algolia website. * @kind connector * @propType {string} defaultRefinement - The default selected index. * @propType {{value: string, label: string}[]} items - The list of indexes to search in. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string[]} currentRefinement - the refinement currently applied * @providedPropType {array.<{isRefined: boolean, label?: string, value: string}>} items - the list of items the HitsPerPage can display. If no label provided, the value will be displayed. */ var connectSortBy = createConnector({ displayName: 'AlgoliaSortBy', propTypes: { defaultRefinement: propTypes.string, items: propTypes.arrayOf(propTypes.shape({ label: propTypes.string, value: propTypes.string.isRequired })).isRequired, transformItems: propTypes.func }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement$10(props, searchState, this.context); var items = props.items.map(function (item) { return item.value === currentRefinement ? _extends({}, item, { isRefined: true }) : _extends({}, item, { isRefined: false }); }); return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { var id = getId$12(); var nextValue = defineProperty$2({}, id, nextRefinement); var resetPage = true; return refineValue(searchState, nextValue, this.context, resetPage); }, cleanUp: function cleanUp(props, searchState) { return cleanUpValue(searchState, this.context, getId$12()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var selectedIndex = getCurrentRefinement$10(props, searchState, this.context); return searchParameters.setIndex(selectedIndex); }, getMetadata: function getMetadata() { return { id: getId$12() }; } }); /** * connectStats connector provides the logic to build a widget that will * displays algolia search statistics (hits number and processing time). * @name connectStats * @kind connector * @providedPropType {number} nbHits - number of hits returned by Algolia. * @providedPropType {number} processingTimeMS - the time in ms took by Algolia to search for results. */ var connectStats = createConnector({ displayName: 'AlgoliaStats', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = getResults(searchResults, this.context); if (!results) { return null; } return { nbHits: results.nbHits, processingTimeMS: results.processingTimeMS }; } }); function getId$13(props) { return props.attributeName; } var namespace$6 = 'toggle'; function getCurrentRefinement$11(props, searchState, context) { return getCurrentRefinementValue(props, searchState, context, namespace$6 + '.' + getId$13(props), false, function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return false; }); } function _refine$9(props, searchState, nextRefinement, context) { var id = getId$13(props); var nextValue = defineProperty$2({}, id, nextRefinement ? nextRefinement : false); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace$6); } function _cleanUp$7(props, searchState, context) { return cleanUpValue(searchState, context, namespace$6 + '.' + getId$13(props)); } /** * connectToggle connector provides the logic to build a widget that will * provides an on/off filtering feature based on an attribute value. Note that if you provide an “off” option, it will be refined at initialization. * @name connectToggle * @kind connector * @requirements To use this widget, you'll need an attribute to toggle on. * * You can't toggle on null or not-null values. If you want to address this particular use-case you'll need to compute an * extra boolean attribute saying if the value exists or not. See this [thread](https://discourse.algolia.com/t/how-to-create-a-toggle-for-the-absence-of-a-string-attribute/2460) for more details. * * @propType {string} attributeName - Name of the attribute on which to apply the `value` refinement. Required when `value` is present. * @propType {string} label - Label for the toggle. * @propType {string} value - Value of the refinement to apply on `attributeName`. * @propType {boolean} [defaultRefinement=false] - Default searchState of the widget. Should the toggle be checked by default? * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {boolean} currentRefinement - the refinement currently applied */ var connectToggle = createConnector({ displayName: 'AlgoliaToggle', propTypes: { label: propTypes.string, filter: propTypes.func, attributeName: propTypes.string, value: propTypes.any, defaultRefinement: propTypes.bool }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement$11(props, searchState, this.context); return { currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$9(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$7(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName, value = props.value, filter = props.filter; var checked = getCurrentRefinement$11(props, searchState, this.context); if (checked) { if (attributeName) { searchParameters = searchParameters.addFacet(attributeName).addFacetRefinement(attributeName, value); } if (filter) { searchParameters = filter(searchParameters); } } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId$13(props); var checked = getCurrentRefinement$11(props, searchState, this.context); var items = []; var index = getIndex(this.context); if (checked) { items.push({ label: props.label, currentRefinement: props.label, attributeName: props.attributeName, value: function value(nextState) { return _refine$9(props, nextState, false, _this.context); } }); } return { id: id, index: index, items: items }; } }); /** * The `connectStateResults` connector provides a way to access the `searchState` and the `searchResults` * of InstantSearch. * For instance this connector allows you to create results/noResults or query/noQuery pages. * @name connectStateResults * @kind connector * @providedPropType {object} searchState - The search state of the instant search component. <br/><br/> See: [Search state structure](https://community.algolia.com/react-instantsearch/guide/Search_state.html) * @providedPropType {object} searchResults - The search results. <br/><br/> In case of multiple indices: if used under `<Index>`, results will be those of the corresponding index otherwise it'll be those of the root index See: [Search results structure](https://community.algolia.com/algoliasearch-helper-js/reference.html#searchresults) * @providedPropType {object} allSearchResults - In case of multiple indices you can retrieve all the results * @providedPropType {string} error - If the search failed, the error will be logged here. * @providedPropType {boolean} searching - If there is a search in progress. * @providedPropType {boolean} searchingForFacetValues - If there is a search in a list in progress. * @providedPropType {object} props - component props. * @example * import React from 'react'; * * import { InstantSearch, Hits } from 'react-instantsearch/dom'; * import { connectStateResults } from 'react-instantsearch/connectors'; * * const Content = connectStateResults( * ({ searchState, searchResults }) => * searchResults && searchResults.nbHits !== 0 * ? <Hits/> * : <div> * No results has been found for {searchState.query} * </div> * ); * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <Content /> * </InstantSearch> * ); * } */ var connectStateResults = createConnector({ displayName: 'AlgoliaStateResults', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = getResults(searchResults, this.context); return { searchState: searchState, searchResults: results, allSearchResults: searchResults.results, searching: searchResults.searching, error: searchResults.error, searchingForFacetValues: searchResults.searchingForFacetValues, props: props }; } }); exports.connectConfigure = connectConfigure; exports.connectCurrentRefinements = connectCurrentRefinements; exports.connectHierarchicalMenu = connectHierarchicalMenu; exports.connectHighlight = connectHighlight; exports.connectHits = connectHits; exports.connectAutoComplete = connectAutoComplete; exports.connectHitsPerPage = connectHitsPerPage; exports.connectInfiniteHits = connectInfiniteHits; exports.connectMenu = connectMenu; exports.connectMultiRange = connectMultiRange; exports.connectPagination = connectPagination; exports.connectPoweredBy = connectPoweredBy; exports.connectRange = connectRange; exports.connectRefinementList = connectRefinementList; exports.connectScrollTo = connectScrollTo; exports.connectBreadcrumb = connectBreadcrumb; exports.connectSearchBox = connectSearchBox; exports.connectSortBy = connectSortBy; exports.connectStats = connectStats; exports.connectToggle = connectToggle; exports.connectStateResults = connectStateResults; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=Connectors.js.map
ajax/libs/react-native-web/0.16.1/modules/UnimplementedView/index.js
cdnjs/cdnjs
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import View from '../../exports/View'; import React from 'react'; /** * Common implementation for a simple stubbed view. */ var UnimplementedView = /*#__PURE__*/function (_React$Component) { _inheritsLoose(UnimplementedView, _React$Component); function UnimplementedView() { return _React$Component.apply(this, arguments) || this; } var _proto = UnimplementedView.prototype; _proto.setNativeProps = function setNativeProps() {// Do nothing. }; _proto.render = function render() { return /*#__PURE__*/React.createElement(View, { style: [unimplementedViewStyles, this.props.style] }, this.props.children); }; return UnimplementedView; }(React.Component); var unimplementedViewStyles = process.env.NODE_ENV !== 'production' ? { alignSelf: 'flex-start', borderColor: 'red', borderWidth: 1 } : {}; export default UnimplementedView;
ajax/libs/boardgame-io/0.49.12/esm/react-native.js
cdnjs/cdnjs
import 'nanoid/non-secure'; import { _ as _inherits, a as _createSuper, b as _createClass, c as _defineProperty, d as _classCallCheck, e as _objectWithoutProperties, f as _objectSpread2 } from './Debug-fd09b8bc.js'; import 'redux'; import './turn-order-0b7dce3d.js'; import 'immer'; import './plugin-random-087f861e.js'; import 'lodash.isplainobject'; import './reducer-07c7b307.js'; import 'rfc6902'; import './initialize-9ac1bbf5.js'; import './transport-ce07b771.js'; import { C as Client$1 } from './client-fa36c03a.js'; import 'flatted'; import 'setimmediate'; import './ai-3099ce9a.js'; import React from 'react'; import PropTypes from 'prop-types'; var _excluded = ["matchID", "playerID"]; /** * Client * * boardgame.io React Native client. * * @param {...object} game - The return value of `Game`. * @param {...object} numPlayers - The number of players. * @param {...object} board - The React component for the game. * @param {...object} loading - (optional) The React component for the loading state. * @param {...object} multiplayer - Set to a falsy value or a transportFactory, e.g., SocketIO() * @param {...object} enhancer - Optional enhancer to send to the Redux store * * Returns: * A React Native component that wraps board and provides an * API through props for it to interact with the framework * and dispatch actions such as MAKE_MOVE. */ function Client(opts) { var _class, _temp; var game = opts.game, numPlayers = opts.numPlayers, board = opts.board, multiplayer = opts.multiplayer, enhancer = opts.enhancer; var loading = opts.loading; // Component that is displayed before the client has synced // with the game master. if (loading === undefined) { var Loading = function Loading() { return /*#__PURE__*/React.createElement(React.Fragment, null); }; loading = Loading; } /* * WrappedBoard * * The main React component that wraps the passed in * board component and adds the API to its props. */ return _temp = _class = /*#__PURE__*/function (_React$Component) { _inherits(WrappedBoard, _React$Component); var _super = _createSuper(WrappedBoard); function WrappedBoard(props) { var _this; _classCallCheck(this, WrappedBoard); _this = _super.call(this, props); _this.client = Client$1({ game: game, numPlayers: numPlayers, multiplayer: multiplayer, matchID: props.matchID, playerID: props.playerID, credentials: props.credentials, debug: false, enhancer: enhancer }); return _this; } _createClass(WrappedBoard, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; this.unsubscribe = this.client.subscribe(function () { return _this2.forceUpdate(); }); this.client.start(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.client.stop(); this.unsubscribe(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.matchID != this.props.matchID) { this.client.updateMatchID(this.props.matchID); } if (prevProps.playerID != this.props.playerID) { this.client.updatePlayerID(this.props.playerID); } if (prevProps.credentials != this.props.credentials) { this.client.updateCredentials(this.props.credentials); } } }, { key: "render", value: function render() { var _board = null; var state = this.client.getState(); if (state === null) { return /*#__PURE__*/React.createElement(loading); } var _this$props = this.props, matchID = _this$props.matchID, playerID = _this$props.playerID, rest = _objectWithoutProperties(_this$props, _excluded); if (board) { _board = /*#__PURE__*/React.createElement(board, _objectSpread2(_objectSpread2(_objectSpread2({}, state), rest), {}, { matchID: matchID, playerID: playerID, isMultiplayer: !!multiplayer, moves: this.client.moves, events: this.client.events, step: this.client.step, reset: this.client.reset, undo: this.client.undo, redo: this.client.redo, matchData: this.client.matchData, sendChatMessage: this.client.sendChatMessage, chatMessages: this.client.chatMessages })); } return _board; } }]); return WrappedBoard; }(React.Component), _defineProperty(_class, "propTypes", { // The ID of a game to connect to. // Only relevant in multiplayer. matchID: PropTypes.string, // The ID of the player associated with this client. // Only relevant in multiplayer. playerID: PropTypes.string, // This client's authentication credentials. // Only relevant in multiplayer. credentials: PropTypes.string }), _defineProperty(_class, "defaultProps", { matchID: 'default', playerID: null, credentials: null }), _temp; } export { Client };
ajax/libs/material-ui/4.9.2/esm/internal/svg-icons/createSvgIcon.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import SvgIcon from '../../SvgIcon'; export default function createSvgIcon(path, displayName) { var Component = React.memo(React.forwardRef(function (props, ref) { return React.createElement(SvgIcon, _extends({}, props, { ref: ref }), path); })); if (process.env.NODE_ENV !== 'production') { Component.displayName = "".concat(displayName, "Icon"); } Component.muiName = SvgIcon.muiName; return Component; }
ajax/libs/react-instantsearch/6.8.3/Connectors.js
cdnjs/cdnjs
/*! React InstantSearch 6.8.3 | © Algolia, inc. | https://github.com/algolia/react-instantsearch */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) : typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) : (global = global || self, factory((global.ReactInstantSearch = global.ReactInstantSearch || {}, global.ReactInstantSearch.Connectors = {}), global.React)); }(this, function (exports, React) { 'use strict'; var React__default = 'default' in React ? React['default'] : React; function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } function _typeof(obj) { if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { _typeof = function _typeof(obj) { return _typeof2(obj); }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); }; } return _typeof(obj); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } /* global Map:readonly, Set:readonly, ArrayBuffer:readonly */ var hasElementType = typeof Element !== 'undefined'; var hasMap = typeof Map === 'function'; var hasSet = typeof Set === 'function'; var hasArrayBuffer = typeof ArrayBuffer === 'function'; // Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js function equal(a, b) { // START: fast-deep-equal es6/index.js 3.1.1 if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { if (a.constructor !== b.constructor) return false; var length, i, keys; if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false; return true; } // START: Modifications: // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code // to co-exist with es5. // 2. Replace `for of` with es5 compliant iteration using `for`. // Basically, take: // // ```js // for (i of a.entries()) // if (!b.has(i[0])) return false; // ``` // // ... and convert to: // // ```js // it = a.entries(); // while (!(i = it.next()).done) // if (!b.has(i.value[0])) return false; // ``` // // **Note**: `i` access switches to `i.value`. var it; if (hasMap && (a instanceof Map) && (b instanceof Map)) { if (a.size !== b.size) return false; it = a.entries(); while (!(i = it.next()).done) if (!b.has(i.value[0])) return false; it = a.entries(); while (!(i = it.next()).done) if (!equal(i.value[1], b.get(i.value[0]))) return false; return true; } if (hasSet && (a instanceof Set) && (b instanceof Set)) { if (a.size !== b.size) return false; it = a.entries(); while (!(i = it.next()).done) if (!b.has(i.value[0])) return false; return true; } // END: Modifications if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false; return true; } if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); keys = Object.keys(a); length = keys.length; if (length !== Object.keys(b).length) return false; for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; // END: fast-deep-equal // START: react-fast-compare // custom handling for DOM elements if (hasElementType && a instanceof Element) return false; // custom handling for React for (i = length; i-- !== 0;) { if (keys[i] === '_owner' && a.$$typeof) { // React-specific: avoid traversing React elements' _owner. // _owner contains circular references // and is not needed when comparing the actual elements (and not their owners) // .$$typeof and ._store on just reasonable markers of a react element continue; } // all other properties should be traversed as usual if (!equal(a[keys[i]], b[keys[i]])) return false; } // END: react-fast-compare // START: fast-deep-equal return true; } return a !== a && b !== b; } // end fast-deep-equal var reactFastCompare = function isEqual(a, b) { try { return equal(a, b); } catch (error) { if (((error.message || '').match(/stack|recursion/i))) { // warn on circular references, don't crash // browsers give this different errors name and messages: // chrome/safari: "RangeError", "Maximum call stack size exceeded" // firefox: "InternalError", too much recursion" // edge: "Error", "Out of stack space" console.warn('react-fast-compare cannot handle circular refs'); return false; } // some other error. we should definitely know about these throw error; } }; var shallowEqual = function shallowEqual(objA, objB) { if (objA === objB) { return true; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. var hasOwn = Object.prototype.hasOwnProperty; for (var i = 0; i < keysA.length; i++) { if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { return false; } } return true; }; var getDisplayName = function getDisplayName(Component) { return Component.displayName || Component.name || 'UnknownComponent'; }; var isPlainObject = function isPlainObject(value) { return _typeof(value) === 'object' && value !== null && !Array.isArray(value); }; var removeEmptyKey = function removeEmptyKey(obj) { Object.keys(obj).forEach(function (key) { var value = obj[key]; if (!isPlainObject(value)) { return; } if (!objectHasKeys(value)) { delete obj[key]; } else { removeEmptyKey(value); } }); return obj; }; var removeEmptyArraysFromObject = function removeEmptyArraysFromObject(obj) { Object.keys(obj).forEach(function (key) { var value = obj[key]; if (Array.isArray(value) && value.length === 0) { delete obj[key]; } }); return obj; }; function addAbsolutePositions(hits, hitsPerPage, page) { return hits.map(function (hit, index) { return _objectSpread({}, hit, { __position: hitsPerPage * page + index + 1 }); }); } function addQueryID(hits, queryID) { if (!queryID) { return hits; } return hits.map(function (hit) { return _objectSpread({}, hit, { __queryID: queryID }); }); } function find(array, comparator) { if (!Array.isArray(array)) { return undefined; } for (var i = 0; i < array.length; i++) { if (comparator(array[i])) { return array[i]; } } return undefined; } function objectHasKeys(object) { return object && Object.keys(object).length > 0; } // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620 function omit(source, excluded) { if (source === null || source === undefined) { return {}; } var target = {}; var sourceKeys = Object.keys(source); for (var i = 0; i < sourceKeys.length; i++) { var _key = sourceKeys[i]; if (excluded.indexOf(_key) >= 0) { // eslint-disable-next-line no-continue continue; } target[_key] = source[_key]; } return target; } /** * Retrieve the value at a path of the object: * * @example * getPropertyByPath( * { test: { this: { function: [{ now: { everyone: true } }] } } }, * 'test.this.function[0].now.everyone' * ); // true * * getPropertyByPath( * { test: { this: { function: [{ now: { everyone: true } }] } } }, * ['test', 'this', 'function', 0, 'now', 'everyone'] * ); // true * * @param object Source object to query * @param path either an array of properties, or a string form of the properties, separated by . */ var getPropertyByPath = function getPropertyByPath(object, path) { return (Array.isArray(path) ? path : path.replace(/\[(\d+)]/g, '.$1').split('.')).reduce(function (current, key) { return current ? current[key] : undefined; }, object); }; var _createContext = React.createContext({ onInternalStateUpdate: function onInternalStateUpdate() { return undefined; }, createHrefForState: function createHrefForState() { return '#'; }, onSearchForFacetValues: function onSearchForFacetValues() { return undefined; }, onSearchStateChange: function onSearchStateChange() { return undefined; }, onSearchParameters: function onSearchParameters() { return undefined; }, store: {}, widgetsManager: {}, mainTargetedIndex: '' }), InstantSearchConsumer = _createContext.Consumer, InstantSearchProvider = _createContext.Provider; var _createContext2 = React.createContext(undefined), IndexConsumer = _createContext2.Consumer, IndexProvider = _createContext2.Provider; /** * Connectors are the HOC used to transform React components * into InstantSearch widgets. * In order to simplify the construction of such connectors * `createConnector` takes a description and transform it into * a connector. * @param {ConnectorDescription} connectorDesc the description of the connector * @return {Connector} a function that wraps a component into * an instantsearch connected one. */ function createConnectorWithoutContext(connectorDesc) { if (!connectorDesc.displayName) { throw new Error('`createConnector` requires you to provide a `displayName` property.'); } var isWidget = typeof connectorDesc.getSearchParameters === 'function' || typeof connectorDesc.getMetadata === 'function' || typeof connectorDesc.transitionState === 'function'; return function (Composed) { var Connector = /*#__PURE__*/ function (_Component) { _inherits(Connector, _Component); function Connector(props) { var _this; _classCallCheck(this, Connector); _this = _possibleConstructorReturn(this, _getPrototypeOf(Connector).call(this, props)); _defineProperty(_assertThisInitialized(_this), "unsubscribe", void 0); _defineProperty(_assertThisInitialized(_this), "unregisterWidget", void 0); _defineProperty(_assertThisInitialized(_this), "isUnmounting", false); _defineProperty(_assertThisInitialized(_this), "state", { providedProps: _this.getProvidedProps(_this.props) }); _defineProperty(_assertThisInitialized(_this), "refine", function () { var _ref; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this.props.contextValue.onInternalStateUpdate( // refine will always be defined here because the prop is only given conditionally (_ref = connectorDesc.refine).call.apply(_ref, [_assertThisInitialized(_this), _this.props, _this.props.contextValue.store.getState().widgets].concat(args))); }); _defineProperty(_assertThisInitialized(_this), "createURL", function () { var _ref2; for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return _this.props.contextValue.createHrefForState( // refine will always be defined here because the prop is only given conditionally (_ref2 = connectorDesc.refine).call.apply(_ref2, [_assertThisInitialized(_this), _this.props, _this.props.contextValue.store.getState().widgets].concat(args))); }); _defineProperty(_assertThisInitialized(_this), "searchForFacetValues", function () { var _ref3; for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } _this.props.contextValue.onSearchForFacetValues( // searchForFacetValues will always be defined here because the prop is only given conditionally (_ref3 = connectorDesc.searchForFacetValues).call.apply(_ref3, [_assertThisInitialized(_this), _this.props, _this.props.contextValue.store.getState().widgets].concat(args))); }); if (connectorDesc.getSearchParameters) { _this.props.contextValue.onSearchParameters(connectorDesc.getSearchParameters.bind(_assertThisInitialized(_this)), { ais: _this.props.contextValue, multiIndexContext: _this.props.indexContextValue }, _this.props, connectorDesc.getMetadata && connectorDesc.getMetadata.bind(_assertThisInitialized(_this))); } return _this; } _createClass(Connector, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; this.unsubscribe = this.props.contextValue.store.subscribe(function () { if (!_this2.isUnmounting) { _this2.setState({ providedProps: _this2.getProvidedProps(_this2.props) }); } }); if (isWidget) { this.unregisterWidget = this.props.contextValue.widgetsManager.registerWidget(this); } } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { if (typeof connectorDesc.shouldComponentUpdate === 'function') { return connectorDesc.shouldComponentUpdate.call(this, this.props, nextProps, this.state, nextState); } var propsEqual = shallowEqual(this.props, nextProps); if (this.state.providedProps === null || nextState.providedProps === null) { if (this.state.providedProps === nextState.providedProps) { return !propsEqual; } return true; } return !propsEqual || !shallowEqual(this.state.providedProps, nextState.providedProps); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (!reactFastCompare(prevProps, this.props)) { this.setState({ providedProps: this.getProvidedProps(this.props) }); if (isWidget) { this.props.contextValue.widgetsManager.update(); if (typeof connectorDesc.transitionState === 'function') { this.props.contextValue.onSearchStateChange(connectorDesc.transitionState.call(this, this.props, this.props.contextValue.store.getState().widgets, this.props.contextValue.store.getState().widgets)); } } } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.isUnmounting = true; if (this.unsubscribe) { this.unsubscribe(); } if (this.unregisterWidget) { this.unregisterWidget(); if (typeof connectorDesc.cleanUp === 'function') { var nextState = connectorDesc.cleanUp.call(this, this.props, this.props.contextValue.store.getState().widgets); this.props.contextValue.store.setState(_objectSpread({}, this.props.contextValue.store.getState(), { widgets: nextState })); this.props.contextValue.onSearchStateChange(removeEmptyKey(nextState)); } } } }, { key: "getProvidedProps", value: function getProvidedProps(props) { var _this$props$contextVa = this.props.contextValue.store.getState(), widgets = _this$props$contextVa.widgets, results = _this$props$contextVa.results, resultsFacetValues = _this$props$contextVa.resultsFacetValues, searching = _this$props$contextVa.searching, searchingForFacetValues = _this$props$contextVa.searchingForFacetValues, isSearchStalled = _this$props$contextVa.isSearchStalled, metadata = _this$props$contextVa.metadata, error = _this$props$contextVa.error; var searchResults = { results: results, searching: searching, searchingForFacetValues: searchingForFacetValues, isSearchStalled: isSearchStalled, error: error }; return connectorDesc.getProvidedProps.call(this, props, widgets, searchResults, metadata, // @MAJOR: move this attribute on the `searchResults` it doesn't // makes sense to have it into a separate argument. The search // flags are on the object why not the results? resultsFacetValues); } }, { key: "getSearchParameters", value: function getSearchParameters(searchParameters) { if (typeof connectorDesc.getSearchParameters === 'function') { return connectorDesc.getSearchParameters.call(this, searchParameters, this.props, this.props.contextValue.store.getState().widgets); } return null; } }, { key: "getMetadata", value: function getMetadata(nextWidgetsState) { if (typeof connectorDesc.getMetadata === 'function') { return connectorDesc.getMetadata.call(this, this.props, nextWidgetsState); } return {}; } }, { key: "transitionState", value: function transitionState(prevWidgetsState, nextWidgetsState) { if (typeof connectorDesc.transitionState === 'function') { return connectorDesc.transitionState.call(this, this.props, prevWidgetsState, nextWidgetsState); } return nextWidgetsState; } }, { key: "render", value: function render() { var _this$props = this.props, contextValue = _this$props.contextValue, props = _objectWithoutProperties(_this$props, ["contextValue"]); var providedProps = this.state.providedProps; if (providedProps === null) { return null; } var refineProps = typeof connectorDesc.refine === 'function' ? { refine: this.refine, createURL: this.createURL } : {}; var searchForFacetValuesProps = typeof connectorDesc.searchForFacetValues === 'function' ? { searchForItems: this.searchForFacetValues } : {}; return React__default.createElement(Composed, _extends({}, props, providedProps, refineProps, searchForFacetValuesProps)); } }]); return Connector; }(React.Component); _defineProperty(Connector, "displayName", "".concat(connectorDesc.displayName, "(").concat(getDisplayName(Composed), ")")); _defineProperty(Connector, "propTypes", connectorDesc.propTypes); _defineProperty(Connector, "defaultProps", connectorDesc.defaultProps); return Connector; }; } var createConnectorWithContext = function createConnectorWithContext(connectorDesc) { return function (Composed) { var Connector = createConnectorWithoutContext(connectorDesc)(Composed); var ConnectorWrapper = function ConnectorWrapper(props) { return React__default.createElement(InstantSearchConsumer, null, function (contextValue) { return React__default.createElement(IndexConsumer, null, function (indexContextValue) { return React__default.createElement(Connector, _extends({ contextValue: contextValue, indexContextValue: indexContextValue }, props)); }); }); }; return ConnectorWrapper; }; }; var HIGHLIGHT_TAGS = { highlightPreTag: "<ais-highlight-0000000000>", highlightPostTag: "</ais-highlight-0000000000>" }; /** * Parses an highlighted attribute into an array of objects with the string value, and * a boolean that indicated if this part is highlighted. * * @param {string} preTag - string used to identify the start of an highlighted value * @param {string} postTag - string used to identify the end of an highlighted value * @param {string} highlightedValue - highlighted attribute as returned by Algolia highlight feature * @return {object[]} - An array of {value: string, isHighlighted: boolean}. */ function parseHighlightedAttribute(_ref) { var preTag = _ref.preTag, postTag = _ref.postTag, _ref$highlightedValue = _ref.highlightedValue, highlightedValue = _ref$highlightedValue === void 0 ? '' : _ref$highlightedValue; var splitByPreTag = highlightedValue.split(preTag); var firstValue = splitByPreTag.shift(); var elements = firstValue === '' ? [] : [{ value: firstValue, isHighlighted: false }]; if (postTag === preTag) { var isHighlighted = true; splitByPreTag.forEach(function (split) { elements.push({ value: split, isHighlighted: isHighlighted }); isHighlighted = !isHighlighted; }); } else { splitByPreTag.forEach(function (split) { var splitByPostTag = split.split(postTag); elements.push({ value: splitByPostTag[0], isHighlighted: true }); if (splitByPostTag[1] !== '') { elements.push({ value: splitByPostTag[1], isHighlighted: false }); } }); } return elements; } /** * Find an highlighted attribute given an `attribute` and an `highlightProperty`, parses it, * and provided an array of objects with the string value and a boolean if this * value is highlighted. * * In order to use this feature, highlight must be activated in the configuration of * the index. The `preTag` and `postTag` attributes are respectively highlightPreTag and * highlightPostTag in Algolia configuration. * * @param {string} preTag - string used to identify the start of an highlighted value * @param {string} postTag - string used to identify the end of an highlighted value * @param {string} highlightProperty - the property that contains the highlight structure in the results * @param {string} attribute - the highlighted attribute to look for * @param {object} hit - the actual hit returned by Algolia. * @return {object[]} - An array of {value: string, isHighlighted: boolean}. */ function parseAlgoliaHit(_ref2) { var _ref2$preTag = _ref2.preTag, preTag = _ref2$preTag === void 0 ? '<em>' : _ref2$preTag, _ref2$postTag = _ref2.postTag, postTag = _ref2$postTag === void 0 ? '</em>' : _ref2$postTag, highlightProperty = _ref2.highlightProperty, attribute = _ref2.attribute, hit = _ref2.hit; if (!hit) throw new Error('`hit`, the matching record, must be provided'); var highlightObject = getPropertyByPath(hit[highlightProperty], attribute) || {}; if (Array.isArray(highlightObject)) { return highlightObject.map(function (item) { return parseHighlightedAttribute({ preTag: preTag, postTag: postTag, highlightedValue: item.value }); }); } return parseHighlightedAttribute({ preTag: preTag, postTag: postTag, highlightedValue: highlightObject.value }); } function getIndexId(context) { return hasMultipleIndices(context) ? context.multiIndexContext.targetedIndex : context.ais.mainTargetedIndex; } function getResults(searchResults, context) { if (searchResults.results) { if (searchResults.results.hits) { return searchResults.results; } var indexId = getIndexId(context); if (searchResults.results[indexId]) { return searchResults.results[indexId]; } } return null; } function hasMultipleIndices(context) { return context && context.multiIndexContext; } // eslint-disable-next-line max-params function refineValue(searchState, nextRefinement, context, resetPage, namespace) { if (hasMultipleIndices(context)) { var indexId = getIndexId(context); return namespace ? refineMultiIndexWithNamespace(searchState, nextRefinement, indexId, resetPage, namespace) : refineMultiIndex(searchState, nextRefinement, indexId, resetPage); } else { // When we have a multi index page with shared widgets we should also // reset their page to 1 if the resetPage is provided. Otherwise the // indices will always be reset // see: https://github.com/algolia/react-instantsearch/issues/310 // see: https://github.com/algolia/react-instantsearch/issues/637 if (searchState.indices && resetPage) { Object.keys(searchState.indices).forEach(function (targetedIndex) { searchState = refineValue(searchState, { page: 1 }, { multiIndexContext: { targetedIndex: targetedIndex } }, true, namespace); }); } return namespace ? refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) : refineSingleIndex(searchState, nextRefinement, resetPage); } } function refineMultiIndex(searchState, nextRefinement, indexId, resetPage) { var page = resetPage ? { page: 1 } : undefined; var state = searchState.indices && searchState.indices[indexId] ? _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, searchState.indices[indexId], nextRefinement, page))) : _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, nextRefinement, page))); return _objectSpread({}, searchState, { indices: state }); } function refineSingleIndex(searchState, nextRefinement, resetPage) { var page = resetPage ? { page: 1 } : undefined; return _objectSpread({}, searchState, nextRefinement, page); } // eslint-disable-next-line max-params function refineMultiIndexWithNamespace(searchState, nextRefinement, indexId, resetPage, namespace) { var _objectSpread4; var page = resetPage ? { page: 1 } : undefined; var state = searchState.indices && searchState.indices[indexId] ? _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, searchState.indices[indexId], (_objectSpread4 = {}, _defineProperty(_objectSpread4, namespace, _objectSpread({}, searchState.indices[indexId][namespace], nextRefinement)), _defineProperty(_objectSpread4, "page", 1), _objectSpread4)))) : _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread(_defineProperty({}, namespace, nextRefinement), page))); return _objectSpread({}, searchState, { indices: state }); } function refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) { var page = resetPage ? { page: 1 } : undefined; return _objectSpread({}, searchState, _defineProperty({}, namespace, _objectSpread({}, searchState[namespace], nextRefinement)), page); } function getNamespaceAndAttributeName(id) { var parts = id.match(/^([^.]*)\.(.*)/); var namespace = parts && parts[1]; var attributeName = parts && parts[2]; return { namespace: namespace, attributeName: attributeName }; } function hasRefinements(_ref) { var multiIndex = _ref.multiIndex, indexId = _ref.indexId, namespace = _ref.namespace, attributeName = _ref.attributeName, id = _ref.id, searchState = _ref.searchState; if (multiIndex && namespace) { return searchState.indices && searchState.indices[indexId] && searchState.indices[indexId][namespace] && Object.hasOwnProperty.call(searchState.indices[indexId][namespace], attributeName); } if (multiIndex) { return searchState.indices && searchState.indices[indexId] && Object.hasOwnProperty.call(searchState.indices[indexId], id); } if (namespace) { return searchState[namespace] && Object.hasOwnProperty.call(searchState[namespace], attributeName); } return Object.hasOwnProperty.call(searchState, id); } function getRefinements(_ref2) { var multiIndex = _ref2.multiIndex, indexId = _ref2.indexId, namespace = _ref2.namespace, attributeName = _ref2.attributeName, id = _ref2.id, searchState = _ref2.searchState; if (multiIndex && namespace) { return searchState.indices[indexId][namespace][attributeName]; } if (multiIndex) { return searchState.indices[indexId][id]; } if (namespace) { return searchState[namespace][attributeName]; } return searchState[id]; } function getCurrentRefinementValue(props, searchState, context, id, defaultValue) { var indexId = getIndexId(context); var _getNamespaceAndAttri = getNamespaceAndAttributeName(id), namespace = _getNamespaceAndAttri.namespace, attributeName = _getNamespaceAndAttri.attributeName; var multiIndex = hasMultipleIndices(context); var args = { multiIndex: multiIndex, indexId: indexId, namespace: namespace, attributeName: attributeName, id: id, searchState: searchState }; var hasRefinementsValue = hasRefinements(args); if (hasRefinementsValue) { return getRefinements(args); } if (props.defaultRefinement) { return props.defaultRefinement; } return defaultValue; } function cleanUpValue(searchState, context, id) { var indexId = getIndexId(context); var _getNamespaceAndAttri2 = getNamespaceAndAttributeName(id), namespace = _getNamespaceAndAttri2.namespace, attributeName = _getNamespaceAndAttri2.attributeName; if (hasMultipleIndices(context) && Boolean(searchState.indices)) { return cleanUpValueWithMultiIndex({ attribute: attributeName, searchState: searchState, indexId: indexId, id: id, namespace: namespace }); } return cleanUpValueWithSingleIndex({ attribute: attributeName, searchState: searchState, id: id, namespace: namespace }); } function cleanUpValueWithSingleIndex(_ref3) { var searchState = _ref3.searchState, id = _ref3.id, namespace = _ref3.namespace, attribute = _ref3.attribute; if (namespace) { return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute]))); } return omit(searchState, [id]); } function cleanUpValueWithMultiIndex(_ref4) { var searchState = _ref4.searchState, indexId = _ref4.indexId, id = _ref4.id, namespace = _ref4.namespace, attribute = _ref4.attribute; var indexSearchState = searchState.indices[indexId]; if (namespace && indexSearchState) { return _objectSpread({}, searchState, { indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute]))))) }); } if (indexSearchState) { return _objectSpread({}, searchState, { indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id]))) }); } return searchState; } function getId() { return 'configure'; } var connectConfigure = createConnectorWithContext({ displayName: 'AlgoliaConfigure', getProvidedProps: function getProvidedProps() { return {}; }, getSearchParameters: function getSearchParameters(searchParameters, props) { var children = props.children, contextValue = props.contextValue, indexContextValue = props.indexContextValue, items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]); return searchParameters.setQueryParameters(items); }, transitionState: function transitionState(props, prevSearchState, nextSearchState) { var id = getId(); var children = props.children, contextValue = props.contextValue, indexContextValue = props.indexContextValue, items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]); var propKeys = Object.keys(props); var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) { return propKeys.indexOf(prop) === -1; }) : []; this._props = props; var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items)); return refineValue(nextSearchState, nextValue, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, cleanUp: function cleanUp(props, searchState) { var id = getId(); var indexId = getIndexId({ ais: props.contextValue, multiIndexContext: props.indexContextValue }); var subState = hasMultipleIndices({ ais: props.contextValue, multiIndexContext: props.indexContextValue }) && searchState.indices ? searchState.indices[indexId] : searchState; var configureKeys = subState && subState[id] ? Object.keys(subState[id]) : []; var configureState = configureKeys.reduce(function (acc, item) { if (!props[item]) { acc[item] = subState[id][item]; } return acc; }, {}); var nextValue = _defineProperty({}, id, configureState); return refineValue(searchState, nextValue, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); } }); var global$1 = (typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); if (typeof global$1.setTimeout === 'function') ; if (typeof global$1.clearTimeout === 'function') ; // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js var performance = global$1.performance || {}; var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function(){ return (new Date()).getTime() }; function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function clone(value) { if (typeof value === 'object' && value !== null) { return _merge(Array.isArray(value) ? [] : {}, value); } return value; } function isObjectOrArrayOrFunction(value) { return ( typeof value === 'function' || Array.isArray(value) || Object.prototype.toString.call(value) === '[object Object]' ); } function _merge(target, source) { if (target === source) { return target; } for (var key in source) { if (!Object.prototype.hasOwnProperty.call(source, key)) { continue; } var sourceVal = source[key]; var targetVal = target[key]; if (typeof targetVal !== 'undefined' && typeof sourceVal === 'undefined') { continue; } if (isObjectOrArrayOrFunction(targetVal) && isObjectOrArrayOrFunction(sourceVal)) { target[key] = _merge(targetVal, sourceVal); } else { target[key] = clone(sourceVal); } } return target; } /** * This method is like Object.assign, but recursively merges own and inherited * enumerable keyed properties of source objects into the destination object. * * NOTE: this behaves like lodash/merge, but: * - does mutate functions if they are a source * - treats non-plain objects as plain * - does not work for circular objects * - treats sparse arrays as sparse * - does not convert Array-like objects (Arguments, NodeLists, etc.) to arrays * * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. */ function merge(target) { if (!isObjectOrArrayOrFunction(target)) { target = {}; } for (var i = 1, l = arguments.length; i < l; i++) { var source = arguments[i]; if (isObjectOrArrayOrFunction(source)) { _merge(target, source); } } return target; } var merge_1 = merge; // NOTE: this behaves like lodash/defaults, but doesn't mutate the target var defaultsPure = function defaultsPure() { var sources = Array.prototype.slice.call(arguments); return sources.reduceRight(function(acc, source) { Object.keys(Object(source)).forEach(function(key) { if (source[key] !== undefined) { acc[key] = source[key]; } }); return acc; }, {}); }; function intersection(arr1, arr2) { return arr1.filter(function(value, index) { return ( arr2.indexOf(value) > -1 && arr1.indexOf(value) === index /* skips duplicates */ ); }); } var intersection_1 = intersection; // @MAJOR can be replaced by native Array#find when we change support var find$1 = function find(array, comparator) { if (!Array.isArray(array)) { return undefined; } for (var i = 0; i < array.length; i++) { if (comparator(array[i])) { return array[i]; } } }; function valToNumber(v) { if (typeof v === 'number') { return v; } else if (typeof v === 'string') { return parseFloat(v); } else if (Array.isArray(v)) { return v.map(valToNumber); } throw new Error('The value should be a number, a parsable string or an array of those.'); } var valToNumber_1 = valToNumber; // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620 function _objectWithoutPropertiesLoose$1(source, excluded) { if (source === null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key; var i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var omit$1 = _objectWithoutPropertiesLoose$1; function objectHasKeys$1(obj) { return obj && Object.keys(obj).length > 0; } var objectHasKeys_1 = objectHasKeys$1; /** * Functions to manipulate refinement lists * * The RefinementList is not formally defined through a prototype but is based * on a specific structure. * * @module SearchParameters.refinementList * * @typedef {string[]} SearchParameters.refinementList.Refinements * @typedef {Object.<string, SearchParameters.refinementList.Refinements>} SearchParameters.refinementList.RefinementList */ var lib = { /** * Adds a refinement to a RefinementList * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} value the value of the refinement, if the value is not a string it will be converted * @return {RefinementList} a new and updated refinement list */ addRefinement: function addRefinement(refinementList, attribute, value) { if (lib.isRefined(refinementList, attribute, value)) { return refinementList; } var valueAsString = '' + value; var facetRefinement = !refinementList[attribute] ? [valueAsString] : refinementList[attribute].concat(valueAsString); var mod = {}; mod[attribute] = facetRefinement; return defaultsPure({}, mod, refinementList); }, /** * Removes refinement(s) for an attribute: * - if the value is specified removes the refinement for the value on the attribute * - if no value is specified removes all the refinements for this attribute * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} [value] the value of the refinement * @return {RefinementList} a new and updated refinement lst */ removeRefinement: function removeRefinement(refinementList, attribute, value) { if (value === undefined) { // we use the "filter" form of clearRefinement, since it leaves empty values as-is // the form with a string will remove the attribute completely return lib.clearRefinement(refinementList, function(v, f) { return attribute === f; }); } var valueAsString = '' + value; return lib.clearRefinement(refinementList, function(v, f) { return attribute === f && valueAsString === v; }); }, /** * Toggles the refinement value for an attribute. * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} value the value of the refinement * @return {RefinementList} a new and updated list */ toggleRefinement: function toggleRefinement(refinementList, attribute, value) { if (value === undefined) throw new Error('toggleRefinement should be used with a value'); if (lib.isRefined(refinementList, attribute, value)) { return lib.removeRefinement(refinementList, attribute, value); } return lib.addRefinement(refinementList, attribute, value); }, /** * Clear all or parts of a RefinementList. Depending on the arguments, three * kinds of behavior can happen: * - if no attribute is provided: clears the whole list * - if an attribute is provided as a string: clears the list for the specific attribute * - if an attribute is provided as a function: discards the elements for which the function returns true * @param {RefinementList} refinementList the initial list * @param {string} [attribute] the attribute or function to discard * @param {string} [refinementType] optional parameter to give more context to the attribute function * @return {RefinementList} a new and updated refinement list */ clearRefinement: function clearRefinement(refinementList, attribute, refinementType) { if (attribute === undefined) { if (!objectHasKeys_1(refinementList)) { return refinementList; } return {}; } else if (typeof attribute === 'string') { return omit$1(refinementList, attribute); } else if (typeof attribute === 'function') { var hasChanged = false; var newRefinementList = Object.keys(refinementList).reduce(function(memo, key) { var values = refinementList[key] || []; var facetList = values.filter(function(value) { return !attribute(value, key, refinementType); }); if (facetList.length !== values.length) { hasChanged = true; } memo[key] = facetList; return memo; }, {}); if (hasChanged) return newRefinementList; return refinementList; } }, /** * Test if the refinement value is used for the attribute. If no refinement value * is provided, test if the refinementList contains any refinement for the * given attribute. * @param {RefinementList} refinementList the list of refinement * @param {string} attribute name of the attribute * @param {string} [refinementValue] value of the filter/refinement * @return {boolean} */ isRefined: function isRefined(refinementList, attribute, refinementValue) { var containsRefinements = !!refinementList[attribute] && refinementList[attribute].length > 0; if (refinementValue === undefined || !containsRefinements) { return containsRefinements; } var refinementValueAsString = '' + refinementValue; return refinementList[attribute].indexOf(refinementValueAsString) !== -1; } }; var RefinementList = lib; /** * isEqual, but only for numeric refinement values, possible values: * - 5 * - [5] * - [[5]] * - [[5,5],[4]] */ function isEqualNumericRefinement(a, b) { if (Array.isArray(a) && Array.isArray(b)) { return ( a.length === b.length && a.every(function(el, i) { return isEqualNumericRefinement(b[i], el); }) ); } return a === b; } /** * like _.find but using deep equality to be able to use it * to find arrays. * @private * @param {any[]} array array to search into (elements are base or array of base) * @param {any} searchedValue the value we're looking for (base or array of base) * @return {any} the searched value or undefined */ function findArray(array, searchedValue) { return find$1(array, function(currentValue) { return isEqualNumericRefinement(currentValue, searchedValue); }); } /** * The facet list is the structure used to store the list of values used to * filter a single attribute. * @typedef {string[]} SearchParameters.FacetList */ /** * Structure to store numeric filters with the operator as the key. The supported operators * are `=`, `>`, `<`, `>=`, `<=` and `!=`. * @typedef {Object.<string, Array.<number|number[]>>} SearchParameters.OperatorList */ /** * SearchParameters is the data structure that contains all the information * usable for making a search to Algolia API. It doesn't do the search itself, * nor does it contains logic about the parameters. * It is an immutable object, therefore it has been created in a way that each * changes does not change the object itself but returns a copy with the * modification. * This object should probably not be instantiated outside of the helper. It will * be provided when needed. This object is documented for reference as you'll * get it from events generated by the {@link AlgoliaSearchHelper}. * If need be, instantiate the Helper from the factory function {@link SearchParameters.make} * @constructor * @classdesc contains all the parameters of a search * @param {object|SearchParameters} newParameters existing parameters or partial object * for the properties of a new SearchParameters * @see SearchParameters.make * @example <caption>SearchParameters of the first query in * <a href="http://demos.algolia.com/instant-search-demo/">the instant search demo</a></caption> { "query": "", "disjunctiveFacets": [ "customerReviewCount", "category", "salePrice_range", "manufacturer" ], "maxValuesPerFacet": 30, "page": 0, "hitsPerPage": 10, "facets": [ "type", "shipping" ] } */ function SearchParameters(newParameters) { var params = newParameters ? SearchParameters._parseNumbers(newParameters) : {}; /** * This attribute contains the list of all the conjunctive facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * @member {string[]} */ this.facets = params.facets || []; /** * This attribute contains the list of all the disjunctive facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * @member {string[]} */ this.disjunctiveFacets = params.disjunctiveFacets || []; /** * This attribute contains the list of all the hierarchical facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * Hierarchical facets are a sub type of disjunctive facets that * let you filter faceted attributes hierarchically. * @member {string[]|object[]} */ this.hierarchicalFacets = params.hierarchicalFacets || []; // Refinements /** * This attribute contains all the filters that need to be * applied on the conjunctive facets. Each facet must be properly * defined in the `facets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.facetsRefinements = params.facetsRefinements || {}; /** * This attribute contains all the filters that need to be * excluded from the conjunctive facets. Each facet must be properly * defined in the `facets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters excluded for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.facetsExcludes = params.facetsExcludes || {}; /** * This attribute contains all the filters that need to be * applied on the disjunctive facets. Each facet must be properly * defined in the `disjunctiveFacets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.disjunctiveFacetsRefinements = params.disjunctiveFacetsRefinements || {}; /** * This attribute contains all the filters that need to be * applied on the numeric attributes. * * The key is the name of the attribute, and the value is the * filters to apply to this attribute. * * When querying algolia, the values stored in this attribute will * be translated into the `numericFilters` attribute. * @member {Object.<string, SearchParameters.OperatorList>} */ this.numericRefinements = params.numericRefinements || {}; /** * This attribute contains all the tags used to refine the query. * * When querying algolia, the values stored in this attribute will * be translated into the `tagFilters` attribute. * @member {string[]} */ this.tagRefinements = params.tagRefinements || []; /** * This attribute contains all the filters that need to be * applied on the hierarchical facets. Each facet must be properly * defined in the `hierarchicalFacets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. The FacetList values * are structured as a string that contain the values for each level * separated by the configured separator. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.hierarchicalFacetsRefinements = params.hierarchicalFacetsRefinements || {}; var self = this; Object.keys(params).forEach(function(paramName) { var isKeyKnown = SearchParameters.PARAMETERS.indexOf(paramName) !== -1; var isValueDefined = params[paramName] !== undefined; if (!isKeyKnown && isValueDefined) { self[paramName] = params[paramName]; } }); } /** * List all the properties in SearchParameters and therefore all the known Algolia properties * This doesn't contain any beta/hidden features. * @private */ SearchParameters.PARAMETERS = Object.keys(new SearchParameters()); /** * @private * @param {object} partialState full or part of a state * @return {object} a new object with the number keys as number */ SearchParameters._parseNumbers = function(partialState) { // Do not reparse numbers in SearchParameters, they ought to be parsed already if (partialState instanceof SearchParameters) return partialState; var numbers = {}; var numberKeys = [ 'aroundPrecision', 'aroundRadius', 'getRankingInfo', 'minWordSizefor2Typos', 'minWordSizefor1Typo', 'page', 'maxValuesPerFacet', 'distinct', 'minimumAroundRadius', 'hitsPerPage', 'minProximity' ]; numberKeys.forEach(function(k) { var value = partialState[k]; if (typeof value === 'string') { var parsedValue = parseFloat(value); // global isNaN is ok to use here, value is only number or NaN numbers[k] = isNaN(parsedValue) ? value : parsedValue; } }); // there's two formats of insideBoundingBox, we need to parse // the one which is an array of float geo rectangles if (Array.isArray(partialState.insideBoundingBox)) { numbers.insideBoundingBox = partialState.insideBoundingBox.map(function(geoRect) { return geoRect.map(function(value) { return parseFloat(value); }); }); } if (partialState.numericRefinements) { var numericRefinements = {}; Object.keys(partialState.numericRefinements).forEach(function(attribute) { var operators = partialState.numericRefinements[attribute] || {}; numericRefinements[attribute] = {}; Object.keys(operators).forEach(function(operator) { var values = operators[operator]; var parsedValues = values.map(function(v) { if (Array.isArray(v)) { return v.map(function(vPrime) { if (typeof vPrime === 'string') { return parseFloat(vPrime); } return vPrime; }); } else if (typeof v === 'string') { return parseFloat(v); } return v; }); numericRefinements[attribute][operator] = parsedValues; }); }); numbers.numericRefinements = numericRefinements; } return merge_1({}, partialState, numbers); }; /** * Factory for SearchParameters * @param {object|SearchParameters} newParameters existing parameters or partial * object for the properties of a new SearchParameters * @return {SearchParameters} frozen instance of SearchParameters */ SearchParameters.make = function makeSearchParameters(newParameters) { var instance = new SearchParameters(newParameters); var hierarchicalFacets = newParameters.hierarchicalFacets || []; hierarchicalFacets.forEach(function(facet) { if (facet.rootPath) { var currentRefinement = instance.getHierarchicalRefinement(facet.name); if (currentRefinement.length > 0 && currentRefinement[0].indexOf(facet.rootPath) !== 0) { instance = instance.clearRefinements(facet.name); } // get it again in case it has been cleared currentRefinement = instance.getHierarchicalRefinement(facet.name); if (currentRefinement.length === 0) { instance = instance.toggleHierarchicalFacetRefinement(facet.name, facet.rootPath); } } }); return instance; }; /** * Validates the new parameters based on the previous state * @param {SearchParameters} currentState the current state * @param {object|SearchParameters} parameters the new parameters to set * @return {Error|null} Error if the modification is invalid, null otherwise */ SearchParameters.validate = function(currentState, parameters) { var params = parameters || {}; if (currentState.tagFilters && params.tagRefinements && params.tagRefinements.length > 0) { return new Error( '[Tags] Cannot switch from the managed tag API to the advanced API. It is probably ' + 'an error, if it is really what you want, you should first clear the tags with clearTags method.'); } if (currentState.tagRefinements.length > 0 && params.tagFilters) { return new Error( '[Tags] Cannot switch from the advanced tag API to the managed API. It is probably ' + 'an error, if it is not, you should first clear the tags with clearTags method.'); } if ( currentState.numericFilters && params.numericRefinements && objectHasKeys_1(params.numericRefinements) ) { return new Error( "[Numeric filters] Can't switch from the advanced to the managed API. It" + ' is probably an error, if this is really what you want, you have to first' + ' clear the numeric filters.' ); } if (objectHasKeys_1(currentState.numericRefinements) && params.numericFilters) { return new Error( "[Numeric filters] Can't switch from the managed API to the advanced. It" + ' is probably an error, if this is really what you want, you have to first' + ' clear the numeric filters.'); } return null; }; SearchParameters.prototype = { constructor: SearchParameters, /** * Remove all refinements (disjunctive + conjunctive + excludes + numeric filters) * @method * @param {undefined|string|SearchParameters.clearCallback} [attribute] optional string or function * - If not given, means to clear all the filters. * - If `string`, means to clear all refinements for the `attribute` named filter. * - If `function`, means to clear all the refinements that return truthy values. * @return {SearchParameters} */ clearRefinements: function clearRefinements(attribute) { var patch = { numericRefinements: this._clearNumericRefinements(attribute), facetsRefinements: RefinementList.clearRefinement( this.facetsRefinements, attribute, 'conjunctiveFacet' ), facetsExcludes: RefinementList.clearRefinement( this.facetsExcludes, attribute, 'exclude' ), disjunctiveFacetsRefinements: RefinementList.clearRefinement( this.disjunctiveFacetsRefinements, attribute, 'disjunctiveFacet' ), hierarchicalFacetsRefinements: RefinementList.clearRefinement( this.hierarchicalFacetsRefinements, attribute, 'hierarchicalFacet' ) }; if ( patch.numericRefinements === this.numericRefinements && patch.facetsRefinements === this.facetsRefinements && patch.facetsExcludes === this.facetsExcludes && patch.disjunctiveFacetsRefinements === this.disjunctiveFacetsRefinements && patch.hierarchicalFacetsRefinements === this.hierarchicalFacetsRefinements ) { return this; } return this.setQueryParameters(patch); }, /** * Remove all the refined tags from the SearchParameters * @method * @return {SearchParameters} */ clearTags: function clearTags() { if (this.tagFilters === undefined && this.tagRefinements.length === 0) return this; return this.setQueryParameters({ tagFilters: undefined, tagRefinements: [] }); }, /** * Set the index. * @method * @param {string} index the index name * @return {SearchParameters} */ setIndex: function setIndex(index) { if (index === this.index) return this; return this.setQueryParameters({ index: index }); }, /** * Query setter * @method * @param {string} newQuery value for the new query * @return {SearchParameters} */ setQuery: function setQuery(newQuery) { if (newQuery === this.query) return this; return this.setQueryParameters({ query: newQuery }); }, /** * Page setter * @method * @param {number} newPage new page number * @return {SearchParameters} */ setPage: function setPage(newPage) { if (newPage === this.page) return this; return this.setQueryParameters({ page: newPage }); }, /** * Facets setter * The facets are the simple facets, used for conjunctive (and) faceting. * @method * @param {string[]} facets all the attributes of the algolia records used for conjunctive faceting * @return {SearchParameters} */ setFacets: function setFacets(facets) { return this.setQueryParameters({ facets: facets }); }, /** * Disjunctive facets setter * Change the list of disjunctive (or) facets the helper chan handle. * @method * @param {string[]} facets all the attributes of the algolia records used for disjunctive faceting * @return {SearchParameters} */ setDisjunctiveFacets: function setDisjunctiveFacets(facets) { return this.setQueryParameters({ disjunctiveFacets: facets }); }, /** * HitsPerPage setter * Hits per page represents the number of hits retrieved for this query * @method * @param {number} n number of hits retrieved per page of results * @return {SearchParameters} */ setHitsPerPage: function setHitsPerPage(n) { if (this.hitsPerPage === n) return this; return this.setQueryParameters({ hitsPerPage: n }); }, /** * typoTolerance setter * Set the value of typoTolerance * @method * @param {string} typoTolerance new value of typoTolerance ("true", "false", "min" or "strict") * @return {SearchParameters} */ setTypoTolerance: function setTypoTolerance(typoTolerance) { if (this.typoTolerance === typoTolerance) return this; return this.setQueryParameters({ typoTolerance: typoTolerance }); }, /** * Add a numeric filter for a given attribute * When value is an array, they are combined with OR * When value is a single value, it will combined with AND * @method * @param {string} attribute attribute to set the filter on * @param {string} operator operator of the filter (possible values: =, >, >=, <, <=, !=) * @param {number | number[]} value value of the filter * @return {SearchParameters} * @example * // for price = 50 or 40 * searchparameter.addNumericRefinement('price', '=', [50, 40]); * @example * // for size = 38 and 40 * searchparameter.addNumericRefinement('size', '=', 38); * searchparameter.addNumericRefinement('size', '=', 40); */ addNumericRefinement: function(attribute, operator, v) { var value = valToNumber_1(v); if (this.isNumericRefined(attribute, operator, value)) return this; var mod = merge_1({}, this.numericRefinements); mod[attribute] = merge_1({}, mod[attribute]); if (mod[attribute][operator]) { // Array copy mod[attribute][operator] = mod[attribute][operator].slice(); // Add the element. Concat can't be used here because value can be an array. mod[attribute][operator].push(value); } else { mod[attribute][operator] = [value]; } return this.setQueryParameters({ numericRefinements: mod }); }, /** * Get the list of conjunctive refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getConjunctiveRefinements: function(facetName) { if (!this.isConjunctiveFacet(facetName)) { return []; } return this.facetsRefinements[facetName] || []; }, /** * Get the list of disjunctive refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getDisjunctiveRefinements: function(facetName) { if (!this.isDisjunctiveFacet(facetName)) { return []; } return this.disjunctiveFacetsRefinements[facetName] || []; }, /** * Get the list of hierarchical refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getHierarchicalRefinement: function(facetName) { // we send an array but we currently do not support multiple // hierarchicalRefinements for a hierarchicalFacet return this.hierarchicalFacetsRefinements[facetName] || []; }, /** * Get the list of exclude refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getExcludeRefinements: function(facetName) { if (!this.isConjunctiveFacet(facetName)) { return []; } return this.facetsExcludes[facetName] || []; }, /** * Remove all the numeric filter for a given (attribute, operator) * @method * @param {string} attribute attribute to set the filter on * @param {string} [operator] operator of the filter (possible values: =, >, >=, <, <=, !=) * @param {number} [number] the value to be removed * @return {SearchParameters} */ removeNumericRefinement: function(attribute, operator, paramValue) { if (paramValue !== undefined) { if (!this.isNumericRefined(attribute, operator, paramValue)) { return this; } return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return ( key === attribute && value.op === operator && isEqualNumericRefinement(value.val, valToNumber_1(paramValue)) ); }) }); } else if (operator !== undefined) { if (!this.isNumericRefined(attribute, operator)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute && value.op === operator; }) }); } if (!this.isNumericRefined(attribute)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute; }) }); }, /** * Get the list of numeric refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {SearchParameters.OperatorList[]} list of refinements */ getNumericRefinements: function(facetName) { return this.numericRefinements[facetName] || {}; }, /** * Return the current refinement for the (attribute, operator) * @param {string} attribute attribute in the record * @param {string} operator operator applied on the refined values * @return {Array.<number|number[]>} refined values */ getNumericRefinement: function(attribute, operator) { return this.numericRefinements[attribute] && this.numericRefinements[attribute][operator]; }, /** * Clear numeric filters. * @method * @private * @param {string|SearchParameters.clearCallback} [attribute] optional string or function * - If not given, means to clear all the filters. * - If `string`, means to clear all refinements for the `attribute` named filter. * - If `function`, means to clear all the refinements that return truthy values. * @return {Object.<string, OperatorList>} */ _clearNumericRefinements: function _clearNumericRefinements(attribute) { if (attribute === undefined) { if (!objectHasKeys_1(this.numericRefinements)) { return this.numericRefinements; } return {}; } else if (typeof attribute === 'string') { if (!objectHasKeys_1(this.numericRefinements[attribute])) { return this.numericRefinements; } return omit$1(this.numericRefinements, attribute); } else if (typeof attribute === 'function') { var hasChanged = false; var numericRefinements = this.numericRefinements; var newNumericRefinements = Object.keys(numericRefinements).reduce(function(memo, key) { var operators = numericRefinements[key]; var operatorList = {}; operators = operators || {}; Object.keys(operators).forEach(function(operator) { var values = operators[operator] || []; var outValues = []; values.forEach(function(value) { var predicateResult = attribute({val: value, op: operator}, key, 'numeric'); if (!predicateResult) outValues.push(value); }); if (outValues.length !== values.length) { hasChanged = true; } operatorList[operator] = outValues; }); memo[key] = operatorList; return memo; }, {}); if (hasChanged) return newNumericRefinements; return this.numericRefinements; } }, /** * Add a facet to the facets attribute of the helper configuration, if it * isn't already present. * @method * @param {string} facet facet name to add * @return {SearchParameters} */ addFacet: function addFacet(facet) { if (this.isConjunctiveFacet(facet)) { return this; } return this.setQueryParameters({ facets: this.facets.concat([facet]) }); }, /** * Add a disjunctive facet to the disjunctiveFacets attribute of the helper * configuration, if it isn't already present. * @method * @param {string} facet disjunctive facet name to add * @return {SearchParameters} */ addDisjunctiveFacet: function addDisjunctiveFacet(facet) { if (this.isDisjunctiveFacet(facet)) { return this; } return this.setQueryParameters({ disjunctiveFacets: this.disjunctiveFacets.concat([facet]) }); }, /** * Add a hierarchical facet to the hierarchicalFacets attribute of the helper * configuration. * @method * @param {object} hierarchicalFacet hierarchical facet to add * @return {SearchParameters} * @throws will throw an error if a hierarchical facet with the same name was already declared */ addHierarchicalFacet: function addHierarchicalFacet(hierarchicalFacet) { if (this.isHierarchicalFacet(hierarchicalFacet.name)) { throw new Error( 'Cannot declare two hierarchical facets with the same name: `' + hierarchicalFacet.name + '`'); } return this.setQueryParameters({ hierarchicalFacets: this.hierarchicalFacets.concat([hierarchicalFacet]) }); }, /** * Add a refinement on a "normal" facet * @method * @param {string} facet attribute to apply the faceting on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addFacetRefinement: function addFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this; return this.setQueryParameters({ facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value) }); }, /** * Exclude a value from a "normal" facet * @method * @param {string} facet attribute to apply the exclusion on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addExcludeRefinement: function addExcludeRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this; return this.setQueryParameters({ facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value) }); }, /** * Adds a refinement on a disjunctive facet. * @method * @param {string} facet attribute to apply the faceting on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addDisjunctiveFacetRefinement: function addDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this; return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.addRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * addTagRefinement adds a tag to the list used to filter the results * @param {string} tag tag to be added * @return {SearchParameters} */ addTagRefinement: function addTagRefinement(tag) { if (this.isTagRefined(tag)) return this; var modification = { tagRefinements: this.tagRefinements.concat(tag) }; return this.setQueryParameters(modification); }, /** * Remove a facet from the facets attribute of the helper configuration, if it * is present. * @method * @param {string} facet facet name to remove * @return {SearchParameters} */ removeFacet: function removeFacet(facet) { if (!this.isConjunctiveFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ facets: this.facets.filter(function(f) { return f !== facet; }) }); }, /** * Remove a disjunctive facet from the disjunctiveFacets attribute of the * helper configuration, if it is present. * @method * @param {string} facet disjunctive facet name to remove * @return {SearchParameters} */ removeDisjunctiveFacet: function removeDisjunctiveFacet(facet) { if (!this.isDisjunctiveFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ disjunctiveFacets: this.disjunctiveFacets.filter(function(f) { return f !== facet; }) }); }, /** * Remove a hierarchical facet from the hierarchicalFacets attribute of the * helper configuration, if it is present. * @method * @param {string} facet hierarchical facet name to remove * @return {SearchParameters} */ removeHierarchicalFacet: function removeHierarchicalFacet(facet) { if (!this.isHierarchicalFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ hierarchicalFacets: this.hierarchicalFacets.filter(function(f) { return f.name !== facet; }) }); }, /** * Remove a refinement set on facet. If a value is provided, it will clear the * refinement for the given value, otherwise it will clear all the refinement * values for the faceted attribute. * @method * @param {string} facet name of the attribute used for faceting * @param {string} [value] value used to filter * @return {SearchParameters} */ removeFacetRefinement: function removeFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this; return this.setQueryParameters({ facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value) }); }, /** * Remove a negative refinement on a facet * @method * @param {string} facet name of the attribute used for faceting * @param {string} value value used to filter * @return {SearchParameters} */ removeExcludeRefinement: function removeExcludeRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this; return this.setQueryParameters({ facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value) }); }, /** * Remove a refinement on a disjunctive facet * @method * @param {string} facet name of the attribute used for faceting * @param {string} value value used to filter * @return {SearchParameters} */ removeDisjunctiveFacetRefinement: function removeDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this; return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.removeRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * Remove a tag from the list of tag refinements * @method * @param {string} tag the tag to remove * @return {SearchParameters} */ removeTagRefinement: function removeTagRefinement(tag) { if (!this.isTagRefined(tag)) return this; var modification = { tagRefinements: this.tagRefinements.filter(function(t) { return t !== tag; }) }; return this.setQueryParameters(modification); }, /** * Generic toggle refinement method to use with facet, disjunctive facets * and hierarchical facets * @param {string} facet the facet to refine * @param {string} value the associated value * @return {SearchParameters} * @throws will throw an error if the facet is not declared in the settings of the helper * @deprecated since version 2.19.0, see {@link SearchParameters#toggleFacetRefinement} */ toggleRefinement: function toggleRefinement(facet, value) { return this.toggleFacetRefinement(facet, value); }, /** * Generic toggle refinement method to use with facet, disjunctive facets * and hierarchical facets * @param {string} facet the facet to refine * @param {string} value the associated value * @return {SearchParameters} * @throws will throw an error if the facet is not declared in the settings of the helper */ toggleFacetRefinement: function toggleFacetRefinement(facet, value) { if (this.isHierarchicalFacet(facet)) { return this.toggleHierarchicalFacetRefinement(facet, value); } else if (this.isConjunctiveFacet(facet)) { return this.toggleConjunctiveFacetRefinement(facet, value); } else if (this.isDisjunctiveFacet(facet)) { return this.toggleDisjunctiveFacetRefinement(facet, value); } throw new Error('Cannot refine the undeclared facet ' + facet + '; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets'); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleConjunctiveFacetRefinement: function toggleConjunctiveFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return this.setQueryParameters({ facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleExcludeFacetRefinement: function toggleExcludeFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return this.setQueryParameters({ facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleDisjunctiveFacetRefinement: function toggleDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.toggleRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleHierarchicalFacetRefinement: function toggleHierarchicalFacetRefinement(facet, value) { if (!this.isHierarchicalFacet(facet)) { throw new Error( facet + ' is not defined in the hierarchicalFacets attribute of the helper configuration'); } var separator = this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(facet)); var mod = {}; var upOneOrMultipleLevel = this.hierarchicalFacetsRefinements[facet] !== undefined && this.hierarchicalFacetsRefinements[facet].length > 0 && ( // remove current refinement: // refinement was 'beer > IPA', call is toggleRefine('beer > IPA'), refinement should be `beer` this.hierarchicalFacetsRefinements[facet][0] === value || // remove a parent refinement of the current refinement: // - refinement was 'beer > IPA > Flying dog' // - call is toggleRefine('beer > IPA') // - refinement should be `beer` this.hierarchicalFacetsRefinements[facet][0].indexOf(value + separator) === 0 ); if (upOneOrMultipleLevel) { if (value.indexOf(separator) === -1) { // go back to root level mod[facet] = []; } else { mod[facet] = [value.slice(0, value.lastIndexOf(separator))]; } } else { mod[facet] = [value]; } return this.setQueryParameters({ hierarchicalFacetsRefinements: defaultsPure({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Adds a refinement on a hierarchical facet. * @param {string} facet the facet name * @param {string} path the hierarchical facet path * @return {SearchParameter} the new state * @throws Error if the facet is not defined or if the facet is refined */ addHierarchicalFacetRefinement: function(facet, path) { if (this.isHierarchicalFacetRefined(facet)) { throw new Error(facet + ' is already refined.'); } if (!this.isHierarchicalFacet(facet)) { throw new Error(facet + ' is not defined in the hierarchicalFacets attribute of the helper configuration.'); } var mod = {}; mod[facet] = [path]; return this.setQueryParameters({ hierarchicalFacetsRefinements: defaultsPure({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Removes the refinement set on a hierarchical facet. * @param {string} facet the facet name * @return {SearchParameter} the new state * @throws Error if the facet is not defined or if the facet is not refined */ removeHierarchicalFacetRefinement: function(facet) { if (!this.isHierarchicalFacetRefined(facet)) { return this; } var mod = {}; mod[facet] = []; return this.setQueryParameters({ hierarchicalFacetsRefinements: defaultsPure({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Switch the tag refinement * @method * @param {string} tag the tag to remove or add * @return {SearchParameters} */ toggleTagRefinement: function toggleTagRefinement(tag) { if (this.isTagRefined(tag)) { return this.removeTagRefinement(tag); } return this.addTagRefinement(tag); }, /** * Test if the facet name is from one of the disjunctive facets * @method * @param {string} facet facet name to test * @return {boolean} */ isDisjunctiveFacet: function(facet) { return this.disjunctiveFacets.indexOf(facet) > -1; }, /** * Test if the facet name is from one of the hierarchical facets * @method * @param {string} facetName facet name to test * @return {boolean} */ isHierarchicalFacet: function(facetName) { return this.getHierarchicalFacetByName(facetName) !== undefined; }, /** * Test if the facet name is from one of the conjunctive/normal facets * @method * @param {string} facet facet name to test * @return {boolean} */ isConjunctiveFacet: function(facet) { return this.facets.indexOf(facet) > -1; }, /** * Returns true if the facet is refined, either for a specific value or in * general. * @method * @param {string} facet name of the attribute for used for faceting * @param {string} value, optional value. If passed will test that this value * is filtering the given facet. * @return {boolean} returns true if refined */ isFacetRefined: function isFacetRefined(facet, value) { if (!this.isConjunctiveFacet(facet)) { return false; } return RefinementList.isRefined(this.facetsRefinements, facet, value); }, /** * Returns true if the facet contains exclusions or if a specific value is * excluded. * * @method * @param {string} facet name of the attribute for used for faceting * @param {string} [value] optional value. If passed will test that this value * is filtering the given facet. * @return {boolean} returns true if refined */ isExcludeRefined: function isExcludeRefined(facet, value) { if (!this.isConjunctiveFacet(facet)) { return false; } return RefinementList.isRefined(this.facetsExcludes, facet, value); }, /** * Returns true if the facet contains a refinement, or if a value passed is a * refinement for the facet. * @method * @param {string} facet name of the attribute for used for faceting * @param {string} value optional, will test if the value is used for refinement * if there is one, otherwise will test if the facet contains any refinement * @return {boolean} */ isDisjunctiveFacetRefined: function isDisjunctiveFacetRefined(facet, value) { if (!this.isDisjunctiveFacet(facet)) { return false; } return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value); }, /** * Returns true if the facet contains a refinement, or if a value passed is a * refinement for the facet. * @method * @param {string} facet name of the attribute for used for faceting * @param {string} value optional, will test if the value is used for refinement * if there is one, otherwise will test if the facet contains any refinement * @return {boolean} */ isHierarchicalFacetRefined: function isHierarchicalFacetRefined(facet, value) { if (!this.isHierarchicalFacet(facet)) { return false; } var refinements = this.getHierarchicalRefinement(facet); if (!value) { return refinements.length > 0; } return refinements.indexOf(value) !== -1; }, /** * Test if the triple (attribute, operator, value) is already refined. * If only the attribute and the operator are provided, it tests if the * contains any refinement value. * @method * @param {string} attribute attribute for which the refinement is applied * @param {string} [operator] operator of the refinement * @param {string} [value] value of the refinement * @return {boolean} true if it is refined */ isNumericRefined: function isNumericRefined(attribute, operator, value) { if (value === undefined && operator === undefined) { return !!this.numericRefinements[attribute]; } var isOperatorDefined = this.numericRefinements[attribute] && this.numericRefinements[attribute][operator] !== undefined; if (value === undefined || !isOperatorDefined) { return isOperatorDefined; } var parsedValue = valToNumber_1(value); var isAttributeValueDefined = findArray(this.numericRefinements[attribute][operator], parsedValue) !== undefined; return isOperatorDefined && isAttributeValueDefined; }, /** * Returns true if the tag refined, false otherwise * @method * @param {string} tag the tag to check * @return {boolean} */ isTagRefined: function isTagRefined(tag) { return this.tagRefinements.indexOf(tag) !== -1; }, /** * Returns the list of all disjunctive facets refined * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {string[]} */ getRefinedDisjunctiveFacets: function getRefinedDisjunctiveFacets() { var self = this; // attributes used for numeric filter can also be disjunctive var disjunctiveNumericRefinedFacets = intersection_1( Object.keys(this.numericRefinements).filter(function(facet) { return Object.keys(self.numericRefinements[facet]).length > 0; }), this.disjunctiveFacets ); return Object.keys(this.disjunctiveFacetsRefinements).filter(function(facet) { return self.disjunctiveFacetsRefinements[facet].length > 0; }) .concat(disjunctiveNumericRefinedFacets) .concat(this.getRefinedHierarchicalFacets()); }, /** * Returns the list of all disjunctive facets refined * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {string[]} */ getRefinedHierarchicalFacets: function getRefinedHierarchicalFacets() { var self = this; return intersection_1( // enforce the order between the two arrays, // so that refinement name index === hierarchical facet index this.hierarchicalFacets.map(function(facet) { return facet.name; }), Object.keys(this.hierarchicalFacetsRefinements).filter(function(facet) { return self.hierarchicalFacetsRefinements[facet].length > 0; }) ); }, /** * Returned the list of all disjunctive facets not refined * @method * @return {string[]} */ getUnrefinedDisjunctiveFacets: function() { var refinedFacets = this.getRefinedDisjunctiveFacets(); return this.disjunctiveFacets.filter(function(f) { return refinedFacets.indexOf(f) === -1; }); }, managedParameters: [ 'index', 'facets', 'disjunctiveFacets', 'facetsRefinements', 'facetsExcludes', 'disjunctiveFacetsRefinements', 'numericRefinements', 'tagRefinements', 'hierarchicalFacets', 'hierarchicalFacetsRefinements' ], getQueryParams: function getQueryParams() { var managedParameters = this.managedParameters; var queryParams = {}; var self = this; Object.keys(this).forEach(function(paramName) { var paramValue = self[paramName]; if (managedParameters.indexOf(paramName) === -1 && paramValue !== undefined) { queryParams[paramName] = paramValue; } }); return queryParams; }, /** * Let the user set a specific value for a given parameter. Will return the * same instance if the parameter is invalid or if the value is the same as the * previous one. * @method * @param {string} parameter the parameter name * @param {any} value the value to be set, must be compliant with the definition * of the attribute on the object * @return {SearchParameters} the updated state */ setQueryParameter: function setParameter(parameter, value) { if (this[parameter] === value) return this; var modification = {}; modification[parameter] = value; return this.setQueryParameters(modification); }, /** * Let the user set any of the parameters with a plain object. * @method * @param {object} params all the keys and the values to be updated * @return {SearchParameters} a new updated instance */ setQueryParameters: function setQueryParameters(params) { if (!params) return this; var error = SearchParameters.validate(this, params); if (error) { throw error; } var self = this; var nextWithNumbers = SearchParameters._parseNumbers(params); var previousPlainObject = Object.keys(this).reduce(function(acc, key) { acc[key] = self[key]; return acc; }, {}); var nextPlainObject = Object.keys(nextWithNumbers).reduce( function(previous, key) { var isPreviousValueDefined = previous[key] !== undefined; var isNextValueDefined = nextWithNumbers[key] !== undefined; if (isPreviousValueDefined && !isNextValueDefined) { return omit$1(previous, [key]); } if (isNextValueDefined) { previous[key] = nextWithNumbers[key]; } return previous; }, previousPlainObject ); return new this.constructor(nextPlainObject); }, /** * Returns a new instance with the page reset. Two scenarios possible: * the page is omitted -> return the given instance * the page is set -> return a new instance with a page of 0 * @return {SearchParameters} a new updated instance */ resetPage: function() { if (this.page === undefined) { return this; } return this.setPage(0); }, /** * Helper function to get the hierarchicalFacet separator or the default one (`>`) * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.separator or `>` as default */ _getHierarchicalFacetSortBy: function(hierarchicalFacet) { return hierarchicalFacet.sortBy || ['isRefined:desc', 'name:asc']; }, /** * Helper function to get the hierarchicalFacet separator or the default one (`>`) * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.separator or `>` as default */ _getHierarchicalFacetSeparator: function(hierarchicalFacet) { return hierarchicalFacet.separator || ' > '; }, /** * Helper function to get the hierarchicalFacet prefix path or null * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.rootPath or null as default */ _getHierarchicalRootPath: function(hierarchicalFacet) { return hierarchicalFacet.rootPath || null; }, /** * Helper function to check if we show the parent level of the hierarchicalFacet * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.showParentLevel or true as default */ _getHierarchicalShowParentLevel: function(hierarchicalFacet) { if (typeof hierarchicalFacet.showParentLevel === 'boolean') { return hierarchicalFacet.showParentLevel; } return true; }, /** * Helper function to get the hierarchicalFacet by it's name * @param {string} hierarchicalFacetName * @return {object} a hierarchicalFacet */ getHierarchicalFacetByName: function(hierarchicalFacetName) { return find$1( this.hierarchicalFacets, function(f) { return f.name === hierarchicalFacetName; } ); }, /** * Get the current breadcrumb for a hierarchical facet, as an array * @param {string} facetName Hierarchical facet name * @return {array.<string>} the path as an array of string */ getHierarchicalFacetBreadcrumb: function(facetName) { if (!this.isHierarchicalFacet(facetName)) { return []; } var refinement = this.getHierarchicalRefinement(facetName)[0]; if (!refinement) return []; var separator = this._getHierarchicalFacetSeparator( this.getHierarchicalFacetByName(facetName) ); var path = refinement.split(separator); return path.map(function(part) { return part.trim(); }); }, toString: function() { return JSON.stringify(this, null, 2); } }; /** * Callback used for clearRefinement method * @callback SearchParameters.clearCallback * @param {OperatorList|FacetList} value the value of the filter * @param {string} key the current attribute name * @param {string} type `numeric`, `disjunctiveFacet`, `conjunctiveFacet`, `hierarchicalFacet` or `exclude` * depending on the type of facet * @return {boolean} `true` if the element should be removed. `false` otherwise. */ var SearchParameters_1 = SearchParameters; function compareAscending(value, other) { if (value !== other) { var valIsDefined = value !== undefined; var valIsNull = value === null; var othIsDefined = other !== undefined; var othIsNull = other === null; if ( (!othIsNull && value > other) || (valIsNull && othIsDefined) || !valIsDefined ) { return 1; } if ( (!valIsNull && value < other) || (othIsNull && valIsDefined) || !othIsDefined ) { return -1; } } return 0; } /** * @param {Array<object>} collection object with keys in attributes * @param {Array<string>} iteratees attributes * @param {Array<string>} orders asc | desc */ function orderBy(collection, iteratees, orders) { if (!Array.isArray(collection)) { return []; } if (!Array.isArray(orders)) { orders = []; } var result = collection.map(function(value, index) { return { criteria: iteratees.map(function(iteratee) { return value[iteratee]; }), index: index, value: value }; }); result.sort(function comparer(object, other) { var index = -1; while (++index < object.criteria.length) { var res = compareAscending(object.criteria[index], other.criteria[index]); if (res) { if (index >= orders.length) { return res; } if (orders[index] === 'desc') { return -res; } return res; } } // This ensures a stable sort in V8 and other engines. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. return object.index - other.index; }); return result.map(function(res) { return res.value; }); } var orderBy_1 = orderBy; var compact = function compact(array) { if (!Array.isArray(array)) { return []; } return array.filter(Boolean); }; // @MAJOR can be replaced by native Array#findIndex when we change support var findIndex = function find(array, comparator) { if (!Array.isArray(array)) { return -1; } for (var i = 0; i < array.length; i++) { if (comparator(array[i])) { return i; } } return -1; }; /** * Transform sort format from user friendly notation to lodash format * @param {string[]} sortBy array of predicate of the form "attribute:order" * @param {string[]} [defaults] array of predicate of the form "attribute:order" * @return {array.<string[]>} array containing 2 elements : attributes, orders */ var formatSort = function formatSort(sortBy, defaults) { var defaultInstructions = (defaults || []).map(function(sort) { return sort.split(':'); }); return sortBy.reduce( function preparePredicate(out, sort) { var sortInstruction = sort.split(':'); var matchingDefault = find$1(defaultInstructions, function( defaultInstruction ) { return defaultInstruction[0] === sortInstruction[0]; }); if (sortInstruction.length > 1 || !matchingDefault) { out[0].push(sortInstruction[0]); out[1].push(sortInstruction[1]); return out; } out[0].push(matchingDefault[0]); out[1].push(matchingDefault[1]); return out; }, [[], []] ); }; var generateHierarchicalTree_1 = generateTrees; function generateTrees(state) { return function generate(hierarchicalFacetResult, hierarchicalFacetIndex) { var hierarchicalFacet = state.hierarchicalFacets[hierarchicalFacetIndex]; var hierarchicalFacetRefinement = (state.hierarchicalFacetsRefinements[hierarchicalFacet.name] && state.hierarchicalFacetsRefinements[hierarchicalFacet.name][0]) || ''; var hierarchicalSeparator = state._getHierarchicalFacetSeparator( hierarchicalFacet ); var hierarchicalRootPath = state._getHierarchicalRootPath( hierarchicalFacet ); var hierarchicalShowParentLevel = state._getHierarchicalShowParentLevel( hierarchicalFacet ); var sortBy = formatSort( state._getHierarchicalFacetSortBy(hierarchicalFacet) ); var rootExhaustive = hierarchicalFacetResult.every(function(facetResult) { return facetResult.exhaustive; }); var generateTreeFn = generateHierarchicalTree( sortBy, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel, hierarchicalFacetRefinement ); var results = hierarchicalFacetResult; if (hierarchicalRootPath) { results = hierarchicalFacetResult.slice( hierarchicalRootPath.split(hierarchicalSeparator).length ); } return results.reduce(generateTreeFn, { name: state.hierarchicalFacets[hierarchicalFacetIndex].name, count: null, // root level, no count isRefined: true, // root level, always refined path: null, // root level, no path exhaustive: rootExhaustive, data: null }); }; } function generateHierarchicalTree( sortBy, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel, currentRefinement ) { return function generateTree( hierarchicalTree, hierarchicalFacetResult, currentHierarchicalLevel ) { var parent = hierarchicalTree; if (currentHierarchicalLevel > 0) { var level = 0; parent = hierarchicalTree; while (level < currentHierarchicalLevel) { /** * @type {object[]]} hierarchical data */ var data = parent && Array.isArray(parent.data) ? parent.data : []; parent = find$1(data, function(subtree) { return subtree.isRefined; }); level++; } } // we found a refined parent, let's add current level data under it if (parent) { // filter values in case an object has multiple categories: // { // categories: { // level0: ['beers', 'bières'], // level1: ['beers > IPA', 'bières > Belges'] // } // } // // If parent refinement is `beers`, then we do not want to have `bières > Belges` // showing up var picked = Object.keys(hierarchicalFacetResult.data) .map(function(facetValue) { return [facetValue, hierarchicalFacetResult.data[facetValue]]; }) .filter(function(tuple) { var facetValue = tuple[0]; return onlyMatchingTree( facetValue, parent.path || hierarchicalRootPath, currentRefinement, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel ); }); parent.data = orderBy_1( picked.map(function(tuple) { var facetValue = tuple[0]; var facetCount = tuple[1]; return format( facetCount, facetValue, hierarchicalSeparator, currentRefinement, hierarchicalFacetResult.exhaustive ); }), sortBy[0], sortBy[1] ); } return hierarchicalTree; }; } function onlyMatchingTree( facetValue, parentPath, currentRefinement, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel ) { // we want the facetValue is a child of hierarchicalRootPath if ( hierarchicalRootPath && (facetValue.indexOf(hierarchicalRootPath) !== 0 || hierarchicalRootPath === facetValue) ) { return false; } // we always want root levels (only when there is no prefix path) return ( (!hierarchicalRootPath && facetValue.indexOf(hierarchicalSeparator) === -1) || // if there is a rootPath, being root level mean 1 level under rootPath (hierarchicalRootPath && facetValue.split(hierarchicalSeparator).length - hierarchicalRootPath.split(hierarchicalSeparator).length === 1) || // if current refinement is a root level and current facetValue is a root level, // keep the facetValue (facetValue.indexOf(hierarchicalSeparator) === -1 && currentRefinement.indexOf(hierarchicalSeparator) === -1) || // currentRefinement is a child of the facet value currentRefinement.indexOf(facetValue) === 0 || // facetValue is a child of the current parent, add it (facetValue.indexOf(parentPath + hierarchicalSeparator) === 0 && (hierarchicalShowParentLevel || facetValue.indexOf(currentRefinement) === 0)) ); } function format( facetCount, facetValue, hierarchicalSeparator, currentRefinement, exhaustive ) { var parts = facetValue.split(hierarchicalSeparator); return { name: parts[parts.length - 1].trim(), path: facetValue, count: facetCount, isRefined: currentRefinement === facetValue || currentRefinement.indexOf(facetValue + hierarchicalSeparator) === 0, exhaustive: exhaustive, data: null }; } /** * @typedef SearchResults.Facet * @type {object} * @property {string} name name of the attribute in the record * @property {object} data the faceting data: value, number of entries * @property {object} stats undefined unless facet_stats is retrieved from algolia */ /** * @typedef SearchResults.HierarchicalFacet * @type {object} * @property {string} name name of the current value given the hierarchical level, trimmed. * If root node, you get the facet name * @property {number} count number of objects matching this hierarchical value * @property {string} path the current hierarchical value full path * @property {boolean} isRefined `true` if the current value was refined, `false` otherwise * @property {HierarchicalFacet[]} data sub values for the current level */ /** * @typedef SearchResults.FacetValue * @type {object} * @property {string} name the facet value itself * @property {number} count times this facet appears in the results * @property {boolean} isRefined is the facet currently selected * @property {boolean} isExcluded is the facet currently excluded (only for conjunctive facets) */ /** * @typedef Refinement * @type {object} * @property {string} type the type of filter used: * `numeric`, `facet`, `exclude`, `disjunctive`, `hierarchical` * @property {string} attributeName name of the attribute used for filtering * @property {string} name the value of the filter * @property {number} numericValue the value as a number. Only for numeric filters. * @property {string} operator the operator used. Only for numeric filters. * @property {number} count the number of computed hits for this filter. Only on facets. * @property {boolean} exhaustive if the count is exhaustive */ /** * @param {string[]} attributes */ function getIndices(attributes) { var indices = {}; attributes.forEach(function(val, idx) { indices[val] = idx; }); return indices; } function assignFacetStats(dest, facetStats, key) { if (facetStats && facetStats[key]) { dest.stats = facetStats[key]; } } /** * @typedef {Object} HierarchicalFacet * @property {string} name * @property {string[]} attributes */ /** * @param {HierarchicalFacet[]} hierarchicalFacets * @param {string} hierarchicalAttributeName */ function findMatchingHierarchicalFacetFromAttributeName( hierarchicalFacets, hierarchicalAttributeName ) { return find$1(hierarchicalFacets, function facetKeyMatchesAttribute( hierarchicalFacet ) { var facetNames = hierarchicalFacet.attributes || []; return facetNames.indexOf(hierarchicalAttributeName) > -1; }); } /*eslint-disable */ /** * Constructor for SearchResults * @class * @classdesc SearchResults contains the results of a query to Algolia using the * {@link AlgoliaSearchHelper}. * @param {SearchParameters} state state that led to the response * @param {array.<object>} results the results from algolia client * @example <caption>SearchResults of the first query in * <a href="http://demos.algolia.com/instant-search-demo">the instant search demo</a></caption> { "hitsPerPage": 10, "processingTimeMS": 2, "facets": [ { "name": "type", "data": { "HardGood": 6627, "BlackTie": 550, "Music": 665, "Software": 131, "Game": 456, "Movie": 1571 }, "exhaustive": false }, { "exhaustive": false, "data": { "Free shipping": 5507 }, "name": "shipping" } ], "hits": [ { "thumbnailImage": "http://img.bbystatic.com/BestBuy_US/images/products/1688/1688832_54x108_s.gif", "_highlightResult": { "shortDescription": { "matchLevel": "none", "value": "Safeguard your PC, Mac, Android and iOS devices with comprehensive Internet protection", "matchedWords": [] }, "category": { "matchLevel": "none", "value": "Computer Security Software", "matchedWords": [] }, "manufacturer": { "matchedWords": [], "value": "Webroot", "matchLevel": "none" }, "name": { "value": "Webroot SecureAnywhere Internet Security (3-Device) (1-Year Subscription) - Mac/Windows", "matchedWords": [], "matchLevel": "none" } }, "image": "http://img.bbystatic.com/BestBuy_US/images/products/1688/1688832_105x210_sc.jpg", "shipping": "Free shipping", "bestSellingRank": 4, "shortDescription": "Safeguard your PC, Mac, Android and iOS devices with comprehensive Internet protection", "url": "http://www.bestbuy.com/site/webroot-secureanywhere-internet-security-3-devi…d=1219060687969&skuId=1688832&cmp=RMX&ky=2d3GfEmNIzjA0vkzveHdZEBgpPCyMnLTJ", "name": "Webroot SecureAnywhere Internet Security (3-Device) (1-Year Subscription) - Mac/Windows", "category": "Computer Security Software", "salePrice_range": "1 - 50", "objectID": "1688832", "type": "Software", "customerReviewCount": 5980, "salePrice": 49.99, "manufacturer": "Webroot" }, .... ], "nbHits": 10000, "disjunctiveFacets": [ { "exhaustive": false, "data": { "5": 183, "12": 112, "7": 149, ... }, "name": "customerReviewCount", "stats": { "max": 7461, "avg": 157.939, "min": 1 } }, { "data": { "Printer Ink": 142, "Wireless Speakers": 60, "Point & Shoot Cameras": 48, ... }, "name": "category", "exhaustive": false }, { "exhaustive": false, "data": { "> 5000": 2, "1 - 50": 6524, "501 - 2000": 566, "201 - 500": 1501, "101 - 200": 1360, "2001 - 5000": 47 }, "name": "salePrice_range" }, { "data": { "Dynex™": 202, "Insignia™": 230, "PNY": 72, ... }, "name": "manufacturer", "exhaustive": false } ], "query": "", "nbPages": 100, "page": 0, "index": "bestbuy" } **/ /*eslint-enable */ function SearchResults(state, results) { var mainSubResponse = results[0]; this._rawResults = results; /** * query used to generate the results * @member {string} */ this.query = mainSubResponse.query; /** * The query as parsed by the engine given all the rules. * @member {string} */ this.parsedQuery = mainSubResponse.parsedQuery; /** * all the records that match the search parameters. Each record is * augmented with a new attribute `_highlightResult` * which is an object keyed by attribute and with the following properties: * - `value` : the value of the facet highlighted (html) * - `matchLevel`: full, partial or none depending on how the query terms match * @member {object[]} */ this.hits = mainSubResponse.hits; /** * index where the results come from * @member {string} */ this.index = mainSubResponse.index; /** * number of hits per page requested * @member {number} */ this.hitsPerPage = mainSubResponse.hitsPerPage; /** * total number of hits of this query on the index * @member {number} */ this.nbHits = mainSubResponse.nbHits; /** * total number of pages with respect to the number of hits per page and the total number of hits * @member {number} */ this.nbPages = mainSubResponse.nbPages; /** * current page * @member {number} */ this.page = mainSubResponse.page; /** * sum of the processing time of all the queries * @member {number} */ this.processingTimeMS = results.reduce(function(sum, result) { return result.processingTimeMS === undefined ? sum : sum + result.processingTimeMS; }, 0); /** * The position if the position was guessed by IP. * @member {string} * @example "48.8637,2.3615", */ this.aroundLatLng = mainSubResponse.aroundLatLng; /** * The radius computed by Algolia. * @member {string} * @example "126792922", */ this.automaticRadius = mainSubResponse.automaticRadius; /** * String identifying the server used to serve this request. * * getRankingInfo needs to be set to `true` for this to be returned * * @member {string} * @example "c7-use-2.algolia.net", */ this.serverUsed = mainSubResponse.serverUsed; /** * Boolean that indicates if the computation of the counts did time out. * @deprecated * @member {boolean} */ this.timeoutCounts = mainSubResponse.timeoutCounts; /** * Boolean that indicates if the computation of the hits did time out. * @deprecated * @member {boolean} */ this.timeoutHits = mainSubResponse.timeoutHits; /** * True if the counts of the facets is exhaustive * @member {boolean} */ this.exhaustiveFacetsCount = mainSubResponse.exhaustiveFacetsCount; /** * True if the number of hits is exhaustive * @member {boolean} */ this.exhaustiveNbHits = mainSubResponse.exhaustiveNbHits; /** * Contains the userData if they are set by a [query rule](https://www.algolia.com/doc/guides/query-rules/query-rules-overview/). * @member {object[]} */ this.userData = mainSubResponse.userData; /** * queryID is the unique identifier of the query used to generate the current search results. * This value is only available if the `clickAnalytics` search parameter is set to `true`. * @member {string} */ this.queryID = mainSubResponse.queryID; /** * disjunctive facets results * @member {SearchResults.Facet[]} */ this.disjunctiveFacets = []; /** * disjunctive facets results * @member {SearchResults.HierarchicalFacet[]} */ this.hierarchicalFacets = state.hierarchicalFacets.map(function initFutureTree() { return []; }); /** * other facets results * @member {SearchResults.Facet[]} */ this.facets = []; var disjunctiveFacets = state.getRefinedDisjunctiveFacets(); var facetsIndices = getIndices(state.facets); var disjunctiveFacetsIndices = getIndices(state.disjunctiveFacets); var nextDisjunctiveResult = 1; var self = this; // Since we send request only for disjunctive facets that have been refined, // we get the facets information from the first, general, response. var mainFacets = mainSubResponse.facets || {}; Object.keys(mainFacets).forEach(function(facetKey) { var facetValueObject = mainFacets[facetKey]; var hierarchicalFacet = findMatchingHierarchicalFacetFromAttributeName( state.hierarchicalFacets, facetKey ); if (hierarchicalFacet) { // Place the hierarchicalFacet data at the correct index depending on // the attributes order that was defined at the helper initialization var facetIndex = hierarchicalFacet.attributes.indexOf(facetKey); var idxAttributeName = findIndex(state.hierarchicalFacets, function(f) { return f.name === hierarchicalFacet.name; }); self.hierarchicalFacets[idxAttributeName][facetIndex] = { attribute: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; } else { var isFacetDisjunctive = state.disjunctiveFacets.indexOf(facetKey) !== -1; var isFacetConjunctive = state.facets.indexOf(facetKey) !== -1; var position; if (isFacetDisjunctive) { position = disjunctiveFacetsIndices[facetKey]; self.disjunctiveFacets[position] = { name: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; assignFacetStats(self.disjunctiveFacets[position], mainSubResponse.facets_stats, facetKey); } if (isFacetConjunctive) { position = facetsIndices[facetKey]; self.facets[position] = { name: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; assignFacetStats(self.facets[position], mainSubResponse.facets_stats, facetKey); } } }); // Make sure we do not keep holes within the hierarchical facets this.hierarchicalFacets = compact(this.hierarchicalFacets); // aggregate the refined disjunctive facets disjunctiveFacets.forEach(function(disjunctiveFacet) { var result = results[nextDisjunctiveResult]; var facets = result && result.facets ? result.facets : {}; var hierarchicalFacet = state.getHierarchicalFacetByName(disjunctiveFacet); // There should be only item in facets. Object.keys(facets).forEach(function(dfacet) { var facetResults = facets[dfacet]; var position; if (hierarchicalFacet) { position = findIndex(state.hierarchicalFacets, function(f) { return f.name === hierarchicalFacet.name; }); var attributeIndex = findIndex(self.hierarchicalFacets[position], function(f) { return f.attribute === dfacet; }); // previous refinements and no results so not able to find it if (attributeIndex === -1) { return; } self.hierarchicalFacets[position][attributeIndex].data = merge_1( {}, self.hierarchicalFacets[position][attributeIndex].data, facetResults ); } else { position = disjunctiveFacetsIndices[dfacet]; var dataFromMainRequest = mainSubResponse.facets && mainSubResponse.facets[dfacet] || {}; self.disjunctiveFacets[position] = { name: dfacet, data: defaultsPure({}, facetResults, dataFromMainRequest), exhaustive: result.exhaustiveFacetsCount }; assignFacetStats(self.disjunctiveFacets[position], result.facets_stats, dfacet); if (state.disjunctiveFacetsRefinements[dfacet]) { state.disjunctiveFacetsRefinements[dfacet].forEach(function(refinementValue) { // add the disjunctive refinements if it is no more retrieved if (!self.disjunctiveFacets[position].data[refinementValue] && state.disjunctiveFacetsRefinements[dfacet].indexOf(refinementValue) > -1) { self.disjunctiveFacets[position].data[refinementValue] = 0; } }); } } }); nextDisjunctiveResult++; }); // if we have some root level values for hierarchical facets, merge them state.getRefinedHierarchicalFacets().forEach(function(refinedFacet) { var hierarchicalFacet = state.getHierarchicalFacetByName(refinedFacet); var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var currentRefinement = state.getHierarchicalRefinement(refinedFacet); // if we are already at a root refinement (or no refinement at all), there is no // root level values request if (currentRefinement.length === 0 || currentRefinement[0].split(separator).length < 2) { return; } var result = results[nextDisjunctiveResult]; var facets = result && result.facets ? result.facets : {}; Object.keys(facets).forEach(function(dfacet) { var facetResults = facets[dfacet]; var position = findIndex(state.hierarchicalFacets, function(f) { return f.name === hierarchicalFacet.name; }); var attributeIndex = findIndex(self.hierarchicalFacets[position], function(f) { return f.attribute === dfacet; }); // previous refinements and no results so not able to find it if (attributeIndex === -1) { return; } // when we always get root levels, if the hits refinement is `beers > IPA` (count: 5), // then the disjunctive values will be `beers` (count: 100), // but we do not want to display // | beers (100) // > IPA (5) // We want // | beers (5) // > IPA (5) var defaultData = {}; if (currentRefinement.length > 0) { var root = currentRefinement[0].split(separator)[0]; defaultData[root] = self.hierarchicalFacets[position][attributeIndex].data[root]; } self.hierarchicalFacets[position][attributeIndex].data = defaultsPure( defaultData, facetResults, self.hierarchicalFacets[position][attributeIndex].data ); }); nextDisjunctiveResult++; }); // add the excludes Object.keys(state.facetsExcludes).forEach(function(facetName) { var excludes = state.facetsExcludes[facetName]; var position = facetsIndices[facetName]; self.facets[position] = { name: facetName, data: mainSubResponse.facets[facetName], exhaustive: mainSubResponse.exhaustiveFacetsCount }; excludes.forEach(function(facetValue) { self.facets[position] = self.facets[position] || {name: facetName}; self.facets[position].data = self.facets[position].data || {}; self.facets[position].data[facetValue] = 0; }); }); /** * @type {Array} */ this.hierarchicalFacets = this.hierarchicalFacets.map(generateHierarchicalTree_1(state)); /** * @type {Array} */ this.facets = compact(this.facets); /** * @type {Array} */ this.disjunctiveFacets = compact(this.disjunctiveFacets); this._state = state; } /** * Get a facet object with its name * @deprecated * @param {string} name name of the faceted attribute * @return {SearchResults.Facet} the facet object */ SearchResults.prototype.getFacetByName = function(name) { function predicate(facet) { return facet.name === name; } return find$1(this.facets, predicate) || find$1(this.disjunctiveFacets, predicate) || find$1(this.hierarchicalFacets, predicate); }; /** * Get the facet values of a specified attribute from a SearchResults object. * @private * @param {SearchResults} results the search results to search in * @param {string} attribute name of the faceted attribute to search for * @return {array|object} facet values. For the hierarchical facets it is an object. */ function extractNormalizedFacetValues(results, attribute) { function predicate(facet) { return facet.name === attribute; } if (results._state.isConjunctiveFacet(attribute)) { var facet = find$1(results.facets, predicate); if (!facet) return []; return Object.keys(facet.data).map(function(name) { return { name: name, count: facet.data[name], isRefined: results._state.isFacetRefined(attribute, name), isExcluded: results._state.isExcludeRefined(attribute, name) }; }); } else if (results._state.isDisjunctiveFacet(attribute)) { var disjunctiveFacet = find$1(results.disjunctiveFacets, predicate); if (!disjunctiveFacet) return []; return Object.keys(disjunctiveFacet.data).map(function(name) { return { name: name, count: disjunctiveFacet.data[name], isRefined: results._state.isDisjunctiveFacetRefined(attribute, name) }; }); } else if (results._state.isHierarchicalFacet(attribute)) { return find$1(results.hierarchicalFacets, predicate); } } /** * Sort nodes of a hierarchical facet results * @private * @param {HierarchicalFacet} node node to upon which we want to apply the sort */ function recSort(sortFn, node) { if (!node.data || node.data.length === 0) { return node; } var children = node.data.map(function(childNode) { return recSort(sortFn, childNode); }); var sortedChildren = sortFn(children); var newNode = merge_1({}, node, {data: sortedChildren}); return newNode; } SearchResults.DEFAULT_SORT = ['isRefined:desc', 'count:desc', 'name:asc']; function vanillaSortFn(order, data) { return data.sort(order); } /** * Get a the list of values for a given facet attribute. Those values are sorted * refinement first, descending count (bigger value on top), and name ascending * (alphabetical order). The sort formula can overridden using either string based * predicates or a function. * * This method will return all the values returned by the Algolia engine plus all * the values already refined. This means that it can happen that the * `maxValuesPerFacet` [configuration](https://www.algolia.com/doc/rest-api/search#param-maxValuesPerFacet) * might not be respected if you have facet values that are already refined. * @param {string} attribute attribute name * @param {object} opts configuration options. * @param {Array.<string> | function} opts.sortBy * When using strings, it consists of * the name of the [FacetValue](#SearchResults.FacetValue) or the * [HierarchicalFacet](#SearchResults.HierarchicalFacet) attributes with the * order (`asc` or `desc`). For example to order the value by count, the * argument would be `['count:asc']`. * * If only the attribute name is specified, the ordering defaults to the one * specified in the default value for this attribute. * * When not specified, the order is * ascending. This parameter can also be a function which takes two facet * values and should return a number, 0 if equal, 1 if the first argument is * bigger or -1 otherwise. * * The default value for this attribute `['isRefined:desc', 'count:desc', 'name:asc']` * @return {FacetValue[]|HierarchicalFacet|undefined} depending on the type of facet of * the attribute requested (hierarchical, disjunctive or conjunctive) * @example * helper.on('result', function(event){ * //get values ordered only by name ascending using the string predicate * event.results.getFacetValues('city', {sortBy: ['name:asc']}); * //get values ordered only by count ascending using a function * event.results.getFacetValues('city', { * // this is equivalent to ['count:asc'] * sortBy: function(a, b) { * if (a.count === b.count) return 0; * if (a.count > b.count) return 1; * if (b.count > a.count) return -1; * } * }); * }); */ SearchResults.prototype.getFacetValues = function(attribute, opts) { var facetValues = extractNormalizedFacetValues(this, attribute); if (!facetValues) { return undefined; } var options = defaultsPure({}, opts, {sortBy: SearchResults.DEFAULT_SORT}); if (Array.isArray(options.sortBy)) { var order = formatSort(options.sortBy, SearchResults.DEFAULT_SORT); if (Array.isArray(facetValues)) { return orderBy_1(facetValues, order[0], order[1]); } // If facetValues is not an array, it's an object thus a hierarchical facet object return recSort(function(hierarchicalFacetValues) { return orderBy_1(hierarchicalFacetValues, order[0], order[1]); }, facetValues); } else if (typeof options.sortBy === 'function') { if (Array.isArray(facetValues)) { return facetValues.sort(options.sortBy); } // If facetValues is not an array, it's an object thus a hierarchical facet object return recSort(function(data) { return vanillaSortFn(options.sortBy, data); }, facetValues); } throw new Error( 'options.sortBy is optional but if defined it must be ' + 'either an array of string (predicates) or a sorting function' ); }; /** * Returns the facet stats if attribute is defined and the facet contains some. * Otherwise returns undefined. * @param {string} attribute name of the faceted attribute * @return {object} The stats of the facet */ SearchResults.prototype.getFacetStats = function(attribute) { if (this._state.isConjunctiveFacet(attribute)) { return getFacetStatsIfAvailable(this.facets, attribute); } else if (this._state.isDisjunctiveFacet(attribute)) { return getFacetStatsIfAvailable(this.disjunctiveFacets, attribute); } return undefined; }; /** * @typedef {Object} FacetListItem * @property {string} name */ /** * @param {FacetListItem[]} facetList (has more items, but enough for here) * @param {string} facetName */ function getFacetStatsIfAvailable(facetList, facetName) { var data = find$1(facetList, function(facet) { return facet.name === facetName; }); return data && data.stats; } /** * Returns all refinements for all filters + tags. It also provides * additional information: count and exhaustiveness for each filter. * * See the [refinement type](#Refinement) for an exhaustive view of the available * data. * * Note that for a numeric refinement, results are grouped per operator, this * means that it will return responses for operators which are empty. * * @return {Array.<Refinement>} all the refinements */ SearchResults.prototype.getRefinements = function() { var state = this._state; var results = this; var res = []; Object.keys(state.facetsRefinements).forEach(function(attributeName) { state.facetsRefinements[attributeName].forEach(function(name) { res.push(getRefinement(state, 'facet', attributeName, name, results.facets)); }); }); Object.keys(state.facetsExcludes).forEach(function(attributeName) { state.facetsExcludes[attributeName].forEach(function(name) { res.push(getRefinement(state, 'exclude', attributeName, name, results.facets)); }); }); Object.keys(state.disjunctiveFacetsRefinements).forEach(function(attributeName) { state.disjunctiveFacetsRefinements[attributeName].forEach(function(name) { res.push(getRefinement(state, 'disjunctive', attributeName, name, results.disjunctiveFacets)); }); }); Object.keys(state.hierarchicalFacetsRefinements).forEach(function(attributeName) { state.hierarchicalFacetsRefinements[attributeName].forEach(function(name) { res.push(getHierarchicalRefinement(state, attributeName, name, results.hierarchicalFacets)); }); }); Object.keys(state.numericRefinements).forEach(function(attributeName) { var operators = state.numericRefinements[attributeName]; Object.keys(operators).forEach(function(operator) { operators[operator].forEach(function(value) { res.push({ type: 'numeric', attributeName: attributeName, name: value, numericValue: value, operator: operator }); }); }); }); state.tagRefinements.forEach(function(name) { res.push({type: 'tag', attributeName: '_tags', name: name}); }); return res; }; /** * @typedef {Object} Facet * @property {string} name * @property {Object} data * @property {boolean} exhaustive */ /** * @param {*} state * @param {*} type * @param {string} attributeName * @param {*} name * @param {Facet[]} resultsFacets */ function getRefinement(state, type, attributeName, name, resultsFacets) { var facet = find$1(resultsFacets, function(f) { return f.name === attributeName; }); var count = facet && facet.data && facet.data[name] ? facet.data[name] : 0; var exhaustive = (facet && facet.exhaustive) || false; return { type: type, attributeName: attributeName, name: name, count: count, exhaustive: exhaustive }; } /** * @param {*} state * @param {string} attributeName * @param {*} name * @param {Facet[]} resultsFacets */ function getHierarchicalRefinement(state, attributeName, name, resultsFacets) { var facetDeclaration = state.getHierarchicalFacetByName(attributeName); var separator = state._getHierarchicalFacetSeparator(facetDeclaration); var split = name.split(separator); var rootFacet = find$1(resultsFacets, function(facet) { return facet.name === attributeName; }); var facet = split.reduce(function(intermediateFacet, part) { var newFacet = intermediateFacet && find$1(intermediateFacet.data, function(f) { return f.name === part; }); return newFacet !== undefined ? newFacet : intermediateFacet; }, rootFacet); var count = (facet && facet.count) || 0; var exhaustive = (facet && facet.exhaustive) || false; var path = (facet && facet.path) || ''; return { type: 'hierarchical', attributeName: attributeName, name: path, count: count, exhaustive: exhaustive }; } var SearchResults_1 = SearchResults; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners || undefined; } var events = EventEmitter; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. EventEmitter.defaultMaxListeners = 10; // Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. EventEmitter.prototype.setMaxListeners = function(n) { if (!isNumber(n) || n < 0 || isNaN(n)) throw TypeError('n must be a positive number'); this._maxListeners = n; return this; }; EventEmitter.prototype.emit = function(type) { var er, handler, len, args, i, listeners; if (!this._events) this._events = {}; // If there is no 'error' event listener then throw. if (type === 'error') { if (!this._events.error || (isObject(this._events.error) && !this._events.error.length)) { er = arguments[1]; if (er instanceof Error) { throw er; // Unhandled 'error' event } else { // At least give some kind of context to the user var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); err.context = er; throw err; } } } handler = this._events[type]; if (isUndefined(handler)) return false; if (isFunction(handler)) { switch (arguments.length) { // fast cases case 1: handler.call(this); break; case 2: handler.call(this, arguments[1]); break; case 3: handler.call(this, arguments[1], arguments[2]); break; // slower default: args = Array.prototype.slice.call(arguments, 1); handler.apply(this, args); } } else if (isObject(handler)) { args = Array.prototype.slice.call(arguments, 1); listeners = handler.slice(); len = listeners.length; for (i = 0; i < len; i++) listeners[i].apply(this, args); } return true; }; EventEmitter.prototype.addListener = function(type, listener) { var m; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events) this._events = {}; // To avoid recursion in the case that type === "newListener"! Before // adding it to the listeners, first emit "newListener". if (this._events.newListener) this.emit('newListener', type, isFunction(listener.listener) ? listener.listener : listener); if (!this._events[type]) // Optimize the case of one listener. Don't need the extra array object. this._events[type] = listener; else if (isObject(this._events[type])) // If we've already got an array, just append. this._events[type].push(listener); else // Adding the second element, need to change to array. this._events[type] = [this._events[type], listener]; // Check for listener leak if (isObject(this._events[type]) && !this._events[type].warned) { if (!isUndefined(this._maxListeners)) { m = this._maxListeners; } else { m = EventEmitter.defaultMaxListeners; } if (m && m > 0 && this._events[type].length > m) { this._events[type].warned = true; console.error('(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length); if (typeof console.trace === 'function') { // not supported in IE 10 console.trace(); } } } return this; }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.once = function(type, listener) { if (!isFunction(listener)) throw TypeError('listener must be a function'); var fired = false; function g() { this.removeListener(type, g); if (!fired) { fired = true; listener.apply(this, arguments); } } g.listener = listener; this.on(type, g); return this; }; // emits a 'removeListener' event iff the listener was removed EventEmitter.prototype.removeListener = function(type, listener) { var list, position, length, i; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events || !this._events[type]) return this; list = this._events[type]; length = list.length; position = -1; if (list === listener || (isFunction(list.listener) && list.listener === listener)) { delete this._events[type]; if (this._events.removeListener) this.emit('removeListener', type, listener); } else if (isObject(list)) { for (i = length; i-- > 0;) { if (list[i] === listener || (list[i].listener && list[i].listener === listener)) { position = i; break; } } if (position < 0) return this; if (list.length === 1) { list.length = 0; delete this._events[type]; } else { list.splice(position, 1); } if (this._events.removeListener) this.emit('removeListener', type, listener); } return this; }; EventEmitter.prototype.removeAllListeners = function(type) { var key, listeners; if (!this._events) return this; // not listening for removeListener, no need to emit if (!this._events.removeListener) { if (arguments.length === 0) this._events = {}; else if (this._events[type]) delete this._events[type]; return this; } // emit removeListener for all listeners on all events if (arguments.length === 0) { for (key in this._events) { if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = {}; return this; } listeners = this._events[type]; if (isFunction(listeners)) { this.removeListener(type, listeners); } else if (listeners) { // LIFO order while (listeners.length) this.removeListener(type, listeners[listeners.length - 1]); } delete this._events[type]; return this; }; EventEmitter.prototype.listeners = function(type) { var ret; if (!this._events || !this._events[type]) ret = []; else if (isFunction(this._events[type])) ret = [this._events[type]]; else ret = this._events[type].slice(); return ret; }; EventEmitter.prototype.listenerCount = function(type) { if (this._events) { var evlistener = this._events[type]; if (isFunction(evlistener)) return 1; else if (evlistener) return evlistener.length; } return 0; }; EventEmitter.listenerCount = function(emitter, type) { return emitter.listenerCount(type); }; function isFunction(arg) { return typeof arg === 'function'; } function isNumber(arg) { return typeof arg === 'number'; } function isObject(arg) { return typeof arg === 'object' && arg !== null; } function isUndefined(arg) { return arg === void 0; } function inherits(ctor, superCtor) { ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); } var inherits_1 = inherits; /** * A DerivedHelper is a way to create sub requests to * Algolia from a main helper. * @class * @classdesc The DerivedHelper provides an event based interface for search callbacks: * - search: when a search is triggered using the `search()` method. * - result: when the response is retrieved from Algolia and is processed. * This event contains a {@link SearchResults} object and the * {@link SearchParameters} corresponding to this answer. */ function DerivedHelper(mainHelper, fn) { this.main = mainHelper; this.fn = fn; this.lastResults = null; } inherits_1(DerivedHelper, events.EventEmitter); /** * Detach this helper from the main helper * @return {undefined} * @throws Error if the derived helper is already detached */ DerivedHelper.prototype.detach = function() { this.removeAllListeners(); this.main.detachDerivedHelper(this); }; DerivedHelper.prototype.getModifiedState = function(parameters) { return this.fn(parameters); }; var DerivedHelper_1 = DerivedHelper; var requestBuilder = { /** * Get all the queries to send to the client, those queries can used directly * with the Algolia client. * @private * @return {object[]} The queries */ _getQueries: function getQueries(index, state) { var queries = []; // One query for the hits queries.push({ indexName: index, params: requestBuilder._getHitsSearchParams(state) }); // One for each disjunctive facets state.getRefinedDisjunctiveFacets().forEach(function(refinedFacet) { queries.push({ indexName: index, params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet) }); }); // maybe more to get the root level of hierarchical facets when activated state.getRefinedHierarchicalFacets().forEach(function(refinedFacet) { var hierarchicalFacet = state.getHierarchicalFacetByName(refinedFacet); var currentRefinement = state.getHierarchicalRefinement(refinedFacet); // if we are deeper than level 0 (starting from `beer > IPA`) // we want to get the root values var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); if (currentRefinement.length > 0 && currentRefinement[0].split(separator).length > 1) { queries.push({ indexName: index, params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet, true) }); } }); return queries; }, /** * Build search parameters used to fetch hits * @private * @return {object.<string, any>} */ _getHitsSearchParams: function(state) { var facets = state.facets .concat(state.disjunctiveFacets) .concat(requestBuilder._getHitsHierarchicalFacetsAttributes(state)); var facetFilters = requestBuilder._getFacetFilters(state); var numericFilters = requestBuilder._getNumericFilters(state); var tagFilters = requestBuilder._getTagFilters(state); var additionalParams = { facets: facets, tagFilters: tagFilters }; if (facetFilters.length > 0) { additionalParams.facetFilters = facetFilters; } if (numericFilters.length > 0) { additionalParams.numericFilters = numericFilters; } return merge_1({}, state.getQueryParams(), additionalParams); }, /** * Build search parameters used to fetch a disjunctive facet * @private * @param {string} facet the associated facet name * @param {boolean} hierarchicalRootLevel ?? FIXME * @return {object} */ _getDisjunctiveFacetSearchParams: function(state, facet, hierarchicalRootLevel) { var facetFilters = requestBuilder._getFacetFilters(state, facet, hierarchicalRootLevel); var numericFilters = requestBuilder._getNumericFilters(state, facet); var tagFilters = requestBuilder._getTagFilters(state); var additionalParams = { hitsPerPage: 1, page: 0, attributesToRetrieve: [], attributesToHighlight: [], attributesToSnippet: [], tagFilters: tagFilters, analytics: false, clickAnalytics: false }; var hierarchicalFacet = state.getHierarchicalFacetByName(facet); if (hierarchicalFacet) { additionalParams.facets = requestBuilder._getDisjunctiveHierarchicalFacetAttribute( state, hierarchicalFacet, hierarchicalRootLevel ); } else { additionalParams.facets = facet; } if (numericFilters.length > 0) { additionalParams.numericFilters = numericFilters; } if (facetFilters.length > 0) { additionalParams.facetFilters = facetFilters; } return merge_1({}, state.getQueryParams(), additionalParams); }, /** * Return the numeric filters in an algolia request fashion * @private * @param {string} [facetName] the name of the attribute for which the filters should be excluded * @return {string[]} the numeric filters in the algolia format */ _getNumericFilters: function(state, facetName) { if (state.numericFilters) { return state.numericFilters; } var numericFilters = []; Object.keys(state.numericRefinements).forEach(function(attribute) { var operators = state.numericRefinements[attribute] || {}; Object.keys(operators).forEach(function(operator) { var values = operators[operator] || []; if (facetName !== attribute) { values.forEach(function(value) { if (Array.isArray(value)) { var vs = value.map(function(v) { return attribute + operator + v; }); numericFilters.push(vs); } else { numericFilters.push(attribute + operator + value); } }); } }); }); return numericFilters; }, /** * Return the tags filters depending * @private * @return {string} */ _getTagFilters: function(state) { if (state.tagFilters) { return state.tagFilters; } return state.tagRefinements.join(','); }, /** * Build facetFilters parameter based on current refinements. The array returned * contains strings representing the facet filters in the algolia format. * @private * @param {string} [facet] if set, the current disjunctive facet * @return {array.<string>} */ _getFacetFilters: function(state, facet, hierarchicalRootLevel) { var facetFilters = []; var facetsRefinements = state.facetsRefinements || {}; Object.keys(facetsRefinements).forEach(function(facetName) { var facetValues = facetsRefinements[facetName] || []; facetValues.forEach(function(facetValue) { facetFilters.push(facetName + ':' + facetValue); }); }); var facetsExcludes = state.facetsExcludes || {}; Object.keys(facetsExcludes).forEach(function(facetName) { var facetValues = facetsExcludes[facetName] || []; facetValues.forEach(function(facetValue) { facetFilters.push(facetName + ':-' + facetValue); }); }); var disjunctiveFacetsRefinements = state.disjunctiveFacetsRefinements || {}; Object.keys(disjunctiveFacetsRefinements).forEach(function(facetName) { var facetValues = disjunctiveFacetsRefinements[facetName] || []; if (facetName === facet || !facetValues || facetValues.length === 0) { return; } var orFilters = []; facetValues.forEach(function(facetValue) { orFilters.push(facetName + ':' + facetValue); }); facetFilters.push(orFilters); }); var hierarchicalFacetsRefinements = state.hierarchicalFacetsRefinements || {}; Object.keys(hierarchicalFacetsRefinements).forEach(function(facetName) { var facetValues = hierarchicalFacetsRefinements[facetName] || []; var facetValue = facetValues[0]; if (facetValue === undefined) { return; } var hierarchicalFacet = state.getHierarchicalFacetByName(facetName); var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var rootPath = state._getHierarchicalRootPath(hierarchicalFacet); var attributeToRefine; var attributesIndex; // we ask for parent facet values only when the `facet` is the current hierarchical facet if (facet === facetName) { // if we are at the root level already, no need to ask for facet values, we get them from // the hits query if (facetValue.indexOf(separator) === -1 || (!rootPath && hierarchicalRootLevel === true) || (rootPath && rootPath.split(separator).length === facetValue.split(separator).length)) { return; } if (!rootPath) { attributesIndex = facetValue.split(separator).length - 2; facetValue = facetValue.slice(0, facetValue.lastIndexOf(separator)); } else { attributesIndex = rootPath.split(separator).length - 1; facetValue = rootPath; } attributeToRefine = hierarchicalFacet.attributes[attributesIndex]; } else { attributesIndex = facetValue.split(separator).length - 1; attributeToRefine = hierarchicalFacet.attributes[attributesIndex]; } if (attributeToRefine) { facetFilters.push([attributeToRefine + ':' + facetValue]); } }); return facetFilters; }, _getHitsHierarchicalFacetsAttributes: function(state) { var out = []; return state.hierarchicalFacets.reduce( // ask for as much levels as there's hierarchical refinements function getHitsAttributesForHierarchicalFacet(allAttributes, hierarchicalFacet) { var hierarchicalRefinement = state.getHierarchicalRefinement(hierarchicalFacet.name)[0]; // if no refinement, ask for root level if (!hierarchicalRefinement) { allAttributes.push(hierarchicalFacet.attributes[0]); return allAttributes; } var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var level = hierarchicalRefinement.split(separator).length; var newAttributes = hierarchicalFacet.attributes.slice(0, level + 1); return allAttributes.concat(newAttributes); }, out); }, _getDisjunctiveHierarchicalFacetAttribute: function(state, hierarchicalFacet, rootLevel) { var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); if (rootLevel === true) { var rootPath = state._getHierarchicalRootPath(hierarchicalFacet); var attributeIndex = 0; if (rootPath) { attributeIndex = rootPath.split(separator).length; } return [hierarchicalFacet.attributes[attributeIndex]]; } var hierarchicalRefinement = state.getHierarchicalRefinement(hierarchicalFacet.name)[0] || ''; // if refinement is 'beers > IPA > Flying dog', // then we want `facets: ['beers > IPA']` as disjunctive facet (parent level values) var parentLevel = hierarchicalRefinement.split(separator).length - 1; return hierarchicalFacet.attributes.slice(0, parentLevel + 1); }, getSearchForFacetQuery: function(facetName, query, maxFacetHits, state) { var stateForSearchForFacetValues = state.isDisjunctiveFacet(facetName) ? state.clearRefinements(facetName) : state; var searchForFacetSearchParameters = { facetQuery: query, facetName: facetName }; if (typeof maxFacetHits === 'number') { searchForFacetSearchParameters.maxFacetHits = maxFacetHits; } return merge_1( {}, requestBuilder._getHitsSearchParams(stateForSearchForFacetValues), searchForFacetSearchParameters ); } }; var requestBuilder_1 = requestBuilder; var version = '3.1.0'; /** * Event triggered when a parameter is set or updated * @event AlgoliaSearchHelper#event:change * @property {object} event * @property {SearchParameters} event.state the current parameters with the latest changes applied * @property {SearchResults} event.results the previous results received from Algolia. `null` before the first request * @example * helper.on('change', function(event) { * console.log('The parameters have changed'); * }); */ /** * Event triggered when a main search is sent to Algolia * @event AlgoliaSearchHelper#event:search * @property {object} event * @property {SearchParameters} event.state the parameters used for this search * @property {SearchResults} event.results the results from the previous search. `null` if it is the first search. * @example * helper.on('search', function(event) { * console.log('Search sent'); * }); */ /** * Event triggered when a search using `searchForFacetValues` is sent to Algolia * @event AlgoliaSearchHelper#event:searchForFacetValues * @property {object} event * @property {SearchParameters} event.state the parameters used for this search it is the first search. * @property {string} event.facet the facet searched into * @property {string} event.query the query used to search in the facets * @example * helper.on('searchForFacetValues', function(event) { * console.log('searchForFacetValues sent'); * }); */ /** * Event triggered when a search using `searchOnce` is sent to Algolia * @event AlgoliaSearchHelper#event:searchOnce * @property {object} event * @property {SearchParameters} event.state the parameters used for this search it is the first search. * @example * helper.on('searchOnce', function(event) { * console.log('searchOnce sent'); * }); */ /** * Event triggered when the results are retrieved from Algolia * @event AlgoliaSearchHelper#event:result * @property {object} event * @property {SearchResults} event.results the results received from Algolia * @property {SearchParameters} event.state the parameters used to query Algolia. Those might be different from the one in the helper instance (for example if the network is unreliable). * @example * helper.on('result', function(event) { * console.log('Search results received'); * }); */ /** * Event triggered when Algolia sends back an error. For example, if an unknown parameter is * used, the error can be caught using this event. * @event AlgoliaSearchHelper#event:error * @property {object} event * @property {Error} event.error the error returned by the Algolia. * @example * helper.on('error', function(event) { * console.log('Houston we got a problem.'); * }); */ /** * Event triggered when the queue of queries have been depleted (with any result or outdated queries) * @event AlgoliaSearchHelper#event:searchQueueEmpty * @example * helper.on('searchQueueEmpty', function() { * console.log('No more search pending'); * // This is received before the result event if we're not expecting new results * }); * * helper.search(); */ /** * Initialize a new AlgoliaSearchHelper * @class * @classdesc The AlgoliaSearchHelper is a class that ease the management of the * search. It provides an event based interface for search callbacks: * - change: when the internal search state is changed. * This event contains a {@link SearchParameters} object and the * {@link SearchResults} of the last result if any. * - search: when a search is triggered using the `search()` method. * - result: when the response is retrieved from Algolia and is processed. * This event contains a {@link SearchResults} object and the * {@link SearchParameters} corresponding to this answer. * - error: when the response is an error. This event contains the error returned by the server. * @param {AlgoliaSearch} client an AlgoliaSearch client * @param {string} index the index name to query * @param {SearchParameters | object} options an object defining the initial * config of the search. It doesn't have to be a {SearchParameters}, * just an object containing the properties you need from it. */ function AlgoliaSearchHelper(client, index, options) { if (typeof client.addAlgoliaAgent === 'function') { client.addAlgoliaAgent('JS Helper (' + version + ')'); } this.setClient(client); var opts = options || {}; opts.index = index; this.state = SearchParameters_1.make(opts); this.lastResults = null; this._queryId = 0; this._lastQueryIdReceived = -1; this.derivedHelpers = []; this._currentNbQueries = 0; } inherits_1(AlgoliaSearchHelper, events.EventEmitter); /** * Start the search with the parameters set in the state. When the * method is called, it triggers a `search` event. The results will * be available through the `result` event. If an error occurs, an * `error` will be fired instead. * @return {AlgoliaSearchHelper} * @fires search * @fires result * @fires error * @chainable */ AlgoliaSearchHelper.prototype.search = function() { this._search({onlyWithDerivedHelpers: false}); return this; }; AlgoliaSearchHelper.prototype.searchOnlyWithDerivedHelpers = function() { this._search({onlyWithDerivedHelpers: true}); return this; }; /** * Gets the search query parameters that would be sent to the Algolia Client * for the hits * @return {object} Query Parameters */ AlgoliaSearchHelper.prototype.getQuery = function() { var state = this.state; return requestBuilder_1._getHitsSearchParams(state); }; /** * Start a search using a modified version of the current state. This method does * not trigger the helper lifecycle and does not modify the state kept internally * by the helper. This second aspect means that the next search call will be the * same as a search call before calling searchOnce. * @param {object} options can contain all the parameters that can be set to SearchParameters * plus the index * @param {function} [callback] optional callback executed when the response from the * server is back. * @return {promise|undefined} if a callback is passed the method returns undefined * otherwise it returns a promise containing an object with two keys : * - content with a SearchResults * - state with the state used for the query as a SearchParameters * @example * // Changing the number of records returned per page to 1 * // This example uses the callback API * var state = helper.searchOnce({hitsPerPage: 1}, * function(error, content, state) { * // if an error occurred it will be passed in error, otherwise its value is null * // content contains the results formatted as a SearchResults * // state is the instance of SearchParameters used for this search * }); * @example * // Changing the number of records returned per page to 1 * // This example uses the promise API * var state1 = helper.searchOnce({hitsPerPage: 1}) * .then(promiseHandler); * * function promiseHandler(res) { * // res contains * // { * // content : SearchResults * // state : SearchParameters (the one used for this specific search) * // } * } */ AlgoliaSearchHelper.prototype.searchOnce = function(options, cb) { var tempState = !options ? this.state : this.state.setQueryParameters(options); var queries = requestBuilder_1._getQueries(tempState.index, tempState); var self = this; this._currentNbQueries++; this.emit('searchOnce', { state: tempState }); if (cb) { this.client .search(queries) .then(function(content) { self._currentNbQueries--; if (self._currentNbQueries === 0) { self.emit('searchQueueEmpty'); } cb(null, new SearchResults_1(tempState, content.results), tempState); }) .catch(function(err) { self._currentNbQueries--; if (self._currentNbQueries === 0) { self.emit('searchQueueEmpty'); } cb(err, null, tempState); }); return undefined; } return this.client.search(queries).then(function(content) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); return { content: new SearchResults_1(tempState, content.results), state: tempState, _originalResponse: content }; }, function(e) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); throw e; }); }; /** * Structure of each result when using * [`searchForFacetValues()`](reference.html#AlgoliaSearchHelper#searchForFacetValues) * @typedef FacetSearchHit * @type {object} * @property {string} value the facet value * @property {string} highlighted the facet value highlighted with the query string * @property {number} count number of occurrence of this facet value * @property {boolean} isRefined true if the value is already refined */ /** * Structure of the data resolved by the * [`searchForFacetValues()`](reference.html#AlgoliaSearchHelper#searchForFacetValues) * promise. * @typedef FacetSearchResult * @type {object} * @property {FacetSearchHit} facetHits the results for this search for facet values * @property {number} processingTimeMS time taken by the query inside the engine */ /** * Search for facet values based on an query and the name of a faceted attribute. This * triggers a search and will return a promise. On top of using the query, it also sends * the parameters from the state so that the search is narrowed down to only the possible values. * * See the description of [FacetSearchResult](reference.html#FacetSearchResult) * @param {string} facet the name of the faceted attribute * @param {string} query the string query for the search * @param {number} [maxFacetHits] the maximum number values returned. Should be > 0 and <= 100 * @param {object} [userState] the set of custom parameters to use on top of the current state. Setting a property to `undefined` removes * it in the generated query. * @return {promise.<FacetSearchResult>} the results of the search */ AlgoliaSearchHelper.prototype.searchForFacetValues = function(facet, query, maxFacetHits, userState) { var clientHasSFFV = typeof this.client.searchForFacetValues === 'function'; if ( !clientHasSFFV && typeof this.client.initIndex !== 'function' ) { throw new Error( 'search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues' ); } var state = this.state.setQueryParameters(userState || {}); var isDisjunctive = state.isDisjunctiveFacet(facet); var algoliaQuery = requestBuilder_1.getSearchForFacetQuery(facet, query, maxFacetHits, state); this._currentNbQueries++; var self = this; this.emit('searchForFacetValues', { state: state, facet: facet, query: query }); var searchForFacetValuesPromise = clientHasSFFV ? this.client.searchForFacetValues([{indexName: state.index, params: algoliaQuery}]) : this.client.initIndex(state.index).searchForFacetValues(algoliaQuery); return searchForFacetValuesPromise.then(function addIsRefined(content) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); content = Array.isArray(content) ? content[0] : content; content.facetHits.forEach(function(f) { f.isRefined = isDisjunctive ? state.isDisjunctiveFacetRefined(facet, f.value) : state.isFacetRefined(facet, f.value); }); return content; }, function(e) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); throw e; }); }; /** * Sets the text query used for the search. * * This method resets the current page to 0. * @param {string} q the user query * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setQuery = function(q) { this._change({ state: this.state.resetPage().setQuery(q), isPageReset: true }); return this; }; /** * Remove all the types of refinements except tags. A string can be provided to remove * only the refinements of a specific attribute. For more advanced use case, you can * provide a function instead. This function should follow the * [clearCallback definition](#SearchParameters.clearCallback). * * This method resets the current page to 0. * @param {string} [name] optional name of the facet / attribute on which we want to remove all refinements * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * // Removing all the refinements * helper.clearRefinements().search(); * @example * // Removing all the filters on a the category attribute. * helper.clearRefinements('category').search(); * @example * // Removing only the exclude filters on the category facet. * helper.clearRefinements(function(value, attribute, type) { * return type === 'exclude' && attribute === 'category'; * }).search(); */ AlgoliaSearchHelper.prototype.clearRefinements = function(name) { this._change({ state: this.state.resetPage().clearRefinements(name), isPageReset: true }); return this; }; /** * Remove all the tag filters. * * This method resets the current page to 0. * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.clearTags = function() { this._change({ state: this.state.resetPage().clearTags(), isPageReset: true }); return this; }; /** * Adds a disjunctive filter to a faceted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addDisjunctiveFacetRefinement = function(facet, value) { this._change({ state: this.state.resetPage().addDisjunctiveFacetRefinement(facet, value), isPageReset: true }); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addDisjunctiveFacetRefinement} */ AlgoliaSearchHelper.prototype.addDisjunctiveRefine = function() { return this.addDisjunctiveFacetRefinement.apply(this, arguments); }; /** * Adds a refinement on a hierarchical facet. It will throw * an exception if the facet is not defined or if the facet * is already refined. * * This method resets the current page to 0. * @param {string} facet the facet name * @param {string} path the hierarchical facet path * @return {AlgoliaSearchHelper} * @throws Error if the facet is not defined or if the facet is refined * @chainable * @fires change */ AlgoliaSearchHelper.prototype.addHierarchicalFacetRefinement = function(facet, value) { this._change({ state: this.state.resetPage().addHierarchicalFacetRefinement(facet, value), isPageReset: true }); return this; }; /** * Adds a an numeric filter to an attribute with the `operator` and `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} attribute the attribute on which the numeric filter applies * @param {string} operator the operator of the filter * @param {number} value the value of the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addNumericRefinement = function(attribute, operator, value) { this._change({ state: this.state.resetPage().addNumericRefinement(attribute, operator, value), isPageReset: true }); return this; }; /** * Adds a filter to a faceted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addFacetRefinement = function(facet, value) { this._change({ state: this.state.resetPage().addFacetRefinement(facet, value), isPageReset: true }); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addFacetRefinement} */ AlgoliaSearchHelper.prototype.addRefine = function() { return this.addFacetRefinement.apply(this, arguments); }; /** * Adds a an exclusion filter to a faceted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addFacetExclusion = function(facet, value) { this._change({ state: this.state.resetPage().addExcludeRefinement(facet, value), isPageReset: true }); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addFacetExclusion} */ AlgoliaSearchHelper.prototype.addExclude = function() { return this.addFacetExclusion.apply(this, arguments); }; /** * Adds a tag filter with the `tag` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} tag the tag to add to the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addTag = function(tag) { this._change({ state: this.state.resetPage().addTagRefinement(tag), isPageReset: true }); return this; }; /** * Removes an numeric filter to an attribute with the `operator` and `value` provided. If the * filter is not set, it doesn't change the filters. * * Some parameters are optional, triggering different behavior: * - if the value is not provided, then all the numeric value will be removed for the * specified attribute/operator couple. * - if the operator is not provided either, then all the numeric filter on this attribute * will be removed. * * This method resets the current page to 0. * @param {string} attribute the attribute on which the numeric filter applies * @param {string} [operator] the operator of the filter * @param {number} [value] the value of the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeNumericRefinement = function(attribute, operator, value) { this._change({ state: this.state.resetPage().removeNumericRefinement(attribute, operator, value), isPageReset: true }); return this; }; /** * Removes a disjunctive filter to a faceted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeDisjunctiveFacetRefinement = function(facet, value) { this._change({ state: this.state.resetPage().removeDisjunctiveFacetRefinement(facet, value), isPageReset: true }); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeDisjunctiveFacetRefinement} */ AlgoliaSearchHelper.prototype.removeDisjunctiveRefine = function() { return this.removeDisjunctiveFacetRefinement.apply(this, arguments); }; /** * Removes the refinement set on a hierarchical facet. * @param {string} facet the facet name * @return {AlgoliaSearchHelper} * @throws Error if the facet is not defined or if the facet is not refined * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeHierarchicalFacetRefinement = function(facet) { this._change({ state: this.state.resetPage().removeHierarchicalFacetRefinement(facet), isPageReset: true }); return this; }; /** * Removes a filter to a faceted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeFacetRefinement = function(facet, value) { this._change({ state: this.state.resetPage().removeFacetRefinement(facet, value), isPageReset: true }); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeFacetRefinement} */ AlgoliaSearchHelper.prototype.removeRefine = function() { return this.removeFacetRefinement.apply(this, arguments); }; /** * Removes an exclusion filter to a faceted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeFacetExclusion = function(facet, value) { this._change({ state: this.state.resetPage().removeExcludeRefinement(facet, value), isPageReset: true }); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeFacetExclusion} */ AlgoliaSearchHelper.prototype.removeExclude = function() { return this.removeFacetExclusion.apply(this, arguments); }; /** * Removes a tag filter with the `tag` provided. If the * filter is not set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} tag tag to remove from the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeTag = function(tag) { this._change({ state: this.state.resetPage().removeTagRefinement(tag), isPageReset: true }); return this; }; /** * Adds or removes an exclusion filter to a faceted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleFacetExclusion = function(facet, value) { this._change({ state: this.state.resetPage().toggleExcludeFacetRefinement(facet, value), isPageReset: true }); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#toggleFacetExclusion} */ AlgoliaSearchHelper.prototype.toggleExclude = function() { return this.toggleFacetExclusion.apply(this, arguments); }; /** * Adds or removes a filter to a faceted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method can be used for conjunctive, disjunctive and hierarchical filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @throws Error will throw an error if the facet is not declared in the settings of the helper * @fires change * @chainable * @deprecated since version 2.19.0, see {@link AlgoliaSearchHelper#toggleFacetRefinement} */ AlgoliaSearchHelper.prototype.toggleRefinement = function(facet, value) { return this.toggleFacetRefinement(facet, value); }; /** * Adds or removes a filter to a faceted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method can be used for conjunctive, disjunctive and hierarchical filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @throws Error will throw an error if the facet is not declared in the settings of the helper * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleFacetRefinement = function(facet, value) { this._change({ state: this.state.resetPage().toggleFacetRefinement(facet, value), isPageReset: true }); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#toggleFacetRefinement} */ AlgoliaSearchHelper.prototype.toggleRefine = function() { return this.toggleFacetRefinement.apply(this, arguments); }; /** * Adds or removes a tag filter with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method resets the current page to 0. * @param {string} tag tag to remove or add * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleTag = function(tag) { this._change({ state: this.state.resetPage().toggleTagRefinement(tag), isPageReset: true }); return this; }; /** * Increments the page number by one. * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * helper.setPage(0).nextPage().getPage(); * // returns 1 */ AlgoliaSearchHelper.prototype.nextPage = function() { var page = this.state.page || 0; return this.setPage(page + 1); }; /** * Decrements the page number by one. * @fires change * @return {AlgoliaSearchHelper} * @chainable * @example * helper.setPage(1).previousPage().getPage(); * // returns 0 */ AlgoliaSearchHelper.prototype.previousPage = function() { var page = this.state.page || 0; return this.setPage(page - 1); }; /** * @private */ function setCurrentPage(page) { if (page < 0) throw new Error('Page requested below 0.'); this._change({ state: this.state.setPage(page), isPageReset: false }); return this; } /** * Change the current page * @deprecated * @param {number} page The page number * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setCurrentPage = setCurrentPage; /** * Updates the current page. * @function * @param {number} page The page number * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setPage = setCurrentPage; /** * Updates the name of the index that will be targeted by the query. * * This method resets the current page to 0. * @param {string} name the index name * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setIndex = function(name) { this._change({ state: this.state.resetPage().setIndex(name), isPageReset: true }); return this; }; /** * Update a parameter of the search. This method reset the page * * The complete list of parameters is available on the * [Algolia website](https://www.algolia.com/doc/rest#query-an-index). * The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts) * or benefit from higher-level APIs (all the kind of filters and facets have their own API) * * This method resets the current page to 0. * @param {string} parameter name of the parameter to update * @param {any} value new value of the parameter * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * helper.setQueryParameter('hitsPerPage', 20).search(); */ AlgoliaSearchHelper.prototype.setQueryParameter = function(parameter, value) { this._change({ state: this.state.resetPage().setQueryParameter(parameter, value), isPageReset: true }); return this; }; /** * Set the whole state (warning: will erase previous state) * @param {SearchParameters} newState the whole new state * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setState = function(newState) { this._change({ state: SearchParameters_1.make(newState), isPageReset: false }); return this; }; /** * Override the current state without triggering a change event. * Do not use this method unless you know what you are doing. (see the example * for a legit use case) * @param {SearchParameters} newState the whole new state * @return {AlgoliaSearchHelper} * @example * helper.on('change', function(state){ * // In this function you might want to find a way to store the state in the url/history * updateYourURL(state) * }) * window.onpopstate = function(event){ * // This is naive though as you should check if the state is really defined etc. * helper.overrideStateWithoutTriggeringChangeEvent(event.state).search() * } * @chainable */ AlgoliaSearchHelper.prototype.overrideStateWithoutTriggeringChangeEvent = function(newState) { this.state = new SearchParameters_1(newState); return this; }; /** * Check if an attribute has any numeric, conjunctive, disjunctive or hierarchical filters. * @param {string} attribute the name of the attribute * @return {boolean} true if the attribute is filtered by at least one value * @example * // hasRefinements works with numeric, conjunctive, disjunctive and hierarchical filters * helper.hasRefinements('price'); // false * helper.addNumericRefinement('price', '>', 100); * helper.hasRefinements('price'); // true * * helper.hasRefinements('color'); // false * helper.addFacetRefinement('color', 'blue'); * helper.hasRefinements('color'); // true * * helper.hasRefinements('material'); // false * helper.addDisjunctiveFacetRefinement('material', 'plastic'); * helper.hasRefinements('material'); // true * * helper.hasRefinements('categories'); // false * helper.toggleFacetRefinement('categories', 'kitchen > knife'); * helper.hasRefinements('categories'); // true * */ AlgoliaSearchHelper.prototype.hasRefinements = function(attribute) { if (objectHasKeys_1(this.state.getNumericRefinements(attribute))) { return true; } else if (this.state.isConjunctiveFacet(attribute)) { return this.state.isFacetRefined(attribute); } else if (this.state.isDisjunctiveFacet(attribute)) { return this.state.isDisjunctiveFacetRefined(attribute); } else if (this.state.isHierarchicalFacet(attribute)) { return this.state.isHierarchicalFacetRefined(attribute); } // there's currently no way to know that the user did call `addNumericRefinement` at some point // thus we cannot distinguish if there once was a numeric refinement that was cleared // so we will return false in every other situations to be consistent // while what we should do here is throw because we did not find the attribute in any type // of refinement return false; }; /** * Check if a value is excluded for a specific faceted attribute. If the value * is omitted then the function checks if there is any excluding refinements. * * @param {string} facet name of the attribute for used for faceting * @param {string} [value] optional value. If passed will test that this value * is filtering the given facet. * @return {boolean} true if refined * @example * helper.isExcludeRefined('color'); // false * helper.isExcludeRefined('color', 'blue') // false * helper.isExcludeRefined('color', 'red') // false * * helper.addFacetExclusion('color', 'red'); * * helper.isExcludeRefined('color'); // true * helper.isExcludeRefined('color', 'blue') // false * helper.isExcludeRefined('color', 'red') // true */ AlgoliaSearchHelper.prototype.isExcluded = function(facet, value) { return this.state.isExcludeRefined(facet, value); }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasRefinements} */ AlgoliaSearchHelper.prototype.isDisjunctiveRefined = function(facet, value) { return this.state.isDisjunctiveFacetRefined(facet, value); }; /** * Check if the string is a currently filtering tag. * @param {string} tag tag to check * @return {boolean} */ AlgoliaSearchHelper.prototype.hasTag = function(tag) { return this.state.isTagRefined(tag); }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasTag} */ AlgoliaSearchHelper.prototype.isTagRefined = function() { return this.hasTagRefinements.apply(this, arguments); }; /** * Get the name of the currently used index. * @return {string} * @example * helper.setIndex('highestPrice_products').getIndex(); * // returns 'highestPrice_products' */ AlgoliaSearchHelper.prototype.getIndex = function() { return this.state.index; }; function getCurrentPage() { return this.state.page; } /** * Get the currently selected page * @deprecated * @return {number} the current page */ AlgoliaSearchHelper.prototype.getCurrentPage = getCurrentPage; /** * Get the currently selected page * @function * @return {number} the current page */ AlgoliaSearchHelper.prototype.getPage = getCurrentPage; /** * Get all the tags currently set to filters the results. * * @return {string[]} The list of tags currently set. */ AlgoliaSearchHelper.prototype.getTags = function() { return this.state.tagRefinements; }; /** * Get the list of refinements for a given attribute. This method works with * conjunctive, disjunctive, excluding and numerical filters. * * See also SearchResults#getRefinements * * @param {string} facetName attribute name used for faceting * @return {Array.<FacetRefinement|NumericRefinement>} All Refinement are objects that contain a value, and * a type. Numeric also contains an operator. * @example * helper.addNumericRefinement('price', '>', 100); * helper.getRefinements('price'); * // [ * // { * // "value": [ * // 100 * // ], * // "operator": ">", * // "type": "numeric" * // } * // ] * @example * helper.addFacetRefinement('color', 'blue'); * helper.addFacetExclusion('color', 'red'); * helper.getRefinements('color'); * // [ * // { * // "value": "blue", * // "type": "conjunctive" * // }, * // { * // "value": "red", * // "type": "exclude" * // } * // ] * @example * helper.addDisjunctiveFacetRefinement('material', 'plastic'); * // [ * // { * // "value": "plastic", * // "type": "disjunctive" * // } * // ] */ AlgoliaSearchHelper.prototype.getRefinements = function(facetName) { var refinements = []; if (this.state.isConjunctiveFacet(facetName)) { var conjRefinements = this.state.getConjunctiveRefinements(facetName); conjRefinements.forEach(function(r) { refinements.push({ value: r, type: 'conjunctive' }); }); var excludeRefinements = this.state.getExcludeRefinements(facetName); excludeRefinements.forEach(function(r) { refinements.push({ value: r, type: 'exclude' }); }); } else if (this.state.isDisjunctiveFacet(facetName)) { var disjRefinements = this.state.getDisjunctiveRefinements(facetName); disjRefinements.forEach(function(r) { refinements.push({ value: r, type: 'disjunctive' }); }); } var numericRefinements = this.state.getNumericRefinements(facetName); Object.keys(numericRefinements).forEach(function(operator) { var value = numericRefinements[operator]; refinements.push({ value: value, operator: operator, type: 'numeric' }); }); return refinements; }; /** * Return the current refinement for the (attribute, operator) * @param {string} attribute attribute in the record * @param {string} operator operator applied on the refined values * @return {Array.<number|number[]>} refined values */ AlgoliaSearchHelper.prototype.getNumericRefinement = function(attribute, operator) { return this.state.getNumericRefinement(attribute, operator); }; /** * Get the current breadcrumb for a hierarchical facet, as an array * @param {string} facetName Hierarchical facet name * @return {array.<string>} the path as an array of string */ AlgoliaSearchHelper.prototype.getHierarchicalFacetBreadcrumb = function(facetName) { return this.state.getHierarchicalFacetBreadcrumb(facetName); }; // /////////// PRIVATE /** * Perform the underlying queries * @private * @return {undefined} * @fires search * @fires result * @fires error */ AlgoliaSearchHelper.prototype._search = function(options) { var state = this.state; var states = []; var mainQueries = []; if (!options.onlyWithDerivedHelpers) { mainQueries = requestBuilder_1._getQueries(state.index, state); states.push({ state: state, queriesCount: mainQueries.length, helper: this }); this.emit('search', { state: state, results: this.lastResults }); } var derivedQueries = this.derivedHelpers.map(function(derivedHelper) { var derivedState = derivedHelper.getModifiedState(state); var derivedStateQueries = requestBuilder_1._getQueries(derivedState.index, derivedState); states.push({ state: derivedState, queriesCount: derivedStateQueries.length, helper: derivedHelper }); derivedHelper.emit('search', { state: derivedState, results: derivedHelper.lastResults }); return derivedStateQueries; }); var queries = Array.prototype.concat.apply(mainQueries, derivedQueries); var queryId = this._queryId++; this._currentNbQueries++; try { this.client.search(queries) .then(this._dispatchAlgoliaResponse.bind(this, states, queryId)) .catch(this._dispatchAlgoliaError.bind(this, queryId)); } catch (error) { // If we reach this part, we're in an internal error state this.emit('error', { error: error }); } }; /** * Transform the responses as sent by the server and transform them into a user * usable object that merge the results of all the batch requests. It will dispatch * over the different helper + derived helpers (when there are some). * @private * @param {array.<{SearchParameters, AlgoliaQueries, AlgoliaSearchHelper}>} * state state used for to generate the request * @param {number} queryId id of the current request * @param {object} content content of the response * @return {undefined} */ AlgoliaSearchHelper.prototype._dispatchAlgoliaResponse = function(states, queryId, content) { // FIXME remove the number of outdated queries discarded instead of just one if (queryId < this._lastQueryIdReceived) { // Outdated answer return; } this._currentNbQueries -= (queryId - this._lastQueryIdReceived); this._lastQueryIdReceived = queryId; if (this._currentNbQueries === 0) this.emit('searchQueueEmpty'); var results = content.results.slice(); states.forEach(function(s) { var state = s.state; var queriesCount = s.queriesCount; var helper = s.helper; var specificResults = results.splice(0, queriesCount); var formattedResponse = helper.lastResults = new SearchResults_1(state, specificResults); helper.emit('result', { results: formattedResponse, state: state }); }); }; AlgoliaSearchHelper.prototype._dispatchAlgoliaError = function(queryId, error) { if (queryId < this._lastQueryIdReceived) { // Outdated answer return; } this._currentNbQueries -= queryId - this._lastQueryIdReceived; this._lastQueryIdReceived = queryId; this.emit('error', { error: error }); if (this._currentNbQueries === 0) this.emit('searchQueueEmpty'); }; AlgoliaSearchHelper.prototype.containsRefinement = function(query, facetFilters, numericFilters, tagFilters) { return query || facetFilters.length !== 0 || numericFilters.length !== 0 || tagFilters.length !== 0; }; /** * Test if there are some disjunctive refinements on the facet * @private * @param {string} facet the attribute to test * @return {boolean} */ AlgoliaSearchHelper.prototype._hasDisjunctiveRefinements = function(facet) { return this.state.disjunctiveRefinements[facet] && this.state.disjunctiveRefinements[facet].length > 0; }; AlgoliaSearchHelper.prototype._change = function(event) { var state = event.state; var isPageReset = event.isPageReset; if (state !== this.state) { this.state = state; this.emit('change', { state: this.state, results: this.lastResults, isPageReset: isPageReset }); } }; /** * Clears the cache of the underlying Algolia client. * @return {AlgoliaSearchHelper} */ AlgoliaSearchHelper.prototype.clearCache = function() { this.client.clearCache && this.client.clearCache(); return this; }; /** * Updates the internal client instance. If the reference of the clients * are equal then no update is actually done. * @param {AlgoliaSearch} newClient an AlgoliaSearch client * @return {AlgoliaSearchHelper} */ AlgoliaSearchHelper.prototype.setClient = function(newClient) { if (this.client === newClient) return this; if (typeof newClient.addAlgoliaAgent === 'function') { newClient.addAlgoliaAgent('JS Helper (' + version + ')'); } this.client = newClient; return this; }; /** * Gets the instance of the currently used client. * @return {AlgoliaSearch} */ AlgoliaSearchHelper.prototype.getClient = function() { return this.client; }; /** * Creates an derived instance of the Helper. A derived helper * is a way to request other indices synchronised with the lifecycle * of the main Helper. This mechanism uses the multiqueries feature * of Algolia to aggregate all the requests in a single network call. * * This method takes a function that is used to create a new SearchParameter * that will be used to create requests to Algolia. Those new requests * are created just before the `search` event. The signature of the function * is `SearchParameters -> SearchParameters`. * * This method returns a new DerivedHelper which is an EventEmitter * that fires the same `search`, `result` and `error` events. Those * events, however, will receive data specific to this DerivedHelper * and the SearchParameters that is returned by the call of the * parameter function. * @param {function} fn SearchParameters -> SearchParameters * @return {DerivedHelper} */ AlgoliaSearchHelper.prototype.derive = function(fn) { var derivedHelper = new DerivedHelper_1(this, fn); this.derivedHelpers.push(derivedHelper); return derivedHelper; }; /** * This method detaches a derived Helper from the main one. Prefer using the one from the * derived helper itself, to remove the event listeners too. * @private * @return {undefined} * @throws Error */ AlgoliaSearchHelper.prototype.detachDerivedHelper = function(derivedHelper) { var pos = this.derivedHelpers.indexOf(derivedHelper); if (pos === -1) throw new Error('Derived helper already detached'); this.derivedHelpers.splice(pos, 1); }; /** * This method returns true if there is currently at least one on-going search. * @return {boolean} true if there is a search pending */ AlgoliaSearchHelper.prototype.hasPendingRequests = function() { return this._currentNbQueries > 0; }; /** * @typedef AlgoliaSearchHelper.NumericRefinement * @type {object} * @property {number[]} value the numbers that are used for filtering this attribute with * the operator specified. * @property {string} operator the faceting data: value, number of entries * @property {string} type will be 'numeric' */ /** * @typedef AlgoliaSearchHelper.FacetRefinement * @type {object} * @property {string} value the string use to filter the attribute * @property {string} type the type of filter: 'conjunctive', 'disjunctive', 'exclude' */ var algoliasearch_helper = AlgoliaSearchHelper; /** * The algoliasearchHelper module is the function that will let its * contains everything needed to use the Algoliasearch * Helper. It is a also a function that instanciate the helper. * To use the helper, you also need the Algolia JS client v3. * @example * //using the UMD build * var client = algoliasearch('latency', '6be0576ff61c053d5f9a3225e2a90f76'); * var helper = algoliasearchHelper(client, 'bestbuy', { * facets: ['shipping'], * disjunctiveFacets: ['category'] * }); * helper.on('result', function(event) { * console.log(event.results); * }); * helper * .toggleFacetRefinement('category', 'Movies & TV Shows') * .toggleFacetRefinement('shipping', 'Free shipping') * .search(); * @example * // The helper is an event emitter using the node API * helper.on('result', updateTheResults); * helper.once('result', updateTheResults); * helper.removeListener('result', updateTheResults); * helper.removeAllListeners('result'); * @module algoliasearchHelper * @param {AlgoliaSearch} client an AlgoliaSearch client * @param {string} index the name of the index to query * @param {SearchParameters|object} opts an object defining the initial config of the search. It doesn't have to be a {SearchParameters}, just an object containing the properties you need from it. * @return {AlgoliaSearchHelper} */ function algoliasearchHelper(client, index, opts) { return new algoliasearch_helper(client, index, opts); } /** * The version currently used * @member module:algoliasearchHelper.version * @type {number} */ algoliasearchHelper.version = version; /** * Constructor for the Helper. * @member module:algoliasearchHelper.AlgoliaSearchHelper * @type {AlgoliaSearchHelper} */ algoliasearchHelper.AlgoliaSearchHelper = algoliasearch_helper; /** * Constructor for the object containing all the parameters of the search. * @member module:algoliasearchHelper.SearchParameters * @type {SearchParameters} */ algoliasearchHelper.SearchParameters = SearchParameters_1; /** * Constructor for the object containing the results of the search. * @member module:algoliasearchHelper.SearchResults * @type {SearchResults} */ algoliasearchHelper.SearchResults = SearchResults_1; var algoliasearchHelper_1 = algoliasearchHelper; function createOptionalFilter(_ref) { var attributeName = _ref.attributeName, attributeValue = _ref.attributeValue, attributeScore = _ref.attributeScore; return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">"); } var defaultProps = { transformSearchParameters: function transformSearchParameters(x) { return _objectSpread({}, x); } }; function getId$1() { // We store the search state of this widget in `configure`. return 'configure'; } function getSearchParametersFromProps(props) { var optionalFilters = Object.keys(props.matchingPatterns).reduce(function (acc, attributeName) { var attributePattern = props.matchingPatterns[attributeName]; var attributeValue = getPropertyByPath(props.hit, attributeName); var attributeScore = attributePattern.score; if (Array.isArray(attributeValue)) { return [].concat(_toConsumableArray(acc), [attributeValue.map(function (attributeSubValue) { return createOptionalFilter({ attributeName: attributeName, attributeValue: attributeSubValue, attributeScore: attributeScore }); })]); } if (typeof attributeValue === 'string') { return [].concat(_toConsumableArray(acc), [createOptionalFilter({ attributeName: attributeName, attributeValue: attributeValue, attributeScore: attributeScore })]); } return acc; }, []); return props.transformSearchParameters(new algoliasearchHelper_1.SearchParameters({ // @ts-ignore @TODO [email protected] will contain the type // `sumOrFiltersScores`. // See https://github.com/algolia/algoliasearch-helper-js/pull/753 sumOrFiltersScores: true, facetFilters: ["objectID:-".concat(props.hit.objectID)], optionalFilters: optionalFilters })); } var connectConfigureRelatedItems = createConnectorWithContext({ displayName: 'AlgoliaConfigureRelatedItems', defaultProps: defaultProps, getProvidedProps: function getProvidedProps() { return {}; }, getSearchParameters: function getSearchParameters(searchParameters, props) { return searchParameters.setQueryParameters(getSearchParametersFromProps(props)); }, transitionState: function transitionState(props, _prevSearchState, nextSearchState) { var id = getId$1(); // We need to transform the exhaustive search parameters back to clean // search parameters without the empty default keys so we don't pollute the // `configure` search state. var searchParameters = removeEmptyArraysFromObject(removeEmptyKey(getSearchParametersFromProps(props))); var searchParametersKeys = Object.keys(searchParameters); var nonPresentKeys = this._searchParameters ? Object.keys(this._searchParameters).filter(function (prop) { return searchParametersKeys.indexOf(prop) === -1; }) : []; this._searchParameters = searchParameters; var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters)); return refineValue(nextSearchState, nextValue, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, cleanUp: function cleanUp(props, searchState) { var _this = this; var id = getId$1(); var indexId = getIndexId({ ais: props.contextValue, multiIndexContext: props.indexContextValue }); var subState = hasMultipleIndices({ ais: props.contextValue, multiIndexContext: props.indexContextValue }) && searchState.indices ? searchState.indices[indexId] : searchState; var configureKeys = subState && subState[id] ? Object.keys(subState[id]) : []; var configureState = configureKeys.reduce(function (acc, item) { if (!_this._searchParameters[item]) { acc[item] = subState[id][item]; } return acc; }, {}); var nextValue = _defineProperty({}, id, configureState); return refineValue(searchState, nextValue, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); } }); function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; var ReactPropTypesSecret_1 = ReactPropTypesSecret; function emptyFunction() {} var factoryWithThrowingShims = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret_1) { // It is still safe when called from React. return; } var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; } shim.isRequired = shim; function getShim() { return shim; } // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim }; ReactPropTypes.checkPropTypes = emptyFunction; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; var propTypes = createCommonjsModule(function (module) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = factoryWithThrowingShims(); } }); var getId$2 = function getId() { return 'query'; }; function getCurrentRefinement(props, searchState, context) { var id = getId$2(); var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, ''); if (currentRefinement) { return currentRefinement; } return ''; } function getHits(searchResults) { if (searchResults.results) { if (searchResults.results.hits && Array.isArray(searchResults.results.hits)) { return addAbsolutePositions(addQueryID(searchResults.results.hits, searchResults.results.queryID), searchResults.results.hitsPerPage, searchResults.results.page); } else { return Object.keys(searchResults.results).reduce(function (hits, index) { return [].concat(_toConsumableArray(hits), [{ index: index, hits: addAbsolutePositions(addQueryID(searchResults.results[index].hits, searchResults.results[index].queryID), searchResults.results[index].hitsPerPage, searchResults.results[index].page) }]); }, []); } } else { return []; } } function _refine(props, searchState, nextRefinement, context) { var id = getId$2(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage); } function _cleanUp(props, searchState, context) { return cleanUpValue(searchState, context, getId$2()); } /** * connectAutoComplete connector provides the logic to create connected * components that will render the results retrieved from * Algolia. * * To configure the number of hits retrieved, use [HitsPerPage widget](widgets/HitsPerPage.html), * [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or pass the hitsPerPage * prop to a [Configure](guide/Search_parameters.html) widget. * @name connectAutoComplete * @kind connector * @propType {string} [defaultRefinement] - Provide a default value for the query * @providedPropType {array.<object>} hits - the records that matched the search state * @providedPropType {function} refine - a function to change the query * @providedPropType {string} currentRefinement - the query to search for */ var connectAutoComplete = createConnectorWithContext({ displayName: 'AlgoliaAutoComplete', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { return { hits: getHits(searchResults), currentRefinement: getCurrentRefinement(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }) }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, /** * AutoComplete needs to be considered as a widget to trigger a search, * even if no other widgets are used. * * To be considered as a widget you need either: * - getSearchParameters * - getMetadata * - transitionState * * See: createConnector.tsx */ getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQuery(getCurrentRefinement(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue })); } }); var getId$3 = function getId(props) { return props.attributes[0]; }; var namespace = 'hierarchicalMenu'; function _refine$1(props, searchState, nextRefinement, context) { var id = getId$3(props); var nextValue = _defineProperty({}, id, nextRefinement || ''); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace); } function transformValue(values) { return values.reduce(function (acc, item) { if (item.isRefined) { acc.push({ label: item.name, // If dealing with a nested "items", "value" is equal to the previous value concatenated with the current label // If dealing with the first level, "value" is equal to the current label value: item.path }); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one if (item.data) { acc = acc.concat(transformValue(item.data)); } } return acc; }, []); } /** * The breadcrumb component is s a type of secondary navigation scheme that * reveals the user’s location in a website or web application. * * @name connectBreadcrumb * @requirements To use this widget, your attributes must be formatted in a specific way. * If you want for example to have a Breadcrumb of categories, objects in your index * should be formatted this way: * * ```json * { * "categories.lvl0": "products", * "categories.lvl1": "products > fruits", * "categories.lvl2": "products > fruits > citrus" * } * ``` * * It's also possible to provide more than one path for each level: * * ```json * { * "categories.lvl0": ["products", "goods"], * "categories.lvl1": ["products > fruits", "goods > to eat"] * } * ``` * * All attributes passed to the `attributes` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * * @kind connector * @propType {array.<string>} attributes - List of attributes to use to generate the hierarchy of the menu. See the example for the convention to follow. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {array.<{items: object, count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the Breadcrumb can display. */ var connectBreadcrumb = createConnectorWithContext({ displayName: 'AlgoliaBreadcrumb', propTypes: { attributes: function attributes(props, propName, componentName) { var isNotString = function isNotString(val) { return typeof val !== 'string'; }; if (!Array.isArray(props[propName]) || props[propName].some(isNotString) || props[propName].length < 1) { return new Error("Invalid prop ".concat(propName, " supplied to ").concat(componentName, ". Expected an Array of Strings")); } return undefined; }, transformItems: propTypes.func }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var id = getId$3(props); var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var isFacetPresent = Boolean(results) && Boolean(results.getFacetByName(id)); if (!isFacetPresent) { return { items: [], canRefine: false }; } var values = results.getFacetValues(id); var items = values.data ? transformValue(values.data) : []; var transformedItems = props.transformItems ? props.transformItems(items) : items; return { canRefine: transformedItems.length > 0, items: transformedItems }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$1(props, searchState, nextRefinement, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); } }); /** * connectCurrentRefinements connector provides the logic to build a widget that will * give the user the ability to remove all or some of the filters that were * set. * @name connectCurrentRefinements * @kind connector * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @propType {function} [clearsQuery=false] - Pass true to also clear the search query * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {array.<{label: string, attribute: string, currentRefinement: string || object, items: array, value: function}>} items - all the filters, the `value` is to pass to the `refine` function for removing all currentrefinements, `label` is for the display. When existing several refinements for the same atribute name, then you get a nested `items` object that contains a `label` and a `value` function to use to remove a single filter. `attribute` and `currentRefinement` are metadata containing row values. * @providedPropType {string} query - the search query */ var connectCurrentRefinements = createConnectorWithContext({ displayName: 'AlgoliaCurrentRefinements', propTypes: { transformItems: propTypes.func }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata) { var items = metadata.reduce(function (res, meta) { if (typeof meta.items !== 'undefined') { if (!props.clearsQuery && meta.id === 'query') { return res; } else { if (props.clearsQuery && meta.id === 'query' && meta.items[0].currentRefinement === '') { return res; } return res.concat(meta.items.map(function (item) { return _objectSpread({}, item, { id: meta.id, index: meta.index }); })); } } return res; }, []); var transformedItems = props.transformItems ? props.transformItems(items) : items; return { items: transformedItems, canRefine: transformedItems.length > 0 }; }, refine: function refine(props, searchState, items) { // `value` corresponds to our internal clear function computed in each connector metadata. var refinementsToClear = items instanceof Array ? items.map(function (item) { return item.value; }) : [items]; return refinementsToClear.reduce(function (res, clear) { return clear(res); }, searchState); } }); /** * The GeoSearch connector provides the logic to build a widget that will display the results on a map. * It also provides a way to search for results based on their position. The connector provides function to manage the search experience (search on map interaction). * @name connectGeoSearch * @kind connector * @requirements Note that the GeoSearch connector uses the [geosearch](https://www.algolia.com/doc/guides/searching/geo-search) capabilities of Algolia. * Your hits **must** have a `_geoloc` attribute in order to be passed to the rendering function. Currently, the feature is not compatible with multiple values in the `_geoloc` attribute * (e.g. a restaurant with multiple locations). In that case you can duplicate your records and use the [distinct](https://www.algolia.com/doc/guides/ranking/distinct) feature of Algolia to only retrieve unique results. * @propType {{ northEast: { lat: number, lng: number }, southWest: { lat: number, lng: number } }} [defaultRefinement] - Default search state of the widget containing the bounds for the map * @providedPropType {function({ northEast: { lat: number, lng: number }, southWest: { lat: number, lng: number } })} refine - a function to toggle the refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {array.<object>} hits - the records that matched the search * @providedPropType {boolean} isRefinedWithMap - true if the current refinement is set with the map bounds * @providedPropType {{ northEast: { lat: number, lng: number }, southWest: { lat: number, lng: number } }} [currentRefinement] - the refinement currently applied * @providedPropType {{ lat: number, lng: number }} [position] - the position of the search */ // To control the map with an external widget the other widget // **must** write the value in the attribute `aroundLatLng` var getBoundingBoxId = function getBoundingBoxId() { return 'boundingBox'; }; var getAroundLatLngId = function getAroundLatLngId() { return 'aroundLatLng'; }; var getConfigureAroundLatLngId = function getConfigureAroundLatLngId() { return 'configure.aroundLatLng'; }; var currentRefinementToString = function currentRefinementToString(currentRefinement) { return [currentRefinement.northEast.lat, currentRefinement.northEast.lng, currentRefinement.southWest.lat, currentRefinement.southWest.lng].join(); }; var stringToCurrentRefinement = function stringToCurrentRefinement(value) { var values = value.split(','); return { northEast: { lat: parseFloat(values[0]), lng: parseFloat(values[1]) }, southWest: { lat: parseFloat(values[2]), lng: parseFloat(values[3]) } }; }; var latLngRegExp = /^(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)$/; var stringToPosition = function stringToPosition(value) { var pattern = value.match(latLngRegExp); return { lat: parseFloat(pattern[1]), lng: parseFloat(pattern[2]) }; }; var getCurrentRefinement$1 = function getCurrentRefinement(props, searchState, context) { var refinement = getCurrentRefinementValue(props, searchState, context, getBoundingBoxId(), {}); if (!objectHasKeys(refinement)) { return; } // eslint-disable-next-line consistent-return return { northEast: { lat: parseFloat(refinement.northEast.lat), lng: parseFloat(refinement.northEast.lng) }, southWest: { lat: parseFloat(refinement.southWest.lat), lng: parseFloat(refinement.southWest.lng) } }; }; var getCurrentPosition = function getCurrentPosition(props, searchState, context) { var defaultRefinement = props.defaultRefinement, propsWithoutDefaultRefinement = _objectWithoutProperties(props, ["defaultRefinement"]); var aroundLatLng = getCurrentRefinementValue(propsWithoutDefaultRefinement, searchState, context, getAroundLatLngId()); if (!aroundLatLng) { // Fallback on `configure.aroundLatLng` var configureAroundLatLng = getCurrentRefinementValue(propsWithoutDefaultRefinement, searchState, context, getConfigureAroundLatLngId()); return configureAroundLatLng && stringToPosition(configureAroundLatLng); } return aroundLatLng; }; var _refine$2 = function refine(searchState, nextValue, context) { var resetPage = true; var nextRefinement = _defineProperty({}, getBoundingBoxId(), nextValue); return refineValue(searchState, nextRefinement, context, resetPage); }; var connectGeoSearch = createConnectorWithContext({ displayName: 'AlgoliaGeoSearch', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var context = { ais: props.contextValue, multiIndexContext: props.indexContextValue }; var results = getResults(searchResults, context); // We read it from both because the SearchParameters & the searchState are not always // in sync. When we set the refinement the searchState is used but when we clear the refinement // the SearchParameters is used. In the first case when we render, the results are not there // so we can't find the value from the results. The most up to date value is the searchState. // But when we clear the refinement the searchState is immediately cleared even when the items // retrieved are still the one from the previous query with the bounding box. It leads to some // issue with the position of the map. We should rely on 1 source of truth or at least always // be sync. var currentRefinementFromSearchState = getCurrentRefinement$1(props, searchState, context); var currentRefinementFromSearchParameters = results && results._state.insideBoundingBox && stringToCurrentRefinement(results._state.insideBoundingBox) || undefined; var currentPositionFromSearchState = getCurrentPosition(props, searchState, context); var currentPositionFromSearchParameters = results && results._state.aroundLatLng && stringToPosition(results._state.aroundLatLng) || undefined; var currentRefinement = currentRefinementFromSearchState || currentRefinementFromSearchParameters; var position = currentPositionFromSearchState || currentPositionFromSearchParameters; return { hits: !results ? [] : results.hits.filter(function (_) { return Boolean(_._geoloc); }), isRefinedWithMap: Boolean(currentRefinement), currentRefinement: currentRefinement, position: position }; }, refine: function refine(props, searchState, nextValue) { return _refine$2(searchState, nextValue, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var currentRefinement = getCurrentRefinement$1(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); if (!currentRefinement) { return searchParameters; } return searchParameters.setQueryParameter('insideBoundingBox', currentRefinementToString(currentRefinement)); }, cleanUp: function cleanUp(props, searchState) { return cleanUpValue(searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }, getBoundingBoxId()); }, getMetadata: function getMetadata(props, searchState) { var items = []; var id = getBoundingBoxId(); var context = { ais: props.contextValue, multiIndexContext: props.indexContextValue }; var index = getIndexId(context); var nextRefinement = {}; var currentRefinement = getCurrentRefinement$1(props, searchState, context); if (currentRefinement) { items.push({ label: "".concat(id, ": ").concat(currentRefinementToString(currentRefinement)), value: function value(nextState) { return _refine$2(nextState, nextRefinement, context); }, currentRefinement: currentRefinement }); } return { id: id, index: index, items: items }; }, shouldComponentUpdate: function shouldComponentUpdate() { return true; } }); var getId$4 = function getId(props) { return props.attributes[0]; }; var namespace$1 = 'hierarchicalMenu'; function getCurrentRefinement$2(props, searchState, context) { var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$4(props)), null); if (currentRefinement === '') { return null; } return currentRefinement; } function getValue(path, props, searchState, context) { var id = props.id, attributes = props.attributes, separator = props.separator, rootPath = props.rootPath, showParentLevel = props.showParentLevel; var currentRefinement = getCurrentRefinement$2(props, searchState, context); var nextRefinement; if (currentRefinement === null) { nextRefinement = path; } else { var tmpSearchParameters = new algoliasearchHelper_1.SearchParameters({ hierarchicalFacets: [{ name: id, attributes: attributes, separator: separator, rootPath: rootPath, showParentLevel: showParentLevel }] }); nextRefinement = tmpSearchParameters.toggleHierarchicalFacetRefinement(id, currentRefinement).toggleHierarchicalFacetRefinement(id, path).getHierarchicalRefinement(id)[0]; } return nextRefinement; } function transformValue$1(value, props, searchState, context) { return value.map(function (v) { return { label: v.name, value: getValue(v.path, props, searchState, context), count: v.count, isRefined: v.isRefined, items: v.data && transformValue$1(v.data, props, searchState, context) }; }); } var truncate = function truncate() { var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; return items.slice(0, limit).map(function () { var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return Array.isArray(item.items) ? _objectSpread({}, item, { items: truncate(item.items, limit) }) : item; }); }; function _refine$3(props, searchState, nextRefinement, context) { var id = getId$4(props); var nextValue = _defineProperty({}, id, nextRefinement || ''); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace$1); } function _cleanUp$1(props, searchState, context) { return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$4(props))); } var sortBy = ['name:asc']; /** * connectHierarchicalMenu connector provides the logic to build a widget that will * give the user the ability to explore a tree-like structure. * This is commonly used for multi-level categorization of products on e-commerce * websites. From a UX point of view, we suggest not displaying more than two levels deep. * @name connectHierarchicalMenu * @requirements To use this widget, your attributes must be formatted in a specific way. * If you want for example to have a hiearchical menu of categories, objects in your index * should be formatted this way: * * ```json * { * "categories.lvl0": "products", * "categories.lvl1": "products > fruits", * "categories.lvl2": "products > fruits > citrus" * } * ``` * * It's also possible to provide more than one path for each level: * * ```json * { * "categories.lvl0": ["products", "goods"], * "categories.lvl1": ["products > fruits", "goods > to eat"] * } * ``` * * All attributes passed to the `attributes` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * * @kind connector * @propType {array.<string>} attributes - List of attributes to use to generate the hierarchy of the menu. See the example for the convention to follow. * @propType {string} [defaultRefinement] - the item value selected by default * @propType {boolean} [showMore=false] - Flag to activate the show more button, for toggling the number of items between limit and showMoreLimit. * @propType {number} [limit=10] - The maximum number of items displayed. * @propType {number} [showMoreLimit=20] - The maximum number of items displayed when the user triggers the show more. Not considered if `showMore` is false. * @propType {string} [separator='>'] - Specifies the level separator used in the data. * @propType {string} [rootPath=null] - The path to use if the first level is not the root level. * @propType {boolean} [showParentLevel=true] - Flag to set if the parent level should be displayed. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{items: object, count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the HierarchicalMenu can display. items has the same shape as parent items. */ var connectHierarchicalMenu = createConnectorWithContext({ displayName: 'AlgoliaHierarchicalMenu', propTypes: { attributes: function attributes(props, propName, componentName) { var isNotString = function isNotString(val) { return typeof val !== 'string'; }; if (!Array.isArray(props[propName]) || props[propName].some(isNotString) || props[propName].length < 1) { return new Error("Invalid prop ".concat(propName, " supplied to ").concat(componentName, ". Expected an Array of Strings")); } return undefined; }, separator: propTypes.string, rootPath: propTypes.string, showParentLevel: propTypes.bool, defaultRefinement: propTypes.string, showMore: propTypes.bool, limit: propTypes.number, showMoreLimit: propTypes.number, transformItems: propTypes.func }, defaultProps: { showMore: false, limit: 10, showMoreLimit: 20, separator: ' > ', rootPath: null, showParentLevel: true }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var showMore = props.showMore, limit = props.limit, showMoreLimit = props.showMoreLimit; var id = getId$4(props); var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var isFacetPresent = Boolean(results) && Boolean(results.getFacetByName(id)); if (!isFacetPresent) { return { items: [], currentRefinement: getCurrentRefinement$2(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), canRefine: false }; } var itemsLimit = showMore ? showMoreLimit : limit; var value = results.getFacetValues(id, { sortBy: sortBy }); var items = value.data ? transformValue$1(value.data, props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }) : []; var transformedItems = props.transformItems ? props.transformItems(items) : items; return { items: truncate(transformedItems, itemsLimit), currentRefinement: getCurrentRefinement$2(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), canRefine: transformedItems.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$3(props, searchState, nextRefinement, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$1(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributes = props.attributes, separator = props.separator, rootPath = props.rootPath, showParentLevel = props.showParentLevel, showMore = props.showMore, limit = props.limit, showMoreLimit = props.showMoreLimit, contextValue = props.contextValue; var id = getId$4(props); var itemsLimit = showMore ? showMoreLimit : limit; searchParameters = searchParameters.addHierarchicalFacet({ name: id, attributes: attributes, separator: separator, rootPath: rootPath, showParentLevel: showParentLevel }).setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit) }); var currentRefinement = getCurrentRefinement$2(props, searchState, { ais: contextValue, multiIndexContext: props.indexContextValue }); if (currentRefinement !== null) { searchParameters = searchParameters.toggleHierarchicalFacetRefinement(id, currentRefinement); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var rootAttribute = props.attributes[0]; var id = getId$4(props); var currentRefinement = getCurrentRefinement$2(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var items = !currentRefinement ? [] : [{ label: "".concat(rootAttribute, ": ").concat(currentRefinement), attribute: rootAttribute, value: function value(nextState) { return _refine$3(props, nextState, '', { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, currentRefinement: currentRefinement }]; return { id: id, index: getIndexId({ ais: props.contextValue, multiIndexContext: props.indexContextValue }), items: items }; } }); var highlight = function highlight(_ref) { var attribute = _ref.attribute, hit = _ref.hit, highlightProperty = _ref.highlightProperty, _ref$preTag = _ref.preTag, preTag = _ref$preTag === void 0 ? HIGHLIGHT_TAGS.highlightPreTag : _ref$preTag, _ref$postTag = _ref.postTag, postTag = _ref$postTag === void 0 ? HIGHLIGHT_TAGS.highlightPostTag : _ref$postTag; return parseAlgoliaHit({ attribute: attribute, highlightProperty: highlightProperty, hit: hit, preTag: preTag, postTag: postTag }); }; /** * connectHighlight connector provides the logic to create an highlighter * component that will retrieve, parse and render an highlighted attribute * from an Algolia hit. * @name connectHighlight * @kind connector * @category connector * @providedPropType {function} highlight - function to retrieve and parse an attribute from a hit. It takes a configuration object with 3 attributes: `highlightProperty` which is the property that contains the highlight structure from the records, `attribute` which is the name of the attribute (it can be either a string or an array of strings) to look for and `hit` which is the hit from Algolia. It returns an array of objects `{value: string, isHighlighted: boolean}`. If the element that corresponds to the attribute is an array of strings, it will return a nested array of objects. * @example * import React from 'react'; * import algoliasearch from 'algoliasearch/lite'; * import { InstantSearch, SearchBox, Hits, connectHighlight } from 'react-instantsearch-dom'; * * const searchClient = algoliasearch( * 'latency', * '6be0576ff61c053d5f9a3225e2a90f76' * ); * * const CustomHighlight = connectHighlight( * ({ highlight, attribute, hit, highlightProperty }) => { * const highlights = highlight({ * highlightProperty: '_highlightResult', * attribute, * hit * }); * * return highlights.map(part => part.isHighlighted ? ( * <mark>{part.value}</mark> * ) : ( * <span>{part.value}</span> * )); * } * ); * * const Hit = ({ hit }) => ( * <p> * <CustomHighlight attribute="name" hit={hit} /> * </p> * ); * * const App = () => ( * <InstantSearch * searchClient={searchClient} * indexName="instant_search" * > * <SearchBox defaultRefinement="pho" /> * <Hits hitComponent={Hit} /> * </InstantSearch> * ); */ var connectHighlight = createConnectorWithContext({ displayName: 'AlgoliaHighlighter', propTypes: {}, getProvidedProps: function getProvidedProps() { return { highlight: highlight }; } }); /** * connectHits connector provides the logic to create connected * components that will render the results retrieved from * Algolia. * * To configure the number of hits retrieved, use [HitsPerPage widget](widgets/HitsPerPage.html), * [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or pass the hitsPerPage * prop to a [Configure](guide/Search_parameters.html) widget. * * **Warning:** you will need to use the **objectID** property available on every hit as a key * when iterating over them. This will ensure you have the best possible UI experience * especially on slow networks. * @name connectHits * @kind connector * @providedPropType {array.<object>} hits - the records that matched the search state * @example * import React from 'react'; * import algoliasearch from 'algoliasearch/lite'; * import { InstantSearch, Highlight, connectHits } from 'react-instantsearch-dom'; * * const searchClient = algoliasearch( * 'latency', * '6be0576ff61c053d5f9a3225e2a90f76' * ); * const CustomHits = connectHits(({ hits }) => ( * <div> * {hits.map(hit => * <p key={hit.objectID}> * <Highlight attribute="name" hit={hit} /> * </p> * )} * </div> * )); * * const App = () => ( * <InstantSearch * searchClient={searchClient} * indexName="instant_search" * > * <CustomHits /> * </InstantSearch> * ); */ var connectHits = createConnectorWithContext({ displayName: 'AlgoliaHits', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); if (!results) { return { hits: [] }; } var hitsWithPositions = addAbsolutePositions(results.hits, results.hitsPerPage, results.page); var hitsWithPositionsAndQueryID = addQueryID(hitsWithPositions, results.queryID); return { hits: hitsWithPositionsAndQueryID }; }, /** * Hits needs to be considered as a widget to trigger a search, * even if no other widgets are used. * * To be considered as a widget you need either: * - getSearchParameters * - getMetadata * - transitionState * * See: createConnector.tsx */ getSearchParameters: function getSearchParameters(searchParameters) { return searchParameters; } }); function getId$5() { return 'hitsPerPage'; } function getCurrentRefinement$3(props, searchState, context) { var id = getId$5(); var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null); if (typeof currentRefinement === 'string') { return parseInt(currentRefinement, 10); } return currentRefinement; } /** * connectHitsPerPage connector provides the logic to create connected * components that will allow a user to choose to display more or less results from Algolia. * @name connectHitsPerPage * @kind connector * @propType {number} defaultRefinement - The number of items selected by default * @propType {{value: number, label: string}[]} items - List of hits per page options. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{isRefined: boolean, label?: string, value: number}>} items - the list of items the HitsPerPage can display. If no label provided, the value will be displayed. */ var connectHitsPerPage = createConnectorWithContext({ displayName: 'AlgoliaHitsPerPage', propTypes: { defaultRefinement: propTypes.number.isRequired, items: propTypes.arrayOf(propTypes.shape({ label: propTypes.string, value: propTypes.number.isRequired })).isRequired, transformItems: propTypes.func }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement$3(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var items = props.items.map(function (item) { return item.value === currentRefinement ? _objectSpread({}, item, { isRefined: true }) : _objectSpread({}, item, { isRefined: false }); }); return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { var id = getId$5(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return refineValue(searchState, nextValue, { ais: props.contextValue, multiIndexContext: props.indexContextValue }, resetPage); }, cleanUp: function cleanUp(props, searchState) { return cleanUpValue(searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }, getId$5()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setHitsPerPage(getCurrentRefinement$3(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue })); }, getMetadata: function getMetadata() { return { id: getId$5() }; } }); function getId$6() { return 'page'; } function getCurrentRefinement$4(props, searchState, context) { var id = getId$6(); var page = 1; var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page); if (typeof currentRefinement === 'string') { return parseInt(currentRefinement, 10); } return currentRefinement; } function getStateWithoutPage(state) { var _ref = state || {}, page = _ref.page, rest = _objectWithoutProperties(_ref, ["page"]); return rest; } function getInMemoryCache() { var cachedHits = undefined; var cachedState = undefined; return { read: function read(_ref2) { var state = _ref2.state; return reactFastCompare(cachedState, getStateWithoutPage(state)) ? cachedHits : null; }, write: function write(_ref3) { var state = _ref3.state, hits = _ref3.hits; cachedState = getStateWithoutPage(state); cachedHits = hits; } }; } function extractHitsFromCachedHits(cachedHits) { return Object.keys(cachedHits).map(Number).sort(function (a, b) { return a - b; }).reduce(function (acc, page) { return acc.concat(cachedHits[page]); }, []); } /** * InfiniteHits connector provides the logic to create connected * components that will render an continuous list of results retrieved from * Algolia. This connector provides a function to load more results. * @name connectInfiniteHits * @kind connector * @providedPropType {array.<object>} hits - the records that matched the search state * @providedPropType {boolean} hasMore - indicates if there are more pages to load * @providedPropType {function} refine - call to load more results */ var connectInfiniteHits = createConnectorWithContext({ displayName: 'AlgoliaInfiniteHits', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var _this = this; var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); this._prevState = this._prevState || {}; var cache = props.cache || getInMemoryCache(); if (this._cachedHits === undefined) { this._cachedHits = cache.read({ state: searchState }) || {}; } if (!results) { return { hits: extractHitsFromCachedHits(this._cachedHits), hasPrevious: false, hasMore: false, refine: function refine() {}, refinePrevious: function refinePrevious() {}, refineNext: function refineNext() {} }; } var page = results.page, hits = results.hits, hitsPerPage = results.hitsPerPage, nbPages = results.nbPages, _results$_state = results._state; _results$_state = _results$_state === void 0 ? {} : _results$_state; var p = _results$_state.page, currentState = _objectWithoutProperties(_results$_state, ["page"]); var hitsWithPositions = addAbsolutePositions(hits, hitsPerPage, page); var hitsWithPositionsAndQueryID = addQueryID(hitsWithPositions, results.queryID); if (!reactFastCompare(currentState, this._prevState)) { this._cachedHits = cache.read({ state: searchState }) || {}; } if (this._cachedHits[page] === undefined) { this._cachedHits[page] = hitsWithPositionsAndQueryID; cache.write({ state: searchState, hits: this._cachedHits }); } this._prevState = currentState; /* Math.min() and Math.max() returns Infinity or -Infinity when no argument is given. But there is always something in this point because of `this._cachedHits[page]`. */ var firstReceivedPage = Math.min.apply(Math, _toConsumableArray(Object.keys(this._cachedHits).map(Number))); var lastReceivedPage = Math.max.apply(Math, _toConsumableArray(Object.keys(this._cachedHits).map(Number))); var hasPrevious = firstReceivedPage > 0; var lastPageIndex = nbPages - 1; var hasMore = lastReceivedPage < lastPageIndex; var refinePrevious = function refinePrevious(event) { return _this.refine(event, firstReceivedPage - 1); }; var refineNext = function refineNext(event) { return _this.refine(event, lastReceivedPage + 1); }; return { hits: extractHitsFromCachedHits(this._cachedHits), hasPrevious: hasPrevious, hasMore: hasMore, refinePrevious: refinePrevious, refineNext: refineNext }; }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQueryParameters({ page: getCurrentRefinement$4(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }) - 1 }); }, refine: function refine(props, searchState, event, index) { var pages = Object.keys(this._cachedHits || {}).map(Number); var lastReceivedPage = pages.length === 0 ? undefined : Math.max.apply(Math, _toConsumableArray(pages)); // If there is no key in `this._cachedHits`, // then `lastReceivedPage` should be `undefined`. if (index === undefined && lastReceivedPage !== undefined) { index = lastReceivedPage + 1; } else if (index === undefined) { index = getCurrentRefinement$4(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); } var id = getId$6(); var nextValue = _defineProperty({}, id, index + 1); var resetPage = false; return refineValue(searchState, nextValue, { ais: props.contextValue, multiIndexContext: props.indexContextValue }, resetPage); } }); var namespace$2 = 'menu'; function getId$7(props) { return props.attribute; } function getCurrentRefinement$5(props, searchState, context) { var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$7(props)), null); if (currentRefinement === '') { return null; } return currentRefinement; } function getValue$1(name, props, searchState, context) { var currentRefinement = getCurrentRefinement$5(props, searchState, context); return name === currentRefinement ? '' : name; } function getLimit(_ref) { var showMore = _ref.showMore, limit = _ref.limit, showMoreLimit = _ref.showMoreLimit; return showMore ? showMoreLimit : limit; } function _refine$4(props, searchState, nextRefinement, context) { var id = getId$7(props); var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : ''); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace$2); } function _cleanUp$2(props, searchState, context) { return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$7(props))); } var defaultSortBy = ['count:desc', 'name:asc']; /** * connectMenu connector provides the logic to build a widget that will * give the user the ability to choose a single value for a specific facet. * @name connectMenu * @requirements The attribute passed to the `attribute` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * @kind connector * @propType {string} attribute - the name of the attribute in the record * @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items * @propType {number} [limit=10] - the minimum number of diplayed items * @propType {number} [showMoreLimit=20] - the maximun number of displayed items. Only used when showMore is set to `true` * @propType {string} [defaultRefinement] - the value of the item selected by default * @propType {boolean} [searchable=false] - allow search inside values * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the Menu can display. * @providedPropType {function} searchForItems - a function to toggle a search inside items values * @providedPropType {boolean} isFromSearch - a boolean that says if the `items` props contains facet values from the global search or from the search inside items. */ var connectMenu = createConnectorWithContext({ displayName: 'AlgoliaMenu', propTypes: { attribute: propTypes.string.isRequired, showMore: propTypes.bool, limit: propTypes.number, showMoreLimit: propTypes.number, defaultRefinement: propTypes.string, transformItems: propTypes.func, searchable: propTypes.bool }, defaultProps: { showMore: false, limit: 10, showMoreLimit: 20 }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, meta, searchForFacetValuesResults) { var attribute = props.attribute, searchable = props.searchable, indexContextValue = props.indexContextValue; var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var canRefine = Boolean(results) && Boolean(results.getFacetByName(attribute)); var isFromSearch = Boolean(searchForFacetValuesResults && searchForFacetValuesResults[attribute] && searchForFacetValuesResults.query !== ''); // Search For Facet Values is not available with derived helper (used for multi index search) if (searchable && indexContextValue) { throw new Error('react-instantsearch: searching in *List is not available when used inside a' + ' multi index context'); } if (!canRefine) { return { items: [], currentRefinement: getCurrentRefinement$5(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), isFromSearch: isFromSearch, searchable: searchable, canRefine: canRefine }; } var items; if (isFromSearch) { items = searchForFacetValuesResults[attribute].map(function (v) { return { label: v.value, value: getValue$1(v.value, props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), _highlightResult: { label: { value: v.highlighted } }, count: v.count, isRefined: v.isRefined }; }); } else { items = results.getFacetValues(attribute, { sortBy: searchable ? undefined : defaultSortBy }).map(function (v) { return { label: v.name, value: getValue$1(v.name, props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), count: v.count, isRefined: v.isRefined }; }); } var transformedItems = props.transformItems ? props.transformItems(items) : items; return { items: transformedItems.slice(0, getLimit(props)), currentRefinement: getCurrentRefinement$5(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), isFromSearch: isFromSearch, searchable: searchable, canRefine: transformedItems.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$4(props, searchState, nextRefinement, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, searchForFacetValues: function searchForFacetValues(props, searchState, nextRefinement) { return { facetName: props.attribute, query: nextRefinement, maxFacetHits: getLimit(props) }; }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$2(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attribute = props.attribute; searchParameters = searchParameters.setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props)) }); searchParameters = searchParameters.addDisjunctiveFacet(attribute); var currentRefinement = getCurrentRefinement$5(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); if (currentRefinement !== null) { searchParameters = searchParameters.addDisjunctiveFacetRefinement(attribute, currentRefinement); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var id = getId$7(props); var currentRefinement = getCurrentRefinement$5(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); return { id: id, index: getIndexId({ ais: props.contextValue, multiIndexContext: props.indexContextValue }), items: currentRefinement === null ? [] : [{ label: "".concat(props.attribute, ": ").concat(currentRefinement), attribute: props.attribute, value: function value(nextState) { return _refine$4(props, nextState, '', { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, currentRefinement: currentRefinement }] }; } }); function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function stringifyItem(item) { if (typeof item.start === 'undefined' && typeof item.end === 'undefined') { return ''; } var start = typeof item.start !== 'undefined' ? item.start : ''; var end = typeof item.end !== 'undefined' ? item.end : ''; return "".concat(start, ":").concat(end); } function parseItem(value) { if (value.length === 0) { return { start: null, end: null }; } var _value$split = value.split(':'), _value$split2 = _slicedToArray(_value$split, 2), startStr = _value$split2[0], endStr = _value$split2[1]; return { start: startStr.length > 0 ? parseInt(startStr, 10) : null, end: endStr.length > 0 ? parseInt(endStr, 10) : null }; } var namespace$3 = 'multiRange'; function getId$8(props) { return props.attribute; } function getCurrentRefinement$6(props, searchState, context) { return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$8(props)), ''); } function isRefinementsRangeIncludesInsideItemRange(stats, start, end) { return stats.min > start && stats.min < end || stats.max > start && stats.max < end; } function isItemRangeIncludedInsideRefinementsRange(stats, start, end) { return start > stats.min && start < stats.max || end > stats.min && end < stats.max; } function itemHasRefinement(attribute, results, value) { var stats = results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null; var range = value.split(':'); var start = Number(range[0]) === 0 || value === '' ? Number.NEGATIVE_INFINITY : Number(range[0]); var end = Number(range[1]) === 0 || value === '' ? Number.POSITIVE_INFINITY : Number(range[1]); return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end))); } function _refine$5(props, searchState, nextRefinement, context) { var nextValue = _defineProperty({}, getId$8(props), nextRefinement); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace$3); } function _cleanUp$3(props, searchState, context) { return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$8(props))); } /** * connectNumericMenu connector provides the logic to build a widget that will * give the user the ability to select a range value for a numeric attribute. * Ranges are defined statically. * @name connectNumericMenu * @requirements The attribute passed to the `attribute` prop must be holding numerical values. * @kind connector * @propType {string} attribute - the name of the attribute in the records * @propType {{label: string, start: number, end: number}[]} items - List of options. With a text label, and upper and lower bounds. * @propType {string} [defaultRefinement] - the value of the item selected by default, follow the shape of a `string` with a pattern of `'{start}:{end}'`. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to select a range. * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied. follow the shape of a `string` with a pattern of `'{start}:{end}'` which corresponds to the current selected item. For instance, when the selected item is `{start: 10, end: 20}`, the searchState of the widget is `'10:20'`. When `start` isn't defined, the searchState of the widget is `':{end}'`, and the same way around when `end` isn't defined. However, when neither `start` nor `end` are defined, the searchState is an empty string. * @providedPropType {array.<{isRefined: boolean, label: string, value: string, isRefined: boolean, noRefinement: boolean}>} items - the list of ranges the NumericMenu can display. */ var connectNumericMenu = createConnectorWithContext({ displayName: 'AlgoliaNumericMenu', propTypes: { id: propTypes.string, attribute: propTypes.string.isRequired, items: propTypes.arrayOf(propTypes.shape({ label: propTypes.node, start: propTypes.number, end: propTypes.number })).isRequired, transformItems: propTypes.func }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var attribute = props.attribute; var currentRefinement = getCurrentRefinement$6(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var items = props.items.map(function (item) { var value = stringifyItem(item); return { label: item.label, value: value, isRefined: value === currentRefinement, noRefinement: results ? itemHasRefinement(getId$8(props), results, value) : false }; }); var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null; var refinedItem = find(items, function (item) { return item.isRefined === true; }); if (!items.some(function (item) { return item.value === ''; })) { items.push({ value: '', isRefined: refinedItem === undefined, noRefinement: !stats, label: 'All' }); } var transformedItems = props.transformItems ? props.transformItems(items) : items; return { items: transformedItems, currentRefinement: currentRefinement, canRefine: transformedItems.length > 0 && transformedItems.some(function (item) { return item.noRefinement === false; }) }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$5(props, searchState, nextRefinement, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$3(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attribute = props.attribute; var _parseItem = parseItem(getCurrentRefinement$6(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue })), start = _parseItem.start, end = _parseItem.end; searchParameters = searchParameters.addDisjunctiveFacet(attribute); if (typeof start === 'number') { searchParameters = searchParameters.addNumericRefinement(attribute, '>=', start); } if (typeof end === 'number') { searchParameters = searchParameters.addNumericRefinement(attribute, '<=', end); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var id = getId$8(props); var value = getCurrentRefinement$6(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var items = []; var index = getIndexId({ ais: props.contextValue, multiIndexContext: props.indexContextValue }); if (value !== '') { var _find = find(props.items, function (item) { return stringifyItem(item) === value; }), label = _find.label; items.push({ label: "".concat(props.attribute, ": ").concat(label), attribute: props.attribute, currentRefinement: label, value: function value(nextState) { return _refine$5(props, nextState, '', { ais: props.contextValue, multiIndexContext: props.indexContextValue }); } }); } return { id: id, index: index, items: items }; } }); function getId$9() { return 'page'; } function getCurrentRefinement$7(props, searchState, context) { var id = getId$9(); var page = 1; var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page); if (typeof currentRefinement === 'string') { return parseInt(currentRefinement, 10); } return currentRefinement; } function _refine$6(props, searchState, nextPage, context) { var id = getId$9(); var nextValue = _defineProperty({}, id, nextPage); var resetPage = false; return refineValue(searchState, nextValue, context, resetPage); } /** * connectPagination connector provides the logic to build a widget that will * let the user displays hits corresponding to a certain page. * @name connectPagination * @kind connector * @propType {boolean} [showFirst=true] - Display the first page link. * @propType {boolean} [showLast=false] - Display the last page link. * @propType {boolean} [showPrevious=true] - Display the previous page link. * @propType {boolean} [showNext=true] - Display the next page link. * @propType {number} [padding=3] - How many page links to display around the current page. * @propType {number} [totalPages=Infinity] - Maximum number of pages to display. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {number} nbPages - the total of existing pages * @providedPropType {number} currentRefinement - the page refinement currently applied */ var connectPagination = createConnectorWithContext({ displayName: 'AlgoliaPagination', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); if (!results) { return null; } var nbPages = results.nbPages; return { nbPages: nbPages, currentRefinement: getCurrentRefinement$7(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), canRefine: nbPages > 1 }; }, refine: function refine(props, searchState, nextPage) { return _refine$6(props, searchState, nextPage, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, cleanUp: function cleanUp(props, searchState) { return cleanUpValue(searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }, getId$9()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setPage(getCurrentRefinement$7(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }) - 1); }, getMetadata: function getMetadata() { return { id: getId$9() }; } }); /** * connectPoweredBy connector provides the logic to build a widget that * will display a link to algolia. * @name connectPoweredBy * @kind connector * @providedPropType {string} url - the url to redirect to algolia */ var connectPoweredBy = createConnectorWithContext({ displayName: 'AlgoliaPoweredBy', getProvidedProps: function getProvidedProps() { var hostname = typeof window === 'undefined' ? '' : window.location.hostname; var url = 'https://www.algolia.com/?' + 'utm_source=react-instantsearch&' + 'utm_medium=website&' + "utm_content=".concat(hostname, "&") + 'utm_campaign=poweredby'; return { url: url }; } }); /** * connectRange connector provides the logic to create connected * components that will give the ability for a user to refine results using * a numeric range. * @name connectRange * @kind connector * @requirements The attribute passed to the `attribute` prop must be present in “attributes for faceting” * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * The values inside the attribute must be JavaScript numbers (not strings). * @propType {string} attribute - Name of the attribute for faceting * @propType {{min?: number, max?: number}} [defaultRefinement] - Default searchState of the widget containing the start and the end of the range. * @propType {number} [min] - Minimum value. When this isn't set, the minimum value will be automatically computed by Algolia using the data in the index. * @propType {number} [max] - Maximum value. When this isn't set, the maximum value will be automatically computed by Algolia using the data in the index. * @propType {number} [precision=0] - Number of digits after decimal point to use. * @providedPropType {function} refine - a function to select a range. * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {number} min - the minimum value available. * @providedPropType {number} max - the maximum value available. * @providedPropType {number} precision - Number of digits after decimal point to use. */ function getId$a(props) { return props.attribute; } var namespace$4 = 'range'; function getCurrentRange(boundaries, stats, precision) { var pow = Math.pow(10, precision); var min; if (typeof boundaries.min === 'number' && isFinite(boundaries.min)) { min = boundaries.min; } else if (typeof stats.min === 'number' && isFinite(stats.min)) { min = stats.min; } else { min = undefined; } var max; if (typeof boundaries.max === 'number' && isFinite(boundaries.max)) { max = boundaries.max; } else if (typeof stats.max === 'number' && isFinite(stats.max)) { max = stats.max; } else { max = undefined; } return { min: min !== undefined ? Math.floor(min * pow) / pow : min, max: max !== undefined ? Math.ceil(max * pow) / pow : max }; } function getCurrentRefinement$8(props, searchState, currentRange, context) { var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$a(props)), {}), min = _getCurrentRefinement.min, max = _getCurrentRefinement.max; var isFloatPrecision = Boolean(props.precision); var nextMin = min; if (typeof nextMin === 'string') { nextMin = isFloatPrecision ? parseFloat(nextMin) : parseInt(nextMin, 10); } var nextMax = max; if (typeof nextMax === 'string') { nextMax = isFloatPrecision ? parseFloat(nextMax) : parseInt(nextMax, 10); } var refinement = { min: nextMin, max: nextMax }; var hasMinBound = props.min !== undefined; var hasMaxBound = props.max !== undefined; var hasMinRefinment = refinement.min !== undefined; var hasMaxRefinment = refinement.max !== undefined; if (hasMinBound && hasMinRefinment && refinement.min < currentRange.min) { throw Error("You can't provide min value lower than range."); } if (hasMaxBound && hasMaxRefinment && refinement.max > currentRange.max) { throw Error("You can't provide max value greater than range."); } if (hasMinBound && !hasMinRefinment) { refinement.min = currentRange.min; } if (hasMaxBound && !hasMaxRefinment) { refinement.max = currentRange.max; } return refinement; } function getCurrentRefinementWithRange(refinement, range) { return { min: refinement.min !== undefined ? refinement.min : range.min, max: refinement.max !== undefined ? refinement.max : range.max }; } function nextValueForRefinement(hasBound, isReset, range, value) { var next; if (!hasBound && range === value) { next = undefined; } else if (hasBound && isReset) { next = range; } else { next = value; } return next; } function _refine$7(props, searchState, nextRefinement, currentRange, context) { var nextMin = nextRefinement.min, nextMax = nextRefinement.max; var currentMinRange = currentRange.min, currentMaxRange = currentRange.max; var isMinReset = nextMin === undefined || nextMin === ''; var isMaxReset = nextMax === undefined || nextMax === ''; var nextMinAsNumber = !isMinReset ? parseFloat(nextMin) : undefined; var nextMaxAsNumber = !isMaxReset ? parseFloat(nextMax) : undefined; var isNextMinValid = isMinReset || isFinite(nextMinAsNumber); var isNextMaxValid = isMaxReset || isFinite(nextMaxAsNumber); if (!isNextMinValid || !isNextMaxValid) { throw Error("You can't provide non finite values to the range connector."); } if (nextMinAsNumber < currentMinRange) { throw Error("You can't provide min value lower than range."); } if (nextMaxAsNumber > currentMaxRange) { throw Error("You can't provide max value greater than range."); } var id = getId$a(props); var resetPage = true; var nextValue = _defineProperty({}, id, { min: nextValueForRefinement(props.min !== undefined, isMinReset, currentMinRange, nextMinAsNumber), max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber) }); return refineValue(searchState, nextValue, context, resetPage, namespace$4); } function _cleanUp$4(props, searchState, context) { return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$a(props))); } var connectRange = createConnectorWithContext({ displayName: 'AlgoliaRange', propTypes: { id: propTypes.string, attribute: propTypes.string.isRequired, defaultRefinement: propTypes.shape({ min: propTypes.number, max: propTypes.number }), min: propTypes.number, max: propTypes.number, precision: propTypes.number, header: propTypes.node, footer: propTypes.node }, defaultProps: { precision: 0 }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var attribute = props.attribute, precision = props.precision, minBound = props.min, maxBound = props.max; var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var hasFacet = results && results.getFacetByName(attribute); var stats = hasFacet ? results.getFacetStats(attribute) || {} : {}; var facetValues = hasFacet ? results.getFacetValues(attribute) : []; var count = facetValues.map(function (v) { return { value: v.name, count: v.count }; }); var _getCurrentRange = getCurrentRange({ min: minBound, max: maxBound }, stats, precision), rangeMin = _getCurrentRange.min, rangeMax = _getCurrentRange.max; // The searchState is not always in sync with the helper state. For example // when we set boundaries on the first render the searchState don't have // the correct refinement. If this behavior change in the upcoming version // we could store the range inside the searchState instead of rely on `this`. this._currentRange = { min: rangeMin, max: rangeMax }; var currentRefinement = getCurrentRefinement$8(props, searchState, this._currentRange, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); return { min: rangeMin, max: rangeMax, canRefine: count.length > 0, currentRefinement: getCurrentRefinementWithRange(currentRefinement, this._currentRange), count: count, precision: precision }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$7(props, searchState, nextRefinement, this._currentRange, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$4(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, getSearchParameters: function getSearchParameters(params, props, searchState) { var attribute = props.attribute; var _getCurrentRefinement2 = getCurrentRefinement$8(props, searchState, this._currentRange, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), min = _getCurrentRefinement2.min, max = _getCurrentRefinement2.max; params = params.addDisjunctiveFacet(attribute); if (min !== undefined) { params = params.addNumericRefinement(attribute, '>=', min); } if (max !== undefined) { params = params.addNumericRefinement(attribute, '<=', max); } return params; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var _this$_currentRange = this._currentRange, minRange = _this$_currentRange.min, maxRange = _this$_currentRange.max; var _getCurrentRefinement3 = getCurrentRefinement$8(props, searchState, this._currentRange, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), minValue = _getCurrentRefinement3.min, maxValue = _getCurrentRefinement3.max; var items = []; var hasMin = minValue !== undefined; var hasMax = maxValue !== undefined; var shouldDisplayMinLabel = hasMin && minValue !== minRange; var shouldDisplayMaxLabel = hasMax && maxValue !== maxRange; if (shouldDisplayMinLabel || shouldDisplayMaxLabel) { var fragments = [hasMin ? "".concat(minValue, " <= ") : '', props.attribute, hasMax ? " <= ".concat(maxValue) : '']; items.push({ label: fragments.join(''), attribute: props.attribute, value: function value(nextState) { return _refine$7(props, nextState, {}, _this._currentRange, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, currentRefinement: getCurrentRefinementWithRange({ min: minValue, max: maxValue }, { min: minRange, max: maxRange }) }); } return { id: getId$a(props), index: getIndexId({ ais: props.contextValue, multiIndexContext: props.indexContextValue }), items: items }; } }); var namespace$5 = 'refinementList'; function getId$b(props) { return props.attribute; } function getCurrentRefinement$9(props, searchState, context) { var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$b(props)), []); if (typeof currentRefinement !== 'string') { return currentRefinement; } if (currentRefinement) { return [currentRefinement]; } return []; } function getValue$2(name, props, searchState, context) { var currentRefinement = getCurrentRefinement$9(props, searchState, context); var isAnewValue = currentRefinement.indexOf(name) === -1; var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates : currentRefinement.filter(function (selectedValue) { return selectedValue !== name; }); // cannot use .splice(), it mutates return nextRefinement; } function getLimit$1(_ref) { var showMore = _ref.showMore, limit = _ref.limit, showMoreLimit = _ref.showMoreLimit; return showMore ? showMoreLimit : limit; } function _refine$8(props, searchState, nextRefinement, context) { var id = getId$b(props); // Setting the value to an empty string ensures that it is persisted in // the URL as an empty value. // This is necessary in the case where `defaultRefinement` contains one // item and we try to deselect it. `nextSelected` would be an empty array, // which would not be persisted to the URL. // {foo: ['bar']} => "foo[0]=bar" // {foo: []} => "" var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : ''); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace$5); } function _cleanUp$5(props, searchState, context) { return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$b(props))); } /** * connectRefinementList connector provides the logic to build a widget that will * give the user the ability to choose multiple values for a specific facet. * @name connectRefinementList * @kind connector * @requirements The attribute passed to the `attribute` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * @propType {string} attribute - the name of the attribute in the record * @propType {boolean} [searchable=false] - allow search inside values * @propType {string} [operator=or] - How to apply the refinements. Possible values: 'or' or 'and'. * @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items * @propType {number} [limit=10] - the minimum number of displayed items * @propType {number} [showMoreLimit=20] - the maximun number of displayed items. Only used when showMore is set to `true` * @propType {string[]} defaultRefinement - the values of the items selected by default. The searchState of this widget takes the form of a list of `string`s, which correspond to the values of all selected refinements. However, when there are no refinements selected, the value of the searchState is an empty string. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string[]} currentRefinement - the refinement currently applied * @providedPropType {array.<{count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the RefinementList can display. * @providedPropType {function} searchForItems - a function to toggle a search inside items values * @providedPropType {boolean} isFromSearch - a boolean that says if the `items` props contains facet values from the global search or from the search inside items. * @providedPropType {boolean} canRefine - a boolean that says whether you can refine */ var sortBy$1 = ['isRefined', 'count:desc', 'name:asc']; var connectRefinementList = createConnectorWithContext({ displayName: 'AlgoliaRefinementList', propTypes: { id: propTypes.string, attribute: propTypes.string.isRequired, operator: propTypes.oneOf(['and', 'or']), showMore: propTypes.bool, limit: propTypes.number, showMoreLimit: propTypes.number, defaultRefinement: propTypes.arrayOf(propTypes.oneOfType([propTypes.string, propTypes.number])), searchable: propTypes.bool, transformItems: propTypes.func }, defaultProps: { operator: 'or', showMore: false, limit: 10, showMoreLimit: 20 }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata, searchForFacetValuesResults) { var attribute = props.attribute, searchable = props.searchable, indexContextValue = props.indexContextValue; var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var canRefine = Boolean(results) && Boolean(results.getFacetByName(attribute)); var isFromSearch = Boolean(searchForFacetValuesResults && searchForFacetValuesResults[attribute] && searchForFacetValuesResults.query !== ''); // Search For Facet Values is not available with derived helper (used for multi index search) if (searchable && indexContextValue) { throw new Error('react-instantsearch: searching in *List is not available when used inside a' + ' multi index context'); } if (!canRefine) { return { items: [], currentRefinement: getCurrentRefinement$9(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), canRefine: canRefine, isFromSearch: isFromSearch, searchable: searchable }; } var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) { return { label: v.value, value: getValue$2(v.value, props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), _highlightResult: { label: { value: v.highlighted } }, count: v.count, isRefined: v.isRefined }; }) : results.getFacetValues(attribute, { sortBy: sortBy$1 }).map(function (v) { return { label: v.name, value: getValue$2(v.name, props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), count: v.count, isRefined: v.isRefined }; }); var transformedItems = props.transformItems ? props.transformItems(items) : items; return { items: transformedItems.slice(0, getLimit$1(props)), currentRefinement: getCurrentRefinement$9(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), isFromSearch: isFromSearch, searchable: searchable, canRefine: transformedItems.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$8(props, searchState, nextRefinement, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, searchForFacetValues: function searchForFacetValues(props, searchState, nextRefinement) { return { facetName: props.attribute, query: nextRefinement, maxFacetHits: getLimit$1(props) }; }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$5(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attribute = props.attribute, operator = props.operator; var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet'; var addRefinementKey = "".concat(addKey, "Refinement"); searchParameters = searchParameters.setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props)) }); searchParameters = searchParameters[addKey](attribute); return getCurrentRefinement$9(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }).reduce(function (res, val) { return res[addRefinementKey](attribute, val); }, searchParameters); }, getMetadata: function getMetadata(props, searchState) { var id = getId$b(props); var context = { ais: props.contextValue, multiIndexContext: props.indexContextValue }; return { id: id, index: getIndexId(context), items: getCurrentRefinement$9(props, searchState, context).length > 0 ? [{ attribute: props.attribute, label: "".concat(props.attribute, ": "), currentRefinement: getCurrentRefinement$9(props, searchState, context), value: function value(nextState) { return _refine$8(props, nextState, [], context); }, items: getCurrentRefinement$9(props, searchState, context).map(function (item) { return { label: "".concat(item), value: function value(nextState) { var nextSelectedItems = getCurrentRefinement$9(props, nextState, context).filter(function (other) { return other !== item; }); return _refine$8(props, searchState, nextSelectedItems, context); } }; }) }] : [] }; } }); /** * connectScrollTo connector provides the logic to build a widget that will * let the page scroll to a certain point. * @name connectScrollTo * @kind connector * @propType {string} [scrollOn="page"] - Widget searchState key on which to listen for changes, default to the pagination widget. * @providedPropType {any} value - the current refinement applied to the widget listened by scrollTo * @providedPropType {boolean} hasNotChanged - indicates whether the refinement came from the scrollOn argument (for instance page by default) */ var connectScrollTo = createConnectorWithContext({ displayName: 'AlgoliaScrollTo', propTypes: { scrollOn: propTypes.string }, defaultProps: { scrollOn: 'page' }, getProvidedProps: function getProvidedProps(props, searchState) { var id = props.scrollOn; var value = getCurrentRefinementValue(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }, id, null); if (!this._prevSearchState) { this._prevSearchState = {}; } // Get the subpart of the state that interest us if (hasMultipleIndices({ ais: props.contextValue, multiIndexContext: props.indexContextValue })) { searchState = searchState.indices ? searchState.indices[getIndexId({ ais: props.contextValue, multiIndexContext: props.indexContextValue })] : {}; } // if there is a change in the app that has been triggered by another element // than "props.scrollOn (id) or the Configure widget, we need to keep track of // the search state to know if there's a change in the app that was not triggered // by the props.scrollOn (id) or the Configure widget. This is useful when // using ScrollTo in combination of Pagination. As pagination can be change // by every widget, we want to scroll only if it cames from the pagination // widget itself. We also remove the configure key from the search state to // do this comparison because for now configure values are not present in the // search state before a first refinement has been made and will false the results. // See: https://github.com/algolia/react-instantsearch/issues/164 var cleanedSearchState = omit(searchState, ['configure', id]); var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState); this._prevSearchState = cleanedSearchState; return { value: value, hasNotChanged: hasNotChanged }; } }); function getId$c() { return 'query'; } function getCurrentRefinement$a(props, searchState, context) { var id = getId$c(); var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, ''); if (currentRefinement) { return currentRefinement; } return ''; } function _refine$9(props, searchState, nextRefinement, context) { var id = getId$c(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage); } function _cleanUp$6(props, searchState, context) { return cleanUpValue(searchState, context, getId$c()); } /** * connectSearchBox connector provides the logic to build a widget that will * let the user search for a query * @name connectSearchBox * @kind connector * @propType {string} [defaultRefinement] - Provide a default value for the query * @providedPropType {function} refine - a function to change the current query * @providedPropType {string} currentRefinement - the current query used * @providedPropType {boolean} isSearchStalled - a flag that indicates if InstantSearch has detected that searches are stalled */ var connectSearchBox = createConnectorWithContext({ displayName: 'AlgoliaSearchBox', propTypes: { defaultRefinement: propTypes.string }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { return { currentRefinement: getCurrentRefinement$a(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }), isSearchStalled: searchResults.isSearchStalled }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$9(props, searchState, nextRefinement, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$6(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQuery(getCurrentRefinement$a(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue })); }, getMetadata: function getMetadata(props, searchState) { var id = getId$c(); var currentRefinement = getCurrentRefinement$a(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); return { id: id, index: getIndexId({ ais: props.contextValue, multiIndexContext: props.indexContextValue }), items: currentRefinement === null ? [] : [{ label: "".concat(id, ": ").concat(currentRefinement), value: function value(nextState) { return _refine$9(props, nextState, '', { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, currentRefinement: currentRefinement }] }; } }); function getId$d() { return 'sortBy'; } function getCurrentRefinement$b(props, searchState, context) { var id = getId$d(); var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null); if (currentRefinement) { return currentRefinement; } return null; } /** * The connectSortBy connector provides the logic to build a widget that will * display a list of indices. This allows a user to change how the hits are being sorted. * @name connectSortBy * @requirements Algolia handles sorting by creating replica indices. [Read more about sorting](https://www.algolia.com/doc/guides/relevance/sorting/) on * the Algolia website. * @kind connector * @propType {string} defaultRefinement - The default selected index. * @propType {{value: string, label: string}[]} items - The list of indexes to search in. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string[]} currentRefinement - the refinement currently applied * @providedPropType {array.<{isRefined: boolean, label?: string, value: string}>} items - the list of items the HitsPerPage can display. If no label provided, the value will be displayed. */ var connectSortBy = createConnectorWithContext({ displayName: 'AlgoliaSortBy', propTypes: { defaultRefinement: propTypes.string, items: propTypes.arrayOf(propTypes.shape({ label: propTypes.string, value: propTypes.string.isRequired })).isRequired, transformItems: propTypes.func }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement$b(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var items = props.items.map(function (item) { return item.value === currentRefinement ? _objectSpread({}, item, { isRefined: true }) : _objectSpread({}, item, { isRefined: false }); }); return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { var id = getId$d(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return refineValue(searchState, nextValue, { ais: props.contextValue, multiIndexContext: props.indexContextValue }, resetPage); }, cleanUp: function cleanUp(props, searchState) { return cleanUpValue(searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }, getId$d()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var selectedIndex = getCurrentRefinement$b(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); return searchParameters.setIndex(selectedIndex); }, getMetadata: function getMetadata() { return { id: getId$d() }; } }); /** * The `connectStateResults` connector provides a way to access the `searchState` and the `searchResults` * of InstantSearch. * For instance this connector allows you to create results/noResults or query/noQuery pages. * @name connectStateResults * @kind connector * @providedPropType {object} searchState - The search state of the instant search component. <br/><br/> See: [Search state structure](https://community.algolia.com/react-instantsearch/guide/Search_state.html) * @providedPropType {object} searchResults - The search results. <br/><br/> In case of multiple indices: if used under `<Index>`, results will be those of the corresponding index otherwise it'll be those of the root index See: [Search results structure](https://community.algolia.com/algoliasearch-helper-js/reference.html#searchresults) * @providedPropType {object} allSearchResults - In case of multiple indices you can retrieve all the results * @providedPropType {string} error - If the search failed, the error will be logged here. * @providedPropType {boolean} searching - If there is a search in progress. * @providedPropType {boolean} isSearchStalled - Flag that indicates if React InstantSearch has detected that searches are stalled. * @providedPropType {boolean} searchingForFacetValues - If there is a search in a list in progress. * @providedPropType {object} props - component props. * @example * import React from 'react'; * import algoliasearch from 'algoliasearch/lite'; * import { InstantSearch, SearchBox, Hits, connectStateResults } from 'react-instantsearch-dom'; * * const searchClient = algoliasearch( * 'latency', * '6be0576ff61c053d5f9a3225e2a90f76' * ); * * const Content = connectStateResults(({ searchState, searchResults }) => { * const hasResults = searchResults && searchResults.nbHits !== 0; * * return ( * <div> * <div hidden={!hasResults}> * <Hits /> * </div> * <div hidden={hasResults}> * <div>No results has been found for {searchState.query}</div> * </div> * </div> * ); * }); * * const App = () => ( * <InstantSearch * searchClient={searchClient} * indexName="instant_search" * > * <SearchBox /> * <Content /> * </InstantSearch> * ); */ var connectStateResults = createConnectorWithContext({ displayName: 'AlgoliaStateResults', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); return { searchState: searchState, searchResults: results, allSearchResults: searchResults.results, searching: searchResults.searching, isSearchStalled: searchResults.isSearchStalled, error: searchResults.error, searchingForFacetValues: searchResults.searchingForFacetValues, props: props }; } }); /** * connectStats connector provides the logic to build a widget that will * displays algolia search statistics (hits number and processing time). * @name connectStats * @kind connector * @providedPropType {number} nbHits - number of hits returned by Algolia. * @providedPropType {number} processingTimeMS - the time in ms took by Algolia to search for results. */ var connectStats = createConnectorWithContext({ displayName: 'AlgoliaStats', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); if (!results) { return null; } return { nbHits: results.nbHits, processingTimeMS: results.processingTimeMS }; } }); function getId$e(props) { return props.attribute; } var namespace$6 = 'toggle'; var falsyStrings = ['0', 'false', 'null', 'undefined']; function getCurrentRefinement$c(props, searchState, context) { var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)), false); if (falsyStrings.indexOf(currentRefinement) !== -1) { return false; } return Boolean(currentRefinement); } function _refine$a(props, searchState, nextRefinement, context) { var id = getId$e(props); var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false); var resetPage = true; return refineValue(searchState, nextValue, context, resetPage, namespace$6); } function _cleanUp$7(props, searchState, context) { return cleanUpValue(searchState, context, "".concat(namespace$6, ".").concat(getId$e(props))); } /** * connectToggleRefinement connector provides the logic to build a widget that will * provides an on/off filtering feature based on an attribute value. * @name connectToggleRefinement * @kind connector * @requirements To use this widget, you'll need an attribute to toggle on. * * You can't toggle on null or not-null values. If you want to address this particular use-case you'll need to compute an * extra boolean attribute saying if the value exists or not. See this [thread](https://discourse.algolia.com/t/how-to-create-a-toggle-for-the-absence-of-a-string-attribute/2460) for more details. * * @propType {string} attribute - Name of the attribute on which to apply the `value` refinement. Required when `value` is present. * @propType {string} label - Label for the toggle. * @propType {string} value - Value of the refinement to apply on `attribute`. * @propType {boolean} [defaultRefinement=false] - Default searchState of the widget. Should the toggle be checked by default? * @providedPropType {boolean} currentRefinement - `true` when the refinement is applied, `false` otherwise * @providedPropType {object} count - an object that contains the count for `checked` and `unchecked` state * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state */ var connectToggleRefinement = createConnectorWithContext({ displayName: 'AlgoliaToggle', propTypes: { label: propTypes.string.isRequired, attribute: propTypes.string.isRequired, value: propTypes.any.isRequired, filter: propTypes.func, defaultRefinement: propTypes.bool }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var attribute = props.attribute, value = props.value; var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var currentRefinement = getCurrentRefinement$c(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null; var facetValue = // Use null to always be consistent with type of the value // count: number | null allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) { return item.name === value.toString(); }) : null; var facetValueCount = facetValue && facetValue.count; var allFacetValuesCount = // Use null to always be consistent with type of the value // count: number | null allFacetValues && allFacetValues.length ? allFacetValues.reduce(function (acc, item) { return acc + item.count; }, 0) : null; var canRefine = currentRefinement ? allFacetValuesCount !== null && allFacetValuesCount > 0 : facetValueCount !== null && facetValueCount > 0; var count = { checked: allFacetValuesCount, unchecked: facetValueCount }; return { currentRefinement: currentRefinement, canRefine: canRefine, count: count }; }, refine: function refine(props, searchState, nextRefinement) { return _refine$a(props, searchState, nextRefinement, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp$7(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attribute = props.attribute, value = props.value, filter = props.filter; var checked = getCurrentRefinement$c(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var nextSearchParameters = searchParameters.addDisjunctiveFacet(attribute); if (checked) { nextSearchParameters = nextSearchParameters.addDisjunctiveFacetRefinement(attribute, value); if (filter) { nextSearchParameters = filter(nextSearchParameters); } } return nextSearchParameters; }, getMetadata: function getMetadata(props, searchState) { var id = getId$e(props); var checked = getCurrentRefinement$c(props, searchState, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var items = []; var index = getIndexId({ ais: props.contextValue, multiIndexContext: props.indexContextValue }); if (checked) { items.push({ label: props.label, currentRefinement: checked, attribute: props.attribute, value: function value(nextState) { return _refine$a(props, nextState, false, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); } }); } return { id: id, index: index, items: items }; } }); function inferPayload(_ref) { var method = _ref.method, results = _ref.results, currentHit = _ref.currentHit; var index = results.index; var queryID = currentHit.__queryID; var objectIDs = [currentHit.objectID]; if (!queryID) { throw new Error("Could not infer `queryID`. Ensure `clickAnalytics: true` was added with the Configure widget.\nSee: https://alg.li/VpPpLt"); } switch (method) { case 'clickedObjectIDsAfterSearch': { var positions = [currentHit.__position]; return { index: index, queryID: queryID, objectIDs: objectIDs, positions: positions }; } case 'convertedObjectIDsAfterSearch': return { index: index, queryID: queryID, objectIDs: objectIDs }; default: throw new Error("Unsupported method \"".concat(method, "\" passed to the insights function. The supported methods are: \"clickedObjectIDsAfterSearch\", \"convertedObjectIDsAfterSearch\".")); } } var wrapInsightsClient = function wrapInsightsClient(aa, results, currentHit) { return function (method, payload) { if (typeof aa !== 'function') { throw new TypeError("Expected insightsClient to be a Function"); } var inferredPayload = inferPayload({ method: method, results: results, currentHit: currentHit }); aa(method, _objectSpread({}, inferredPayload, payload)); }; }; var connectHitInsights = (function (insightsClient) { return createConnectorWithContext({ displayName: 'AlgoliaInsights', getProvidedProps: function getProvidedProps(props, _, searchResults) { var results = getResults(searchResults, { ais: props.contextValue, multiIndexContext: props.indexContextValue }); var insights = wrapInsightsClient(insightsClient, results, props.hit); return { insights: insights }; } }); }); exports.EXPERIMENTAL_connectConfigureRelatedItems = connectConfigureRelatedItems; exports.connectAutoComplete = connectAutoComplete; exports.connectBreadcrumb = connectBreadcrumb; exports.connectConfigure = connectConfigure; exports.connectCurrentRefinements = connectCurrentRefinements; exports.connectGeoSearch = connectGeoSearch; exports.connectHierarchicalMenu = connectHierarchicalMenu; exports.connectHighlight = connectHighlight; exports.connectHitInsights = connectHitInsights; exports.connectHits = connectHits; exports.connectHitsPerPage = connectHitsPerPage; exports.connectInfiniteHits = connectInfiniteHits; exports.connectMenu = connectMenu; exports.connectNumericMenu = connectNumericMenu; exports.connectPagination = connectPagination; exports.connectPoweredBy = connectPoweredBy; exports.connectRange = connectRange; exports.connectRefinementList = connectRefinementList; exports.connectScrollTo = connectScrollTo; exports.connectSearchBox = connectSearchBox; exports.connectSortBy = connectSortBy; exports.connectStateResults = connectStateResults; exports.connectStats = connectStats; exports.connectToggleRefinement = connectToggleRefinement; Object.defineProperty(exports, '__esModule', { value: true }); })); //# sourceMappingURL=Connectors.js.map
ajax/libs/material-ui/4.9.3/esm/CardHeader/CardHeader.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import Typography from '../Typography'; export var styles = { /* Styles applied to the root element. */ root: { display: 'flex', alignItems: 'center', padding: 16 }, /* Styles applied to the avatar element. */ avatar: { flex: '0 0 auto', marginRight: 16 }, /* Styles applied to the action element. */ action: { flex: '0 0 auto', alignSelf: 'flex-start', marginTop: -8, marginRight: -8 }, /* Styles applied to the content wrapper element. */ content: { flex: '1 1 auto' }, /* Styles applied to the title Typography element. */ title: {}, /* Styles applied to the subheader Typography element. */ subheader: {} }; var CardHeader = React.forwardRef(function CardHeader(props, ref) { var action = props.action, avatar = props.avatar, classes = props.classes, className = props.className, _props$component = props.component, Component = _props$component === void 0 ? 'div' : _props$component, _props$disableTypogra = props.disableTypography, disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra, subheaderProp = props.subheader, subheaderTypographyProps = props.subheaderTypographyProps, titleProp = props.title, titleTypographyProps = props.titleTypographyProps, other = _objectWithoutProperties(props, ["action", "avatar", "classes", "className", "component", "disableTypography", "subheader", "subheaderTypographyProps", "title", "titleTypographyProps"]); var title = titleProp; if (title != null && title.type !== Typography && !disableTypography) { title = React.createElement(Typography, _extends({ variant: avatar ? 'body2' : 'h5', className: classes.title, component: "span", display: "block" }, titleTypographyProps), title); } var subheader = subheaderProp; if (subheader != null && subheader.type !== Typography && !disableTypography) { subheader = React.createElement(Typography, _extends({ variant: avatar ? 'body2' : 'body1', className: classes.subheader, color: "textSecondary", component: "span", display: "block" }, subheaderTypographyProps), subheader); } return React.createElement(Component, _extends({ className: clsx(classes.root, className), ref: ref }, other), avatar && React.createElement("div", { className: classes.avatar }, avatar), React.createElement("div", { className: classes.content }, title, subheader), action && React.createElement("div", { className: classes.action }, action)); }); process.env.NODE_ENV !== "production" ? CardHeader.propTypes = { /** * The action to display in the card header. */ action: PropTypes.node, /** * The Avatar for the Card Header. */ avatar: PropTypes.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: PropTypes.elementType, /** * If `true`, `subheader` and `title` won't be wrapped by a Typography component. * This can be useful to render an alternative Typography variant by wrapping * the `title` text, and optional `subheader` text * with the Typography component. */ disableTypography: PropTypes.bool, /** * The content of the component. */ subheader: PropTypes.node, /** * These props will be forwarded to the subheader * (as long as disableTypography is not `true`). */ subheaderTypographyProps: PropTypes.object, /** * The content of the Card Title. */ title: PropTypes.node, /** * These props will be forwarded to the title * (as long as disableTypography is not `true`). */ titleTypographyProps: PropTypes.object } : void 0; export default withStyles(styles, { name: 'MuiCardHeader' })(CardHeader);
ajax/libs/primereact/7.0.0-rc.1/slidemenu/slidemenu.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { classNames, ObjectUtils, OverlayService, ZIndexUtils, DomHandler, ConnectedOverlayScrollHandler, CSSTransition, Portal } from 'primereact/core'; function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var SlideMenuSub = /*#__PURE__*/function (_Component) { _inherits(SlideMenuSub, _Component); var _super = _createSuper(SlideMenuSub); function SlideMenuSub(props) { var _this; _classCallCheck(this, SlideMenuSub); _this = _super.call(this, props); _this.state = { activeItem: null }; return _this; } _createClass(SlideMenuSub, [{ key: "onItemClick", value: function onItemClick(event, item) { if (item.disabled) { event.preventDefault(); return; } if (!item.url) { event.preventDefault(); } if (item.command) { item.command({ originalEvent: event, item: item }); } if (item.items) { this.setState({ activeItem: item }); this.props.onForward(); } } }, { key: "renderSeparator", value: function renderSeparator(index) { return /*#__PURE__*/React.createElement("li", { key: 'separator_' + index, className: "p-menu-separator" }); } }, { key: "renderSubmenu", value: function renderSubmenu(item) { if (item.items) { return /*#__PURE__*/React.createElement(SlideMenuSub, { model: item.items, index: this.props.index + 1, menuWidth: this.props.menuWidth, effectDuration: this.props.effectDuration, onForward: this.props.onForward, parentActive: item === this.state.activeItem }); } return null; } }, { key: "renderMenuitem", value: function renderMenuitem(item, index) { var _this2 = this; var active = this.state.activeItem === item; var className = classNames('p-menuitem', { 'p-menuitem-active': active, 'p-disabled': item.disabled }, item.className); var iconClassName = classNames('p-menuitem-icon', item.icon); var submenuIconClassName = 'p-submenu-icon pi pi-fw pi-angle-right'; var icon = item.icon && /*#__PURE__*/React.createElement("span", { className: iconClassName }); var label = item.label && /*#__PURE__*/React.createElement("span", { className: "p-menuitem-text" }, item.label); var submenuIcon = item.items && /*#__PURE__*/React.createElement("span", { className: submenuIconClassName }); var submenu = this.renderSubmenu(item); var content = /*#__PURE__*/React.createElement("a", { href: item.url || '#', className: "p-menuitem-link", target: item.target, onClick: function onClick(event) { return _this2.onItemClick(event, item, index); }, "aria-disabled": item.disabled }, icon, label, submenuIcon); if (item.template) { var defaultContentOptions = { onClick: function onClick(event) { return _this2.onItemClick(event, item, index); }, className: 'p-menuitem-link', labelClassName: 'p-menuitem-text', iconClassName: iconClassName, submenuIconClassName: submenuIconClassName, element: content, props: this.props, active: active }; content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions); } return /*#__PURE__*/React.createElement("li", { key: item.label + '_' + index, className: className, style: item.style }, content, submenu); } }, { key: "renderItem", value: function renderItem(item, index) { if (item.separator) return this.renderSeparator(index);else return this.renderMenuitem(item, index); } }, { key: "renderItems", value: function renderItems() { var _this3 = this; if (this.props.model) { return this.props.model.map(function (item, index) { return _this3.renderItem(item, index); }); } return null; } }, { key: "render", value: function render() { var className = classNames({ 'p-slidemenu-rootlist': this.props.root, 'p-submenu-list': !this.props.root, 'p-active-submenu': this.props.parentActive }); var style = { width: this.props.menuWidth + 'px', left: this.props.root ? -1 * this.props.level * this.props.menuWidth + 'px' : this.props.menuWidth + 'px', transitionProperty: this.props.root ? 'left' : 'none', transitionDuration: this.props.effectDuration + 'ms', transitionTimingFunction: this.props.easing }; var items = this.renderItems(); return /*#__PURE__*/React.createElement("ul", { className: className, style: style }, items); } }]); return SlideMenuSub; }(Component); _defineProperty(SlideMenuSub, "defaultProps", { model: null, level: 0, easing: 'ease-out', effectDuration: 250, menuWidth: 190, parentActive: false, onForward: null }); var SlideMenu = /*#__PURE__*/function (_Component2) { _inherits(SlideMenu, _Component2); var _super2 = _createSuper(SlideMenu); function SlideMenu(props) { var _this4; _classCallCheck(this, SlideMenu); _this4 = _super2.call(this, props); _this4.state = { level: 0, visible: false }; _this4.navigateBack = _this4.navigateBack.bind(_assertThisInitialized(_this4)); _this4.navigateForward = _this4.navigateForward.bind(_assertThisInitialized(_this4)); _this4.onEnter = _this4.onEnter.bind(_assertThisInitialized(_this4)); _this4.onEntered = _this4.onEntered.bind(_assertThisInitialized(_this4)); _this4.onExit = _this4.onExit.bind(_assertThisInitialized(_this4)); _this4.onExited = _this4.onExited.bind(_assertThisInitialized(_this4)); _this4.onPanelClick = _this4.onPanelClick.bind(_assertThisInitialized(_this4)); _this4.menuRef = /*#__PURE__*/React.createRef(); return _this4; } _createClass(SlideMenu, [{ key: "onPanelClick", value: function onPanelClick(event) { if (this.props.popup) { OverlayService.emit('overlay-click', { originalEvent: event, target: this.target }); } } }, { key: "navigateForward", value: function navigateForward() { this.setState({ level: this.state.level + 1 }); } }, { key: "navigateBack", value: function navigateBack() { this.setState({ level: this.state.level - 1 }); } }, { key: "renderBackward", value: function renderBackward() { var _this5 = this; var className = classNames('p-slidemenu-backward', { 'p-hidden': this.state.level === 0 }); return /*#__PURE__*/React.createElement("div", { ref: function ref(el) { return _this5.backward = el; }, className: className, onClick: this.navigateBack }, /*#__PURE__*/React.createElement("span", { className: "p-slidemenu-backward-icon pi pi-fw pi-chevron-left" }), /*#__PURE__*/React.createElement("span", null, this.props.backLabel)); } }, { key: "toggle", value: function toggle(event) { if (this.props.popup) { if (this.state.visible) this.hide(event);else this.show(event); } } }, { key: "show", value: function show(event) { var _this6 = this; this.target = event.currentTarget; var currentEvent = event; this.setState({ visible: true }, function () { if (_this6.props.onShow) { _this6.props.onShow(currentEvent); } }); } }, { key: "hide", value: function hide(event) { var _this7 = this; var currentEvent = event; this.setState({ visible: false }, function () { if (_this7.props.onHide) { _this7.props.onHide(currentEvent); } }); } }, { key: "onEnter", value: function onEnter() { if (this.props.autoZIndex) { ZIndexUtils.set('menu', this.menuRef.current, this.props.baseZIndex); } DomHandler.absolutePosition(this.menuRef.current, this.target); } }, { key: "onEntered", value: function onEntered() { this.bindDocumentClickListener(); this.bindDocumentResizeListener(); this.bindScrollListener(); } }, { key: "onExit", value: function onExit() { this.target = null; this.unbindDocumentClickListener(); this.unbindDocumentResizeListener(); this.unbindScrollListener(); } }, { key: "onExited", value: function onExited() { ZIndexUtils.clear(this.menuRef.current); this.setState({ level: 0 }); } }, { key: "bindDocumentClickListener", value: function bindDocumentClickListener() { var _this8 = this; if (!this.documentClickListener) { this.documentClickListener = function (event) { if (_this8.state.visible && _this8.isOutsideClicked(event)) { _this8.hide(event); } }; document.addEventListener('click', this.documentClickListener); } } }, { key: "isOutsideClicked", value: function isOutsideClicked(event) { return this.menuRef && this.menuRef.current && !(this.menuRef.current.isSameNode(event.target) || this.menuRef.current.contains(event.target)); } }, { key: "bindDocumentResizeListener", value: function bindDocumentResizeListener() { var _this9 = this; if (!this.documentResizeListener) { this.documentResizeListener = function (event) { if (_this9.state.visible && !DomHandler.isAndroid()) { _this9.hide(event); } }; window.addEventListener('resize', this.documentResizeListener); } } }, { key: "unbindDocumentClickListener", value: function unbindDocumentClickListener() { if (this.documentClickListener) { document.removeEventListener('click', this.documentClickListener); this.documentClickListener = null; } } }, { key: "unbindDocumentResizeListener", value: function unbindDocumentResizeListener() { if (this.documentResizeListener) { window.removeEventListener('resize', this.documentResizeListener); this.documentResizeListener = null; } } }, { key: "bindScrollListener", value: function bindScrollListener() { var _this10 = this; if (!this.scrollHandler) { this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, function (event) { if (_this10.state.visible) { _this10.hide(event); } }); } this.scrollHandler.bindScrollListener(); } }, { key: "unbindScrollListener", value: function unbindScrollListener() { if (this.scrollHandler) { this.scrollHandler.unbindScrollListener(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { if (this.props.model !== prevProps.model) { this.setState({ level: 0 }); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.unbindDocumentClickListener(); this.unbindDocumentResizeListener(); if (this.scrollHandler) { this.scrollHandler.destroy(); this.scrollHandler = null; } ZIndexUtils.clear(this.menuRef.current); } }, { key: "renderElement", value: function renderElement() { var _this11 = this; var className = classNames('p-slidemenu p-component', { 'p-slidemenu-overlay': this.props.popup }, this.props.className); var backward = this.renderBackward(); return /*#__PURE__*/React.createElement(CSSTransition, { nodeRef: this.menuRef, classNames: "p-connected-overlay", in: !this.props.popup || this.state.visible, timeout: { enter: 120, exit: 100 }, options: this.props.transitionOptions, unmountOnExit: true, onEnter: this.onEnter, onEntered: this.onEntered, onExit: this.onExit, onExited: this.onExited }, /*#__PURE__*/React.createElement("div", { ref: this.menuRef, id: this.props.id, className: className, style: this.props.style, onClick: this.onPanelClick }, /*#__PURE__*/React.createElement("div", { className: "p-slidemenu-wrapper", style: { height: this.props.viewportHeight + 'px' } }, /*#__PURE__*/React.createElement("div", { className: "p-slidemenu-content", ref: function ref(el) { return _this11.slideMenuContent = el; } }, /*#__PURE__*/React.createElement(SlideMenuSub, { model: this.props.model, root: true, index: 0, menuWidth: this.props.menuWidth, effectDuration: this.props.effectDuration, level: this.state.level, parentActive: this.state.level === 0, onForward: this.navigateForward })), backward))); } }, { key: "render", value: function render() { var element = this.renderElement(); return this.props.popup ? /*#__PURE__*/React.createElement(Portal, { element: element, appendTo: this.props.appendTo }) : element; } }]); return SlideMenu; }(Component); _defineProperty(SlideMenu, "defaultProps", { id: null, model: null, popup: false, style: null, className: null, easing: 'ease-out', effectDuration: 250, backLabel: 'Back', menuWidth: 190, viewportHeight: 175, autoZIndex: true, baseZIndex: 0, appendTo: null, transitionOptions: null, onShow: null, onHide: null }); export { SlideMenu, SlideMenuSub };
ajax/libs/react-native-web/0.14.11/exports/KeyboardAvoidingView/index.js
cdnjs/cdnjs
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import View from '../View'; import React from 'react'; var KeyboardAvoidingView = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(KeyboardAvoidingView, _React$Component); function KeyboardAvoidingView() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; _this.frame = null; _this.onLayout = function (event) { _this.frame = event.nativeEvent.layout; }; return _this; } var _proto = KeyboardAvoidingView.prototype; _proto.relativeKeyboardHeight = function relativeKeyboardHeight(keyboardFrame) { var frame = this.frame; if (!frame || !keyboardFrame) { return 0; } var keyboardY = keyboardFrame.screenY - (this.props.keyboardVerticalOffset || 0); return Math.max(frame.y + frame.height - keyboardY, 0); }; _proto.onKeyboardChange = function onKeyboardChange(event) {}; _proto.render = function render() { var _this$props = this.props, behavior = _this$props.behavior, contentContainerStyle = _this$props.contentContainerStyle, keyboardVerticalOffset = _this$props.keyboardVerticalOffset, rest = _objectWithoutPropertiesLoose(_this$props, ["behavior", "contentContainerStyle", "keyboardVerticalOffset"]); return React.createElement(View, _extends({ onLayout: this.onLayout }, rest)); }; return KeyboardAvoidingView; }(React.Component); export default KeyboardAvoidingView;
ajax/libs/react-native-web/0.14.2/exports/YellowBox/index.js
cdnjs/cdnjs
/** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import React from 'react'; import UnimplementedView from '../../modules/UnimplementedView'; function YellowBox(props) { return React.createElement(UnimplementedView, props); } YellowBox.ignoreWarnings = function () {}; export default YellowBox;
ajax/libs/material-ui/4.9.2/esm/Step/Step.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import { isFragment } from 'react-is'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; export var styles = { /* Styles applied to the root element. */ root: {}, /* Styles applied to the root element if `orientation="horizontal"`. */ horizontal: { paddingLeft: 8, paddingRight: 8 }, /* Styles applied to the root element if `orientation="vertical"`. */ vertical: {}, /* Styles applied to the root element if `alternativeLabel={true}`. */ alternativeLabel: { flex: 1, position: 'relative' }, /* Pseudo-class applied to the root element if `completed={true}`. */ completed: {} }; var Step = React.forwardRef(function Step(props, ref) { var _props$active = props.active, active = _props$active === void 0 ? false : _props$active, alternativeLabel = props.alternativeLabel, children = props.children, classes = props.classes, className = props.className, _props$completed = props.completed, completed = _props$completed === void 0 ? false : _props$completed, connector = props.connector, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$expanded = props.expanded, expanded = _props$expanded === void 0 ? false : _props$expanded, index = props.index, last = props.last, orientation = props.orientation, other = _objectWithoutProperties(props, ["active", "alternativeLabel", "children", "classes", "className", "completed", "connector", "disabled", "expanded", "index", "last", "orientation"]); return React.createElement("div", _extends({ className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, completed && classes.completed), ref: ref }, other), connector && alternativeLabel && index !== 0 && React.cloneElement(connector, { orientation: orientation, alternativeLabel: alternativeLabel, index: index, active: active, completed: completed, disabled: disabled }), React.Children.map(children, function (child) { if (!React.isValidElement(child)) { return null; } if (process.env.NODE_ENV !== 'production') { if (isFragment(child)) { console.error(["Material-UI: the Step component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n')); } } return React.cloneElement(child, _extends({ active: active, alternativeLabel: alternativeLabel, completed: completed, disabled: disabled, expanded: expanded, last: last, icon: index + 1, orientation: orientation }, child.props)); })); }); process.env.NODE_ENV !== "production" ? Step.propTypes = { /** * Sets the step as active. Is passed to child components. */ active: PropTypes.bool, /** * @ignore * Set internally by Stepper when it's supplied with the alternativeLabel property. */ alternativeLabel: PropTypes.bool, /** * Should be `Step` sub-components such as `StepLabel`, `StepContent`. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * Mark the step as completed. Is passed to child components. */ completed: PropTypes.bool, /** * @ignore * Passed down from Stepper if alternativeLabel is also set. */ connector: PropTypes.element, /** * Mark the step as disabled, will also disable the button if * `StepButton` is a child of `Step`. Is passed to child components. */ disabled: PropTypes.bool, /** * Expand the step. */ expanded: PropTypes.bool, /** * @ignore * Used internally for numbering. */ index: PropTypes.number, /** * @ignore */ last: PropTypes.bool, /** * @ignore */ orientation: PropTypes.oneOf(['horizontal', 'vertical']) } : void 0; export default withStyles(styles, { name: 'MuiStep' })(Step);
ajax/libs/material-ui/4.9.4/esm/useScrollTrigger/useScrollTrigger.js
cdnjs/cdnjs
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; function getScrollY(ref) { return ref.pageYOffset !== undefined ? ref.pageYOffset : ref.scrollTop; } function defaultTrigger(event, store, options) { var _options$disableHyste = options.disableHysteresis, disableHysteresis = _options$disableHyste === void 0 ? false : _options$disableHyste, _options$threshold = options.threshold, threshold = _options$threshold === void 0 ? 100 : _options$threshold; var previous = store.current; store.current = event ? getScrollY(event.currentTarget) : previous; if (!disableHysteresis && previous !== undefined) { if (store.current < previous) { return false; } } return store.current > threshold; } var defaultTarget = typeof window !== 'undefined' ? window : null; export default function useScrollTrigger() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var _options$getTrigger = options.getTrigger, getTrigger = _options$getTrigger === void 0 ? defaultTrigger : _options$getTrigger, _options$target = options.target, target = _options$target === void 0 ? defaultTarget : _options$target, other = _objectWithoutProperties(options, ["getTrigger", "target"]); var store = React.useRef(); var _React$useState = React.useState(function () { return getTrigger(null, store, other); }), trigger = _React$useState[0], setTrigger = _React$useState[1]; React.useEffect(function () { var handleScroll = function handleScroll(event) { setTrigger(getTrigger(event, store, other)); }; handleScroll(null); // Re-evaluate trigger when dependencies change target.addEventListener('scroll', handleScroll); return function () { target.removeEventListener('scroll', handleScroll); }; // See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055 // eslint-disable-next-line react-hooks/exhaustive-deps }, [target, getTrigger, JSON.stringify(other)]); return trigger; }
ajax/libs/zingchart-react/3.1.2/index.es.js
cdnjs/cdnjs
import React, { Component } from 'react'; /* All of the code within the ZingChart software is developed and copyrighted by ZingChart, Inc., and may not be copied, replicated, or used in any other software or application without prior permission from ZingChart. All usage must coincide with the ZingChart End User License Agreement which can be requested by email at [email protected]. Build 2.8.7_ES6 */ if(typeof(ZC)==="undefined"){eval(function(p,a,c,k,e,d){e=function(c){return (c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c);}k=[function(e){return d[e]}];e=function(){return '\\w+'};c=1;}while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);}}return p}('2w.ZC={AU:1n(e,t){if(e.1L)1l e.1L(t);1j(1a i=0,a=e.1f;i<a;i++)if(e[i]===t)1l i;1l-1},fF:"2.8.7",14O:"",Id:!1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f;s<A;s++)t[o].1h(e[o][s])}}1u e[o]3E 8W&&!(e[o]3E bA)?a&&(1c===ZC.1d(t[o])&&(t[o]={}),t[o]3E 8W&&!(t[o]3E bA)&&ZC.2E(e[o],t[o],i)):(1c===ZC.1d(t[o])||i)&&(t[o]=e[o])},so:1n(e,t){t||(t=[]);1j(1a i=0,a=e.1f;i<a;i++)t.1h(e[i])},Sy:1n(e,t){1a i={};ZC.2E(e,i),ZC.2E(t,e),ZC.2E(i,e)},6y:1n(e,t,i){if("gh"!==1o.oA){1y t===ZC.1b[31]&&(t=!0);1a a,n,l=(i=i||[]).1f;1j(1a r in e)if(e.8d(r)&&(0===l||l>0&&-1===ZC.AU(i,r))){1a o=r.2v(0,1);if("."!==o&&"#"!==o)if(e[r]3E 3M)if(ZC.V5(r)!==r){1j(e[ZC.V5(r)]=[],a=0,n=e[r].1f;a<n;a++)ZC.6y(e[r][a]),e[ZC.V5(r)].1h(e[r][a]);4v e[r]}1u 1j(a=0,n=e[r].1f;a<n;a++)ZC.6y(e[r][a]);1u e[r]3E 8W&&!(e[r]3E bA)?(ZC.V5(r)!==r&&(e[ZC.V5(r)]={},ZC.2E(e[r],e[ZC.V5(r)]),4v e[r]),t&&ZC.6y(e[ZC.V5(r)],t,i)):ZC.V5(r)!==r&&(e[ZC.V5(r)]=e[r],4v e[r])}}},gS:1n(e,t){1j(1a i in e){1a a;if(e.8d(i))if((a=i.1F(t+"-",""))!==i)if(e[a]=e[i],e[i]3E 3M)1j(1a n=0,l=e[i].1f;n<l;n++)ZC.gS(e[i][n],t);1u e[i]3E 8W&&!(e[i]3E bA)&&ZC.gS(e[i],t)}},sK:1n(e){1j(1a t="",i=0,a=e.1f;i<a;i++){1a n=i%2==0?i:e.1f-i;t+=e.2v(n,n+1)}1l t=t.1F(/\\./g,"d")},uh:1n(e){1a t=e;1l t=(t=(t=t.1F("*","&")).1F("9","3")).1F("l","1")},mj:1n(e){1l e.1F(/[a-zA-Z]/g,1n(e){1l 6d.d7((e<="Z"?90:122)>=(e=e.g1(0)+13)?e:e-26)})},ui:1n(e,t){1a i=ZC.XG(ZC.z6(e)),a=ZC.XG(ZC.ku(t)),n=i.1f;if(0===n)1l"";1j(1a l,r,o=i[n-1],s=i[0],A=z8,C=1B.4b(6+52/n)*A;0!==C;){r=C>>>2&3;1j(1a Z=n-1;Z>0;Z--)l=((o=i[Z-1])>>>5^s<<2)+(s>>>3^o<<4)^(C^s)+(a[3&Z^r]^o),s=i[Z]-=l;l=((o=i[n-1])>>>5^s<<2)+(s>>>3^o<<4)^(C^s)+(a[3&Z^r]^o),s=i[0]-=l,C-=A}1l Sx(ZC.z5(ZC.nh(i)))},Sw:1n(e,t){e=eQ(e);1a i=ZC.XG(ZC.ku(e)),a=ZC.XG(ZC.ku(t)),n=i.1f;if(0===n)1l"";1===n&&(i[n++]=0);1j(1a l,r,o=i[n-1],s=i[0],A=1B.4b(6+52/n),C=0;A-->0;){r=(C+=z8)>>>2&3;1j(1a Z=0;Z<n-1;Z++)l=(o>>>5^(s=i[Z+1])<<2)+(s>>>3^o<<4)^(C^s)+(a[3&Z^r]^o),o=i[Z]+=l;l=(o>>>5^(s=i[0])<<2)+(s>>>3^o<<4)^(C^s)+(a[3&Z^r]^o),o=i[n-1]+=l}1l ZC.z7(ZC.nh(i))},XG:1n(e){1j(1a t=1m 3M(1B.4l(e.1f/4)),i=0;i<t.1f;i++)t[i]=e[4*i]+(e[4*i+1]<<8)+(e[4*i+2]<<16)+(e[4*i+3]<<24);1l t},nh:1n(e){1j(1a t=[],i=0;i<e.1f;i++)t.1h(3U&e[i],e[i]>>>8&3U,e[i]>>>16&3U,e[i]>>>24&3U);1l t},z7:1n(e){1j(1a t="",i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],a=0;a<e.1f;a++)t+=i[e[a]>>4]+i[15&e[a]];1l t},z6:1n(e){1j(1a t=[],i="zL"===e.5A(0,2)?2:0;i<e.1f;i+=2)t.1h(5v(e.5A(i,2),16));1l t},z5:1n(e){1j(1a t="",i=0;i<e.1f;i++)0!==e[i]&&(t+=6d.d7(e[i]));1l t},ku:1n(e){1j(1a t=[],i=0;i<e.1f;i++)t.1h(e.g1(i));1l t},1k:1n(e){1l-1!==6d(e).1L("e-")?0:""===(e=6d(e).1F(/[^0-9\\.\\-]/gi,""))?0:1B.43(e)},1W:1n(e){1l e=5P(e),7X(e)?0:e},4o:1n(e,t){1l 1y t===ZC.1b[31]&&(t=2),5P(4T(e).4A(t))},2l:1n(e){1l 1B.3l(e)},2s:1n(e){1l"d5"!==e&&"0"!==e&&("gX"===e||"1"===e||!!e&&!0)},8G:1n(e){1a t=(e=6d(e).1F(/[^0-9\\.\\%\\-]/gi,"")).1L("%");1l-1!==t&&(e=e.2v(0,t),e=ZC.1W(e)/100),e},j2:1n(e){1l 2w.z4?2w.z4(e):e},1d:1n(e){1l 1c===e||1y e===ZC.1b[31]?1c:e},9q:1n(e,t){1l 1c===e||1y e===ZC.1b[31]?t:e},gY:1n(e){1l(e%=2m)<0&&(e+=2m),e},IH:1n(e,t){1l ZC.1W(e)+""==e+""?t?ZC.1W(e):ZC.2l(e):-1!==(e+="").1L("%")?ZC.1W(e.1F("%",""))/100:-1!==e.1L("px")?ZC.1W(e.1F("px","")):ZC.1W(e)},R1:1n(e){1l 5v(e,16)},P2:1n(e){1l ZC.1k(e).a5(16)},hm:1n(e,t){1l 5v(e+(t-e)*1B.cb(),10)},5u:1n(e,t,i){1l e=(e=e<t?t:e)>i?i:e},E0:1n(e,t,i){1l t<=e&&e<=i||i<=e&&e<=t},BM:1n(e,t){1l 1B.1X(e,t)},CQ:1n(e,t){1l 1B.2j(e,t)},d4:1n(e){1j(1a t=0,i=e.1f,a=-4T.hH;t<i;t++)a=1B.1X(a,e[t]);1l a},dj:1n(e){1j(1a t=0,i=e.1f,a=4T.hH;t<i;t++)a=1B.2j(a,e[t]);1l a},Bu:1n(){1j(1a e=(Uf*1B.cb()+1<<0).a5(16);e.1f<6;)e="0"+e;1l"#"+e},qf:1n(e,t){1j(1a i,a=ZC.1W(t),n=4T.hH,l=0,r=0,o=e.1f;r<o;r++)(i=1B.3l(ZC.1W(e[r])-a))<n&&(l=r,n=i);1l l},So:1n(e){1a t=e.2n(".");1l t[t.1f-1]||""},GP:1n(e){1l e.1F(/^\\s\\s*/,"").1F(/\\s\\s*$/,"")},JN:1n(e,t){1l t=t||1B.E,dp(1B.3P(e)/1B.3P(t))?1B.3P(e)/1B.3P(t):0},UE:1n(e){1l 2m*e/(2*1B.PI)},TG:1n(e){1l 2*e*1B.PI/2m},EC:1n(e){1l 1B.dz(ZC.TG(e))},EH:1n(e){1l 1B.eb(ZC.TG(e))},PJ:1n(e){1l!7X(5P(e))&&dp(e)},EA:1n(e){1l-1!==e.1L("-")?e.1F(/(\\-[a-z0-9])/g,1n(e){1l e.5M().1F("-","")}):e},V5:1n(e){1l e.5M()!==e&&-1===e.1L("-")&&e.2v(0,1).aN()===e.2v(0,1)?e.1F(/([A-Z])/g,1n(e){1l"-"+e.aN()}).1F(/([0-9]+)/g,1n(e){1l"-"+e.aN()}).1F("-3d","3d"):e},Sn:1n(e){1l ZC.Y3.du(e)},AK:1n(e){1l 2g.cP(e)},lW:1n(e,t){1l e[0].1f<t[0].1f?1:e[0].1f>t[0].1f?-1:0},e3:1n(e){2w.5Q(e,1o.oo)},9y:1n(e,t){1l t>=0&&t<=20?e.4A(t):""+e},ll:1n(e,t,i,a){1a n=t.R[i].BW,l=t.R[a].BW;if(e==n)1l i;if(e==l)1l a;1a r=ZC.1k((i+a)/2);if(!t.R[r]){1j(;!t.R[r]&&r<a;)r++;if(r===a){1j(r=ZC.1k((i+a)/2);!t.R[r]&&r>i;)r--;if(r===i)1l 1c}}1a o=t.R[r].BW;1l r!==i&&r!==a?e==o?r:e>o?ZC.ll(e,t,r,a):ZC.ll(e,t,i,r):e==o?r:1c},aE:1n(e){1a t,i,a,n,l=[1,1,0,0];if(1o.3J.Ap&&!ZC.3K&&ZC.AK(e)){1a r=ZC.AK(e);1j(t="";r&&(""===t||"2b"===t);)t=ZC.A3(r).2O("5H")||"",r=r.6o;-1!==(i=t.1L("9v("))&&(a=t.1L(")",i),n=t.2v(i+7,a-i).2n(","),l=[ZC.1W(n[0]),ZC.1W(n[3]),ZC.1W(n[4]),ZC.1W(n[5])])}1l l}},ZC.sb=!1,ZC.aw=5x,ZC.aC=60*ZC.aw,ZC.HR=60*ZC.aC,ZC.9s=24*ZC.HR,ZC.dq=30*ZC.9s,ZC.YR=Ar*ZC.9s,ZC.3y=0,2w.3h=2w.3h||{},3h.5g=3h.5g||1n(e){1a t=1y e;if("4h"!==t||1c===e)1l"3e"===t&&(e=\'"\'+e.1F("\\\\","\\\\\\\\").1F(\'"\',\'"\')+\'"\'),6d(e);1a i,a,n=[],l=e&&e.2G===3M;1j(i in e)"1n"!=1y e[i]&&("3e"===(t=1y(a=e[i]))?a=\'"\'+a.1F("\\\\","\\\\\\\\").1F(\'"\',\'\\\\"\')+\'"\':"4h"===t&&1c!==a&&(a=3h.5g(a)),n.1h((l?"":\'"\'+i+\'":\')+6d(a)));1l(l?"[":"{")+6d(n)+(l?"]":"}")},3h.1q=3h.1q||1n(KY){1l""===KY&&(KY=\'""\'),7l("("+KY+")")},ZC.1b=["1U-1r","2f-4e","2f-6j","4w","1w-1s","6g","-2r-1N zc-2r-1N","6w","7z","1T","cC","dW","6K","m1-8E","6K-8E","-6I-c","aY","1T-3C","7i","1s","1M","2e","-2N-c","4U-2i","zc-3l zc-6p","ax-6K","3d-76","x-2f","y-2f","z-2f",\'" 9e="\',"mh","~9J(3U,3U,3U,0)","~9N(3U,3U,3U)","-2r-1N ","-ch-1A-","7h://8z.w3.dS/v9/2F","7h://8z.w3.dS/sQ/kn","Sl","Sk","Ud","Ub","Tz","Ty","Tx","If-Tu-Tt","cl, 1 ci dJ 6X:6X:6X dF","6F","7V","6k","1z-x","1z-y","1z-v","Ts","a9-93","4U-8x","4U-2z","2y-1v","2y-2A","2y-2a","2y-1K","1G-1r","1G-1s","Tr 4L","i3 dG 6A","6A.5i.6i-2C","-2C-1Q-iA","5H-5s-5I","5H-5s","bg-4d-1s","bg-4d-1M","2N-3X","1U-3X","dQ-3X"];1O ad{}if(ZC.uL=1n(e){1g.H=e,1g.ol=1n(e,t){1a i,a=1g,n=a.B8.6P;if(1c!==ZC.1d(t)&&1c!==ZC.1d(n[t])&&(n=n[t]),1c!==ZC.1d(n[e])){1a l=n[e];1l 1c===ZC.1d(l[2])&&(l[2]=ZC.AO.R2(l[1],10)),1c===ZC.1d(l[3])&&(l[3]=ZC.AO.R2(l[1],10)),l}1a r=["#Tq","#Tl","#Tk","#Tj","#Th","#Ri","#Rf"];i=1c!==ZC.1d(r[e-a.B8.6P.1f])?r[e-a.B8.6P.1f]:"#"+ZC.Y3.du(e).5A(e%20,6);1a o=ZC.AO.R2(i,10),s=ZC.AO.R2(i,20),A="#tf";1l a.B8.6P&&a.B8.6P[0]&&a.B8.6P[0][0]&&(A=a.B8.6P[0][0]),[A,i,o,s]},1g.ls=1n(e){e&&ZC.2E(e,1g.B8,!0)},1g.qv=1n(e){1a t=1g;1c!==ZC.1d(t.NU[e])&&(ZC.6y(t.NU[e]),ZC.2E(t.NU[e],t.B8))},1g.NU={},ZC.2E(1o.Az,1g.NU),1g.NU.cH={6P:[["#2S","#Rd","#Rc","#Qv"],["#2S","#Qr","#Qp","#Qn"],["#2S","#Qm","#Ql","#Qk"],["#2S","#Qj","#Rg","#Qu"],["#2S","#Rh","#Rv","#Sf"],["#2S","#Sd","#Sc","#Sb"]],2Y:{d0:{dk:{2o:.5,"1U-1r":"#4S",1r:"#4u","2t-2e":15,6x:1,1E:"o0..."}},"1U-1r":"#qW #Sa",5E:{"2t-2e":14,6x:1,1r:"#2S","1U-1r":"#S2 #Ry",3v:6},86:{"2t-2e":11,6x:1,1r:"#8M","2y-1v":30,3v:6},7g:{"2t-2e":10,1r:"#8M",1s:"100%",6x:1,"1E-3u":"2A",1M:20,2y:"3g 0 0 3g",3v:5},h7:{"2t-2e":12,1r:"#8M","1E-3u":"3F","9l-3u":"6n",1E:""},4z:{"2t-2e":11,"1w-1s":2,"1w-1r":"#fZ",1Q:{7J:!0},"3T-1w":{"1w-1s":1,"1w-1r":"#fZ"},2i:{2h:1,"1w-1s":1,"1w-1I":"2V","1w-1r":"#yp",2o:.2},"4Q-2i":{2h:1,"1w-1s":1,"1w-1I":"2V","1w-1r":"#Ay",2o:.1},3Z:{2h:1,2e:6,6w:ZC.1b[18],"1w-1s":2,"1w-1r":"#fZ"},"4Q-3Z":{2h:1,2e:4,"1w-1s":1,"1w-1r":"#fZ"},1H:{1r:"#yp",7J:!0}},"1Z-x":{2U:{1M:16},3q:{1M:16}},"1Z-y":{2U:{1s:16},3q:{1s:16}},1Y:{"1U-1r":"#2S","1G-1s":1,2o:.75,"1G-2o":.75,"1G-1r":"#cc","3I-6T":3,5K:{3v:"4 6",1r:"#2S","1G-1s":1,"1G-1r":"#fZ","1U-1r":"#fZ"},9U:{3v:"2 6","1U-1r":"#8c","1G-1s":1,"1G-1r":"#cc"},1R:{"1G-1r":"#8M","1G-1s":1}},1A:{"1T-3C":{7J:!0},1R:{3I:1,"1w-1s":1,"1G-1s":1},"2N-1R":{"1w-1s":1,"1G-1s":1}},2i:{"1w-1s":1,"1w-1r":"#4S",2o:1,"1z-1H":{1E:"%l",3v:"3 6"},"1A-1H":{3v:"3 6"}}},1w:{1A:{"3I-2o":.5,1R:{2e:4},"2N-1R":{2e:5}}},1N:{1A:{"3I-2o":.5,1R:{2e:4},"2N-1R":{2e:5}}},5t:{1A:{"3i-2f":90,3I:0}},6c:{1A:{"3i-2f":180,3I:0}},5V:{2u:{"4O-g2":[0,0]},1A:{3I:0}},84:{1A:{3I:0}},8i:{1A:{3I:0}},7R:{1A:{"3i-2f":0,3I:0}},6v:{1A:{1R:{2e:4},"2N-1R":{2e:5}}},8r:{1A:{1R:{2e:4},"2N-1R":{2e:5}}},5m:{1A:{1R:{"1G-1s":0},"2N-1R":{"1G-1s":0}}},6V:{1A:{1R:{"1G-1s":0},"2N-1R":{"1G-1s":0}}},3O:{1A:{"1G-1s":1}},8S:{1A:{"1G-1s":1}},7d:{1A:{1R:{2e:3},"2N-1R":{2e:4}},"1z-k":{2i:{2o:.5,"1U-1r":"#8X #74"}}},8D:{"1z-r":{"1U-1r":"-1",2i:{2o:.5,"1U-1r":"#8X #74"},1Q:{"2c-r":0},9H:{2e:1,2B:[{"1U-1r":"#4S",2o:.8},{"1U-1r":"#cc",2o:.8}]}}},aA:{2u:{2y:"50 100"},4z:{"1w-1s":0,3Z:{"1w-1s":0},"4Q-3Z":{"1w-1s":0},2i:{"1w-1s":0},"4Q-2i":{"1w-1s":0}},"1z-y":{2i:{2o:.25,"1U-1r":"-1 #8Q"}},"1z-y-n":{2i:{2o:.25,"1U-1r":"-1 #8Q"}},1A:{"1G-1s":1}},aB:{2u:{2y:"50 100"},"1z-x":{1H:{"2t-2f":3V}},"1z-x-n":{1H:{"2t-2f":90}},4z:{"1w-1s":0,3Z:{"1w-1s":0},"4Q-3Z":{"1w-1s":0},2i:{"1w-1s":0},"4Q-2i":{"1w-1s":0}},"1z-y":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"},2i:{2o:.25,"1U-1r":"#8Q -1"}},"1z-y-n":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"},2i:{2o:.25,"1U-1r":"#8Q -1"}},1A:{"1G-1s":1}},5z:{1A:{1R:{1J:"3z",2e:4},"2N-1R":{2e:5}}},97:{4z:{"1w-1r":"#74",3Z:{2h:!1}},1A:{"1G-1s":0,"1w-1s":1}},83:{4z:{"1w-1r":"#74",3Z:{2h:!1}},1A:{"1G-1s":0,"1w-1s":1}},aX:{4z:{"1w-1r":"#74",3Z:{2h:!1}},1A:{"1G-1s":1}},6O:{4z:{"1w-1r":"#74",3Z:{2h:!1}},1A:{"1G-1s":1}},7k:{4z:{"1w-1r":"#74",3Z:{2h:!1}},1A:{"1G-1s":1}},7e:{1A:{"1G-1s":1}},"-":""},1g.NU.8Y={6P:[["#2S","#yo","#yo","#Au"],["#2S","#yl","#yl","#Rs"],["#2S","#tV","#tV","#Rr"],["#2S","#y6","#y6","#Mf"],["#2S","#yc","#yc","#Rn"],["#2S","#yb","#yb","#Rm"],["#2S","#y9","#y9","#Rk"],["#2S","#zo","#zo","#Qh"],["#2S","#Bd","#Bd","#tV"]],2Y:{d0:{dk:{2o:.5,"1U-1r":"#4S",1r:"#4u","2t-2e":15,6x:1,1E:"o0..."}},"1U-1r":"#j4",5E:{"2t-2e":21,6x:1,1r:"#e5","1U-1r":"2b",3v:6},86:{"2t-2e":11,6x:1,1r:"#e5","2y-1v":30,3v:6},7g:{"2t-2e":10,1r:"#e5",1s:"100%",6x:1,"1E-3u":"2A",1M:20,2y:"3g 0 0 3g",3v:5},h7:{"2t-2e":12,1r:"#8M","1E-3u":"3F","9l-3u":"6n",1E:"No dG","1U-1r":"#Lr",2o:.8},4z:{"2t-2e":11,"1w-1s":1,"1w-1r":"#e2",1Q:{"2t-2e":12,7J:!0,1r:"#HS"},"3T-1w":{"1w-1s":1,"1w-1r":"#7M"},2i:{2h:1,"1w-1s":1,"1w-1I":"2V","1w-1r":"#Hu",2o:1},"4Q-2i":{2h:1,"1w-1s":1,"1w-1I":"2V","1w-1r":"#Ay",2o:.1},3Z:{2h:1,2e:5,6w:ZC.1b[18],"1w-1s":1,"1w-1r":"#e2"},"4Q-3Z":{2h:1,2e:3,"1w-1s":1,"1w-1r":"#cX"},1H:{1r:"#e5",7J:!0}},"1z-x":{fM:!0,2i:{2h:!1}},1Z:{2U:{"1U-1r":"#tL",2y:1},3q:{"1U-1r":"#cX","1G-9i":6}},"1Z-x":{2U:{1M:16,"1G-1v":"2b","1G-2A":"2b","1G-2a":"2b","1G-1K":"2b"},3q:{1M:10,"1G-1v":"2b","1G-2A":"2b","1G-2a":"2b","1G-1K":"2b"}},"1Z-y":{2U:{1s:16,"1G-1v":"2b","1G-2A":"2b","1G-2a":"2b","1G-1K":"2b"},3q:{1s:10,"1G-1v":"2b","1G-2A":"2b","1G-2a":"2b","1G-1K":"2b"}},"1Z-xi":{2U:{1s:16,"1G-1v":"2b","1G-2A":"2b","1G-2a":"2b","1G-1K":"2b"},3q:{1s:10,"1G-1v":"2b","1G-2A":"2b","1G-2a":"2b","1G-1K":"2b"}},"1Z-yi":{2U:{1M:16,"1G-1v":"2b","1G-2A":"2b","1G-2a":"2b","1G-1K":"2b"},3q:{1M:10,"1G-1v":"2b","1G-2A":"2b","1G-2a":"2b","1G-1K":"2b"}},2z:{"1U-1r":"#2S","1G-1s":1,"1G-1r":"#cX",4c:!0,4O:{"1U-1r":"#4S"},6C:{2o:0},3q:{1s:11,"1G-1s":2,"1G-9i":3,"1w-1r":"#tI","1G-1r":"#cX","1U-1r":"#tL"},"3q-1v":{1M:11},"3q-2a":{1M:11}},2H:{3I:1,"3I-2f":45,"3I-6T":1,"3I-2o":.25,"1G-1s":1,"1G-1r":"#2S","1G-2o":1},3G:{"dD-3G":1,"1U-1r":"#l8"},1Y:{"1U-1r":"#2S","1G-1s":1,3I:0,"3I-2o":.2,2o:1,"1G-2o":1,"1G-1r":"#e0",5K:{3v:"5 0 5 10",1r:"#Iy","1U-1r":"2b","1G-1s":0,"1G-1v":"gU 2V 2b","1G-2a":"7Y 2V #e0"},9U:{3v:"5 0 5 10","1G-1v":"7Y 2V #e0"},tz:{"1U-1r":"#tL","1w-1r":"#tI",2y:2,1M:8,"1w-1s":2,"1w-1I":"fo"},b0:{"1w-1r":"#tI","1w-1s":2,1I:"Ix"},1R:{"1G-1r":"#2S","1G-1s":1},"3f-on":{"1U-1r":"#l8"},"3f-6Q":{"1U-1r":"#tg"},1Z:{2U:{"1U-1r":"2b","2y-1v":3,"2y-2a":3},3q:{"1U-1r":"#tg","1G-1v":"2b","1G-2A":"2b","1G-2a":"2b","1G-1K":"2b","1G-9i":6,1s:12,1M:12}}},1A:{"1T-3C":{7J:!0},1R:{3I:0,"1w-1s":1,"1G-1s":1,"1G-1r":"#2S"},"2N-1R":{"1w-1s":1,"1G-1s":1},Cs:!0},2i:{"1w-1s":1,"1w-1r":"#e2",2o:1,"1z-1H":{1E:"%l",3v:"3 6"},"1A-1H":{3v:"3 6"}}},1w:{1A:{"1w-1s":2,3I:0,1R:{2e:4},"2N-3X":{},"2N-1R":{2e:5,"1G-1s":1,"1G-1r":"#2S"}}},1N:{1A:{"1w-1s":2,3I:0,"2o-1N":.25,"1U-1r-1I":"2V",1R:{2e:4},"2N-3X":{},"2N-1R":{2e:5,"1G-1s":1,"1G-1r":"#2S"}}},5t:{1A:{"3i-2f":90,3I:0}},6c:{1A:{"3i-2f":180,3I:0}},5V:{2u:{"4O-g2":[0,0]},1A:{3I:0},"1z-x":{2i:{2h:!0}}},84:{1A:{3I:0}},8i:{1A:{3I:0,7w:{"1G-1s":1,"1G-1r":"#2S",1M:8}}},7R:{1A:{"3i-2f":0,3I:0,7w:{"1G-1s":1,"1G-1r":"#2S",1s:8}}},6v:{1A:{"1w-1r":"%kY-0","1G-1r":"%kY-0",1R:{2e:5},"2N-1R":{2e:6}},"1z-x":{2i:{2h:!0}}},8r:{1A:{"1w-1r":"%kY-0","1G-1r":"%kY-0",1R:{2e:4},"2N-1R":{2e:5}},"1z-x":{2i:{2h:!0}}},5m:{1A:{1R:{"1G-1s":1,"1G-1r":"#2S"},"2N-1R":{"1G-1s":1,"1G-1r":"#2S"}},"1z-x":{2i:{2h:!0}}},6V:{1A:{1R:{"1G-1s":1,"1G-1r":"#2S"},"2N-1R":{"1G-1s":1,"1G-1r":"#2S"}},"1z-x":{2i:{2h:!0}}},3O:{1A:{3I:0,"1G-1s":1,"1T-3C":{6w:"in","2t-2e":16,1E:"%2r-8e-1T%"}}},8S:{1A:{"1G-1s":1}},7d:{1A:{3I:0,"1w-1s":2,"1U-1r":"%6P-1","6C-1N":!0,1R:{2e:4},"2N-1R":{2e:5,"1G-1r":"#2S"}},"1z-k":{2i:{"1w-1s":1,"1w-1I":"2V","1w-1r":"#e2","1w-fI-2e":6,"1w-h8-2e":6,2o:1,"1U-1r":"#2S #Ik"},3Z:{"1w-1r":"#e2","1w-1s":1,2e:10}},"1z-r":{},"1z-v":{"3T-1w":{"1w-1r":"#e2","1w-1s":1},3Z:{"1w-1r":"#e2","1w-1s":1},2i:{"1w-1r":"#hU","1w-1s":1}}},8D:{1A:{3I:0},1z:{"2e-7c":1},"1z-r":{ij:3V,3Z:{2e:11,"1w-1s":2},"1U-1r":-1,2i:{"1U-1r":"#2S"},9H:{2e:8,"1U-1r":"#hU"},3F:{2e:20,"1U-1r":"#2S","1G-1s":6,"1G-1r":"#Au"}}},aA:{2u:{2y:"50 100"},4z:{"1w-1s":0,3Z:{"1w-1s":0},"4Q-3Z":{"1w-1s":0},2i:{"1w-1s":1,"1w-1I":"2V","1w-1r":"#hU","1w-fI-2e":6,"1w-h8-2e":6,2o:1},"4Q-2i":{"1w-1s":0}},"1z-x":{2h:!1,2i:{2h:0}},"1z-y":{2i:{"1U-1r":"-1",2o:1}},"1z-y-n":{2i:{"1U-1r":"-1"}},1A:{"1G-1s":1,"1G-1r":"#2S",3I:0,"2N-3X":{"1w-1r":"-1","1G-1r":"-1"}}},aB:{2u:{2y:"50 100"},"1z-x":{2h:!1,2i:{2h:0},1H:{"2t-2f":3V}},"1z-x-n":{1H:{"2t-2f":90}},4z:{"1w-1s":0,3Z:{"1w-1s":0},"4Q-3Z":{"1w-1s":0},2i:{"1w-1s":1,"1w-1I":"2V","1w-1r":"#hU","1w-fI-2e":6,"1w-h8-2e":6,2o:1},"4Q-2i":{"1w-1s":0}},"1z-y":{2i:{"1U-1r":"-1",2o:1},1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-y-n":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"},2i:{"1U-1r":"-1"}},1A:{"1G-1s":1,"1G-1r":"#2S",3I:0,"2N-3X":{"1w-1r":"-1","1G-1r":"-1"}}},5z:{1A:{"1U-1r":"%6P-1",1R:{1J:"3z",2e:4},"2N-1R":{2e:5}}},97:{4z:{"1w-1r":"#74",3Z:{2h:!1}},1A:{"1G-1s":0,"1w-1s":1}},83:{4z:{"1w-1r":"#74",3Z:{2h:!1}},1A:{"1G-1s":0,"1w-1s":1}},aX:{4z:{"1w-1r":"#74",3Z:{2h:!1}},1A:{"1G-1s":1}},6O:{4z:{"1w-1r":"#74",3Z:{2h:!1}},1A:{"1G-1s":1}},7k:{4z:{"1w-1r":"#74",3Z:{2h:!1}},1A:{"1G-1s":1}},7e:{1A:{"1G-1s":1}},b7:{1A:{"1G-1s":0,3I:0,2o:.75,"1U-1r":"%6P-1"}},a3:{5i:{"6i-2C":{2h:!0,1s:"Ir",3v:"5 0","1U-1r":"#l4","1G-1s":0,"1G-1r":"#l4",2K:"1K",7K:{2h:ZC.2L,2o:0},b5:{"1U-1r":"#4u",1J:"pN",2o:1},1Q:{"1U-1r":"#l4","1E-3u":"1K",3v:"4 20 4 15","1G-1s":0,"1G-1r":"#l4","2t-2e":"y4",1r:"#2S","2N-3X":{"1U-1r":"#Ip"}},8E:{"1w-1s":1,"1w-1r":"#Ba"}},"6i-2C[2L]":{1Q:{3v:"6 10 6 6"}}}},"-":""},1g.NU.8Y.2Y["9j-x"]=1g.NU.8Y.2Y["9j-y"]=1g.NU.8Y.2Y.2i,1g.NU.b4={},ZC.2E(1g.NU.8Y,1g.NU.b4,!0,!0),ZC.2E({2Y:{"1U-1r":"#77",5E:{1r:"#2S"},86:{1r:"#2S"},7g:{1r:"#2S"},4z:{"1w-1r":"#7M",1Q:{1r:"#7M"},"3T-1w":{"1w-1r":"#7M"},2i:{"1w-1r":"#8Q"},"4Q-2i":{"1w-1r":"#8Q"},3Z:{"1w-1r":"#7M"},"4Q-3Z":{"1w-1r":"#7M"},1H:{1r:"#7M"}},1Z:{2U:{"1U-1r":"#Io"},3q:{"1U-1r":"#cX"}},"1Z-x":{2U:{"1G-1v":"gU 2V 2b","1G-2A":"5o 2V #7M","1G-2a":"5o 2V #7M","1G-1K":"5o 2V #7M"},3q:{"1G-1v":"2b","1G-2A":"2b","1G-2a":"2b","1G-1K":"2b"}},"1Z-y":{2U:{"1G-1v":"5o 2V #7M","1G-2A":"gU 2V 2b","1G-2a":"5o 2V #7M","1G-1K":"5o 2V #7M"}},2z:{"1U-1r":"#77"},2H:{"1G-1r":"#4u"},1Y:{"1U-1r":"#77",5K:{1r:"#2S",tz:{"1U-1r":"#e5","1w-1r":"#tq"}},9U:{1r:"#7M","1U-1r":"#e5","1G-1v":"gU 2V 2b","1G-2A":"5o 2V #cX","1G-2a":"5o 2V #cX","1G-1K":"5o 2V #cX"},tz:{"1U-1r":"#e5","1w-1r":"#tq"},b0:{"1w-1r":"#tq"},"3f-6M":{1r:"#7M"},"3f-on":{"1U-1r":"#tg"},"3f-6Q":{"1U-1r":"#l8"},1R:{"1G-1r":"#4u"},1Q:{1r:"#7M"}},1A:{1R:{"1G-1r":"#77"}},2i:{"1w-1r":"#7M","1z-1H":{"1U-1r":"#l8"},"1A-1H":{"1U-1r":"#77",1r:"#tf","1G-1r":"#Ij"}}},1w:{1A:{"2N-1R":{"1G-1r":"#77"}}},1N:{1A:{"2N-1R":{"1G-1r":"#77"}}},8i:{1A:{7w:{"1G-1r":"#77"}}},7R:{1A:{7w:{"1G-1r":"#77"}}},5m:{1A:{1R:{"1G-1r":"#77"},"2N-1R":{"1G-1r":"#77"}}},6V:{1A:{1R:{"1G-1r":"#77"},"2N-1R":{"1G-1r":"#77"}}},3O:{1A:{"1G-1r":"#77"}},7d:{1A:{"2N-1R":{"1G-1r":"#77"}},"1z-k":{2i:{"1w-1r":"#8Q","1U-1r":"#77 #Hh"},3Z:{"1w-1r":"#7M"}},"1z-v":{"3T-1w":{"1w-1r":"#8Q"},3Z:{"1w-1r":"#8Q"},2i:{"1w-1r":"#8Q"}}},8D:{"1z-r":{2i:{"1U-1r":"#77"},9H:{"1U-1r":"#Hn"}}},aA:{4z:{2i:{"1w-1r":"#8Q"}},1A:{"1G-1r":"#77","2N-3X":{"1w-1r":"#8Q","1G-1r":"#77"}}},aB:{4z:{2i:{"1w-1r":"#8Q"}},"1z-y":{2i:{2o:.25,"1U-1r":"#Aq -1"}},"1z-y-n":{2i:{2o:.25,"1U-1r":"#Aq -1"}},1A:{"1G-1r":"#77","2N-3X":{"1w-1r":"#8Q","1G-1r":"#77"}}},a3:{5i:{"6i-2C":{b5:{"1U-1r":"#tf"}}}},"-":""},1g.NU.b4,!0,!0),1g.NU.b4.2Y["9j-x"]=1g.NU.b4.2Y["9j-y"]=1g.NU.b4.2Y.2i,1g.NU.lX={2Y:{5E:{1s:"100%",3v:"1 2 2","2t-2e":10},86:{1s:"100%",3v:"1 2 2","2y-1v":14,"2t-2e":9},2u:{1s:"100%",1M:"100%",2y:"18 4 4 4"},4z:{2h:0},2H:{3I:0,"1G-9i":7},1Y:{2h:0},2z:{2h:0},2i:{"1w-1s":1,"1w-1r":"#8c",2o:1,"1z-1H":{1E:"%l",3v:"3 6"},"1A-1H":{"1G-1r":"#8c","1G-9i":5,3v:"3 6"}},1A:{3I:0,"1T-3C":{2h:0},"2N-3X":{2h:0},"2N-1R":{2h:0},"1X-oE":qY,"1X-cM":qY}},1w:{1A:{"1w-1s":1,1R:{1J:"2b"}}},97:{"3d-76":{5p:20,2f:45,"x-2f":-20,"y-2f":0,"z-2f":0,3G:.9}},1N:{1A:{"1w-1s":1,1R:{1J:"2b"}}},83:{"3d-76":{5p:20,2f:45,"x-2f":-20,"y-2f":0,"z-2f":0,3G:.9}},6v:{4z:{2c:5},1A:{1R:{2e:3,3I:!1,2o:.8}}},8r:{4z:{2c:5},1A:{1R:{2e:3,3I:!1,2o:.8}}},5m:{4z:{2c:15},1A:{1R:{"3i-1J":"2b",3I:!1,2o:.8},"2j-2e":3,"1X-2e":9}},6V:{4z:{2c:15},1A:{1R:{"3i-1J":"2b",3I:!1,2o:.8},"2j-2e":3,"1X-2e":9}},3O:{2u:{2y:"18 4 4 4"},1A:{"1T-3C":{2h:0}},1z:{"2e-7c":.95}},7e:{2u:{2y:"32 4 4 4"},1A:{"1T-3C":{2h:0}},1z:{"2e-7c":1}},8S:{2u:{2y:"18 4 4 4"},1A:{"1T-3C":{2h:0}},1z:{"2e-7c":.95}},7d:{2u:{2y:"18 4 4 4"},1A:{"1w-1s":1,1R:{3I:0,2e:2}},1z:{"2e-7c":.95}},6O:{"3d-76":{5p:20,2f:45,"x-2f":-20,"y-2f":0,"z-2f":0,3G:.9}},7k:{"3d-76":{5p:20,2f:45,"x-2f":0,"y-2f":-20,"z-2f":0,3G:.9}},b7:{2u:{2y:"18 4 4 4"},1A:{"1G-1s":0}},8D:{2u:{2y:"18 4 4 4"},1A:{yQ:[5]},4z:{2h:1},1z:{"2e-7c":.9},"1z-r":{"1U-1r":"-1",ij:3V,3Z:{2h:0},1Q:{2h:0},2i:{2h:0},9H:{2e:6,"1U-1r":"#hU",2B:[]},3F:{"1G-1s":0,2e:2,"1U-1r":"#2S"}}},aA:{2u:{2y:"18 4 4 4"}},aB:{2u:{2y:"18 4 4 4"}},8i:{1A:{"2U-8I":.5,7w:{"1G-1s":0,1M:4}}},7R:{1A:{"2U-8I":.5,7w:{"1G-1s":0,1s:4}}},5z:{1A:{"1w-1s":1,1R:{2h:0},"2N-3X":{2h:0}}},"-":""},1g.NU.Gq={6P:[["#4u","#Gk","#Ba","#Gi"],["#4u","#Gg","#Gu","#Gv"],["#4u","#Hf","#Hk","#Hi"],["#4u","#Hg","#Hd","#e0"],["#4u","#Hc","#Gz","#Gy"],["#4u","#Gf","#Bw","#Gx"],["#4u","#Bx","#Cd","#Hm"]],2Y:{"1U-1r":"#111",5E:{1r:"#2S"},86:{1r:"#8M"},4z:{"2t-2e":11,"1w-1s":2,"1w-1r":"#8c",2i:{2h:1,"1w-1s":1,"1w-1I":"2V","1w-1r":"#8c",2o:.2},"4Q-2i":{2h:1,"1w-1s":1,"1w-1I":"2V","1w-1r":"#8c",2o:.2},3Z:{2h:1,2e:6,6w:ZC.1b[18],"1w-1s":2,"1w-1r":"#8c"},"4Q-3Z":{2h:1,2e:4,"1w-1s":1,"1w-1r":"#8c"},1H:{1r:"#2S"},1Q:{1r:"#2S"}}},7d:{"1z-k":{2i:{2o:.5,"1U-1r":"#Gl #8M"}}},"-":""},1g.NU.Gm=1g.NU.lX,1g.B8={a3:{5i:{ac:[{id:"xr",46:"4t"},{id:"uN",46:"4t"},{id:"uz",46:"2b"},{id:"uT",46:"2b"},{id:"uU",46:"2b"},{id:"uG",46:"2b"},{id:"3D",46:"2b"},{id:"uj",46:"2b"},{id:"x6",46:"2b"},{id:"ua",46:ZC.cA?"2b":"4t"},{id:"pU",46:ZC.cA?"2b":"4t"}],ew:{1J:1,2K:"rb"},4Z:{2y:"10 3g 3g 10",1s:30,1M:22,3v:4,1Q:{"1U-1r":"#j3","1G-1s":1,"1G-1r":"#Gn"},"1Q-6Q":{"1U-1r":"#8X","1G-1r":"#74"}},7L:{"1U-1r":"#2S",1r:"#4u"},"6i-2C":{3v:0,"1G-1s":1,"1G-1r":"#4u",7K:{2h:ZC.2L,2y:"5 3g 3g 5",2o:.8,"1U-1r":"#8M #4S","1G-9i":8,1s:40,1M:40},b5:{"1U-1r":"#2S #Cd",1J:"uP",2o:.8},1Q:{"1U-1r":"#Ja","1E-3u":"1K",3v:"4 20 4 8","1G-1s":1,"1G-1r":"#4u",1r:"#2S","2N-3X":{"1U-1r":"#Lj"}},8E:{"1w-1s":1,"1w-1r":"#cs"}},"6i-2C[2L]":{1Q:{3v:"6 10 6 6"}}}},6P:[],2Y:{5E:{1s:"100%",6x:1,"2t-2e":13},86:{1s:"100%",6x:1,"2t-2e":11},1Z:{2U:{"1U-1r":"#qW","1G-1r":"#74"},3q:{"1U-1r":"#74","1G-1r":"#8c","1G-1s":2,"1G-1v":"5o 2V #8X","1G-1K":"5o 2V #8X","1G-2A":"5o 2V #4S","1G-2a":"5o 2V #4S"}},"1Z-x":{2U:{1M:16},3q:{1M:16}},"1Z-y":{2U:{1s:16},3q:{1s:16}},"1Z-xi":{2U:{1s:16},3q:{1s:16}},"1Z-yi":{2U:{1M:16},3q:{1M:16}},2z:{1s:"100%",1M:50,2y:"3g 50 20 50","1G-1s":1,3I:0,"1U-1r":"#Bx","1G-1r":"#4S",4O:{2o:.5,"1U-1r":"#8M"},6C:{2o:.1,"1U-1r":"#4S"},3q:{1s:9,1M:16,"1G-1s":1,"1w-1s":1,"1w-1r":"#111","1G-1r":"#Kt","1G-9i":2,"1U-1r":"#Bw"},"3q-1v":{1s:16,1M:9},"3q-2a":{1s:16,1M:9}},2u:{1s:"100%",1M:"100%",2y:"60 50 65 50"},"2u[2z]":{2y:"60 50 105 50"},4z:{"1w-1s":1,2i:{"1w-1s":1,"1w-1r":"#74"},3Z:{2e:6,"1w-1s":2},"4Q-2i":{"1w-1s":1,"1w-1r":"#74"},"4Q-3Z":{2e:4,"1w-1s":1},1H:{6x:1,3v:6,7J:!0},1Q:{3v:2,"3g-3u":!0,7J:!0},1R:{"1w-1s":1,"1w-1r":"#4u","1U-1r":"#8c"},"5H[5s]":{1Q:{"2t-2e":10,3v:2,1r:"#4u","1U-1r":"#2S"}}},"4z[3d]":{"1U-1r":"#8c"},"1z-y[2q]":{1H:{"2t-2f":3V},1Q:{"1E-3u":"2A"}},"1z-y[5w]":{1H:{"2t-2f":90},1Q:{"1E-3u":"1K"}},1A:{4L:{"1w-1s":1,"1w-1r":"#8M",2e:.5},"1T-3C":{7J:!0,1E:"%v",6x:1,6w:"3g",3I:1},"2H-1E":"%v",3I:1,"1w-1s":1,1R:{1J:"9r",3I:1},"6b-3X":{3I:!0,"3I-x3":2,"3I-6T":1,"3I-2o":.91}},2H:{3I:1,3v:"4 8","3I-6T":3,"2c-y":ZC.2L?-40:-20},"2H[4N]":{3v:"4 8","2c-y":0},2i:{1R:{1J:"3z"},"1A-1H[bO]":{1E:\'<b 1I="1r:%1r">%1A-1E:</b> %2r-1T\',3v:10,"1U-1r":"#2S #8X","1G-1s":1,"1G-1r":"#4S",1r:"#4u","1E-3u":"1K"},"1A-1H[ay]":{1E:\'<b 1I="1r:%1r">%1A-1E:</b> %2r-1T\',3v:5,"1U-1r":"#2S #8X","1G-1s":1,"1G-1r":"#4S",1r:"#4u","1E-3u":"1K"}},3G:{"dD-3G":1,"1G-1s":0,"1U-1r":"#j3",2o:.25,1H:{2h:!1,"1U-1r":"#2S","2t-2e":10,3v:2,"1G-1s":1,"1G-1r":"#4S"}},7I:{"1G-1s":1,"1G-1r":"#4u","1U-1r":"#cc",2e:4},"1Y[2K]":{2y:10},1Y:{"1U-1r":"#8X",2o:1,3I:1,2y:"10 10 3g 3g",3v:"4 2 4 2",1Q:{"1E-3u":"1K",2y:"2 6 2 4",3v:"2 4"},"1Q-6Q":{2o:.25},1R:{3I:0,2e:6,"1G-1r":"#4S","1G-1s":1},5K:{"2t-2e":12,"1E-3u":"1K",6x:1},9U:{"1E-3u":"1K"},b0:{"1w-1r":"#4u","1w-1s":1},"3f-6M":{1r:"#4u"},"3f-on":{"1U-1r":"#vr"},"3f-6Q":{"1U-1r":"#4S"},1Z:{2U:{1s:12,1M:12,"1U-1r":"#qW","1G-1r":"#74"},3q:{1s:12,1M:12,"1U-1r":"#74","1G-1r":"#8c","1G-1s":2,"1G-1v":"5o 2V #8X","1G-1K":"5o 2V #8X","1G-2A":"5o 2V #4S","1G-2a":"5o 2V #4S"}}}},5t:{1A:{"1T-3C":{6w:"1v-4R"}}},6O:{1A:{"1T-3C":{6w:"1v-4R"}},"3d-76":{5p:40,2f:45,"x-2f":-20,"y-2f":0,"z-2f":0}},aX:{"3d-76":{5p:40,2f:45,"x-2f":-20,"y-2f":0,"z-2f":0}},6c:{"1z-y":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-y-n":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x[2q]":{1H:{"2t-2f":3V}},"1z-x[5w]":{1H:{"2t-2f":90}},1A:{"1T-3C":{6w:"1v-4R"}}},bj:{"1z-y":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-y-n":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x[2q]":{1H:{"2t-2f":3V}},"1z-x[5w]":{1H:{"2t-2f":90}}},bv:{1A:{"3i-2f":0},"1z-y":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-y-n":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x[2q]":{1H:{"2t-2f":3V}},"1z-x[5w]":{1H:{"2t-2f":90}}},7k:{"1z-y":{1H:{"2t-2f":0}},"1z-x":{1H:{"2t-2f":3V}},"1z-y-n":{1H:{"2t-2f":0}},"1z-x-n":{1H:{"2t-2f":90}},"3d-76":{5p:40,2f:45,"x-2f":0,"y-2f":-20,"z-2f":0},1A:{"1T-3C":{6w:"1v-4R"}}},7R:{"1z-y":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x":{1H:{"2t-2f":3V}},"1z-y-n":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x-n":{1H:{"2t-2f":90}}},1w:{1A:{"1w-1s":4,1R:{1J:"3z",2e:4}}},1N:{1A:{"1w-1s":4,1R:{1J:"3z",2e:4},"1T-3C":{6w:"1v"}}},97:{"3d-76":{5p:40,2f:45,"x-2f":-20,"y-2f":0,"z-2f":0},1A:{"1G-1s":1,"1w-1s":1,1R:{1J:"3z",2e:4,2o:1,2h:0}}},83:{"3d-76":{5p:40,2f:45,"x-2f":-20,"y-2f":0,"z-2f":0},1A:{"1G-1s":1,"1w-1s":1,1R:{1J:"3z",2e:4,2o:1,2h:0},"1T-3C":{6w:"1v"}}},6v:{4z:{2c:10},1A:{1R:{1J:"3z",2e:4},"1T-3C":{6w:"1v"}}},4C:{4z:{2c:10},1A:{"2o-1N":.4,1R:{1J:"2b"},"1T-3C":{6w:"1v"}}},8r:{4z:{2c:10},"1z-y":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x":{1H:{"2t-2f":3V}},"1z-y-n":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x-n":{1H:{"2t-2f":90}},1A:{1R:{1J:"3z",2e:4},"1T-3C":{6w:"1v"}}},5m:{4z:{2c:40},1A:{1R:{1J:"3z","3i-1J":"8K","3i-2c-x":-.2,"3i-2c-y":-.2},"2N-1R":{"3i-1J":"8K","3i-2c-x":-.2,"3i-2c-y":-.2},"1T-3C":{6w:"6n",1E:"%2r-2e-1T"},"2H-1E":"%2r-2e-1T"}},6V:{4z:{2c:40},"1z-y":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x":{1H:{"2t-2f":3V}},"1z-y-n":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x-n":{1H:{"2t-2f":90}},1A:{1R:{1J:"3z","3i-1J":"8K","3i-2c-x":-.2,"3i-2c-y":-.2},"2N-1R":{"3i-1J":"8K","3i-2c-x":-.2,"3i-2c-y":-.2},"1T-3C":{6w:"6n",1E:"%2r-2e-1T"},"2H-1E":"%2r-2e-1T"}},gO:{"1z-y":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x":{1H:{"2t-2f":3V}},"1z-y-n":{1H:{"2t-2f":0},1Q:{"1E-3u":"3F"}},"1z-x-n":{1H:{"2t-2f":90}}},3O:{2u:{2y:"35 5 5 5"},1z:{"2e-7c":"3g","1w-1s":0,2i:{"1w-1s":0},"4Q-2i":{"1w-1s":0}},1A:{"3i-1J":"8K","1T-3C":{8O:{"1w-1s":1},6w:"4R",1E:"%t",2h:1}}},7e:{"3d-76":{"x-2f":38,"y-2f":0,"z-2f":0},2u:{2y:"25 5 5 5"},1z:{"2e-7c":"3g","1w-1s":0,2i:{"1w-1s":0},"4Q-2i":{"1w-1s":0}},1A:{"3i-1J":"9k","1T-3C":{8O:{"1w-1s":1},6w:"4R",1E:"%t",2h:1}}},8S:{2u:{2y:"40 5 15 5"},1z:{"2e-7c":.8,"1w-1s":0,2i:{"1w-1s":0},"4Q-2i":{"1w-1s":0}},1A:{"3i-1J":"8K","1T-3C":{8O:{"1w-1s":1},1E:"%t",2h:1}}},b7:{2u:{2y:"30 10 10 10"},1A:{2o:.5,"1G-1s":4},1z:{"2e-7c":.65,"1w-1s":0,2i:{"1w-1s":0},"4Q-2i":{"1w-1s":0}}},7d:{4z:{2i:{"1w-1s":1,"1w-1r":"#4S","1U-1r":"-1"},3Z:{"1w-1s":1},1Q:{"3g-3u":!1}},1z:{2h:0,"2e-7c":.7},"1z-k":{"3T-2f":3V},2u:{2y:"40 5 5 5"},1A:{"1w-1s":4,76:"1w",1R:{1J:"3z"}}},8D:{4z:{2i:{"1G-1s":1,"1G-1r":"#4S","1U-1r":"-1"}},1z:{"1w-1s":0,2i:{"1w-1s":0},"4Q-2i":{"1w-1s":0},"2e-7c":.7},"1z-r":{"3T-2f":3V,"1U-1r":"#2S",2i:{"1w-1s":0},3Z:{6w:"5N"},1Q:{"2c-r":"-45%"}},1A:{2e:"85%"},2u:{2y:"40 5 5 5"}},84:{1A:{"1w-1s":1,"1G-1s":1,"2H-1E":"Kz:&8u;$%bD<br>Ky:&8u;$%qp<br>Kx:&8u;$%qq<br>hl:&8u;$%7m"}},5z:{1A:{"1w-1s":2,"1T-3C":{1E:"%2r-2j-1T - %2r-1X-1T"},"2H-1E":"%2r-2j-1T - %2r-1X-1T"}},"-":""},1g.PT=1n(e,t){1a i,a=1g,n=!1;1l 1c!==ZC.1d(i=a.B8.2Y[e])&&1c!==ZC.1d(i.46)&&(n=n||ZC.2s(i.46)),1c!==ZC.1d(a.B8[t])&&1c!==ZC.1d(i=a.B8[t][e])&&1c!==ZC.1d(i.46)&&(n=n||ZC.2s(i.46)),n},1g.2x=1n(e,t,i,a){1a n,l,r,o=1g;i=1c===ZC.1d(i)||ZC.2s(i),a=1c!==ZC.1d(a)&&ZC.2s(a),t 3E 3M||(t=1m 3M(t));1a s=[],A="";1j(l=0,r=t.1f;l<r;l++)if(/(\\(\\w+\\))(.*)/.5U(t[l])){1a C=5y.$1;A=t[l].1F(C,"2Y"),-1===ZC.AU(s,A)&&s.1h(A),A=t[l].1F(C,C.2v(1,C.1f-1)),-1===ZC.AU(s,A)&&s.1h(A)}1u-1===ZC.AU(s,t[l])&&s.1h(t[l]),/a3(.*)/.5U(t[l])&&-1===ZC.AU(s,t[l].1F("a3","6A"))&&s.1h(t[l].1F("a3","6A")),/6A(.*)/.5U(t[l])&&-1===ZC.AU(s,t[l].1F("6A","a3"))&&s.1h(t[l].1F("6A","a3"));1a Z={};1j(l=0,r=s.1f;l<r;l++){1j(1a c=s[l].2n("."),p=o.B8,u=0,h=c.1f;u<h;u++)if(1c!==ZC.1d(n=p[c[u]]))p=n;1u if(1c!==ZC.1d(n=p[ZC.V5(c[u])]))p=n;1u{if(1c===ZC.1d(n=p[ZC.EA(c[u])])){p=1c;1p}p=n}if(p)1j(1a 1b in p)1c!==ZC.1d(p[1b])&&(a||"4h"!=1y p[1b]||p[1b].1f)&&(i||1c===ZC.1d(e[1b])?o.H.QN&&1c!==ZC.1d(o.H.QN[1b])||(Z[1b]=p[1b]):i&&"4h"==1y p[1b]&&(o.H.QN&&1c!==ZC.1d(o.H.QN[1b])||(Z[1b]=p[1b])))}ZC.2E(Z,e)}},ZC.AO={Kw:1n(e,t){1j(1a i=[],a=0,n=e.p.1f;a<n;a++)if(e.p[a]){1a l=(e.p[a][0]-e.x)/e.w,r=(e.p[a][1]-e.y)/e.h;i.1h([t.x+t.w*l,t.y+t.h*r])}1u i.1h(1c);1l{l:t.w*e.l/e.w,r:t.w*e.r/e.w,p:i}},Bj:1n(e,t,i){1a a=2g.dK("fb")[0],n=2g.4P("Kv");n.1J="1E/7u",n.5a=t+"?v"+ZC.fF;1a l=!1;n.hL=n.fD=1n(){if(!(l||1g.fE&&"Lk"!==1g.fE&&"ai"!==1g.fE)){l=!0,n.hL=n.fD=1c,a&&n.6o&&a.b2(n);1a e=1m 5y("1o-(.+?).2j.js","g").3n(t);e&&ZC.WU.1h(e[1]),i&&i(t)}},n.j0=1n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-6K"],t[ZC.1b[12]])),!r)if(1c!==ZC.1d(t.ax)&&t.ax)l=4T(l).LB(ZC.CQ(20,t[ZC.1b[25]])),1c!==ZC.1d(t[ZC.1b[14]])&&(l=l.1F(/\\./g,t[ZC.1b[14]]));1u{if(1c!==ZC.1d(t.5G)&&t.5G){n="";1a o=t["5G-dm"]||"";if("3e"!=1y o&&o.1f){""+ZC.1W(o[0])!==o[0]&&(o=[5x].4B(o));1j(1a s=1,A=o[0]||5x,C=o.7z(1),Z=1c,c=0;c<C.1f;c++)0===C[c].1L("#")&&(Z=c,C[c]=C[c].2v(1));if(C.1f){if(1c!==Z)s=Z;1u if(1c!==ZC.1d(t["1X-cW"]))s=t["1X-cW"];1u{1a p=ZC.JN(ZC.2l(4T(l)),A);s=1B.4b(p),s=ZC.CQ(s,C.1f-1)}n=C[s];1a u=(l=""+4T(l)/1B.6s(A,s)).2n(".");2===u.1f&&u[1].1f>=9&&(l=1c!==ZC.1d(t[ZC.1b[12]])&&-1!==t[ZC.1b[12]]?""+ZC.4o(l,t[ZC.1b[12]]):""+ZC.4o(l))}}1u{1a h=ZC.JN(ZC.2l(4T(l)))/1B.a6;1P(ZC.2l(4T(l))){1i 5x:h=3;1p;1i gy:h=6;1p;1i r8:h=9}if(1c!==ZC.1d(t["1X-cW"])&&(h=3*t["1X-cW"]),"KB"===o.5M())l=""+4T(l)/gL,n="KB";1u if("MB"===o.5M())l=""+4T(l)/Lz,n="MB";1u if("GB"===o.5M())l=""+4T(l)/Ly,n="GB";1u if("TB"===o.5M())l=""+4T(l)/Lw,n="TB";1u if("PB"===o.5M())l=""+4T(l)/Ln,n="PB";1u if(h>=0&&h<3)1P(o){2q:l=l,n="";1p;1i"K":l=""+4T(l)/5x,n="K";1p;1i"M":l=""+4T(l)/gy,n="M";1p;1i"B":l=""+4T(l)/r8,n="B"}1u h>=3&&h<6&&""===o||"K"===o.5M()?(l=""+4T(l)/5x,n="K"):h>=6&&h<9&&""===o||"M"===o.5M()?(l=""+4T(l)/gy,n="M"):(h>=9&&""===o||"B"===o.5M())&&(l=""+4T(l)/r8,n="B")}if(ZC.PJ(l))if(1c!==ZC.1d(t[ZC.1b[12]])&&-1!==t[ZC.1b[12]])l=ZC.9y(4T(l),ZC.BM(0,ZC.1k(t[ZC.1b[12]])));1u{1a 1b=l.2n(".")[1]||"";-1!==t["1X-6K"]&&t["1X-6K"]<1b.1f&&(l=ZC.9y(4T(l),ZC.BM(0,ZC.1k(t["1X-6K"]))))}1c!==ZC.1d(t[ZC.1b[14]])&&(l=l.1F(/\\./g,t[ZC.1b[14]]))}if(!7X(l)){if(1c!==ZC.1d(t[ZC.1b[12]])&&-1!==t[ZC.1b[12]]&&ZC.PJ(l)&&(1c!==ZC.1d(t.5G)&&t.5G||(l=ZC.9y(4T(l),ZC.BM(0,ZC.1k(t[ZC.1b[12]]))))),1c!==ZC.1d(t[ZC.1b[13]])||1c!==ZC.1d(t[ZC.1b[14]])){1j(1a d=l.2n("."),f="",g=0,B=d[0].1f;g<B;g++){1a v=d[0].2v(g,g+1);f+=v,-1===ZC.AU(["-","+"],v)&&(d[0].1f-g-1)%3==0&&d[0].1f-g-1!=0&&(f+=t[ZC.1b[13]])}l=f+(1c!==ZC.1d(d[1])?t[ZC.1b[14]]+d[1]:"")}1c!==ZC.1d(t.5G)&&t.5G&&(l+=n)}}1l l},oN:1n(e){1a t=e.1L("("),i="",a="";-1!==t?(i=ZC.GP(e.2v(0,t)),a=ZC.GP(e.2v(t+1,e.1f-1))):i=ZC.GP(e);1a n=[],l="";if(""!==a){1a r=!1,o=!1,s=!1;l="";1j(1a A=0,C=a.1f;A<C;A++){1a Z=a.2v(A,A+1);1P(Z){1i"\\\\":s?(l+="\\\\",s=!1):s=!0;1p;1i\'"\':s?(l+=\'"\',s=!1):o?(n.1h(l),l="",o=!1):r?l+=Z:o=!0;1p;1i"\'":s?(l+="\'",s=!1):r?(n.1h(l),l="",r=!1):o?l+=Z:r=!0;1p;1i" ":(r||o)&&(l+=Z);1p;1i",":r||o?l+=Z:(""!==l&&n.1h(l),l="");1p;2q:l+=Z}}}1l""!==l&&n.1h(l),[i,n]},ep:1n(e){1l e.a5().1F(/^([0-9])$/,"0$1")},YT:1n(e,t,i,a){t=t||ZC.HE["5s-rO"].hT,1y i===ZC.1b[31]&&(i=!1),1y a===ZC.1b[31]&&(a=0),i&&(e+=lA*a);1a n,l,r,o,s,A,C,Z,c=1m a1;c.Lq(e),i?(n=c.Lp(),l=c.Lm(),r=c.Kr(),o=c.Jw(),s=c.Jt(),A=c.Js(),C=c.Jr(),Z=c.Jq()):(n=c.Jo(),l=c.Jn(),r=c.Jm(),o=c.Jk(),s=c.Jb(),A=c.Ji(),C=c.Jh(),Z=c.vS());1j(1a p=[["mm",ZC.AO.ep(C+1)],["dd",ZC.AO.ep(A)],["Y",Z],["y",Z.a5().5A(2,2)],["F",ZC.HE["k9-fR"][C]],["m",C+1],["M",ZC.HE["k9-5G"][C]],["n",C],["d",A],["D",ZC.HE["jV-5G"][s]],["j",A],["l",ZC.HE["jV-fR"][s]],["N",s+1],["w",s],["S",1n(){1l A%10==1?"st":A%10==2?"nd":A%10==3?"rd":"th"}],["a",n<12?"am":"pm"],["A",n<12?"AM":"PM"],["g",n%12||12],["G",n],["h",ZC.AO.ep(n%12||12)],["H",ZC.AO.ep(n)],["i",ZC.AO.ep(l)],["s",ZC.AO.ep(r)],["q",o]],u=0;u<p.1f;u++)t=t.1F("%"+p[u][0],p[u][1]);1l t},jF:{},ZL:1n(e,t){1a i=1c;if(t&&t.BS?i=t.BS:t&&t.A&&t.A.BS&&(i=t.A.BS),"3e"==1y e&&-1!==e.1L("%1r-")&&ZC.aq.1f>0)1j(1a a=0;a<ZC.aq.1f;a++)-1===e.1L("(+")&&-1===e.1L("(-")||(e=e.1F(/%1r-(\\d+?)\\((\\+|\\-)(\\d+?)\\)/gi,1n(){1a e=ZC.AO.G7(ZC.aq[ZC.1k(8P[1])]);1l"+"===8P[2]?e=ZC.AO.R2(e,ZC.1k(8P[3])):"-"===8P[2]&&(e=ZC.AO.JK(e,ZC.1k(8P[3]))),e})),e=e.1F("%1r-"+a,ZC.aq[a]);1u"3e"==1y e&&i&&-1!==e.1L("%6P-")&&(e=i[ZC.1k(e.1F("%6P-",""))]);1l e},G7:1n(e,t){1a i,a,n,l;if(1c!==ZC.1d(ZC.AO.jF[e]))1l ZC.AO.jF[e];1a r=ZC.GP(6d(e)),o=1,s=!1;1l 0===r.1f?"":("9J("===(r=r.1F("zL","#")).2v(0,5)?(i=1m 5y("9J\\\\((\\\\d{1,3}),\\\\s*(\\\\d{1,3}),\\\\s*(\\\\d{1,3}),\\\\s*([0-9.]+)\\\\)","gi").3n(r))&&(1===(a=ZC.P2(i[1])).1f&&(a="0"+a),1===(n=ZC.P2(i[2])).1f&&(n="0"+n),1===(l=ZC.P2(i[3])).1f&&(l="0"+l),r="#"+a+n+l,o=ZC.BM(0,ZC.CQ(1,5P(i[4]))),s=!0):"9N("===r.2v(0,4)?(i=1m 5y("9N\\\\((\\\\d{1,3}),\\\\s*(\\\\d{1,3}),\\\\s*(\\\\d{1,3})\\\\)","gi").3n(r))&&(1===(a=ZC.P2(i[1])).1f&&(a="0"+a),1===(n=ZC.P2(i[2])).1f&&(n="0"+n),1===(l=ZC.P2(i[3])).1f&&(l="0"+l),r="#"+a+n+l):"#"===r.2v(0,1)?4===r.1f?r="#"+r.2v(1,2)+r.2v(1,2)+r.2v(2,3)+r.2v(2,3)+r.2v(3,4)+r.2v(3,4):7!==r.1f&&(r=""):1c!==ZC.1d(ZC.P.sN[r.5M()])&&(r="#"+ZC.P.sN[r.5M()]),"2b"!==r&&"aG"!==r||(r="-1"),t||(ZC.AO.jF[e]=r),t&&s?[r,o]:r)},jH:{},eq:1n(e,t){if(-1===e&&(e="#j4",t=0),1c!==ZC.1d(ZC.AO.jH[e+","+t]))1l ZC.AO.jH[e+","+t];4===e.1f&&(e=e.2v(0,1)+e.2v(1,2)+e.2v(1,2)+e.2v(2,3)+e.2v(2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4P("I2");i.2Z(n);1a l=i.4P("Ia");n.2Z(l);1a r=i.4P("jS");n.2Z(r)}1l i},BZ:1n(e){1a t;if(1y ZC.bU===ZC.1b[31]){if(ZC.cA)t=!1;1u{t=!0;4J{2g.Ic("Ig")}4M(i){t=!1}}t&&!ZC.2L&&(t=!1),t&&(t="Sr"in 2g.fd),ZC.bU=t}1u t=ZC.bU;if(t)1P(e){1i"7A":1i"6F":e="4H";1p;1i"7V":e="6f";1p;1i"7T":1i"6k":e="5R";1p;1i"3H":e="4H"}1l e},ny:1n(e,t){1a i,a,n,l=[],r=t.JR,o=t.OI,s=t.PB,A=r-s/2;if(e.1f>0){1a C=0,Z=0;1j(0!==r&&(C=ZC.1k(A*ZC.EC(o)+s),Z=ZC.1k(A*ZC.EH(o)+s)),i=0,a=e.1f;i<a;i++)if(1c!==ZC.1d(e[i])){1a c=[];1j(n=0;n<e[i].1f;n++)c[n]=e[i][n];1a p=c.1f;if(2===p||4===p)1j(n=0;n<p;n++)c[n]=e[i][n]+(n%2?Z+t.BB:C+t.BJ);l.1h(c)}1u l.1h(1c)}1l l},mM:1n(e,t,i,a,n){1y n===ZC.1b[31]&&(n=!1);1a l,r,o=[e[0],e[1]];1P(e.1f>=4&&(o[2]=e[2],o[3]=e[3]),e.1f>=6&&(o[4]=e[4],o[5]=e[5]),7===e.1f&&(o[6]=e[6]),t){1i"3a":1i"2F":1a s,A;if(i.CV)s=A=i.AX%2==1?.5:0,ZC.A3.6J.af&&ZC.96&&"2F"===t&&(s=i.AX%2==1?.5:0,A=i.AX%2==1?0:.5),o[0]=1B.43(o[0])-s,o[1]=1B.43(o[1])-A,4===o.1f&&(o[2]=1B.43(o[2])-s,o[3]=1B.43(o[3])-A);"2F"===t&&(o[0]=5P(o[0].4A(4)),o[1]=5P(o[1].4A(4)),4===o.1f&&(o[2]=5P(o[2].4A(4)),o[3]=5P(o[3].4A(4)))),"3a"!==t||a||1y i.BJ!==ZC.1b[31]&&1y i.BB!==ZC.1b[31]&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1]))if(r<=20&&a&&(c[0]=ZC.CQ(c[0],o[0]/("3K"===t?10:1)),c[1]=ZC.CQ(c[1],o[1]/("3K"===t?10:1)),c[2]=ZC.BM(c[2],o[0]/("3K"===t?10:1)),c[3]=ZC.BM(c[3],o[1]/("3K"===t?10:1))),0===l)p.1h(("2F"===t?"M ":"m ")+o[0]+" "+o[1]);1u if(u&&(p.1h(("2F"===t?"M ":"m ")+o[0]+" "+o[1]),u=!1),2===o.1f)p.1h(("2F"===t?"L ":"l ")+o[0]+" "+o[1]);1u if(4===o.1f)p.1h(("2F"===t?"Q ":"qb ")+o[0]+" "+o[1]+" "+o[2]+" "+o[3]),"3K"===t&&p.1h("l "+o[2]+" "+o[3]);1u if(6===o.1f)if("2F"===t){1a 1b=0;o[3]%2m==o[4]%2m&&(1b=o[4]>=o[3]?.Cl:-.Cl),s=ZC.AQ.BN(o[0],o[1],o[2],o[3]+1b),A=ZC.AQ.BN(o[0],o[1],o[2],o[4]-1b),C="0 0",0===o[5]?o[4]-o[3]>2m?(C="0 1",A[0]=s[0],A[1]=s[1]):C=o[4]-o[3]<=180?"0 1":"1 1":o[3]-o[4]>2m?(C="0 0",A[0]=s[0],A[1]=s[1]):C=o[3]-o[4]<=180?"0 0":"1 0",p.1h("a "+o[2]+","+o[2]+" 0 "+C+" "+(A[0]-s[0])+","+(A[1]-s[1]))}1u"3K"===t&&(o[2]*=10,s=ZC.AQ.BN(o[0],o[1],o[2],o[3]),A=ZC.AQ.BN(o[0],o[1],o[2],o[4]),C=1===o[5]?"at":"wa",p.1h(C+" "+ZC.1k(o[0]-o[2])+","+ZC.1k(o[1]-o[2])+","+ZC.1k(o[0]+o[2])+","+ZC.1k(o[1]+o[2])+" "+ZC.1k(s[0])+","+ZC.1k(s[1])+" "+ZC.1k(A[0])+","+ZC.1k(A[1])));1u 7===o.1f&&p.1h(("2F"===t?"C ":"c ")+o[0]+" "+o[1]+" "+o[2]+" "+o[3]+" "+o[4]+" "+o[5])}1u u=!0;1l i.E["8F-dC-2R"]||i.O9&&ZC.4f.2P("2R-2W-"+Z,p.2M("#")),i.H&&r<=20&&a&&(i.H.E[i.J+"-cK"]=c),p},MH:1n(e,t){1a i,a,n=e.117||e.Af;1l t=ZC.1k(t||"0"),n&&n.7x?n.7x.1f>0?(i=n.7x[t].bk,a=n.7x[t].c2):n.qC.1f>0&&(i=n.qC[t].bk,a=n.qC[t].c2):(i=e.bk,a=e.c2),[ZC.1k(i||"0"),ZC.1k(a||"0")]},F2:1n(e,t,i){1a a;1l i=i||2g,1c!==ZC.1d(t)?i.zQ?a=i.zQ(t,e):(a=i.4P(e)).4m("e4",t):a=i.4P(e),"7o:"===e.2v(0,4)&&(a.7U="tW"),a},ER:1n(e){1a t;e 3E 3M||(e=[e]);1j(1a i=0,a=e.1f;i<a;i++)"4h"!=1y(t=e[i])&&(t=ZC.AK(e[i])),t&&(1y t.gl!==ZC.1b[31]?t.gl.b2(t):1y t.6o!==ZC.1b[31]&&t.6o.b2(t))},G3:1n(e,t){1j(1a i in t)if("3e"==1y i&&"4h"!=1y t[i]&&"1n"!=1y t[i])4J{e.4m(i,t[i])}4M(a){}},PO:1n(e,t){1j(1a i in t)"3e"==1y i&&"4h"!=1y t[i]&&"1n"!=1y t[i]&&(e.1I[i]=t[i])},sp:1n(e){1a t;if(e===2g)1l!0;if(!e)1l!1;if(!e.6o)1l!1;if(e.1I){if("2b"===e.1I.3L)1l!1;if("8R"===e.1I.ds)1l!1}if(2w.g6){if("2b"===(t=2w.g6(e,"")).3L)1l!1;if("8R"===t.ds)1l!1}if(t=e.lU){if("2b"===t.3L)1l!1;if("8R"===t.ds)1l!1}1l ZC.P.sp(e.6o)},TF:1n(e){1a t=e.7U||ZC.A3(e).3Q("1O");1l 1c!==ZC.1d(t)&&"4h"==1y t&&(t=1y t.dg!==ZC.1b[31]?t.dg:""),t||""},II:1n(e,t,i,a,n,l,r,o){if(e)1P(r=r||"",t){1i"3a":o?e.9d("2d").n6(i,a,n,l):e.1s=e.1s;1p;1i"3K":1i"2F":1a s=e.6Y.1f;if(s>gL&&1y e.4q!==ZC.1b[31])1l 8j(e.4q="");if(s>0)1j(1a A=s-1;A>=0;A--)""===r?e.b2(e.6Y[A]):0===e.6Y[A].id.1L(r+"-")&&e.b2(e.6Y[A])}},E4:1n(e,t){1P("3e"==1y e&&(e=ZC.AK(e)),t){1i"3a":1l e.9d("2d");1i"2F":1i"3K":1l e}},K1:1n(e,t){1P(t){1i"2F":1l ZC.P.qF(e);1i"3K":1i"3a":1l ZC.P.HZ(e)}},HF:1n(e,t){1P(t){1i"2F":1l ZC.P.qF(e);1i"3K":1l ZC.P.HZ(e);1i"3a":1l ZC.P.zR(e)}},qF:1n(e){1a t;if(ZC.AK(e.id))1l ZC.AK(e.id);1a i=ZC.P.F2("g",ZC.1b[36]);1l 1c!==ZC.1d(t=e.id)&&i.4m("id",t),1c!==ZC.1d(t=e.2p)&&i.4m("1O",t),1c!==ZC.1d(t=e.8l)&&i.4m("z-3b",t),1c!==ZC.1d(t=e["3t-2R"])&&i.4m("3t-2R",t),e.p.2Z(i),i},XW:1n(e){1a t;ZC.P.ER(e.id);1a i=ZC.P.F2("xa",ZC.1b[36]);1l i.id=e.id,1c!==ZC.1d(e.cx)?((t=ZC.P.F2("3z",ZC.1b[36])).id=e.id+"-2T",ZC.P.G3(t,{cx:e.cx,cy:e.cy,r:e.r})):((t=ZC.P.F2("12t",ZC.1b[36])).id=e.id+"-2T",ZC.P.G3(t,{2W:e.2R})),i.2Z(t),i},zR:1n(e){1a t;if(ZC.AK(e.id))1l ZC.AK(e.id);1a i=2g.4P("3a"),a=i.1I;if(1c!==ZC.1d(t=e.id)&&(i.id=t),1c!==ZC.1d(t=e.2p)&&(i.7U=t),1c!==ZC.1d(t=e.wh)){1a n=(""+t).2n("/");e[ZC.1b[19]]=n[0],e[ZC.1b[20]]=n[1]}if(1c!==ZC.1d(t=e.tl)){1a l=(""+t).2n("/");e.1v=l[0],e.1K=l[1]}1l i.1s=e[ZC.1b[19]],i.1M=e[ZC.1b[20]],1c!==ZC.1d(t=e.1K)&&(a.1K=t+"px"),1c!==ZC.1d(t=e.1v)&&(a.1v=t+"px"),1c!==ZC.1d(t=e.3L)&&(a.3L=t),1c!==ZC.1d(t=e.2K)&&(a.2K=t),1c!==ZC.1d(t=e.8l)&&(a.a2=t),e.p.2Z(i),i},HZ:1n(e){1a t,i,a,n,l,r;if(ZC.AK(e.id))1l a=ZC.AK(e.id),1c!==ZC.1d(t=e.wh)&&(l=(""+t).2n("/"),a.1I.1s=l[0]+"px",a.1I.1M=l[1]+"px"),1c!==ZC.1d(t=e.tl)&&(r=(""+t).2n("/"),a.1I.1v=r[0]+"px",a.1I.1K=r[1]+"px"),a;(n=(a=2g.4P("3B")).1I).u8="mC",1c!==ZC.1d(t=e.wh)&&(l=(""+t).2n("/"),e[ZC.1b[19]]=l[0],e[ZC.1b[20]]=l[1]),1c!==ZC.1d(t=e.tl)&&(r=(""+t).2n("/"),e.1v=r[0],e.1K=r[1]),1c!==ZC.1d(t=e.id)&&(a.id=t),1c!==ZC.1d(t=e.2p)&&""!==t&&(a.7U=t);1j(1a o=[["1v","","px"],["1K","","px"],[ZC.1b[19],"","px"],[ZC.1b[20],"","px"],"2K","9L",["9c","qR|sc"],["8l","a2"],"3t","3L",["6S","","px"],"6W","6U","cO","dv","cT","sx","1r","1G","xc","lm","oa","lB","1U","4V",["2y","mT|ss|su|mG","px"],["mT","","px"],["ss","","px"],["su","","px"],["mG","","px"],["3v","ca|di|d6|d8","px"],["ca","","px"],["di","","px"],["d6","","px"],["d8","","px"],"bt","jU"],s=1c,A=1c,C=1c,Z=0,c=o.1f;Z<c;Z++)if("3e"==1y o[Z]&&(o[Z]=[o[Z]]),t=1c,1c!==ZC.1d(i=e[o[Z][0]])&&(t=i),1c!==ZC.1d(t)){1c!==ZC.1d(o[Z][1])&&""!==o[Z][1]||(o[Z][1]=o[Z][0]);1j(1a p=o[Z][1].2n("|"),u=0,h=p.1f;u<h;u++){1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q=u):(p=ZC.P.HZ({id:C,p:2g.3s,tl:"-6H/-6H",4g:u,2K:"4D",6W:i,6S:a,2p:"zc-1E-kJ",6U:n})).1I.bt=Z?"130%":-1!==l?ZC.1k(l)+"px":"130%",-1===t.1L("<")||-1===t.1L(">")||Z||ZC.A3(p).9z().5d(1n(){"BR"!==1g.8h.5M()&&(1c!==ZC.1d(1g.1I.6W)&&""!==1g.1I.6W||(1g.1I.6W=i),1c!==ZC.1d(1g.1I.6S)&&""!==1g.1I.6S||(1g.1I.6S=a+"px"),1g.1I.bt=-1!==l?ZC.1k(l)+"px":"130%","B"!==1g.8h.5M()&&"12r"!==1g.8h.5M()&&(1c!==ZC.1d(1g.1I.6U)&&""!==1g.1I.6U||(1g.1I.6U=n)))}),(o=p.hY())&&o.1s>0?(s=o.1s,r&&(A=o.1M)):(s=ZC.2L&&ZC.A3.6J.7n?p.qM:ZC.A3(p).1s(),r&&(A=ZC.2L&&ZC.A3.6J.7n?p.qP:ZC.A3(p).1M())),r?(ZC.4f.2P("1E-1M-"+c,A),A):(ZC.4f.2P("1E-1s-"+c,s),s)}},!2g.gg&&2g.zS&&(2g.gg=1n(e){1l 2g.zS("."+e)}),ZC.A3=1n(e,t,i){1a a,n,l,r,o=1g;if(1y i===ZC.1b[31]&&(i=!0),i)1l 1m ZC.A3(e,t,!1);if(o.P6=[],o.Q9=e,o.MJ=t,o.1f=0,o.MJ=o.MJ||2g.dK("3s")[0],"4h"==1y o.Q9)o.P6=[o.Q9];1u if("3e"==1y o.Q9)1j(1a s=o.Q9.2n(","),A=0;A<s.1f;A++){1a C=ZC.GP(s[A]),Z=!1;if(2===(a=C.2n(">")).1f&&(Z=!0,ZC.A3(a[0]).5d(1n(){1a e=1g;ZC.A3(a[1],1g).5d(1n(){1g.6o===e&&o.P6.1h(1g)})})),2===(a=C.2n(" ")).1f&&(Z=!0,ZC.A3(a[0]).5d(1n(){ZC.A3(a[1],1g).5d(1n(){o.P6.1h(1g)})})),!Z)if("#"===C.2v(0,1))ZC.AK(C.2v(1))&&(o.P6=[ZC.AK(C.2v(1))]);1u if("."===C.2v(0,1))if(2g.gg){if(o.MJ.gg)n=o.MJ.gg(C.2v(1));1u if(n=2g.gg(C.2v(1)),o.MJ!==2g){1a c=[];1j(l=0,r=n.1f;l<r;l++)ZC.A3.A4(n[l],o.MJ)&&c.1h(n[l]);n=c}1j(l=0,r=n.1f;l<r;l++)o.P6.1h(n[l])}1u{1a p=1m 5y("(^|\\\\s)"+C.2v(1)+"(\\\\s|$)","i"),u=o.MJ.dK("*"),h="";1j(l=0,r=u.1f;l<r;l++)"4h"==1y(h=u[l].7U)&&(h=1y h.dg!==ZC.1b[31]?h.dg:""),""!==h&&p.5U(h)&&o.P6.1h(u[l])}1u 1j(l=0,r=(n=o.MJ.dK(C)).1f;l<r;l++)o.P6.1h(n[l])}1l o.1f=o.P6.1f,1g},ZC.A3.5j={7t:1n(){1j(1a e,t=[],i=0,a=1g.P6.1f;i<a;i++){1a n=[1g.P6[i]];if((e=8P.1f)>1)1j(1a l=1;l<e;l++)n.1h(8P[l]);t.1h(8P[0].9A(1g,n))}1l t},5d:1n(){1j(1a e,t=0,i=1g.P6.1f;t<i;t++){1a a=[1g.P6[t]];if((e=8P.1f)>1)1j(1a n=1;n<e;n++)a.1h(8P[n]);8P[0].9A(1g.P6[t],a)}1l 1g},9z:1n(){1a e=[];1l 1g.5d(1n(){1j(1a t=0,i=1g.6Y.1f;t<i;t++)1===1g.6Y[t].eA&&e.1h(1g.6Y[t])}),1g.P6=e,1g},3p:1n(){1g.7t.4x(1g,1n(e){e&&e.6o&&e.6o.b2(e)})},jX:1n(){1g.7t.4x(1g,1n(e){if(e)1j(;e.6Y.1f;)e.b2(e.6Y[e.6Y.1f-1])})},lD:1n(e){1a t,i;1y e===ZC.1b[31]&&(e=!0);1a a=1g.7t.4x(1g,1n(a){if(!a)1l 1c;if(a===2w){1a n=2g.3s;1l a.zT?(t=a.zT,i=a.12q):n&&n.gl&&n.gl.lI?(t=n.gl.lI,i=n.gl.zV):n&&n.lI&&(t=n.lI,i=n.zV),{1s:t,1M:i}}1a l,r,o=e?"8y":ZC.A3(a).fY("3L");if(2w.g6){1a s=2w.g6(a,1c);l=s.sd(ZC.1b[19]).7z(0,-2),r=s.sd(ZC.1b[20]).7z(0,-2)}1u if(a.hY){1a A=a.hY();l=A.1s?A.1s:a.qM,r=A.1M?A.1M:a.qP}1u l=a.qM,r=a.qP;if("2b"===o||""===o||1y o===ZC.1b[31]){1a C=a.1I,Z=C.ds,c=C.2K,p=C.3L;C.ds="8R",C.2K="4D",C.3L="8y",t=l,i=r,C.3L=p,C.2K=c,C.ds=Z}1u t=l||0,i=r||0;1l{1s:t,1M:i}});1l 1===a.1f?a[0]:a},fY:1n(e){1a t=1g.7t.4x(1g,1n(e,t){if("3L"===t)1l e.1I.3L;1a i,a=2g;if(t=ZC.EA(t),!e||e===a)1l mh;if("3o"===t&&1y e.12p!==ZC.1b[31]){1a n=(ZC.A3(e).fY("jU")||"").m0(/2o\\(3o=(.*)\\)/);1l n&&n[1]?5P(n[1])/100:1}if(-1!==ZC.AU(["9c","qR","sc"],t))1l(i=e.1I.9c)?i:(i=e.1I.qR)?i:(i=e.1I.sc)?i:"2b";1a l=e.1I?e.1I[t]:1c;if(!l)if(a.lp&&a.lp.g6){1a r=a.lp.g6(e,1c);t=t.1F(/([A-Z])/g,"-$1").aN(),l=r?r.sd(t):1c}1u if(e.lU&&(l=e.lU[t],/^\\d/.5U(l)&&!/px$/.5U(l)&&"6U"!==t)){1a o=e.1I.1K,s=e.sm.1K;e.sm.1K=e.lU.1K,e.1I.1K=l||0,l=e.1I.12o+"px",e.1I.1K=o,e.sm.1K=s}1l"3o"===t&&(l=5P(l)),/zW/.5U(8V.c3)&&-1!==ZC.AU(["1K","1v","2A","2a"],t)&&"8L"===ZC.A3(e).fY("2K")&&(l="3g"),"3g"===l?1c:l},e);1l 1===t.1f?t[0]:t},wh:1n(){1a e;1l 1g.P6[0]?1c!==ZC.1d(e=ZC.A3(1g.P6[0]).lD())?[ZC.1k(e[ZC.1b[19]]),ZC.1k(e[ZC.1b[20]])]:[0,0]:1c},1s:1n(e){1a t;if(1y e===ZC.1b[31]){1a i=1g.7t.4x(1g,1n(e){1l 1c!==ZC.1d(t=ZC.A3(e).lD())?ZC.1k(t[ZC.1b[19]]):0});1l 1===i.1f?i[0]:i}1l 1g.7t.4x(1g,1n(e,t){e.1I.1s=t+"px"},e),1g},1M:1n(e){1a t;if(1y e===ZC.1b[31]){1a i=1g.7t.4x(1g,1n(e){1l 1c!==ZC.1d(t=ZC.A3(e).lD())?ZC.1k(t[ZC.1b[20]]):0});1l 1===i.1f?i[0]:i}1l 1g.7t.4x(1g,1n(e,t){e.1I.1M=t+"px"},e),1g},aK:1n(){1l ZC.A3.1Z().1K},aO:1n(){1l ZC.A3.1Z().1v},2O:1n(e,t){if(1y t===ZC.1b[31]){1a i=1g.7t.4x(1g,1n(t){1a i=ZC.A3(t).fY(e);1l-1!==(""+i).1L("px")?ZC.1k(i):i});1l 1===i.1f?i[0]:i}1l 1g.7t.4x(1g,1n(e,t,i){e.1I[t]=i},e,t),1g},3Q:1n(e,t){if(1y t===ZC.1b[31]){1a i=1g.7t.4x(1g,1n(t){1l t.bJ(e)});1l 1===i.1f?i[0]:i}1l 1g.7t.4x(1g,1n(e,t,i){e.4m(t,i)},e,t),1g},8t:1n(e){if(1y e===ZC.1b[31]){1a t=1g.7t.4x(1g,1n(e){1l e.1T});1l 1===t.1f?t[0]:t}1l 1g.7t.4x(1g,1n(e,t){e.1T=t},e),1g},4n:1n(){1l 1g.7t.4x(1g,1n(e){e.1I.3L="8y"}),1g},5b:1n(){1l 1g.7t.4x(1g,1n(e){e.1I.3L="2b"}),1g},2c:1n(){1a e=1g.7t.4x(1g,1n(e){if(!(e&&(e.x&&e.y||1c!==!e.6o&&"2b"!==ZC.A3(e).fY("3L"))))1l mh;1a t,i,a,n,l,r,o,s={1v:0,1K:0},A={1v:0,1K:0},C=e&&e.Ag;1l C&&((i=C.3s)===e&&(s={1v:i.12n,1K:i.12m}),t=C.fd,1y e.hY!==ZC.1b[31]&&(A=e.hY()),a=C.lp||C.12l,n=t.lV||i.lV||0,l=t.lC||i.lC||0,r=a.uZ||t.aO,o=a.v4||t.aK,s={1v:A.1v+r-n,1K:A.1K+o-l}),s});1l 1===e.1f?e[0]:e},3r:1n(e,t,i){if(""!==(e=ZC.A3.ic(e))){if(i||(i=!ZC.sb||{sy:!0}),-1!==e.1L(" ")){1j(1a a=e.2n(/\\s+/),n=0;n<a.1f;n++)1g.3r(a[n],t,i);1l 1g}1l 1g.7t.4x(1g,1n(e,t,a){1n n(e){1a t=(e=e||2w.Aa).2X||e.sE,i=ZC.A3.BZ(e);1c!==i&&a.4x(t,i)}ZC.A3.IW||(ZC.A3.IW=[]),ZC.A3.IW.1h([e,t,a,n]),e.ly?e.ly(t,n,i):e.mK("on"+t,n)},e,t),1g}},3k:1n(e,t){if(""!==(e=ZC.A3.ic(e))){if(-1!==e.1L(" ")){1j(1a i=e.2n(/\\s+/),a=0;a<i.1f;a++)1g.3k(i[a],t);1l 1g}1l 1g.7t.4x(1g,1n(e,t,i){if(1y ZC.A3.IW!==ZC.1b[31])1j(1a a=0,n=ZC.A3.IW.1f;a<n;a++)if((ZC.A3.IW[a][0]===e||e.8h&&"12k"===e.8h.5M()&&e.id===ZC.A3.IW[a][0].id)&&ZC.A3.IW[a][1]===t&&ZC.A3.IW[a][2]===i){e.zZ?e.zZ(t,ZC.A3.IW[a][3],!0):e.12j("on"+t,ZC.A3.IW[a][3]),ZC.A3.IW.6r(a,1);1p}},e,t),1g}},4c:1n(e,t,i){if(""!==(e=ZC.A3.ic(e))){if(i||(i=!ZC.sb||{sy:!0}),0===e.1L("en")&&(i={sy:!1}),-1!==e.1L(" ")){1j(1a a=e.2n(/\\s+/),n=0;n<a.1f;n++)1g.4c(a[n],t,i);1l 1g}1a l=1g.Q9;1l ZC.A3.9W||(ZC.A3.9W={}),ZC.A3.9W[e]||(ZC.A3.9W[e]=[],2g.ly?2g.ly(e,r,i):2g.mK("on"+e,r)),ZC.A3.9W[e].1h([l,t]),1g}1n r(t){1a i=(t=t||2w.Aa).2X||t.sE,a=i.7U||"";"4h"==1y a&&(a=1y a.dg!==ZC.1b[31]&&1c!==ZC.1d(a.dg)?a.dg:"");1a l,r,o=ZC.A3.9W[e],s=1c,A=1c,C=[];1j(l=0,r=o.1f;l<r;l++)("4h"==1y o[l][0]&&i===o[n][0]||"3e"==1y o[l][0]&&("."===o[l][0].2v(0,1)&&-1!==ZC.AU(a.2n(" "),o[l][0].1F(".",""))||"#"===o[l][0].2v(0,1)&&i.id===o[l][0].2v(1)))&&(s=o[l][1],A=ZC.A3.BZ(t),1c!==ZC.1d(s)&&1c!==ZC.1d(A)&&C.1h([s,i,A]));1j(l=0,r=C.1f;l<r;l++)C[l][0].4x(C[l][1],C[l][2])}},4j:1n(e,t){if(""!==(e=ZC.A3.ic(e))){1a i,a,n;if(-1!==e.1L(" ")){1j(a=0,n=(i=e.2n(/\\s+/)).1f;a<n;a++)1g.4j(i[a],t);1l 1g}1a l=1g.Q9;if(ZC.A3.9W||(ZC.A3.9W={}),i=ZC.A3.9W[e])1j(a=i.1f-1;a>=0;a--)i[a][0]!==l||t&&i[a][1]!==t||ZC.A3.9W[e].6r(a,1);1l 1g}}},ZC.A3.12h=1n(e){1j(1a t=[],i=0;i<ZC.A3.9W[e].1f;i++)t.1h(ZC.A3.9W[e][i][0]);1l t.2M(",")},ZC.A3.ic=1n(e){1l ZC.cA&&(e=ZC.GP(e.1F(/4H|5R|6f/,""))),e},ZC.A3.4f={},ZC.A3.6J={},1n(){1a e=/(7n)[ \\/]([\\w.]+)/,t=/(li)(?:.*a4)?[ \\/]([\\w.]+)/,i=/(af) ([\\w.]+)/,a=/(yI)(?:.*? rv:([\\w.]+))?/,n=/(Ad)(?:.*? rv:([\\w.]+))?/,l=1n(l){l=l.aN();1a r=e.3n(l)||t.3n(l)||i.3n(l)||n.3n(l)||l.1L("121")<0&&a.3n(l)||[];1l[r[1]||"",r[2]||"0"]}(8V.c3);l[0]&&("Ad"===l[0]&&(l[0]="af"),ZC.A3.6J[l[0]]=!0,ZC.A3.6J.a4=l[1])}(),ZC.A3.1Z=1n(){1a e={1v:0,1K:0},t=2g,i=t.fd,a=t.3s;1l i&&(i.aO||i.aK)?(e.1K=i.aK,e.1v=i.aO):a&&(e.1K=a.aK,e.1v=a.aO),e},ZC.A3.BZ=1n(e){if(e.Af=e,e.2X||(e.2X=e.sE||2g),3!==e.2X.eA&&8!==e.2X.eA||(e.2X=e.2X.6o),1c===ZC.1d(e.bk)&&1c!==ZC.1d(e.c8)){1a t=e.2X.Ag||2g,i=t.fd,a=t.3s;e.bk=e.c8+(i&&i.aK||a&&a.aK||0)-(i&&i.lC||a&&a.lC||0),e.c2=e.dt+(i&&i.aO||a&&a.aO||0)-(i&&i.lV||a&&a.lV||0)}1l!e.9f&&(e.7K,mh),e.6R||(e.6R=1n(){1g.12g=!1}),e.Ak||(e.Ak=1n(){1g.12f=!0}),e},ZC.A3.A4=1n(e,t){if(e===t)1l!0;1j(;e!==t&&e.6o;)if((e=e.6o)===t)1l!0;1l!1},ZC.A3.a8=1n(e){1a t=e.3R||"",i=e.1J||"bL",a=e.1V||"",n=!0;1y e.ag!==ZC.1b[31]&&(n=ZC.2s(e.ag)),""===a.1F(/\\&/g,"")&&(a="");1a l=e.ej||1c,r=e.4L||1c,o=e.aF||1c,s=1c;4J{2w.mr?s=1m mr("12e.12d"):2w.hP&&(s=1m hP)}4M(C){}1a A="s4:"===2w.89.hM;if(s){n&&(s.fD=1n(){4===s.fE&&((A||s.6M>=oG&&s.6M<eX)&&o&&o(s.zt,s.6M,s,t),s.6M>=sC&&r&&r(s,s.6M,s.rQ,t),s.fD=1m 2w.bA,s=1c)}),2w.mr||(s.j0=1n(){r&&r(s,0,"",t)}),"zN"===i.5M()?(s.bD("zN",t,n),s.cn("X-12c-12b","hP"),s.cn("12a-1J","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l,r,o,s="",A=ZC.6N?ZC.3y:0,C=0,Z=e.1f;C<Z;C++)e[C]&&(0===C?(r=e[C][0]+A+a,o=e[C][1]+A+n,l=C,s+=1B.43(r,10)+","+1B.43(o,10)+","):1B.5C((e[C][0]+A-r)*(e[C][0]+A-r)+(e[C][1]+A-o)*(e[C][1]+A-o))>t&&e[C-1]&&(1B.5C((e[C][0]-e[C-1][0])*(e[C][0]-e[C-1][0])+(e[C][1]-e[C-1][1])*(e[C][1]-e[C-1][1]))>t&&C-l>1&&(s+=1B.43(e[C-1][0]+A+a,10)+","+1B.43(e[C-1][1]+A+n,10)+","),r=e[C][0]+A+a,o=e[C][1]+A+n,l=C,s+=1B.43(r,10)+","+1B.43(o,10)+","));1l s=s.2v(0,s.1f-1)},ZF:1n(e,t){if(1c===ZC.1d(e)||e.1f<2)1l"";1c===ZC.1d(t)&&(t=6,ZC.2L&&(t+=10));1a i,a,n,l,r,o=[];1j(i=0,a=e.1f;i<a;i++)(0===i||i>0&&1c!==ZC.1d(e[i])&&1c!==ZC.1d(e[i-1])&&e[i].2M("/")!==e[i-1].2M("/")||1c===ZC.1d(e[i]))&&o.1h(e[i]);1a s=[],A=[],C=!1;1j(i=0,a=o.1f;i<a;i++)if(o[i]){1a Z,c,p,u,h=o[i][0],1b=o[i][1];if(o[i-1]&&(p=o[i-1][0],u=o[i-1][1],p===h&&(p-=.1)),o[i+1]&&(Z=o[i+1][0],c=o[i+1][1],Z===h&&(Z+=.1)),0===i)n=1B.ar((c-1b)/(Z-h)),r=l=ZC.UE(n),Z>=h&&(r+=180),s.1h(ZC.AQ.BN(h,1b,t,l+90),ZC.AQ.BN(h,1b,t,r),ZC.AQ.BN(h,1b,t,l+3V));1u if(i===o.1f-1)n=1B.ar((u-1b)/(p-h)),r=l=ZC.UE(n),p>=h&&(r+=180),C?(A.1h(ZC.AQ.BN(h,1b,t,l+3V),ZC.AQ.BN(h,1b,t,r),ZC.AQ.BN(h,1b,t,l+90)),C=!1):s.1h(ZC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(C[C.1f-1]);1a u=[],h=[];1j(i=0;i<Z.1f-1;i++){l=C[i];1a 1b=Z[i],d=1/A[i];r=1b+Z[i+1]-l-l,u.1h((l-1b-r)*d),h.1h(r*d*d)}1l 1n(i){1a a=e.1f-1;if(i===e[a])1l t[a];1j(1a n,l=0,r=h.1f-1;l<=r;){n=1B.4b(.5*(l+r));1a o=e[n];if(o<i)l=n+1;1u{if(!(o>i))1l t[n];r=n-1}}a=1B.1X(0,r);1a s=i-e[a],A=s*s;1l t[a]+Z[a]*s+u[a]*A+h[a]*s*A}},YQ:1n(e,t,i,a){1c===ZC.1d(a)&&(a=1/(i/t.1f*4));1a n,l,r=[];if(e)if((n=[].4B(t))[1]&&n[2]){n[0]=n[0]||n[1]||n[2]||n[3],n[1]=n[1]||n[2]||n[0]||n[3],n[2]=n[2]||n[3]||n[1]||n[0],n[3]=n[3]||n[2]||n[1]||n[0];1a o=ZC.AQ.zv([0,1,2,3],n);1j(l=1;l<=2;l+=a)r.1h([l-1,o(l)])}1u r.1h([]);1u 1j(1a s=1;s<t.1f-2;s++)if(1!==a)if((n=[t[s-1],t[s],t[s+1],t[s+2]])[1]&&n[2])1j(n[0]=n[0]||n[1]||n[2]||n[3],n[1]=n[1]||n[2]||n[0]||n[3],n[2]=n[2]||n[3]||n[1]||n[0],n[3]=n[3]||n[2]||n[1]||n[0],l=0;l<=1;l+=a){1a A=s+l,C=ZC.AQ.zw(l,n);r.1h([A-1,C])}1u r.1h([]);1u r.1h([s-1,t[s]]);1l r},SN:1n(e){1j(1a t=1B.43(ZC.JN(ZC.2l(e))/1B.a6),i=[1,2,4,5,6,8,10],a=ZC.3w,n=1,l=0;l<i.1f;l++){1a r=i[l]*1B.6s(10,t)-e;ZC.2l(r)<a&&(n=i[l],a=ZC.2l(r))}1l n*1B.6s(10,t)},ZI:1n(e,t,i,a,n){1a l,r,o,s;1c!==ZC.1d(a)&&0!==a||(a=1);1a A=1B.4b(ZC.JN(ZC.2l(t))/1B.a6),C=1B.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<l;)t=e.g1(n),i=n+1<l?e.g1(n+1):0,12x<=t&&t<=12H&&12F<=i&&i<=12E&&(t=12D+((zD&t)<<10)+(zD&i),n++),t<=127?a+=6d.d7(t):t<=12C?a+=6d.d7(12B|t>>>6&31,128|63&t):t<=m7?a+=6d.d7(12A|t>>>12&15,128|t>>>6&63,128|63&t):t<=12z&&(a+=6d.d7(12y|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));1l a},zF:1n(e){1a t,i=3M(e.1f>>2);1j(t=0;t<i.1f;t++)i[t]=0;1j(t=0;t<8*e.1f;t+=8)i[t>>5]|=(3U&e.g1(t/8))<<t%32;1l i},zG:1n(e){1j(1a t="",i=0;i<32*e.1f;i+=8)t+=6d.d7(e[i>>5]>>>i%32&3U);1l t},zH:1n(e,t){1n i(e,t,i,a,n,l){1l o((r=o(o(t,e),o(a,l)))<<(s=n)|r>>>32-s,i);1a r,s}1n a(e,t,a,n,l,r,o){1l i(t&a|~t&n,e,t,l,r,o)}1n n(e,t,a,n,l,r,o){1l i(t&n|a&~n,e,t,l,r,o)}1n l(e,t,a,n,l,r,o){1l i(t^a^n,e,t,l,r,o)}1n r(e,t,a,n,l,r,o){1l i(a^(t|~n),e,t,l,r,o)}1n o(e,t){1a i=(m7&e)+(m7&t);1l(e>>16)+(t>>16)+(i>>16)<<16|m7&i}e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;1j(1a s=11Y,A=-11y,C=-11t,Z=11r,c=0,p=e.1f;c<p;c+=16){1a u=s,h=A,1b=C,d=Z;A=r(A=r(A=r(A=r(A=l(A=l(A=l(A=l(A=n(A=n(A=n(A=n(A=a(A=a(A=a(A=a(A,C=a(C,Z=a(Z,s=a(s,A,C,Z,e[c],7,-11q),A,C,e[c+1],12,-11p),s,A,e[c+2],17,11o),Z,s,e[c+3],22,-11n),C=a(C,Z=a(Z,s=a(s,A,C,Z,e[c+4],7,-11m),A,C,e[c+5],12,11l),s,A,e[c+6],17,-11j),Z,s,e[c+7],22,-118),C=a(C,Z=a(Z,s=a(s,A,C,Z,e[c+8],7,11i),A,C,e[c+9],12,-11h),s,A,e[c+10],17,-11g),Z,s,e[c+11],22,-11f),C=a(C,Z=a(Z,s=a(s,A,C,Z,e[c+12],7,11e),A,C,e[c+13],12,-11d),s,A,e[c+14],17,-11c),Z,s,e[c+15],22,11b),C=n(C,Z=n(Z,s=n(s,A,C,Z,e[c+1],5,-11a),A,C,e[c+6],9,-Ug),s,A,e[c+11],14,119),Z,s,e[c],20,-11w),C=n(C,Z=n(Z,s=n(s,A,C,Z,e[c+5],5,-11k),A,C,e[c+10],9,11x),s,A,e[c+15],14,-11L),Z,s,e[c+4],20,-11W),C=n(C,Z=n(Z,s=n(s,A,C,Z,e[c+9],5,11V),A,C,e[c+14],9,-11U),s,A,e[c+3],14,-11T),Z,s,e[c+8],20,11S),C=n(C,Z=n(Z,s=n(s,A,C,Z,e[c+13],5,-11R),A,C,e[c+2],9,-11Q),s,A,e[c+7],14,11P),Z,s,e[c+12],20,-11O),C=l(C,Z=l(Z,s=l(s,A,C,Z,e[c+5],4,-11N),A,C,e[c+8],11,-11M),s,A,e[c+11],16,11K),Z,s,e[c+14],23,-11z),C=l(C,Z=l(Z,s=l(s,A,C,Z,e[c+1],4,-11I),A,C,e[c+4],11,11H),s,A,e[c+7],16,-11G),Z,s,e[c+10],23,-11F),C=l(C,Z=l(Z,s=l(s,A,C,Z,e[c+13],4,11E),A,C,e[c],11,-11D),s,A,e[c+3],16,-12W),Z,s,e[c+6],23,12X),C=l(C,Z=l(Z,s=l(s,A,C,Z,e[c+9],4,-14k),A,C,e[c+12],11,-14j),s,A,e[c+15],16,14i),Z,s,e[c+2],23,-14h),C=r(C,Z=r(Z,s=r(s,A,C,Z,e[c],6,-14g),A,C,e[c+7],10,14f),s,A,e[c+14],15,-14e),Z,s,e[c+5],21,-14d),C=r(C,Z=r(Z,s=r(s,A,C,Z,e[c+12],6,14c),A,C,e[c+3],10,-14b),s,A,e[c+10],15,-14a),Z,s,e[c+1],21,-148),C=r(C,Z=r(Z,s=r(s,A,C,Z,e[c+8],6,145),A,C,e[c+15],10,-144),s,A,e[c+6],15,-143),Z,s,e[c+13],21,142),C=r(C,Z=r(Z,s=r(s,A,C,Z,e[c+4],6,-13Z),A,C,e[c+11],10,-13X),s,A,e[c+2],15,13W),Z,s,e[c+9],21,-14l),s=o(s,u),A=o(A,h),C=o(C,1b),Z=o(Z,d)}1l 3M(s,A,C,Z)}},1y 1o===ZC.1b[31]&&(2w.1o={149:!0}),1o.14M={},1o.fH={},1o.14L={},1o.6e={},1o.6e.2e=0,1o.6e.1V={},1o.6e.a7=1n(e,t,i,a){1a n;if(1c!==ZC.1d(1o.6e.1V[i]))(n=1o.6e.1V[i]).nE=!0,ZC.Ax=!0,a||(n.7v(t),n.J=i),ZC.Ax=!1;1u{1P(e){1i"DM":n=1m DM(t);1p;1i"I1":n=1m I1(t);1p;1i"DT":n=1m DT(t);1p;1i"R0":n=1m R0(t);1p;1i"CX":n=1m CX(t)}n.J=i,1o.6e.2e++,1o.6e.2e>1o.3J.Bb?(1o.6e.1V={},1o.6e.2e=0):1o.6e.1V[i]=n}1l n},1o.fT={},1o.Az={},1o.c9=2,1o.Dn=!1,1o.tD=1,1o.Bh={1w:"xy",97:"3d,1w",1N:"xy",83:"3d,1N",bj:"yx",bv:"yx",5t:"xy",6O:"3d,5t",6c:"yx",7k:"3d,6c",6v:"xy",5m:"xy",8r:"yx",6V:"yx",3O:"r",7e:"3d,3O",8S:"r",8D:"r",8i:"5t",7R:"6c",aA:"xy",aB:"yx",5V:"xy",7d:"r",5z:"xy",qw:"yx",84:"xy,5t",b7:"r"},1o.4F={9O:!1,aT:!1,dh:!1,8n:!1,k4:!1},1o.Bi=1n(e){1j(1a t=0;t<e.1f;t++){if(e[t].5a)if(e[t].5a.1L("1o.2j.js")>-1)1l e[t].5a.2n("1o.2j.js")[0]+"i4/"}1l"./i4/"}(2g.dK("fb")[0].6Y),1o.3J={kz:1,zd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1o.yy=1n(O){1a QK=O.i5||"",F5="",G,MD=1c;1c!==ZC.1d(G=O.1V)&&("3e"==1y G?F5=G:MD=3h.1q(3h.5g(G)));1a DF=1c;if(""!==QK)ZC.A3.a8({1J:"bL",3R:QK,ag:!1,1V:1o.hd?"lx=14A":"",4L:1n(){1l!1},aF:1n(KH){1n 1W(e){ZC.4f.1V["1V-"+QK]=KH,O.bb="3g",ZC.2E(e.aW,O)}4J{DF=3h.1q(KH),1W(DF)}4M(J7){4J{DF=7l("("+KH+")"),1W(DF)}4M(J7){1l!1}}}});1u{if(""!==F5)4J{DF=3h.1q(F5)}4M(J7){1l!1}1u 1c!==MD&&(DF=MD);1c===ZC.1d(O.bb)&&(O.bb="3g"),ZC.2E(DF.aW,O)}1l 1o.aW(O)},1o.fN=1c,1o.aQ={},1o.aW=1n(e,t){if(1c===ZC.1d(t)&&(t=!1),t)1l 1o.yy(e);1c===ZC.1d(ZC.3a)&&ZC.zn();1a i=e.bb||"3g";"gV"===i&&(i="3g"),ZC.2L&&"3g"===i&&(i="2F");1a a=!1;if("!"===i.2v(0,1)&&(a=!0,i=i.2v(1)),a||("3g"===i||"3a"===i&&!ZC.3a||"2F"===i&&!ZC.2F||"3K"===i&&!ZC.3K||"aJ"===i&&!ZC.aJ)&&(ZC.2F?i="2F":ZC.3a?i="3a":ZC.3K?i="3K":ZC.aJ&&(i="aJ")),"3K"===i&&1c===ZC.1d(1o.fN)&&(1o.fN=!1),"aJ"!==i)1l 1o.rs(e,i);1o.14o(e)},2g.mK&&("ai"===2g.fE?1o.fN=!0:2g.mK("fD",1n(){"ai"===2g.fE&&(1o.fN=!0)})),1o.14z=1o.14y=1n(e,t){ZC.HE[e]=t},1o.HY=[],1o.YE={},1o.14x=0,1o.14w=0,1o.14v=!1,1o.tP=!1,1o.rr=!1,1o.14u=!1,1o.2O=1c,1o.XC=1n(e){if(e.2X.id){1j(1a t=1c,i=0,a=1o.HY.1f;i<a;i++)e.2X.id.5A(0,1o.HY[i].J.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+"-1v");1c===ZC.1d(t)?(l=n[0]-C.2c().1K,r=n[1]-C.2c().1v):(l=A.I/2,r=A.F/2);1a Z={};e&&(Z=1o.hI(e,A));1a c=ZC.AO.C8("f9",A,Z,!0);if(!c&&1y c!==ZC.1b[31]&&(!e&&!i["6m-7p"]||e&&e.2X.id!==A.J+"-2C-1N"))1l e.6R(),!1;1a p=ZC.aE(A.J);A.p7(a?a.L:-1,e);1a u=-1;if(0!==1o.qT)u=1o.qT;1u 1j(1a h=ZC.AK(A.J);-1===u&&1c!==h.6o;)"3g"!==(u=ZC.1k(ZC.A3(h).2O("a2")))&&""!==u&&1c!==ZC.1d(u)||(u=-1),h=h.6o;u&&-1!==u&&1c!==ZC.1d(u)||(u=1);1a 1b=ZC.A3("#"+A.J+"-2C");if(1b.2O("a2",1o.qB+u+1),1c===ZC.1d(t)){if(e.2X.id===A.J+"-6I-9K"||e.2X.id===A.J+"-6I-dX")1l!0;e.6R()}if(!ZC.AK(A.J+"-2C"))1l!1;l=C.2c().1K,r=C.2c().1v;1a d=C.1s(),f=C.1M();1c===ZC.1d(t)?(o=(n=ZC.P.MH(e))[0]||ZC.DS[0],s=n[1]||ZC.DS[1]):(o=l+A.I/2,s=r+5);1a g=!1;if(A.UF("c6",!1),A.NY>0&&(A.UF("c6",!0),g=!0),A.UF("c5",!1),A.NY<A.QS.1f-1&&(A.UF("c5",!0),g=!0),A.UF("4Z",g,!0),o>=l&&o<=l+d*p[0]&&s>=r&&s<=r+f*p[1]){ZC.A3(".zc-2C").5d(1n(){1g.id!==A.J+"-2C"&&A.9h()}),A.SY=[o,s,1c===ZC.1d(t)?e.2X.id:t],1b.2O("3o",0).4n();1a B,v,b=ZC.1k(1b.2O(ZC.1b[19]))+ZC.1k(1b.2O("d8"))+ZC.1k(1b.2O("di")),m=ZC.1k(1b.2O(ZC.1b[20]))+ZC.1k(1b.2O("ca"))+ZC.1k(1b.2O("d6")),E=1,D=!1;if(A.o.5i&&A.o.5i["6i-2C"]&&A.o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;1p;1i"2a-2A":v=v+(A.F*p[1]-m)-10,B=B+(A.I*p[0]-b)/2-5;1p;1i"1K":v=v+(A.F*p[1]-m)/2-5,B=B-(A.I*p[0]-b)/2+5;1p;1i"2A":v=v+(A.F*p[1]-m)/2-5,B=B+(A.I*p[1]-b)/2-5}1u 1c!==ZC.1d(i.x)&&1c!==ZC.1d(i.y)&&(B=l+ZC.1k(i.x),v=r+ZC.1k(i.y));if(1b.2O("1K",ZC.BM(1,B)+"px").2O("1v",ZC.BM(1,v)+"px").4n(),ZC.6N){1a Y=ZC.A3("#"+A.J+"-2C 3B").1s()[0]||120;1b.2O(ZC.1b[19],Y+"px")}}1l A.dZ=!0,!1}}}},ZC.A3(2g).3r("f9",1o.ZH)),1o.tE=1n(e,t){if(1o.2O)1l 1o.2O.yk?1o.2O.yk(e,t):1o.2O.13T(e+"{"+t+"}",0)},1o.wh=1n(e,t,i){"3g"===t&&(t="100%"),"3g"===i&&(i="100%");1a a=[0,0];1l-1===(""+t).1L("%")&&-1===(""+i).1L("%")||(a=e.wh()),[-1!==(""+t).1L("%")?a[0]*5v(t,10)/100:5v(t,10),-1!==(""+i).1L("%")?a[1]*5v(i,10)/100:5v(i,10)]},1o.IW={},1o.3r=1n(e,t,i){e=e||"1o-lk",1o.IW[e]||(1o.IW[e]={}),1o.IW[e][t]?1o.IW[e][t].1h({fn:i}):1o.IW[e][t]=[{fn:i}]},1o.3k=1n(e,t,i){if(e=e||"1o-lk",1o.IW[e]&&1o.IW[e][t])if(i){1j(1a a=0,n=1o.IW[e][t].1f;a<n;a++)if(1o.IW[e][t][a].fn===i){1o.IW[e][t].6r(a,1);1p}}1u 1o.IW[e][t]=1c},1o.h5=1n(e,t,i,a){if(e=e||"1o-lk",1o.IW[e]&&1o.IW[e][t]){1j(1a n=0,l=1o.IW[e][t].1f;n<l;n++)a?i[i.1f-1]=1o.IW[e][t][n].fn.9A(1o,i):1o.IW[e][t][n].fn.9A(1o,i);if(a)1l i[i.1f-1]}},1o.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-2z-4O":"4V:2q;-7n-bN-9P:2b;-7n-en-6G:2b;-7n-jG-6b-1r:aG;",".zc-6t":"2K:4D;9L:8R;1G:88 2V #2S;1U:#13m 3R("+(ZC.6N?"//":ZC.yq)+") no-6B 3F az",".zc-6t-1":"3v:13k 88 88 88;1E-3u:3F !7r;",".zc-6t-1 a":"1r:#yt;2t-2e:r3;1w-1M:125%;",".zc-6t-2":"3v:88;1r:#2S;1E-3u:3F !7r;",".zc-6t-3":"3v:88;1E-3u:3F;1w-1M:125%;",".zc-6t-3 3B":"1U-1r:#yt;1w-1M:125%;1r:#2S;1G:7Y 2V #2S;3v:88 az;2t-79:6x;1s:13h;2y:0 3g;4V:8q;1E-3u:3F",".zc-6t-4":"1r:#2S;1w-1M:125%;",".zc-6t-4 3B":"9c:2A;1r:#2S;1w-1M:125%;",".zc-4K":"1G:88 2V #2S;1U:#4S",".zc-4L":"1G:88 2V #2S;1U:#x5",".zc-4r":"1G:88 2V #2S;1U:#4S",".zc-4I-5B-1H":"3v:dM az 5o;1E-3u:1K;1r:#2S",".zc-4I-5B-ao":"3v:5o ri",".zc-4I-5B-7Z":"3v:ri ri 5o !7r",".zc-4I-5B-ao bP":"1E-3u:1K;1U:#2S;1r:#4u;1G:7Y 2V #8M;",".zc-4I-5B-1H an":"1r:#4u;3v:5o;2y:0 88 0 0;1U-1r:#4S;",".zc-4I-5B-ao an":"1r:#4u;3v:5o;2y:0;1U-1r:#2S",".zc-4I-5B-7Z an":"3v:dM az !7r;2y:0 13d 0 0 !7r;1U-1r:#8X !7r;1G:5o 12Z #8c !7r",".zc-4I-s0":"2t-2e:13b !7r;13a-139:-7Y;1w-1M:125%",".zc-4I-s1":"2t-2e:r3 !7r;1w-1M:125%",".zc-4I-s1 a":"1r:#2S;3v:138 az;2K:k2;1v:dM;1G:7Y 2V #8M;1G-2a:gU 2V #8M",".zc-cS-6C":"1U-1r:#2S;1r:#8M !7r",".zc-cS-ez":"1U-1r:#4S;1r:#74 !7r",".zc-4r 1H":"3L:137-8y;2K:k2;1v:-5o",".zc-cj 3B":"2K:4D;1E-3u:3F;3v:88;1U:#4S;1r:#2S",".zc-eJ-6N":"3v:0;2K:4D;2t-2e:y4;2t-79:6x;2t-9B:"+1o.9T+";1r:#j3;1E-3u:1K",".zc-eJ":"3v:0;2K:4D;","#zc-5X":"3L:8y;2K:4D;1v:0;1K:0;1s:100%;1M:100%;2y:0;3v:0;1U:#2S;",".zc-2C":"2K:4D;3L:2b;1U-6B:no-6B !7r;1U-2K:50% 0% !7r;",".zc-2C-eu":"2t-2e:7Y;3v:0;1w-1M:7Y;1G-2a:7Y 2V #4u",".zc-2C-1Q":"4V:8q;xL-8I:mC",".zc-9b":"1U:#8X",".zc-9b 3B.zc-9b-w1":"2K:4D;1G:5o 2V #8c;3v:az 133;1U-1r:#8M;1r:#2S",".zc-f1":"1U-1r:#2S;1r:#4u;1G:5o 2V #4S",".zc-2i-1H-6q":"1G-gz:gz",".zc-2i-1H-6q td":"3v:dM az 5o 5o",".zc-1V-6q":"1G-gz:gz",".zc-1V-6q tJ":"2t-9B:"+1o.9T+";1E-3u:1K;2t-2e:r3;2t-79:qQ;3v:xH rB xH dM;1U-1r:#8c;1G-2a:5o 2V #cc",".zc-1V-6q th":"2t-9B:"+1o.9T+";1E-3u:1K;2t-2e:132;2t-79:qQ;3v:5o rB 5o dM;1U-1r:#74;1G-2a:7Y 2V #cc",".zc-1V-6q td":"2t-9B:"+1o.9T+";1E-3u:1K;2t-2e:uu;3v:7Y rB 7Y dM;1U-1r:#j4;1G-2a:7Y 2V #8X;xL-8I:mC",".zc-aS":"1v:0;1K:0;2K:k2",".zc-3l":"1v:0;1K:0;2K:4D"};ZC.cA||(h[".zc-1V-6q th:cR(:7Z-xM)"]="1G-2A:7Y fo #cc",h[".zc-1V-6q td:cR(:7Z-xM)"]="1G-2A:7Y 2V #8X");1a 1b=2g.dK("fb")[0],d=2g.4P("1I");if(d.1J="1E/2O",d.4m("1V-xO","1o"),1b.2Z(d),!1o.2O)1j(n=0,l=2g.fq.1f;n<l;n++)2g.fq[n].xN&&"1o"===2g.fq[n].xN.bJ("1V-xO")&&(1o.2O=2g.fq[n]);1j(1a f in 1o.2O||(1o.2O=2g.fq[2g.fq.1f-1]),h)1c!==ZC.1d(1o.tH[f])?1o.tE(f,1o.tH[f]):1o.tE(f,h[f])}if("3K"===t&&!1o.tP)2g.131.2P("7o","nC:ni-nF-bZ:3K"),2g.13q().13e=".tW { xP:3R(#2q#xG); }",1o.tP=!0;1a g="";1o.jQ&&(g=1o.jQ),e.1V&&1c!==ZC.1d(i=e.1V.bx)&&(g=i),1c!==ZC.1d(i=e.bx)&&(g=i);1a B={1V:!1,cr:!1,2O:!1,6L:!1};if(1c!==ZC.1d(i=e.4f))1j(1a v in B)1c!==ZC.1d(a=i[v])&&(B[v]=ZC.2s(a));1a b=!1;1c!==ZC.1d(i=e.5X)&&(b=ZC.2s(i));1a m=!0;1c!==ZC.1d(i=e["3g-bT"])&&(m=ZC.2s(i));1a E=ZC.A3("#"+Z);r=(e[ZC.1b[19]]||"100%")+"",o=(e[ZC.1b[20]]||""+1o.ga.1M)+"","3g"===r&&(r="100%"),"3g"===o&&(o="100%");1a D=1o.wh(E,r,o);s=D[0],A=D[1],b&&(s=ZC.A3(2w).1s(),A=ZC.A3(2w).1M(),2g.3s.1I.9L="8R"),s<10&&(s=1o.ga.1s),A<10&&(A=1o.ga.1M),s=0===s?1o.ga.1s:s,A=0===A?1o.ga.1M:A;1a J=e.i5||"",F=e.vR||"",I=1c,Y="",x=1c;1c!==ZC.1d(i=e.1V)&&("3e"==1y i?Y=i:x=1o.3J.xS?3h.1q(3h.5g(i)):i),1c!==ZC.1d(i=e.cr)&&("3e"==1y i&&(i=3h.1q(i)),I=i),1c!==ZC.1d(i=e.xn)&&(u.dR=ZC.2s(i)),u.dR&&(u.FZ=1c),u.JI=r+"/"+o,u.AB=t,u.A=u,u.iX=0,u.iY=0,u.I=s,u.F=A,u.FW=r,u.MW=o,u.Q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6K-8E":".","m1-8E":"","2C-na":"13P nB xW","2C-nb":"13O nB xW","2C-f5":"xw","2C-6I":"uc 13N","2C-pQ":"gK As 13M","2C-pM":"gK As 13L","2C-u3":"kW 13I","2C-u5":"kW 13H","2C-tY":"kW 8n","2C-u6":"kW 13t","2C-sX":"gK dG y0","2C-t0":"yZ dG y0","2C-k8":"13C dG","2C-eG":"yv In","2C-f3":"yv 13z","2C-gd":"gK 13y","2C-4K":"gK 13x","2C-4r":"ng yD","2C-nI":"yX To 2D","2C-n9":"yX To 3D","2C-i0":"tO o1","2C-mx":"yZ o1","2C-nH":"tO 13w z1","2C-nn":"tO 13v z1","2C-5X":"z2 z3","2C-iA":"12Y z2 z3","2C-c6":"Go os","2C-c5":"Go Yf","5s-rO":{rN:"%d %M %Y<br>%g:%i:%s %A<br>%q ms",mA:"%d %M %Y<br>%g:%i:%s %A",hT:"%d %M %Y<br>%g:%i %A",mz:"%d %M %Y<br>%g %A",da:"%d %M %Y",ex:"%M %Y",mw:"%Y"},"jV-5G":["113","Xb","Xa","WF","cl","WA","Wz"],"jV-fR":["Wy","Wx","Ww","Wv","Wu","Wr","Wg"],"k9-5G":["ci","Wq","Wp","Wo","yV","Wn","Wm","Wk","Wi","Xc","Ws","Xt"],"k9-fR":["Yb","XX","Xz","Xy","yV","Xx","Xw","Xu","Xs","Xg","Xr","Xq"],"tm-b3":"nV...","8m-b3":"Xp...","7L-b3-fR":"nV. o0...","7L-b3-5G":"nV...","7L-b3-lX":"...","4L-5K":"An yB Xo Xn","4L-b8":"yB Xj:","4L-7m":"hl","4r-5K":"ng yD Xh","4r-wg":"yE 3h dG","4r-ux":"yE Wd Wc","4r-w9":"nf Vc:","4r-wc":"3h dG:","4r-wi":"nf yN Vb","4r-wk":"if yP Va to Ux Uw r4 13r Ut to Us Ur","4r-xf":"yN Up is Uo...","4r-fP":"ng","4r-iT":"Um","4r-wD":"nf Uk Uj Vd Vf.\\n\\Vt yP!","6t-7m":"hl","4K-fU":"wv 3h","4K-fV":"ww 3h","4K-7m":"hl","4K-9A":"Wa","cj-7m":"hl","1Y-vx":"nB %3f% of %9R%"},ZC.HE=1o.fT.s2,1o.6Z=1n(e){1j(1a t=0;t<1o.HY.1f;t++)if(1o.HY[t].J===e)1l 1o.HY[t];1l 1c},1o.pE=1n(e,t){1l e.OH(t)},1o.W9=1n(e){e.A6&&e.A6.fX();1j(1a t=0;t<e.AI.1f;t++)e.AI[t].L6()},1o.VU=1n(e,t,i){1l e.or(t,i)},1o.VB=1n(e){e&&e.qr(!0)},1o.yR=1n(e){ZC.WU.1h(e)},1o.yS=1n(e){1l e.jx.2n(",")},1o.Vz=1n(e,t,i){1P(1o.yR(e),t){1i"b9":1o.3r(1c,"fJ",1n(t,a){1j(1a n=a[ZC.1b[16]].1f,l=0;l<n;l++)if(a[ZC.1b[16]][l].1J===e){1a r=a[ZC.1b[16]][l];r.id?r.id=r.id:r.id=e.1F(/-/g,"")+l,a[ZC.1b[16]][l]=i(r)}1l a});1p;1i"Vx":1o.3r(1c,"fJ",1n(t,a){1a n=1o.6Z(t.id);if(-1!==1o.yS(n).1L(e))1j(1a l=a[ZC.1b[16]].1f,r=1c,o=0;o<l;o++)(r=a[ZC.1b[16]][o]).8d(e)&&(a[ZC.1b[16]][o]=i(r,t.id));1l a})}},1o.Vw=1n(e,t,i){1l i=i||"2U",e.B8.ol(t,i)},1o.Vv=1n(e,t,i){1a a,n;1P(i=i||"1H"){1i"2T":1j(a=0,n=e.FC.1f;a<n;a++)if(e.FC[a].H1===t||a===t)1l e.FC[a].BD;1p;1i"1H":1j(a=0,n=e.BV.1f;a<n;a++)if(e.BV[a].H1===t||a===t)1l e.BV[a]}1l 1c},1o.a7=1n(e,t){1P(t){1i"1I":1l 1m CX(e);1i"2T":1l 1m DT(e);1i"3C":1l 1m I1(e);1i"Vu":1l 1m DM(e)}1l 1c},1o.fM=1n(e){ZC.6y(e)},1o.1S=1n(e,t){ZC.2E(e,t)},1o.Vr=1n(e,t,i,a){1l Z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a=C);1l a},1o.ji("uI",1n(e,t){1a i=1o.6Z(e);i.DC["6i-2C"]=i.DC["6i-2C"]||{},i.DC["6i-2C"]["5D-2B"]=i.DC["6i-2C"]["5D-2B"]||[];1j(1a a=t.id||"",n=i.DC["6i-2C"]["5D-2B"],l=!1,r=0;r<n.1f;r++)if(n[r].id===a){l=!0;1p}l||i.DC["6i-2C"]["5D-2B"].1h(t)}),1o.pd=1n(e,t,i){1a a;2g.cP("zc-5X")&&(e="zc-5X"),"3e"==1y(i=i||{})&&(i=3h.1q(i));1a n,l,r,o,s,A,C,Z,c,p,u,h,1b,d,f,g,B,v,b,m,E=1o.6Z(e),D=!(1c!==ZC.1d(i.3S)&&!ZC.2s(i.3S)),J=1c!==ZC.1d(i.4Z)&&ZC.2s(i.4Z),F=1y i.fg!==ZC.1b[31]&&ZC.2s(i.fg);if(E){1P(-1===ZC.AU(["Ec","Fc","oF","Fj","Fb","Ev","Dh","aI"],t)&&((l=E.FO()).aQ=i,ZC.AO.C8(t,E,l)),t){1i"10d":if(!(n=E.C5(i[ZC.1b[3]])))1l 1c;n.I8&&n.I8.NR&&(n.I8.NR(),n.I8.3k()),n.I9&&n.I9.NR&&(n.I9.NR(),n.I9.3k());1p;1i"10A":1l(n=E.C5(i[ZC.1b[3]]))&&(r=n.I0(i.3W,i.4X))?r.j6(i[ZC.1b[9]]||1):1c;1i"10o":1l(n=E.C5(i[ZC.1b[3]]))&&(o=n.BK(i.8C||""))?1c!==ZC.1d(i[ZC.1b[9]])?o.B2?o.B2(i[ZC.1b[9]]):1c:1c!==ZC.1d(i.lP)&&o.KW?o.KW(i.lP):1c:1c;1i"m6":if(!(n=E.C5(i[ZC.1b[3]])))1l 1c;1a I={id:"J",x:"iX",y:"iY",1s:"I",1M:"F",1r:"C1",ir:"B9",cv:"AX",eU:"BU",eS:"AP",eP:"A0",f4:"AD"};1P(i.4h){1i"2Y":1j(p in l={},I)l[p]=n[I[p]];1l ZC.2E({1J:n.AF},l),l;1i"2u":1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(c),s=ZC.V5(c),"qj"===o?C.A0=C.AD=ZC.AO.G7(r[c]):"Zq"===o?C.F1=C.FQ=C.F9=C.EY=r[c]:"3v"===c?C.FM=C.FN=C.FY=C.EN=r[c]:A[o]?C[A[o]]=r[c]:C[o]=r[c],Z[s]=r[c];t.o||ZC.2E(r,C),ZC.2E(C,t),t.o&&(ZC.2E(Z,t.o),t.KK())}}1q(){1a e,t,i,a,n=1g;"gh"!==1o.oA&&ZC.6y(n.o);1a l="";if(1y n.H!==ZC.1b[31]&&(l=n.H.AB),ZC.gS(n.o,"gV"),""!==l&&ZC.gS(n.o,l),1o.3J.rZ&&n.o["ov-ak"]&&1y n.H!==ZC.1b[31])1j(t=0;t<n.o["ov-ak"].1f;t++)i=n.o["ov-ak"][t],a=!0,1c!==ZC.1d(i["2j-1s"])&&ZC.1k(i["2j-1s"])>n.H.I&&(a=!1),1c!==ZC.1d(i["1X-1s"])&&ZC.1k(i["1X-1s"])<n.H.I&&(a=!1),1c!==ZC.1d(i["2j-1M"])&&ZC.1k(i["2j-1M"])>n.H.F&&(a=!1),1c!==ZC.1d(i["1X-1M"])&&ZC.1k(i["1X-1M"])<n.H.F&&(a=!1),a&&ZC.2E(i,n.o);1j(n.o.ak&&(n.DY=n.o.ak),t=0;t<n.DY.1f;t++)if("*"===n.DY[t].cz&&n.DY[t].js){n.o["js-cz"]=n.DY[t].js,n.DY.6r(t,1);1p}if((e=n.o["js-cz"])&&("7u:"===e.2v(0,11)||e.1L("(")<e.1L(")")))4J{n.OL="";1a r=e.1F("7u:",""),o=e.1L("("),s=e.1L(")");-1!==o&&-1!==s&&(n.OL=r.5A(o+1,s-o-1),r=r.5A(0,o)),n.IE=ZC.iS(r,2w)}4M(C){}if(1y n.H!==ZC.1b[31]&&1c!==n.H.QN)1j(1a A in n.H.QN)n.H.QN.8d(A)&&1c===ZC.1d(n.o[A])&&(n.o[A]=n.H.QN[A])}7W(){1l{}}dE(e,t,i){1j(1a a=t.2n(","),n=i.2n(","),l=0,r=n.1f;l<r;l++)e[a[l]]=n[l]}Zy(){1l 1g.o}102(e){1g.o=e}py(){1l 1g.E}bJ(e){1l 1g.E[e]}4m(e,t){1g.E[e]=t}sV(e){1a t=1g.7W();1l t[e]?1g[t[e]]:1c}mZ(e,t){1a i=1g.7W();i[e]&&(1g[i[e]]=t)}1C(e,t,i){1c===t&&(t=!0);1a a=1g;e&&(a.I3||(a.I3={},ZC.2E(a.o,a.I3,!0,i)),a.JU||(a.JU={}),ZC.2E(e,a.JU,!0,i),ZC.2E(e,a.o,!0,i)),1y a.lS!==ZC.1b[31]&&a.lS()&&e&&ZC.2E(e,a.o)}lS(){}4y(e){1j(1a t=0,i=e.1f;t<i;t++)1g.o.8d(e[t][0])&&1g.YS(e[t][0],e[t][1],e[t][2],e[t][3],e[t][4])}YS(e,t,i,a,n){1a l,r=1g;if(1c!==(l=r.o[e])&&1y l!==ZC.1b[31]){if(i)1P(-1!==i.1L("p")&&(l=ZC.8G(l),i=i.1F("p","")),-1!==i.1L("a")&&(l=ZC.2l(l),i=i.1F("a","")),i){1i"i":l=ZC.1k(l);1p;1i"f":l=ZC.1W(l);1p;1i"b":l=ZC.2s(l);1p;1i"c":l=ZC.AO.ZL(l,r),(l=ZC.AO.G7(l,r))3E 3M&&("1r"===e||"2t-1r"===e?(r.o["1E-2o"]=l[1],r.WY=l[1],r.E["1E-2o"]=l[1]):e===ZC.1b[61]?(r.o["1G-2o"]=l[1],r.O2=l[1],r.E["b-2o"]=l[1]):("1w-1r"===e&&(r.E["l-2o"]=l[1]),1c===ZC.1d(r.o.2o)&&(r.C4=l[1])),l=l[0])}1c!==ZC.1d(a)&&1c!==ZC.1d(n)&&(l=ZC.5u(l,a,n)),r[t]=l}}DA(){1j(1a e=1g,t=!1,i=0,a=e.DY.1f;i<a;i++){1a n=!1;4J{n=1m bA("1l ("+e.IT(e.DY[i].cz)+")")()}4M(l){n=!1}n&&(t=!0,e.1C(e.DY[i]))}1l t}yH(e){1j(1a t="",i=0,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i]]=e[t[i]])}lS(){1a e,t,i=1g,a=!1;if((i.o["1O"]||i.o.2p||i.o.id)&&1c!==i.H&&1c!==i.H.N){if(e=i.o["1O"]||i.o.2p)1j(1a n=e.2n(/(\\s+)/),l=0,r=n.1f;l<r;l++)(t=i.H.N["."+n[l]])&&(a=!0,ZC.2E(t,i.o));(e=i.o.id)&&(t=i.H.N["#"+e])&&(a=!0,ZC.2E(t,i.o))}1l 1c!==i.OE&&(t=i.H.N[i.OE])&&(a=!0,ZC.2E(t,i.o)),a}KK(e){1a t,i=1g;1P(1c===ZC.1d(e)&&(e=i.AX),i.G8){1i"fo":i.EU=ZC.BM(1,.75*e),i.G4=1.75*e;1p;1i"gh":i.EU=4*e,i.G4=3*e;1p;1i"go":i.EU=4*e,i.G4=2*e;1p;2q:i.EU=0,i.G4=0}1c!==(t=ZC.1d(i.o["1w-fI-2e"]))&&(i.EU=5v(t,10)),1c!==(t=ZC.1d(i.o["1w-h8-2e"]))&&(i.G4=5v(t,10))}1q(){1a e,t,i,a,n,l,r,o,s;1D.1q();1a A=1g;if(1c!==(e=ZC.1d(A.o.78))&&!A.sP){1a C,Z,c,p=-1,u=-1;1j(1y A.E.7b!==ZC.1b[31]&&(p=ZC.1k(A.E.7b)),1y A.E.7s!==ZC.1b[31]&&(u=ZC.1k(A.E.7s)),r=0,o=e.1f;r<o;r++){if(C=-1,Z=-1,e[r].7q){if(1c!==(t=ZC.1d(e[r].7q["2r-3b"]))){if(Z=0,c=[],"4h"==1y t)c=t;1u if("3e"==1y t){if(-1!==t.1L(","))c=t.2n(",");1u if(-1!==t.1L("-"))1j(i=t.2n("-"),a=ZC.1k(i[0]);a<=ZC.1k(i[1]);a++)c.1h(a)}1u c=[t];-1!==ZC.AU(c,u)&&(Z=1)}if(1c!==(t=e[r].7q["1A-3b"])&&1y t!==ZC.1b[31]){if(C=0,c=[],"4h"==1y t)c=t;1u if("3e"==1y t){if(-1!==t.1L(","))c=t.2n(",");1u if(-1!==t.1L("-"))1j(i=t.2n("-"),a=ZC.1k(i[0]);a<ZC.1k(i[1]);a++)c.1h(a)}1u c=[t];-1!==ZC.AU(c,p)&&(C=1)}}0!==C&&0!==Z&&A.1C(e[r])}}if(1c!==(e=A.RK)&&A.1C(e),e=A.o[ZC.1b[0]]){if(e=ZC.AO.ZL(e,1g),"9N("===6d(e).2v(0,4))1j(n=1m 5y("9N\\\\((\\\\d{1,3}),\\\\s*(\\\\d{1,3}),\\\\s*(\\\\d{1,3})\\\\)");l=n.3n(e);)e=e.1F(l[0],ZC.AO.G7(l[0]));if("9J("===6d(e).2v(0,5))1j(n=1m 5y("9J\\\\((\\\\d{1,3}),\\\\s*(\\\\d{1,3}),\\\\s*(\\\\d{1,3})\\\\,\\\\s*([0-9.]+)\\\\)");l=n.3n(e);){1a h=ZC.AO.G7(l[0],A);e=e.1F(l[0],h[0]),A.o.2o=h[1],A.C4=h[1],A.E["bg-2o"]=h[1],1c===ZC.1d(A.E["b-2o"])&&(A.E["b-2o"]=1),1c===ZC.1d(A.E["l-2o"])&&(A.E["l-2o"]=1)}1a 1b=ZC.GP(6d(e)).2n(/\\s+|;|,/);A.A0=ZC.AO.G7(1b[0]),A.AD=1===1b.1f?A.A0:ZC.AO.G7(1b[1])}if(!(1c===ZC.1d(A.o[ZC.1b[62]])&&1c===ZC.1d(A.o[ZC.1b[61]])&&1c===ZC.1d(A.o["1w-1I"])||1c===ZC.1d(A.o["1G-1v"])&&1c===ZC.1d(A.o["1G-2A"])&&1c===ZC.1d(A.o["1G-2a"])&&1c===ZC.1d(A.o["1G-1K"])&&1c===ZC.1d(A.o.1G))){1a d=["1v","2A","2a","1K"],f={1v:[0,"2V","#4u"],2A:[0,"2V","#4u"],2a:[0,"2V","#4u"],1K:[0,"2V","#4u"]};if(A.I3=A.I3||{},e=A.I3.1G)1j(s=e.2n(/\\s/),r=0;r<4;r++)f[d[r]]=[ZC.1k(s[0]||"0"),ZC.GP(s[1]||"2V"),ZC.AO.G7(s[2]||"#cs")];if(1c!==ZC.1d(A.I3[ZC.1b[62]]))1j(r=0;r<4;r++)f[d[r]][0]=A.I3[ZC.1b[62]];if(1c!==ZC.1d(A.I3["1w-1I"]))1j(r=0;r<4;r++)f[d[r]][1]=A.I3["1w-1I"];if(1c!==ZC.1d(A.I3[ZC.1b[61]]))1j(r=0;r<4;r++)f[d[r]][2]=A.I3[ZC.1b[61]];1j(r=0;r<4;r++)(e=A.I3["1G-"+d[r]])&&(s=e.2n(/\\s/),f[d[r]]=[ZC.1k(s[0]||"0"),ZC.GP(s[1]||"2V"),ZC.AO.G7(s[2]||"#cs")]);if(A.JU=A.JU||{},e=A.JU.1G)1j(s=e.2n(/\\s/),r=0;r<4;r++)f[d[r]]=[ZC.1k(s[0]||"0"),ZC.GP(s[1]||"2V"),ZC.AO.G7(s[2]||"#cs")];if(1c!==ZC.1d(A.JU[ZC.1b[62]]))1j(r=0;r<4;r++)f[d[r]][0]=A.JU[ZC.1b[62]];if(1c!==ZC.1d(A.JU["1w-1I"]))1j(r=0;r<4;r++)f[d[r]][1]=A.JU["1w-1I"];if(1c!==ZC.1d(A.JU[ZC.1b[61]]))1j(r=0;r<4;r++)f[d[r]][2]=A.JU[ZC.1b[61]];1j(r=0;r<4;r++)(e=A.JU["1G-"+d[r]])&&(s=e.2n(/\\s/),f[d[r]]=[ZC.1k(s[0]||"0"),ZC.GP(s[1]||"2V"),ZC.AO.G7(s[2]||"#cs")]);1j(r=0;r<4;r++)1c===ZC.1d(A.o["1G-"+d[r]])&&(A.o["1G-"+d[r]]=f[d[r]].2M(" "))}A.4y([["2h","AM","b"],["1U-1r-1","A0","c"],["1U-1r-2","AD","c"],["5e-gR","GM"],["5e-tv","HL"],["1U-3t","W0","b"],["1U-4d","D6"],["1U-6B","M9"],["1U-2K","TI"],["1U-iB","WV"],["1U-1z","KV","f"],["3i-1J","NI"],["3i-2f","N7","i"],["3i-2c-x","W7","f"],["3i-2c-y","W6","f"],[ZC.1b[4],"AX","i"],["1w-1r","B9","c"],["1w-1I","G8",""],["1O","DG"],["2p","DG"],["1G","BF"]]),"2b"===A.NI&&(A.AD=A.A0,A.NI="9k"),""!==A.BF&&(s=A.BF.2n(/\\s/),A.AP=ZC.1k(s[0]||"0"),A.G8=ZC.GP(s[1]||"2V"),A.BU=ZC.AO.G7(s[2]||"#cs")),A.GM=ZC.AO.ZL(A.GM,1g),A.KK(),A.4y([["1w-fI-2e","EU","i"],["1w-h8-2e","G4","i"],[ZC.1b[62],"AP","i"],[ZC.1b[61],"BU","c"],["2o","C4","f",0,1],["3I","MC","b"],["3I-2f","OI","i",0,2m],["3I-6T","JR","i"],["3I-2o","T8","f",0,1],["3I-1r","S1","c"],["3I-x3","PB","i"]]),A.O2=A.C4,A.4y([["1G-2o","O2","f",0,1]])}}ZC.CN={iM:1n(e,t,i){1a a,n,l;if(e&&i&&0!==i.1f){if(!t.E["8F-dC-2R"])1j(a=0,n=i.1f;a<n;a++)i[a]&&(i[a][0]=5P(4T(i[a][0]).4A(2)),i[a][1]=5P(4T(i[a][1]).4A(2)));1a r=!1,o=i.1f;1j(a=0;a<o;a++)1c!==ZC.1d(i[a])&&(l=[i[a][0],i[a][1]],1c!==ZC.1d(i[a][2])&&l.1h(i[a][2],i[a][3]),1c!==ZC.1d(i[a][4])&&l.1h(i[a][4],i[a][5]),t.ON&&(l[0]=1B.43(l[0]),l[1]=1B.43(l[1]),4===l.1f&&(l[2]=1B.43(l[2]),l[3]=1B.43(l[3]))),t.CV&&t.AX%2==1&&(l[0]-=.5,l[1]-=.5,4===l.1f&&(l[2]-=.5,l[3]-=.5))),0===a?e.eo(l[0],l[1]):i[a]?(r&&(e.eo(l[0],l[1]),r=!1),2===l.1f?e.gN(l[0],l[1]):4===l.1f?e.wM(l[0],l[1],l[2],l[3]):6===l.1f&&e.6u(l[0],l[1],l[2],ZC.TG(l[3]),ZC.TG(l[4]),l[5])):r=!0}},2I:1n(e,t){1a i=t.H.AB;if(1!==t.C4&&t.L9&&(1c===ZC.1d(t.o[ZC.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<=6&&a&&(v[0]=ZC.CQ(v[0],s[0]),v[1]=ZC.CQ(v[1],s[1]),v[2]=ZC.BM(v[2],s[0]),v[3]=ZC.BM(v[3],s[1])),0===Z)2===s.1f?e.eo(s[0],s[1]):6===s.1f&&e.6u(s[0],s[1],s[2],ZC.TG(s[3]),ZC.TG(s[4]),s[5]);1u if(f&&(e.eo(s[0],s[1]),f=!1),g||0===h||0===1b||4===s.1f||6===s.1f||7===s.1f)2===s.1f?e.gN(s[0],s[1]):4===s.1f?e.wM(s[0],s[1],s[2],s[3]):6===s.1f?e.6u(s[0],s[1],s[2],ZC.TG(s[3]),ZC.TG(s[4]),s[5]):7===s.1f&&e.10C(s[0],s[1],s[2],s[3],s[4],s[5]);1u if(1c!==i[Z-1]){1a b=ZC.P.mM(i[Z-1],c,t,a),m=b[4===b.1f?2:0],E=b[4===b.1f?3:1],D=s[0],J=s[1],F=h+1b,I=D-m,Y=J-E,x=1B.5C(I*I+Y*Y)+B;if(x>h){1a X;B=0,X="go"===t.G8?1B.4b(ZC.2l(x/((F+t.AX+1b)/2))):1B.4b(ZC.2l(x/F));1a y=1B.sr(Y,I),L=1B.dz(y),w=1B.eb(y),M=m,H=E,P=h;1j(A=0;A<X;A++)"go"===t.G8&&(F=A%2?t.AX+1b:h+1b,P=A%2?t.AX:h),I=L*F,Y=w*F,e.eo(M,H),e.gN(M+L*P,H+w*P),M+=I,H+=Y;e.eo(M,H),(x=1B.5C((D-M)*(D-M)+(J-H)*(J-H)))>h?e.gN(M+L*h,H+w*h):x>0&&e.gN(M+L*x,H+w*x),e.eo(D,J)}1u B=x}}1u f=!0;t.H&&d<=6&&a&&(t.H.E[t.J+"-cK"]=v)}1P(c){1i"3a":e.qx=t.h3,e.4a();1p;1i"2F":1i"3K":if(1c===ZC.1d(t.o["1v-3X"])&&t.H.O9&&(!a||t.E.sY)){if(C=t.E.sY?t.A0+"-"+t.AD+"-"+t.D6+"-"+t.AX+"-"+t.G8+"-"+t.C4+"-"+t.BJ+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]&&(0===t.BJ&&0===t.BB||(f+="7f("+t.BJ+" "+t.BB+")")),1y t.AA!==ZC.1b[31]&&0!==t.AA){1a g=t.AA;1y t.E.cx!==ZC.1b[31]&&(g+=","+(ZC.4o(t.E.cx)-.5)),1y t.E.cy!==ZC.1b[31]&&(g+=","+(ZC.4o(t.E.cy)-.5)),f+=" gj("+g+")"}if(a&&-1!==t.E.3i?(c.3i=t.E.3i,c["3i-3o"]=t.C4):c.3i="2b",c["4a-10G"]=t.T7,c["4a-10H"]=t.gf,t.AX>0&&(c.4a=t.B9,c["4a-1s"]=t.AX,c["4a-3o"]=a?t.O2:t.C4,"2V"===t.G8||0===t.EU&&0===t.G4||("go"===t.G8?c["4a-t9"]=[t.EU,t.G4,t.AX,t.G4].2M(" "):c["4a-t9"]=t.EU+","+t.G4)),l.id=1b,""!==f&&(c.5H=f),t.o["8F-1w"]&&t.AX>0?(l.4m("4a",c.4a),l.4m("4a-1s",c["4a-1s"]),l.4m("4a-3o",c["4a-3o"]),l.4m("d",i)):ZC.P.G3(l,c),ZC.CN.jo(e,t,l),(!t.E.1G||"4t"===t.E.1G)&&1y t.E.5c!==ZC.1b[31])if("3e"==1y t.E.5c)ZC.AK(1b+"-5c")||(d=n?ZC.P.F2("5n",ZC.1b[36]):ZC.P.F2("2R",ZC.1b[36]),ZC.P.G3(d,{id:1b+"-5c",5H:f,3i:t.E.5c,"3i-3o":t.C4}),n?ZC.P.G3(d,{x:r,y:o,1s:ZC.BM(0,s),1M:ZC.BM(0,A),rx:C,ry:Z}):ZC.P.G3(d,{d:i}),ZC.CN.jo(e,t,d));1u if(!ZC.AK(1b+"-5c")){1a B=t.E.5c,v=ZC.P.F2("4d",ZC.1b[36]);v.aa?"zc."===t.D6.2v(0,3)?v.aa(ZC.1b[37],"7B",ZC.c0[t.D6]):v.aa(ZC.1b[37],"7B",t.D6):"zc."===t.D6.2v(0,3)?v.4m("5a",ZC.c0[t.D6]):v.4m("5a",t.D6),1c!==ZC.1d(t.E["3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FA=1c,t.IO="3g",t.KA=!1,t.h3="7g-rm",t.QT=!1}7W(){1a e=1D.7W();1l 1g.dE(e,"10W,x,y,2W,cK,10Y,10Z,10B,3R,2X,mO,mS,10e,2e,vZ,2f,2T,7J,4V","H1,iX,iY,C,CW,B0,BH,CJ,E1,FA,BJ,BB,DP,AH,KZ,AA,DN,KA,IO"),e}5S(){}1S(e){1D.1S(e);1a t,i,a=1g,n="BJ,BB,DP,AH,KZ,AA,DN,KA,IO".2n(",");1j(t=0,i=n.1f;t<i;t++)1y e[n[t]]!==ZC.1b[31]&&(a[n[t]]=e[n[t]]);if(e.C&&e.C.1f>0)1j(a.C=[],t=0,i=e.C.1f;t<i;t++)a.C.1h(e.C[t])}hb(e,t){1a i=1g;-1!==(""+e).1L("fh")&&(t="y"),-1!==(""+e).1L("eM")&&(t="x"),e=ZC.1W((""+e).1F("fh","").1F("eM",""));1a a=1o.4Y.4Y[i.eC];1l a&&(e=1o.4Y.10f(a.bF.x,a.bF.y,a.bF.1s,a.bF.1M,"x"===t?[e,0]:[0,e],a.bF.wf,{3c:i.eC,1Q:i.p9,3G:a.bF.3G,mO:a.bF.mO,mS:a.bF.mS},!0)),e=ZC.1k("x"===t?e[0]:e[1])}pI(e,t){1a i;-1!==(""+e).1L("8t")&&(t="y"),-1!==(""+e).1L("81")&&(t="x"),e=ZC.1W((""+e).1F("81","").1F("8t",""));1a a=1g.H||1o.HY[0];if(a){1a n=1g.A||a.AI[0];n&&("x"===t?1c!==(i=n.BT("k")[0])&&(e=ZC.1k(i.B2(e))):1c!==(i=n.BT("v")[0])&&(e=ZC.1k(i.B2(e))))}1l ZC.1k(e)}c4(e,t,i){1a a=1g;t=t||"x";1a n=""+e;if(-1!==n.1L("fh")||-1!==n.1L("eM"))1l a.hb(e,t);if(-1!==n.1L("8t")||-1!==n.1L("81"))1l a.pI(e,t);if(""+ZC.1W(e)!==n)1l-1!==(e+="").1L("%")?a.c4(5P(e.1F("%",""))/100,t,!0):-1!==e.1L("px")?a.c4(5P(e.1F("px","")),t):a.c4(5P(e),t);1a l=1y a.E["p-x"]!==ZC.1b[31]?a.E["p-x"]:a.A.iX,r=1y a.E["p-y"]!==ZC.1b[31]?a.E["p-y"]:a.A.iY,o=1y a.E["p-1s"]!==ZC.1b[31]?a.E["p-1s"]:a.A.I,s=1y a.E["p-1M"]!==ZC.1b[31]?a.E["p-1M"]:a.A.F;1l(e>=1||e<0||1o.3J.wA)&&!i?"x"===t?l+5P(e):r+5P(e):e>=0&&e<1||i?"x"===t?(o=o||1,1B.43(l+o*e)):(s=s||1,1B.43(r+s*e)):8j 0}9n(e){1a t,i=1g;if(i.TW)1l-1!==(""+i.o.x).1L("eM")?i.iX=i.hb(i.o.x,"x"):i.YS("x","iX"),-1!==(""+i.o.y).1L("fh")?i.iY=i.hb(i.o.y,"y"):i.YS("y","iY"),8j i.ZJ();1===e?(1c!==(t=ZC.1d(i.o.x))&&(i.iX=i.c4(t,"x")),1c!==(t=ZC.1d(i.o.y))&&(i.iY=i.c4(t,"y")),-1===i.iX&&(i.iX=i.A.iX),-1===i.iY&&(i.iY=i.A.iY)):2===e&&(i.ZJ(),i.I=i.CW[2]-i.CW[0],i.F=i.CW[3]-i.CW[1])}ZJ(){1a e,t=1g,i=ZC.3w,a=ZC.3w,n=-ZC.3w,l=-ZC.3w;1P(t.DN){1i"5D":i=0,a=0,n=0,l=0;1p;1i"3z":1i"6u":1i"3O":i=t.iX-t.AH,a=t.iY-t.AH,n=t.iX+t.AH,l=t.iY+t.AH;1p;2q:1j(1a r=0,o=t.C.1f;r<o;r++)1c!==(e=t.C[r])&&(i=1B.2j(i,e[0]),a=1B.2j(a,e[1]),n=1B.1X(n,e[0]),l=1B.1X(l,e[1]))}t.CW=[i,a,n,l]}EX(){1a e,t=1g;if("3O"===t.DN){1a i=1,a=[],n=t.B0+t.AA,l=t.BH+t.AA,r=t.AH+1B.4b(t.AP/2),o=t.CJ-1B.4b(t.AP/2);1j(r>50&&(i=2),r>100&&(i=4),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*ZC.EC(A.AA),i[e]=[o+a,s+n]);1a Z=["4C"];1j(e=0,t=i.1f;e<t-1;e++)1c!==i[e]&&1c!==i[e+1]&&Z.1h(ZC.AQ.Q0(ZC.AQ.ZF([i[e],i[e+1]]),4,[A.BJ,A.BB]));1l Z;1i"9t":1i"8o":1l["3z",ZC.1k(A.iX+C+A.BJ)+","+ZC.1k(A.iY+C+A.BB)+","+ZC.1k(A.AH)];1i"3z":1i"6u":1l["3z",ZC.1k(A.iX+C+A.BJ)+","+ZC.1k(A.iY+C+A.BB)+","+ZC.1k(A.AH+2)];1i"3O":1l["4C",A.EX()];2q:1a c,p=["4C"];1j(i=[],e=0,t=A.C.1f;e<t;e++)if(1c!==A.C[e])if(6===A.C[e].1f)1j(1a u=A.C[e][3];u<A.C[e][4];u+=1)i.1h(ZC.AQ.BN(A.C[e][0],A.C[e][1],A.C[e][2],u));1u if(4===A.C[e].1f&&i[e-1]){1a h={x:i[i.1f-1][0],y:i[i.1f-1][1]},1b={x:A.C[e][2],y:A.C[e][3]},d={x:A.C[e][0],y:A.C[e][1]};1j(c=0;c<=1;c+=.1)i.1h([(1-c)*(1-c)*h.x+2*c*(1-c)*d.x+c*c*1b.x,(1-c)*(1-c)*h.y+2*c*(1-c)*d.y+c*c*1b.y])}1u if(7===A.C[e].1f&&i[e-1]){1a f={x:i[i.1f-1][0],y:i[i.1f-1][1]},g={x:A.C[e][0],y:A.C[e][1]},B={x:A.C[e][2],y:A.C[e][3]},v={x:A.C[e][4],y:A.C[e][5]};1j(c=0;c<=1;c+=.1){1a b=(1-c)*(1-c)*(1-c),m=3*c*(1-c)*(1-c),E=3*c*c*(1-c),D=c*c*c;i.1h([b*f.x+m*g.x+E*B.x+D*v.x,b*f.y+m*g.y+E*B.y+D*v.y])}}1u i.1h(A.C[e]);1u i.1f>-1&&p.1h(ZC.AQ.Q0(i,1B.2j(5,A.AH/5),[A.BJ,A.BB])),i=[];if(0!==A.AA)1j(a=ZC.1k((A.CW[0]+A.CW[2])/2),n=ZC.1k((A.CW[1]+A.CW[3])/2),e=0,t=i.1f;e<t;e++)1c!==i[e]&&(l=i[e][0]-a,r=i[e][1]-n,o=l*ZC.EC(A.AA)-r*ZC.EH(A.AA),s=l*ZC.EH(A.AA)+r*ZC.EC(A.AA),i[e]=[o+a,s+n]);1l i.1f>-1&&p.1h(ZC.AQ.Q0(i,1B.2j(5,A.AH/5),[A.BJ,A.BB])),p}}1q(e){1a t,i,a,n,l,r,o;1c===ZC.1d(e)&&(e=!1),1g.o.cf||e||1D.1q();1a s=1g;if(!s.o.cf&&!e){s.4y([["3c","eC"]]),"3e"==1y s.o.1Q&&s.4y([["1Q","p9"]]),0!==s.eC&&(1c===ZC.1d(s.o["3c-1Q"])||s.o["3c-1Q"])&&(s.o["3c-1Q"]=!0,s.o["3c-aP-z-4i"]=!0);1a A=["2c-x","2c-y"];1j(i=0;i<2;i++){1a C=A[i],Z="2c-x"===C?"eM":"fh";if(1c!==(t=s.o[C])&&1y t!==ZC.1b[31]&&-1!==(t=""+t).1L(Z)){t=ZC.1W(t.1F(Z,""));1a c=1o.4Y.4Y[s.eC];c&&(t=1o.4Y.7f(C.1F("2c-"),t,s.A.I,s.A.F,c.bF.wf),s.o[C]=t)}}1j(s.4y([["3R","E1"],["2X","FA"],["4V","IO"],["id","H1"],["2f","AA","i"],["8L","KA","b"],["7J","KA","b"],[ZC.1b[1],"B0","f"],[ZC.1b[2],"BH","f"],[ZC.1b[8],"CJ","i"],[ZC.1b[21],"AH","f"],["2e-2","KZ","f"],["8F-dC-2R","QT","b"],["1J","DN"],["2W","C"],["2c-x","BJ"],["2c-y","BB"],["2c-z","rR","i"],["2c-r","DP","i"],["z-4i","lb","i"],["z-3b","JP","f"],["10v","h3"]]),s.BJ=ZC.IH(s.BJ,!0),s.BB=ZC.IH(s.BB,!0),s.BJ>-1&&s.BJ<1&&1y s.E["p-1s"]!==ZC.1b[31]&&(s.BJ*=s.E["p-1s"]),s.BB>-1&&s.BB<1&&1y s.E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1],O,L-(2m-(180-(y-X)))/2,L+(2m-(180-(y-X)))/2,0]),H||s.C.1h(ZC.AQ.BN(Y,x,M,y),[Y,x,M,y,X,1]);1p;2q:s.C.1h(ZC.AQ.BN(Y,x,w,X),[Y,x,w,X,y,0]),0===M?X%2m==y%2m||m||s.C.1h([Y,x]):s.C.1h(ZC.AQ.BN(Y,x,w,y),ZC.AQ.BN(Y,x,M,y),[Y,x,M,y,X,1])}s.C.1h([s.C[0][0],s.C[0][1]])}}s.9n(2)}1t(){1a e=1g;if("2b"!==e.DN&&("5D"===e.DN||"3z"===e.DN||"6u"===e.DN||0!==e.C.1f)){1a t,i,a={x:"iX",y:"iY",1s:"I",1M:"F",2e:"AH"};if(e.o["2a-3X"]&&!e.YN&&!e.WG&&!e.fS){1a n=1m DT(e.A);1j(t in n.1S(e),n.fS=!0,n.MC=!1,n.Z=e.Z,n.1C(e.o["2a-3X"]),n.J=e.J+"-2a",n.1q(),i=!1,a)1c===ZC.1d(n.o[t])||-1===(""+n.o[t]).1L("+")&&-1===(""+n.o[t]).1L("-")||(n.o[t]=n[a[t]]=e[a[t]]+ZC.1k(n.o[t])),i&&n.1q();n.1t()}1a l=e.H.AB;1P(e.MC&&e.C7&&e.kH(),l){1i"3a":e.WS();1p;1i"2F":e.UB();1p;1i"3K":e.UA()}if(e.o["1v-3X"]&&!e.YN&&!e.WG&&!e.fS){1a r=1m DT(e.A);1j(t in r.1S(e),r.WG=!0,r.MC=!1,r.Z=e.Z,r.1C(e.o["1v-3X"]),r.J=e.J+"-1v",r.1q(),i=!1,a)1c===ZC.1d(r.o[t])||-1===(""+r.o[t]).1L("+")&&-1===(""+r.o[t]).1L("-")||(r.o[t]=r[a[t]]=e[a[t]]+ZC.1k(r.o[t]),i=!0);i&&r.1q(),r.1t()}}}kH(){1a e,t=1g,i=1m DT(t.A);i.J=t.J+"-sh",i.1S(t),i.O9=t.O9,i.Z=t.C7,i.MC=!1,i.YN=!0,i.A0=i.AD=i.S1,i.GM=i.H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.CN.1t(o,r,r.C));1p;2q:1a p=r.B9,u=r.AX;r.B9=r.BU,r.AX=r.AP,r.KK(),ZC.CN.2I(o,r),ZC.CN.1t(o,r,r.C,!0,0),r.B9=p,r.AX=u,r.KK()}}}1O I1 2k DT{2G(e){1D(e),1g.7v(e)}7v(e){1D.7v(e);1a t=1g;t.DN="3C",t.I=0,t.F=0,t.rw="",t.E2=-1,t.E6=-1,t.DR=-1,t.DZ=-1,t.F1=0,t.FQ=0,t.EY=0,t.F9=0,t.qD=!1,t.KQ=!1,t.EP="2a",t.ET=0,t.MA=0,t.H3=8,t.G2=8,t.Y0=[1,1],t.DH=1c,t.OP=1c,t.Q2=!1,t.ON=!0,t.Q4="",t.OJ="",t.NT="",t.PF="",t.X4="tl",t.F8=!1}7W(){1a e=1D.7W();1l 1g.dE(e,"1s,1M,136,13c,13f,13g,6G,184,wL,13i,13j,13l,13p,13s,2K,xc,lm,oa,lB,14n","I,F,F1,FQ,EY,F9,KQ,EP,DH,H3,G2,ET,MA,rw,Q4,OJ,NT,PF,F8"),e}5S(){}jc(e,t,i){1a a=1g;if(t=t||"w",ZC.1W(e)+""!=e+"")1l-1!==(e+="").1L("%")?a.jc(ZC.1W(e.1F("%",""))/100,t,!0):-1!==e.1L("px")?a.jc(ZC.1W(e.1F("px","")),t):a.jc(ZC.1W(e),t);1a n=1y a.E["p-1s"]!==ZC.1b[31]?a.E["p-1s"]:a.A.I,l=1y a.E["p-1M"]!==ZC.1b[31]?a.E["p-1M"]:a.A.F;1l(e=ZC.2l(e))>1&&!i?ZC.1k(e):e<=1||i?"w"===t?ZC.1k(n*e):ZC.1k(l*e):8j 0}5Z(e,t,i,a,n){1a l,r,o=1g;if(i=i||0,a=a||0,t=t||"4t",n=n||"n","4t"===t){1a s=6d(e).2n(/\\s+|;|,/);1l 1===s.1f?[o.5Z(s[0],"tb",i,a,n),o.5Z(s[0],"lr",i,a,n),o.5Z(s[0],"tb",i,a,n),o.5Z(s[0],"lr",i,a,n)]:2===s.1f?[o.5Z(s[0],"tb",i,a,n),o.5Z(s[1],"lr",i,a,n),o.5Z(s[0],"tb",i,a,n),o.5Z(s[1],"lr",i,a,n)]:3===s.1f?[o.5Z(s[0],"tb",i,a,n),o.5Z(s[1],"lr",i,a,n),o.5Z(s[2],"tb",i,a,n),o.5Z(s[1],"lr",i,a,n)]:[o.5Z(s[0],"tb",i,a,n),o.5Z(s[1],"lr",i,a,n),o.5Z(s[2],"tb",i,a,n),o.5Z(s[3],"lr",i,a,n)]}1l e+""=="3g"?-2:e+""=="4N"&&"y"===n?"4N":ZC.1W(e)+""!=e+""?-1!==(e+="").1L("%")?o.5Z(ZC.1W(e.1F("%",""))/100,t):-1!==e.1L("px")?o.5Z(ZC.1W(e.1F("px","")),t):o.5Z(ZC.1W(e),t):((o.A||1y o.E["p-1s"]!==ZC.1b[31])&&(l=1y o.E["p-1s"]!==ZC.1b[31]?o.E["p-1s"]:o.A.I),(o.A||1y o.E["p-1M"]!==ZC.1b[31])&&(r=1y o.E["p-1M"]!==ZC.1b[31]?o.E["p-1M"]:o.A.F),(e=ZC.2l(e))>=1?ZC.1k(e):e<1?"lr"===t?ZC.1k((o.A?l:i)*e):ZC.1k((o.A?r:a)*e):8j 0)}1S(e){1D.1S(e);1j(1a t="I,F,E2,DR,DZ,E6,F1,FQ,EY,F9,KQ,EP,DH,Y0,H3,G2,ET,MA,rw,Q4,OJ,NT,PF,F8".2n(","),i=0,a=t.1f;i<a;i++)1y e[t[i]]!==ZC.1b[31]&&(1g[t[i]]=e[t[i]])}9n(e){1a t,i,a,n,l,r=1g;if(2!==(e=e||1))if(r.TW)r.4y([["x","iX"],["y","iY"],[ZC.1b[19],"I"],[ZC.1b[20],"F"]]);1u{1a o=1y r.E["p-x"]!==ZC.1b[31]?r.E["p-x"]:r.A.iX,s=1y r.E["p-y"]!==ZC.1b[31]?r.E["p-y"]:r.A.iY,A=1y r.E["p-1s"]!==ZC.1b[31]?r.E["p-1s"]:r.A.I,C=1y r.E["p-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+r.I,r.iY+r.F]}}}1q(){1D.1q();1a e,t=1g;if(!t.o.cf){if(t.4y([["bp","X4"],["5n-zp","F8","b"],["3F-3T","qD","b"],["6G","KQ","b"],["6G-1J","14r"],["6G-2K","EP"],["6G-7q","DH"],["6G-eD","Y0"],["6G-1s","H3","i"],["6G-1M","G2","i"],["6G-2c","ET","i"],["6G-rj","MA","i"],["1G-1v","Q4"],["1G-2A","OJ"],["1G-2a","NT"],["1G-1K","PF"]]),1c!==(e=ZC.1d(t.o["1G-9i"]))){1a i=6d(e).2n(/\\s+|;|,/);2===i.1f?(t.F1=t.FQ=ZC.1k(i[0]),t.EY=t.F9=ZC.1k(i[1])):4===i.1f?(t.F1=ZC.1k(i[0]),t.FQ=ZC.1k(i[1]),t.EY=ZC.1k(i[2]),t.F9=ZC.1k(i[3])):t.F1=t.FQ=t.EY=t.F9=ZC.1k(i[0])}1c!==ZC.1d(t.o["6G-mL"])&&(t.OP=1m DT(t.A)),t.4y([["1G-9i-1v-1K","F1","i"],["1G-9i-1v-2A","FQ","i"],["1G-9i-2a-2A","EY","i"],["1G-9i-2a-1K","F9","i"]])}}V8(e){1a t=e.2n(/\\s/);1l t[0]=ZC.1k(t[0]),t[2]=ZC.AO.G7(t[2]),t}1t(){1a e=1g;if(1c!==e.DH&&!(e.DH 3E 3M)&&"vG"===e.A.OD){1a t=e.A.OG(e.DH);e.DH=[t[0],t[1]],e.DH[0]-=e.BJ,e.DH[1]-=e.BB}if(e.qD&&(e.iX-=e.I/2,e.iY-=e.F/2),"-1"!==e.BU&&0!==e.AP||e.Q4+e.OJ+e.NT+e.PF!==""||"-1"!==e.A0||"-1"!==e.AD||""!==e.D6||""!==e.GM||""!==e.HL){1a i=e.H.AB;e.MC&&e.C7&&e.kH();1a a,n={x:"iX",y:"iY",1s:"I",1M:"F"};if(e.o["2a-3X"]&&!e.YN&&!e.fS&&!e.WG){1a l=1m I1(-1===e.A.iX&&-1===e.A.iY?e:e.A);1j(a in l.1S(e),l.fS=!0,l.MC=!1,l.Z=e.Z,l.X4=e.X4,l.1C(e.o["2a-3X"]),l.J=e.J+"-2a",l.1q(),l.gC(),n)1c===ZC.1d(l.o[a])||-1===(""+l.o[a]).1L("+")&&-1===(""+l.o[a]).1L("-")||(l[n[a]]=e[n[a]]+ZC.1k(l.o[a]));l.1t()}if(e.Q4+e.OJ+e.NT+e.PF===""){1P(i){1i"3a":e.WS();1p;1i"2F":e.UB();1p;1i"3K":e.UA()}if(e.KQ&&e.OP){1a r,o;if(e.DH&&2===e.DH.1f?(r=e.DH[0],o=e.DH[1]):e.E.cp&&(r=e.E.cp[0],o=e.E.cp[1]),e.OP.Z=e.OP.C7=e.Z,e.OP.1S(e),e.OP.1C(e.o["6G-mL"]),e.OP.J=e.J+"-6G-mL",e.OP.o.x=r,e.OP.o.y=o,e.E.cm){1a s=e.E.cm[0],A=e.E.cm[1],C=1B.sr(ZC.1k(A)-ZC.1k(o),ZC.1k(s)-ZC.1k(r));7X(C)&&(C=0),1c===ZC.1d(e.OP.o.2f)&&(e.OP.o.2f=ZC.UE(C))}e.OP.1q(),e.OP.1t()}}1u{1a Z=e.AP,c=e.BU,p=e.G8;1P(e.AP=0,i){1i"3a":e.WS();1p;1i"2F":e.UB();1p;1i"3K":e.UA()}e.AP=Z;1a u=e.A0,h=e.AD;e.A0=e.AD="-1";1j(1a 1b,d=["1v","2A","2a","1K"],f=["Q4","OJ","NT","PF"],g=0;g<d.1f;g++)if(""!==(1b=e[f[g]])&&"2b"!==1b){1a B=e.V8(1b);1P(e.AP=B[0],e.G8=B[1],e.BU=B[2],i){1i"3a":e.WS(d[g]);1p;1i"2F":e.UB(d[g]);1p;1i"3K":e.UA(d[g])}e.AP=Z,e.BU=c,e.G8=p}e.A0=u,e.AD=h}if(e.o["1v-3X"]&&!e.YN&&!e.WG&&!e.fS){1a v=1m I1(-1===e.A.iX&&-1===e.A.iY?e:e.A);1j(a in v.1S(e),v.WG=!0,v.MC=!1,v.Z=e.Z,v.X4=e.X4,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W0&&t.ZK();1a s=t.B9,A=t.AX;t.B9=t.BU,t.AX=t.AP,t.KK(),ZC.CN.2I(i,t),t.T7=o?"43":"9r",t.EU+t.G4>0&&(t.T7="lH"),t.gf=o?"43":"qL";1a C=!1;ZC.A3.6J.af||!t.F8||t.KQ||""!==t.Q4||""!==t.OJ||""!==t.NT||""!==t.PF||0!==t.F1||0!==t.FQ||0!==t.EY||0!==t.F9||(C=!0),t.E["aP-1v"]=!0,t.E.1G=e,ZC.CN.1t(i,t,t.C,!0,1c,C),t.B9=s,t.AX=A,t.KK()}UA(e){e=e||"4t";1a t=1g,i=t.Z;if("4t"===e){1a a=ZC.P.F2("7o:3i");if(""!==t.D6&&-1===ZC.AU(ZC.fu,t.D6)){1a n=t.PX(),l=n.4d;1P(t.M9){2q:a.1J="wS",a.5a=t.D6,ZC.P.G3(a,{2K:n.cx+","+n.cy,3o:t.C4,"o:e8":t.C4}),t.E.5c=[a];1p;1i"no-6B":1i"d5":1i!1:t.E.5c=[l,n.x,n.y]}}t.TN("0.5,0.5")}1a r=ZC.P.F2("7o:4a");1P(r.79=t.AP+"px",r.1r=t.BU,r.3o=t.C4,t.G8){1i"2V":r.cU="2V";1p;1i"fo":r.cU="qI";1p;1i"gh":r.cU="qK"}t.E.4a=r,t.UD(e);1a o=t.F1+t.FQ+t.EY+t.F9!==0;t.E.cx=t.iX+t.I/2,t.E.cy=t.iY+t.F/2;1a s=t.B9,A=t.AX;t.B9=t.BU,t.AX=t.AP,t.KK(),ZC.CN.2I(i,t),t.T7=o?"43":"9r",t.EU+t.G4>0&&(t.T7="lH"),t.gf=o?"43":"qL",t.E.1G=e,ZC.CN.1t(i,t,t.C,"4t"===e),t.B9=s,t.AX=A,t.KK()}}1O R0 2k DT{2G(e){1D(e);1a t=1g;t.X5=1c,t.BD=1c,t.M=1c,t.SS=1c,t.A6=1c,t.KA=!1,t.O9=!1,t.L2=!1,t.qN=!1}1q(){1a e,t=1g;t.BD=1o.6e.a7("3C"===t.X5.1J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.EN=2,t.sF=!1,t.iE=!1,t.FE=-1,t.KO=0,t.NM=0,t.OR=ZC.3w,t.gF=!1,t.sn=!0,t.WW=1o.x4,t.qU=1.65,t.WY=1,t.W8=!1,t.A6=1c,t.VN=!1,t.m2=!1}7W(){1a e=1D.7W();1l 1g.dE(e,"cT,sx,6S,6W,1r,6x,6U,bH,hh,dv,ca,di,d6,d8,1E","OA,JW,DE,GC,C1,gJ,7C,N2,QO,KB,FM,FN,FY,EN,AN"),e}1S(e){1D.1S(e);1j(1a t="OA,JW,DE,GC,C1,gJ,7C,N2,KB,QO,FM,FN,FY,EN,AN".2n(","),i=0,a=t.1f;i<a;i++)1y e[t[i]]!==ZC.1b[31]&&(1g[t[i]]=e[t[i]])}EW(e){1l e}mi(e){1l"6x"===e||"14I"===e||"kj"===e||"qQ"===e||"14J"===e||"14K"===e||"x5"===e}eV(e){1a t=1g;if(t.WW)1l e.1F(/(<([^>]+)>)/gi,"").1f*t.DE/(t.qU*(t.mi(t.7C)?.87:1)*(t.N2?.95:1));1a i="";1l 1y t.o["4g-4E"]!==ZC.1b[31]&&ZC.2s(t.o["4g-4E"])&&(i="[sf]"),ZC.P.lz(1g.H.J,i+e,1g.GC,1g.DE,1g.7C,1g.FE)}1q(){1g.I=1g.F=1g.NM=1g.KO=0,1D.1q();1a e,t,i,a,n,l=1g;if(!l.o.cf){if(l.YS("1E","AN"),1c!==ZC.1d(l.AN)&&(l.AN=""+l.AN,l.AN=l.EW(l.AN),l.AN=l.AN.1F(/\\n/g,"<br>").1F(/\\\\n/g,"<br>"),"2F"===l.H.AB&&(l.AN=l.AN.1F(/&8u;/g," "))),l.4y([["iy","sn","b"],["8F-1s","WW","b"],["1X-1s","OR","i"],["1w-1M","FE","i"],["1s-eD","qU","f"],["14B-1E","iE","b"],["3t-1E","sF","b"],["6x","gJ","b"],["bH","N2","b"],["hh","QO","b"],["1E-bS","KB"],["aH","gF","b"],["1E-3u","OA"],["3u","OA"],["9l-3u","JW"],["2t-2e","DE","f"],["1X-qZ","YM","i"],["2t-9B","GC"],["2t-2f","AA","i"],["1r","C1","c"],["2t-1r","C1","c"],["1E-2o","WY","f",0,1],["14m-sa","VN","b"]]),l.DE=ZC.BM(1,l.DE),1c===ZC.1d(l.o["1E-2o"])&&(l.WY=l.C4),l.gJ&&(l.7C="6x"),1c!==(e=ZC.1d(l.o["2t-79"]))&&(l.7C=e),1c===ZC.1d(l.o["1E-bS"])&&(l.KB=l.QO?"hh":"2b"),1c!==(e=ZC.1d(l.o["2t-1I"]))&&(l.N2="bH"===e||"bQ"===e),1c!==(e=ZC.1d(l.o.3v))){1a r=6d(e).2n(/\\s+|;|,/);t=1===r.1f?[ZC.1k(r[0]),ZC.1k(r[0]),ZC.1k(r[0]),ZC.1k(r[0])]:2===r.1f?[ZC.1k(r[0]),ZC.1k(r[1]),ZC.1k(r[0]),ZC.1k(r[1])]:3===r.1f?[ZC.1k(r[0]),ZC.1k(r[1]),ZC.1k(r[2]),ZC.1k(r[0])]:[ZC.1k(r[0]),ZC.1k(r[1]),ZC.1k(r[2]),ZC.1k(r[3])],l.FM=t[0],l.FN=t[1],l.FY=t[2],l.EN=t[3]}if(l.4y([["3v-1v","FM","i"],["3v-2A","FN","i"],["3v-2a","FY","i"],["3v-1K","EN","i"]]),l.AN){l.YM>0&&l.AN.1f>l.YM&&(l.AN=l.AN.2v(0,l.YM)+"...");1a o=l.AN.2n(/<br>|<br\\/>|<br \\/>|\\n/),s="";1y l.o["4g-4E"]!==ZC.1b[31]&&ZC.2s(l.o["4g-4E"])&&(o=[l.AN],s="[sf]");o.1f;1j(l.KO=ZC.P.lz(1g.H.J,s+l.AN,1g.GC,1g.DE,1g.7C,1g.FE,!0)+l.FM+l.FY,i=0,a=o.1f;i<a;i++)l.NM=ZC.BM(l.NM,l.eV(o[i])+l.EN+l.FN)}1u l.AN="",l.NM=ZC.1k(1.25*l.DE),l.KO=-1===l.FE?ZC.1k(1.25*l.DE):l.FE;if((1c===ZC.1d(l.o[ZC.1b[19]])||7X(l.I)||0===l.I)&&(l.I=l.NM),(1c===ZC.1d(l.o[ZC.1b[20]])||7X(l.F)||0===l.F)&&(l.F=l.KO),l.I=ZC.CQ(l.I,l.OR),l.iE&&l.NM>l.I&&!l.E.si&&l.I>2*l.DE){1a A,C="",Z=0,c=l.AN.1F(/<br>/gi," [##] ").2n(/\\s|<br>/),p=[];1j(i=0,a=c.1f;i<a;i++)if((A=l.eV(c[i]))>.9*l.I){1a u=1B.4l(A/l.I*.9),h=1B.4l(c[i].1f/u);1j(n=0;n<u;n++)p.1h(c[i].5A(n*h,h))}1u p.1h(c[i]);1j(i=0,a=p.1f;i<a;i++)""!==p[i]&&("[##]"===p[i]?(C+="<br>",Z=0):(Z+=A=1+l.eV(p[i]+" "))>.9*l.I?(i>0&&(C+="<br>"),C+=p[i]+" ",Z=A):C+=p[i]+" ");C=(C=C.1F(/<br><br>/g,"<br>").1F(/ <br> <br>/g," <br>")).1F(/(.+?)<br> $/g,"$1");1a 1b=l.o.1E;l.o.1E=C,l.E.si=!0,l.1q(),l.o.1E=1b,l.E.si=!1}if(!(1c!==ZC.1d(l.o[ZC.1b[19]])&&1c!==ZC.1d(l.o[ZC.1b[20]])||1c===ZC.1d(l.o.2K)&&1c===ZC.1d(l.o.2y)&&1c===ZC.1d(l.o[ZC.1b[57]])&&1c===ZC.1d(l.o[ZC.1b[58]])&&1c===ZC.1d(l.o[ZC.1b[59]])&&1c===ZC.1d(l.o[ZC.1b[60]]))){l.iX=-1,l.iY=-1;1a d=l.o[ZC.1b[19]],f=l.o[ZC.1b[20]];1c===ZC.1d(d)&&(l.o[ZC.1b[19]]=l.I),1c===ZC.1d(f)&&(l.o[ZC.1b[20]]=l.F),l.9n(),l.o[ZC.1b[19]]=d,l.o[ZC.1b[20]]=f}if(1y l.o["4g-4E"]===ZC.1b[31]||!l.o["4g-4E"]){1a g=1B.4l((l.NM-l.EN-l.FN)/l.DE);g>0&&(l.AN=l.AN.1F(/<hr>/g,1m 3M(g).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t),t.QL="",t.MO=1c,t.NW=[1c,1c,1c,1c],t.O9=!1,t.NH="x",t.KA=!1,t.TX=!1,t.vm=!1,t.jC=!1,t.H4=!1,t.iN={},t.NV=1c,t.QP={},t.LZ=!1,t.QM=!1,t.11u=1c,t.SY=[],t.N={},t.N1=1c,t.DC=1c,t.UU=0,t.hp=0,t.kq=1,t.MI=1c,t.SI="",t.ug="F*11v$11X!",t.MF="",t.d9={},t.lG=!1,t.AB="",t.KI=1c,t.gT=!1,t.QQ=["",""],t.L8=0,t.KP=[],t.jr=0,t.jE=0,t.dZ=!1,t.jx="",t.uQ=!0,t.I7=1c,t.QS=[],t.NY=0,t.12w=!1,t.SJ={},t.lg=!1,t.FZ=1o.3J.kz?{}:1c,t.mb=!1,t.T1=[]}q0(e){1a t=1g;if(e)1j(1a i=t.T1.1f-1;i>=0;i--)t.T1[i].1J===e&&t.T1.6r(i,1);1u t.T1=[]}2Q(){1l-1!==ZC.AU(1g.KP,ZC.1b[44])}mc(e){1l e=e||"",ZC.AK(1g.J+"-3Y-c"+(""===e?e:"-"+e))}9h(){1a e;(e=ZC.AK(1g.J+"-2C"))&&(e.1I.3L="2b"),1g.dZ=!1}XV(){1j(1a e=1g,t=e.NW.1f,i=0;i<t;i++)if(1c!==ZC.1d(e.NW[i])){1P(e.AB){1i"2F":ZC.CN.UB(e.NW[i].bo,e.NW[i].1I,e.NW[i].2R.2M(" "),e.NW[i].ab);1p;1i"3K":ZC.CN.UA(e.NW[i].bo,e.NW[i].1I,e.NW[i].2R.2M(" "),e.NW[i].ab)}e.NW[i]=1c}}nN(){1a s=1g,i,A2,FG,fm;fm="s4:"===2g.89.hM?ZC.12G||"":2g.89.12I;1a cg=[fm],CU=fm.2n(".");1j("8z"===CU[0]?cg.1h(fm.1F("8z.","")):cg.1h("8z."+fm),i=0;i<=CU.1f-2;i++){1j(1a rV="*",j=i;j<CU.1f;j++)rV+="."+CU[j];cg.1h(rV)}1n XH(e){if(ZC.rU&&ZC.rU 3E 3M){1a t=ZC.Y3.du(ZC.sK(ZC.mj(e)));-1!==ZC.AU(ZC.rU,t)&&(s.vm=!0)}}if(-1!==ZC.AU(cg,"vz")||-1!==ZC.AU(cg,"127.0.0.1"))s.TX=!0,s.jC=!0,XH("vz");1u{1a mt=[["2w.AC.12L.12M","Q^12N]12O`12P^`12Q[12R"],["2w.12S.12U","12V/12K+12v/12i/12u/+123+124/129="]];1j(i=0,A2=mt.1f;i<A2;i++)4J{if(7l(mt[i][0])===ZC.mj(mt[i][1])){s.TX=!0;1p}}4M(e){}1j(i=0,A2=cg.1f;i<A2;i++){1a sA=ZC.Y3.du(ZC.sK(ZC.mj(cg[i])));ZC.un 3E 3M&&-1!==ZC.AU(ZC.un,sA)&&(s.TX=!0,XH(sA))}ZC.il 3E 3M&&2===ZC.il.1f&&(FG=ZC.uh(s.ug),FG=FG.1F("O","0"),s.SI=ZC.ui(ZC.il[0],FG),s.SI===ZC.il[1]&&(s.TX=!0,s.jC=!0,XH(ZC.il[0])))}}ls(){1a e=1g;if(1c!==e.MO)ZC.6y(e.MO),e.2x();1u if(1c===ZC.1d(ZC.4f.1V["cr-"+e.QL])){1a t=["g5-3e"===e.N3?"eK="+1B.cb():"",1o.hd?"lx="+e.AB:""].2M("&");ZC.A3.a8({1J:"bL",3R:e.QL,pK:"1E",ej:1n(t){e.S0.cr||"7h-f0"!==e.N3||t.cn(ZC.1b[45],"cl, 8H ci dJ 6X:6X:6X dF")},1V:t,4L:1n(t,i,a,n){1l e.NC({8C:ZC.1b[63],b8:"bB cR fG ("+n+")"},ZC.1b[64]),!1},aF:1n(t){1a i;4J{i=3h.1q(t),ZC.4f.1V["cr-"+e.QL]=t}4M(a){1l e.NC(a,"3h mQ"),!1}e.MO=i,ZC.6y(e.MO),e.2x()}})}1u{1a i;4J{i=3h.1q(ZC.4f.1V["cr-"+e.QL])}4M(a){1l e.NC(a,"3h mQ"),!1}e.MO=i,ZC.6y(e.MO),e.2x()}}2x(e,t){1a i=1g;if(i.MF="2x",""!==(t=t||i.QK)&&0!==t.1L("7u:"))if(1c===ZC.1d(ZC.4f.1V["1V-"+t])){1a a=["g5-3e"===i.N3?"eK="+1B.cb():"",1o.hd?"lx="+i.AB:""].2M("&");ZC.A3.a8({1J:"bL",3R:t,pK:"1E",ej:1n(e){i.S0.1V||"7h-f0"!==i.N3||e.cn(ZC.1b[45],"cl, 8H ci dJ 6X:6X:6X dF")},1V:a,4L:1n(e,t,a,n){1l i.NC({8C:ZC.1b[63],b8:"bB cR fG ("+n+")"},ZC.1b[64]),!1},aF:1n(t){i.i9(e,t)}})}1u i.i9(e,ZC.4f.1V["1V-"+t]),ZC.4f.1V["1V-"+t]=1c;1u""!==i.F5?i.i9(e,i.F5):1c!==i.MD&&(i.sj?i.MD=3h.1q(3h.5g(i.sj)):i.sj=3h.1q(3h.5g(i.MD)),i.i9(e,i.MD))}i9(e,t){1a i=1g;ZC.TS[i.J]=(1m a1).bI(),ZC.AO.oM("wQ",i)?ZC.AO.C8("wQ",i,i.FO(),t,1n(t){i.qE(e,t)}):i.qE(e,t)}n2(e){1a t,i;if(!1o.3J.rg)1l[];e||(e=1g.o);1a a=[];if(e.aY)1j(t=0,i=e.aY.1f;t<i;t++){1a n=e.aY[t].1J||"1c";if(-1===ZC.AU(ZC.wN,n)){1j(1a l in"3d"===n.2v(n.1f-2)&&(n=n.2v(0,n.1f-2)),ZC.mN)ZC.mN.8d(l)&&-1!==ZC.AU(ZC.mN[l],n)&&(n=l);1o.qG(n),a.1h(n)}}1j(1g.wG(e),t=0,i=ZC.RN.1f;t<i;t++)""!==ZC.GP(ZC.RN[t])&&-1===ZC.AU(ZC.WU,ZC.GP(ZC.RN[t]))&&a.1h(ZC.GP(ZC.RN[t]));1l a}wG(e){e||(e=1g.o)}qE(JH,U6){1a s=1g,G;s.E.vM=1o.3J.qo?U6:"N/A";1a DF=1c;if("3e"==1y U6)4J{DF=3h.1q(U6)}4M(J7){4J{DF=7l("("+U6+")")}4M(J7){1l s.NC(J7,"3h mQ"),!1}}1u DF=U6;1c===ZC.1d(DF[ZC.1b[16]])&&(DF={aY:[DF]}),s.E.7g="N/A",1o.3J.qo&&(s.E.7g=ZC.GP(3h.5g(DF))),1o.ip(s,s.n2(DF),1n(){DF=ZC.AO.C8("fJ",s,s.FO(),DF),1o.ip(s,s.n2(DF),1n(){if(ZC.AO.C8("Uh",s,{id:s.J}),1c===ZC.1d(JH))s.VQ(DF),s.o=DF,s.dR?(s.1q(),s.1t()):s.OQ(1n(){s.1q(),s.1t()});1u{1a e=s.OH(JH);if(1c!==e&&1c!==ZC.1d(G=DF[ZC.1b[16]])){1a t=G.1f>1?G[e.L]:G[0];t.id||(t.id=e.o.id||""),s.o[ZC.1b[16]][e.L]=t,s.OQ(1n(){s.1q(JH),s.AI[e.L].1t()})}}})})}VQ(DF){1a s=1g,G,i,A2,j,J8;1j(1c===ZC.1d(DF[ZC.1b[16]])&&(DF={aY:[DF]}),1===DF[ZC.1b[16]].1f&&1c===ZC.1d(DF[ZC.1b[16]][0])&&(DF[ZC.1b[16]]=[{1J:"1c"}]),i=0,A2=DF[ZC.1b[16]].1f;i<A2;i++)if(1c!==ZC.1d(DF[ZC.1b[16]][i])){if(1c!==ZC.1d(G=DF[ZC.1b[16]][i].5L)){1a FC=[];1j(DF[ZC.1b[16]][i][ZC.1b[10]]=DF[ZC.1b[16]][i][ZC.1b[10]]||[],j=0,J8=G.1f;j<J8;j++)if(G[j].fr&&G[j]["3c-1Q"]||FC.1h(G[j]),1c!==ZC.1d(G[j].1J)&&0===G[j].1J.1L("1o."))4J{1a M5=G[j].uq||{},EF=G[j].1J+"."+(M5.8C||"");M5[ZC.1b[3]]=i;1a ft=7l(EF).4x(s,M5,DF,G[j]);1j(1a ih in ft)ft.8d(ih)&&("1H"===ft[ih].mP?DF[ZC.1b[16]][i][ZC.1b[10]].1h(ft[ih]):FC.1h(ft[ih]))}4M(e){}DF[ZC.1b[16]][i].5L=FC}1a mI;if(1c!==ZC.1d(mI=DF[ZC.1b[16]][i].fH))1j(1a xC=s.or(DF,i),k=0;k<mI.1f;k++){1a fK=mI[k];if(1c!==ZC.1d(fK.1J)&&1c!==ZC.1d(1o.fH[fK.1J])&&"1n"==1y 1o.fH[fK.1J].1q)4J{1a BO={};ZC.2E(fK,BO),BO.2Y=xC.2Y,BO.6A={id:s.J,1s:s.I,1M:s.F};1a o=1o.fH[fK.1J].1q.4x(s,BO);if(1c!==ZC.1d(G=o.Gr))1j(j=0;j<G.1f;j++)DF[ZC.1b[16]].1h({}),ZC.2E(G[j],DF[ZC.1b[16]][DF[ZC.1b[16]].1f-1]);if(1c!==ZC.1d(G=o[ZC.1b[10]]))1j(1c===ZC.1d(DF[ZC.1b[16]][i][ZC.1b[10]])&&(DF[ZC.1b[16]][i][ZC.1b[10]]=[]),j=0;j<G.1f;j++)DF[ZC.1b[16]][i][ZC.1b[10]].1h(G[j]);if(1c!==ZC.1d(G=o.5L))1j(1c===ZC.1d(DF[ZC.1b[16]][i].5L)&&(DF[ZC.1b[16]][i].5L=[]),j=0;j<G.1f;j++)DF[ZC.1b[16]][i].5L.1h(G[j])}4M(e){}}}}w2(e,t){1a i=1g;1P(e){1i"1w":1l 1m qa(i);1i"1N":1l 1m q7(i);1i"bj":1l 1m Gc(i);1i"bv":1l 1m Fv(i);1i"2U":1i"5t":1i"8U":1l 1m lu(i);1i"6c":1l 1m lv(i);1i"9u":1i"gO":1i"aX":1j(1a a=!1,n=i.o[ZC.1b[16]][t][ZC.1b[11]],l=0,r=n.1f;l<r;l++)n[l]&&n[l].1J&&-1!==n[l].1J.1L("3d")&&(a=!0);1l a?1m nG(i):i.o[ZC.1b[16]][t].1A&&i.o[ZC.1b[16]][t].1J&&i.o[ZC.1b[16]][t].1A&&i.o[ZC.1b[16]][t].1A.1J&&-1!==i.o[ZC.1b[16]][t].1A.1J.1L("3d")?1m nG(i):"9u"===e?1m nD(i):1m Fq(i);1i"6v":1l 1m Fy(i);1i"8r":1l 1m Ga(i);1i"5m":1l 1m DO(i);1i"6V":1l 1m Fl(i);1i"9H":1i"3O":1l 1m qh(i);1i"8S":1l 1m Dj(i);1i"7d":1i"pR":1l 1m Dl(i);1i"b7":1l 1m Fh(i);1i"g7":1i"8i":1l 1m Dr(i);1i"7R":1l 1m Ds(i);1i"qA":1i"aA":1l 1m Dg(i);1i"aB":1l 1m Cw(i);1i"xt":1i"5V":1l 1m Dx(i);1i"84":1l 1m Cp(i);1i"5z":1l 1m Cu(i);1i"qw":1l 1m Cn(i);1i"8D":1l 1m Cr(i);1i"97":1l 1m Da(i);1i"83":1l 1m Dy(i);1i"ql":1i"7e":1l 1m Cx(i);1i"dN":1i"6O":1l 1m Cz(i);1i"7k":1l 1m Cy(i);1i"n8":1l 1m Gb(i);2q:1l 1m Fp(i)}}OH(e){1j(1a t=1g,i=0,a=t.AI.1f;i<a;i++)if(t.AI[i].J===t.J+"-2Y-"+e||t.AI[i].J===t.J+"-2Y-id"+e||t.AI[i].J===e||i===e)1l t.AI[i];1l 1c}mu(e,t){1a i=1g,a=ZC.A3("#"+i.J+("2F"===i.AB?"-1v":"-3Y")),n=ZC.aE(i.J);e-=a.2c().1K,t-=a.2c().1v;1j(1a l=1c,r=0,o=i.AI.1f;r<o;r++)ZC.E0(e,i.AI[r].iX,i.AI[r].iX+i.AI[r].I*n[0])&&ZC.E0(t,i.AI[r].iY,i.AI[r].iY+i.AI[r].F*n[1])&&(l=i.AI[r]);1l l}qr(e){1a t,i=1g;if(1y i.E.xo===ZC.1b[31]){1y e===ZC.1b[31]&&(e=!1),i.4y([["bx","LO"]]),i.o[ZC.1b[16]]&&1===i.o[ZC.1b[16]].1f&&1c!==ZC.1d(t=i.o[ZC.1b[16]][0].bx)&&(i.LO=t),""===i.LO&&(i.LO="8Y"),i.LO=6d(i.LO).1F("1o","cH");1j(1a a=i.LO.2n(/\\s+|;|,/),n=0,l=a.1f;n<l;n++)i.B8.qv(a[n]);i.B8.ls(i.MO),ZC.2L&&i.B8.qv("2L"),e||(i.E.xo=!0)}}1q(e){1a t,i,a,n,l,r,o=1g;o.NH="x",o.E.4G=ZC.GP(3h.5g(o.o)),ZC.2E(o.o.xm,o.O0),1===o.o[ZC.1b[16]].1f&&ZC.2E(o.o[ZC.1b[16]][0].xm,o.O0);1a s=o.FO();if(1c!==ZC.1d(e)&&(s[ZC.1b[3]]=e),ZC.AO.C8("Lv",o,s),o.MF="1q",o.QQ[1]=o.QQ[0],o.QQ[0]="",o.QQ[0]+=o.I+":"+o.F+":",1c!==ZC.1d(t=o.o[ZC.1b[16]]))1j(o.QQ[0]+=t.1f+":",n=0;n<t.1f;n++)o.QQ[0]+=(t[n].1J||"")+":",o.QQ[0]+=(t[n].x||"")+":"+(t[n].y||"")+":"+(t[n][ZC.1b[19]]||"")+":"+(t[n][ZC.1b[20]]||"")+":",1c!==ZC.1d(t[n][ZC.1b[11]])&&(o.QQ[0]+=t[n][ZC.1b[11]].1f+":");if(ZC.AK(o.J+"-3Y-c")&&o.3j(e,!1),1y mF!==ZC.1b[31]&&(o.H7=1m mF(o)),1c===ZC.1d(e)){o.qr(),o.B8.B8["2t-9B"]&&(1o.9T=o.B8.B8["2t-9B"]);1a A=!!o.o.5i;if(o.B8.2x(o.o,"6A",!1,!0),o.4y([["5i","DC"],["xk","QN"]]),o.o[ZC.1b[16]]&&1===o.o[ZC.1b[16]].1f&&(i=o.o[ZC.1b[16]][0],1c!==ZC.1d(t=i.5i)&&(o.DC=t),1c!==ZC.1d(t=i.xk)&&(o.QN=t)),ZC.6y(o.QN),ZC.2E(o.B8.B8.a3.5i,o.DC,!1,!0,!0),o.DC.ac)1j(n=o.DC.ac.1f-1;n>=0;n--)1j(r=0;r<n;r++)if(o.DC.ac[n].id===o.DC.ac[r].id){o.DC.ac.6r(n,1);1p}if(A||4v o.o.5i,ZC.6y(o.DC),o.N={},1c!==ZC.1d(t=o.o.1I))1j(a in t)"3R"!==a&&(o.N[a]=t[a]);if(o.o[ZC.1b[16]]&&1===o.o[ZC.1b[16]].1f&&(i=o.o[ZC.1b[16]][0],1c!==ZC.1d(t=i.1I)))1j(a in t)"3R"!==a&&(o.N[a]=t[a]);ZC.6y(o.N),o.O0[ZC.1b[16]]&&1D.1q(),o.4y([["iw","ed"],["mZ-iw","ed"],["3x","NH"],["h-8I","jr","i"],["v-8I","jE","i"],["7J","KA","b"],["4n-7L","lG","b"]]),o.o[ZC.1b[16]]&&1===o.o[ZC.1b[16]].1f&&(i=o.o[ZC.1b[16]][0],1c!==ZC.1d(t=i.iw)&&(o.ed=t),1c!==ZC.1d(t=i["mZ-iw"])&&(o.ed=t),1c!==ZC.1d(t=i.7J)&&(o.KA=ZC.2s(t)),1c!==ZC.1d(t=i["4n-7L"])&&(o.lG=ZC.2s(t))),1c!==ZC.1d(t=1o.fT[o.ed])&&(ZC.HE=t),o.AI=[]}1a C=0,Z=0,c=o.I,p=o.F;if(1c!==ZC.1d(o.o.2y)||1c!==ZC.1d(o.o[ZC.1b[57]])||1c!==ZC.1d(o.o[ZC.1b[58]])||1c!==ZC.1d(o.o[ZC.1b[59]])||1c!==ZC.1d(o.o[ZC.1b[60]])){1a u=1m I1(o);u.1C(o.o,!1,!1),u.1q(),C=u.DZ,Z=u.E2,c=c-u.DZ-u.E6,p=p-u.E2-u.DR}1a h,1b,d=o.OH(e);if(1c!==ZC.1d(h=o.o[ZC.1b[16]])){1a f=0;1j(n=0,l=h.1f;n<l;n++)1b=0,1c!==ZC.1d(t=h[n].3f)&&(1b=ZC.1k(t)),f+=o.L8===1b?1:0;1a g=ZC.AQ.fv(o.NH,f),B=ZC.1k(g[0]),v=ZC.1k(g[1]),b=0,m=0,E=0;1j(n=0,l=h.1f;n<l;n++){if(1b=0,1c===d&&1c!==ZC.1d(t=h[n].3f)&&(1b=ZC.1k(t)),(1c===d||E===d.L)&&o.L8===1b){if(o.AI[E]=o.w2(h[n].1J||"1c",n),o.AI[E].OE=o.AI[E].AF+"2Y",o.B8.2x(o.AI[E].o,"2Y"),o.B8.2x(o.AI[E].o,h[n].1J||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&"vN"===e[a].2v(0,8)&&(e[a]=ZC.jy[e[a].2v(8)]),"!"===e[a].fz(0)&&(e[a]=e[a].2v(1),1g.E["bd-8J"]=1g.E["bd-8J"]||[],1g.E["bd-8J"].1h(e[a])),i.1h([e[a],"4d"])),"5a"===a&&""!==e[a]&&"zc."!==e[a].2v(0,3)&&-1!==o.1L(".8J.")&&(!ZC.6N&&ZC.jy&&"vN"===e[a].2v(0,8)&&(e[a]=ZC.jy[e[a].2v(8)]),"!"===e[a].fz(0)&&(e[a]=e[a].2v(1),1g.E["bd-8J"]=1g.E["bd-8J"]||[],1g.E["bd-8J"].1h(e[a])),i.1h([e[a],"4d"])),".6L"===o.5A(o.1f-4,4)&&"3e"==1y e[a]&&i.1h([e[a],"6L"]),"3R"===a&&(-1!==o.1L(".1I.")&&i.1h([e[a],"2O"]),-1!==o.1L(".6L.")&&i.1h([e[a],"6L"]),-1!==o.1L(".1R.")&&i.1h([e[a],"4d"])),"3e"==1y e[a]&&"3R"!==a&&(0===e[a].1L("3R:")&&a===ZC.1b[5]||0===e[a].1L("7u:"))&&-1===ZC.AU(["5I","1E","Jp"],ZC.EA(a))&&i.1h([e[a],"1V"])}1l i}OQ(JA){1a s=1g;if(1o.3J.rg){1a J3=s.jv(s.o).4B(s.jv(s.MO));if(0!==J3.1f){1a UU=0,LN={},ra=0;s.E["bd-8J"]=s.E["bd-8J"]||[];1a C6=2w.eN(1n(){if(UU>=J3.1f){1j(1a e in 2w.9S(C6),s.ti(s.o),LN)if(0!==e.1L("1V:")&&-1===ZC.AU(s.E["bd-8J"],e))4J{1a t=2g.4P("3a");t.1s=LN[e].1s,t.1M=LN[e].1M,t.9d("2d").d3(LN[e],0,0);1a i=t.jT("4d/9K");LN[e].hL=1c,LN[e].j0=1c,LN[e].5a=i,ZC.4f.1V[e]=LN[e]}4M(a){}2w.5Q(1n(){1o.YE[s.J]&&JA()},1)}1u r5(++ra)},20);r5(ra)}1u 1o.YE[s.J]&&JA()}1u 1o.YE[s.J]&&JA();1n r5(i){if(!(i>=J3.1f)){1a F5,MB,KG=J3[i][0],kI=J3[i][1];if("3R:"===KG.2v(0,4)){1a QK=KG.2v(4);s.QP["3R:"+QK]="[]";4J{F5=["g5-3e"===s.N3?"eK="+1B.cb():""].2M("&"),ZC.A3.a8({1J:"bL",3R:QK,ej:1n(e){s.S0.1V||"7h-f0"!==s.N3||e.cn(ZC.1b[45],"cl, 8H ci dJ 6X:6X:6X dF")},1V:F5,4L:1n(e,t,i,a){1l s.NC({8C:ZC.1b[63],b8:"bB cR fG ("+a+")"},ZC.1b[64]),!1},aF:1n(e,t,i,a){s.QP["3R:"+a]=e,UU++}})}4M(J7){1l s.NC(J7,ZC.1b[64]),!1}}1u if("7u:"===KG.2v(0,11))if("zc.Ma.2x"===s.QP[KG]){s.QP[KG]="[]";1a EB=ZC.AO.oN(KG.2v(11)),O={id:s.J,pT:KG,5F:1n(e){s.QP[KG]=e,UU++}},wl=EB[0];O.8P=EB[1];4J{1a iL=7l(wl).4x(s,O);1c!==ZC.1d(iL)&&iL&&(s.QP[KG]=iL,UU++)}4M(J7){1l s.NC(J7,"oS 1V 6A"),!1}}1u UU++;1u"4d"===kI?(LN[KG]=1m d2,LN[KG].u0="xD",LN[KG].hL=1n(){UU++},LN[KG].j0=1n(){1a e=ZC.2s(s.o.KX);if(ZC.fu.1h(KG),e)1l s.NC({8C:ZC.1b[63],b8:"bB cR fG ("+1g.5a+")"},"bB 6A (4d)"),!1;1g.5a=ZC.kw,UU++},LN[KG].5a=KG,ZC.4f.1V[KG]=LN[KG]):"2O"===kI?(F5=["g5-3e"===s.N3?"eK="+1B.cb():""].2M("&"),ZC.A3.a8({1J:"bL",3R:KG,ej:1n(e){s.S0.2O||"7h-f0"!==s.N3||e.cn(ZC.1b[45],"cl, 8H ci dJ 6X:6X:6X dF")},1V:F5,4L:1n(e,t,i){1l s.NC(i,"bB 6A"),!1},aF:1n(e){1j(1a t={},i=e.m0(/[a-zA-Z0-9\\.\\#\\-](.+?)\\{((.|\\s)+?)\\}/gi),a=0,n=i.1f;a<n;a++){MB=i[a].2n("{");1a l=ZC.GP(MB[0]),r=l.2n(/\\s+/);if(1===r.1f||2===r.1f&&ZC.GP(r[0])==="#"+s.J){t[l=ZC.GP(1===r.1f?r[0]:r[1])]||(t[l]={});1j(1a o=0,A=(MB=MB[1].1F("}","").2n(";")).1f;o<A;o++){1a C=MB[o].2n(":");2===C.1f&&(t[l][ZC.GP(C[0])]=""+ZC.GP(C[1]))}}}1c!==ZC.1d(s.o.1I)?ZC.2E(t,s.o.1I):1c!==ZC.1d(s.o[ZC.1b[16]])&&1===s.o[ZC.1b[16]].1f&&s.o[ZC.1b[16]][0].1I&&ZC.2E(t,s.o[ZC.1b[16]][0].1I),UU++}})):"6L"===kI&&(F5=["g5-3e"===s.N3?"eK="+1B.cb():""].2M("&"),ZC.A3.a8({1J:"bL",3R:KG,ej:1n(e){s.S0.6L||"7h-f0"!==s.N3||e.cn(ZC.1b[45],"cl, 8H ci dJ 6X:6X:6X dF")},1V:F5,4L:1n(e,t,i){1l s.NC(i,"bB 6A"),!1},aF:1n(e,t,i,a){s.iN[a]=e,UU++}}))}}}ti(BX){1a s=1g;1j(1a p in BX)if("4h"==1y BX[p])s.ti(BX[p]);1u 1j(1a F5 in s.QP)F5===BX[p]&&(BX[p]=7l(s.QP[F5]))}bT(e){1a t,i,a,n,l=1g;if(l.E.bT=!0,l.E.wh=l.I+"/"+l.F,l.o[ZC.1b[16]])if(l.lg)1o.3n(l.J,"a0"),1o.aW(1o.aQ[l.J]);1u if(1y e===ZC.1b[31]&&(e=!1),ZC.AO.C8("bT",l,l.FO()),e=!1);1u{1j(i=0;i<l.AI.1f;i++)1j(n=0;n<l.AI[i].AZ.A9.1f;n++)l.E["g-"+i+"-p-"+n+".2h"]=l.AI[i].E["1A"+n+".2h"];1j(i=0;i<l.AI.1f;i++)l.E["g-"+l.AI[i].L+"-aL"]=3h.5g(l.AI[i].D9);1j(1a r=l.o[ZC.1b[16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1f;n++)4v l.E["g-"+i+"-p-"+n+".2h"];1j(i=0;i<l.AI.1f;i++)l.AI[i].HG=!1,l.AI[i].G9=l.AI[i].tS,4v l.AI[i].tS,4v l.E["g-"+l.AI[i].L+"-aL"]}}po(){1a e=1g.o[ZC.1b[16]],t=[ZC.1b[10],"5L"];if(e)1j(1a i=0,a=e.1f;i<a;i++)1j(1a n=0;n<t.1f;n++){1a l=t[n],r=[];if(1c!==ZC.1d(e[i][l])){1j(1a o=0,s=e[i][l].1f;o<s;o++)e[i][l][o].fr||r.1h(e[i][l][o]);e[i][l]=r}}}3j(e,t,i){1a a=1g;1j(1a n in a.E)-1!==n.1L("-1H-")&&-1!==n.1L("-cK")&&4v a.E[n];if(1y t===ZC.1b[31]&&(t=!0),ZC.A3("."+a.J+"-4Z-1N").4j("3H",a.rf),ZC.A3("."+a.J+"-4Z-1N").3p(),1c!==ZC.1d(e))a.OH(e).3j();1u{t&&a.po(),a.pn();1j(1a l=0,r=a.AI.1f;l<r;l++)"3K"===a.AB&&i?a.AI[l].a0():a.AI[l].3j();1a o,s,A;1c!==(o=ZC.AK(a.J+"-3Y-c"))&&ZC.P.II(o,a.AB,a.iX,a.iY,a.I,a.F),1c!==(A=ZC.AK(a.J+"-3Y-c-1v"))&&ZC.P.II(A,a.AB,a.iX,a.iY,a.I,a.F),1c!==(s=ZC.AK(a.J+"-8a-c"))&&(ZC.P.II(s,a.AB,a.iX,a.iY,a.I,a.F),ZC.A3("#"+a.J+"-2C-1N").3p()),a.A6&&a.A6.5b(),ZC.A3("."+a.J+"-2C-1Q").3p(),ZC.P.ER([a.J+"-2C-8a",a.J+"-2C"]),ZC.P.ER(a.J+"-eJ-1E"),1c!==a.I7&&ZC.P.ER([a.J+"-4Z-2R",a.J+"-4Z-cq-2R",a.J+"-4Z-ec-2R",a.J+"-4Z-5e",a.J+"-4Z-cq-5e",a.J+"-4Z-ec-5e"])}}pl(){1a e,t,i,a=1g,n=a.I+"/"+a.F,l=ZC.P.HZ({id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J+"-2C-1N"?(ZC.3m=!1,e.A6&&e.A6.5b(),1o.ZH(t)):(1c===e.DC||1c===ZC.1d(e.DC["3f-1Z"])||e.DC["3f-1Z"]||t.6R(),ZC.3m=!1,e.9h(),e.A6&&e.A6.5b(),e.W3(t))},e.P4=1n(){2w.iu(e.xj),e.ix=1c},e.p0=1n(t){if(ZC.e1){1a i=ZC.P.MH(t);if(ZC.2l(i[0]-ZC.e1.xy[0])>100&&(1m a1).bI()-ZC.e1.ts<5x){1a a=e.FO();a.c1=i[0]>ZC.e1.xy[0]?"2A":"1K",ZC.AO.C8("e1",e,a)}ZC.e1=1c}e.dZ||ZC.3m||1o.SM(t),e.P4(t)},ZC.A3("#"+e.J+"-5W").3r("4H",e.iH).3r("6f",e.P4).3r("5R",e.p0),ZC.A3("#"+e.J+"-2C-1N").4c("4H",e.iH)),e.hR=1n(t){1a i=e.FO();i.ev=t,ZC.AO.C8("aD",e,i)},ZC.A3("#"+e.J+"-5W").3r("aD",e.hR),ZC.A3("#"+e.J+"-3c").3r("aD",e.hR),e.pc=1n(t){27===t.Tm&&e.QM&&(e.l6||e.i7())},ZC.A3(2g).3r("wr",e.pc),e.i7=1n(){ZC.A3("#"+e.J+ZC.1b[66]).4j("3H",e.i7),ZC.jw=1c,ZC.P.ER(e.J+"-1V-6q"),e.a0(),1o.dL&&ZC.AK(1o.dL)&&(ZC.AK(1o.dL).1I.3L="2b")},ZC.A3("#"+e.J+ZC.1b[66]).4c("3H",e.i7)):ZC.2L&&(e.p1=1n(e){1l e.6R(),1o.SM(e),!1},ZC.A3("#"+e.J+"-5W").3r("4H",e.p1)),1c!==e.HO){1a u=ZC.1k(e.HO.dU);u=u>=50?u:5x*u,2w.5Q(1n(){e.MM(),e.2x()},u)}e.MF="",ZC.TS[e.J]=(1m a1).bI()-ZC.TS[e.J],e.E["cw-ai"]&&(ZC.AO.C8("ai",e,e.FO()),e.E["cw-ai"]=1c),e.E["cw-2x"]&&(ZC.AO.C8("2x",e,e.FO()),e.E["cw-2x"]=1c)}bX(e){1j(1a t=1g,i=0;i<t.AI.1f;i++)t.AI[i].BI&&t.AI[i].BI.sq(e)}nv(){1a e=1g,t=2g.4P("3a");t.1s=e.I,t.1M=e.F,t.4m("1O","");1j(1a i=0;i<e.AI.1f;i++)e.AI[i].BI&&e.AI[i].BI.sq(!0,t);1l t}Tp(){1c===ZC.1d(ZC.o6)&&(ZC.o6=1n(e){1o.3n(e.id,"uE")}),1o.3n(1g.J,"uI",{1E:"vs hO","1n":"ZC.o6()",8w:100})}o3(){1a e,t=1g,i={},a=t.DC.ew;t.B8.2x(i,"6A.5i.ew"),a&&ZC.2E(a,i),1===t.o[ZC.1b[16]].1f&&t.o[ZC.1b[16]][0].5i&&(e=t.o[ZC.1b[16]][0].5i.ew)&&ZC.2E(e,i);1a n=ZC.5u(ZC.1k(i.1J||1),1,2),l=i.2K||"br";-1===ZC.AU(["tl","tr","br","bl"],l)&&(l="br"),t.U0=l;1a r,o=32,s=146,A=0,C=1;ZC.6N&&(o=30,s=168,A=8,C=1),s=126,o=22;1a Z={8Y:["#Ua","#Sv"],b4:["#v6","#Sm"]},c=Z.8Y;if(1o.jQ&&(c="8Y"===t.LO||"cH"===t.LO?Z.8Y:Z.b4),1===t.o[ZC.1b[16]].1f)if(t.o[ZC.1b[16]][0][ZC.1b[0]]){1a p=ZC.AO.G7(t.o[ZC.1b[16]][0][ZC.1b[0]]);7===p.1f&&(c=ZC.AO.rT(p,Z.b4,Z.8Y))}1u if(t.o[ZC.1b[16]][0].bx){1a u=t.o[ZC.1b[16]][0].bx;c="8Y"===u||"cH"===u?Z.8Y:Z.b4}1a h,1b,d=1y 2w!==ZC.1b[31]&&2w.89?2w.89.wO:"",f=1y 2w!==ZC.1b[31]&&2w.89?2w.89.xv:"";1P(r=\'<a 5E="oS Su by hO" 1I="1r:\'+c[0]+\' !7r;2t-2e:uu !7r;3L:8y !7r;3o:1 !7r; 1E-bS:2b;" 7B="7h://8z.1o.bZ/?wO=\'+d+"&xv="+f+\'">Nr by <7D 1I="1r:\'+c[1]+\'; 2t-79:6x;">hO</7D></a>\',l){1i"br":h=t.F-o,1b=t.I-s;1p;1i"bl":h=t.F-o,1b=6;1p;1i"tr":h=2,1b=t.I-s;1p;1i"tl":h=2,1b=6}1c!==ZC.1d(e=ZC.AK(t.J+"-1v"))&&ZC.P.HZ({2p:ZC.6N?"-6N":"",p:e,id:t.J+"-eJ-1E",tl:h+"/"+1b,wh:s+"/"+(o-A),1r:ZC.6N?1===n?"#j3":"#2S":"",3v:A,3o:C,2K:"4D",4V:"8q",6W:1o.9T,4g:r},t.AB)}pn(){1a e=1g;ZC.A3("#"+e.J+"-2C").4j(ZC.1b[47],e.U8),ZC.A3("."+e.J+"-2C-1Q").4j(ZC.1b[47],e.U8),ZC.A3("."+e.J+"-2C-1Q").4j("3H 5R",e.q9).4j("7A",e.pX).4j("7T",e.q2),e.E["2C-1Q-hJ"]=!1,1c!==e.H7&&e.H7.3k(),1c!==e.D5&&e.D5.3k(),ZC.2L&&(ZC.A3("#"+e.J+"-5W").3k("4H",e.iH).3k("6f",e.P4).3k("5R",e.p0),ZC.A3("#"+e.J+"-2C-1N").4j("4H",e.iH),ZC.A3("#"+e.J+"-5W").3k("4H",e.p1)),ZC.A3("#"+e.J+"-5W").3k("aD",e.hR),ZC.A3("#"+e.J+"-3c").3k("aD",e.hR),ZC.A3(2g).3k("wr",e.pc),ZC.A3("#"+e.J+ZC.1b[66]).4j("3H",e.i7)}UF(e,t,i){1y i===ZC.1b[31]&&(i=!1);1a a=ZC.AK("zc-2C-"+(i?"eu":"1Q")+"-"+e);a&&(a.1I.3L=t?"8y":"2b")}p7(LM,ev){if(!1o.3J.w6){1a s=1g,G,i,A2,j,J8;1y LM===ZC.1b[31]&&(LM=-1);1a DC={};ZC.2E(s.DC,DC),-1!==LM&&s.o[ZC.1b[16]][LM]&&ZC.2E(s.o[ZC.1b[16]][LM].5i,DC,1c,1c,!0),ZC.A3("#"+s.J+"-2C").3p();1a RX=[];1j(1y ZC.AL===ZC.1b[31]&&RX.1h({id:"3D",46:"2b"},{id:"uF",46:"2b"},{id:"uO",46:"2b"}),i=DC.ac.1f-1;i>0;i--)1j(1a vL=DC.ac[i].id,ii=i-1;ii>=0;ii--)DC.ac[ii].id===vL&&DC.ac.6r(ii,1);if(1c!==ZC.1d(G=DC.ac))1j(i=0,A2=G.1f;i<A2;i++){1a NA=!1;1j(j=0,J8=RX.1f;j<J8;j++)RX[j].id===G[i].id&&(NA=!0);NA||RX.1h(G[i])}1a JG=DC["6i-2C"],OK=DC["6i-2C[2L]"];1j(i=0,A2=RX.1f;i<A2;i++)1c!==ZC.1d(RX[i]["1n"])&&(1c===ZC.1d(JG)&&(JG={}),1c===ZC.1d(JG["5D-2B"])&&(JG["5D-2B"]=[]),JG["5D-2B"].1h(RX[i]));JG["5D-2B"]&&JG["5D-2B"].4i(1n(e,t){1l ZC.1k(e.8w||"0")>ZC.1k(t.8w||"0")}),s.N1=1m DM(s);1a jz=s.LO.2n(/\\s+|;|,/),DV,LH,UN,pq,GN;1j(i=0,A2=jz.1f;i<A2;i++)if(s.B8.NU[jz[i]]){1a hS=s.B8.NU[jz[i]].a3||{};hS&&hS.5i&&hS.5i.vT&&ZC.2E(hS.5i.vT,s.N1.o)}if(s.B8.2x(s.N1.o,ZC.1b[65]),JG&&s.N1.1C(JG),ZC.2L&&(s.B8.2x(s.N1.o,ZC.1b[65]+"[2L]"),OK&&s.N1.1C(OK)),s.N1.WW=!0,s.N1.1q(),s.N1.AM||!s.jC){if(!ZC.AK(s.J+"-2C-1N")){1a qg=!!(s.DC&&s.DC["6i-2C"]&&s.DC["6i-2C"].7K)&&ZC.1d(s.DC["6i-2C"].7K.2h);if(qg||"cH"!==s.LO&&qg){GN=1m DM(s),s.B8.2x(GN.o,ZC.1b[65]+".7K"),JG&&ZC.1d(1c!==(G=JG.7K))&&GN.1C(G),ZC.2L&&(s.B8.2x(GN.o,ZC.1b[65]+"[2L].7K"),OK&&1c!==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AI[LM].BL.1f;j<J8;j++)s.AI[LM].BL[j].H4&&(H4=!0);if(H4&&1y mF!==ZC.1b[31]){1a hW=!1;EE=G1("Im"),"2b"!==EE.46&&(JT.1h(GQ("eG",EE.1E)),hW=!0),EE=G1("J2"),"2b"!==EE.46&&(JT.1h(GQ("f3",EE.1E)),hW=!0),EE=G1("It"),"2b"!==EE.46&&(JT.1h(GQ("gd",EE.1E)),hW=!0),hW&&JT.1h(JB("3G"))}}1a iq=!1,oy=!1;if(-1!==LM&&(-1!==ZC.AU(["1w","1N","2U","5t","6c","3O","9u"],s.AI[LM].AF)&&(iq=!0,s.XJ="2d"),-1!==ZC.AU(["97","83","dN","6O","7k","7e","aX"],s.AI[LM].AF)&&(oy=!0,s.XJ="3d")),(iq||oy)&&(EE=G1("3D"),"2b"!==EE.46&&(EE=G1(iq?"uF":"uO"),"2b"!==EE.46&&(JT.1h(GQ(iq?"n9":"nI",EE.1E)),JT.1h(JB("14N"))))),-1!==LM){1a D=s.AI[LM],nK=!1,m8=!1;1j(j=0;j<D.BL.1f;j++){1a B=D.BL[j];0===B.BC.1L(ZC.1b[51])&&(nK=!0),"3P"===B.DL&&(m8=!0)}nK&&(EE=G1("14P"),"2b"!==EE.46&&(EE=G1(m8?"uU":"uT"),"2b"!==EE.46&&(JT.1h(GQ(m8?"nH":"nn",EE.1E)),JT.1h(JB("fj"))))),(D.CY||D.KD)&&(EE=G1("o1"),"2b"!==EE.46&&(EE=G1(D.fC?"165":"17V"),"2b"!==EE.46&&(JT.1h(GQ(D.fC?"mx":"i0",EE.1E)),JT.1h(JB("2i")))))}1a m5=0,B6;if(1y ZC.w5!==ZC.1b[31]&&(EE=G1("uN"),"2b"!==EE.46&&(JT.1h(GQ("4K",EE.1E)),m5++),EE=G1("uz"),"2b"!==EE.46&&(JT.1h(GQ("4r",EE.1E)),m5++)),m5>0&&JT.1h(JB("aZ")),EE=G1("uG"),"2b"===EE.46||s.LZ||(s.QM?(EE=G1("17W"),JT.1h(GQ("iA",EE.1E)),JT.1h(JB("iA"))):(JT.1h(GQ("5X",EE.1E)),JT.1h(JB("5X")))),s.I7&&(EE=G1("17X"),"2b"!==EE.46&&JT.1h(GQ("c6",EE.1E)),EE=G1("17Y"),"2b"!==EE.46&&JT.1h(GQ("c5",EE.1E)),JT.1h(JB("4Z"))),JT.1f>0&&-1!==JT[JT.1f-1].1L("zc-2C-eu")&&JT.6r(JT.1f-1,1),s.pV={},-1!==LM)if(JG&&1c!==ZC.1d(B6=JG["5D-2B"]))1j(JT.1f>0&&JT.1h(JB("5D")),i=0,A2=B6.1f;i<A2;i++){1a mg=!0;if(1c!==ZC.1d(B6[i].46)&&("2b"===B6[i].46?mg=!1:"4t"!==B6[i].46&&(mg=!ev||7l(B6[i].46).4x(s,1o.hI(ev,s),B6[i].id,ev))),mg){1a AN,J=B6[i].id||"5D-"+i;"eu"===B6[i].id||"eu"===B6[i].1J?JT.1h(JB(J,!0)):"5K"===B6[i].1J?(AN=B6[i].1E||"qc vu "+i,JT.1h(wE(J,AN,!0))):(AN=B6[i].1E||"qc vu "+i,s.pV[J]={fn:B6[i]["1n"]||"",3R:B6[i].3R||"",2X:B6[i].2X||""},JT.1h(GQ(J,AN,!0)))}}s.TX||(JT.1h(JB("1o")),JT.1h(GQ("ur","vs hO"))),ZC.P.HZ({id:s.J+"-2C",p:2g.3s,2p:"zc-2C zc-1I",1v:1c===ZC.1d(GN)?0:GN.iY+GN.F/2,1K:1c===ZC.1d(GN)?0:GN.iX+GN.I/2,oa:s.N1.AP+"px 2V "+s.N1.BU,1U:(-1===s.N1.A0?"aG":s.N1.A0)+" "+lT(s.N1.D6),ca:s.N1.FM,di:s.N1.FN,d6:s.N1.FY,d8:s.N1.EN,4g:JT.2M("")}),s.E["2C-1Q-hJ"]||(s.q9=1n(e){1a t,i=1!==e.2X.eA?e.2X.6o.id:e.2X.id,a=i.2v(0,i.1L("-2C-1Q-")),n=1o.6Z(a);ZC.2L&&n.P4();1a l=n.mu(n.SY[0],n.SY[1]);n.9h(),ZC.2L&&1o.SM(e);1a r=i.1F(n.J+"-2C-1Q-","");n.wq({4w:l?l.J:1c,qk:r,ev:ZC.A3.BZ(e)});1a o=n.o["8m-k5"]||n.o[ZC.1b[16]][0]["8m-k5"]||"";1P(r){1i"nI":1i"n9":l&&n.pa(l.J);1p;1i"na":s.DC=s.DC||{},s.DC["3f-1Z"]=!0;1p;1i"nb":s.DC=s.DC||{},s.DC["3f-1Z"]=!1;1p;1i"i0":n.VX(l.J,!0);1p;1i"mx":n.VX(l.J,!1);1p;1i"nH":n.W4(l.J,"lK");1p;1i"nn":n.W4(l.J,"3P");1p;1i"f5":n.ph();1p;1i"pQ":n.NE("9K");1p;1i"pM":n.NE("dX");1p;1i"u3":n.NE("g3",""===o?1c:{fn:o});1p;1i"u5":n.NE("2F",""===o?1c:{fn:o});1p;1i"k8":1o.3n(n.J,"k8");1p;1i"tY":1o.3n(n.J,"wT",""===o?1c:{fn:o});1p;1i"u6":(t=G1("pU"))["5D-1n"]?n.ZO({4w:l?l.J:1c,qk:r,k5:o,"1n":t["5D-1n"]}):1o.3n(n.J,"wI",""===o?1c:{fn:o});1p;1i"sX":1i"t0":1o.3n(n.J,"vY",{t3:r});1p;1i"6I":n.kU();1p;1i"4K":n.kN();1p;1i"4r":n.iI();1p;1i"5X":n.pk();1p;1i"c6":1o.3n(n.J,"c6");1p;1i"c5":1o.3n(n.J,"c5");1p;1i"eG":l&&(n.H7.D=l,n.jM({4w:l.J}));1p;1i"f3":l&&(n.H7.D=l,n.kS({4w:l.J}));1p;1i"gd":l&&(n.H7.D=l,n.kC({4w:l.J}));1p;1i"ur":n.pz();1p;2q:1c!==ZC.1d(G=s.pV[r])&&(""!==G.fn?n.ZO({4w:l?l.J:1c,qk:r,"1n":G.fn}):""!==G.3R&&l&&l.UC(e,G.3R,G.2X))}},s.pX=1n(){1g.1I.qj=LH.A0,1g.1I.1r=LH.C1,1g.1I.lB=1g.1I.lm=LH.AP+"px 2V "+LH.BU},s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),1o.ip(e,e.n2(),1n(){e.o=ZC.AO.C8("fJ",e,e.FO(),e.o),1o.YE[e.J]&&e.OQ(1n(){e.1q(),e.1t()})})}aW(){1a e=1g;!1n(){1n t(){""!==e.QL||1c!==e.MO?e.ls():e.2x()}e.US||e.nN(),e.MM(1c,!0),1o.oo>0?ZC.e3(t):t()}()}W3(e){1a t=1g;1c===ZC.1d(t.ix)&&(t.ix=(1m a1).bI(),t.xj=2w.5Q(1n(){1c!==ZC.1d(t.ix)&&(t.ix=1c,1o.ZH(e))},185))}FO(){1a e,t=1g,i=0,a=0;1l i=1y t.SY[0]!==ZC.1b[31]?t.SY[0]-i:0,a=1y t.SY[1]!==ZC.1b[31]?t.SY[1]-a:0,e=t.LO?t.LO:"8Y",{id:t.J,1s:t.I,1M:t.F,bb:t.AB,x:i,y:a,9D:t.SY[2],bx:e}}xb(e){e=e||{},1c!==ZC.1d(e.pT)&&(1g.QP[e.pT]=e.1V||"[]",1g.UU++)}jM(){}kS(){}kC(){}PI(){}pC(e,t){1a i=1g;if(e=e||{},1c!==ZC.1d(e[ZC.1b[3]])){1a a=i.OH(e[ZC.1b[3]]);1c!==a&&a.3j()}1u i.3j(1c,1c,t);K8&&K8.5O&&(K8.5O[i.J]=1c)}pH(e){e=e||ZC.HE["tm-b3"];1a t=1g;if(1c===ZC.AK(t.J+"-9b")){ZC.P.HZ({2p:"zc-3l zc-1I zc-9b",id:t.J+"-9b",p:ZC.AK(t.J+"-1v"),wh:t.I+"/"+t.F,3o:.75}),ZC.P.HZ({2p:"zc-9b-w1",id:t.J+"-9b-t",p:ZC.AK(t.J+"-9b"),4g:e});1a i=ZC.A3("#"+t.J+"-9b-t");i.2O("1v",t.F/2-i.1M()/2+"px").2O("1K",t.I/2-i.1s()/2+"px")}}kZ(){ZC.P.ER(1g.J+"-9b")}pz(){1a e=1g;ZC.AO.C8("186",e,e.FO()),ZC.P.HZ({2p:"zc-3l",id:e.J+"-6t-4O",p:ZC.AK(e.J+"-1v"),wh:e.I+"/"+e.F,1U:"#8c",3o:.75});1a t=ZC.CQ(187,e.I),i=ZC.CQ(vQ,e.F),a=ZC.BM(0,(e.I-t)/2),n=ZC.BM(0,(e.F-i)/2),l=ZC.P.HZ({2p:"zc-6t zc-1I",id:e.J+"-6t",p:ZC.AK(e.J+"-1v"),tl:n+"/"+a,wh:t-(ZC.96?0:10)+"/"+(i-(ZC.96?0:10))}),r="";""!==e.SI&&(r="qc 188 1j<br />"+e.SI),l.4q=\'<3B 1O="zc-6t-1"><a 7B="7h://8z.1o.bZ" 2X="om">1o.bZ</a></3B><3B 1O="zc-6t-2">&1S;17U-\'+(1m a1).vS()+\'</3B><3B 1O="zc-6t-3"><3B id="\'+e.J+\'-6t-7m">\'+ZC.HE["6t-7m"]+\'</3B></3B><3B 1O="zc-6t-4" 1I="3v:\'+(i-vQ)+\'px 88 88 88;"><3B>&8u;<br />189 \'+ZC.fF+" ["+e.AB+"]</3B>"+r+"</3B>",ZC.A3("#"+e.J+"-6t-7m").3r("3H",1n(){ZC.AO.C8("18b",e,e.FO()),ZC.P.ER([e.J+"-6t",e.J+"-6t-4O"])})}NC(e,t){1a i=1g;if(ZC.AO.oM("4L",i))ZC.AO.C8("4L",i,{id:i.J,4L:e,18c:t,4G:i.E.4G||i.E.vM});1u{1a a="";a+="4h"==1y e?e.8C+":"+e.b8+"\\n\\n":e+"\\n\\n",1c!==ZC.1d(t)&&(a+="18d:"+t+"\\n\\n"),a+="3h 1V:\\n\\n"+i.E.4G+"\\n\\n",i.Y4(),1c===ZC.AK(i.J+"-1v")&&i.pl(),ZC.P.HZ({2p:"zc-3l zc-4L zc-1I",id:i.J+"-4L",p:ZC.AK(i.J+"-1v"),wh:i.I-(ZC.96?0:10)+"/"+(i.F-(ZC.96?0:10))}).4q=\'<3B 1O="zc-4I-5B-1H zc-4I-s0">\'+ZC.HE["4L-5K"]+\'</3B><3B 1O="zc-4I-5B-1H zc-4I-s1">\'+ZC.HE["4L-b8"]+\'</3B><3B 1O="z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9.1f;n++)if(l.AI[i].AZ.A9[n].IR){o=!0;1p}1a s;1j(s=l.AI[r].AJ["3d"]||o?l.o[ZC.1b[16]][i]:l.AI[i].o,n=0;n<10;n++){1a A=ZC.1b[51]+(0===n?"":"-"+n);1c===ZC.1d(s[A])&&1c===ZC.1d(s[ZC.EA(A)])&&1c!==l.AI[i].BK(A)?s[A]={fj:t}:(1c!==ZC.1d(s[A])&&(s[A].fj=t),1c!==ZC.1d(s[ZC.EA(A)])&&(s[ZC.EA(A)].fj=t))}}4v l.E["2Y"+r+".3G"],l.AI[r].AJ["3d"]||o?l.K2():l.AI[r].K2(!0,!0)}VX(e,t){1a i=1g;if(i.D5){1j(1a a=0,n=i.AI.1f;a<n;a++)e===i.AI[a].J&&(i.AI[a].fC=t,i.AI[a].E["2i-on"]=t);if(t){1a l=ZC.A3("#"+i.J+"-1v"),r={ei:ZC.DS[0]-l.2c().1K,h1:ZC.DS[1]-l.2c().1v,1J:ZC.1b[48],2X:{id:i.J+"-5W"}};i.D5.QH(r)}1u K8.h0(i.J)}}pa(e){1j(1a t=1g,i=["1w","1N","2U","5t","6c","3O","9u"],a=0,n=t.AI.1f;a<n;a++)if(e===t.AI[a].J){1a l=t.o[ZC.1b[16]][a];if("9u"===l.1J)1j(1a r=0,o=l[ZC.1b[11]].1f;r<o;r++){1a s=l[ZC.1b[11]][r];s.1J=s.1J||"1w","3d"===t.XJ?s.1J=s.1J.1F("3d",""):-1!==ZC.AU(i,s.1J)&&(s.1J=s.1J+"3d")}1u"3d"===t.XJ?l.1J=l.1J.1F("3d",""):-1!==ZC.AU(i,l.1J)&&(l.1J=l.1J+"3d")}t.XJ="3d"===t.XJ?"2d":"3d",t.E.4G=ZC.GP(3h.5g(t.o)),t.K2()}ph(e){1j(1a t,i=1g,a=0;a<i.AI.1f;a++)4v i.E["g"+a+"-1Y-dc"];if(e=e||{},ZC.AO.C8("f5",i,{id:i.J,4w:e[ZC.1b[3]]}),1c!==ZC.1d(t=e[ZC.1b[3]])){1a n=i.C5(t);1c!==n&&(i.MM(n),i.2x(n.J))}1u i.QS=[],i.NY=-1,i.MM(),i.po(),i.2x()}wu(e){1a t,i=1g;if(e=e||{},1c!==ZC.1d(t=e[ZC.1b[3]])){1a a=i.C5(t);1c!==a&&1c!==ZC.1d(e.i5)&&(i.MM(a),i.2x(t,e.i5))}1u 1c!==ZC.1d(t=e.i5)&&(i.QK=t,i.MM(),i.2x())}kU(){}NE(){}TK(){}wq(e){ZC.2E(1g.FO(),e),ZC.AO.C8("18g",1g,e)}ZO(O){1a s=1g;4J{1a EB=ZC.AO.oN(O["1n"]);O["1n"]=EB[0],O.8P=EB[1],ZC.2E(s.FO(),O),7l(O["1n"]).4x(s,O)}4M(J7){1l s.NC(J7,"oS 1V 6A"),!1}}C5(e){1a t=1g;1l 1c!==ZC.1d(e)?t.OH(e):t.AI.1f>0?t.AI[0]:1c}3r(e,t){1o.3r(1g.J,e,t)}3k(e,t){1o.3k(1g.J,e,t)}3n(e,t){1l 1o.3n(1g.J,e,t)}gc(){1j(1a e=0,t=1g.AI.1f;e<t;e++)1g.AI[e].gc()}}RU.5j.wy=1n(e){1a t,i,a,n,l,r=1g;if((e=e||{}).93="q3",t=1c!==ZC.1d(e[ZC.1b[3]])?r.OH(e[ZC.1b[3]]):r.AI[0]){1j(i=0,a=t.BT("k").1f;i<a;i++){1a o=t.BT("k")[i];if(n=1===o.L?"":"-"+o.L,o.H4&&(1c===ZC.1d(e["7E"+n])||e["7E"+n])){e["7E"+n]=!0,l=o.I/ZC.CQ(o.I,e.oU||50);1a s,A=o.V,C=o.A1;e["x-"]?(s=ZC.CQ(o.V-o.E3,ZC.1k((o.A1-o.V)/l)),A=o.V-s,C=o.A1-s):e["x+"]&&(s=ZC.CQ(o.ED-o.A1,ZC.1k((o.A1-o.V)/l)),A=o.V+s,C=o.A1+s),e["4s"+n]=A,e["4p"+n]=C}}1j(i=0,a=t.BT("v").1f;i<a;i++){1a Z=t.BT("v")[i];if(n=1===Z.L?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O.C8("18h",i.A,e)}}},1o.ps=1n(e,t,i){1a a,n,l,r,o,s,A,C,Z;2g.cP("zc-5X")&&(e="zc-5X"),"3e"==1y(i=i||{})&&(i=3h.1q(i));1a c=1o.6Z(e);if(1c!==ZC.1d(i[ZC.1b[53]])&&(c.E[ZC.1b[53]]=ZC.2s(i[ZC.1b[53]])),c)1P(t){1i"18i":if(r={},l=c.C5(i[ZC.1b[3]]))1j(a=0,n=l.BL.1f;a<n;a++){1a p=l.BL[a];"k"===p.AF?r[p.BC]={4s:p.V,4p:p.A1,w8:p.Y[p.V],wt:p.Y[p.A1]}:r[p.BC]={5r:p.B3,5q:p.BP,w8:p.Y[p.V],wt:p.Y[p.A1]}}1l r;1i"q3":c.wy(i);1p;1i"eG":c.jM(i);1p;1i"f3":c.kS(i);1p;1i"nU":if(l=c.C5(i[ZC.1b[3]]),1c!==ZC.1d(i.kL)&&i.kL)1j(a=0,n=l.BT("k").1f;a<n;a++)i["4s"+(A=1===(o=l.BT("k")[a]).L?"":"-"+o.L)]=i.4s||1c,i["4p"+A]=i.4p||1c,i["94"+A]=i.94||1c,i["8Z"+A]=i.8Z||1c;1j(a=0,n=l.BT("k").1f;a<n;a++)1c===i["4s"+(A=1===(o=l.BT("k")[a]).L?"":"-"+o.L)]&&1c===ZC.1d(i["4p"+A])&&1c===ZC.1d(i["94"+A])&&1c===ZC.1d(i["8Z"+A])||(i["7E"+A]=!0),"3P"===o.DL&&(1c!==ZC.1d(i["4s"+A])&&(i["4s"+A]=ZC.JN(i["4s"+A],o.H8)),1c!==ZC.1d(i["4p"+A])&&(i["4p"+A]=ZC.JN(i["4p"+A],o.H8)));if(1c!==ZC.1d(i.kF)&&i.kF)1j(a=0,n=l.BT("v").1f;a<n;a++)i["5r"+(A=1===(s=l.BT("v")[a]).L?"":"-"+s.L)]=i.5r||1c,i["5q"+A]=i.5q||1c;1j(a=0,n=l.BT("v").1f;a<n;a++)A=1===(s=l.BT("v")[a]).L?"":"-"+s.L,1c===ZC.1d(i["5r"+A])&&1c===ZC.1d(i["5q"+A])||(i["7N"+A]=!0),"3P"===s.DL&&(1c!==ZC.1d(i["5r"+A])&&(i["5r"+A]=ZC.JN(i["5r"+A],s.H8)),1c!==ZC.1d(i["5q"+A])&&(i["5q"+A]=ZC.JN(i["5q"+A],s.H8)));c.PI(i);1p;1i"18j":if(l=c.C5(i[ZC.1b[3]]),1c!==ZC.1d(i.kL)&&i.kL)1j(a=0,n=l.BT("k").1f;a<n;a++)i["4s"+(A=1===(o=l.BT("k")[a]).L?"":"-"+o.L)]=i.4s||1c,i["4p"+A]=i.4p||1c;1j(a=0,n=l.BT("k").1f;a<n;a++)A=1===(o=l.BT("k")[a]).L?"":"-"+o.L,1c===ZC.1d(i["4s"+A])&&1c===ZC.1d(i["4p"+A])||(l.BI&&l.BI.LQ?(i.i6=!0,i["94"+A+"-ag"]=i["4s"+A],i["4s"+A]=ZC.qf(l.BI.NQ[o.BC][ZC.1b[5]],i["4s"+A])):-1!==(C=ZC.AU(o.Y,i["4s"+A]))&&(i["4s"+A]=C),l.BI&&l.BI.LQ?(i.i6=!0,i["8Z"+A+"-ag"]=i["4p"+A],i["4p"+A]=ZC.qf(l.BI.NQ[o.BC][ZC.1b[5]],i["4p"+A])):-1!==(Z=ZC.AU(o.Y,i["4p"+A]))&&(i["4p"+A]=Z),i["7E"+A]=!0);if(1c!==ZC.1d(i.kF)&&i.kF)1j(a=0,n=l.BT("v").1f;a<n;a++)i["5r"+(A=1===(s=l.BT("v")[a]).L?"":"-"+s.L)]=i.5r||1c,i["5q"+A]=i.5q||1c;1j(a=0,n=l.BT("v").1f;a<n;a++)A=1===(s=l.BT("v")[a]).L?"":"-"+s.L,1c===ZC.1d(i["5r"+A])&&1c===ZC.1d(i["5q"+A])||(i["7N"+A]=!0);c.PI(i);1p;1i"gd":c.kC(i)}1l 1c},ZC.vW={},ZC.AO.kX=1n(e,t,i,a){"sO"===(a=a||"9K")&&(a="dX");1a n=2g.4P("3a");n.1s=t,n.1M=i,n.1I.1s=t+"px",n.1I.1M=i+"px";1a l,r=n.9d("2d");e 3E 3M||(e=[e]);1j(1a o=0,s=e.1f;o<s;o++)if(-1===e[o].7U.1L("zc-no-6I")){1a A=!1;4J{e[o].jT("4d/"+a)}4M(Z){A=!0}if(!A)if(l=e[o].bJ("1V-3t")){1a C=l.2n(",");r.d3(e[o],ZC.BM(0,C[0]),ZC.BM(0,C[1]),ZC.CQ(C[2],e[o].1s),ZC.CQ(C[3],e[o].1M),ZC.BM(0,C[0]),ZC.BM(0,C[1]),ZC.CQ(C[2],e[o].1s),ZC.CQ(C[3],e[o].1M))}1u r.d3(e[o],0,0,e[o].1s,e[o].1M,0,0,t,i)}1l n.jT("4d/"+a)},ZC.AO.pD=1n(e,t,i,a,n){1c===ZC.1d(n)&&(n=!1);1a l=ZC.AO.kX(e,t,i,a);if(n){1a r=2g.4P("5W");1l r.5a=l,r}l=l.1F("4d/"+a,"4d/nz-ky"),2g.89.7B=l},RU.5j.kU=1n(){1a e=1g,t=[];if(!e.l6){e.l6=!0;1a i=2g.3s.6Y,a=ZC.A3(2g.3s).2O(ZC.1b[0]),n=ZC.A3(2g.3s).2O("1U-4d");ZC.A3(2g.3s).2O(ZC.1b[0],"#2S").2O("1U-4d","2b");1j(1a l=0,r=i.1f;l<r;l++)1===i[l].eA&&(t[l]=i[l].1I.3L,i[l].1I.3L="2b");2g.3s.2Z(ZC.AK(e.J+"-eB")),2w.5Q(1n(){2w.6I(),2w.5Q(1n(){ZC.A3(2g.3s).2O(ZC.1b[0],a).2O("1U-4d",n),ZC.AK(e.J+"-eB")&&ZC.AK(e.J).2Z(ZC.AK(e.J+"-eB"));1j(1a l=0,r=i.1f;l<r;l++)1===i[l].eA&&(i[l].1I.3L=t[l]);e.l6=!1},5x)},50)}},RU.5j.NE=1n(e,t,i,a){1a n=1g;if(t=t||{},1y i===ZC.1b[31]&&(i=!1),!ZC.AK(n.J+"-cj")){e=e||"9K";1a l=t.g4,r=t.fn||"";ZC.P.II(ZC.AK(n.J+"-2i-c"),n.AB,0,0,n.I,n.F),ZC.A3(".zc-2i-1H").3p();1a o,s,A=("3a"===n.AB||1o.hZ||1o.3J.iz)&&"g3"!==e&&"2F"!==e;if(ZC.2L||!A||i||l||(o=ZC.P.HZ({2p:"zc-3l zc-cj zc-1I",id:n.J+"-cj",8l:5,p:ZC.AK(n.J+"-1v"),wh:n.I+"/"+n.F}),s=ZC.P.HZ({id:n.J+"-cj-7m",p:o,8l:10,tl:"5/"+(n.I-15),4g:ZC.HE["cj-7m"]}),ZC.A3(s).2O("4V","8q").2O("1K",n.I-15-ZC.A3(s).1s()+"px"),ZC.A3(s).3r("3H",1n(){ZC.A3(o).3p()})),ZC.2L&&(l=!0),!1o.3J.iz||l||"2F"!==n.AB||"9K"!==e&&"dX"!==e){1a C;if("3a"===n.AB&&"g3"!==e&&"2F"!==e){1a Z,c,p=2g.4P("3a");1j(p.1s=n.I,p.1M=n.F,Z=0,c=n.AI.1f;Z<c;Z++)n.AI[Z].BG&&n.AI[Z].BG.E9(p);1a u=[];ZC.A3("#"+n.J+" 3a").5d(1n(){-1===ZC.AU([n.J+"-2i-c",n.J+"-8a-c"],1g.id)&&u.1h(1g)}),u.1h(p),u.1h(n.nv());1a h=ZC.AO.pD(u,n.I,n.F,e,!0);h.id=n.J+"-6I-"+e,o.2Z(h)}1u if(i||n.pH(ZC.HE["8m-b3"]),"3K"===n.AB||"3a"===n.AB&&("g3"===e||"2F"===e)){1a 1b=2g.4P("3B"),d="zc-8m-2F-"+n.J;1b.id=d,1b.1I.3L="2b",2g.3s.2Z(1b),1o.aW({id:d,bb:"!2F",xn:!0,1s:n.I,1M:n.F,1V:n.E.4G,cr:n.MO,bx:n.LO,ea:!0,hJ:{2x:1n(){2w.5Q(1n(){1a e=1o.6Z(d);if(e.E["4N-2J"])1a t=2w.eN(1n(){"9w"===e.E["4N-2J"]&&(2w.9S(t),e.bX(!0),C=ZC.AK(d+"-1v").4q,e.bX(!1),1o.3n(d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.A3("#"+n.J+"-8m").3p()},Ac),2w.5Q(1n(){n.kZ()},5x)}}},RU.5j.TK=1n(e){1a t=1g;e=e||"9K";1a i,a,n=[],l=2g.4P("3a");1j(l.1s=t.I,l.1M=t.F,i=0,a=t.AI.1f;i<a;i++)t.AI[i].BG&&t.AI[i].BG.E9(l);1l ZC.A3("#"+t.J+" 3a").5d(1n(){-1===ZC.AU([t.J+"-2i-c",t.J+"-2H-c"],1g.id)&&n.1h(1g)}),n.1h(l),n.1h(t.nv()),ZC.AO.kX(n,t.I,t.F,e)},ZC.AO.sU=1n(e,t,i){if(!ZC.cA){i=i||"g8/nz-ky";1a a=2g.4P("a");8V.wY?8V.wY(1m k6([e],{1J:i}),t):i3&&"g4"in a?(a.7B=i3.t2(1m k6([e],{1J:i})),a.4m("g4",t),2g.3s.2Z(a),a.3H(),2g.3s.b2(a)):89.7B="1V:g8/nz-ky,"+eQ(e)}},ZC.AO.hK=1n(e,t){1a i,a,n,l,r,o,s,A,C,Z,c,p,u,h=[],1b="",d=[];1j("80"===(t=t||"6L")&&h.1h(\'<4g e4:o="nC:ni-nF-bZ:nx:nx" e4:x="nC:ni-nF-bZ:nx:xq" e4="7h://8z.w3.dS/TR/18m-18n">\',"<fb>","\\18o!--[if 18a nQ 9]><jO><x:vj><x:vi><x:vg><x:u2>hO</x:u2><x:vf><x:17S/></x:vf></x:vg></x:vi></x:vj></jO><![18q]--\\17D",\'<1I>td{1G:2b;2t-9B:17R,nX-nO} .92{nQ-92-5I:"0.6X";} .1E{nQ-92-5I:"@";}</1I>\',"<uY 8C=17p 17r=17s.17t>","<uY tB=u4-8>","</fb>","<3s>"),i=0,a=e.AI.1f;i<a;i++){1a f=e.AI[i],g=f.AZ.A9,B={},v=[],b=f.BT("k")[0];"4g"!==t&&"80"!==t&&"dP"!==t||(h.1h("<6q>"),f.IZ&&""!==f.IZ.AN&&(d.1h([f.IZ.AN]),h.1h("<tJ>"+f.IZ.AN+"</tJ>")),h.1h("<uC>"),h.1h("<tr>")),c=[],u=[];1a m="17u",E=!1;1j(b&&(b.FB&&"5s"===b.FB.o.1J&&(m="a1",E=!0),b.M&&b.M.AN&&(m=b.M.AN.1F(/\\"|\\\'/g,""))),"6L"===t?c.1h(\'"\'+m+\'"\'):"dP"===t?u.1h(m):"4g"!==t&&"80"!==t||c.1h("<th>"+m+"</th>"),n=0,l=g.1f;n<l;n++)(1c===ZC.1d(g[n].o["8m"])||ZC.2s(g[n].o["8m"]))&&(p=(p=1c!==ZC.1d(g[n].AN)?g[n].AN+"":"ko "+n).1F(/\\"|\\\'/g,""),"6L"===t?c.1h(\'"\'+p+\'"\'):"dP"===t?u.1h(p):"4g"!==t&&"80"!==t||c.1h("<th"+("80"===t?\' uM="vP" 1O="1E"\':"")+">"+p+"</th>"),v.1h(""));if("6L"===t?h.1h(c.2M(",")):"dP"===t?d.1h(u):"4g"!==t&&"80"!==t||h.1h(c.2M("")),"4g"!==t&&"80"!==t||(h.1h("</tr>"),h.1h("</uC>"),h.1h("<vA>")),b){1j(s=0,A=b.Y.1f;s<A;s++)B[s+""]={kg:!1,cM:[].4B(v)};1j(n=0,l=g.1f;n<l;n++)if(1c===ZC.1d(g[n].o["8m"])||ZC.2s(g[n].o["8m"]))1j(r=0,o=g[n].R.1f;r<o;r++){1a D=g[n].R[r];D&&(B[s=D.BW?""+D.BW:""+r]=B[s]||{kg:!0,cM:[].4B(v)},B[s].cM[n]=D.AE,B[s].kg=!0)}1a J=[];1j(s in B)B[s].kg&&J.1h([s,B[s].cM]);1j(J.4i(1n(e,t){1l e[0]-t[0]}),C=0,Z=J.1f;C<Z;C++)"4g"!==t&&"80"!==t||h.1h("<tr>"),"3O"!==f.AF&&"7e"!==f.AF&&"8S"!==f.AF||b.Y[J[C][0]]&&(J[C][0]=b.Y[J[C][0]]),b.BV[J[C][0]]&&(J[C][0]=b.BV[J[C][0]]),b.Y[J[C][0]]&&(J[C][0]=b.Y[J[C][0]]),E&&(J[C][0]=ZC.AO.YT(J[C][0],"%Y-%mm-%dd %h:%i:%s"),"6L"===t&&(J[C][0]=\'"\'+J[C][0]+\'"\')),"6L"===t?h.1h([].4B(J[C][0]).4B(J[C][1]).2M(",")):"dP"===t?d.1h([].4B(J[C][0]).4B(J[C][1])):"4g"!==t&&"80"!==t||h.1h("<td"+("80"===t?\' uM="5B"\':"")+">"+[].4B(J[C][0]).4B(J[C][1]).2M("</td><td>")+"</td>"),"4g"!==t&&"80"!==t||h.1h("</tr>")}"4g"!==t&&"80"!==t||(h.1h("</vA>"),h.1h("</6q>")),a>1&&i<a-1&&("6L"===t?h.1h("","",""):"4g"!==t&&"80"!==t||h.1h("<p>&8u;</p>"))}1l"80"===t&&h.1h("</3s>","</4g>"),"dP"===t?d:("6L"===t?1b=h.2M("\\n"):"4g"!==t&&"80"!==t||(1b=h.2M("")),1b)},1o.t1=1n(e,t,i){1a a,n,l,r,o,s="",A="";1n C(e){ZC.A3.a8({1J:"iG",3R:n,1V:e,aF:1n(e,t,i){l&&l(e,t,i)}})}2g.cP("zc-5X")&&(e="zc-5X"),"3e"==1y(i=i||{})&&(i=3h.1q(i));1a Z=1o.6Z(e);if(Z)1P(t){1i"vy":if(r="9K",1c!==ZC.1d(a=i.5I)&&(r=a),1c!==ZC.1d(a=i.u1)&&(r=a),"sO"===r&&(r="dX"),1o.3J.iz&&"2F"===Z.AB&&("9K"===r||"dX"===r)){Z.bX(!0);1a c=ZC.AK(Z.J+"-2F").6o.4q,p=c.1L(">"),u=c.1L("</2F>");c=(c=\'<2F e4:kn="7h://8z.w3.dS/sQ/kn" e4="7h://8z.w3.dS/v9/2F" a4="1.1" 1s="\'+Z.I+\'" 1M="\'+Z.F+\'">[hX]\'+c.2v(p+1,u+6)).1F(/<ks(.+?)<\\/ks>/g,"");1a h=1n(){1a e,t=2w.i3||2w.17A||2w;e=t.t2&&2w.k6?t.t2(1m 2w.k6([c],{1J:"4d/2F+jO;tB-tc-16"})):"1V:4d/2F+jO;tB=u4-8,"+eQ(c),Z.bX(!1);1a a=1m 2w.d2;a.u0="xD",a.5a=e,a.hL=1n(){1a t=2g.4P("3a"),n=t.9d("2d");if(t.1s=a.1s,t.1M=a.1M,n.d3(a,0,0,t.1s,t.1M),i.5F&&"1n"==1y i.5F)4J{i.5F(t.jT("4d/"+r))}4M(l){i.5F(e)}}},1b=0,d=1n(){1a e=1m hP;e.bD("sV",Z.hV[1b]),e.uw="1E",e.t4=1n(e){1a t=e.2X.ub,i=t.m0(/17B?:\\/\\/[^ \\)]+/g),a=0;i.17o(1n(e){1a n=1m hP;n.bD("sV",e),n.uw="17C",n.t4=1n(n){1a l=1m 17E;l.t4=1n(n){t=t.1F(1m 5y(e),n.2X.17F),++a===i.1f&&(c=c.1F("[hX]","[hX]<1I><![17G["+t+"]]></1I>"),++1b===Z.hV.1f?(c=c.1F("[hX]",""),h()):d())},l.17H(n.2X.ub)},n.8f()})},e.8f()};Z.hV.1f?d():(c=c.1F("[hX]",""),h())}if("3a"!==Z.AB&&!1o.hZ)1l-1;if("3a"===Z.AB){if(!i.5F||"1n"!=1y i.5F)1l Z.TK(r);4J{i.5F(Z.TK(r))}4M(B){i.5F(-1)}}1u Z.NE(r,{},!0,i.5F);1p;1i"17I":1i"17J":if(!i.g4&&"3a"!==Z.AB&&!1o.hZ)1l-1;if(r="9K",o={},1c!==ZC.1d(a=i.uq)&&(o=a),1c!==ZC.1d(a=i.cZ)&&(o.cZ=a),1c!==ZC.1d(a=i.3f)&&(o.3f=a),1c!==ZC.1d(a=i.5I)&&(r=a),1c!==ZC.1d(a=i.u1)&&(r=a),1c!==ZC.1d(a=i.k5)&&(s=a),n=Z.E.tp||"",1c!==ZC.1d(a=i.3R)&&(n=a),l=1c,1c!==ZC.1d(a=i.5F)&&(l=a),"sO"===r&&(r="dX"),i.g4&&("3a"!==Z.AB||"g3"===r))1l o.g4=!0,""!==s&&(o.fn=s),8j Z.NE(r,o);if(""!==n){if("3a"===Z.AB)1l C(Z.TK(r));Z.NE(r,o,!0,1n(e){1l C(e)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e.5A(o,1),i+="\\n"+1m 3M(l+1).2M(" "),l++),r=t;1p;1i"]":n&&(n=!1),"}"===r&&(l--,i+="\\n"+1m 3M(l).2M(" ")),i+=e.5A(o,1),r=t;1p;1i" ":a&&(i+=e.5A(o,1),r=t);1p;1i",":i+=e.5A(o,1),a||n||(i+="\\n"+1m 3M(l).2M(" ")),r=t;1p;2q:i+=e.5A(o,1),r=t}1l i},RU.5j.kN=1n(){1a e=1g;ZC.AO.C8("18p",e,e.FO());1a t=ZC.P.HZ({2p:"zc-3l zc-4K zc-1I",id:e.J+"-4K",p:ZC.AK(e.J+"-1v"),wh:e.I-(ZC.96?0:10)+"/"+(e.F-(ZC.96?0:10))});t.1I.a2=99,t.4q=ZC.j2(\'<3B 1O="zc-4I-5B-1H zc-4I-s1">&8u;<a 7B="7u:8j(0)" id="\'+e.J+\'-4K-fV" 1O="zc-cS-6C">\'+ZC.HE["4K-fV"]+\'</a>&8u;<a 7B="7u:8j(0)" id="\'+e.J+\'-4K-fU" 1O="zc-cS-ez">\'+ZC.HE["4K-fU"]+\'</a></3B><3B 1O="zc-4I-5B-ao"><bP id="\'+e.J+\'-4K-4G" 1I="1s:\'+(e.I-35)+"px;1M:"+(e.F-95)+\'px;"></bP></3B><3B 1O="zc-4I-5B-ao zc-4I-5B-7Z" id="\'+e.J+\'-4K-wB"><an 1J="7K" 1T="\'+ZC.HE["4K-7m"]+\'" id="\'+e.J+\'-4K-7m" /></3B>\'),1o.tD&&(ZC.AK(e.J+"-4K-wB").4q+=\'<an 1J="7K" 1T="\'+ZC.HE["4K-9A"]+\'" id="\'+e.J+\'-4K-9A" />\'),ZC.A3("#"+e.J+"-4K-4G").8t(ZC.AO.XA(e.E.7g)),ZC.A3("#"+e.J+"-4K-fU").3r("3H",1n(){ZC.AK(e.J+"-4K-fU").7U="zc-cS-6C",ZC.AK(e.J+"-4K-fV").7U="zc-cS-ez",ZC.A3("#"+e.J+"-4K-4G").8t(ZC.AO.XA(e.E.4G))}),ZC.A3("#"+e.J+"-4K-fV").3r("3H",1n(){ZC.AK(e.J+"-4K-fU").7U="zc-cS-ez",ZC.AK(e.J+"-4K-fV").7U="zc-cS-6C",ZC.A3("#"+e.J+"-4K-4G").8t(ZC.AO.XA(e.E.7g))}),ZC.A3("#"+e.J+"-4K-7m").3r("3H",1n(){ZC.AO.C8("wm",e,e.FO()),ZC.P.ER(e.J+"-4K")}),1o.tD&&ZC.A3("#"+e.J+"-4K-9A").3r("3H",1n(){ZC.AO.C8("wm",e,e.FO());1a t=ZC.A3("#"+e.J+"-4K-4G").8t();ZC.P.ER(e.J+"-4K"),1o.3n(e.J,"aI",{1V:t})})},RU.5j.iI=1n(){1a e=1g;if(e.I<eX||e.F<eX)2w.bD("7h://8z.1o.bZ/vV/","","");1u{1a t=ZC.P.HZ({2p:"zc-3l zc-4r zc-1I",id:e.J+"-4r",p:ZC.AK(e.J+"-1v"),wh:e.I-(ZC.96?0:10)+"/"+(e.F-(ZC.96?0:10))}),i="";i+=\'<3B 1O="zc-4I-5B-1H zc-4I-s0">\'+ZC.HE["4r-5K"]+\'</3B><3B 1O="zc-4I-5B-1H"><an 1J="wd" id="\'+e.J+\'-qV" fk="fk" /><1H 1j="\'+e.J+\'-qV">\'+ZC.HE["4r-wg"]+"</1H>",ZC.3a&&(i+=\'&8u;&8u;&8u;&8u;&8u;<an 1J="wd" id="\'+e.J+\'-r9" fk="fk" /><1H 1j="\'+e.J+\'-r9">\'+ZC.HE["4r-ux"]+"</1H>"),i+=\'</3B><3B 1O="zc-4I-5B-1H zc-4I-s1">\'+ZC.HE["4r-w9"]+\'</3B><3B 1O="zc-4I-5B-ao"><bP id="\'+e.J+\'-4r-wz" 1I="1s:\'+(e.I-35)+"px;1M:"+((e.F-eX)/2-10)+\'px;"></bP></3B><3B 1O="zc-4I-5B-1H zc-4I-s1">\'+ZC.HE["4r-wc"]+\'</3B><3B 1O="zc-4I-5B-ao"><bP id="\'+e.J+\'-4r-4G" 1I="1s:\'+(e.I-35)+"px;1M:"+(e.F-18N)/2+\'px;"></bP></3B><3B 1O="zc-4I-5B-1H zc-4I-s1">\'+ZC.HE["4r-wi"]+(e.I>=18C?" <7D>("+ZC.HE["4r-wk"]+")</7D>":"")+\'</3B><3B 1O="zc-4I-5B-ao"><an 1J="1E" id="\'+e.J+\'-4r-r4" 1I="1s:\'+(e.I-35)+\'px;" /></3B><3B 1O="zc-4I-5B-ao zc-4I-5B-7Z"><an 1J="7K" 1T="\'+ZC.HE["4r-fP"]+\'" id="\'+e.J+\'-4r-fP" /><an 1J="7K" 1T="\'+ZC.HE["4r-iT"]+\'" id="\'+e.J+\'-4r-iT" /></3B>\',t.4q=ZC.j2(i),ZC.A3("#"+e.J+"-4r-4G").8t("18u\\n----------\\n"+ZC.AO.XA(e.E.4G)+"\\n\\18v\\n----------\\n"+ZC.AO.XA(e.E.7g)),ZC.A3("#"+e.J+"-4r-iT").3r("3H",1n(){ZC.P.ER(e.J+"-4r")}),ZC.A3("#"+e.J+"-4r-fP").3r("3H",1n(){1a t=ZC.A3("#"+e.J+"-4r-r4");if(/^((\\w+\\+*\\-*)+\\.?)+@((\\w+\\+*\\-*)+\\.?)*[\\w-]+\\.[a-z]{2,6}$/.5U(t.8t())){1a i="";ZC.3a&&(i=e.TK("9K"));1a a=("wv:"+e.E.4G+" ww:"+e.E.7g).1F(/\\r|\\n|\\t|(\\s{2,})/g,""),n="",l=[];ZC.A3("#"+e.J+"-r9").3Q("fk")&&l.1h("****18w:",i),ZC.A3("#"+e.J+"-qV").3Q("fk")&&l.1h("****3h:",a),l.1h("****18x:",ZC.A3("#"+e.J+"-4r-wz").8t(),"****18y:",t.8t(),"****fF:",ZC.fF,"****18M:",e.I,"****18z:",e.F,"****i3:",2w.89.7B,"****UA:",8V.c3,"****18s:",e.AB.5M(),"****18B:",vE.1s+"x"+vE.1M);1j(1a r=0;r<l.1f-1;r+=2)n+=l[r]+eQ(l[r+1]);n+="****18D";1a o=ZC.P.rq(ZC.AK(e.J+"-4r")),s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"-2H"),{1K:o+"px",1v:s+"px"});1p;1i"3a":1c!==ZC.1d(i.CD.x)&&(o=i.CD.x),1c!==ZC.1d(i.CD.y)&&(s=i.CD.y);1a u=i.A6.E["4g-4E"]?0:20;1P(i.A6.X4){1i"tl":1p;1i"tr":o-=i.A6.I;1p;1i"bl":s-=i.A6.F;1p;1i"br":o-=i.A6.I,s-=i.A6.F;1p;1i"c":o-=i.A6.I/2,s-=i.A6.F/2;1p;1i"t":o-=i.A6.I/2;1p;1i"r":o-=i.A6.I,s-=i.A6.F/2;1p;1i"b":o-=i.A6.I/2,s-=i.A6.F;1p;1i"l":s-=i.A6.F/2}ZC.P.PO(ZC.AK(a+"-2H-c"),{1K:o/n[0]-u+"px",1v:s/n[1]-u+"px"}),1c!==(t=ZC.AK(a+"-2H-1E"))&&(t.1I.3L="2b",ZC.P.PO(t,{1s:i.A6.I+"px",1M:i.A6.F+"px",1K:o/n[0]+"px",1v:s/n[1]+"px"}),t.1I.3L="8y")}}}hj(e){1g.4n(e)}f8(e,t){1a i,a,n,l,r,o,s,A=1g,C=A.H.J,Z=e.9D||e.2X.id,c=Z.1F(/--([a-zA-Z0-9]+)/,"").1F("-ba-1N","-1N").1F("-1N-2R","").1F("-2R","").1F("-1R-3z","").1F("-1R","").2n("-").9o(),p=Z.2n("--"),u=!1,h=!1,1b=!1;if("2r"===c[1]&&"1A"===c[3]&&"ch"===c[4]&&(u=!0),ZC.P.ER([C+"-2H-1E",C+"-2H",C+"-2H-1E-9c"]),u){if(!(l=A.H.OH(c[5])))1l;if(r=l.AZ.A9[c[2]],o=r.FP(c[0]),"xy"===l.AJ.3x&&o.RV(),!o)1l;ZC.A3("#"+C+"-2Y-"+c[5]+"-1A-"+c[2]+"-bg-2N-c").4n()}1u"1Y"===c[2]&&0===c[1].1L("1Q")&&(h=!0),0!==c[2].1L("1z")||0!==c[1].1L("1Q")&&0!==c[1].1L("1R")||(1b=!0),l=A.H.OH(c[3]);if(ZC.AK(C+"-2H")||(ZC.P.K1({id:C+"-2H",p:ZC.AK(C+"-3Y"),2p:"zc-3l zc-2H",wh:A.H.I+"/"+A.H.F,9L:"8R"},A.H.AB),ZC.P.HF({id:C+"-2H-c",p:ZC.AK(C+"-2H"),2p:"zc-3l",tl:"-4S/-4S",1s:140,1M:60},A.H.AB)),A.A6=1o.6e.a7("DM",A,C+"-2H-1E"),A.A6.OE="2H",A.A6.A=A.H,l&&l.A6&&A.A6.1S(l.A6),u)A.A6.1C(r.A6.o),l.D9["p"+r.L]&&l.D9["p"+r.L]["n"+o.L]&&A.A6.1C(r.A6.o[ZC.1b[73]]),2===p.1f&&A.A6.1C(r.nl(p[1]));1u{1a d=!1;if(h&&l.BG&&1c!==ZC.1d(l.BG.o.2H)&&(A.A6.o.1E="",A.A6.1C(l.BG.o.2H),d=!0),1b){A.A6.1C({"1U-1r":"#2S","1G-1s":1,"1G-1r":"#4S"});1a f=l.BK(c[2].1F(/\\1b/g,"-"));if(f&&1c!==ZC.1d(f.o.2H)&&(A.A6.o.1E="",A.A6.1C(f.o.2H),d=!0),0===c[1].1L("7y"))f&&(-1!==c[1].1L("xA")&&f.o.1H&&f.o.1H.2H?(A.A6.o.1E="",A.A6.1C(f.o.1H.2H),d=!0):f.o.1Q&&f.o.1Q.2H&&(A.A6.o.1E="",A.A6.1C(f.o.1Q.2H),d=!0));1u if(0===c[1].1L("aM")){1a g=ZC.1k(c[1].1F("aM",""));f.Q7[g]&&f.Q7[g].o.1H&&f.Q7[g].o.1H.2H&&(A.A6.o.1E="",A.A6.1C(f.Q7[g].o.1H.2H),d=!0)}}if("2T"===c[2])if(A.A6.1C({"1U-1r":"#2S","1G-1s":1,"1G-1r":"#4S"}),e.2X.bJ("1V-jI"))A.A6.1C({1E:e.2X.bJ("1V-2H-1E")}),d=!0;1u 1j(a=0,n=l.FC.1f;a<n;a++)if(1c!==ZC.1d(l.FC[a])){1a B=l.FC[a]3E R0?l.FC[a].BD:l.FC[a];l.J+"-2T-"+c[1]===l.FC[a].J&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A]=ZC.BM(C,Z),d=!0));1b||d?(1o.4F.9O=!0,e.D.A.PI(p)):1o.4F.9O=!0}1u(ZC.2l(e.I5-e.LK)>5||ZC.2l(e.I4-e.LJ)>5)&&(1o.4F.9O=!0);e.D=1c}}},ZC.2L&&"5f"!==1o.lN||(1o.3J.bC?ZC.A3(2g.3s).3r("6F 4H",e.R5):ZC.A3("#"+t+"-5W").3r("6F 4H",e.R5),ZC.A3(".zc-2r-1N").4c("6F 4H",e.R5))}}1O sM 2k CX{2G(e){1D(e);1a t=1g;t.IK=!0,t.sw=!1,t.D=e,t.H=e.A,t.JC=!1,t.hG=!1,t.H2=1c,t.B5=1c,t.Z=1c,t.JS=0,t.I6=0,t.PD=0,t.mk=0,t.LQ=!1,t.NQ=1c,t.lZ=!1,t.BV=1c,t.mo=!1}1q(){1a e,t=1g;t.J=t.D.J+"-2z",t.4y([["4c","sw","b"],["ag","LQ","b"],["2j-6T","PD","i"],["2j-6T-x","PD","i"],["2j-6T-y","PD","i"],["2h","AM","b"]]);1a i="("+t.D.AF+").2z",a=t.H.B8;1n n(e){1l[i+".3N",i+".3N-"+e,i+".3q",i+".3q-"+e]}t.B5=1m I1(t.D),t.B5.J=t.D.J+"-2z-15C",a.2x(t.B5.o,[i]),t.B5.1C(t.o),t.B5.1q(),t.o.1H&&(t.BV=[]),t.o.3q&&t.o.3q.1H&&(t.J5=1m DM(t.D),t.J5.1C(t.o.3q.1H),t.J5.1C({1E:" "}),t.J5.1q(),t.J5.AM&&(t.mo=!0)),t.OX=1m CX(t.D),a.2x(t.OX.o,[i+".4O"]),1c!==ZC.1d(e=t.o.4O)&&t.OX.1C(e),t.OX.1q(),t.UV=1m CX(t.D),a.2x(t.UV.o,[i+".6C"]),1c!==ZC.1d(e=t.o.6C)&&t.UV.1C(e),t.UV.1q(),t.IM=1m I1(t.B5),t.HB=1m I1(t.B5),t.J9=1m I1(t.B5),t.H0=1m I1(t.B5),a.2x(t.IM.o,n("1K")),a.2x(t.HB.o,n("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.iX,A=(r[1]-o.1v)/l[1]-e.B5.iY;e.H2===e.KJ?e.3S(s,e.I6,e.MT,e.IX):e.H2===e.JX?e.3S(e.JS,s,e.MT,e.IX):e.H2===e.L7?e.3S(e.JS,e.I6,A,e.IX):e.H2===e.JE?e.3S(e.JS,e.I6,e.MT,A):e.H2===e.KF&&e.3S(s-i,s-i+ZC.A3(e.KF).1s(),A-a,A-a+ZC.A3(e.KF).1M())}1l!1},e.WL=1n(){1l 1o.3n(e.H.J,"rI",{4E:""}),e.JC&&(ZC.A3(2g.3s).3k("7V 6f",e.VL),ZC.A3(2g.3s).3k("6k 5R",e.WL),e.JC=!1,e.D.OB=!1,e.hG&&e.3G(!1),e.hG=!1),!1},ZC.A3("."+e.D.J+"-2z-3N").3r("6F 4H",e.ZB),ZC.A3("."+e.D.J+"-2z-4O").3r("3H",e.rP),e.lZ=!0}}gc(){ZC.AO.gc(1g,["Z","C7","o","I3","JU","D","H","B5","UV","KJ","JX","L7","JE","KF","J9","HB","H0","IM","9G","OX","m3","XK","m4","WC"])}}1O gP 2k CX{2G(e,t){1D(e);1a i=1g;i.D=e,i.H=e.A,i.JC=!1,i.Z=1c,i.BJ=0,i.BB=0,i.hF="",i.cE="yx"===i.D.AJ.3x,i.AF=i.im=i.uH="1Z-"+(t||"x"),i.cE&&(i.AF+="i",i.im="1Z-xi"===i.AF?"1Z-y":"1Z-x")}1q(){1a e,t=1g;t.J=t.D.J+"-"+t.im,t.4y([["2c-x","BJ"],["2c-y","BB"]]);1a i="("+t.D.AF+").",a=t.H.B8;t.AY=1m I1(t.D),a.2x(t.AY.o,[i+"1Z.2U",i+t.AF+".2U"]),1c!==ZC.1d(e=t.o.2U)&&t.AY.1C(e),t.AY.1q(),t.AW=1m I1(t.D),a.2x(t.AW.o,[i+"1Z.3q",i+t.AF+".3q"]),1c!==ZC.1d(e=t.o.3q)&&t.AW.1C(e),t.AW.1q()}1t(){1a e=1g,t=e.D.BT("k")[0],i=e.D.BT("v")[0],a=e.D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,a=1g,n=!1,l=ZC.3m,r=a.LF;-1!==e&&(r=a.LF||a.A.AZ.A9[e].LF),a.o.1Q&&1c!==ZC.1d(t=a.o.1Q["6b-1Q"])&&(n=ZC.2s(t),1c===ZC.1d(a.o["6b-1Y"])&&1c===a.A.AZ.A9[e].o["6b-1Y"]&&(r=n)),(n||r)&&(n&&(a.E["6b-1Q"]=e),r&&(a.E["6b-1Y"]=ZC.1k(e)),i=a.s3(ZC.1k(e)),a.VF(),a.3j(!0,i),a.YZ=!0,a.1q(),a.lf(!0),a.1t(),ZC.3m=l)}s3(e){1a t,i,a=1g,n=!1;1l e>=0&&(e<a.D0.2j||e>=a.D0.1X)&&(n=!0,"1Z"===a.U1?(e%(i="1Z-y"===a.DB.AF?a.DB.GW:a.DB.KT)&&(e-=e%i),a.D0.2j=e,a.D0.1X=e+a.EG,a.D0.1X>a.B6.1f&&(a.D0.2j=a.B6.1f-a.EG,a.B6.1f%i&&(a.D0.2j=a.D0.2j+(i-a.B6.1f%i)),a.D0.1X=a.B6.1f)):"3f"===a.U1&&(t=1B.4b(e/a.EG),a.D0.2j=t*a.EG,a.D0.1X=a.D0.2j+a.EG,a.D0.3f=t+1)),n}1q(){1a e,t,i,a,n=1g;if(n.E["db-gb"]=!0,n.QE=0,n.LC=0,1c!==ZC.1d(e=n.A.A.E["2Y-"+n.A.J+"-1Y-6E"])&&(n.o.x=e.x-n.A.iX,n.o.y=e.y-n.A.iY),ZC.3m)n.FJ&&n.FJ.1q(),n.KL&&n.KL.1q();1u{a=n.A.H.B8;1a l="("+n.A.AF+")";1D.1q(),n.4y([["gz","M7","b"],["lF","V9","b"],["153","VH","b"],["5Y","TO","b"],["9L","U1"],["1X-2B","EG","i"],["6a","lY","i"],["152-3N","UW"],["6b-1A","X9","b"],["6b-1Y","LF","b"],["3u","rY"],["9l-3u","JW"]]),n.M7&&!n.V9&&(n.M7=!1),1o.3J.rZ&&(n.E["uD-3u-2K"]||(n.kP({3u:n.rY,"9l-3u":n.JW,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5,f.iX+f.I+5)&&(ZC.E0(d,f.iY-5,f.iY+f.F+5)||S&&W)||"yx"===C.AJ.3x&&"yx"===t.H.AI[u].AJ.3x&&(V||U)&&ZC.E0(d,f.iY-5,f.iY+f.F+5)&&(ZC.E0(1b,f.iX-5,f.iX+f.I+5)||S&&W))&&G.1h(t.H.AI[u])}}1u if(K8.5O)1j(1a j in K8.5O)if(K8.5O[j]&&K8.5O[j].6C){1a q=1o.6Z(j);H=q.FO(),ZC.AO.C8("um",q,H),K8.5O[j].6C=!1}if(0===G.1f&&(l={},r={},o={},t.SA&&(1c===ZC.1d(p.ei)&&c(),t.SA=!1),Z&&Z.A.A6&&A&&A.J!==Z.J&&Z.A.A6.5b()),G.1f>0){t.SA=!0;1j(1a $=!1,ee=0,te=G.1f;ee<te;ee++){1a ie=!1;if(1c===ZC.1d(l[ee])&&(l[ee]={}),1c===ZC.1d(r[ee])&&(r[ee]={}),1c===ZC.1d(o[ee])&&(o[ee]={}),(G[ee].CY||G[ee].KD)&&"9w"===G[ee].MF){1a ae,ne=[],le=[],re=[],oe=!1,se="",Ae=[],Ce=[],Ze=[],ce=[],pe={},ue={},he=[];f=G[ee].Q;1a 6h=G[ee].CY&&1c!==ZC.1d(G[ee].CY.o.nk)&&ZC.2s(G[ee].CY.o.nk),de=-1;G[ee].CY&&(de=ZC.1k(ZC.9q(G[ee].CY.o.g2||-1))),ZC.3w,ZC.3w;1a fe,ge,Be=!0,ve=[],be="";1j(G[ee].CY&&(1c!==ZC.1d(G[ee].CY.o["1A-1H"])&&ZC.1d(1c!==(e=G[ee].CY.o["1A-1H"].ay))&&(Be=ZC.2s(e)),1c!==ZC.1d(G[ee].CY.o["1T-1H"])&&ZC.1d(1c!==(e=G[ee].CY.o["1T-1H"].ay))&&(Be=ZC.2s(e))),L=0,w=G[ee].AZ.A9.1f;L<w;L++)if(!G[ee].AZ.A9[L].LY&&(u=L,G[ee].CY&&G[ee].CY.o["9o-dW"]&&(u=w-L-1),G[ee].E["1A"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-6q">\')),!Be&&le.1f>0&&("wF"!==le[0].o["4i-by-1T"]&&"16J"!==le[0].o["4i-by-1T"]||le.4i(1n(e,t){1l(e.E["2r-1T"]-t.E["2r-1T"])*("wF"===le[0].o["4i-by-1T"]?1:-1)}));1a Ve=0;1j(P=0,N=le.1f;P<N&&(!(-1===le[P].E.8s||le[P].E.8s<=b)||(ze?(Ve%Se==0&&(be+="<tr>"),be+="<td>"+ve[P]+"</td>",Ve%Se==Se-1&&(be+="</tr>"),Ve++):be+=ve[le[P].E.wJ],ze||!Qe));P++);if(ze&&(Ve%Se!=Se-1&&(be+="</tr>"),be+="</6q>"),""!==se&&(be+=se),!Be&&le.1f>0&&(1b=F=D,d=I=J,""!==be&&(le[0].o.1E=ze||Qe?be:be.2v(0,be.1f-4),le[0].1q()),M=1c!==ZC.1d(v.o.6T)?ZC.1k(v.o.6T):6,1c===ZC.1d(v.o.x)?fe.D8?1b<G[ee].iX+G[ee].I/2?le[0].iX=1b+M+14:le[0].iX=1b-le[0].I-M-14:ae&&ae.iX>=f.iX+f.I/2?le[0].iX=F-le[0].I-M:le[0].iX=F+M:le[0].iX-=f.iX,1c===ZC.1d(v.o.y)?fe.D8?ae&&ae.iY>=f.iY+f.F/2?le[0].iY=I-le[0].F-M:le[0].iY=I+M:d<G[ee].iY+G[ee].F/2?le[0].iY=d+M+14:le[0].iY=d-le[0].F-M-14:le[0].iY-=f.iY),ie){1a Ue=-1,We=-1;if($||(1c===ZC.1d(p.ei)&&c(),$=!0),Ae.1f>0){1a je=[];1j(b=ZC.3w,Y=0,x=Ae.1f;Y<x;Y++)Ae[Y][0]>=0&&(b=ZC.CQ(Ae[Y][0],b));1j(-1!==de&&(b=ZC.BM(b,de)),Y=0,x=Ae.1f;Y<x;Y++)1c!==ZC.1d(Ae[Y])&&(-1===Ae[Y][0]||Ae[Y][0]<=b)&&(G[ee].CY&&G[ee].CY.o["bO-1w"]&&ZC.2s(G[ee].CY.o["bO-1w"])?(je=[].4B(Ae[Y][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]=et,$e=!0}if(le.1f>0){1a tt=[],it=[];1j(u=0;u<le.1f;u++)1c!==ZC.1d(le[u].o.x)&&1c!==ZC.1d(le[u].o.y)&&it.1h(le[u]);1j(1a at,nt,lt,rt=!0,ot=0,st=le.1f*le.1f;rt&&ot<st;)1j(ot++,rt=!1,u=0;u<le.1f-1;u++)if(le[u].AM&&-1===ZC.AU(it,le[u]))if(fe.D8){if(le[u+1].iX<le[u].iX+le[u].I){if(le[u+1].iX-le[u].I-4<f.iX&&-1===ZC.AU(tt,le[u])&&(tt.1h(le[u]),le[u].iX=f.iX),le[u+1].iX=le[u].iX+le[u].I+4,le[u+1].iX+le[u+1].I>f.iX+f.I)1j(lt=le[u+1].iX-(f.iX+f.I-le[u+1].I),at=0,nt=le.1f;at<nt;at++)le[at].iX-lt>=f.iX?le[at].iX-=lt:(le[at].iX=f.iX,at>0&&(le[u+1].E["1R-y"]<f.iY+f.F/2?le[at].iY=le[at-1].iY+le[at-1].F+4:le[at].iY=le[at-1].iY-le[at].F-4));rt=!0}}1u if(le[u+1].iY<le[u].iY+le[u].F){if(le[u+1].iY-le[u].F-4<f.iY&&-1===ZC.AU(tt,le[u])&&(tt.1h(le[u]),le[u].iY=f.iY),le[u+1].iY=le[u].iY+le[u].F+4,le[u+1].iY+le[u+1].F>f.iY+f.F)1j(lt=le[u+1].iY-(f.iY+f.F-le[u+1].F),at=0,nt=le.1f;at<nt;at++)le[at].iY-lt>=f.iY?le[at].iY-=lt:(le[at].iY=f.iY,at>0&&(le[u+1].E["1R-x"]<f.iX+f.I/2?le[at].iX=le[at-1].iX+le[at-1].I+4:le[at].iX=le[at-1].iX-le[at].I-4));rt=!0}}}1a At=!1;1j(u=0,h=Ze.1f;u<h;u++)if(-1===Ze[u].E.8s||Ze[u].E.8s<=b){1a Ct=Ze[u];G[ee].AJ["3d"]&&(G[ee].NF(),X=1m CA(G[ee],Ct.iX+Ct.I/2-ZC.AL.DW,Ct.iY+Ct.F/2-ZC.AL.DX,0),Ct.iX=X.E7[0]-Ct.I/2,Ct.iY=X.E7[1]-Ct.F/2,X=1m CA(G[ee],Ct.DH[0]-ZC.AL.DW,Ct.DH[1]-ZC.AL.DX,0),Ct.DH[0]=X.E7[0],Ct.DH[1]=X.E7[1]),G[ee].CY&&G[ee].CY.o["bO-1w"]&&ZC.2s(G[ee].CY.o["bO-1w"])?("xy"===G[ee].AJ.3x&&Ue===ZC.4o(Ct.iX+Ct.I/2)||"yx"===G[ee].AJ.3x&&We===ZC.4o(Ct.iY+Ct.F/2))&&!At&&(Ct.1t(),At=!0):Ct.1t()}1j(b=ZC.3w,P=0,N=le.1f;P<N;P++)le[P].E.8s>=0&&(b=ZC.CQ(le[P].E.8s,b));1j(-1!==de&&(b=ZC.BM(b,de)),L=0,P=0,N=le.1f;P<N;P++)if(-1===le[P].E.8s||le[P].E.8s<=b){1a Zt=ZC.E0(le[P].DH[0],f.iX-5,f.iX+f.I+5)&&ZC.E0(le[P].DH[1],f.iY-5,f.iY+f.F+5);if(!Be||Zt){if(le[P].AM){1P(le[P].E[ZC.1b[7]]){1i"1v":fe.D8?le[P].DH[0]=le[P].iX-le[P].G2:le[P].DH[1]=le[P].iY+le[P].F+le[P].G2;1p;1i"2a":fe.D8?le[P].DH[0]=le[P].iX+le[P].I+le[P].G2:le[P].DH[1]=le[P].iY-le[P].G2}if(-1!==ZC.AU(["1v","2a"],le[P].E[ZC.1b[7]])){1a ct=le[P].iX+le[P].I/2;le[P].iX=ZC.BM(le[P].iX,0),le[P].iX=ZC.CQ(le[P].iX,t.H.I-le[P].I),le[P].iY=ZC.BM(le[P].iY,0),le[P].iY=ZC.CQ(le[P].iY,t.H.F-le[P].F),1c===ZC.1d(le[P].o["6G-2c"])&&(le[P].ET=5v(100*(ct-le[P].iX-le[P].I/2)/(le[P].I-le[P].H3),10))}if(G[ee].AJ["3d"]&&(G[ee].NF(),X=1m CA(G[ee],le[P].iX+le[P].I/2-ZC.AL.DW,le[P].iY+le[P].F/2-ZC.AL.DX,0),le[P].iX=X.E7[0]-le[P].I/2,le[P].iY=X.E7[1]-le[P].F/2,X=1m CA(G[ee],le[P].DH[0]-ZC.AL.DW,le[P].DH[1]-ZC.AL.DX,0),le[P].DH[0]=X.E7[0],le[P].DH[1]=X.E7[1],"1K"===le[P].EP?le[P].iX=le[P].DH[0]+M:le[P].iX=le[P].DH[0]-le[P].I-M),G[ee].AJ["3d"]||Be||0!==L||(le[P].iX=ZC.BM(f.iX-5,le[P].iX),le[P].iY=ZC.BM(f.iY-5,le[P].iY),le[P].iX=ZC.CQ(f.iX+f.I-le[P].I+5,le[P].iX),le[P].iY=ZC.CQ(f.iY+f.F-le[P].F+5,le[P].iY)),Be||!Be&&0===L){1a pt=Be?P:0;(!Be||"3a"===t.H.AB&&le[pt].o["1U-4d"]&&""!==le[pt].o["1U-4d"])&&le[pt].1q(),le[pt].1t(),L++}}if(Zt){1a ut=1m DT(t);if(t.H.B8.2x(ut.o,"("+G[ee].AF+").2i.1R"),ut.J=le[P].J+"-1R",ut.Z=ut.C7=a,ut.iX=le[P].E["1R-x"],ut.iY=le[P].E["1R-y"],G[ee].AJ["3d"]&&(G[ee].NF(),X=1m CA(G[ee],ut.iX-ZC.AL.DW,ut.iY-ZC.AL.DX,0),ut.iX=X.E7[0],ut.iY=X.E7[1]),y=le[P].E["2i-1I"],ut.A0=ut.AD=ZC.AO.JK(y[ZC.1b[0]]),ut.BU=y.1r,ut.1C(G[ee].CY.o.1R),ut.1C(G[ee].AZ.A9[le[P].E.7b].o["2i-1R"]),"5l"===ut.o.1J){1a ht=G[ee].AZ.A9[le[P].E.7b];ht.A5&&ht.A5.o.1J&&(ut.o.1J=ht.A5.o.1J)}ut.1q(),ut.AM&&"2b"!==ut.DN&&ut.AH>1&&ut.1t()}}}(H=G[ee].HV()).2B=ne,H.2i={x:F,y:I},H.ev=p,H["1z-1H"]=ue,ZC.AO.C8("x9",t.H,H),G[ee].PU(!0)}1u(H={}).2i={x:F,y:I},H.ev=p,ZC.AO.C8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.o.5E.1E)&&(t.o.5E.1E=x[0][0]),h=!0):h=!1),h&&X++,u){1j(i=[],h&&i.1h(x[0]),o=X,s=x.1f;o<s;o++)1j(A=0,C=x[o].1f;A<C;A++)1c===ZC.1d(i[A+X])&&(i[A+X]=[]),i[A+X].1h(x[o][A]);x=i}if("1n"==1y 1o.vH)1j(o=0,s=x.1f;o<s;o++)1j(A=0,C=x[o].1f;A<C;A++)x[o][A]=1o.vH.4x(1g,x[o][A],o,A,t.D.A.J);1a L=0;1j(l=0,r=x.1f;l<r;l++)L=ZC.BM(L,x[l].1f);1a w=[];if(1c===ZC.1d(1b)){1a M=x[X].2M("").1f;1b=x[X].2M("").1F(/[0-9]/g,"").1f/M>.75}1b&&(w=x[X],X++);1a H=[];if(1c===ZC.1d(d))if(1b&&-1!==w[0].1L("\\\\"))d=!0;1u{1a P="";1j(o=X,s=x.1f;o<s;o++)P+=x[o][0];1a N=P.1f;d=P.1F(/[0-9]/g,"").1f/N>.75}if(d){1j(o=X,s=x.1f;o<s;o++)B?H.1h(ZC.1k(x[o][y])):H.1h(x[o][y]);y++}1a G=[],T=[];1j(A=y;A<L;A++){T[A-y]=[];1a O=1c,k=1c,K=0,R=1c;1j(o=X,s=x.1f;o<s;o++)if(1c!==ZC.1d(x[o][A])&&""!==x[o][A]&&1y x[o][A]!==ZC.1b[31]){n=x[o][A],1c!==ZC.1d(R)||v||(R=n.1F(/[0-9\\-\\,\\.\\+\\e]+/g,"%v")),v||(n=n.1F(/[^0-9\\-\\,\\.\\+\\e]+/g,""));1a z=n.1L("."),S=n.1L(",");-1!==z&&-1!==S?z<S?(O=".",k=",",K=ZC.BM(0,n.1f-S)):(O=",",k=".",K=ZC.BM(0,n.1f-z)):-1===z&&-1!==S?n.1f-S-1==3?(O=",",k="."):(O=".",k=",",K=ZC.BM(0,n.1f-S)):-1!==z&&-1===S&&(n.1f-z-1==3?(O=".",k=","):(O=",",k=".",K=ZC.BM(0,n.1f-z))),"."===O&&(n=n.1F(/\\./g,"").1F(/,/g,".")),","===O&&(n=n.1F(/,/g,"")),T[A-y].1h(v?n:ZC.1W(n))}1u T[A-y].1h(1c);G[A-y]={},1c!==ZC.1d(R)&&(G[A-y].5I=R),1c!==ZC.1d(O)&&(G[A-y][ZC.1b[13]]=O),1c!==ZC.1d(O)&&(G[A-y][ZC.1b[14]]=k),0!==K&&(G[A-y][ZC.1b[12]]=K)}if(B)1j(l=0,r=T.1f;l<r;l++)1j(1a Q=0;Q<T[l].1f;Q++)T[l][Q]=[H[Q],T[l][Q]];1a V=[];1P(t.D.AF){1i"1w":1i"1N":1i"5t":1i"6c":1i"97":1i"83":1i"6O":1i"7k":1i"9u":1c===ZC.1d(t.o[ZC.1b[50]])&&(t.o[ZC.1b[50]]={});1a U=[];d&&1c!==ZC.1d(w[0])&&(U=w[0].2n(/\\\\/)),1c!==ZC.1d(U[0])&&(1c===ZC.1d(t.o[ZC.1b[50]].1H)&&(t.o[ZC.1b[50]].1H={}),1c===ZC.1d(t.o[ZC.1b[50]].1H.1E)&&(t.o[ZC.1b[50]].1H.1E=U[0])),d&&(1c===ZC.1d(t.o[ZC.1b[50]][ZC.1b[5]])?t.o[ZC.1b[50]][ZC.1b[5]]=H:1c===ZC.1d(t.o[ZC.1b[50]][ZC.1b[10]])&&(t.o[ZC.1b[50]][ZC.1b[10]]=H));1a W=[];if(1c!==ZC.1d(g)&&g)1j(l=0,r=T.1f;l<r;l++)W[l]=ZC.1b[51]+(0===l?"":"-"+(l+1));1u if(1c!==ZC.1d(f)&&f){1a j={},q=0,$=[];1j(l=0,r=T.1f;l<r;l++){1j(1a ee=0,te=0,ie=T[l].1f;te<ie;te++)ee+=T[l][te];ee/=T[l].1f;1a ae=1B.43(ZC.JN(ee)/1B.a6/2);1c===ZC.1d(j[ae])&&(j[ae]=ZC.1b[51]+(0===q?"":"-"+(q+1))),-1===ZC.AU($,G[l].5I)?(W[l]=ZC.1b[51]+(0===q?"":"-"+(q+1)),q++):(W[l]=j[ae],q++),$.1h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])&&(i=e),t.o.1Y&&t.o.1Y.1Q&&(e=t.o.1Y.1Q[ZC.1b[54]])&&(i=e)),(t.A.KA||t.E["a9-93-3p"])&&(i="3p"),i}BT(e,t){1y t===ZC.1b[31]&&(t=!1);1j(1a i=[],a=1g,n=0,l=a.BL.1f;n<l;n++)a.BL[n].AF===e&&(!t||t&&a.BL[n].Y.1f>0)&&i.1h(a.BL[n]);1l i}BK(e){1j(1a t=1g,i=0,a=t.BL.1f;i<a;i++)if(t.BL[i].BC===e)1l t.BL[i];1l 1c}NG(e){1l e}wp(e){1l 1m ZC.vF(1g,e)}O3(){1j(1a e=1g,t=0,i=e.BL.1f;t<i;t++){1a a=e.BL[t],n=a.BC;e.A.B8.2x(a.o,["("+e.AF+").4z","("+e.AF+")."+n.1F(/\\-[0-9]+/,""),"("+e.AF+")."+n.1F(/\\-[0-9]+/,"-n"),"("+e.AF+")."+n],!1,!0);1a l=n.1F(/\\-[0-9]+/,"")+"-n";e.o[l]&&a.1C(e.o[l]),e.o[n]&&a.1C(e.o[n]),e.AJ["3d"]&&e.A.B8.2x(a.o,["("+e.AF+").4z[3d]","("+e.AF+")."+n.1F(/\\-[0-9]+/,"")+"[3d]","("+e.AF+")."+n.1F(/\\-[0-9]+/,"-n")+"[3d]","("+e.AF+")."+n+"[3d]"],!1,!0),e.AJ["3d"]&&a.1C(e.o[n+"[3d]"]),a.1q()}}UQ(){1l 1c}tF(e){1a t,i,a,n=1g,l=0,r=n.AZ.A9.1f;1j(t=0;t<r;t++)l=ZC.BM(l,n.AZ.A9[t].R.1f);1n o(e){1l e=(e=(e=e.1F(/(%N|%2r-eH)/g,l)).1F(/(%P|%1A-eH)/g,r)).1F(/(%S|%1z-6g-eH)/g,a.Y.1f)}1j(t=0,i=n.BL.1f;t<i;t++)(a=n.BL[t]).H5(e),2===e&&(a.IT=o,a.DA()&&a.1q()),1c===ZC.1d(a.o["1X-2B"])&&1c===ZC.1d(a.o["1X-cC"])&&a.T6(),1c===ZC.1d(a.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"),e.Q.1q(),e.AJ["3d"]&&!e.F6.7G){1a A=ZC.2l(ZC.1k(e.F6.5p*ZC.EH(e.F6.2f)));e.Q.iY+=A,e.Q.F-=A,e.Q.I-=ZC.1k(e.F6.5p*ZC.EC(e.F6.2f))}if(1y e.E["2u-p-x"]!==ZC.1b[31])1j(1a C=0,Z=e.BL.1f;C<Z;C++)e.BL[C].WR(),e.BL[C].GT()}ta(){1a e,t,i,a=1g,n=["1v","2A","2a","1K"],l={};1j(t=0;t<n.1f;t++)l[n[t]]=!1,a.E["2u.d-2y-"+n[t]]&&(a.o.2u["2y-"+n[t]]=1c),a.o.2u&&"4N"===a.o.2u["2y-"+n[t]]&&(l[n[t]]=!0,a.o.2u["2y-"+n[t]]="20");1a r=!1,o={};if("xy"===a.AJ.3x&&(r=!0),("xy"===a.AJ.3x||"yx"===a.AJ.3x)&&(a.Q.E["d-2y"]||a.E["2u.d-2y"])){1j(1a s=0,A=a.BL.1f;s<A;s++){1a C=0,Z=0,c="",p=a.BL[s];if(p.AM&&p.TJ){"k"===p.AF?c=p.D8?"2q"===p.B7?"1K":"2A":"2q"===p.B7?"2a":"1v":"v"===p.AF&&(c=p.D8?"2q"===p.B7?"2a":"1v":"2q"===p.B7?"1K":"2A");1a u=0;if(a.Q.E["d-2y-"+c]||a.E["2u.d-2y-"+c]){1a h=1m DM(p);h.1S(p.BR);1a 1b=ZC.BM(1,ZC.1k((p.A1-p.V)/p.EG));1j(t=p.V;t<=p.A1;t+=1b)if(h.AN=p.FL(t),h.iE&&("k"===p.AF&&!p.D8||"v"===p.AF&&p.D8)&&(h.o[ZC.1b[19]]=ZC.1k(.9*p.A8)),h.1q(),h.AM)if(Z=ZC.BM(Z,h.AA%180==0?h.F:h.I),C=ZC.BM(C,h.AA%180==0?h.I:h.F),u=ZC.BM(u,1.5*h.DE*(h.AN||"").2n(/<br>|<br\\/>|<br \\/>|\\n/).1f),"1v"===c||"2a"===c){if(u=ZC.BM(u,.rc*h.DE+1.l3*ZC.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1d(A.E["2i-on"])||ZC.2s(A.E["2i-on"])||(A.fC=!1)),A.E.nR||(A.A.E["2Y-"+A.J+"-1Y-6E"]=1c),A.E.nR=1c,A.MF="1q.7v",1D.1q(),A.nZ(),-1!==3h.5g(A.o).1L("1o.4Y")&&(A.o.2u=A.o.2u||{},A.o.2u.2y=0);1a c=1c;if(!1o.4F.8n&&((e=A.o["gV-6L"])&&(A.RL=e["gV-3R"]),(e=A.o.6L)&&("4h"==1y e?e.3R?A.RL=e.3R:e["1V-3e"]&&(c=e["1V-3e"]):A.RL=e),""!==A.RL&&1c!==ZC.1d(A.A.iN[A.RL])&&(c=A.A.iN[A.RL]),A.H.NV&&(c=A.H.NV),c)){1a p=A.wp(c);A.o=p.1q()}if(A.LQ=1o.wn,A.4y([["cJ","VI","b"],["cu","NJ","f"],["ag","LQ","b"],["nj","CB","b"],["7F-1J","KR"],["Df-1J","k1"],["3R-1V","pj"],["3f","L8","i"],["6P","BS"],["4i-2J","pZ","b"]]),A.BS.1f>0)1j(C.B8.6P=[],a=0;a<A.BS.1f;a++){1a u=A.BS[a],h=ZC.AO.JK(A.BS[a],10),1b=ZC.AO.R2(A.BS[a],10);C.B8.6P.1h(["#2S",u,h,1b])}"7e"===A.AF&&(A.F6.7G=!0),(A.AJ["3d"]||A.A.dR)&&(A.LQ=!1),A.ok(),-1===ZC.AU(A.H.KP,ZC.1b[41])&&((1c!==ZC.1d(e=A.o.2z)||C.PT("2z",A.AF))&&A.AJ[ZC.1b[56]]&&(A.BI&&!A.E["db-2z-1q"]||1y sM===ZC.1b[31]||(A.E["db-2z-1q"]=!1,A.BI=1m sM(A),A.BI.OE="2z",C.2x(A.BI.o,Z+".2z"),(t=A.o.2u)&&A.BI.1C({"1U-1r":t[ZC.1b[0]],"1U-1r-1":t["1U-1r-1"],"1U-1r-2":t["1U-1r-2"],"5e-tv":t["5e-tv"],"5e-gR":t["5e-gR"]}),A.BI.1C(e),A.BI.1q())),(1c!==ZC.1d(e=A.o["1Z-x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.J+"-2J-4Y-3H-c"),i.H.AB,i.iX,i.iY,i.I,i.F,i.J)),i.pJ(e,t)}pJ(){}oR(e,t){1a i,a=1g;if(1c!==ZC.1d(e)&&1c!==ZC.1d(t)){1a n=a.AZ.A9[e].JF,l=a.AZ.A9[e].RQ;if("2b"===n)1l;if(1c!==ZC.1d(a.D9["p"+e])){if(1c!==ZC.1d(a.D9["p"+e]["n"+t])){if(4v a.D9["p"+e]["n"+t],l)1j(i=0;i<a.AZ.A9.1f;i++)4v a.D9["p"+i]["n"+t]}1u if("2Y"===n?(a.D9={},a.D9["p"+e]={}):"1A"===n&&(a.D9["p"+e]={}),a.D9["p"+e]["n"+t]=!0,l)1j(i=0;i<a.AZ.A9.1f;i++)a.D9["p"+i]=a.D9["p"+i]||{},a.D9["p"+i]["n"+t]=!0}1u if("2Y"===n&&(a.D9={}),a.D9["p"+e]={},a.D9["p"+e]["n"+t]=!0,l)1j(i=0;i<a.AZ.A9.1f;i++)a.D9["p"+i]=a.D9["p"+i]||{},a.D9["p"+i]["n"+t]=!0}1c!==ZC.1d(e)&&1c!==ZC.1d(t)&&(a.HG=!0,a.K2(!0,!0))}1t(e){1c===ZC.1d(e)&&(e=!1);1a t,i,a,n,l,r,o=1g;o.A.tu=o.J,o.VG=e,2w.iu(ZC.oQ[o.J]),o.A.q0("vb"+o.L);1a s,A,C,Z,c,p,u,h=o.BT("k")[0],1b=ZC.3w,d=-ZC.3w,f={},g=o.AZ.A9,B=0;1j(Z=0;Z<g.1f;Z++)if(g[Z].o.aS)1j(C=0;C<g.1f;C++)if(g[C].o.id&&g[C].o.id===g[Z].o.aS){B++,u=!0;1a v=[];1j(l=0;l<g[C].R.1f;l++)(h.EI?g[C].R[l].BW>=h.B3&&g[C].R[l].BW<=h.BP:g[C].R[l].L>=h.V&&g[C].R[l].L<=h.A1)?(s=g[C].R[l].AE,1b=1B.2j(1b,s),d=1B.1X(d,s),u?(u=!1,g[C].R[l].BW?v.1h([g[C].R[l].BW,0]):v.1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-93-3p"]=1c,n.G9||n.A.XV(),n.A.O9=!1,(n.LQ||!n.G9||n.H.E["2Y."+n.J+".jY"]||!n.AJ[ZC.1b[55]]||-1!==ZC.AU(n.H.KP,ZC.1b[41])||1o.4F.aT)&&(n.MF="9w"),"us"===n.k1&&(n.vq=!1,n.H.E["2Y."+n.J+".jY"]=!0),t=0,i=n.BL.1f;t<i;t++)n.BL[t].6D();if(!n.A.E["cw-2x"]){1a l=ZC.AO.C8("16l",n.A,n.HV(),!0);if(l)1j(1a r=[ZC.1b[10],"5L","16k","dO"],o=0;o<r.1f;o++)l[r[o]]&&(n.o[r[o]]=(n.o[r[o]]||[]).4B(l[r[o]]))}1n s(e){1a t,i,a=(e.9D||e.2X.id).1F("-1N-2R","").1F("-2R","").1F(/--([a-zA-Z0-9]+)/,"").1F("-1R","").1F("-3z","").2n("-").9o();1l"2r"===a[1]&&(t=a[2],i=a[0]),[t,i]}if(n.AJ["3d"]||(n.bh(),n.PK(),n.JQ(),-1===ZC.AU(n.H.KP,ZC.1b[41])&&n.Q1()),-1===ZC.AU(n.H.KP,ZC.1b[41])){1a A=ZC.A3("."+n.J+"-2r-1N");n.XF=1n(e){if(!(1o.aV&&"7A"===1o.mD&&"7A"===e.1J||(1o.hw=n.A.J,1o.aV=e,1o.mD=e.1J,ZC.3m||n.BG&&n.BG.Z5||-1===ZC.P.TF(e.2X).1L("zc-2r-1N")||"9w"!==n.MF))){ZC.2L&&(n.E["2r-2X-id"]=e.2X.id,ZC.3m=!1,n.H.9h(),1c===n.H.DC||1c===ZC.1d(n.H.DC["3f-1Z"])||n.H.DC["3f-1Z"]||e.6R(),n.A.W3(e));1a a=s(e);if(n.AZ.A9[a[0]]){1a l=n.AZ.A9[a[0]].FP(a[1]);if(l&&(l.N?(ZC.aq=[l.N.C1,l.N.A0,l.N.AD,l.N.BU,l.N.B9],l.N9&&ZC.aq.1h(l.N9.A0,l.N9.AD,l.N9.BU,l.N9.B9)):ZC.aq=[],n.E["1A"+a[0]+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.A6&&n.A6.AM&&n.A.A6.hj(e)}},A.4c("7V 6f",n.qn),n.TT=1n(e){if((e.9D||-1!==ZC.P.TF(e.2X).1L("zc-2r-1N"))&&"9w"===n.MF){1a t=s(e),i=n.AZ.A9[t[0]].FP(t[1]);if(i&&("2b"===i.A.JF||!ZC.2L&&0!==e.7K||(n.A.E[ZC.1b[53]]=!0,n.fQ(),n.oR(i.A.L,i.L)),i.OV(e,"3H"),i.A.UP(e,"3H"),1c!==ZC.1d(i.A.E1)&&"gr"!==i.A.E1))if(i.A.E1 3E 3M)1j(1a a=0;a<i.A.E1.1f;a++){1a l=i.A.FA;i.A.FA 3E 3M&&(l=i.A.FA[a]||"2Y="+(n.o.id||"")),a===i.L&&n.UC(e,i.EW(i.A.E1[a],1c,1c,!0),l)}1u n.UC(e,i.EW(i.A.E1,1c,1c,!0),i.A.FA||"2Y="+(n.o.id||""))}},n.o7=1n(e){if(-1!==ZC.P.TF(e.2X).1L("zc-2r-1N")&&"9w"===n.MF){1a t=s(e),i=n.AZ.A9[t[0]].FP(t[1]);i&&(i.OV(e,"w0"),i.A.UP(e,"w0"))}},ZC.2L||A.4c("3H",n.TT).4c("f9",n.TT).4c("9C",n.o7)}if(n.pi(),n.A.E["tr-ev-"+n.L]?(n.A.E["tr-ev-"+n.L]=1c,n.nT()):n.nT(),n.i1){n.i1=!1;1a C={4w:n.J};1j(t=0,i=n.BT("k").1f;t<i;t++){1a Z=n.BT("k")[t];1c!==ZC.1d(e=Z.LW)&&(C["7E"+(a=1===Z.L?"":"-"+Z.L)]=!0,C["4s"+a]=e[0],C["4p"+a]=e[1])}1j(t=0,i=n.BT("v").1f;t<i;t++){1a c=n.BT("v")[t];1c!==ZC.1d(e=c.LW)&&(C["7N"+(a=1===c.L?"":"-"+c.L)]=!0,C["5r"+a]=e[0],C["5q"+a]=e[1])}if(C.nU=!0,n.A.FZ){1j(1a p in n.A.FZ)ZC.AK(p).2Z(n.A.FZ[p]);n.A.FZ=1c}n.A.PI(C)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;1p;1i"uv":2w.u9.89.7B=E1;1p;1i"2w":1c!==ZC.1d(PG[1])&&""!==PG[1]&&(2w.1v[PG[1]].89.7B=E1);1p;1i"2Y":1a YD=1c;if("()"===E1.2v(E1.1f-2)||"7u:"===E1.2v(0,11))4J{1a EF=E1.1F("7u:","").1F("()","");7l(EF)&&(YD=7l(EF).4x(s))}4M(e){}1c!==ZC.1d(PG[1])&&""!==PG[1]?"ul"===PG[1]||"uv"===PG[1]?(s.A.MM(),YD?1o.3n(s.A.J,"aI",{1V:YD}):s.A.2x(1c,E1)):(D=s.A.OH(PG[1]),D&&(s.A.MM(D),s.A.E["tr-ev-"+D.L]=!0,s.A.NY++,YD?1o.3n(s.A.J,"aI",{4w:PG[1],1V:YD}):s.A.2x(PG[1],E1))):(D=s.A.AI[0],s.A.MM(D),YD?1o.3n(s.A.J,"aI",{4w:D.J,1V:YD}):(s.A.E["tr-ev-"+D.L]=!0,s.A.NY++,s.A.2x(D.J,E1)));1p;2q:2w.89.7B=E1}}}I0(e,t,i){1a a=1g;if(1c===ZC.1d(i)&&(i=a.AZ.A9.1f-1),1c!==ZC.1d(e)&&1y e!==ZC.1b[31])1l a.AZ.A9[e];if(1c===ZC.1d(t)||1y t===ZC.1b[31])1l a.AZ.A9[i];1j(1a n=0,l=a.AZ.A9.1f;n<l;n++)if(t===a.AZ.A9[n].H1)1l a.AZ.A9[n];1l 1c}ZG(e,t){1a i,a,n=1g;(e=e||{})[ZC.1b[54]]=e[ZC.1b[54]]||n.7O();1a l=1c;if(1y e.3W!==ZC.1b[31]&&(l=ZC.1k(e.3W)),-1===l)1j(l=[],i=0,a=n.AZ.A9.1f;i<a;i++)l.1h(i);l 3E 3M||(l=[l]);1a r=e.4X||"";r 3E 3M||(r=[r]);1a o=[];1j(i=0,a=ZC.BM(l.1f,r.1f);i<a;i++){1a s=n.I0(l[i],r[i]);if(s){1a A={};ZC.2E(e,A);1a C=s.L;A.3W=C,A.4X=s.H1,("4n"===t&&!n.E["1A"+C+".2h"]||"5b"===t&&n.E["1A"+C+".2h"])&&o.1h(A)}}1j(i=0,a=o.1f;i<a;i++)n.A.o[ZC.1b[16]][n.L][ZC.1b[11]][o[i].3W].2h="4n"===t,i===a-1&&(o[i].K2=1),n.QI(o[i])}QI(e){1a t,i,a,n=1g;n.A.E["2Y."+n.J+".jY"]=!1,e=e||{};1a l=!1;1c!==ZC.1d(e.aP)&&e.aP&&(l=!0);1a r=!1;e[ZC.1b[54]]=e[ZC.1b[54]]||n.7O(),1c!==ZC.1d(t=e["cI-1Y"])&&(r=ZC.2s(t));1a o=n.I0(e.3W,e.4X);if(o){1a s=o.L;1P(e[ZC.1b[54]]){1i"5b":if(n.BG&&(n.BG.E.jZ=!0),n.E["1A"+s+".2h"]=!n.E["1A"+s+".2h"],1c!==ZC.1d(n.A.o[ZC.1b[16]][n.L][ZC.1b[11]])&&(n.A.o[ZC.1b[16]][n.L][ZC.1b[11]][s].2h=n.E["1A"+s+".2h"]),n.AJ["3d"])r=!0,l||n.K2();1u{1a A=n.E["1A"+s+".2h"]?"8y":"2b";if(1o.3J.bC||ZC.A3("."+n.J+ZC.1b[35]+s+"-2r-1N").5d(1n(){if("ud"===1g.8h.5M()){1a e=ZC.A3(1g),t=e.3Q("9e"),a=e.3Q("2T");"2b"===A?(t="-"+t.1F(/,/g,",-"),"5n"===a?4===(i=t.2n(",")).1f&&(t=[i[2],i[3],i[0],i[1]].2M(",")):"3z"===a&&3===(i=t.2n(",")).1f&&(t=[i[0],i[1],-i[2]].2M(","))):(t=t.1F(/\\-/g,""),"5n"===a&&4===(i=t.2n(",")).1f&&(t=[i[2],i[3],i[0],i[1]].2M(","))),e.3Q("9e",t)}}),n.A.KA)ZC.AK(n.J+"-4k-bl-c").1I.3L=A,ZC.AK(n.J+"-4k-fl-c").1I.3L=A,ZC.AK(n.J+"-4k-vb-c").1I.3L=A;1u{1j(a=0;a<o.SZ;a++)(t=ZC.AK(n.J+"-1A-"+s+"-bl-"+a+"-c"))&&(t.1I.3L=A);1j(a=0;a<o.jp;a++)(t=ZC.AK(n.J+"-1A-"+s+"-fl-"+a+"-c"))&&(t.1I.3L=A);(t=ZC.AK(n.J+"-1A-"+s+"-vb-c"))&&(t.1I.3L=A)}1a C=ZC.A3("."+n.J+"-1A-"+s+"-1T-3C");n.E["1A"+s+".2h"]?(C.4n(),ZC.A3("."+n.J+ZC.1b[35]+s+"-2z").4n()):(C.5b(),ZC.A3("."+n.J+ZC.1b[35]+s+"-2z").5b())}1p;1i"3p":n.fQ(),r=!0,n.E["a9-93-3p"]=!0,n.E["1A"+s+".2h"]=!n.E["1A"+s+".2h"],e.K2&&(l||(n.LG("on-1Y-a9"),n.K2(!0,!0)))}n.BG&&!r&&(n.BG.3j(),n.BG.1t())}}LG(e){1a t=1g,i=!0,a=t.o.1A||{};1c!==ZC.1d(a.8x)&&1c!==ZC.1d(a.8x[e])&&(i=ZC.2s(a.8x[e])),t.HG="us"===t.k1||!i}HV(){1l{id:1g.A.J,Fo:1g.L,4w:1g.J.1F(1g.A.J+"-2Y-",""),x:1g.iX,y:1g.iY,1s:1g.I,1M:1g.F,6A:1g.A.FO()}}S7(){}S8(){}gc(){1j(1a e=0;e<1g.BL.1f;e++)1g.BL[e].gc();1j(1a t=0;t<1g.AZ.A9.1f;t++)1g.AZ.A9[t].gc();ZC.AO.gc(1g.AZ,["A","D","H","F3","o","I3","JU"]),ZC.AO.gc(1g,["Z","C7","AJ","IZ","KN","MU","F6"])}}JY.5j.PK=1n(){1a e,t,i,a,n,l,r,o,s=1g;s.n7(),s.BV=[],s.FC=[],s.YK=[],s.LN=[],s.FI=[],s.XO={};1a A,C,Z,c=s.A.B8,p="("+s.AF+")";if(1c!==ZC.1d(A=s.o[ZC.1b[10]]))1j(t=0,i=A.1f;t<i;t++){A[t].id||(A[t].id="166"+t+"1b"+ZC.hm(5x,6H)),a=A[t].id||t,n=!1,l=!1,s.E["2J.es"]&&-1===ZC.AU(s.E["2J.es"],a)&&(n=!0,l=!0),A[t].cf&&(n=!0);1a u=1o.6e.a7("DM",s,s.J+"-1H-"+a,n);if(!l||!u.nE){if(c.2x(u.o,p+".1H"),u.1C(A[t]),1c!==ZC.1d(e=u.o.u9))1j(1a h=0;h<s.BV.1f;h++)if(""+s.BV[h].H1==""+e){u.E["p-x"]=s.BV[h].iX,u.E["p-y"]=s.BV[h].iY,u.E["p-1s"]=s.BV[h].I,u.E["p-1M"]=s.BV[h].F;1p}if(u.H1=a,u.J=s.J+"-1H-"+a,u.GI=s.J+"-1H zc-1H",1c!==ZC.1d(e=A[t].7q)&&(u.E.7q=e),u.EW=1n(t){if(!t||-1===(""+t).1L("%"))1l t;t=""+t;1a i,a=[];a.1h(["%id",s.A.J]),a.1h(["%4w",s.J.1F(s.A.J+"-2Y-","")]);1a n=s.E.3S;1j(1a l in n)a.1h(["%"+l,n[l]]);a.4i(ZC.lW);1j(1a r=0,o=a.1f;r<o;r++)i=1m 5y(a[r][0],"g"),t=t.1F(i,a[r][1]);1a A,C,Z,c,p=u.o["2q-1T"]||" ";1j(i=1m 5y("(%1A-([0-9]+?)-1T(-*)([0-9]*?))|(%1A-1T-([0-9]+?))|(%1A-1T)|(%8k)|(%2r-8e-1T)","g"),t=t.1F(i,p),i=1m 5y("\\\\((.+?)\\\\)\\\\(([0-9]*)\\\\)\\\\(([0-9]*)\\\\)");A=i.3n(t);)if("%2r-1T"===A[1]){C="";1a h=0,1b=0;""!==(e=A[2])&&(h=ZC.1k(e)),""!==(e=A[3])&&(1b=ZC.1k(e)),(c=s.AZ.A9[h])&&(Z=c.FP(1b,3))&&(C=Z.EW(A[1])),t=t.1F(A[0],C)}1l t},u.1q(),A[t]["3d"]){1a 1b=1m CA(s,u.iX+u.I/2-ZC.AL.DW,u.iY+u.F/2-ZC.AL.DX,ZC.1k(A[t].z||"0"));u.iX=1b.E7[0]-u.I/2,u.iY=1b.E7[1]-u.F/2}}s.BV.1h(u),s.FI.1h({1J:"1H",3b:t,ap:u.JP}),s.XO[a]={2T:"1H",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-c",a.J+"-2J-4Y-c");1j(1a l=0;l<n.1f;l++)(i=ZC.AK(n[l]))&&ZC.P.II(i,a.H.AB,a.iX,a.iY,a.I,a.F,a.J);"3a"===a.A.AB&&!1o.gv&&ZC.bf||(ZC.A3("."+a.J+"-1H").3p(),ZC.A3("."+a.J+"-2T-1H").3p(),ZC.A3("."+a.J+"-7I-1H").3p()),e||(ZC.A3("."+a.J+"-1H-1N").5d(1n(){if(-1===ZC.AU([a.J+"-5E-1N",a.J+"-86-1N",a.J+"-7g-1N"],1g.id)){1a e=1m 5y("16c(x|y|k|v)-(7y|aM)([0-9]+)").3n(1g.id);!t&&e&&e.1f||ZC.P.ER(1g.id)}}),ZC.A3("."+a.J+"-2T-1N").5d(1n(){(!ZC.fc||ZC.fc&&"1"!==1g.bJ("1V-3c"))&&ZC.P.ER(1g.id)}),ZC.A3("."+a.J+"-7I-1N").3p()),"2F"===a.A.AB&&ZC.A3("#"+a.A.J+"-2F").9z().5d(1n(){1a e=a.J+"-1H-";"wK"===1g.8h.aN()&&1g.id.2v(0,e.1f)===e&&ZC.P.ER(1g.id)})},JY.5j.np=1n(){1a e=1g;(e.H.O0["2J-1v"]||e.H.O0["2J-2a"])&&(ZC.A3("."+e.J+"-1H-1N").4j(ZC.2L?"4H":"6F 7A",e.pf).4j(ZC.2L?"5R":"6k 7T",e.oL).4j(ZC.2L?"6f":ZC.1b[48],e.q6),ZC.2L||ZC.A3("."+e.J+"-1H-1N").4j("3H",e.V0).4j("9C",e.V0),ZC.A3("."+e.J+"-2T-1N").4j(ZC.2L?"4H":"6F 7A",e.oJ).4j(ZC.2L?"5R":"6k 7T",e.oI).4j(ZC.2L?"6f":ZC.1b[48],e.pg),ZC.2L||ZC.A3("."+e.J+"-2T-1N").4j("3H",e.V1).4j("9C",e.V1))},JY.5j.O4=1n(){1a e,t,i,a,n=1g;if(n.YX=!1,1c!==ZC.1d(i=n.o[ZC.1b[10]]))1j(e=0,t=i.1f;e<t;e++){1a l=""+(i[e].1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A6&&a.A6.AM&&a.A.A6.hj(e),a.S8(ZC.1b[48],t)},a.V1=1n(e){1a t=n(e);if("9C"!==e.1J){e.gu||a.L6("3H"),a.TP=a.TP||{},a.TP["oK"+t.gA]?(a.TP["oK"+t.gA]=1c,a.L6("3H")):(e.gu||(a.TP={}),a.TP["oK"+t.gA]=1,a.R6("2T",t.gD,"3H")),a.S8("3H",t);1a i=a.FC[t.gD].BD||a.FC[t.gD];if(i&&i.E1&&"gr"!==i.E1)if(i.E1 3E 3M)1j(1a l=0;l<i.E1.1f;l++)1c!==ZC.1d(i.FA[l])&&a.UC(e,i.E1[l],i.FA[l]);1u a.UC(e,i.E1,i.FA)}1u a.S8("9C",t)},ZC.A3("."+a.J+"-2T-1N").4c(ZC.2L?"4H":"6F 7A",a.oJ).4c(ZC.2L?"5R":"6k 7T",a.oI).4c(ZC.2L?"6f":ZC.1b[48],a.pg),ZC.2L||ZC.A3("."+a.J+"-2T-1N").4c("3H",a.V1).4c("9C",a.V1),a.pf=1n(e){ZC.2L&&(a.L6(),ZC.3m=!1,a.H.9h(),1c===a.H.DC||1c===ZC.1d(a.H.DC["3f-1Z"])||a.H.DC["3f-1Z"]||e.6R(),a.A.W3(e));1a t=l(e);if(t.2H&&a.A6&&a.A.A6&&a.A6.AM&&a.A.A6.f8(e),1c!==t&&"1H"===t.1J){1a i=ZC.2L?"6F":e.gp||e.1J;t["1V-6C"]||a.R6("1H",t.fL),a.S7(i,t)}},a.oL=1n(e){ZC.2L&&(a.H.dZ||ZC.3m||(1o.SM(e),a.V0(e)),a.A.P4(e)),a.A6&&a.A.A6&&a.A6.AM&&a.A.A6.fX(e),ZC.2L||a.L6();1a t=l(e);if(1c!==t){1a i=ZC.2L?"6k":e.gp||e.1J;ZC.AK(a.J+"-1H-"+t.1H.id)&&(ZC.AK(a.J+"-1H-"+t.1H.id).1I.3L="8y"),a.S7(i,t)}},a.q6=1n(e){1a t=l(e);t.2H&&a.A6&&a.A.A6&&a.A6.AM&&a.A.A6.hj(e),a.S7(ZC.1b[48],t)},a.V0=1n(e){1a t=l(e);if("9C"!==e.1J){e.gu||a.L6("3H"),a.TP=a.TP||{},a.TP["oD"+t.ek]?(a.TP["oD"+t.ek]=1c,a.L6("3H")):(e.gu||(a.TP={}),a.TP["oD"+t.ek]=1,a.R6("1H",t.fL,"3H")),a.S7("3H",t);1a i=a.BV[t.fL];if(!i)1P(t.1J){1i"2Y-5E":i={E1:a.IZ.E1,FA:a.IZ.FA};1p;1i"2Y-86":i={E1:a.KN.E1,FA:a.KN.FA};1p;1i"2Y-7g":i={E1:a.MU.E1,FA:a.MU.FA}}if(i&&i.E1&&"gr"!==i.E1)if(i.E1 3E 3M)1j(1a n=0;n<i.E1.1f;n++)1c!==ZC.1d(i.FA[n])&&(i.E1[n]=i.E1[n].1F("%id",a.A.J),i.E1[n]=i.E1[n].1F("%4w",a.J.1F(a.A.J+"-2Y-","")),a.UC(e,i.E1[n],i.FA[n]));1u i.E1=i.E1.1F("%id",a.A.J),i.E1=i.E1.1F("%4w",a.J.1F(a.A.J+"-2Y-","")),a.UC(e,i.E1,i.FA)}1u a.S7("9C",t)},ZC.A3("."+a.J+"-1H-1N").4c(ZC.2L?"4H":"6F 7A",a.pf).4c(ZC.2L?"5R":"6k 7T",a.oL).4c(ZC.2L?"6f":ZC.1b[48],a.q6),ZC.2L||ZC.A3("."+a.J+"-1H-1N").4c("3H",a.V0).4c("9C",a.V0));1n n(e){1j(1a t=(e.9D||e.2X.id).1F(/\\-\\-\\d+/g,"").1F(a.J+"-2T-","").1F("-ba-1N","").1F("-1N",""),i=-1,n=1c,l=0,r=a.FC.1f;l<r;l++)if(a.FC[l]&&""+a.FC[l].H1==""+t){i=l,n=a.FC[l]3E R0?a.FC[l].BD:a.FC[l];1p}if(!n&&e.2X.bJ("1V-jI"))1l{gA:e.2X.id,jI:!0,ev:e};if(-1===i)1l 1c;1a o={gA:t,gD:i,2H:n.o.2H?1:0,2T:{id:t,3b:i,2p:n.DG,x:n.iX,y:n.iY,1J:n.DN,vX:n.o["3c-1Q"],2W:n.C,1s:n.I,1M:n.F,2e:n.AH,vZ:n.KZ,2f:n.AA,a2:n.JP},ev:e};1j(1a s in n.o)n.o.8d(s)&&"1V-"===s.2v(0,5)&&(o[s]=n.o[s]);1l o}1n l(n){1a l,r=n.9D||n.2X.id;if(r===a.J+"-5E-1N"||r===a.J+"-86-1N"||r===a.J+"-7g-1N"){1a o=1c,s=-1;1P(l=r.1F(a.J+"-","").1F("-1N","")){1i"5E":o=a.IZ,s=-1;1p;1i"86":o=a.KN,s=-2;1p;1i"7g":o=a.MU,s=-3}1l{1J:"2Y-"+l,ek:o.J,fL:s,1E:o.AN,1H:{id:o.J,3b:s,1E:o.AN},ev:n}}if(-1===r.1L("-1z")||-1===r.1L("-1Q")&&-1===r.1L("-1R")){if(-1!==r.1L("-1T-3C-")){e=r.1F(a.J+ZC.1b[35],"").1F("-1T-3C-1N",""),t=e.2n("-2r-");1a A=a.AZ.A9[ZC.1k(t[0])].FP(ZC.1k(t[1]));1l A?{1J:ZC.1b[17],ek:"w4"+t.2M("1b"),3W:ZC.1k(t[0]),5T:ZC.1k(t[1]),1E:A.AE,1H:{id:"w4"+t.2M("1b"),1E:A.AE},ev:n}:1c}e=r.1F(a.J+"-1H-","").1F("-1N","");1j(1a C=-1,Z=1c,c=0,p=a.BV.1f;c<p;c++)if(""+a.BV[c].H1==""+e){C=c,Z=a.BV[c];1p}if(i=-1===C?"":a.BV[C].AN,-1===C)1l 1c;1a u={1J:"1H",ek:e,fL:C,1E:i,2H:Z.o.2H?1:0,1H:{id:e,3b:C,2p:Z.DG,x:Z.iX+Z.BJ,y:Z.iY+Z.BB,1s:Z.I,1M:Z.F,1E:i},ev:n};1j(1a h in Z.o)Z.o.8d(h)&&"1V-"===h.2v(0,5)&&(u[h]=Z.o[h]);1l u}e=r.1F(a.J+"-","").1F("-1N","");1a 1b=(t=e.2n("-"))[1].2n("1b"),d=0;2===1b.1f?d=ZC.1k(1b[1]):3===1b.1f&&(d=ZC.1k(1b[2]));1a f,g=t[0].1F(/1b/g,"-"),B=a.BK(g);1l-1!==r.1L("-1Q")?(l="1z-1Q",f="16C"+t[1].1F("7y",""),i=B.BV[d]||B.Y[d],"16B"===f&&(i=B.M.AN)):(l="1z-1R",f="16A"+t[1].1F("aM",""),i=B.E["xY"+d]||""),{1J:l,ek:f,fL:d,1z:g,1E:i,2H:B.o.2H||B.o.1Q&&B.o.1Q.2H?1:0,1H:{id:f,3b:d,1E:i},ev:n}}},JY.5j.S7=1n(e,t){ZC.2E(1g.HV(),t),t.ev=ZC.A3.BZ(t.ev),ZC.AO.C8("16y"+e,1g.A,t)},JY.5j.S8=1n(e,t){ZC.2E(1g.HV(),t),t.ev=ZC.A3.BZ(t.ev),ZC.AO.C8("16q"+e,1g.A,t)},JY.5j.OG=1n(e){1a t,i,a=1g;if("3e"==1y e){1a n={},l=e.2n(":");if(2===l.1f){n.1J=l[0];1j(1a r=0,o=(l=l[1].2n(/\\s|,|;/)).1f;r<o;r++){1a s=l[r].2n("=");n[s[0]]=s[1]}}e=n}1a A=[-1,-1];1P(a.E.Fw=!0,e.1J){1i"1z":1a C,Z,c,p="",u=-1,h=1c;if(1c!==ZC.1d(t=e.8C)&&(p=t),1c!==ZC.1d(t=e.3b)&&(u=ZC.1k(t)),1c!==ZC.1d(t=e[ZC.1b[9]])&&(h=ZC.1k(t)),i=1c,""===p&&(p=ZC.1b[50]),i=a.BK(p))1P(i.GY&&-1!==u?c=i.GY(u):i.B2&&(1c!==ZC.1d(h)?c=i.B2(h):-1!==u&&(c=i.B2(i.Y[u]))),a.AJ.3x){1i"7d":1i"8D":C=c[0],Z=c[1];1p;1i"xy":"k"===i.AF?(C=c,Z=i.iY,"2q"===i.B7&&(Z+=i.F)):"v"===i.AF&&(Z=c,C=i.iX,"5w"===i.B7&&(C+=i.I));1p;1i"yx":"k"===i.AF?(Z=c,C=i.iX,"5w"===i.B7&&(C+=i.I)):"v"===i.AF&&(C=c,Z=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c!==ZC.1d(e.8x.6j)&&e.8x.6j.4x()});a.Q8=!0,2w.5Q(1n(){C.2P(p)},33)}c=!0};if(C){1a b=!1,m=!1;1j(o=0,s=Z.1f;o<s;o++){if(1c!==ZC.1d(Z[o].mP)&&(A=a.o[Z[o].mP+"s"]),A)1j(p=0,u=A.1f;p<u;p++)1c!==ZC.1d(Z[o].id)&&1c!==ZC.1d(A[p].id)&&A[p].id===Z[o].id&&v(Z[o],A[p]);1c!==ZC.1d(Z[o].8x)?b=!0:m=!0,m&&b&&a.PK()}}1u if(i.6a)1j(p=0,u=A.1f;p<u;p++)A[p].6a===i.6a&&(Z.id=A[p].id,v(Z,A[p]));1u if(i.2p)1j(p=0,u=A.1f;p<u;p++)A[p].2p===i.2p&&(Z.id=A[p].id,v(Z,A[p]));1u 1j(e=Z.id||i.id,p=0,u=A.1f;p<u;p++)1c!==ZC.1d(A[p].id)&&1c!==ZC.1d(e)&&A[p].id===e&&(Z.id=e,v(Z,A[p]));!c||!d&&a.Q8||a.Q8||(a.O4(),a.PU(f))}i.5F&&"1n"==1y i.5F&&i.5F(i);1p;1i"16t":(a=g.C5(i[ZC.1b[3]]))&&(a.O4(),a.PU(f)),i.5F&&"1n"==1y i.5F&&i.5F(i);1p;1i"16s":if(i["1O"]&&(i.2p=i["1O"]),l=[],(a=g.C5(i[ZC.1b[3]]))&&i.2p){n=i.1J||"1H",A=a.o[n+"s"]||[];1a E=i.2p 3E 3M?i.2p:[i.2p];1j(o=0,s=A.1f;o<s;o++)-1===ZC.AU(E,A[o].2p)&&-1===ZC.AU(E,A[o]["1O"])||1c===ZC.1d(A[o].id)||l.1h(A[o].id)}1l l;1i"m6":1a D={x:"iX",y:"iY",1s:"I",1M:"F",1r:"C1",ir:"B9",cv:"AX",eU:"BU",eS:"AP",eP:"A0",f4:"AD",2e:"AH",1J:"DN",1E:"AN",6S:"DE",6G:"KQ",wL:"EP",mO:"BJ",mS:"BB"};if(a=g.C5(i[ZC.1b[3]]),n=i.1J||"1H",e=i.id||"",a&&""!==e){1b=[],"1H"===n?1b=a.BV:"2T"===n&&(1b=a.FC);1a J=1c;1j(o=0,s=1b.1f;o<s;o++)1b[o].H1===e&&(J=1b[o]);if(J){1a F={};if("2T"===n){if(J.M)1j(h in F.1H={},D)F.1H[h]=J.M[D[h]];J.BD&&(J=J.BD)}1j(h in D)F[h]=J[D[h]];1l F}}1l 1c;1i"16r":1o.dI="5f",i.4E&&"7J"===i.4E&&(1o.dI="7J");1p;1i"17n":ZC.bf=!1,i.4E&&"2K"===i.4E&&(ZC.bf=!0)}1l 1c},JY.5j.q1=1n(){1a e,t,i=1g,a=0;1j(e=0,t=i.BL.1f;e<t;e++)"k"===i.BL[e].AF&&i.o[i.BL[e].BC]&&i.o[i.BL[e].BC][ZC.1b[5]]&&(a=ZC.BM(a,i.o[i.BL[e].BC][ZC.1b[5]].1f));1j(e=0,t=i.AZ.A9.1f;e<t;e++)1c!==ZC.1d(i.o[ZC.1b[11]][e])&&i.o[ZC.1b[11]][e][ZC.1b[5]]&&(a=ZC.BM(a,i.o[ZC.1b[11]][e][ZC.1b[5]].1f));1l a},JY.5j.XI=1n(){1a e,t=1g;if(t.HO)1j(1a i=t.q1(),a=0,n=t.BL.1f;a<n;a++)"k"===t.BL[a].AF&&(t.BL[a].D8?(e=(t.BL[a].F-t.BL[a].A7-t.BL[a].BY)/ZC.1k(t.HO["1X-9F"]),t.BL[a].OO=ZC.BM(0,t.BL[a].F-i*e)):(e=(t.BL[a].I-t.BL[a].A7-t.BL[a].BY)/ZC.1k(t.HO["1X-9F"]),t.BL[a].OO=ZC.BM(0,t.BL[a].I-i*e)),ZC.2s(t.HO["8T-1z"])&&(t.BL[a].OO=0),t.BL[a].A7=t.BL[a].s5+t.BL[a].OO,t.A.E[t.BL[a].BC+"-bK-2c-4e"]=t.BL[a].A7,t.BL[a].V=ZC.BM(0,t.BL[a].A1-t.HO["1X-9F"]+1),t.BL[a].GT())},JY.5j.pi=1n(){1a s=1g,G,MQ,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J+"."+BC,""+DF[BC]))}1j(i=0,A2=s.AZ.A9.1f;i<A2;i++)if(1c!==ZC.1d(s.o[ZC.1b[11]][i])){1a gt=1c;1c!==ZC.1d(G=DF["1A-"+i])?gt=G:1c!==ZC.1d(G=DF["1A"+i])&&(gt=G),"xy"===s.AJ.3x||"yx"===s.AJ.3x?(s.H.o[ZC.1b[16]][s.L][ZC.1b[11]][i][ZC.1b[5]].1h(gt),!lE&&s.H.o[ZC.1b[16]][s.L][ZC.1b[11]][i][ZC.1b[5]].1f>ZC.1k(s.HO["1X-9F"])&&s.H.o[ZC.1b[16]][s.L][ZC.1b[11]][i][ZC.1b[5]].6r(0,1)):s.H.o[ZC.1b[16]][s.L][ZC.1b[11]][i][ZC.1b[5]]=[gt],ZC.oY&&p3&&(G=DF["1A"+i],"4h"==1y G&&(G=G.2M("###")),ZC.AO.gq.1h("1o.1A."+s.J+".1A"+i,""+G)),(s.o[ZC.1b[11]][i][ZC.1b[5]].1f>pu||1===s.O5[1])&&(ZC.AO.C8("16u",s.A,s.HV(),DF),s.H.o[ZC.1b[16]][s.L][ZC.1b[11]][i][ZC.1b[5]]=[])}MQ=s.q1()}("9w"===s.MF||s.G9)&&(1===s.O5[1]&&(s.O5[1]=0),(MQ<=q5||0===q5)&&(s.MF="bK",ZC.e3(1n(){ZC.AK(s.A.J+"-3Y")&&(ZC.AO.C8("16w",s.H,s.HV(),s.o),s.1q(),s.3j(!0),s.XI(),s.1t(!0,!0))})))};if("7h"===hz||"js"===hz){1a E1=s.HO.3R;ZC.eI[s.J]=2w.5Q(1n(){if(1===s.O5[0])if(s.A.MM(s),"7h"===hz){1a F5=["g5-3e"===s.A.N3?"eK="+1B.cb():"",1o.hd?"lx="+s.H.AB:""].2M("&");ZC.A3.a8({1J:"bL",3R:E1,ej:1n(e){s.A.S0.1V||"7h-f0"!==s.A.N3||e.cn(ZC.1b[45],"cl, 8H ci dJ 6X:6X:6X dF")},1V:F5,pK:"1E",4L:1n(){},aF:1n(e){mv(e)}})}1u if("()"===E1.2v(E1.1f-2)||"7u:"===E1.2v(0,11))4J{1a EF=E1.1F("7u:","").1F("()","");7l(EF)&&7l(EF).4x(s,1n(e){mv(e)},s.HV())}4M(e){}},OW)}1u"hC"===hz&&ZC.hC&&(s.H.SJ[s.J]?"mn"===s.HO.9Q&&(ZC.eI[s.J]=2w.5Q(1n(){s.H.SJ[s.J].8f("1o.ho")},OW)):(ws=1m pP(s.HO.3R,"1o"),ws.uy=1n(){ws.8f("1o."+s.HO.1J),ws.8f("1o."+s.HO.9Q),ws.8f("1o.oc"),"mn"===s.HO.9Q&&ws.8f("1o.ho")},ws.vc=1n(e){1===s.O5[0]&&mv(e.1V)},s.H.SJ[s.J]=ws))}}},1o.nw=1n(e,t,i){1a a;2g.cP("zc-5X")&&(e="zc-5X"),"3e"==1y(i=i||{})&&(i=3h.1q(i));1a n=1o.6Z(e);if(n){1a l=n.C5(i[ZC.1b[3]]);1P(t){1i"16D":l.O5[1]=1;1p;1i"16E":1l l.HO.dU;1i"16F":ZC.AO.C8("16G",n,l.HV()),l.o.d0=l.o.d0||{},l.o.d0.dU=i.dU||1;1p;1i"my":1===l.O5[0]&&(ZC.AO.C8("16z",n,l.HV()),l.O5[0]=0,1c!==ZC.1d(a=n.SJ[l.J])&&a.8f("1o.my"));1p;1i"oc":0===l.O5[0]&&(ZC.AO.C8("16o",n,l.HV()),l.O5[0]=1,1c!==ZC.1d(a=n.SJ[l.J])&&a.8f("1o.oc"),ZC.e3(1n(){l.1q(),l.3j(!0),l.XI(),l.1t(!0,!0)}))}}1l 1c},ZC.AO.oq=1n(e){1j(1a t={},i=[],a=0,n=(i="4h"==1y e?e:3h.1q(e)).1f;a<n;a++)if(1c!==ZC.1d(e=i[a])){t["p"+a]={};1a l=[];if("4h"==1y e)l=e;1u if("3e"==1y e&&/\\d+\\-\\d+/.5U(e)){1a r=e.2n("-");if(2===r.1f){l=[];1j(1a o=ZC.1k(r[0]);o<=ZC.1k(r[1]);o++)l.1h(o)}}1u l=[e];1j(1a s=0,A=l.1f;s<A;s++)t["p"+a]["n"+l[s]]=!0}1l t},JY.5j.ok=1n(){1a e,t=1g;1c!==ZC.1d(e=t.o.aL)&&(t.D9=ZC.AO.oq(e),t.o.aL=1c)},1o.op=1n(e,t,i){1a a,n,l,r,o,s,A,C,Z;2g.cP("zc-5X")&&(e="zc-5X"),"3e"==1y(i=i||{})&&(i=3h.1q(i));1a c=1o.6Z(e);if(c)1P(t){1i"16n":if(n=c.C5(i[ZC.1b[3]])){1j(n.D9={},l=0,r=n.AZ.A9.1f;l<r;l++)n.KS[l]=!1;n.HG=!0,n.fQ(),n.K2(!0,!0)}1p;1i"16a":if(n=c.C5(i[ZC.1b[3]])){1j(s=[],l=0,r=n.AZ.A9.1f;l<r;l++)if(s[l]=1c,1c!==ZC.1d(n.D9["p"+l])){1a p=[];1j(A in n.D9["p"+l])n.D9["p"+l].8d(A)&&n.D9["p"+l][A]&&p.1h(ZC.1k(A.1F("n","")));s[l]=p}1l s}1l{};1i"16b":1a u={};s=[],1c!==ZC.1d(a=i.aL)&&(u=ZC.AO.oq(a)),(n=c.C5(i[ZC.1b[3]]))&&(n.D9=u,n.HG=!0,n.fQ(),n.K2(!0,!0));1p;1i"9P":1i"nP":1a h=[],1b=1n(e){1a i=!1;1c!==ZC.1d(a=e.a9)&&(i=ZC.2s(a));1a n=c.C5(e[ZC.1b[3]]);if(n){1j(l=0,r=n.AZ.A9.1f;l<r;l++)n.KS[l]=!1;1a s=1c,p=1c;if(1c!==ZC.1d(a=e.3W))if("4h"==1y a)s=a;1u if("3e"==1y a&&/\\d+\\-\\d+/.5U(a)){if(2===(o=a.2n("-")).1f)1j(s=[],Z=ZC.1k(o[0]);Z<=ZC.1k(o[1]);Z++)s.1h(Z)}1u s=[a];if(1c!==ZC.1d(a=e.5T))if("4h"==1y a)p=a;1u if("3e"==1y a&&/\\d+\\-\\d+/.5U(a)){if(2===(o=a.2n("-")).1f)1j(p=[],Z=ZC.1k(o[0]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y-aM","").1F("-1N",""));if(t.o[ZC.1b[11]]&&t.o[ZC.1b[11]][C]){if(1c!==ZC.1d(e=t.o[ZC.1b[11]][C]["1Y-1Q"])){1a Z=e.3R||"",c=e.2X||"";""!==Z&&t.UC(i,Z,c)}t.o[ZC.1b[11]][C].2h=!0}1a p=t.AZ.A9[C].YH(i);if(p.2h=ZC.2s(t.E["1A"+C+".2h"]),ZC.AO.C8("16g"+s+"16h",t.A,p),t.BG.TO)1j(a=0,n=t.H.AI.1f;a<n;a++){1a u=t.H.AI[a];u.BG&&u.BG.TO&&u.BG.lY===t.BG.lY&&u.J!==t.J&&u.QI({"cI-1Y":!0,K2:1,3W:C,"a9-93":A})}1P(A){2q:1p;1i"5b":1i"3p":if(i.Fx){1a h=0;1j(a=0,n=t.AZ.A9.1f;a<n;a++)a!==C&&(l=++h===n-1,t.QI({"cI-1Y":o,K2:l,3W:a,"a9-93":A}))}1u t.QI({"cI-1Y":o,K2:1,3W:C,"a9-93":A})}"5b"===A&&t.E.Fw&&(t.O4(),t.PU())}},ZC.A3("."+t.J+"-1Y-1Q-1N").4c("6k 4H",t.SX).4c("g9",t.9m).4c("aD",t.9m),ZC.A3("."+t.J+"-1Y-1R-1N").4c("6k 4H",t.SX).4c("g9",t.9m).4c("aD",t.9m),ZC.A3("#"+t.J+"-1Y-9M").4c("g9",t.9m).4c("aD",t.9m),ZC.2L||(ZC.A3("."+t.J+"-1Y-1Q-1N").4c(ZC.P.BZ("7A"),t.QV).4c(ZC.P.BZ("7T"),t.RC).4c(ZC.P.BZ(ZC.1b[48]),t.PS),ZC.A3("."+t.J+"-1Y-1R-1N").4c(ZC.P.BZ("7A"),t.QV).4c(ZC.P.BZ("7T"),t.RC).4c(ZC.P.BZ(ZC.1b[48]),t.PS)))}}};1O Fp 2k JY{2G(e){1D(e);1a t=1g;t.AF="1c",t.AJ.3t=!0,t.AJ[ZC.1b[23]]=!0,t.AJ[ZC.1b[56]]=!0}}1O Gb 2k JY{2G(e){1D(e);1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",t.AJ[ZC.1b[23]]=!0,t.AJ[ZC.1b[56]]=!1,t.AJ["4U-1Z"]=!0,t.AZ=1m Eh(t)}F4(e){1P(e){1i"x":1l 1m VD(1g);1i"y":1l 1m VE(1g)}}}1O qh 2k JY{2G(e){1D(e),1g.AF="3O",1g.AZ=1m pW(1g)}NG(){1l""}F4(e){1P(e){1i"m":1l 1m YG(1g);1i"v":1l 1m ZX(1g);1i"r":1l 1m tR(1g)}}O3(){1a e=1g,t=e.F4("m","1z"),i=e.F4("v",ZC.1b[52]),a=e.F4("r","1z-r");t.BC="1z",t.J=e.J+"-1z",e.o[ZC.1b[11]]&&e.o[ZC.1b[11]].1f&&e.o[ZC.1b[11]][0][ZC.1b[5]]&&(t.NH="1x"+e.o[ZC.1b[11]][0][ZC.1b[5]].1f),i.BC=ZC.1b[52],i.J=e.J+"-1z-v",a.BC="1z-r",a.J=e.J+"-1z-r",e.BL.1h(t,i,a),1D.O3()}ns(){-1!==ZC.AU(["2F","3K"],1g.H.AB)&&ZC.A3("#"+1g.J+" .zc-6p").5d(1n(){/\\-1A-\\d+\\-bl\\-\\d+\\-/.5U(1g.id)&&ZC.A3(1g).9z().5d(1n(){/\\-8O\\-2R/.5U(1g.id)&&ZC.P.ER(1g)})})}}1O Dj 2k JY{2G(e){1D(e);1a t=1g;t.AF="8S",t.AZ=1m Ef(t)}NG(){1l""}F4(e){1P(e){1i"m":1l 1m YG(1g)}}O3(){1a e=1g,t=e.F4("m","1z");t.BC="1z",t.J=e.J+"-1z",e.BL.1h(t),1D.O3()}}1O Dl 2k JY{2G(e){1D(e);1a t=1g;if(t.AF="7d",t.AJ.3x="7d",t.AZ=1m Eb(t),-1!==ZC.AU(t.A.J,"pR")){1j(1a i=1,a=0;a<t.A.MD.dW.1f;a++)i=ZC.BM(i,t.A.MD.dW[a][ZC.1b[5]].1f);i=1B.43(2m/i).a5(),1c===ZC.1d(t.A.MD.1A)?t.A.MD.1A={76:"1N"}:ZC.2E({76:"1N"},t.A.MD.1A),1c===ZC.1d(t.A.MD["1z-k"])?t.A.MD["1z-k"]={76:"3z",5I:"%v\\Do",6g:"0:Di:"+i}:ZC.2E({76:"3z",5I:"%v\\Do",6g:"0:Di:"+i},t.A.MD["1z-k"],!0)}}NG(){1l""}F4(e){1a t=1g;1P(e){1i"m":1l 1m YG(t);1i"k":1l 1m Ch(t);1i"v":1l 1m BQ(t)}}O3(){1a e=1g,t=e.F4("k","1z-k");t.BC="1z-k",t.J=e.J+"-1z-k",e.BL.1h(t);1a i=e.F4("v",ZC.1b[52]);i.BC=ZC.1b[52],i.J=e.J+"-1z-v",e.BL.1h(i);1a a=e.F4("m","1z");a.BC="1z",a.J=e.J+"-1z",e.BL.1h(a),1D.O3()}}1O Dr 2k lu{2G(e){1D(e);1a t=1g;t.AF="8i",t.AZ=1m Er(t),t.AJ[ZC.1b[55]]=!1}}1O Ds 2k lv{2G(e){1D(e);1a t=1g;t.AF="7R",t.AJ.3x="yx",t.AZ=1m Ej(t),t.AJ[ZC.1b[55]]=!1}}1O Dx 2k NL{2G(e){1D(e);1a t=1g;t.AF="5V",t.AZ=1m Es(t),t.AJ[ZC.1b[55]]=!1,t.AJ["4U-1Z"]=!0}UQ(e){1a t=1g;if("v"===e){1a i=[];if(t.o[ZC.1b[11]]&&t.o[ZC.1b[11]].1f)1j(1a a=0;a<t.o[ZC.1b[11]].1f;a++)i.1h(t.o[ZC.1b[11]][a].1E||"16m "+(a+1));1l i}}F4(e){1P(e){1i"x":1a t=1m TC(1g);1l t.DI=!0,t;1i"y":1a i=1m TD(1g);1l i.DI=!0,i.1C({6z:1,"7a-6z":!0}),i}}}1O Dg 2k NL{2G(e){1D(e);1a t=1g;t.AF="aA",t.AZ=1m Fk(t),t.AJ[ZC.1b[55]]=!1,t.AJ["4U-cF"]=!1,t.AJ["4U-1Z"]=!1}F4(e,t){1P(e){1i"x":1a i=1D.F4(e,t);1l i.DI=!0,i;1i"y":1a a=1D.F4(e,t);1l a.DI=!0,a}}UQ(e){if("v"===e){1j(1a t=[],i=0;i<1g.o[ZC.1b[11]].1f;i++)t.1h("Co "+(i+1));1l t}}1t(){1j(1a e=1g,t=0,i=e.BL.1f;t<i;t++)"v"===e.BL[t].AF&&(e.BL[t].AT=!e.BL[t].AT);1D.1t()}}1O Cw 2k NL{2G(e){1D(e);1a t=1g;t.AF="aB",t.AZ=1m Fi(t),t.AJ[ZC.1b[55]]=!1,t.AJ["4U-cF"]=!1,t.AJ["4U-1Z"]=!1}UQ(e){if("v"===e){1j(1a t=[],i=0;i<1g.o[ZC.1b[11]].1f;i++)t.1h("Co "+(i+1));1l t}}F4(e){1P(e){1i"x":1a t=1m VD(1g);1l t.DI=!0,t;1i"y":1a i=1m VE(1g);1l i.DI=!0,i}}}1O Cp 2k NL{2G(e){1D(e);1a t=1g;t.AF="84",t.AZ=1m Fg(t),t.AJ[ZC.1b[23]]=!0,t.AJ[ZC.1b[55]]=!1,t.AJ["4U-1Z"]=!0,t.AJ[ZC.1b[56]]=!0}F4(e,t){1P(e){1i"x":1a i=1D.F4(e,t);1l i.DI=!0,i;1i"y":1l 1D.F4(e,t)}}}1O Cr 2k JY{2G(e){1D(e);1a t=1g;t.AF="8D",t.AJ.3x="8D",t.AZ=1m Ff(t)}NG(){1l""}F4(e){1a t=1g;1P(e){1i"m":1l 1m YG(t);1i"r":1l 1m By(t);1i"v":1l 1m ZX(t)}}O3(){1a e,t=1g,i=t.F4("m","1z");1j(i.BC="1z",i.J=t.J+"-1z",t.BL.1h(i),e=2;e<10;e++)if(1c!==ZC.1d(t.o["1z-"+e])){1a a=t.F4("m","1z-"+e);a.L=e,a.BC="1z-"+e,a.J=t.J+"-1z-"+e,t.BL.1h(a)}1a n=t.F4("r","1z-r");1j(n.BC="1z-r",n.J=t.J+"-1z-r",t.BL.1h(n),e=2;e<10;e++)if(1c!==ZC.1d(t.o["1z-r-"+e])){1a l=t.F4("r","1z-r-"+e);l.L=e,l.BC="1z-r-"+e,l.J=t.J+"-1z-r-"+e,t.BL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2h"]),!a.A9[t].J1&&(a.D.E["1A"+t+".2h"]||"5b"===a.D.7O())){a.A9[t].CB?(-1===(d=ZC.AU(p,a.A9[t].DU))&&(p.1h(a.A9[t].DU),d=p.1f-1),1c===ZC.1d(c[d])?c[d]=[t]:c[d].1h(t)):(p.1h(-1),d=p.1f-1,1c===ZC.1d(c[d])?c[d]=[t]:c[d].1h(t));1a f=a.A9[t].AF;if(a.A9[t].o.1J&&f!==a.A9[t].o.1J){1a g=f.1L("3d"),B=a.A9[t].o.1J.1L("3d");(-1===g&&-1!==B||-1===g&&-1===B)&&(f=a.A9[t].o.1J)}-1!==ZC.AU(["2U","dN","g7"],f)&&(f="v"+f),-1===ZC.AU(["5t","6c","8i","7R","84","6O","7k"],f)||a.A9[t].J1||(1c===ZC.1d(u[f])&&(u[f]=[]),1c===ZC.1d(h[f])&&(h[f]=[]),a.A9[t].CB?(1c===ZC.1d(Z[a.A9[t].DU])?Z[a.A9[t].DU]=1:Z[a.A9[t].DU]++,-1===(1b=ZC.AU(h[f],a.A9[t].DU))&&(h[f].1h(a.A9[t].DU),1b=h[f].1f-1),1c===ZC.1d(u[f][1b])?u[f][1b]=[t]:u[f][1b].1h(t)):(h[f].1h(-1),1b=h[f].1f-1,1c===ZC.1d(u[f][1b])?u[f][1b]=[t]:u[f][1b].1h(t)))}if(a.KC=c,a.K4=u,a.X6)1j(1a v in a.X6)a.X6[v].4i();1j(a.kc=[],t=0;t<a.KC.1f;t++)a.kc.1h(a.KC[t][a.KC[t].1f-1])}1t(){1a e=1g;1n t(i){1a a=e.PA[i];(e.A9[a].IE||e.A9[a].DY.1f&&e.A.BI||"2b"!==e.A9[a].JF)&&(e.H.O9=!1),e.iU=!0;1a n=e.D.7O();e.D.AJ["3d"]?e.D.E["1A"+a+".2h"]&&(e.A9[a].1t(),e.H.XV()):(e.D.E["1A"+a+".2h"]||"5b"===n)&&(1y e.D.E["1A-"+a+"-h6-ou"]!==ZC.1b[31]&&(e.A9[a].TZ=0),e.A9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I(){1a e=1m QX(1g);1l e.OT=!0,e}}1O mW 2k LR{HI(){1l 1m QY(1g)}}1O mH 2k LR{HI(){1l 1m QZ(1g)}}1O ZU 2k LR{HI(e){1a t=1g;1P(e){2q:1l 1m QW(t);1i"bj":1a i=1m QW(t);1l i.OT=!0,i;1i"4C":1a a=1m PH(t);1l a.kB=!0,a.dT="4C",a;1i"1N":1l 1m QX(t);1i"bv":1a n=1m QX(t);1l n.OT=!0,n;1i"2U":1i"5t":1l 1m QY(t);1i"6c":1l 1m QZ(t);1i"6v":1l 1m PH(t);1i"8r":1l 1m PH(t,"8r");1i"5m":1l 1m S6(t);1i"6V":1l 1m S6(t,"6V");1i"84":1l 1m VW(t);1i"5z":1l 1m UJ(t);1i"97":1l 1m V3(t);1i"83":1l 1m V4(t);1i"dN":1i"6O":1l 1m V2(t);1i"g7":1i"8i":1l 1m TU(t);1i"7R":1l 1m TV(t)}}}1O El 2k LR{HI(){1l 1m PH(1g)}}1O 178 2k LR{HI(){1a e=1m PH(1g);1l e.kB=!0,e.dT="4C",e}}1O Ei 2k LR{HI(){1l 1m PH(1g,"8r")}}1O Ea 2k LR{HI(){1l 1m S6(1g)}}1O Eh 2k LR{HI(){1l 1m S6(1g,"6V")}}1O pW 2k LR{2G(e){1D(e);1a t=1g;t.KM=[],t.PC=[],t.U2=[]}HI(){1l 1m WO(1g)}lJ(e){1a t,i,a,n,l=1g;e&&(l.U2=[],l.PC=[]);1a r,o=l.A.BK("1z-r"),s=l.A.BK("1z"),A=.9,C=1;l.A9.1f>=10&&(C=1),l.A9.1f>=20&&(C=1.25),l.A9.1f>=30&&(C=1.5);1a Z=o.DK;1j(t=0,i=l.A9.1f;t<i;t++)1c!==ZC.1d(l.A9[t].o["3T-2f"])&&(Z=l.A9[t].DK);1j(t=0,i=l.A9.1f;t<i;t++)if(l.D.E["1A"+t+".2h"]||"5b"===l.D.7O())1j(1a c=0,p=l.A9[t].R.1f;c<p;c++)if(l.A9[t].R[c]){l.YP["n"+c]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][i]=h*ZC.AQ.n1(A[i].AE,A[i].X1,A[i].X0),v[e][i]=A[i].iX-ZC.BM(d,f)/2,b[e][i]=A[i].iY+A[i].F/4):1===e?(B[e][i]=h*ZC.AQ.n1(A[i].AE,A[i].X1,A[i].X0),v[e][i]=v[0][i]+B[0][i],b[e][i]=b[0][i],2===u&&(g=(v[0][i]-d-(Z.GG-(v[1][i]+f)))/2,C.A9[e-1].R[i].iX-=g,v[1][i]-=g,C.EB[0][i].x-=g,C.NZ[i][0][0]-=g,C.A9[e-1].R[i].iY=Z.iY+Z.GA/2,b[1][i]=Z.iY+Z.GA/2,C.EB[0][i].y=Z.iY+Z.GA/2)):2===e&&(B[e][i]=h*ZC.AQ.n1(A[i].AE,A[i].X1,A[i].X0),r=(B[0][i]*B[0][i]-B[1][i]*B[1][i]+B[2][i]*B[2][i])/(2*B[0][i]),v[e][i]=v[0][i]+r,o=1B.5C(B[2][i]*B[2][i]-r*r),b[e][i]=b[0][i]-o,3===u&&(g=(v[0][i]-d-(Z.GG-(v[1][i]+f)))/2,C.A9[0].R[i].iX-=g,C.A9[1].R[i].iX-=g,C.EB[0][i].x-=g,C.EB[1][i].x-=g,C.NZ[i][0][0]-=g,v[2][i]-=g)),A[i].iX=v[e][i]+Z.iX,A[i].iY=b[e][i],A[i].I=h*1B.5C(A[i].AE/1B.PI),A[i].F=h*1B.5C(A[i].AE/1B.PI),A[i].AH=h*1B.5C(A[i].AE/1B.PI),1c===ZC.1d(E)&&(E=A[i].AE/(1B.PI*A[i].AH*A[i].AH));1a D=h*1B.5C(A[i].AE/1B.PI),J=h*1B.5C(A[i].X1/1B.PI),F=D+J-B[e][i],I=(2*F*J-F*F)/(2*(D+J-F)),Y=F-I;if(C.EB[e][i]={x:v[e][i],y:b[e][i],sz:A[i].AH,r1:D,r2:J,dH:Y,ef:I},0===e?(o=1B.5C(D*D-(D-I)*(D-I)),C.NZ[i].1h([v[0][i]+D-I,b[0][i]-o])):2===e&&(D=C.EB[1][i].r1,J=C.EB[1][i].r2,Y=C.EB[1][i].dH,I=C.EB[1][i].ef,l=ZC.UE(1B.o4((b[1][i]-b[2][i])/B[1][i]))-ZC.UE(1B.mU((D-I)/D)),C.NZ[i].1h([v[1][i]-D*ZC.EC(l)-g,b[1][i]-D*ZC.EH(l)]),D=C.EB[2][i].r1,J=C.EB[2][i].r2,Y=C.EB[2][i].dH,I=C.EB[2][i].ef,l=ZC.UE(1B.o4((b[0][i]-b[2][i])/B[2][i]))-ZC.UE(1B.mU((J-Y)/J)),C.NZ[i].1h([v[0][i]+J*ZC.EC(l)-g,b[0][i]-J*ZC.EH(l)])),e===u-1)if(3===u){if(1c!==ZC.1d(C.A9[0].jR[i]))C.XM[i].1N=C.A9[0].jR[i];1u{1a x=[-1],X=[-1];x[1]=1b(C.NZ[i][0],C.NZ[i][2]),x[2]=1b(C.NZ[i][0],C.NZ[i][1]),x[3]=1b(C.NZ[i][2],C.NZ[i][1]),X[1]=C.EB[0][i].sz,X[2]=C.EB[1][i].sz,X[3]=C.EB[2][i].sz;1a y=.25*1B.5C((x[1]+x[2]+x[3])*(x[1]+x[2]-x[3])*(x[1]+x[3]-x[2])*(x[2]+x[3]-x[1]));1j(s=1;s<=3;s++)y+=X[s]*X[s]*1B.o4(x[s]/(2*X[s]))-x[s]/4*1B.5C(4*X[s]*X[s]-x[s]*x[s]);C.XM[i].1N=E*y}C.EB[0][i].eW=ZC.AQ.hD(C.EB[0][i].x,C.EB[0][i].y,C.EB[1][i].x,C.EB[1][i].y,C.EB[0][i].r1-(C.EB[0][i].dH+C.EB[0][i].ef)/2),C.EB[1][i].eW=ZC.AQ.hD(C.EB[1][i].x,C.EB[1][i].y,C.EB[2][i].x,C.EB[2][i].y,-(C.EB[1][i].r1-(C.EB[1][i].dH+C.EB[1][i].ef)/2)),C.EB[2][i].eW=ZC.AQ.hD(C.EB[2][i].x,C.EB[2][i].y,C.EB[0][i].x,C.EB[0][i].y,-(C.EB[2][i].r1-(C.EB[2][i].dH+C.EB[2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0,t.FS=1c,t.IR=!1,t.Z0=!0,t.o8=!1,t.YB=1,t.Z2=0,t.IA=!1,t.LF=!1,t.l2="2r",t.LY=!1,t.R8=-1,t.RT=0,t.QG=!1,t.GL=[1c,1c,1c,1c],t.PP="1w"}kx(){1a e,t=1g;1c!==ZC.1d(e=t.E["l-2o"])&&1c===ZC.1d(t.JU.2o)&&(t.C4=e),1c!==ZC.1d(e=t.E["bg-2o"])&&1c===ZC.1d(t.JU["2o-1N"])&&(t.o["2o-1N"]=e)}FP(e,t){1a i=1g;1l(1y t===ZC.1b[31]||!i.GL[t]&&i.GL[1])&&(t=1),e=5v(e,10),!i.IR||"xy"!==i.D.AJ.3x&&"yx"!==i.D.AJ.3x?i.R[e]:i.R[e]&&i.GL[t]?(i.GL[t].J=i.J+"-2r-"+e,i.GL[t].o={1T:i.Y[e]},"3e"==1y i.Y[e]&&(i.GL[t].hu=!0),i.GL[t].L=e,"1w"!==i.AF&&"1N"!==i.AF&&"bj"!==i.AF&&"bv"!==i.AF||i.U?i.GL[t].1q():1c===i.R[e].BW&&1y i.D.E["1A-"+i.L+"-h6-ou"]===ZC.1b[31]||i.GL[t].1q(),"1w"===i.AF||"1N"===i.AF||"bj"===i.AF||"bv"===i.AF?"xy"===i.D.AJ.3x?(1c!==i.R[e].BW?i.GL[t].iX=i.R[e].iX=i.B1.B2(i.R[e].BW):i.GL[t].iX=i.R[e].iX=i.B1.GY(e),i.CB&&"100%"===i.KR?i.GL[t].iY=i.R[e].iY=i.CK.B2(100*i.R[e].CL/i.A.F3[e]["%6l-"+i.DU]):i.GL[t].iY=i.R[e].iY=i.CK.B2(i.R[e].CL)):(1c!==i.R[e].BW?i.GL[t].iY=i.R[e].iY=i.B1.B2(i.R[e].BW):i.GL[t].iY=i.R[e].iY=i.B1.GY(e),i.CB&&"100%"===i.KR?i.GL[t].iX=i.R[e].iX=i.CK.B2(100*i.R[e].CL/i.A.F3[e]["%6l-"+i.DU]):i.GL[t].iX=i.R[e].iX=i.CK.B2(i.R[e].CL)):i.GL[t].RV(),i.GL[t].K0=i.R[e].K0,i.GL[t]):1c}TE(e,t){1a i=1g;i.K5[e]||(i.K5[e]=[]),(!i.IR||i.IR&&-1===ZC.AU(i.K5[e],t))&&i.K5[e].1h(t)}FX(){1l 1m ME(1g)}nl(){1l{}}ND(){1l 1g.YS("6P","jh","i"),1g.D.A.B8.ol(-1!==1g.jh?1g.jh:1g.L,1g.D.AF)}N6(){1a e=1g;if(e.BS[4]){1a t,i={};1j(1a a in e.BS[4])-1===(t=a.1L("."))?1c===ZC.1d(e.o[a])&&(i[a]=!0,e.o[a]=e.BS[4][a]):a.2v(0,t)===e.AF&&(1c===ZC.1d(e.o[a.2v(t+1)])||i[a.2v(t+1)])&&(e.o[a.2v(t+1)]=e.BS[4][a])}}HW(e,t){1a i,a,n=1g,l=!1,r="";if("2b"!==n.JF&&(n.D.KS[n.L]||n.D.LL)){1a o=!(e.E[ZC.1b[73]]||e.E[ZC.1b[72]]);n.D.D9["p"+n.L]&&n.D.D9["p"+n.L]["n"+e.L]?1o.3J.j9&&o&&n.U5[ZC.1b[73]]?(a=n.U5[ZC.1b[73]],l=!0):(r=ZC.1b[73],(a=1m DM(n)).1S(t),e.E[ZC.1b[73]]?a.RK=e.E[ZC.1b[73]]:a.RK=n.T2?n.T2.o:{}):"2b"!==n.QR&&("1A"===n.QR&&n.D.KS[n.L]||"2Y"===n.QR&&n.D.LL)&&(1o.3J.j9&&o&&n.U5[ZC.1b[72]]?(a=n.U5[ZC.1b[72]],l=!0):(r=ZC.1b[72],(a=1m DM(n)).1S(t),e.E[ZC.1b[72]]?a.RK=e.E[ZC.1b[72]]:a.RK=n.T9?n.T9.o:{})),l||(a?(a.Q2=!0,a.1q()):(a=1m DM(n)).1S(t),1o.3J.j9&&o&&""!==r&&(n.U5[r]=a))}1u(a=1m DM(n)).1S(t);1l 1c!==ZC.1d(i=n.T4[e.L])&&(0===e.A.DY.1f&&(e.A.DY=[{}]),"3e"==1y n.T4[e.L]?a.1C({"1U-1r":ZC.AO.JK(i,20)+" "+i,"1w-1r":i,"1G-1r":ZC.AO.JK(i,20)}):a.1C(n.T4[e.L]),a.1q()),a}BT(e){1a t=1g,i=[];if(1c!==ZC.1d(e))1j(1a a=0,n=t.BL.1f;a<n;a++){1a l=t.D.BK(t.BL[a]);l&&l.AF===e&&i.1h(t.BL[a])}1u i=t.BL;1l i}LS(){1a e=1g;1l{7Q:e.f6,"m1-8E":e.RD,"6K-8E":e.S3,6K:e.E8,"1X-6K":e.HD,5G:e.eZ,"5G-dm":e.TY,ax:e.eL,"ax-6K":e.SP}}1q(){1a e,t,i,a,n=1g;if(n.UX={},1D.1q(),n.K5={},1c!==ZC.1d(e=n.o.3A))1j(n.BL=e.2n(/,|;|\\s/),i=0;i<n.BL.1f;i++)n.BL[i]=ZC.V5(ZC.GP(n.BL[i]));if(n.D.o.1Y&&n.D.o.1Y["6b-1A"]&&(n.IA=!0),1c!==ZC.1d(n.o.io)&&1c===ZC.1d(n.o.5G)&&(n.o.5G=n.o.io),1c!==ZC.1d(n.o["3H-1R"])&&1c===ZC.1d(n.o["aL-4E"])&&1c===ZC.1d(n.o["dQ-1R"])&&(n.o["aL-4E"]="ay",n.o["dQ-1R"]={},ZC.2E(n.o["3H-1R"],n.o["dQ-1R"])),n.KR=n.D.KR,n.4y([["cI","J1","b"],["ax","eL","b"],[ZC.1b[25],"SP","ia"],[ZC.1b[12],"E8","ia"],["1X-6K","HD","i"],["2z","RM","b"],["nj","CB","b"],["7F-1J","KR"],["nk","RE","b"],["1E","AN"],["2H-1E","JZ"],["1Y-1E","nm"],["tj","YW"],["7F","DU","i"],["z-3b","JP","i"],["76","CR"],["4E","bW"],["17j","YB","f"],["1X-cM","MV"],["1X-oE","TA"],["fI-oE","YC","b"],["eh-6z","XY","i"],["1Z-6z-io","YO","i"],["3R","E1"],["2X","FA"],[ZC.1b[14],"S3"],[ZC.1b[13],"RD"],["5G","eZ","b"],["7Q","f6"],["5G-dm","TY"],["8F-ak","o8","b"],["Dv","SC"],["ah","T4"],["Cs","QG","b"],["6b","IA","b"],["6b-1Y","LF","b"],["2N-4E","l2"],["9V-fA","VC","b"],["17k","LY","b"],["Cq-3b","R8","i"],["Cq-2c","RT","i"],["Df","G9","b"],["Fm","LD","i"],["oT","JD","f"],["aL-4E","JF"],["6a-17d","RQ","b"],["1U-4E","QR"],["171-6g","Z2","ia"]]),n.pp=n.RE,!n.E["Dq-1q"]){1a l;if(ZC.6y(n.T4),n.IA&&(1c===ZC.1d(n.D.o.1Y)||1c===ZC.1d(n.D.o.1Y["6b-1Y"]))&&ZC.1d(1c===n.o["6b-1Y"])&&(n.LF=n.IA),1c!==ZC.1d(e=n.o.8x))n.G9=!0,1c!==ZC.1d(t=e.Fm)&&(0===(t+"").1L("ju")&&1c!==ZC.1d(l=ZC.aT[(t+"").2v(10)])&&(t=l),n.LD=ZC.1k(t),0===n.LD&&(n.G9=!1)),1c!==ZC.1d(t=e.oT)&&(0===(t+"").1L("ju")&&1c!==ZC.1d(l=ZC.aT[(t+"").2v(10)])&&(t=l),n.JD=ZC.1W(t)),1c!==ZC.1d(t=e.Dw)&&(n.LA=ZC.1W(t)),1c!==ZC.1d(t=e.9Q)&&(0===(t+"").1L("ju")&&1c!==ZC.1d(l=ZC.aT[(t+"").2v(10)])&&(t=l),n.LE=ZC.1k(t)),1c!==ZC.1d(t=e.16S)&&(0===(t+"").1L("ju")&&1c!==ZC.1d(l=ZC.aT[(t+"").2v(10)])&&(t=l),n.TZ=ZC.1k(t)),1c!==ZC.1d(t=e.170)&&(n.FS=t);1j(1a r in n.JD<10&&(n.JD*=5x),n.LA<10&&(n.LA*=5x),1y PM!==ZC.1b[31]&&(n.JD=ZC.BM(PM.UH,n.JD)),("8F"===n.bW||1y PM===ZC.1b[31]||1o.4F.aT)&&(n.G9=!1),n.H.dR&&(n.G9=!1),-1!==ZC.AU(["1w","1N","5t","6c","84","6v","5m","7d","5V"],n.AF)&&("8F"===n.bW?n.IR=!0:"5f"===n.bW||n.G9||-1!==3h.5g(n.o).1L(\'"ak"\')||-1!==3h.5g(n.o).1L(\'"js-cz"\')||0!==n.T4.1f||-1!==n.H.E.4G.1L(\'"78"\')||-1!==n.H.E.4G.1L(\'"Dv"\')||"2b"!==n.JF?n.IR=!1:n.IR=!0),n.o)if("1V-"===r.2v(0,5)){1a o=r.2v(5);n.MZ[o]=n.o[r]}1a s=n.H.B8;if(n.IB=1m CX(n),n.IB.1C(n.o),s.2x(n.IB.o,v(ZC.1b[71])),n.IB.1C(n.o[ZC.1b[71]]),1c!==ZC.1d(n.o[ZC.1b[71]])||"1w"!==n.AF&&"1N"!==n.AF||(n.IB.AM=!1),n.IA&&(n.SG=1m CX(n),s.2x(n.SG.o,v("6b-3X")),n.SG.1C(n.o),1c!==ZC.1d(e=n.o["6b-3X"])&&n.SG.1C(e),1c===ZC.1d(n.SG.o.3I)&&(n.SG.o.3I=!0)),1c!==ZC.1d(e=n.o[ZC.1b[73]])&&(n.T2=1m CX(n),s.2x(n.T2.o,v(ZC.1b[73])),n.T2.1C(e)),1c!==ZC.1d(e=n.o[ZC.1b[72]])&&(n.T9=1m CX(n),s.2x(n.T9.o,v(ZC.1b[72])),n.T9.1C(e)),n.A5=1m CX(n),s.2x(n.A5.o,v("1R")),s.2x(n.A5.o,v("1R["+n.CR+"]")),n.A5.1C(n.o.1R),"3g"===n.A5.o.1J){1a A=["3z","9r","Du","Dt","Dp"];n.A5.o.1J=A[n.L%A.1f]}if(n.A5.1q(),(n.A5.DY.1f>0||n.T4.1f>0||n.A5.o["1v-3X"])&&(n.Z0=!1),n.G5=1m CX(n),s.2x(n.G5.o,v("2N-1R")),n.G5.1C(n.o.1R),n.G5.1C(n.o["2N-1R"]),1c!==ZC.1d(e=n.o["dQ-1R"])&&(n.SB=1m CX(n),s.2x(n.SB.o,v("dQ-1R")),n.SB.1C(e)),1c!==ZC.1d(e=n.o["1U-1R"])&&(n.SO=1m CX(n),s.2x(n.SO.o,v("1U-1R")),n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&t.o["1z-z"].2i&&((r=1m CX(e)).B9="#e0",r.AX=1,r.1C(t.o["1z-z"].2i),r.1q(),r.AX>0&&r.AM&&(r.A0=r.AD=r.B9,(l=ZC.DD.D7(r,t,i.iX-ZC.AL.DW,i.iX+i.I-ZC.AL.DW,i.iY+i.F-ZC.AL.DX,i.iY+i.F-ZC.AL.DX+r.AX,e.E["z-82"]*e.E["z-5p"],e.E["z-82"]*e.E["z-5p"],"y")).J=t.J+"-1z-z-16O-"+e.L,t.CH.2P(l),(l=ZC.DD.D7(r,t,i.iX-ZC.AL.DW,i.iX-ZC.AL.DW,i.iY-ZC.AL.DX,i.iY+i.F-ZC.AL.DX,e.E["z-82"]*e.E["z-5p"],e.E["z-82"]*e.E["z-5p"]+r.AX,"y")).J=t.J+"-1z-z-16P-"+e.L,t.CH.2P(l))),t.o["1z-z"].2B&&t.o["1z-z"].2B.1f){(r=1m CX(e)).A0=r.AD="#16Q",r.C4=.25;1a u=e.E["z-82"]%t.o["1z-z"].2B.1f;r.1C(t.o["1z-z"].2B[u]),r.1q(),(l=ZC.DD.D7(r,t,i.iX-ZC.AL.DW,i.iX+i.I-ZC.AL.DW,i.iY+i.F-ZC.AL.DX,i.iY+i.F-ZC.AL.DX,e.E["z-82"]*e.E["z-5p"],e.E["z-82"]*e.E["z-5p"]+e.E["z-5p"],"z")).J=e.J+"-1Q-",t.CH.2P(l)}}}gc(){if(1g.R)1j(1a e=0;e<1g.R.1f;e++)1g.R[e]&&1g.R[e].A&&ZC.AO.gc(1g.R[e],["Z","C7","o","JU","I3","A","D","H","N","N9"]);ZC.AO.gc(1g,["Y","R","GL","K5","VJ","A6","Z","C7","UX","A5","U4","H9","G5","IB","KE","QD","B1","CK","R","GL","K5","L0","o","JU","I3","A","D","H"])}}1O WN 2k IC{2G(e){1D(e);1a t=1g;t.yw=!0,t.AF="xy",t.BL=[ZC.1b[50],ZC.1b[51]]}1t(){1D.1t()}}1O QW 2k WN{2G(e){1D(e);1a t=1g;t.AF="1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A.iY+A.F],Ce.J=Z.J+"-1N-2z",Ce.DG=Z.J+"-2z",Ce.Z=se.Z;1a Ze=Z.o["2z-3X"];Ze&&(1c!==ZC.1d(Ze["2o-1N"])?(oe=Ze.2o,Ze.2o=Z.o["2z-3X"]["2o-1N"]):Ze.2o=Ce.C4,Ce.1C(Ze),Ce.1q(),1c!==ZC.1d(oe)?Ze.2o=oe:4v Ze.2o),Ce.C=Ae,Ce.1t();1a ce=Z.au(E),pe=ZC.P.E4(se.Z,Z.H.AB),ue=1m CX(Z);ue.1S(Z),ue.CV=!0,ue.L9=!0,ue.J=Z.J+"-1w-2z",ue.DG=Z.J+"-2z",ue.AX=1,Ze&&(ue.1C(Ze),ue.1q()),ZC.CN.1t(pe,ue,ce,1c,3)}Z.CB&&(Z.A.D2=J)}}}1O hk 2k WN{2G(e){1D(e);1a t=1g;t.AF="2U",t.ow="2U",t.F0=.1,t.CZ=0,t.qd=!1,t.Z9=-1,t.CC=.1,t.CO=.1,t.EV=0,t.U3=!1,t.M3=[],t.PP="bg",t.ln=!0,t.QF=!1}1q(){1a e=1g;if(e.BS=e.ND(),e.C1=e.BS[0],e.B9=e.BS[1],e.BU=e.BS[1],e.A0=e.BS[1],e.AD=e.BS[2],e.N6(),1D.1q(),"16K"===e.CR&&(e.F0=e.CC=e.CO=0),e.4y([["6a-jK","ln","b"],["4n-cN","U3","b"],["2c-6g","M3"],["2U-8I","F0","fp"],["2U-1s","CZ","fp"],["81-1s","qd","b"],["2U-1X-1s","Z9","fp"],["jK-8I-1K","CC","fp"],["jK-8I-2A","CO","fp"],["jK-iy","EV","fp"],["fg-eh","QF","b"]]),e.ln||(e.EV=1),0===e.F0&&0===e.CC&&0===e.CO&&(e.F8=!1),e.B1=e.D.BK(e.BT("k")[0]),e.CK=e.D.BK(e.BT("v")[0]),1c!==ZC.1d(e.o.8U)){1a t=e.o.8U.2n("/");if(2===t.1f){1a i=ZC.1k(t[0]),a=ZC.1k(t[1]),n=e.CC;e.CC>=1&&(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ZV(1g)}}1O QZ 2k hk{2G(e){1D(e),1g.AF="6c"}FX(){1l 1m ZW(1g)}}1O PH 2k WN{2G(e,t){1D(e),1g.AF=t||"6v",1g.PP="jP",1g.kB=!1,1g.HT=.5}FX(){1l 1m xK(1g)}1q(){1a e=1g;e.BS=e.ND(),e.C1=e.BS[0],e.A0=e.BS[1],e.AD=e.BS[1],e.B9=e.BS[2],e.BU=e.BS[2],e.N6(),1D.1q(),e.4y([["2o-1N","HT","f",0,1]]),e.B1=e.D.BK(e.BT("k")[0]),e.CK=e.D.BK(e.BT("v")[0])}1t(){1a e,t,i,a=1g;if(1D.1t(),a.KE=a.CM("bl",0),a.pB=ZC.P.E4(a.CM("bl",0),a.H.AB),a.O7(!0),a.kB){1j(e=[],t=0,i=a.R.1f;t<i;t++)e.1h([a.R[t].iX,a.R[t].iY]);e.1f&&e.1h(e[0]);1a n=1m DT(a);n.1S(a),n.C4=a.HT,n.CV=!0,n.L9=!0,n.AX=0,n.AP=0,n.EU=0,n.G4=0,n.Z=a.KE,n.C=e,n.ZJ(),n.J=a.J+"-1N",n.1t(),a.CV=!1,ZC.CN.2I(a.pB,a),ZC.CN.1t(a.pB,a,e)}}}1O S6 2k WN{2G(e,t){1D(e),1g.AF=t||"5m",1g.WH=1c,1g.WE=1c,1g.la=1,1g.JO=1,1g.pF="1N",1g.PP="jP"}FX(){1l 1m xJ(1g)}1q(){1a e=1g;e.BS=e.ND(),e.C1=e.BS[0],e.A0=e.BS[2],e.AD=e.BS[1],e.B9=e.BS[2],e.BU=e.BS[2],e.N6(),1D.1q(),e.4y([["2j-2e","WH","i"],["1X-2e","WE","i"],["16Y","pF"],["Ck-6a","la","i"],["2e-7c","JO","f"]]),e.B1=e.D.BK(e.BT("k")[0]),e.CK=e.D.BK(e.BT("v")[0]),1c===ZC.1d(e.WH)&&(e.WH=15),1c===ZC.1d(e.WE)&&(e.WE=.75*1B.2j(e.B1.A7,e.B1.BY,e.CK.A7,e.CK.BY),e.WE=ZC.BM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<n;a++)i.R[a]&&(i.R[a].CJ=i.PZ,i.R[a]&&(i.D.E["1A"+i.L+".2h"]||"5b"===i.D.7O())&&(1c===ZC.1d(i.A.KM[a])&&(i.A.KM[a]=0),i.A.KM[a]+=ZC.1W(i.R[a].AE)))}1t(){1a e=1g;1D.1t(),e.KE=e.CM("bl",0),e.O7(!0)}}1O U9 2k IC{2G(e){1D(e);1a t=1g;t.AF="8S",t.BL=["1z"],t.UI=0,t.SU=0,t.DK=0,t.C2=1c,t.PP="bg",t.fB=1c}FX(){1l 1m y3(1g)}1q(){1a e,t,i=1g;i.BS=i.ND(),i.C1=i.BS[0],i.A0=i.BS[1],i.AD=i.BS[2],i.BU=i.BS[0],i.B9=i.BS[0],i.N6(),1D.1q(),i.U&&(i.C2=1m CX(i),i.D.A.B8.2x(i.C2.o,["2Y.1A.1T-3C.8O",i.AF+".1A.1T-3C.8O"]),1c!==ZC.1d(e=i.D.o.1A)&&1c!==ZC.1d(e[ZC.1b[17]])&&1c!==ZC.1d(t=e[ZC.1b[17]].8O)&&i.C2.1C(t),i.C2.1C(i.o[ZC.1b[17]].8O)),i.4y([["7z-4e","UI","fp"],["2c","UI","fp"],[ZC.1b[8],"UI","fp"],["yT-8I","SU","fp"],["3T-2f","DK","i"],["yT-164","fB"]]),i.DK%=2m;1j(1a a=0,n=i.R.1f;a<n;a++)i.R[a]&&(i.D.E["1A"+i.L+".2h"]||"5b"===i.D.7O())&&(1c===ZC.1d(i.A.KM[a])&&(i.A.KM[a]=0),i.A.KM[a]+=ZC.1W(i.R[a].AE))}1t(){1a e=1g;1D.1t(),e.KE=e.CM("bl",0),e.O7(!0)}}1O XQ 2k IC{2G(e){1D(e);1a t=1g;t.AF="7d",t.SZ=3,t.BL=["1z-k",ZC.1b[52],"1z"],t.HT=.5,t.CR="1w",t.r7=1c,t.XN=!1,t.C=[],t.AG=[]}FX(){1l 1m xR(1g)}1q(){1a e=1g;e.BS=e.ND(),e.C1=e.BS[0],e.B9=e.BS[1],e.A0=e.BS[3],e.AD=e.BS[3],e.N6(),1D.1q(),e.kx(),e.4y([["6C-1N","XN","b"],["2o-1N","HT","f",0,1],["2f-8I","r7","f"]]),e.B1=e.D.BK("1z-k"),e.CK=e.D.BK(ZC.1b[52]),"5z"===e.CR&&(e.bW="5f",e.IR=!1)}1t(){1a e=1g;1D.1t(),e.B1.Y.1f===e.Y.1f&&-1===ZC.AU(e.Y,1c)||(e.bW="5f",e.IR=!1),e.KE=ZC.AK(e.D.J+"-1A-"+e.L+"-bl-0-c"),e.iP=ZC.P.E4(e.CM("bl",0),e.H.AB),e.QD=ZC.P.E4(e.CM("bl",2),e.H.AB),e.O7(!0)}}1O nr 2k hk{2G(e){1D(e);1a t=1g;t.F0=.2,t.CC=.28,t.CO=.28,t.EV=0,t.FD=1c,t.er=[],t.Q3=[],t.yG=!0,t.PP="bg"}nl(e){1a t;if("7w"===e){if(1c!==ZC.1d(t=1g.FD.o.2H))1l t;if(1c!==ZC.1d(t=1g.FD.o["2H-1E"]))1l{1E:t}}1l{}}1q(){1a e,t=1g;if(t.BS=t.ND(),1D.1q(),1c!==ZC.1d(t.er=t.o.gZ))1j(1a i=0,a=t.er.1f;i<a;i++)1c!==ZC.1d(t.er[i])?"3e"==1y t.er[i]?t.Q3[i]=ZC.AU(t.CK.JJ,t.er[i]):t.Q3[i]=ZC.1W(t.er[i]):t.Q3[i]=1c;t.FD=1m I1(t),t.FD.1S(t),t.FD.1C({"1U-1r":t.BS[3]}),t.FD.o["2H-1E"]="%2r-7w-1T",t.H.B8.2x(t.FD.o,["("+t.AF+").1A.7w"],!0,!0),1c!==ZC.1d(e=t.o.7w)&&t.FD.1C(e),t.FD.1q()}}1O TU 2k nr{2G(e){1D(e),1g.AF="8i"}FX(){1l 1m yj(1g)}}1O TV 2k nr{2G(e){1D(e),1g.AF="7R"}FX(){1l 1m yu(1g)}}1O XR 2k WN{2G(e){1D(e);1a t=1g;t.AF="5V",t.CR="2o",t.rn="1A-1X",t.QA=.2,t.VA=1,t.PP="bg"}FX(){1l 1m ys(1g)}1q(){1a e=1g;e.BS=e.ND(),e.C1=e.BS[0],e.B9=e.BS[1],e.BU=e.BS[1],e.A0=e.BS[2],e.AD=e.BS[1],e.N6(),1D.1q(),e.4y([["2j-eD","QA","f",0,1],["1X-eD","VA","f",0,1],["cL","rn",""]]),e.QA>=e.VA&&(e.QA=.2,e.VA=1),e.B1=e.D.BK(e.BT("k")[0]),e.CK=e.D.BK(e.BT("v")[0])}1t(){1a e=1g;1D.1t(),e.KE=e.CM("bl",0),e.j7=e.jB=-ZC.3w,e.YL=e.WZ=ZC.3w,e.ro=e.rp=0;1j(1a t=0,i=e.A.A9.1f;t<i;t++)1j(1a a=e.A.A9[t],n=0,l=a.R.1f;n<l;n++)if(a.R[n]){1a r=ZC.1W(a.R[n].AE);a.L===e.L&&(e.j7=ZC.BM(e.j7,r),e.YL=ZC.CQ(e.YL,r),e.ro+=r),e.jB=ZC.BM(e.jB,r),e.WZ=ZC.CQ(e.WZ,r),e.rp+=r}e.O7()}}1O WP 2k WN{2G(e){1D(e);1a t=1g;t.L3=.1,t.NN=.1,t.M2=0,t.ja="4N",t.OY=[],t.VY=[],t.PP="bg"}1q(){1a e,t,i,a,n=1g;if(n.BS=n.ND(),n.C1=n.BS[0],n.B9=n.BS[1],n.BU=n.BS[1],n.A0=n.BS[2],n.AD=n.BS[1],n.N6(),1D.1q(),n.4y([["4e-1s","ja"],["2j-8b","M2","fp"],["8I-8g","L3","fp"],["8I-8b","NN","fp"],["2c","L3","fp"],["2c","NN","fp"]]),1c!==ZC.1d(i=n.o.8g))1j(i 3E 3M||(i=[i]),e=0,t=i.1f;e<t;e++){1a l=1m DT(n);l.o=i[e],l.1q(),n.OY.1h(l)}if(1c!==ZC.1d(a=n.o.8b))1j(a 3E 3M||(a=[a]),e=0,t=a.1f;e<t;e++){1a r=1m DT(n);r.o=a[e],r.1q(),n.VY.1h(r)}n.B1=n.D.BK(n.BT("k")[0]),n.CK=n.D.BK(n.BT("v")[0])}1t(){1a e=1g;1D.1t(),e.KE=e.CM("bl",0),e.O7()}}1O VO 2k WP{2G(e){1D(e),1g.AF="aA"}FX(){1l 1m yn(1g)}}1O VP 2k WP{2G(e){1D(e),1g.AF="aB"}FX(){1l 1m ym(1g)}}1O VW 2k hk{2G(e){1D(e);1a t=1g;t.AF="84",t.CR="ya",t.MY={2e:0},t.PP="bg"}FX(){1l 1m yh(1g)}1q(){1D.1q()}1t(){1D.1t(),1g.9p()}9p(){1a e=1g,t=e.D.BK(e.BT("v")[0]),i=t.B2(t.HK);if(e.D.BI&&e.D.BI.IK&&e.RM){1j(1a a=e.D.Q,n=e.D.BI,l=[],r=[],o=!0,s=0,A=e.R.1f;s<A;s++)if(1c!==ZC.1d(e.R[s])&&1c!==ZC.1d(e.R[s].DJ[2])){1a C=t.B2(e.R[s].DJ[2]);o&&(r.1h([e.R[s].iX,i]),o=!1),l.1h([e.R[s].iX,C]),r.1h([e.R[s].iX,C])}r.1f&&r.1h([r[r.1f-1][0],i]);1a Z=e.au(r),c=e.o.2z||{};if("1N"===(c.1J||"1N")){1a p=1m DT(e.A);p.1S(e),p.1C({"1U-1r":e.BU,"2o-1N":.2}),p.1C(c),p.1q(),p.CV=!0,p.L9=!0,p.AX=0,p.AP=0,p.EU=0,p.G4=0,p.C4=ZC.1W(p.o["2o-1N"]),p.CW=[a.iX,a.iY,a.iX+a.I,a.iY+a.F],p.J=e.J+"-1N-2z",p.Z=n.Z,p.C=Z,p.1t()}1a u=e.au(l),h=ZC.P.E4(n.Z,e.H.AB),1b=1m CX(e);1b.1S(e),1b.1C({"1w-1r":e.BU,"1w-1s":1}),1b.1C(c),1b.1q(),ZC.CN.1t(h,1b,u,1c,3)}}}1O XS 2k IC{2G(e){1D(e);1a t=1g;t.AF="8D",t.SZ=3,t.BL=["1z-r",ZC.1b[52],"1z"],t.HT=.5,t.HU=[10,0,0,0,0],t.PP="bg"}FX(){1l 1m y8(1g)}1q(){1a e,t=1g;t.BS=t.ND(),t.C1=t.BS[0],t.B9=t.BS[1],t.A0=t.BS[3],t.AD=t.BS[3],t.N6(),1D.1q(),t.4y([["2o-1N","HT","f",0,1],["yQ","HU"]]),1c!==ZC.1d(e=t.o.163)&&(t.HU[0]=ZC.1k(e)),t.HU=[ZC.1W(t.HU[0]||"10"),ZC.1W(t.HU[1]||"0"),ZC.1W(t.HU[2]||"0"),ZC.1W(t.HU[3]||"0"),ZC.1W(t.HU[4]||"0")]}1t(){1a e=1g;1D.1t(),e.KE=e.CM("bl",0),e.O7(!0)}}1O UJ 2k WN{2G(e){1D(e);1a t=1g;t.AF="5z",t.W=1,t.CR="av",t.SZ=3,t.HT=.5}FX(){1l 1m y7(1g)}1q(){1a e=1g;e.BS=e.ND(),e.C1=e.BS[0],e.B9=e.BS[1],e.A0=e.BS[0],e.AD=e.BS[1],e.N6(),1D.1q(),e.kx(),e.YS("2o-1N","HT","f",0,1),e.B1=e.D.BK(e.BT("k")[0]),e.CK=e.D.BK(e.BT("v")[0])}O7(){1a e,t,i=1g,a=i.OT;i.Y5(!1);1a n=i.D.Q;i.W=1;1a l=a?n.F:n.I;if(i.B1.EI||!i.RE&&5*(i.B1.A1-i.B1.V)>l&&(i.W=ZC.1k(5*(i.B1.A1-i.B1.V)/l)),i.B1.EI)1j(e=0,t=i.R.1f;e<t;e++)i.R[e]&&ZC.E0(i.R[e].BW,i.B1.Y[i.B1.V],i.B1.Y[i.B1.A1])&&(i.R[e].Z=i.KE,i.R[e].MP="2j",i.R[e].1t(),i.R[e].MP="1X",i.R[e].1t(),4v i.R[e].E["cQ.3b"]);1u 1j(e=i.B1.V;e<=i.B1.A1;e+=i.W)i.R[e]&&(i.R[e].MP="2j",i.R[e].1t(),i.R[e].MP="1X",i.R[e].1t(),4v i.R[e].E["cQ.3b"])}1t(){1a e=1g;1D.1t(),e.KE=e.CM("bl",0),e.iP=ZC.P.E4(e.CM("bl",1),e.H.AB),e.QD=ZC.P.E4(e.CM("bl",2),e.H.AB),e.O7(),e.C=1c,e.D2=1c,e.gQ=1c,e.SD=1c}}1O XT 2k WO{2G(e){1D(e);1g.AF="7e",1g.NO=-1}1q(){1D.1q(),1g.4y([["rA","NO","ia"]])}FX(){1l 1m B4(1g)}}1O V2 2k QY{2G(e){1D(e),1g.AF="6O"}FX(){1l 1m Bm(1g)}1q(){1a e=1g;1D.1q(),1c===ZC.1d(e.o[ZC.1b[61]])&&(e.BU=e.BS[0]),1c===ZC.1d(e.o["1w-1r"])&&(e.B9=e.BS[0])}1t(){1D.1t(),1g.k0()}}1O WQ 2k QZ{2G(e){1D(e),1g.AF="7k"}FX(){1l 1m Bn(1g)}1q(){1a e=1g;1D.1q(),1c===ZC.1d(e.o[ZC.1b[61]])&&(e.BU=e.BS[0]),1c===ZC.1d(e.o["1w-1r"])&&(e.B9=e.BS[0])}}1O V3 2k QW{2G(e){1D(e),1g.AF="97"}FX(){1l 1m Cb(1g)}1q(){1a e=1g;1D.1q(),1c===ZC.1d(e.o[ZC.1b[61]])&&(e.BU=e.BS[1])}1t(){1D.1t(),1g.k0()}}1O V4 2k QX{2G(e){1D(e),1g.AF="83"}FX(){1l 1m Bp(1g)}1q(){1a e=1g;1D.1q(),1c===ZC.1d(e.o[ZC.1b[61]])&&(e.BU=e.BS[1])}1t(){1D.1t(),1g.k0()}}1O ZE 2k IC{2G(e){1D(e);1a t=1g;t.AF="b7",t.oh=[],t.jR=[],t.BL=["1z"],t.PP="bg"}FX(){1l 1m Bs(1g)}1q(){1a e=1g;e.BS=e.ND(),e.C1=e.BS[0],e.BU=e.BS[1],e.A0=e.BS[3],e.AD=e.BS[3],e.N6(),1D.1q(),e.4y([["2M","oh"],["15n","jR"]])}1t(){1a e=1g;1D.1t(),e.KE=e.CM("bl",0),e.O7(!0)}}1O ME 2k DM{2G(e){1D(e);1a t=1g;t.D=e.A.A,t.H=t.D.A,t.L=-1,t.AE=1c,t.DJ=[],t.CL=1c,t.BW=1c,t.CI=1c,t.JL=[],t.IK=!1,t.Q2=!0,t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,CI=ZC.AO.GO(CI,BE,s.A,!(!X||!X.FB)&&X.FB),"%v"===AN&&"%vv"!==AN||"%2r-1T"===AN)1l CI;if("%t"===AN||"%1A-1E"===AN)1l WK;1a CU=s.CU||[],ki,Z3,nW,nY;if(X&&X.KW){1a Z6=X.LS();1c===ZC.1d(Z6[ZC.1b[12]])&&(Z6[ZC.1b[12]]=0);1a yC=X.D8?X.KW(1g.iX,!0,"5V"===s.A.AF):X.KW(1g.iY,!0,"5V"===s.A.AF),X7=X.FL(0,yC,Z6);CU.1h(["%1z-1T-1T",X7],["%vv",X7]),1c!==ZC.1d(G=X.BV[s.L])?CU.1h(["%1z-1T-1H",G],["%vl",G]):CU.1h(["%1z-1T-1H",X7],["%vl",X7])}if(X&&(-1!==AN.1L("%1z-1T-1E")||-1!==AN.1L("%vt")))1j(-1!==(G=ZC.AU(X.Y,s.AE))&&1c!==ZC.1d(X.BV)&&1c!==ZC.1d(X.BV[G])?CU.1h(["%1z-1T-1E",X.BV[G]],["%vt",X.BV[G]]):CU.1h(["%1z-1T-1E",s.AE],["%vt",s.AE]),7P=-1!==AN.1L("%vt(")?1m 5y("(%vt)\\\\(([0-9]*)\\\\)"):1m 5y("(%1z-1T-1E)\\\\(([0-9]*)\\\\)");D1=7P.3n(AN);)Z3="",""!==(G=D1[2])&&(nW=ZC.1k(G),1c!==ZC.1d(nY=s.A.A.A9[nW])&&(ki=nY.FP(s.L),1c!==ki&&(Z3=ki.EW(D1[1])))),AN=AN.1F(D1[0],Z3),""!==Z3&&CU.1h([D1[0],Z3]);1j(1a FG in 1c!==ZC.1d(s.A.M3)&&1c!==ZC.1d(s.A.M3[s.L])&&CU.1h(["%2c-6g",s.A.M3[s.L]]),s.A.A.kc&&CU.1h(["%7F-1v",-1!==ZC.AU(s.A.A.kc,s.A.L)?1:0]),s.A.MZ){1a TR;TR=s.A.MZ[FG]3E 3M?1c!==s.A.MZ[FG][s.L]?s.A.MZ[FG][s.L]:"":1c!==s.A.MZ[FG]?s.A.MZ[FG]:"","92"==1y TR&&(TR=ZC.AO.GO(TR,BE,s.A,!(!X||!X.FB)&&X.FB)),CU.1h(["%1V-"+FG,TR])}1j(i=0;i<kb.1f;i++)CU.1h(["%1z-81-1H-"+i,kb[i]],["%kl"+i,kb[i]]);1j(i=0;i<ka.1f;i++)CU.1h(["%1z-81-1E-"+i,ka[i]],["%kt"+i,ka[i]]);1j(i=0;i<hx.1f;i++)CU.1h(["%1z-81-1T-"+i,hx[i]],["%kv"+i,hx[i]],["%k"+i,hx[i]]);CU.1h(["%1z-81-1H",S5],["%1z-81-1E",RS],["%1z-81-1T",PQ],["%1z-81-1T-ts",qi],["%156",qi],["%kt",RS],["%kl",S5],["%kv",PQ],["%k",PQ],["%2r-1T",CI],["%v",CI],["%2r-yK-1T",s.AE],["%V",s.AE],["%2r-3b",s.L],["%2r-x",s.iX],["%2r-y",s.iY],["%b9-1s",s.H.I],["%b9-1M",s.H.F],["%i",s.L],["%n",s.L],["%2r-eH",s.A.R.1f],["%N",s.A.R.1f]);1a yW=98["%1A-7S"],hA=yW+"",za=98["%1A-e6"],gE=za+"",tT=ZC.1W(8v.F3["%aU-"+s.L+"-"+s.A.DU+"-7S"]||"0"),kd=tT+"",zm=ZC.1W(tT/8v.F3["%aU-"+s.L+"-"+s.A.DU+"-7F-1f"]),kf=6d(zm),zl=6d(8v.F3["%aU-"+s.L+"-"+s.A.DU+"-7F-1f"]),t7=0;1c!==ZC.1d(8v.F3)&&1c!==ZC.1d(8v.F3[s.L])&&(t7=ZC.1W(8v.F3[s.L]["%6l-"+s.A.DU]||"0"));1a kh=t7+"";hA=ZC.AO.GO(hA,BE),gE=ZC.AO.GO(gE,BE),kh=ZC.AO.GO(kh,BE),kd=ZC.AO.GO(kd,BE),kf=ZC.AO.GO(kf,BE),CU.1h(["%2r-4L-8o",s.E["2r-4L-8o"]],["%2r-4L-s7",s.E["2r-4L-s7"]],["%7F-6l",kd],["%7F-e6",kf],["%7F-1f",zl],["%6l",kh],["%1A-2j-3b",98["%1A-2j-3b"]],["%14R",98["%1A-2j-3b"]],["%1A-1X-3b",98["%1A-1X-3b"]],["%14S",98["%1A-1X-3b"]],["%1A-2j-1T",98["%1A-2j-1T"]],["%14T",98["%1A-2j-1T"]],["%1A-1X-1T",98["%1A-1X-1T"]],["%14U",98["%1A-1X-1T"]],["%1A-7S",hA],["%14V",hA],["%1A-e6",gE],["%17m",gE],["%1A-6g",98["%1A-6g"]],["%pv",98["%1A-6g"]]);1a zi=100*s.AE/98["%1A-7S"],Z7=zi+"";1c!==ZC.1d(BE[ZC.1b[12]])&&(Z7=ZC.AO.GO(Z7,BE)),CU.1h(["%1A-8e",Z7],["%14Q",Z7]);1a t6=!1,WJ,AV,K,BX;1j(i=0,A2=CU.1f;i<A2;i++)if("%8k"===CU[i][0]){t6=!0;1p}if(!t6&&1c!==ZC.1d(s.A.A.F3)&&1c!==ZC.1d(s.A.A.F3[s.L])){1a JM=100*s.AE/s.A.A.F3[s.L]["%6l-"+s.A.DU],HN=JM+"";1c!==ZC.1d(BE[ZC.1b[12]])&&(HN=ZC.AO.GO(HN,BE)),CU.1h(["%2r-8e-1T",HN],["%8k",HN])}1j(i=0;i<U7.1f;i++)CU.1h(["%1A-1E-"+i,U7[i]],["%t"+i,U7[i]]);1j(CU.1h(["%1A-1E",WK],["%t",WK],["%1A-tj",s.A.YW],["%1A-3b",s.A.L],["%p",s.A.L],["%1A-eH",8v.A9.1f],["%P",8v.A9.1f],["%id",s.H.J],["%4w",s.D.J.1F(s.H.J+"-2Y-","")]),-1!==AN.1L("%7Q")&&(OU&&"cV"===BE.7Q?(CU.1h(["%7Q","-"]),OU=!1):CU.1h(["%7Q",""])),CU.1h(["%2r-x",s.iX],["%2r-y",s.iY],["%2r-1s",s.I],["%2r-1M",s.F],["%2r-2e",s.E["1R.2e"]||1]),1o.3J.zd&&CU.4i(ZC.lW),7P=1m 5y("\\\\(([^(]+?)\\\\)\\\\(([0-9]*)\\\\)(\\\\(*)([0-9]*)(\\\\)*)");D1=7P.3n(AN);){WJ="";1a CT=s.A.L,D4=s.L;""!==(G=D1[2])&&(CT=ZC.1k(G)),""!==(G=D1[4])&&(D4=ZC.1k(G)),1c!==(K=8v.A9[CT])&&(AV=K.FP(D4,3),1c!==AV&&(WJ=AV.EW(D1[1],EO))),AN=AN.1F(D1[0],WJ)}if(-1!==AN.1L("%zb-")){7P=1m 5y("%zb-([a-zA-Z0-9-]+)");1j(1a k7=s.7W();D1=7P.3n(AN);)1c!==ZC.1d(k7[D1[1]])&&1c!==ZC.1d(s[k7[D1[1]]])&&(AN=AN.1F(D1[0],s[k7[D1[1]]]))}if(-1!==AN.1L("%z9"))1j(7P=1m 5y("%z9([0-9]*)");D1=7P.3n(AN);)""===D1[1]?(BX=s.N||s,BX.B9||(BX=s.A)):BX=8v.A9[D1[1]],AN=AN.1F(D1[0],BX&&BX.B9||"#4u");if(-1!==AN.1L("%yY"))1j(7P=1m 5y("%yY([0-9]*)");D1=7P.3n(AN);)""===D1[1]?(BX=s.N||s,BX.B9||(BX=s.A)):BX=8v.A9[D1[1]],AN="jP"===s.A.PP?AN.1F(D1[0],BX&&BX.A5&&BX.A5.A0||"#4u"):AN.1F(D1[0],BX&&BX.A0||"#4u");if(-1!==AN.1L("%1r"))1j(7P=1m 5y("%1r([0-9]*)");D1=7P.3n(AN);)""===D1[1]?(BX=s.N||s,BX.B9||(BX=s.A)):BX=8v.A9[D1[1]],AN="1w"===s.A.PP?AN.1F(D1[0],BX&&BX.B9||"#4u"):"jP"===s.A.PP?AN.1F(D1[0],BX&&BX.A5&&BX.A5.A0||"#4u"):AN.1F(D1[0],BX&&BX.A0||"#4u");1j(AN=ZC.AO.ZL(AN,1g),i=0,A2=CU.1f;i<A2;i++)7P=1m 5y(CU[i][0],"g"),AN=1y CU[i][1]===ZC.1b[31]?AN.1F(7P,""):LX?AN.1F(7P,eQ(CU[i][1])):AN.1F(7P,CU[i][1]);1l AN=AN.1F(1m 5y("%1V-([a-zA-Z0-9]+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.1d(i=s.1r)&&(r.C1=i),1c!==ZC.1d(i=s[ZC.1b[0]])&&(r.A0=r.AD=i),r.E.7b=l.A.L,r.E.7s=l.L,l.A.U.IE&&(l.A.U.GS(l.A.U,r,1c,l.M6(1c,!1)),r.1q()),r.1q(),r.IT=1n(e){1l l.IT(e)},r.DA()&&r.1q(),!l.A.Z1){1a A=1m DM(l.A);A.1S(r),l.A.Z1=A}if(a="4t",1c!==ZC.1d(i=o.o.1J)&&(a=i),r.AM){r.AM=!1;1a C=l.A.o[ZC.1b[17]].1E||"";if("6g("===a.2v(0,7)){1a Z=a.2v(7,a.1f).1F(")","").2n(",");-1!==ZC.AU(Z,l.AE)&&(r.AM=!0)}1u{1a c=a.2n(","),p={2j:"%1A-2j-1T",1X:"%1A-1X-1T",h6:"%1A-2j-3b",7Z:"%1A-1X-3b"};1j(1a u in p)-1!==ZC.AU(c,u)&&(("h6"!==u&&"7Z"!==u||l.L!==l.A.L0[p[u]])&&("2j"!==u&&"1X"!==u||l.AE!==l.A.L0[p[u]])||("4h"==1y C&&1c!==ZC.1d(C[u])&&(r.o.1E=C[u],r.1q()),r.AM=!0));-1!==ZC.AU(c,"4t")&&(r.AM=!0)}}}if(l.D.E["1A"+l.A.L+".2h"]||(r.E["2O-3L"]="2b"),e)1l r;if(r.AM&&1c!==ZC.1d(r.AN)&&""!==r.AN){1a h=l.HA(r);r.E.rz=h,r.iX=h[0],r.iY=h[1];1a 1b={};if(-1!==r.iX&&-1!==r.iY){1a d=!1;if(1c!==ZC.1d(r.o.iy)&&!ZC.2s(r.o.iy)){1b={x:r.iX,y:r.iY,1s:r.I,1M:r.F};1j(1a f=0,g=l.A.A.ZA.1f;f<g;f++)if(ZC.AQ.Y9(1b,l.A.A.ZA[f])){d=!0;1p}}d||(l.D.E["1A"+l.A.L+".2h"]||(r.E["2O-3L"]="2b"),r.E.tA="vb"+l.D.L,r.1t(),r.E9(),l.A.A.ZA.1h(1b),!r.KA&&ZC.AK(l.H.J+"-3c")&&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KS[o.A.L]&&o.A.Z0&&!J)if("2F"===o.H.AB){if(-1===ZC.AU(["3O","9r","5n","fi","9t","8o","5D"],l.DN))if(o.A.H9=l,1o.3J.kz&&2g.dA){1j(1a F in o.H.FZ)o.A.HH||(o.A.HH=o.H.FZ[F].dA("#"+o.J+"-1R-"+E)),l.MC&&!o.A.RF&&(o.A.RF=o.H.FZ[F].dA("#"+o.J+"-1R-sh-"+E)),l.D6&&!o.A.QB&&(o.A.QB=o.H.FZ[F].dA("#"+o.J+"-1R-5c")||o.H.FZ[F].dA("#"+o.J+"-1R-2R-5c"));o.A.HH||(o.A.HH=ZC.AK(o.J+"-1R-"+E),l.MC&&(o.A.RF=ZC.AK(o.J+"-1R-sh-"+E)),l.D6&&(o.A.QB=ZC.AK(o.J+"-1R-5c")))}1u o.A.HH=ZC.AK(o.J+"-1R-"+E),l.MC&&(o.A.RF=ZC.AK(o.J+"-1R-sh-"+E)),l.D6&&(o.A.QB=ZC.AK(o.J+"-1R-5c")||ZC.AK(o.J+"-1R-2R-5c"))}1u"5m"!==o.A.AF&&"6V"!==o.A.AF&&(e||(o.A.H9=l))}"2F"===o.H.AB&&o.A.j5(o.A.A5,o.J+"-1R-"+E,o.M6()),c()}}1u o.A.U&&o.FF()}1u o.A.U&&o.FF()}}}L5(e,t){1a i,a=1g,n=a.D.M1,l=n.PL,r=a.A.TZ;1P(r){2q:t&&n.2P(t),n.2P(e);1p;1i 1:1i 2:1i 3:if(t){1a o="4t";if(1===r?o="4k-6a-"+a.L+"-1N":2===r&&(o="cM-6a-"+a.A.L+"-1N"),1c===ZC.1d(l[o])){1a s=1m o2(o);n.pA(s)}l[o].2P(t)}if(i="4t",1===r?i="4k-6a-"+a.L:2===r&&(i="cM-6a-"+a.A.L),1c===ZC.1d(l[i])){1a A=1m o2(i);n.pA(A)}l[i].2P(e)}}S9(e){1a t=1g;t.A.IR&&t.A.yw&&(t.RV(),e&&("6v"!==t.A.AF&&"8r"!==t.A.AF&&"5m"!==t.A.A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"mw":t.CP=15m*a}}if(1c!==ZC.1d(t.o.io)&&1c===ZC.1d(t.o.5G)&&(t.o.5G=t.o.io),t.4y([[ZC.1b[10],"BV"],["2H-1E","s6"],["5I","CF"],["2c-4e","A7","i"],["2c-4e","s5","i"],["2c-6j","BY","i"],["4Q-9F","GR","i"],["3b","L","i"],["zB","AT","b"],["cF","H4","b"],["3G-15l","YJ","b"],["7a-6z","Q6","b"],["3G-to","LW"],["db-15k","YY","b"],["3G-to-6g","NS"],["2B-iy","jn","b"],["15j","TJ","b"],["1X-cC","EG","i"],["1X-2B","EG","i"],["3T-1T","HK","f"],[ZC.1b[12],"E8","ia"],[ZC.1b[14],"S3"],[ZC.1b[13],"RD"],["5G","eZ","b"],["5G-dm","TY"],["7Q","f6"],["ax","eL","b"],[ZC.1b[25],"SP","ia"],["fj","DL"],["3P-15h","H8","fa"],["1z-7c","P9","fa"],["4n-cC","M0"],["1X-6K","HD","i"],[ZC.1b[7],"B7"],["7c","R4","f"],["15f","dn"],["15c","VT","b"],["Cj","DI","b"]]),1c!==ZC.1d(e=t.o["3g-iB"])&&(e.1f?(t.7H[0]=ZC.2s(e[0]),t.7H[1]=ZC.2s(e[e.1f-1])):t.7H[0]=t.7H[1]=ZC.2s(e)),"3e"==1y t.BV){1a n=t.BV.2n(":"),l=1;3===n.1f&&(l=ZC.1W(n[2])),t.BV=[];1j(1a r=ZC.1W(n[0]);r<ZC.1W(n[1]);r+=l)t.BV.1h(""+r);t.BV.1h(""+n[1])}1c!==ZC.1d(t.o["7a-2B"])&&(t.EG=ZC.3w),t.EG=ZC.BM(t.EG,2),1c!==ZC.1d(e=t.o.2c)&&(t.A7=t.BY=ZC.1k(e),0!==ZC.1k(e)||"9u"!==t.A.AF&&"aX"!==t.A.AF||(t.DI=!1)),1c!==ZC.1d(e=t.o["1X-9F"])?t.P8=ZC.1k(e):t.P8=t.EG,t.P8=ZC.BM(2,t.P8),1c!==ZC.1d(e=t.o.5H)&&(t.FB=1m CX,t.FB.1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t.WR()}WR(){1a e,t=1g,i={x:"iX",y:"iY",1s:"I",1M:"F"};1j(1a a in i){1a n=t.A.Q[i[a]];1c!==ZC.1d(t.o[a])&&(n=ZC.IH(t.o[a]))>=0&&n<=1&&(n="x"===a||"y"===a?t.A.Q["x"===a?"iX":"iY"]+ZC.1k(n*t.A.Q["x"===a?"I":"F"]):ZC.1k(n*t.A.Q[i[a]])),t[i[a]]=n}1c!==ZC.1d(e=t.o.2c)&&(t.A7=t.BY=ZC.1W(ZC.8G(e))),1c!==ZC.1d(e=t.o["2c-4e"])&&(t.A7=ZC.1W(ZC.8G(e))),1c!==ZC.1d(e=t.o["2c-6j"])&&(t.BY=ZC.1W(ZC.8G(e)));1a l="k"===t.AF&&!t.D8||"v"===t.AF&&t.D8?t.I:t.F;t.A7<1&&(t.A7*=l),t.BY<1&&(t.BY*=l)}W5(e){1a t=1g;1c!==ZC.1d(t.o.ak)&&(t.X2||(t.X2=1m H6(t.A)),t.X2.1C(t.o),t.X2.1q(),t.X2.IT=e,t.X2.DA()&&(t.X2.1q(),t.E8=t.X2.E8,t.CF=t.X2.CF))}GT(){}T6(){}lo(){}H5(){}3j(){}5S(){}LS(){1a e,t=1g,i={7Q:t.f6,"m1-8E":t.RD,"6K-8E":t.S3,6K:t.E8,"1X-6K":t.HD,5G:t.eZ,"5G-dm":t.TY,ax:t.eL,"ax-6K":t.SP};if(t.FB)1P(t.FB.o.1J){1i"5s":i[ZC.1b[68]]=!0,1c!==ZC.1d(e=t.FB.o.1E)&&(t.FB.o.4t=e);1a a=t.Y[t.A1]-t.Y[t.V],n="",l="",r={},o=["rN","mA","hT","mz","da","ex","mw"];1j(1a s in o)r[o[s]]=ZC.HE["5s-rO"][o[s]];l=0<=a&&a<=5x?"rN":5x<a&&a<=lA?"mA":lA<a&&a<=zs?"hT":zs<a&&a<=zr?"mz":zr<a&&a<=zM?"da":zM<a&&a<=15a?"ex":"mw",n=1c!==ZC.1d(t.FB.o[l])?t.FB.o[l]:1c!==Z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"===s.CF.2v(0,11))4J{1a EF=s.CF.1F("7u:","").1F("()","");7l(EF)&&(CS=7l(EF).4x(s,CS))}4M(e){}1u CS=OU&&"cV"===BE.7Q?"-"+s.CF.1F(/%v|%1z-1T/g,CS):s.CF.1F(/%v|%1z-1T/g,CS);1l CS}EW(e,t,i,a,n){1a l=1g,r=l.FL(t,i,a,n),o=[];o.1h(["%1z-1H",r],["%1z-3b",t],["%1z-2K",t]),l.FB&&"5s"===l.FB.o.1J?o.1h(["%1z-1T",r],["%v",r]):"3P"===l.DL&&n?o.1h(["%1z-1T",1B.6s(l.H8,t)],["%v",1B.6s(l.H8,t)]):o.1h(["%1z-1T",ZC.9q(l.Y[t],"")],["%v",ZC.9q(l.Y[t],"")]),o.1h(["%l",r],["%t",r],["%i",t],["%c",t]),o.4i(ZC.lW);1j(1a s=0,A=o.1f;s<A;s++){1a C=1m 5y(o[s][0],"g");e=e.1F(C,o[s][1])}1l e}T6(){1a e=1g,t=ZC.BM(e.Y.1f,e.BV.1f),i=0;if(t>0&&e.BR.AA%180==0){1j(1a a=ZC.BM(1,ZC.1k(t/20)),n=0;n<t;n+=a){1j(1a l=((e.BV[n]||e.Y[n])+"").2n(/<br>|<br\\/>|<br \\/>|\\n/),r=0,o=0,s=l.1f;o<s;o++)r=ZC.BM(r,10*l[o].1F(/<.+?>/gi,"").1F(/<\\/.+?>/gi,"").1f);i+=r}i/=1B.2j(20,t)}1u i=15;e.D8?e.EG=ZC.1k((e.F-e.A7-e.BY)/15):e.EG=ZC.1k((e.I-e.A7-e.BY)/i),e.EG=ZC.CQ(e.EG,20),(e.BP-e.B3)/e.CP+1<e.EG?e.EG=ZC.BM(e.EG,ZC.1k((e.BP-e.B3)/e.CP)+1):(e.BP-e.B3)/(2*e.CP)+1<e.EG&&(e.EG=ZC.BM(e.EG,ZC.1k((e.BP-e.B3)/(2*e.CP))+1)),e.EG=ZC.BM(2,e.EG)}lo(){1a e=1g;1c===ZC.1d(e.o["1X-9F"])&&(e.P8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i1=!0)}RZ(e,t,i){1a a,n,l,r,o=1g,s=!1,A=1c!==ZC.1d(o.o.6z)&&-1!==(""+o.o.6z).1L("ex");if(o.FB&&1c!==ZC.1d(o.FB.o.1J))1P(o.FB.o.1J){1i"5s":1a C=o.XD(e,t);(t-e)%C!=0&&(A||(t+=C-(t-e)%C)),a=[e,t,C,1,C],s=!0}1u if("3P"===o.DL)a=[e,t,1,1,1];1u{1a Z=1c!==ZC.1d(o.o.6z)||1c!==ZC.1d(o.o["2j-1T"])||1c!==ZC.1d(o.o["1X-1T"]);a=e!==t?ZC.AQ.ZI(e,t,o.CP,o.P9,Z):[e,t,o.CP,1,o.CP]}-1===o.QU&&(o.QU=a[4]);1a c=a[0],p=a[1];r=a[2],i&&"3P"===o.DL&&(c=1B.4b(ZC.JN(c,o.H8)),p=1B.4l(ZC.JN(p,o.H8))),1c===ZC.1d(o.o.6z)&&(p-c)/r>8p&&(r=(p-c)/8p,l=1B.4l(ZC.JN(r)/1B.a6),r=1B.6s(10,l)),1c===ZC.1d(o.o["2j-1T"])&&c!==p&&(s&&A||(c-=c%r)),1c===ZC.1d(o.o["1X-1T"])&&c!==p&&(s&&A||(p=p-p%r+(p%r==0?0:r))),l=1B.4b(ZC.JN(r)/1B.a6);1a u,h=a[3];if(l<h&&l<0&&(h=l),"3P"===o.DL&&(h=ZC.BM(1,h)),o.Y=[],s&&A){1a 1b=ZC.AO.YT(c,"%Y-%n-%d-%H-%i-%s",!1,0).2n("-"),d=!0,f=ZC.1k((""+o.o.6z).1F("ex"));0===f&&(f=1);1a g=ZC.1k(1b[1]),B=ZC.1k(1b[0]);1j(o.Y.1h(c);d&&c!==p;){d=!1;1a v=ZC.1k(1b[2]);g+f>=12&&B++,g=(g+f)%12,(31===v&&(3===g||5===g||8===g||10===g)||v>28&&1===g)&&(v=1===g?B%4==0&&B%100!=0||B%sC==0?29:28:30);1a b=1m a1(B,g,v,1b[3],1b[4],1b[5]).bI();o.Y.1h(b),b<p&&b<=t&&(d=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M3[Y])?ZC.1W(J[i].M3[Y]):0;if(J[i].CB)1c===ZC.1d(E[J[i].DU])&&(E[J[i].DU]=[]),1c===ZC.1d(E[J[i].DU][X])?J[i].R[Y].AE>=0||!I?E[J[i].DU][X]=[J[i].R[Y].AE,0]:E[J[i].DU][X]=[0,J[i].R[Y].AE]:J[i].R[Y].AE>=0||!I?E[J[i].DU][X][0]+=J[i].R[Y].AE:E[J[i].DU][X][1]+=J[i].R[Y].AE,J[i].R[Y].AE>=0||!I?J[i].R[Y].CL=E[J[i].DU][X][0]:J[i].R[Y].CL=E[J[i].DU][X][1],1c===ZC.1d(s.o[ZC.1b[5]])&&D.1h(E[J[i].DU][X][0]+y,E[J[i].DU][X][1]+y);1u if(1c===ZC.1d(s.o[ZC.1b[5]])){D.1h(J[i].R[Y].AE+y),0!==y&&D.1h(y);1j(1a L=0,w=J[i].R[Y].DJ.1f;L<w;L++)D.1h(J[i].R[Y].DJ[L]+y)}}}D.1f>0&&(l=ZC.dj(D),r=ZC.d4(D)),0!==s.Y.1f||l!==4T.hH&&r!==4T.16L||(s.Y=[0,1],l=0,r=1),1c===ZC.1d(s.o[ZC.1b[5]])&&(1c!==ZC.1d(s.o["2j-1T"])&&"3g"!==s.o["2j-1T"]?l=ZC.1W(s.o["2j-1T"]):l>0&&"3g"!==s.o["2j-1T"]&&"3P"!==s.DL&&(l=0),1c!==ZC.1d(s.o["1X-1T"])&&(r=ZC.1W(s.o["1X-1T"])),l===ZC.3w&&r===-ZC.3w?(s.V=0,s.A1=0,s.B3=0,s.BP=0):s.RZ(l,r,!0))}2===e&&(-1===s.GZ&&-1===s.HM&&(s.GZ=s.B3,s.HM=s.BP),-1===s.QU&&(s.QU=s.CP)),"3g"===s.o["2j-1T"]&&1c===ZC.1d(s.o["3T-1T"])&&(s.HK=s.B3),0===s.OZ&&(s.OZ=ZC.1k((s.BP-s.B3)/s.CP));1a M=s.H.E["2Y"+s.A.L+".3G"];if(1c===ZC.1d(s.H.E[ZC.1b[53]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ze[2],ue=Ze[3];se=Ze[4];1a he=pe*1B.4l(d.Y[d.V]/pe),6h=pe*1B.4b(d.Y[d.A1]/pe),de="";d.GX=0;1a fe=!0;1j(t=he;t<=6h;t+=pe){fe=!0;1a ge=ZC.AO.YT(t,ce,d.A.VI,d.A.NJ);if(ge!==de){1P(ue){1i"yr":se>15&&(fe=ZC.1k(ge)%2==0);1p;1i"Ab":se>15&&(fe=ZC.1k(ge)%3==0);1p;1i"da":se>45?fe=1===ZC.1k(ge)||15===ZC.1k(ge):se>30?fe=1===ZC.1k(ge)||10===ZC.1k(ge)||20===ZC.1k(ge):se>15&&(fe=1===ZC.1k(ge)||10===ZC.1k(ge)||15===ZC.1k(ge)||20===ZC.1k(ge)||25===ZC.1k(ge));1p;1i"hr":se>45?fe=ZC.1k(ge)%12==0:se>30?fe=ZC.1k(ge)%6==0:se>15&&(fe=ZC.1k(ge)%3==0);1p;1i"2j":1i"zP":se>45?fe=ZC.1k(ge)%30==0:se>30?fe=ZC.1k(ge)%10==0:se>15&&(fe=ZC.1k(ge)%5==0)}fe&&(me(t,!0),de=ge)}}ne.AM&&(ne.J=d.J+"-9F",ZC.CN.1t(o,ne,ae))}1u 1j(d.GX=0,me(d.V),d.GX=d.A1-d.V,me(d.A1),d.GX=1,t=d.V+1;t<d.A1;t++)(t-d.V)%M==0&&me(t);if(d.M.AM&&d.M.AN&&""!==d.M.AN){($=1m DM(d)).1S(d.M),$.J=d.A.J+"-"+d.BC.1F(/\\-/g,"1b")+"-iV",$.GI=d.J+"-1H "+d.A.J+"-1z-1H zc-1z-1H",$.AN=d.M.AN,$.Z=d.H.2Q()?d.H.mc():ZC.AK(d.A.J+"-3A-ml-0-c"),$.IJ=d.H.2Q()?ZC.AK(d.H.J+"-3Y"):ZC.AK(d.H.J+"-1E"),$.1q(),"5l"!==d.M.o["2t-1r"]&&"5l"!==d.M.o.1r||-1===f||($.C1=f);1a Be=d.iX+(d.AT?d.BY:d.A7),ve=d.I-d.A7-d.BY;1P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==0?s.iY+=Z/2:s.iX+=Z/2}s.AM&&(s.1t(),s.E9(),1c===ZC.1d(o.o.2H)&&s.KA||(1c!==ZC.1d(o.o.2H)&&(o.o.2H.1E=o.o.2H.1E||"%1z-1T"),A.1h(ZC.AO.O8(o.A.J,s))))}}}}1O Bc 2k DT{2G(e){1D(e);1a t=1g;t.C4=.95,t.L=0,t.AF=1c,t.M=1c,t.FT=1c,t.tU=!1,t.B7="2a",t.A7=0,t.BY=0,t.MK="5f",t.O6="5f",t.PR=[5,5],t.kp=[0,0],t.Z4=""}1q(){1D.1q();1a e,t=1g;t.4y([["1J","AF"],["1T-5z","tU","b"],["2c-4e","A7","i"],["2c-6j","BY","i"],[ZC.1b[7],"B7"],["16N-1z","Z4"],["1H-6w","MK"],["1H-i2","O6"],["5z","FT"]]),1c===ZC.1d(t.o.2o)&&(t.o.2o="1N"===t.AF?.25:.95),1c!==ZC.1d(e=t.o["1H-g2"])&&("4h"==1y e&&e.1f?(t.PR[0]=ZC.1k(e[0]||"5"),t.PR[1]=ZC.1k(e[1]||"5")):t.PR[0]=t.PR[1]=ZC.1k(e||"5")),t.4y([["2o","C4","f",0,1]]),1c===ZC.1d(e=t.o.1H)&&1c===ZC.1d(t.o.1E)||(t.M=1m DM(t),t.A.A.A.B8.2x(t.M.o,["("+t.A.AF+").4z.1R.1H"]),1c!==ZC.1d(t.o.1E)&&t.M.1C({1E:t.o.1E}),t.M.1C(e),t.M.1q(),t.kp=[t.M.BJ,t.M.BB])}1t(){1a e,t,i,a,n,l,r,o=1g;if(o.FT)if(-1===o.A.BC.1L("1z-r")){if(o.AM){1a s,A,C,Z,c=o.A,p=o.A.A.Q.AP,u=c.A.J+"-3A-"+("1v"===o.B7?"f":"b")+"l-0-c";o.Z=o.C7=ZC.AK(c.H.2Q()?c.H.J+"-3Y-c":u),e=ZC.P.E4(o.Z,c.H.AB),n=[];1a h,1b,d=0,f=0;o.BJ>-1&&o.BJ<1&&(o.BJ=1B.4l(o.BJ*c.A8)),o.BB>-1&&o.BB<1&&(o.BB=1B.4l(o.BB*c.A8)),o.M&&(o.M.Z=c.H.2Q()?c.H.mc():ZC.AK(c.A.J+"-3A-ml-0-c"),o.M.J=o.A.A.J+"-"+o.A.BC.1F(/\\-/g,"1b")+"-aM"+o.L,o.M.GI=o.A.J+"-1R-1H "+o.A.A.J+"-1z-1R-1H zc-1z-1R-1H");1a g=1n(e,t){1a i;1l-1!==(t+"").1L("%")?(i=ZC.1W(t.1F("%","")),i="k"===e.AF?ZC.1k(i*(e.ED-e.E3)/100):i*(e.HM-e.GZ)/100):i=t,o.tU||"v"===e.AF?e.B2(i):e.GY(i)};if("4C"===o.AF){1a B,v,b,m;1j(1b=o.A.A,"k"===c.AF?(B=c,v=""===o.Z4?1b.BT("v")[0]:1b.BK(o.Z4)||1b.BT("v")[0]):"v"===c.AF&&(v=c,B=""===o.Z4?1b.BT("k")[0]:1b.BK(o.Z4)||1b.BT("k")[0]),l=0,r=o.FT.1f;l<r;l++)b=g(B,o.FT[l][0]),m=v.B2(o.FT[l][1]),n.1h([b,m]),d+=b,f+=m;if(d/=n.1f,f/=n.1f,n.1f>=3){if(n[0].2M("/")!==n[n.1f-1].2M("/")&&n.1h([n[0][0],n[0][1]]),c.A.AJ["3d"])1j(c.A.NF(),t=0,i=n.1f;t<i;t++)a=1m CA(c.A,n[t][0]-ZC.AL.DW,n[t][1]-ZC.AL.DX,ZC.AL.FR),n[t][0]=a.E7[0],n[t][1]=a.E7[1];(h=1m DT(o.A)).J=c.J+"-1R-"+o.L,h.Z=h.C7=c.H.2Q()?c.H.mc():ZC.AK(u),h.1S(o),h.AX=0,h.AP=0,h.EU=0,h.G4=0,h.C=n,h.1q(),h.1t()}}1u if("1w"===o.AF){if(-1!==c.BC.1L(ZC.1b[50])?1===o.FT.1f?s=A=g(c,o.FT[0]):2===o.FT.1f&&(s=g(c,o.FT[0]),A=g(c,o.FT[1])):-1!==c.BC.1L(ZC.1b[51])&&(1===o.FT.1f?s=A=g(c,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g.3o=I}),r.BX.MC&&ZC.A3("#"+r.BX.J+"-sh-2R").9z().5d(1n(){1g.v=a.2M(" "),1g.3o=I*x}),ZC.A3("#"+r.BX.J+"-3z").9z().5d(1n(){1g.3o=I}),ZC.A3("#"+r.BX.J+"-3z").5d(1n(){1g.1I.1K=r.BX.iX-y+"px",1g.1I.1v=r.BX.iY-y+"px",1g.1I.1s=2*y+"px",1g.1I.1M=2*y+"px"}),r.BX.MC&&(ZC.A3("#"+r.BX.J+"-sh-3z").9z().5d(1n(){1g.3o=I*x}),ZC.A3("#"+r.BX.J+"-sh-3z").5d(1n(){1g.1I.1K=r.BX.iX-y+X+"px",1g.1I.1v=r.BX.iY-y+X+"px",1g.1I.1s=2*y+"px",1g.1I.1M=2*y+"px"})),ZC.A3("#"+r.BX.J+"-7w-2R").3p()}}}1u r.M1.D.Q8=!0,r.M1.D.Y7(),r.M1.D.JQ();1l r.W===r.RG+1&&1c!==ZC.1d(r.TB)&&r.TB(),o}1t(){1a e=1g;if(1c!==ZC.1d(e.IG)?ZC.CN.1t(e.IG,e.BX,e.BX.C):e.BX.1t(),e.OC)4J{1===e.eR&&e.OC()}4M(t){}}}E5.GJ={bG:"B0",9Z:"BH",7z:"CJ",2e:"AH",x:"iX",y:"iY",1s:"I",1M:"F",2o:"C4",2f:"AA",yA:"N7",2W:"C",cv:"AX",ir:"B9",eS:"AP",eU:"BU",eP:"A0",f4:"AD"},E5.9k=1n(e,t,i,a){1l i*e/a+t},E5.yz=1n(e,t,i,a){1a n=(e/=a)*e;1l t+i*(4*(n*e)+-9*n+6*e)},E5.yJ=1n(e,t,i,a){1a n=(e/=a)*e,l=n*e;1l t+i*(37.154*l*n+-116.15q*n*n+134.158*l+-68.59*n+14.15r*e)},E5.yL=1n(e,t,i,a){1l(e/=a)<1/2.75?i*(7.j1*e*e)+t:e<2/2.75?i*(7.j1*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?i*(7.j1*(e-=2.25/2.75)*e+.15L)+t:i*(7.j1*(e-=2.15N/2.75)*e+.15O)+t},E5.yO=1n(e,t,i,a){1a n=(e/=a)*e;1l t+i*(n*e+-3*n+3*e)},E5.yM=1n(e,t,i,a){1a n=(e/=a)*e,l=n*e;1l t+i*(l*n+-5*n*n+10*l+-10*n+5*e)},E5.RO=[E5.9k,E5.yz,E5.yJ,E5.yL,E5.yM,E5.yO],ZC.aT={15P:15Q,15R:5x,15S:0,15T:1,15M:2,15U:3,15W:4,15X:5,15Y:0,15Z:1,160:2,161:3,162:1,15V:2,15K:3,15B:4,15J:5,15u:6,15v:7,15x:8,15y:9,15z:10,15A:11,15D:12,15E:13,15F:2,15G:3,15H:4,15I:5};1O PM 2k ad{2G(e){1D();1a t=1g;t.D=e,t.SE=!1,t.C6=1c,t.P5=[],t.PL={},t.lM=1c}pA(e){1a t=1g;1c===ZC.1d(t.PL[e.BC])&&(t.PL[e.BC]=e,e.M1=t,t.SE||t.4e())}2P(e){1a t=1g;e.M1=t,e.pG>0?(t.P5.1h(e),2w.5Q(1n(){e.BX.TW=!0,t.SE||t.4e()},e.pG+1)):(e.BX.TW=!0,t.P5.1h(e),t.SE||t.4e())}4e(){1a e=1g;e.SE=!0,ZC.AO.C8("17l",e.D.A,{id:e.D.A.J,4w:e.D.J});1a t=!0;!1n i(){t||e.6z(),t=!1,e.SE&&(e.C6=2w.hQ(i))}()}6z(){1a e,t=1g,i=0;if(t.SE){1j(1a a=0,n=t.P5.1f;a<n;a++)i+=t.P5[a].6M();if("3a"===t.D.H.AB)if(t.D.H.KA)1c!==ZC.1d(e=ZC.AK(t.D.J+"-4k-bl-c"))&&e.9d("2d").n6(t.D.iX,t.D.iY,t.D.I,t.D.F);1u 1j(a=0,n=t.D.AZ.A9.1f;a<n;a++)1j(1a l=0;l<t.D.AZ.A9[a].SZ;l++)1c!==ZC.1d(e=ZC.AK(t.D.J+"-1A-"+a+"-bl-"+l+"-c"))&&e.9d("2d").n6(t.D.iX,t.D.iY,t.D.I,t.D.F);1j(a=0,n=t.P5.1f;a<n;a++)0===t.P5[a].6z()&&(t.P5[a].BX.TW=!1);1j(1a r in t.PL)1j(t.PL[r].jk||(i+=1),a=0,n=t.PL[r].P5.1f;a<n;a++)t.PL[r].P5[a].XE===t.PL[r].lj?0===t.PL[r].P5[a].6z()&&(t.PL[r].P5[a].BX.TW=!1):"3a"===t.D.H.AB&&t.PL[r].P5[a].1t();0===i&&(t.PL={},t.P5=[],t.8A())}}8A(e){1c===ZC.1d(e)&&(e=!1);1a t,i=1g;if(e&&(i.18H=!0),2w.oV(i.C6),i.D.Y7(),i.D.Q8=!1,ZC.AK(i.D.H.J)){i.D.JQ(),2w.5Q(1n(){(t=ZC.AK(i.D.A.J+"-3c"))&&i.D.AZ.HQ&&(-1===ZC.AU(["5m","9u","8i","7R","7d"],i.D.AF)&&1!==1o.q4||i.D.AZ.HQ.4i(1n(e,t){1l ZC.AO.N5(e)>ZC.AO.N5(t)?1:-1}),t.4q+=i.D.AZ.HQ.2M(""))},33),i.D.oR(),i.SE=!1;1j(1a a=0,n=i.P5.1f;a<n;a++)i.P5[a].TB=1c;if(i.P5=[],i.PL={},e||ZC.AO.C8("17N",i.D.A,{id:i.D.A.J,4w:i.D.J}),1c!==ZC.1d(i.lM))4J{i.lM()}4M(l){}}}}PM.UH=33,1n(){1j(1a e=["ms","Dz","7n","o"],t=0,i=e.1f;t<i&&!2w.hQ;++t)2w.hQ=2w.17z||2w[e[t]+"17y"],2w.17x=2w.17w||2w[e[t]+"17v"]||2w[e[t]+"17q"];2w.hQ||(2w.hQ=1n(e){1l 2w.5Q(e,PM.UH)}),2w.oV||(2w.oV=1n(e){2w.iu(e)})}(),1o.3r(1c,"fJ",1n(e,t){1j(1a i,a,n=0,l=t[ZC.1b[16]].1f;n<l;n++)if(t[ZC.1b[16]][n].1J&&-1!==ZC.AU(["3O","1w","bj","1N","bv","2U","5t","6c","97","83","dN","6O","7k"],t[ZC.1b[16]][n].1J)&&t[ZC.1b[16]][n].Ed){1a r=t[ZC.1b[16]][n];ZC.6y(r);1a o=r.Ed||{};ZC.6y(o);1a s,A,C,Z=ZC.IH(o.lq||"10%"),c=o.18f||{1E:"18e"},p=o.cq||{},u=o[ZC.1b[8]]||"0.3",h=r[ZC.1b[11]]||[],1b=[];if("3O"===t[ZC.1b[16]][n].1J){1a d=0;1j(i=0;i<h.1f;i++)h[i][ZC.1b[5]]&&1c!==ZC.1d(h[i][ZC.1b[5]][0])&&(d+=h[i][ZC.1b[5]][0]);Z>0&&Z<1&&(Z*=d),s=[].4B(h);1a f=0,g="";1j(A=1,i=h.1f-1;i>=0;i--)h[i][ZC.1b[5]]&&1c!==ZC.1d(h[i][ZC.1b[5]][0])&&h[i][ZC.1b[5]][0]<Z&&(f+=h[i][ZC.1b[5]][0],g+=(h[i].1E||"Cv no."+A)+":"+h[i][ZC.1b[5]][0]+"<br>",h[i][ZC.1b[8]]=u,1b.1h(h[i]),h.6r(i,1),A++);f>0&&(A>2?(C={6g:[f],od:!1,"1V-6a":[1],"2H-1E":g=g.2v(0,g.1f-4)},ZC.2E(c,C),h.1h(C),1o.3r(e.id,"Fz",1n(t){if(t.hN.6a){1a i=1o.6Z(t.id);if(!i)1l;1a a=1o.pE(i,t.4w);1j(1a n in a.py())"3O-eY-"===n.2v(0,8)&&a.4m(n,1c);1o.3n(e.id,"do",{1V:1b}),2w.5Q(1n(){1a t=1o.3n(e.id,"m6",{4h:"2r",3W:0,5T:0}),i={id:"pL",x:t.x,y:t.y,1E:"< os",bp:"c",4V:"iC"};ZC.2E(p,i),1o.3n(e.id,"o9",{1J:"1H",1V:i})},1)}}),1o.3r(e.id,"FH",1n(t){if("pL"===t.1H.id){1a i=1o.6Z(t.id);if(!i)1l;1a a=1o.pE(i,t.4w);1j(1a n in a.py())"3O-eY-"===n.2v(0,8)&&a.4m(n,1c);1o.3n(e.id,"nS",{1J:"1H",id:"pL"}),1o.3n(e.id,"do",{1V:h})}})):r[ZC.1b[11]]=[].4B(s))}1u{1a B=0,v=[];1j(i=0;i<h.1f;i++){if(v[i]=0,h[i][ZC.1b[5]]&&h[i][ZC.1b[5]].1f)1j(a=0;a<h[i][ZC.1b[5]].1f;a++)v[i]+=ZC.2l(h[i][ZC.1b[5]][a]);B=ZC.BM(B,v[i])}Z>0&&Z<1&&(Z*=B),s=[].4B(h);1a b=[],m=[];1j(A=1,i=h.1f-1;i>=0;i--)if(v[i]<Z){if(h[i][ZC.1b[5]]&&h[i][ZC.1b[5]].1f)1j(a=0;a<h[i][ZC.1b[5]].1f;a++)b[a]=ZC.1W(b[a]||"0"),b[a]+=h[i][ZC.1b[5]][a],m[a]=m[a]||"",m[a]+=(h[i].1E||"Cv no."+A)+":"+h[i][ZC.1b[5]][a]+"<br>";1b.1h(h[i]),h.6r(i,1),A++}if(b.1f)if(A>2){1j(a=0;a<m.1f;a++)m[a]=m[a].2v(0,m[a].1f-4);C={6g:b,od:!1,"1V-6a":[1],"1V-tt-1E":m,"2H-1E":"%1V-tt-1E"},ZC.2E(c,C),h.1h(C),1o.3r(e.id,"Fz",1n(t){if(t.hN.6a){if(!1o.6Z(t.id))1l;1o.3n(e.id,"do",{1V:1b}),2w.5Q(1n(){1a t=1o.3n(e.id,"m6",{4h:"2u"}),i={id:"nL",x:t.x+t.1s/2,y:t.y,1E:"< os",bp:"c",4V:"iC"};ZC.2E(p,i),1o.3n(e.id,"o9",{1J:"1H",1V:i})},1)}}),1o.3r(e.id,"FH",1n(t){if("nL"===t.1H.id){if(!1o.6Z(t.id))1l;1o.3n(e.id,"nS",{1J:"1H",id:"nL"}),1o.3n(e.id,"do",{1V:h})}})}1u r[ZC.1b[11]]=[].4B(s)}}1l t});',62,4391,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||var|_|null|_n_||length|this|push|case|for|_i_|return|new|function|zingchart|break|parse|color|width|paint|else|top|line||typeof|scale|plot|Math|append|super|text|replace|border|label|style|type|left|indexOf|height|area|class|switch|item|marker|copy|value|background|data|_f_|max|legend|scroll|||||||||||bottom|none|offset||size|angle|document|visible|guide|min|extends|_a_|360|split|alpha|cls|default|node|_b_|font|plotarea|substring|window|load|margin|preview|right|items|menu||_cp_|svg|constructor|tooltip|setup|objects|position|mobile|join|hover|css|add|usc|path|fff|shape|bar|solid|points|target|graph|appendChild|||||||||||canvas|index|map||string|page|auto|JSON|fill|clear|unbind|abs|move|exec|opacity|remove|handle|bind|body|clip|align|padding|MAX|layout|MAPTX|circle|scales|div|box||instanceof|center|zoom|click|shadow|DEV|vml|display|Array|handler|pie|log|attr|url|update|ref|255|270|plotindex|state|main|tick||||round|||enabled||||stroke|floor|live|image|start|cache|html|object|sort|die|plots|ceil|setAttribute|show|_x_|xmax|innerHTML|bugreport|xmin|all|000|delete|graphid|call|assign_a|SCALE|toFixed|concat|poly|absolute|mode|SKIP|json|touchstart|form|try|viewsource|error|catch|dynamic|mask|createElement|minor|out|999|Number|enable|cursor|spline|plotid|maps|history|||||||||||src|hide|imgfill|each|gradient|normal|stringify|GESTURE|gui|prototype|front|inherit|bubble|rect|2px|depth|ymax|ymin|date|vbar|_l_|parseInt|opposite|1e3|RegExp|range|substr|row|sqrt|custom|title|callback|short|transform|format|getNodeData|header|shapes|toUpperCase|inner|GUIDES|parseFloat|setTimeout|touchend|build|nodeindex|test|piano|img|fullscreen|shared|m_|||||||||||group|highlight|hbar|String|pool|touchmove|values|_e|context|end|mouseup|total|from|middle|parentNode|layer|table|splice|pow|about|arc|scatter|placement|bold|_todash_|step|loader|repeat|active|paint_|info|mousedown|callout|9999|print|browser|decimals|csv|status|ie67|vbar3d|palette|off|preventDefault|fontSize|distance|fontWeight|hbubble|fontFamily|00|childNodes|getLoader|||||ddd||aspect|221F1F|override|weight|fixed|plotidx|factor|radar|pie3d|translate|source|http|outer|trend|hbar3d|eval|close|webkit|zcv|api|hook|important|nodeidx|eachfn|javascript|init|goal|touches|item_|slice|mouseover|href|sFontWeight|span|zoomx|stack|true3d|aAutoFit|arrow|flat|button|progress|D1D3D4|zoomy|getToggleAction|oRE|negation|hbullet|sum|mouseout|className|mousemove|getPMap|isNaN|1px|last|xls|key|cnt|area3d|stock||subtitle||5px|location|trigger|exit|ccc|hasOwnProperty|percent|send|entry|tagName|vbullet|void|npv|zidx|export|CSV|plus|1e4|pointer|hscatter|diff|val|nbsp|oPS|order|animation|block|www|stop|pattern|name|gauge|separator|fast|_p_|01|space|images|radial|static|333|zoomTo|connector|arguments|58595B|hidden|nestedpie|adjust|column|navigator|Object|eee|light|kmax|||number|action|kmin||quirks|line3d|oPPI||initcb|blocker|float|getContext|coords|which|rose|hideCM|radius|crosshair|linear|vertical|zc_legend_mousescroll|locate|reverse|paintPreview|_c_|square|DAY|cross|mixed|matrix|ready|dragged|_fixed_|children|apply|family|dblclick|targetid|side|ticks|oMask|ring|getTooltipPosition|rgba|png|overflow|frame|rgb|EVENT|select|method|pages|clearInterval|FONTFAMILY|footer|mid|EVENTS|pointsarea|change|angleEnd|destroy|Date|zIndex|root|version|toString|LN10|getInstance|ajax|toggle|setAttributeNS|filled|behaviors|ZCClass||msie|async|styles|complete|down|rules|equal||input|element|zindex|COLORS|atan|||mapPointsToPreview|segmented|SEC|exponent|multiple|10px|vfunnel|hfunnel|MIN|mousewheel|_tx_|success|transparent|rtl|setdata|flash|scrollLeft|selection|marker_|toLowerCase|scrollTop|skip|params|pyramid|rel|ANIMATION|pstack|NODE_EV|render|mixed3d|graphset|tools|icon|mdim|removeChild|wait|dark|gear|tdim|venn|message|chart|gshape|output||safe||objmove||flatten|iXVal|vline|pageX||ic_line|facet1|ctx|anchor|facet2||setNodeData|lineHeight|iYVal|varea||theme||256|Function|Resource|SKIPTRACKERS|open|idx|_INFO_|angleStart|italic|getTime|getAttribute|feed|GET|SEQ|user|single|textarea|oblique|facet3|decoration|resize|TOUCHEVENTS|datalength|A2G|togglePreviewMasks|A0B|com|IMAGES|direction|pageY|userAgent|xy_|goforward|goback|horizontal|clientX|V3D|paddingTop|random|666|A58||tween|A1V|plotset|Jan|viewimage||Thu||setRequestHeader|||back|defaults|000000||timezone|lineWidth|fire|||rule|ie678|CanvasCache|labels|fillStyle|bYX|zooming|setupcb|classic|ignore|utc|bounds|reference|nodes|zero|fontStyle|getElementById|intersect|not|tab|textAlign|dashstyle|currency|power|A7A9AC|axis|uid|refresh|keys|Image|drawImage|A25|false|paddingBottom|fromCharCode|paddingLeft|A1E|day|force|collapsed||||baseVal|LEGEND|paddingRight|A26|curtain|globalAlpha|unit|sMaster|setseriesdata|isFinite|MON|highlightItem|visibility|clientY|md5|textDecoration|bidi|||cos|querySelector|stepped|vector|preserve|addPMap|GMT|Data|dx1|OBJECTMODE|1970|getElementsByTagName|FSID|4px|bar3d|arrows|raw|selected|A1F|org|sTypeX|interval|bBS|series|jpeg|3dxy|A9Q|cccccc|swipe|8C8C8C|A27|xmlns|414042|average|AAZ|opacity2|bandwidth|hideprogresslogo|sin|forw|A1G||dx2|A87|sampling|_pageX_|beforeSend|labelid|||touch|moveTo|A5Y|A3L|A34|updates||sep||watermark|month|_end_|inactive|nodeType|wrapper|A4V|ratio|cone|A38|zoomin|count|REFRESH_TICK|license|zcrandom|A09|lon|setInterval|z3d|backgroundColor1|encodeURIComponent|A56|borderWidth|dist|borderColor|cwidth|intxy|300|sel|A53|headers|modal|continue|zoomout|backgroundColor2|reload|A0C|CACHECANVASTEXT|onmouseover|contextmenu||head|SKIPMAPS|documentElement|||smart|lat|rectangle|progression|checked||A68||dotted||styleSheets|generated||A39|IMG404|A2T||||charAt|point|aBandWidths|A1P|onreadystatechange|readyState|VERSION|found|widgets|segment|dataparse|A35|labelindex|normalize|A06|A50|submit|clearPreview|long|bIsBottom|i18n|jsonsource|originalsource|A4X|onmouseout|getstyle|3e6c7b|1800|charCodeAt|tolerance|pdf|download|query|getComputedStyle|bullet|application|DOMMouseScroll|DEFAULT|margins||viewall||A07|getElementsByClassName|dashed||rotate|overscroll|parentElement|before|after|dashdot|xtype|storage|NULL|save|A49|ctrlKey|CANVASTEXT|restore|keyvalue|1e6|collapse|shapeid|A9L|setAnchor|shapeindex|A46|bRTL|A61|A65|05|A9J|View|1024|totals|lineTo|hmixed|A4D|A04|colors|A01|A02|0px|html5|A2I|true|_ang_|goals|clearGuide|_pageY_|addColorStop|A18|hasEvent|callEvent|first|nodata|gap|facet5|nodekeyvalue|ll_|flags|ZCOUTPUT||legendminimize|3dfacet|underline|timeout|onmousemove|A2P|Close|_r_|facet4|getdata|A2E|GUIDE_EV||xydistance||A2H|infotype|NODE_EV_CHART|A2L|stroked|A1C|A45|titles|websockets|A62|A03|A7I|A67|MAX_VALUE|A0Y|events|A0Z|onload|protocol|xdata|ZingChart|XMLHttpRequest|requestAnimFrame|zc_loader_mousewheel|A1D|minute|CDCDCD|A2N|A1B|CSS|getBoundingClientRect|AJAXEXPORT|showguide|A1H|alignment|URL|modules|dataurl|previewscale|A9M|lcoords|data_||lstep|cleanTouchEvents||||dim|A48||aperture|A2F|BUILDCODE|sTypeE||multiplier|A23|b2D|lineColor|||clearTimeout|setScrollingFlag|locale|A3T|overlap|LOCALSVGEXPORT|exitfullscreen|fit|hand|A4C|A2J|FONTSIZE|post|AGB|A2B|parsecb|smooth|A3A|contour|A9R|connect|A5A|nulls|MAPSONBOTTOM|evalFn|cancel|A52|item_title|A8T||||onerror|5625|_h_|369|ffffff|applyJsRuleSvg|getSize|A5B|vboxid|CACHESELECTION|A2X|A6Z|wh_|A54||trapeze|A2V|A6X|extendAPI|aMDXY|A3Y|A85|TTLOCK|A0O|_append_|A1L|zc_guide_touchend|A83||PLOTSTATS|ANIMATION_|A0W|FSSTATUS|A1N|PATTERNS|A1J|getFormatValue|A40|A3S|blocked|A82|A0P|tap|A1M|lowlevel|_hex2rgb_|bars|Bottom|A4N|defs|xml|markerbg|THEME|AA2|BODY|toDataURL|filter|days|A0N|empty|disableanimation|showhide|sharedZScale|A1K|relative|setLineDash|PARSE3D|filename|Blob|oMap|exportdata|months|A70|A5L|A1U|A5M||A5K|hasData|A47|oNode_|500|bound||A0M|xlink|Series|A0L|A4W|textprint|foreignObject||A2S||BLANK|applyRGBA|stream|DOMFRAGMENTS|Top|bPoly|A3H|Right|Left|yall|A9Y|A24|A0T|ruler|A5J|xall|A30|A15|color2|alignPosition|cloneNode|A4E|A3G|A0S|A5V|A3J|Download|A4F|palatte|A0X|PLOTSHLAYER|base64|A41|025|595959|A29|A84|_image|929497|exec_flash|A1O|AA1||setupPlotArea||fixPlacement|A1S||opera|A55|global|_nfind_|borderRight|A44|A00|defaultView|threshold||A4P||A31|A32|A88|zcoutput|addEventListener|A4Q|36e5|borderLeft|clientLeft|A3N|A0R|minimize|A0K|butt|clientWidth|parseLayout|lin|full|onStop|TOUCHZOOM|plotdata|coord|transport|reset|A7Y|A28|currentStyle|clientTop|A20|mini|AA0|bBind|match|thousands|A5D|A3V|A5E|ABA|getobjectinfo|65535|ABX|A4Z|A3U|A2Z||A4Y||disabled|A42|undefined|isBold|AAJ|A0Q|||pull|A1X||calculate|ActiveXObject||A2Y|A22|A64|year|hideguide|stopfeed|hour|second|005|nowrap|NODE_EV_TYPE|250|AA9|marginLeft|A0V|A6Y|beginPath|attachEvent|tip|_txp_|EQUIV|offsetX|objtype|parser|AB9|offsetY|marginTop|acos|iframe|A0U|pinch|Lucida|set|strokeStyle|A6V|A2C|A9X|A2W|closePath|clearRect|initObjectsLayers|null3d|switchto3d|enablepagescroll|disablepagescroll|_iX|||Your|Submit|A6G|schemas|stacked|exact|A2U|A6H|switchtolog||A8S|EXPORTURL|A5S|clear_||setseriesvalues|createPreviewMasks|AC2|office|_sh_|octet|backgroundPosition|Page|urn|A5P|_POOL_|microsoft|A3C|switchtolin|switchto2d|dummy|AB2|navxy_btnback|reorder|A4O|serif|deselect|mso|legend_toggle_action|removeobject|A3K|zoomto|Wait|A6O|sans|oPlot_|AC5|Loading|Guide|A2R|A4R|asin|ABH|showZCAbout|A1Z|A7G|addobject|borderBottom|A2M|startfeed|detach|||A6S|AC9|A4K|A4L|A81|AAH|_blank||TIMEOUT|AB6|A4U|A0J|Back||run|media|sMetaType|A8V|b3D|setScalesInfo|SYNTAX|A6I|xObj|l_|trackers|modify|200|2e3|A12|A0G|s_|A11|A8U|AAW|A90|customprogresstext|ASYNC_TICK|A2A|JavaScript|speed|xdist|clearAnimFrame|ydist|xzoomed|webstorage|yzoomed|AGA|zc_loader_touchstart_static|unicode|AA5|customprogresslogo|logo|STACKINGLOGIC|A17|fullscreenmode|AB1|A0I|CHECKDECIMALS|A2O|AC4||A0E|A0H|A4M|A7X|A9T|A16|A7Z||_unbind_|clearGenerated|AB4|ABL|A2Q|AC3||A4J||skipfs||getAttributes|A5W|A5X|_oCtxNode|A5Z|AC0|getGraph|AA3|A7F|A3M|kv_|hideLayer_|dataType|navpie_btnback|viewasjpg|hamburger|A59|WebSocket|viewaspng|polar|mimeTypes|resource|DownloadXLS|A1R|A5Q|AGC|A4I|A5H|clearLabelBoxes|A3P|AGD|pan|SORTTRACKERS|A5N|A0F|A6U|2048|AGE|A6T||Custom|bKeyWidth||AAO|A5I|A4B|A6R|backgroundColor|menuitemid|ring3d|pointserror|A10|KEEPSOURCE|high|low|A60|A9S|AC6|A92|ABF|vrange|globalCompositeOperation|bgc1|bgc2|funnel|ZINDEX|changedTouches|A7D|load_|AC1|loadModules|SMARTDATELABELS|dot|Sans|dash|miter|offsetWidth|A6M|SPREADTYPE|offsetHeight|600|cssFloat|A3B|CMZINDEX|A6N|chkdata|e1eaec|appendToValueBox|99999|chars|score|||17px|email|A3I|bandspace|A6K|1e9|chkcapture|A1W||465|||A14|RESOURCES|dots|8px|extension|columns||over|A7E|A6L|A5C|ABQ|A9P|A9I||GUIDETIMEOUT||A8W|||positioninfo|thickness|14px|joined|A13|oldcursor|A0A|minvalue|maxvalue|setmode|polypoints|textContent|createDocumentFragment|paintCANVASText|msecond|formats|AGF|statusText|A9N|ABG|AAN|NOABOUT|ABN|A3F|fillText|sAlign|MEDIARULES|||en_us|scrollTo|file|A4H|A5G|minus|next|A3Q|rotation|hasPassive|styleFloat|getPropertyValue||HTMLMODE|mathpoints||wrapped|A7K|||runtimeStyle|A1T|_cpa_|ABE|toggleMasks|atan2|marginRight||marginBottom||AC7|verticalAlign|passive||A5O|toggling|400|cylinder|srcElement|A8Y|zc_legend_mouseout|A3D|oP0|zc_legend_mouseover|AAI|A3E|A94|A9Z|jpg|A2D|1999|A7H|autoFit|insertBefore|downloadFile|get|focusposition|viewdatatable|areanode|mapshape|hidedatatable|ABS|createObjectURL|menuid|onloadend|paintHistory|bNpv|A7J|_window_onunload_|dasharray|setupDynamicPlotArea||utf|||FFF|D1D2D3||AAL|description|DEBOUNCESPEED||sync|A6P||exportimageurl|676667||||GRAPHID|stops|_width_|||shader|lbltype|charset|A5F|EDITSOURCE|AAY|A5U|A1Y|USERCSS|C6C6C6|caption|A21|F0F1F1|exportdataurl|_oMarker|Show|A9O|02|A93|A6Q|A91|A6J|7CA82B|zcvml|useMap|downloadcsv|ACG|crossOrigin|filetype|Name|downloadpdf|UTF|downloadsvg|downloadxls|preserveAspectRatio|whiteSpace|parent|DownloadCSV|response|Print|AREA||svg0html|AB7|AD8|ACH|ExportData|ViewDataTable|_top|guide_mouseout|LICENSE|flexible||options|xmiabt|initial||11px|_parent|responseType|sendcapture|onopen|BugReport|textBaseline|alphabetic|thead|forced|toggleabout|SwitchTo3D|FullScreen|sTypeN|addmenuitem|skip_objects_tracking|elementFromPoint|ABD|scope|ViewSource|SwitchTo2D|gear6|A6W|AAR|tilt|LogScale|LinScale|ABP|detail|AAQ|meta|pageYOffset|||||pageXOffset|persistent|FFFFFF|strong|_height_|2000|legendmaximize||onmessage|minindex||WorksheetOptions|ExcelWorksheet|tspan|ExcelWorksheets|ExcelWorkbook|dominantBaseline||ABU|ACS|getxyinfo|prev|ABV|f90|About||Menu||fold|pagination|getimagedata|localhost|tbody|maxindex|A51|rLen|screen|AAT|zcgraph|csvParser|limit|FSZINDEX|fromAPI|sBId|rawsource|PATTERN_|backgroundImage|col|215|defaultsurl|getFullYear|contextMenu|FORM|support|A8O|mapItem|viewDataTable|size2|doubleclick|msg|AAV||vb_|A9D|SKIPCONTEXTMENU|alert|vmin|yourcomment||LITE|jsondata|checkbox||bbox|senddata||youremail|startangle|infoemail|A0D|source_hide|ASYNC|999999|A9G|A33|keyup||vmax|AAX|Parsed|Original|oval|ADA|comment|IGNORESUBUNIT|actions|INPUT|confirm|A3R|asc|AAM|A4S|downloadXLS|pos|clippath|calloutPosition|quadraticCurveTo|CHARTS|origin|lineCap|dataload|vPos|tile|downloadCSV|A63|endangle|iphone|ipad|msSaveBlob|SKIPPROGRESS|hPos|||blur|FASTWIDTH|900|SaveAsImageJPG|A69|createPattern|guide_mousemove|clipPath|A80|borderTop|coordsize||emailmandatory|gradientradial|coordorigin||AB8|globals|encoding|layers|imggen|themesloaded|ABJ|excel|PageScroll|3dtx|heatmap|userSpaceOnUse|pathname|Reload|createRadialGradient||createLinearGradient|_title|getPlacementInfo|ABC|anonymous|sigma|State|VML|6px|A97|A74|A6B|white|child|ownerNode|author|behavior|setupValueBoxWH|A7N|COPYDATA|RESIZESPEED|onunload|jumped|Scroll|scaletext|marker_text_|paintMarker|Table|||A4T|12px|A57|EF8535|A7R|A7Q|265E96|candlestick|A05F18|A14BC9|ABK||ACQ|ABW|A7P||A6C|addRule|D31E1E|A6F|A6E|29A2CC|2c4a59|LOGO_ABOUT||A7O|1AB6E3|A6D|Zoom|bXY||AD9|backEaseOut|fillAngle|Error|ABB|Bug|Send|bUrl|A9W|A9H|mozilla|elasticEaseOut|numeric|bounceEaseOut|strongEaseOut|Email|regularEaseOut|you|indicator|setModule|getModules|band|AD0|May|ABZ|Switch|backgroundcolor|Hide||Scale|Full|Screen|toStaticHTML|ACE|ACD|ACC|2654435769|linecolor|ABY|prop||SORTTOKENS||MSIE|compatMode|ShockwaveFlash|AA8|shockwave|adj|AA4|ABM|compat|6B7075|shortcut|ACU|26784e5|864e5|responseText|FF00FF|ABT|ABI|ACY|ACX|0123456789abcdef||mirrored|dateformat|1023|standard|ACK|ACJ|ACZ|_rgb2hex_|AD7|AD6|0x|316224e5|POST|plot2|sec|createElementNS|ADC|querySelectorAll|innerWidth|week|clientHeight|Opera|overlaps|getOptimalDateInterval|removeEventListener|||||childof||||||event|mon|6e4|trident||originalEventZC|ownerDocument|uniform|bKeep|paintTransformDate|stopPropagation|sortFaces|plot1||blank|LOOKUPCSSTRANSFORM|b6c8cf|365|||1089B3|detached|connected|SKIPOBJCOUNT|aaa|THEMES|||||||||||||||||||SPREADFACTOR||||||||||||A7W||||||969696|MAXPOOLSIZE|A98|96C245||Helvetica|Arial|MODULESDEP|MODULESDIR|ACL|xdiff|ACT|A79|A7A|plot0|A7C|paired|dyn|A8P|face|_rcolor_|facet|e6e6e6|f0f0f0|A8J|oP3|||||||||||||||||A8M|||||||||||||||||||oP2|oP1|A7B|ABO|f6f6f6||facets|skv|A8N|star|ranged|sizing|001|nodevalue|ZCVRangeGraph|Step|AAC|cluster|AAD|monotone||AAE|Item|A8G|A5T|A99|A9A|||||||||||||||||||||||||||||||||||||A9B|minValue|maxValue|minValue_||animate|A8F|removenode|330|A71|AAP|AAA|hint|QUOTEDVALUES|xb0|star5|quick|A8C|A8D|triangle|diamond|errors|delay|AAB|A9C|moz|||||||||||||||A96||||||||||||||||||||||A7M|A8B|addplot|nav||A5R|ACN|A73|A6A|A76|scalename|A72|scalevalue|A8R|A8Q|A9U|DELAYEDTRACKERS|A75|A8E|maxValue_|ZCVRangePlotSet|addnode|A9E|A7V|A7U|A7T|||||||||||||||||||A7S||||||||||||||||||A8L|setnodevalue|removeplot|A8K||A8I|A8H|AAU|A78|modifyplot|A77|A8A|effect|showtooltip|graphidx|AAS|A95|clicknode|bubblepie|gif|pop|AAG|hooks|shiftKey|A89|plot_click||||||||label_click|||||||||||||||||||||||||||||A7L|A9F|AAF|A4A||e0e0e0|a0a0a0|40E0D0|9c9c9c|qJhDZWB8OmFDaG8J|909090|222|spark|69c||vk3JIhGITEQsUCtkgtslo4K1wwMRxPoBbAIXJ|negative|graphs|Q8b3mQmpqvevD3VGFhuVV95PaXnbXTkr6h5M7j0mP3UDxMNo6g3TgCkSe5tiKb2QU3ttxD8PRRN7pFxkFxB|EE82EE|a6a6a6|acacac|xWR15D1fqTyEALRVtLBrU|ececec|dcdcdc|d6d6d6|||||||||||||||||||||hQWw6ePX6Nd||||||||||||||||WELTcgScyGV0BiDqCG6wCyBa0rRQdEZC7sxaxri1ckNggRYKcr6A|ZlVA4tExPxYQAQubERqJBDtSu6hfYb2k0isoX2ztWoke06s6woRayLWJCQ5kkhIyBKR7FQIRCQEIpJjCPFn|d0d0d0|c6c6c6||b0b0b0|c0c0c0|312F30|bcbcbc|VIOLET|b6b6b6|syv7|fcfcfc|57585B|808080|vstream|boxplot|hboxplot|FFFF00|vboxplot|DCDCDC|contentWindow|contentDocument||QQYK91VtUbjbmq8u4NNX2Q6zvNCuind1hPtMMot31k4MwB5iv0CylvaRXz6O3tO5VMGBLjozKUrDyVmw8szzFZwnEo5X1VA|hfloatbar||||||||||c5UOj7E1Ts8BhC5zljv||||||vfloatbar|||808285||||||||||HTML||||||||HEAD|floatbar|createEvent|ACB|||TouchEvent|8qbrzh3uZb2RgAeNY85a8dobWVLe40u8TgsEXDhEZJrHYnq46rTuS4XhK0nrW7uQmYw1lTTL5R4jFE|waterfall|5a5a5a|F7F8F8|AYKc4hVyx04biDWGx1aqwPX|ZoomIn||6C6D70|414141|execFn|125px|Yrbjmm0HqGPfwMbPPVOYIkPRA9yAZmYwG8Boi6gtnfJ1koXBeXhD1XGagDCN53vuoeksvabYi|ViewAll|population|vwaterfall|populationpyramid|small|222222|WHITE||||||ny5sogAHv4||||||hwaterfall||xhhvK|||||YELLOW||||||||||ZoomOut||C0C0C0||||||36393D|getDay|QWiu3TW1Sqk65M5ukh9vPzAUV|4B0082||LIME|00FF00|getMonth|getDate|MAGENTA|getMilliseconds|587|getSeconds|getMinutes|getHours|tooltipText|getUTCFullYear|getUTCMonth|getUTCDate|getUTCDay|299|_colorAlpha_|getUTCMilliseconds|A52A2A|FFD700|GOLD||||||||||||||||||||||||||||||||||GREEN|||008000|FUCHSIA|00FFFF|INDIGO||CYAN|BROWN|iVBORw0KGgoAAAANSUhEUgAAAJEAAAA1CAYAAABBVQnbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABu1JREFUeNrsXLFy4zYQBW9UR7wfSHh1iqMn6S3NxLXlLp3lL5D1ARlLkw|HideDataTable|wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw|R0lGODlhAQABAIAAAP|0000FF|DEBUG|BLUE|BLACK|zc_|MAROON|getUTCSeconds|TURQUOISE|444|vjr5wKFyz9|script|AGU|Low|High|Open|||||||||||||||||||||FFC0CB|||strict||||PURPLE|||||||||Module|7dLKj0u4UboHamBpK54HEm2lgisTwgbH78ucBtDG|800080|LnFKxSTOo9DkvU2rLvBFpH2hcKgFpCI9d2JELujMQNsd5CRFdVWKRU2G||RED|FF0000|SILVER|GRAY|0084AA|loaded|firstChild|getUTCMinutes|0x4000000000000|800000|getUTCHours|setTime|BBBBBB|gLMilDUMgAYigZUm7MzAliiDBxcPu2|XS3nq9ZiQkdaTF|NAVY|dataready|1099511627776|3iet|1073741824|1048576||toExponential||||||||||||||000080||||||ORANGE|||||||||||||||ext|FFA500|PINK|YqcJkkaSwzGoqS3sUE9Lyj3yhmS6Uki4yNN7PFftH||D66C1C|RW9rdQ3KGBUxLYmGuHKG4nWk8aleqiz6XSFA5N|a0kBGIVqW7w5p|9b5FpaWogBlGlnahdp7f|MaEpYHUNl1tWbF|DGfGvEVBorFq3Wnhtx6Yqy9VxUZqqe0tfBMPEIF3FD|mUs6KHNRO7LazssfcSfmU|wTEATmQruIHqrjYrMQX05bnZ7kWZUYd2Fikjw2p6RJOCmTFgUow|pagescroll|qVNQN7LC0R1f2qsTFecq|JoRMu03lkd|WBJjiPWRH11|Ap13G5Pl60VY2tP23ebFtYgiNlhaxARkSaLYL51a4ixsAdxXPjBJ7RsSalmz60Khpy7UVCuj9tWhHxUY41VVkEK0U92kvZ2oddI5kTsGqJTF2nsDOx0A9KlKEXhWeC4cDh5LqMtRpUVxDFLH4WRJ7pV8R2LUrPCjXUn00gXG0zZ|dM8LpS7Z4I7AprPgKguBYXu2aA2LX7m8GlM1Nbp8FbLCKMyvrDe1wnjDqwgnUruDIzESuKHqLfGHWFU7qfp2SW8w0FVssOiETQKUzH2IviWO5wqfAoJA1cjCgtAHUsfaRrLcZ0QvWmQ9U4cadgB7DRvHtyc40JGgf2PG63RS7HplhPTZ0mTpiag0dNCcPCf8YVrowDijfYCZgY1Tkjuv4VdyIvc0P7TSIJNBKIDTKNl0jjRZaxQGZGmH1bNk87wkD0iop8dj4zWuY5HnHNxg54wlS45LyQfnjCwD3BzTBCKjggaCGCnURE10kz4jLEhMHywHTcJ4OqbsLbefqsrc8SNFyxXqh6G5|ZXwTNiuycKjVg6UAnU1DK2x3Wc9SQUwZijotArVk4Kk4qU5mRF3NHLUJ5HzPoAy417o6|mDXZPwp3r|La0dM88io1YD|LpR|KogIo6YW9puMNDROzGSFyOjaAiWlkQaEOfPrb6aEMWqLiSKwqYrEI8ioMAdpTENupKklsc8frtf1C|iJamYE8hWNRD8|FHY4MQWwxllcdiZClai09I7uPapDMHQ1dwFx3FORIcy11FYlHWRWKol0Tiavz8A||||||||||||||||||||||||SAvgCcGK8xwwI50SqLlQK6OSmTLrrKU|||||||||||||eISInsEMhdnu61hMlkggN6|dqKYwJd|VkTCh|sFPIO77cUufurMOB4iEfoGsPNDGag0qacrn1t345||IBG7ZbjiyQo9iuVCa1v99GggSadJXi70rlyWQBc5wRfXX4xbsoje3ZGThb9LcDL8Sj2UF4xYKOxvCXXdPaalnYh0J2x5Cl4qgc|fs20zVRLOz3bUd0w03sL4IbTwd|BasicStructure|Mobile|coWIi|CSS1Compat|Mac|appVersion|QrFO8i||enabledPlugin|SwpRBHeB1YixfuVRG1TmnSxwWyN0IJS7c9S8PojwWgDREblQFpIiZPi|Powered|vml_flag1|feature|RaJXhS6LycpIqpft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vPugJaqoIWSfS|20p2HvtBeK16w||BlackBerry|PPC|52575C|P1EAsGUPZcSM03|b79007|cc3300|ef4810|a62b02|0392bb|Q9MX3bb2wCfKYByGWZhvt69T0pIeyF9|00b0e1|DownloadSVG|007fa3|DownloadPDF|Hhx|da9b04|89b92e|UmnVcu533TixhgnyNRM0dgQgplGsPAkzYXwPzOzZnC7X81FBps0ln7DE4j7FFz7lhGSYWZ0CxLkF6pdEiin27WykHHILXKaLTuPRmQGAoidX8LoScOsD145xJQUVRD|2UJYM4scG7|Gly8ldqZxWOBc41UBB9q8UPEmcr54GRIXwBXn|ZDnzAMIzyhNVVTYKAAorAHTVgHL5pHOS|||||||||||||||||||||||||||||||||||||gEVkGqUcFnmWmB876F18Vzb5KmaijbjDAAiZ8k|SaveAsImagePNG|a7da47|6a921f||20398B|f9c332|563d02|00AE4D|link|0D457D|HuIgKZX6X7wuUGhlOxoME4FvoO1RGZ88uT6XPKAOuCgxm0aK6|874600|8832B0|8txLDPrukmci|OFFSET|oRz1|638F12|BA0505|resources|EtDO54vP7th1HL0CpYAaiGnGtSDVnEBONJ4Xozi|84680a|xhtml|stylesheet|05a0cd|alt|||||||||||||||||||||||||||||00bbf1||||||||edf3f5|1540a0|4d62b1|0b32a0||6e4503|SaveAsImage|jxVuWAXwZANAz5HirKR|Windows|epSuudpRmrP2rclZFf1zG7cIMfzS6zh9SuAyLfJE|skip_segment_tracking|skip_context_menu|09A9DA|AGH|AGG|wWjRZKI7TbgLtHD|i5CcR1RvRAp3VpUL4qt9AJMyMDznvcPkoxEZZ5uZ5iw9AWPm41ihhTB1TWPJIvdeJP3KZbrBr9wVnn20IMTBrkDka|ontouchstart|iFDTf4|Mr3cMfUhWN83PYpfQ6W|Charts|00384A|AG3|decodeURIComponent|_inj_|ACO||||||||||||sessionStorage||||||||||||||||||||2F8JpusDi3zMEzINF9Q|||||iPhone|siKWwCkzRAy|iPad|Android||5005onWQnHXM18l0kq|hFUVqR7S1l8G8QQJznxCUvX|FB301E|C0usUJLOMetQOYTOFYVPe0KRHcl7nAGK98k8k0dUIKCXNemIq0SK1RF4LK8iEXIbCMzAUCi37flOJ8UUWGCoLNRctAQiBLrHioLkbvAIswP0CoHtcFcF0Sg6FEFgNIGAeSSg8RbWhZ5ctuW|9B26AF|E2D51A|E80C60|keyCode|mfBxXECbZeDYIpPe0riMsGKim8qBXMDEFy4hQv6tighD||AD1|00BAF2|Network|preservezoom|Since|Modified|aCdvBK|ZZAmsQUXYwbyUHTR67kghQvnYMIk4k3OwKQS|use_single_canvas|use_fast_markers|use_fast_mode|||||||||||||||||Edgdh2omT9RRXE1hZAfaQYvmbx||||||||||ACW||||||||||6D6E71|skip_interactivity|MbWyNGzvXcSgKYaAL21h6hpRb5JFSiEliszxIjHVE6l798cAShQAChBIt7N8klnbQ|skip_marker_tracking||16777215|1069501632|modulesready|star8|report|bug|star4|Cancel|star6|mandatory|address|star7|problem|your|reply|star3|star9|via|receive|rpoly3|rpoly4|||||||||||rpoly5|||||||||rpoly6||||||||||||||rpoly7|||want|Address|Comment|was||sent|rpoly8|trapezoid|getrender|beforedestroy|zcdestroy|hidemenu|showmenu|history_forward|history_back|fireEvent|formatNumber|formatDate|parallelogram|nThank|textbox|getObject|getPalette|plugin|ic_area|defineModule||initThemes|||||||||||||||||||getGraphInfo|||||||||||||||clearLayer|Apply|ic_bars|Capture|Graph||closemodal|Saturday|bite|Sep|droplet|Aug|tan|Jul|Jun|Apr|Mar|Feb|Friday|Nov|both|Thursday|Wednesday|Tuesday|Monday|Sunday|Sat|Fri|||||Wed|||||||||||||||||||||||||||||||Tue|Mon|Oct|flow||rpoly9|October|Report|rpoly|Message|gear3|gear4|gear5|Occured|Has|Exporting|December|November|September|Dec|August|gear7|July|June|April|March||||||||||||||||||||||||February||||gear8|||||gear9||||ellipse|January|disable|openmodal||Forward|shadowDistance|getseriesvalues|lineStyle|appendseriesdata|lineSegmentSize|lineGapSize|getseriesdata|node_remove|borderAlpha|shadowAngle|node_add|shadowAlpha|fillOffsetY|shadowColor|removescalevalue|addscalevalue|setscalevalues|node_set|plot_modify|plot_remove|||||||||||||||||||||||||||||||||||||shadowBlur|plot_add|addgraph|setcharttype||appendseriesvalues||fillOffsetX|scalenumvalue|legend_show|getplotvalues|getnodevalue|getnodelength|getscales|getplotlength|getgraphlength|borderRadius|getoriginaljson|toggledimension||legendscroll|legend_maximize|fillType|legend_hide|getData|legend_minimize||||||||||||||||||||togglelegend||||||||ignoreduplicates|setData|gradientColors|gradientStops||backgroundRepeat|backgroundFit|backgroundScale|ADG|lineJoin|mapdata|getcharttype|clearscroll|offsetR|lonlat2xy|unbinddocument|setpage|getpage|set3dview|get3dview|getversion|showversion|toggleplot|getscaleinfo|togglebugreport|togglesource|showplot|plotshow|showhoverstate|unlocktooltip|composite|locktooltip|hidetooltip|hideplot|plothide|getbubblesize|pieSlice|bezierCurveTo|miterlimit|scalepos|scaleidx|linecap|linejoin|onviewport|stackType|maxIndex_|minIndex_|maxIndex|VMLv|minIndex|endcap|datetime|joinstyle|refAngle|logBase|offsetEnd|ADB|objectId|offsetStart|pieAngleStart|pieAngleEnd|stepSize||step_|Sun||getImageData||originalEvent|45705983|643717713|165796510|1236535329|1502002290|40341101|1804603682|1990404162|42063|1958414417|1770035416|1473231341|701558691|1200080426|176418897|1044525330|606105819|389564586|680876936|271733878|ADI|1732584194|AD3|nStrlng4Cu|373897302|38016083|271733879|35309556|textpath|svg0|writing|358537222|681279174|1094730640|155497632|1272893353|1530992060|innerText|1839030562|660478335|2022574463|378558|1926607734|1735328473|51403784|1444681467|1163531501|187363961|1019803690|568446438|405537848|tOmLlc9nc9|1732584193|textpathok||compatible||EJLl0khmPDSKBJa8fkP70KLNtrxt5pE2yjx|IvQ40ajd|||||03rqqtR|Content|With|Requested|XMLHTTP|Microsoft|cancelBubble|returnValue|_list_|hpxK6BeHRUtuasojuRTPFQYdzNGN57nxLviTf1hV4lwaFjtbv|detachEvent|MAP|parentWindow|offsetLeft|offsetTop|pixelLeft|filters|innerHeight|STRONG|unicodeBidi|polygon|tA1g0W0k7AKV1g1ouow1nG|7PVG0KjUnLRqnRSPOeqf6gu|AB0|55296|240|2097151|224|192|2047|65536|57343|56320|HOSTNAME|56319|hostname|AGJ|Q5G8dRWLio|Core|zflags|fhx|XKoJJLnmLPUYiWUuQKAOGnuAIWrSN_ZIj_LYvS|jRkihLOSfysvRQTBtQOUUO|SdgZUHWKDVQ|xST_SWRLyFKogwOclSB|jsNorthNine|urlencoded|AppIdentity|09Vczmfsf|722521979|76029189|Exit|outset||namespaces|13px|30px|||borderRadiusTopLeft|inline|3px|spacing|letter|27px|borderRadiusTopRight|20px|cssText|borderRadiusBottomRight|borderRadiusBottomLeft|60px|calloutHook|calloutWidth|80px|calloutHeight|003C4F|pixmap|khtml|calloutOffset|createStyleSheet|our|calloutExtension|XLS|putImageData|Log|Linear|Source|All|Out|patternUnits|objectBoundingBox|Export|radialGradient|linearGradient|gradientUnits|bgcolor|SVG|PDF|viewBox|use|JPG|PNG|Chart|Disable|Enable|control|csvdata|container|insertRule|fillcolor|vml0|718787259|1120210379|u2014|145523070||0html|1309151649|1560198380|30611744|1873313359||canvas0|2054922799|ADD|1051523|1894986606|1700485571|57434055|1416354905|1126891415|198630844|995338651|530742520|421815835|640364487|343485551|lock|rectShortcut|render_flash|scrollHeight|docked|ACR|IMG|panning|ACV|ADF|AD2|ADE|setLabel|setlabel|userdef|wrap|Ext|Grande|Unicode|640|480|9998|bolder|700|800|plugins|clipart|dimension|LICENSEKEY|Progression|pper|pmi|pxi|pmv|pxv|psum|softclear|legendmarker|plotinfo|legenditem|legendfooter|legendheader|drag|draggable|045|wheelDelta|kvts|animation_step|08|ACP|632448e6|markers|blended|refy|refx|master|ADJ|base|nodeinfo|used|view|snap|31556926e3|share|2629743e3|stage|2825|7475|zoomToV|stepsize|EXPAND_RIGHT|EXPAND_HORIZONTAL|facet99|SLIDE_LEFT|SLIDE_RIGHT|SLIDE_TOP|SLIDE_BOTTOM|EXPAND_BOTTOM|viewport|UNFOLD_HORIZONTAL|UNFOLD_VERTICAL|EXPAND|GROW|FLY_IN|UNFOLD|EXPAND_LEFT|EXPAND_TOP|9375|ELASTIC_EASE_OUT|625|984375|SLOW|4e3|FAST|LINEAR|BACK_EASE_OUT|BOUNCE_EASE_OUT|EXPAND_VERTICAL|STRONG_EASE_OUT|REGULAR_EASE_OUT|NO_SEQUENCE|BY_PLOT|BY_NODE|BY_PLOT_AND_NODE|FADE_IN|csize|widths|HideGuide|lbl_|cols||rows|getselection|setselection|scale_|shp_|3dshape|objectsready|legend_|_click|gcomplete|gload|imges|objectsinit|Metric|clearselection|feed_start|LINK|shape_|setobjectsmode|getobjectsbyclass|repaintobjects|feed_clear|updateobject|feed_step|4096|label_|feed_stop|sm_|si_title|si_|clearfeed|getinterval|setinterval|feed_interval_modify|366|gparse|desc|histogram|MIN_VALUE|plot_|pair|guideh|guidev|ff9900|dimensions|sequence|18e5|RefNode|12e5|6e5|3e4|scaling|2e4|attributes|extra|crosshairy|always|crosshairx||noData|hmixed3d|ACM|scrolly|scrollx|AC8|ACA|selections|keyval|separate|setguide|resetguide|359|density|clustered|animation_start|pavg|settweenmode|forEach|ProgId|CancelRequestAnimationFrame|content|Excel|Sheet|Category|CancelAnimationFrame|cancelAnimationFrame|cancelAnimFrame|RequestAnimationFrame|requestAnimationFrame|webkitURL|https|blob|x3e|FileReader|result|CDATA|readAsDataURL|exportimage|saveasimage|dataToCSV|vnd|downloadRAW|animation_end|400px|nextSibling|RECT|Calibri|DisplayGridlines|barWidth|2009|ShowGuide|ExitFullScreen|GoBack|GoForward|brightness||whisker|ohlc|edge|calloutType|1500|about_show|320|Built|Build|gte|about_hide|section|Section|Others|others|menu_item_click|postzoom|getzoom|zoomtovalues|enctype|multipart|REC|html40|x3c|source_show|endif|ADH|RENDER|scaleval|PARSED|nORIGINAL|IMAGE|COMMENT|EMAIL|HEIGHT|sticky|RESOLUTION|510|END|submitreportH5|php|modifier|bDead|getZCPoint3D|hover_image|node_|graphindex|WIDTH|210|535'.split('|'),0,{}));} let ZC$1 = window.ZC; var EVENT_NAMES = ['animation_end', 'animation_start', 'animation_step', 'modify', 'node_add', 'node_remove', 'plot_add', 'plot_modify', 'plot_remove', 'reload', 'setdata', 'data_export', 'image_save', 'print', 'feed_clear', 'feed_interval_modify', 'feed_start', 'feed_stop', 'beforedestroy', 'click', 'complete', 'dataparse', 'dataready', 'destroy', 'guide_mousemove', 'load', 'menu_item_click', 'resize', 'Graph Events', 'gcomplete', 'gload', 'History Events', 'history_back', 'history_forward', 'Interactive Events', 'node_deselect', 'node_select', 'plot_deselect', 'plot_select', 'legend_item_click', 'legend_marker_click', 'node_click', 'node_doubleclick', 'node_mouseout', 'node_mouseover', 'node_set', 'label_click', 'label_mousedown', 'label_mouseout', 'label_mouseover', 'label_mouseup', 'legend_marker_click', 'shape_click', 'shape_mousedown', 'shape_mouseout', 'shape_mouseover', 'shape_mouseup', 'plot_add', 'plot_click', 'plot_doubleclick', 'plot_modify', 'plot_mouseout', 'plot_mouseover', 'plot_remove', 'about_hide', 'about_show', 'bugreport_hide', 'bugreport_show', 'dimension_change', 'legend_hide', 'legend_maximize', 'legend_minimize', 'legend_show', 'lens_hide', 'lens_show', 'plot_hide', 'plot_show', 'source_hide', 'source_show']; var METHOD_NAMES = ["addplot", "appendseriesdata", "appendseriesvalues", "getseriesdata", "getseriesvalues", "modifyplot", "removenode", "removeplot", "set3dview", "setnodevalue", "setseriesdata", "setseriesvalues", "downloadCSV", "downloadXLS", "downloadRAW", "exportdata", "getimagedata", "print", "saveasimage", "exportimage", "addmenuitem", "addscalevalue", "destroy", "load", "modify", "reload", "removescalevalue", "resize", "setdata", "setguide", "update", "clearfeed", "getinterval", "setinterval", "startfeed", "stopfeed", "getcharttype", "getdata", "getgraphlength", "getnodelength", "getnodevalue", "getobjectinfo", "getplotlength", "getplotvalues", "getrender", "getrules", "getscales", "getversion", "getxyinfo", "get3dview", "goback", "goforward", "addnote", "removenote", "updatenote", "addobject", "removeobject", "repaintobjects", "updateobject", "addrule", "removerule", "updaterule", "Selection", "clearselection", "deselect", "getselection", "select", "setselection", "clicknode", "closemodal", "disable", "enable", "exitfullscreen", "fullscreen", "hideguide", "hidemenu", "hideplot/plothide", "legendmaximize", "legendminimize", "openmodal", "showhoverstate", "showguide", "showmenu", "showplot/plotshow", "toggleabout", "togglebugreport", "toggledimension", "togglelegend", "togglesource", "toggleplot", "hidetooltip", "locktooltip", "showtooltip", "unlocktooltip", "viewall", "zoomin", "zoomout", "zoomto", "zoomtovalues"]; var DEFAULT_WIDTH = '100%'; var DEFAULT_HEIGHT = 480; var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; var createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }; var possibleConstructorReturn = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }; // One time setup globally to handle all zingchart-vue objects in the app space. if (!window.ZCReact) { window.ZCReact = { instances: {}, count: 0 }; } var ZingChart = function (_Component) { inherits(ZingChart, _Component); function ZingChart(props) { classCallCheck(this, ZingChart); var _this = possibleConstructorReturn(this, (ZingChart.__proto__ || Object.getPrototypeOf(ZingChart)).call(this, props)); _this.id = _this.props.id || 'zingchart-react-' + window.ZCReact.count++; // Bind all methods available to zingchart to be accessed via Refs. METHOD_NAMES.forEach(function (name) { _this[name] = function (args) { return window.zingchart.exec(_this.id, name, args); }; }); _this.state = { style: { height: _this.props.height || DEFAULT_HEIGHT, width: _this.props.width || DEFAULT_WIDTH } }; return _this; } createClass(ZingChart, [{ key: 'render', value: function render() { return React.createElement('div', { id: this.id, style: this.state.style }); } }, { key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; // Bind all events registered. Object.keys(this.props).forEach(function (eventName) { if (EVENT_NAMES.includes(eventName)) { // Filter through the provided events list, then register it to zingchart. window.zingchart.bind(_this2.id, eventName, function (result) { _this2.props[eventName](result); }); } }); this.renderChart(); } // Used to check the values being passed in to avoid unnecessary changes. }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps) { // Data change if (JSON.stringify(nextProps.data) !== JSON.stringify(this.props.data)) { zingchart.exec(this.id, 'setdata', { data: nextProps.data }); // Series change } else if (JSON.stringify(nextProps.series) !== JSON.stringify(this.props.series)) { zingchart.exec(this.id, 'setseriesdata', { graphid: 0, plotindex: 0, data: nextProps.series }); // Resize } else if (nextProps.width !== this.props.width || nextProps.height !== this.props.height) { this.setState({ style: { width: nextProps.width || DEFAULT_WIDTH, height: nextProps.height || DEFAULT_HEIGHT } }); zingchart.exec(this.id, 'resize', { width: nextProps.width || DEFAULT_WIDTH, height: nextProps.height || DEFAULT_HEIGHT }); } // React should never re-render since ZingChart controls this component. return false; } }, { key: 'renderChart', value: function renderChart() { var renderObject = { id: this.id, width: this.props.width || DEFAULT_WIDTH, height: this.props.height || DEFAULT_HEIGHT, data: this.props.data }; if (this.props.series) { renderObject.data.series = this.props.series; } if (this.props.theme) { renderObject.defaults = this.props.theme; } zingchart.render(renderObject); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { zingchart.exec(this.id, 'destroy'); } }]); return ZingChart; }(Component); export default ZingChart; //# sourceMappingURL=index.es.js.map
ajax/libs/material-ui/4.9.2/esm/test-utils/testRef.js
cdnjs/cdnjs
import React from 'react'; import { assert } from 'chai'; function assertDOMNode(node) { // duck typing a DOM node assert.ok(node.nodeName); } /** * Utility method to make assertions about the ref on an element * @param {React.ReactElement} element - The element should have a component wrapped * in withStyles as the root * @param {function} mount - Should be returnvalue of createMount * @param {function} onRef - Callback, first arg is the ref. * Assert that the ref is a DOM node by default */ export default function testRef(element, mount) { var onRef = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : assertDOMNode; var ref = React.createRef(); var wrapper = mount(React.createElement(React.Fragment, null, React.cloneElement(element, { ref: ref }))); onRef(ref.current, wrapper); }
ajax/libs/material-ui/4.9.4/es/DialogActions/DialogActions.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; export const styles = { /* Styles applied to the root element. */ root: { display: 'flex', alignItems: 'center', padding: 8, justifyContent: 'flex-end', flex: '0 0 auto' }, /* Styles applied to the root element if `disableSpacing={false}`. */ spacing: { '& > :not(:first-child)': { marginLeft: 8 } } }; const DialogActions = React.forwardRef(function DialogActions(props, ref) { const { disableSpacing = false, classes, className } = props, other = _objectWithoutPropertiesLoose(props, ["disableSpacing", "classes", "className"]); return React.createElement("div", _extends({ className: clsx(classes.root, className, !disableSpacing && classes.spacing), ref: ref }, other)); }); process.env.NODE_ENV !== "production" ? DialogActions.propTypes = { /** * The content of the component. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * If `true`, the actions do not have additional margin. */ disableSpacing: PropTypes.bool } : void 0; export default withStyles(styles, { name: 'MuiDialogActions' })(DialogActions);
ajax/libs/material-ui/4.9.3/esm/StepConnector/StepConnector.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; export var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: { flex: '1 1 auto' }, /* Styles applied to the root element if `orientation="horizontal"`. */ horizontal: {}, /* Styles applied to the root element if `orientation="vertical"`. */ vertical: { marginLeft: 12, // half icon padding: '0 0 8px' }, /* Styles applied to the root element if `alternativeLabel={true}`. */ alternativeLabel: { position: 'absolute', top: 8 + 4, left: 'calc(-50% + 20px)', right: 'calc(50% + 20px)' }, /* Pseudo-class applied to the root element if `active={true}`. */ active: {}, /* Pseudo-class applied to the root element if `completed={true}`. */ completed: {}, /* Pseudo-class applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the line element. */ line: { display: 'block', borderColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600] }, /* Styles applied to the root element if `orientation="horizontal"`. */ lineHorizontal: { borderTopStyle: 'solid', borderTopWidth: 1 }, /* Styles applied to the root element if `orientation="vertical"`. */ lineVertical: { borderLeftStyle: 'solid', borderLeftWidth: 1, minHeight: 24 } }; }; var StepConnector = React.forwardRef(function StepConnector(props, ref) { var active = props.active, _props$alternativeLab = props.alternativeLabel, alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab, classes = props.classes, className = props.className, completed = props.completed, disabled = props.disabled, index = props.index, _props$orientation = props.orientation, orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation, other = _objectWithoutProperties(props, ["active", "alternativeLabel", "classes", "className", "completed", "disabled", "index", "orientation"]); return React.createElement("div", _extends({ className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, active && classes.active, completed && classes.completed, disabled && classes.disabled), ref: ref }, other), React.createElement("span", { className: clsx(classes.line, orientation === 'vertical' ? classes.lineVertical : classes.lineHorizontal) })); }); process.env.NODE_ENV !== "production" ? StepConnector.propTypes = { /** * @ignore */ active: PropTypes.bool, /** * @ignore * Set internally by Step when it's supplied with the alternativeLabel property. */ alternativeLabel: PropTypes.bool, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * @ignore */ completed: PropTypes.bool, /** * @ignore */ disabled: PropTypes.bool, /** * @ignore */ index: PropTypes.number, /** * @ignore */ orientation: PropTypes.oneOf(['horizontal', 'vertical']) } : void 0; export default withStyles(styles, { name: 'MuiStepConnector' })(StepConnector);
ajax/libs/react-native-web/0.0.0-10de98778/exports/RefreshControl/index.js
cdnjs/cdnjs
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import View from '../View'; import React from 'react'; function RefreshControl(props) { var colors = props.colors, enabled = props.enabled, onRefresh = props.onRefresh, progressBackgroundColor = props.progressBackgroundColor, progressViewOffset = props.progressViewOffset, refreshing = props.refreshing, size = props.size, tintColor = props.tintColor, title = props.title, titleColor = props.titleColor, rest = _objectWithoutPropertiesLoose(props, ["colors", "enabled", "onRefresh", "progressBackgroundColor", "progressViewOffset", "refreshing", "size", "tintColor", "title", "titleColor"]); return React.createElement(View, rest); } export default RefreshControl;
ajax/libs/primereact/7.2.0/organizationchart/organizationchart.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { classNames } from 'primereact/utils'; function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var OrganizationChartNode = /*#__PURE__*/function (_Component) { _inherits(OrganizationChartNode, _Component); var _super = _createSuper(OrganizationChartNode); function OrganizationChartNode(props) { var _this; _classCallCheck(this, OrganizationChartNode); _this = _super.call(this, props); _this.node = _this.props.node; _this.state = { expanded: _this.node.expanded }; return _this; } _createClass(OrganizationChartNode, [{ key: "getLeaf", value: function getLeaf() { return this.node.leaf === false ? false : !(this.node.children && this.node.children.length); } }, { key: "getColspan", value: function getColspan() { return this.node.children && this.node.children.length ? this.node.children.length * 2 : null; } }, { key: "onNodeClick", value: function onNodeClick(event, node) { this.props.onNodeClick(event, node); } }, { key: "toggleNode", value: function toggleNode(event, node) { this.setState(function (prevState) { return { expanded: !prevState.expanded }; }); event.preventDefault(); } }, { key: "isSelected", value: function isSelected() { return this.props.isSelected(this.node); } }, { key: "render", value: function render() { var _this2 = this; this.node = this.props.node; var colspan = this.getColspan(); var nodeClassName = classNames('p-organizationchart-node-content', this.node.className, { 'p-organizationchart-selectable-node': this.props.selectionMode && this.node.selectable !== false, 'p-highlight': this.isSelected() }), nodeLabel = this.props.nodeTemplate && this.props.nodeTemplate(this.node) ? /*#__PURE__*/React.createElement("div", null, this.props.nodeTemplate(this.node)) : /*#__PURE__*/React.createElement("div", null, this.node.label), toggleIcon = classNames('p-node-toggler-icon', { 'pi pi-chevron-down': this.state.expanded, 'pi pi-chevron-up': !this.state.expanded }), nodeContent = /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", { colSpan: colspan }, /*#__PURE__*/React.createElement("div", { className: nodeClassName, onClick: function onClick(e) { return _this2.onNodeClick(e, _this2.node); } }, nodeLabel, /* eslint-disable */ !this.getLeaf() && /*#__PURE__*/React.createElement("a", { href: "#", className: "p-node-toggler", onClick: function onClick(e) { return _this2.toggleNode(e, _this2.node); } }, /*#__PURE__*/React.createElement("i", { className: toggleIcon })) /* eslint-enable */ ))); var _visibility = !this.getLeaf() && this.state.expanded ? 'inherit' : 'hidden', linesDown = /*#__PURE__*/React.createElement("tr", { style: { visibility: _visibility }, className: "p-organizationchart-lines" }, /*#__PURE__*/React.createElement("td", { colSpan: colspan }, /*#__PURE__*/React.createElement("div", { className: "p-organizationchart-line-down" }))), nodeChildLength = this.node.children && this.node.children.length, linesMiddle = /*#__PURE__*/React.createElement("tr", { style: { visibility: _visibility }, className: "p-organizationchart-lines" }, this.node.children && this.node.children.length === 1 && /*#__PURE__*/React.createElement("td", { colSpan: this.getColspan() }, /*#__PURE__*/React.createElement("div", { className: "p-organizationchart-line-down" })), this.node.children && this.node.children.length > 1 && this.node.children.map(function (item, index) { var leftClass = classNames('p-organizationchart-line-left', { 'p-organizationchart-line-top': index !== 0 }), rightClass = classNames('p-organizationchart-line-right', { 'p-organizationchart-line-top': index !== nodeChildLength - 1 }); return [/*#__PURE__*/React.createElement("td", { key: index + '_lineleft', className: leftClass }, "\xA0"), /*#__PURE__*/React.createElement("td", { key: index + '_lineright', className: rightClass }, "\xA0")]; })), childNodes = /*#__PURE__*/React.createElement("tr", { style: { visibility: _visibility }, className: "p-organizationchart-nodes" }, this.node.children && this.node.children.map(function (child, index) { return /*#__PURE__*/React.createElement("td", { key: index, colSpan: "2" }, /*#__PURE__*/React.createElement(OrganizationChartNode, { node: child, nodeTemplate: _this2.props.nodeTemplate, selectionMode: _this2.props.selectionMode, onNodeClick: _this2.props.onNodeClick, isSelected: _this2.props.isSelected })); })); return /*#__PURE__*/React.createElement("table", { className: "p-organizationchart-table" }, /*#__PURE__*/React.createElement("tbody", null, nodeContent, linesDown, linesMiddle, childNodes)); } }]); return OrganizationChartNode; }(Component); _defineProperty(OrganizationChartNode, "defaultProps", { node: null, nodeTemplate: null, root: false, first: false, last: false, selectionMode: null, onNodeClick: null, isSelected: null }); var OrganizationChart = /*#__PURE__*/function (_Component2) { _inherits(OrganizationChart, _Component2); var _super2 = _createSuper(OrganizationChart); function OrganizationChart(props) { var _this3; _classCallCheck(this, OrganizationChart); _this3 = _super2.call(this, props); _this3.root = _this3.props.value && _this3.props.value.length ? _this3.props.value[0] : null; _this3.onNodeClick = _this3.onNodeClick.bind(_assertThisInitialized(_this3)); _this3.isSelected = _this3.isSelected.bind(_assertThisInitialized(_this3)); return _this3; } _createClass(OrganizationChart, [{ key: "onNodeClick", value: function onNodeClick(event, node) { if (this.props.selectionMode) { var eventTarget = event.target; if (eventTarget.className && (eventTarget.className.indexOf('p-node-toggler') !== -1 || eventTarget.className.indexOf('p-node-toggler-icon') !== -1)) { return; } if (node.selectable === false) { return; } var index = this.findIndexInSelection(node); var selected = index >= 0; var selection; if (this.props.selectionMode === 'single') { if (selected) { selection = null; if (this.props.onNodeUnselect) { this.props.onNodeUnselect({ originalEvent: event, node: node }); } } else { selection = node; if (this.props.onNodeSelect) { this.props.onNodeSelect({ originalEvent: event, node: node }); } } } else if (this.props.selectionMode === 'multiple') { if (selected) { selection = this.props.selection.filter(function (val, i) { return i !== index; }); if (this.props.onNodeUnselect) { this.props.onNodeUnselect({ originalEvent: event, node: node }); } } else { selection = [].concat(_toConsumableArray(this.props.selection || []), [node]); if (this.props.onNodeSelect) { this.props.onNodeSelect({ originalEvent: event, node: node }); } } } if (this.props.onSelectionChange) { this.props.onSelectionChange({ originalEvent: event, data: selection }); } } } }, { key: "findIndexInSelection", value: function findIndexInSelection(node) { var index = -1; if (this.props.selectionMode && this.props.selection) { if (this.props.selectionMode === 'single') { index = this.props.selection === node ? 0 : -1; } else if (this.props.selectionMode === 'multiple') { for (var i = 0; i < this.props.selection.length; i++) { if (this.props.selection[i] === node) { index = i; break; } } } } return index; } }, { key: "isSelected", value: function isSelected(node) { return this.findIndexInSelection(node) !== -1; } }, { key: "render", value: function render() { this.root = this.props.value && this.props.value.length ? this.props.value[0] : null; var className = classNames('p-organizationchart p-component', this.props.className); return /*#__PURE__*/React.createElement("div", { id: this.props.id, style: this.props.style, className: className }, /*#__PURE__*/React.createElement(OrganizationChartNode, { node: this.root, nodeTemplate: this.props.nodeTemplate, selectionMode: this.props.selectionMode, onNodeClick: this.onNodeClick, isSelected: this.isSelected })); } }]); return OrganizationChart; }(Component); _defineProperty(OrganizationChart, "defaultProps", { id: null, value: null, style: null, className: null, selectionMode: null, selection: null, nodeTemplate: null, onSelectionChange: null, onNodeSelect: null, onNodeUnselect: null }); export { OrganizationChart, OrganizationChartNode };
ajax/libs/react-native-web/0.14.4/modules/UnimplementedView/index.js
cdnjs/cdnjs
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import View from '../../exports/View'; import React from 'react'; /** * Common implementation for a simple stubbed view. */ var UnimplementedView = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(UnimplementedView, _React$Component); function UnimplementedView() { return _React$Component.apply(this, arguments) || this; } var _proto = UnimplementedView.prototype; _proto.setNativeProps = function setNativeProps() {// Do nothing. }; _proto.render = function render() { return React.createElement(View, { style: [unimplementedViewStyles, this.props.style] }, this.props.children); }; return UnimplementedView; }(React.Component); var unimplementedViewStyles = process.env.NODE_ENV !== 'production' ? { alignSelf: 'flex-start', borderColor: 'red', borderWidth: 1 } : {}; export default UnimplementedView;
ajax/libs/primereact/6.5.0-rc.2/ripple/ripple.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { DomHandler } from 'primereact/utils'; import PrimeReact from 'primereact/api'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Ripple = /*#__PURE__*/function (_Component) { _inherits(Ripple, _Component); var _super = _createSuper(Ripple); function Ripple(props) { var _this; _classCallCheck(this, Ripple); _this = _super.call(this, props); _this.onMouseDown = _this.onMouseDown.bind(_assertThisInitialized(_this)); return _this; } _createClass(Ripple, [{ key: "getTarget", value: function getTarget() { return this.ink && this.ink.parentElement; } }, { key: "bindEvents", value: function bindEvents() { if (this.target) { this.target.addEventListener('mousedown', this.onMouseDown); } } }, { key: "unbindEvents", value: function unbindEvents() { if (this.target) { this.target.removeEventListener('mousedown', this.onMouseDown); } } }, { key: "onMouseDown", value: function onMouseDown(event) { if (!this.ink || getComputedStyle(this.ink, null).display === 'none') { return; } DomHandler.removeClass(this.ink, 'p-ink-active'); if (!DomHandler.getHeight(this.ink) && !DomHandler.getWidth(this.ink)) { var d = Math.max(DomHandler.getOuterWidth(this.target), DomHandler.getOuterHeight(this.target)); this.ink.style.height = d + 'px'; this.ink.style.width = d + 'px'; } var offset = DomHandler.getOffset(this.target); var x = event.pageX - offset.left + document.body.scrollTop - DomHandler.getWidth(this.ink) / 2; var y = event.pageY - offset.top + document.body.scrollLeft - DomHandler.getHeight(this.ink) / 2; this.ink.style.top = y + 'px'; this.ink.style.left = x + 'px'; DomHandler.addClass(this.ink, 'p-ink-active'); } }, { key: "onAnimationEnd", value: function onAnimationEnd(event) { DomHandler.removeClass(event.currentTarget, 'p-ink-active'); } }, { key: "componentDidMount", value: function componentDidMount() { if (this.ink) { this.target = this.getTarget(); this.bindEvents(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate() { if (this.ink && !this.target) { this.target = this.getTarget(); this.bindEvents(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.ink) { this.target = null; this.unbindEvents(); } } }, { key: "render", value: function render() { var _this2 = this; return PrimeReact.ripple && /*#__PURE__*/React.createElement("span", { ref: function ref(el) { return _this2.ink = el; }, className: "p-ink", onAnimationEnd: this.onAnimationEnd }); } }]); return Ripple; }(Component); export { Ripple };
ajax/libs/material-ui/4.9.4/esm/ClickAwayListener/ClickAwayListener.js
cdnjs/cdnjs
import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import ownerDocument from '../utils/ownerDocument'; import useForkRef from '../utils/useForkRef'; import setRef from '../utils/setRef'; import useEventCallback from '../utils/useEventCallback'; import { elementAcceptingRef, exactProp } from '@material-ui/utils'; function mapEventPropToEvent(eventProp) { return eventProp.substring(2).toLowerCase(); } /** * Listen for click events that occur somewhere in the document, outside of the element itself. * For instance, if you need to hide a menu when people click anywhere else on your page. */ var ClickAwayListener = React.forwardRef(function ClickAwayListener(props, ref) { var children = props.children, _props$mouseEvent = props.mouseEvent, mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent, _props$touchEvent = props.touchEvent, touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent, onClickAway = props.onClickAway; var movedRef = React.useRef(false); var nodeRef = React.useRef(null); var mountedRef = React.useRef(false); React.useEffect(function () { mountedRef.current = true; return function () { mountedRef.current = false; }; }, []); var handleNodeRef = useForkRef(nodeRef, ref); // can be removed once we drop support for non ref forwarding class components var handleOwnRef = React.useCallback(function (instance) { // #StrictMode ready setRef(handleNodeRef, ReactDOM.findDOMNode(instance)); }, [handleNodeRef]); var handleRef = useForkRef(children.ref, handleOwnRef); var handleClickAway = useEventCallback(function (event) { // The handler doesn't take event.defaultPrevented into account: // // event.preventDefault() is meant to stop default behaviours like // clicking a checkbox to check it, hitting a button to submit a form, // and hitting left arrow to move the cursor in a text input etc. // Only special HTML elements have these default behaviors. // IE 11 support, which trigger the handleClickAway even after the unbind if (!mountedRef.current) { return; } // Do not act if user performed touchmove if (movedRef.current) { movedRef.current = false; return; } // The child might render null. if (!nodeRef.current) { return; } // Multi window support var doc = ownerDocument(nodeRef.current); if (doc.documentElement && doc.documentElement.contains(event.target) && !nodeRef.current.contains(event.target)) { onClickAway(event); } }); var handleTouchMove = React.useCallback(function () { movedRef.current = true; }, []); React.useEffect(function () { if (touchEvent !== false) { var mappedTouchEvent = mapEventPropToEvent(touchEvent); var doc = ownerDocument(nodeRef.current); doc.addEventListener(mappedTouchEvent, handleClickAway); doc.addEventListener('touchmove', handleTouchMove); return function () { doc.removeEventListener(mappedTouchEvent, handleClickAway); doc.removeEventListener('touchmove', handleTouchMove); }; } return undefined; }, [handleClickAway, handleTouchMove, touchEvent]); React.useEffect(function () { if (mouseEvent !== false) { var mappedMouseEvent = mapEventPropToEvent(mouseEvent); var doc = ownerDocument(nodeRef.current); doc.addEventListener(mappedMouseEvent, handleClickAway); return function () { doc.removeEventListener(mappedMouseEvent, handleClickAway); }; } return undefined; }, [handleClickAway, mouseEvent]); return React.createElement(React.Fragment, null, React.cloneElement(children, { ref: handleRef })); }); process.env.NODE_ENV !== "production" ? ClickAwayListener.propTypes = { /** * The wrapped element. */ children: elementAcceptingRef.isRequired, /** * The mouse event to listen to. You can disable the listener by providing `false`. */ mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', false]), /** * Callback fired when a "click away" event is detected. */ onClickAway: PropTypes.func.isRequired, /** * The touch event to listen to. You can disable the listener by providing `false`. */ touchEvent: PropTypes.oneOf(['onTouchStart', 'onTouchEnd', false]) } : void 0; if (process.env.NODE_ENV !== 'production') { // eslint-disable-next-line ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes); } export default ClickAwayListener;
ajax/libs/primereact/6.6.0-rc.1/selectbutton/selectbutton.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { classNames, Ripple, ObjectUtils, tip } from 'primereact/core'; function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$1(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread(); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var SelectButtonItem = /*#__PURE__*/function (_Component) { _inherits(SelectButtonItem, _Component); var _super = _createSuper$1(SelectButtonItem); function SelectButtonItem(props) { var _this; _classCallCheck(this, SelectButtonItem); _this = _super.call(this, props); _this.state = { focused: false }; _this.onClick = _this.onClick.bind(_assertThisInitialized(_this)); _this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this)); _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this)); _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this)); return _this; } _createClass(SelectButtonItem, [{ key: "onClick", value: function onClick(event) { if (this.props.onClick) { this.props.onClick({ originalEvent: event, option: this.props.option }); } } }, { key: "onFocus", value: function onFocus() { this.setState({ focused: true }); } }, { key: "onBlur", value: function onBlur() { this.setState({ focused: false }); } }, { key: "onKeyDown", value: function onKeyDown(event) { var keyCode = event.which; if (keyCode === 32 || keyCode === 13) { //space and enter this.onClick(event); event.preventDefault(); } } }, { key: "renderContent", value: function renderContent() { if (this.props.template) { return this.props.template(this.props.option); } else { return /*#__PURE__*/React.createElement("span", { className: "p-button-label p-c" }, this.props.label); } } }, { key: "render", value: function render() { var className = classNames('p-button p-component', { 'p-highlight': this.props.selected, 'p-disabled': this.props.disabled, 'p-focus': this.state.focused }, this.props.className); var content = this.renderContent(); return /*#__PURE__*/React.createElement("div", { className: className, role: "button", "aria-label": this.props.label, "aria-pressed": this.props.selected, "aria-labelledby": this.props.ariaLabelledBy, onClick: this.onClick, onKeyDown: this.onKeyDown, tabIndex: this.props.tabIndex, onFocus: this.onFocus, onBlur: this.onBlur }, content, !this.props.disabled && /*#__PURE__*/React.createElement(Ripple, null)); } }]); return SelectButtonItem; }(Component); _defineProperty(SelectButtonItem, "defaultProps", { option: null, label: null, className: null, selected: null, tabIndex: null, ariaLabelledBy: null, template: null, onClick: null }); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var SelectButton = /*#__PURE__*/function (_Component) { _inherits(SelectButton, _Component); var _super = _createSuper(SelectButton); function SelectButton(props) { var _this; _classCallCheck(this, SelectButton); _this = _super.call(this, props); _this.onOptionClick = _this.onOptionClick.bind(_assertThisInitialized(_this)); return _this; } _createClass(SelectButton, [{ key: "onOptionClick", value: function onOptionClick(event) { var _this2 = this; if (this.props.disabled || this.isOptionDisabled(event.option)) { return; } var selected = this.isSelected(event.option); if (selected && !this.props.unselectable) { return; } var optionValue = this.getOptionValue(event.option); var newValue; if (this.props.multiple) { var currentValue = this.props.value ? _toConsumableArray(this.props.value) : []; if (selected) newValue = currentValue.filter(function (val) { return !ObjectUtils.equals(val, optionValue, _this2.props.dataKey); });else newValue = [].concat(_toConsumableArray(currentValue), [optionValue]); } else { if (selected) newValue = null;else newValue = optionValue; } if (this.props.onChange) { this.props.onChange({ originalEvent: event.originalEvent, value: newValue, stopPropagation: function stopPropagation() {}, preventDefault: function preventDefault() {}, target: { name: this.props.name, id: this.props.id, value: newValue } }); } } }, { key: "getOptionLabel", value: function getOptionLabel(option) { return this.props.optionLabel ? ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option; } }, { key: "getOptionValue", value: function getOptionValue(option) { return this.props.optionValue ? ObjectUtils.resolveFieldData(option, this.props.optionValue) : option && option['value'] !== undefined ? option['value'] : option; } }, { key: "isOptionDisabled", value: function isOptionDisabled(option) { if (this.props.optionDisabled) { return ObjectUtils.isFunction(this.props.optionDisabled) ? this.props.optionDisabled(option) : ObjectUtils.resolveFieldData(option, this.props.optionDisabled); } return option && option['disabled'] !== undefined ? option['disabled'] : false; } }, { key: "isSelected", value: function isSelected(option) { var selected = false; var optionValue = this.getOptionValue(option); if (this.props.multiple) { if (this.props.value && this.props.value.length) { var _iterator = _createForOfIteratorHelper(this.props.value), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var val = _step.value; if (ObjectUtils.equals(val, optionValue, this.props.dataKey)) { selected = true; break; } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } } } else { selected = ObjectUtils.equals(this.props.value, optionValue, this.props.dataKey); } return selected; } }, { key: "componentDidMount", value: function componentDidMount() { if (this.props.tooltip) { this.renderTooltip(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) { if (this.tooltip) this.tooltip.update(_objectSpread({ content: this.props.tooltip }, this.props.tooltipOptions || {}));else this.renderTooltip(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.tooltip) { this.tooltip.destroy(); this.tooltip = null; } } }, { key: "renderTooltip", value: function renderTooltip() { this.tooltip = tip({ target: this.element, content: this.props.tooltip, options: this.props.tooltipOptions }); } }, { key: "renderItems", value: function renderItems() { var _this3 = this; if (this.props.options && this.props.options.length) { return this.props.options.map(function (option, index) { var isDisabled = _this3.props.disabled || _this3.isOptionDisabled(option); var optionLabel = _this3.getOptionLabel(option); var tabIndex = isDisabled ? null : 0; return /*#__PURE__*/React.createElement(SelectButtonItem, { key: "".concat(optionLabel, "_").concat(index), label: optionLabel, className: option.className, option: option, onClick: _this3.onOptionClick, template: _this3.props.itemTemplate, selected: _this3.isSelected(option), tabIndex: tabIndex, disabled: isDisabled, ariaLabelledBy: _this3.props.ariaLabelledBy }); }); } return null; } }, { key: "render", value: function render() { var _this4 = this; var className = classNames('p-selectbutton p-buttonset p-component', this.props.className); var items = this.renderItems(); return /*#__PURE__*/React.createElement("div", { id: this.props.id, ref: function ref(el) { return _this4.element = el; }, className: className, style: this.props.style, role: "group" }, items); } }]); return SelectButton; }(Component); _defineProperty(SelectButton, "defaultProps", { id: null, value: null, options: null, optionLabel: null, optionValue: null, optionDisabled: null, tabIndex: null, multiple: false, unselectable: true, disabled: false, style: null, className: null, dataKey: null, tooltip: null, tooltipOptions: null, ariaLabelledBy: null, itemTemplate: null, onChange: null }); export { SelectButton };
ajax/libs/react-native-web/0.11.3/vendor/react-native/ListView/index.js
cdnjs/cdnjs
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule ListView * * @format */ 'use strict'; function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import ListViewDataSource from './ListViewDataSource'; import Platform from '../../../exports/Platform'; import React from 'react'; import PropTypes from 'prop-types'; import findNodeHandle from '../../../exports/findNodeHandle'; import NativeModules from '../../../exports/NativeModules'; import ScrollView from '../../../exports/ScrollView'; import ScrollResponder from '../../../modules/ScrollResponder'; import StaticRenderer from '../StaticRenderer'; import TimerMixin from 'react-timer-mixin'; import View from '../../../exports/View'; import cloneReferencedElement from './cloneReferencedElement'; import createReactClass from 'create-react-class'; import isEmpty from '../isEmpty'; var merge = function merge() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return Object.assign.apply(Object, [{}].concat(args)); }; var RCTScrollViewManager = NativeModules.ScrollViewManager; var DEFAULT_PAGE_SIZE = 1; var DEFAULT_INITIAL_ROWS = 10; var DEFAULT_SCROLL_RENDER_AHEAD = 1000; var DEFAULT_END_REACHED_THRESHOLD = 1000; var DEFAULT_SCROLL_CALLBACK_THROTTLE = 50; /** * DEPRECATED - use one of the new list components, such as [`FlatList`](docs/flatlist.html) * or [`SectionList`](docs/sectionlist.html) for bounded memory use, fewer bugs, * better performance, an easier to use API, and more features. Check out this * [blog post](https://facebook.github.io/react-native/blog/2017/03/13/better-list-views.html) * for more details. * * ListView - A core component designed for efficient display of vertically * scrolling lists of changing data. The minimal API is to create a * [`ListView.DataSource`](docs/listviewdatasource.html), populate it with a simple * array of data blobs, and instantiate a `ListView` component with that data * source and a `renderRow` callback which takes a blob from the data array and * returns a renderable component. * * Minimal example: * * ``` * class MyComponent extends Component { * constructor() { * super(); * const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2}); * this.state = { * dataSource: ds.cloneWithRows(['row 1', 'row 2']), * }; * } * * render() { * return ( * <ListView * dataSource={this.state.dataSource} * renderRow={(rowData) => <Text>{rowData}</Text>} * /> * ); * } * } * ``` * * ListView also supports more advanced features, including sections with sticky * section headers, header and footer support, callbacks on reaching the end of * the available data (`onEndReached`) and on the set of rows that are visible * in the device viewport change (`onChangeVisibleRows`), and several * performance optimizations. * * There are a few performance operations designed to make ListView scroll * smoothly while dynamically loading potentially very large (or conceptually * infinite) data sets: * * * Only re-render changed rows - the rowHasChanged function provided to the * data source tells the ListView if it needs to re-render a row because the * source data has changed - see ListViewDataSource for more details. * * * Rate-limited row rendering - By default, only one row is rendered per * event-loop (customizable with the `pageSize` prop). This breaks up the * work into smaller chunks to reduce the chance of dropping frames while * rendering rows. */ var ListView = createReactClass({ displayName: 'ListView', _childFrames: [], _sentEndForContentLength: null, _scrollComponent: null, _prevRenderedRowsCount: 0, _visibleRows: {}, scrollProperties: {}, mixins: [ScrollResponder.Mixin, TimerMixin], statics: { DataSource: ListViewDataSource }, /** * You must provide a renderRow function. If you omit any of the other render * functions, ListView will simply skip rendering them. * * - renderRow(rowData, sectionID, rowID, highlightRow); * - renderSectionHeader(sectionData, sectionID); */ propTypes: _objectSpread({}, ScrollView.propTypes, { /** * An instance of [ListView.DataSource](docs/listviewdatasource.html) to use */ dataSource: PropTypes.instanceOf(ListViewDataSource).isRequired, /** * (sectionID, rowID, adjacentRowHighlighted) => renderable * * If provided, a renderable component to be rendered as the separator * below each row but not the last row if there is a section header below. * Take a sectionID and rowID of the row above and whether its adjacent row * is highlighted. */ renderSeparator: PropTypes.func, /** * (rowData, sectionID, rowID, highlightRow) => renderable * * Takes a data entry from the data source and its ids and should return * a renderable component to be rendered as the row. By default the data * is exactly what was put into the data source, but it's also possible to * provide custom extractors. ListView can be notified when a row is * being highlighted by calling `highlightRow(sectionID, rowID)`. This * sets a boolean value of adjacentRowHighlighted in renderSeparator, allowing you * to control the separators above and below the highlighted row. The highlighted * state of a row can be reset by calling highlightRow(null). */ renderRow: PropTypes.func.isRequired, /** * How many rows to render on initial component mount. Use this to make * it so that the first screen worth of data appears at one time instead of * over the course of multiple frames. */ initialListSize: PropTypes.number.isRequired, /** * Called when all rows have been rendered and the list has been scrolled * to within onEndReachedThreshold of the bottom. The native scroll * event is provided. */ onEndReached: PropTypes.func, /** * Threshold in pixels (virtual, not physical) for calling onEndReached. */ onEndReachedThreshold: PropTypes.number.isRequired, /** * Number of rows to render per event loop. Note: if your 'rows' are actually * cells, i.e. they don't span the full width of your view (as in the * ListViewGridLayoutExample), you should set the pageSize to be a multiple * of the number of cells per row, otherwise you're likely to see gaps at * the edge of the ListView as new pages are loaded. */ pageSize: PropTypes.number.isRequired, /** * () => renderable * * The header and footer are always rendered (if these props are provided) * on every render pass. If they are expensive to re-render, wrap them * in StaticContainer or other mechanism as appropriate. Footer is always * at the bottom of the list, and header at the top, on every render pass. * In a horizontal ListView, the header is rendered on the left and the * footer on the right. */ renderFooter: PropTypes.func, renderHeader: PropTypes.func, /** * (sectionData, sectionID) => renderable * * If provided, a header is rendered for this section. */ renderSectionHeader: PropTypes.func, /** * (props) => renderable * * A function that returns the scrollable component in which the list rows * are rendered. Defaults to returning a ScrollView with the given props. */ renderScrollComponent: PropTypes.func.isRequired, /** * How early to start rendering rows before they come on screen, in * pixels. */ scrollRenderAheadDistance: PropTypes.number.isRequired, /** * (visibleRows, changedRows) => void * * Called when the set of visible rows changes. `visibleRows` maps * { sectionID: { rowID: true }} for all the visible rows, and * `changedRows` maps { sectionID: { rowID: true | false }} for the rows * that have changed their visibility, with true indicating visible, and * false indicating the view has moved out of view. */ onChangeVisibleRows: PropTypes.func, /** * A performance optimization for improving scroll perf of * large lists, used in conjunction with overflow: 'hidden' on the row * containers. This is enabled by default. */ removeClippedSubviews: PropTypes.bool, /** * Makes the sections headers sticky. The sticky behavior means that it * will scroll with the content at the top of the section until it reaches * the top of the screen, at which point it will stick to the top until it * is pushed off the screen by the next section header. This property is * not supported in conjunction with `horizontal={true}`. Only enabled by * default on iOS because of typical platform standards. */ stickySectionHeadersEnabled: PropTypes.bool, /** * An array of child indices determining which children get docked to the * top of the screen when scrolling. For example, passing * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the * top of the scroll view. This property is not supported in conjunction * with `horizontal={true}`. */ stickyHeaderIndices: PropTypes.arrayOf(PropTypes.number).isRequired, /** * Flag indicating whether empty section headers should be rendered. In the future release * empty section headers will be rendered by default, and the flag will be deprecated. * If empty sections are not desired to be rendered their indices should be excluded from sectionID object. */ enableEmptySections: PropTypes.bool }), /** * Exports some data, e.g. for perf investigations or analytics. */ getMetrics: function getMetrics() { return { contentLength: this.scrollProperties.contentLength, totalRows: this.props.enableEmptySections ? this.props.dataSource.getRowAndSectionCount() : this.props.dataSource.getRowCount(), renderedRows: this.state.curRenderedRowsCount, visibleRows: Object.keys(this._visibleRows).length }; }, /** * Provides a handle to the underlying scroll responder. * Note that `this._scrollComponent` might not be a `ScrollView`, so we * need to check that it responds to `getScrollResponder` before calling it. */ getScrollResponder: function getScrollResponder() { if (this._scrollComponent && this._scrollComponent.getScrollResponder) { return this._scrollComponent.getScrollResponder(); } }, getScrollableNode: function getScrollableNode() { if (this._scrollComponent && this._scrollComponent.getScrollableNode) { return this._scrollComponent.getScrollableNode(); } else { return findNodeHandle(this._scrollComponent); } }, /** * Scrolls to a given x, y offset, either immediately or with a smooth animation. * * See `ScrollView#scrollTo`. */ scrollTo: function scrollTo() { if (this._scrollComponent && this._scrollComponent.scrollTo) { var _this$_scrollComponen; (_this$_scrollComponen = this._scrollComponent).scrollTo.apply(_this$_scrollComponen, arguments); } }, /** * If this is a vertical ListView scrolls to the bottom. * If this is a horizontal ListView scrolls to the right. * * Use `scrollToEnd({animated: true})` for smooth animated scrolling, * `scrollToEnd({animated: false})` for immediate scrolling. * If no options are passed, `animated` defaults to true. * * See `ScrollView#scrollToEnd`. */ scrollToEnd: function scrollToEnd(options) { if (this._scrollComponent) { if (this._scrollComponent.scrollToEnd) { this._scrollComponent.scrollToEnd(options); } else { console.warn('The scroll component used by the ListView does not support ' + 'scrollToEnd. Check the renderScrollComponent prop of your ListView.'); } } }, /** * Displays the scroll indicators momentarily. * * @platform ios */ flashScrollIndicators: function flashScrollIndicators() { if (this._scrollComponent && this._scrollComponent.flashScrollIndicators) { this._scrollComponent.flashScrollIndicators(); } }, setNativeProps: function setNativeProps(props) { if (this._scrollComponent) { this._scrollComponent.setNativeProps(props); } }, /** * React life cycle hooks. */ getDefaultProps: function getDefaultProps() { return { initialListSize: DEFAULT_INITIAL_ROWS, pageSize: DEFAULT_PAGE_SIZE, renderScrollComponent: function renderScrollComponent(props) { return React.createElement(ScrollView, props); }, scrollRenderAheadDistance: DEFAULT_SCROLL_RENDER_AHEAD, onEndReachedThreshold: DEFAULT_END_REACHED_THRESHOLD, stickySectionHeadersEnabled: Platform.OS === 'ios' || Platform.OS === 'web', stickyHeaderIndices: [] }; }, getInitialState: function getInitialState() { return { curRenderedRowsCount: this.props.initialListSize, highlightedRow: {} }; }, getInnerViewNode: function getInnerViewNode() { return this._scrollComponent.getInnerViewNode(); }, UNSAFE_componentWillMount: function UNSAFE_componentWillMount() { // this data should never trigger a render pass, so don't put in state this.scrollProperties = { visibleLength: null, contentLength: null, offset: 0 }; this._childFrames = []; this._visibleRows = {}; this._prevRenderedRowsCount = 0; this._sentEndForContentLength = null; }, componentDidMount: function componentDidMount() { var _this = this; // do this in animation frame until componentDidMount actually runs after // the component is laid out this.requestAnimationFrame(function () { _this._measureAndUpdateScrollProps(); }); }, UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(nextProps) { var _this2 = this; if (this.props.dataSource !== nextProps.dataSource || this.props.initialListSize !== nextProps.initialListSize) { this.setState(function (state, props) { _this2._prevRenderedRowsCount = 0; return { curRenderedRowsCount: Math.min(Math.max(state.curRenderedRowsCount, props.initialListSize), props.enableEmptySections ? props.dataSource.getRowAndSectionCount() : props.dataSource.getRowCount()) }; }, function () { return _this2._renderMoreRowsIfNeeded(); }); } }, componentDidUpdate: function componentDidUpdate() { var _this3 = this; this.requestAnimationFrame(function () { _this3._measureAndUpdateScrollProps(); }); }, _onRowHighlighted: function _onRowHighlighted(sectionID, rowID) { this.setState({ highlightedRow: { sectionID: sectionID, rowID: rowID } }); }, render: function render() { var bodyComponents = []; var dataSource = this.props.dataSource; var allRowIDs = dataSource.rowIdentities; var rowCount = 0; var stickySectionHeaderIndices = []; var renderSectionHeader = this.props.renderSectionHeader; var header = this.props.renderHeader && this.props.renderHeader(); var footer = this.props.renderFooter && this.props.renderFooter(); var totalIndex = header ? 1 : 0; for (var sectionIdx = 0; sectionIdx < allRowIDs.length; sectionIdx++) { var sectionID = dataSource.sectionIdentities[sectionIdx]; var rowIDs = allRowIDs[sectionIdx]; if (rowIDs.length === 0) { if (this.props.enableEmptySections === undefined) { /* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses * an error found when Flow v0.54 was deployed. To see the error * delete this comment and run Flow. */ var warning = require('fbjs/lib/warning'); warning(false, 'In next release empty section headers will be rendered.' + " In this release you can use 'enableEmptySections' flag to render empty section headers."); continue; } else { var invariant = require('fbjs/lib/invariant'); invariant(this.props.enableEmptySections, "In next release 'enableEmptySections' flag will be deprecated, empty section headers will always be rendered." + ' If empty section headers are not desirable their indices should be excluded from sectionIDs object.' + " In this release 'enableEmptySections' may only have value 'true' to allow empty section headers rendering."); } } if (renderSectionHeader) { var element = renderSectionHeader(dataSource.getSectionHeaderData(sectionIdx), sectionID); if (element) { bodyComponents.push(React.cloneElement(element, { key: 's_' + sectionID })); if (this.props.stickySectionHeadersEnabled) { stickySectionHeaderIndices.push(totalIndex); } totalIndex++; } } for (var rowIdx = 0; rowIdx < rowIDs.length; rowIdx++) { var rowID = rowIDs[rowIdx]; var comboID = sectionID + '_' + rowID; var shouldUpdateRow = rowCount >= this._prevRenderedRowsCount && dataSource.rowShouldUpdate(sectionIdx, rowIdx); var row = React.createElement(StaticRenderer, { key: 'r_' + comboID, shouldUpdate: !!shouldUpdateRow, render: this.props.renderRow.bind(null, dataSource.getRowData(sectionIdx, rowIdx), sectionID, rowID, this._onRowHighlighted) }); bodyComponents.push(row); totalIndex++; if (this.props.renderSeparator && (rowIdx !== rowIDs.length - 1 || sectionIdx === allRowIDs.length - 1)) { var adjacentRowHighlighted = this.state.highlightedRow.sectionID === sectionID && (this.state.highlightedRow.rowID === rowID || this.state.highlightedRow.rowID === rowIDs[rowIdx + 1]); var separator = this.props.renderSeparator(sectionID, rowID, adjacentRowHighlighted); if (separator) { bodyComponents.push(React.createElement(View, { key: 's_' + comboID }, separator)); totalIndex++; } } if (++rowCount === this.state.curRenderedRowsCount) { break; } } if (rowCount >= this.state.curRenderedRowsCount) { break; } } var _this$props = this.props, renderScrollComponent = _this$props.renderScrollComponent, props = _objectWithoutPropertiesLoose(_this$props, ["renderScrollComponent"]); if (!props.scrollEventThrottle) { props.scrollEventThrottle = DEFAULT_SCROLL_CALLBACK_THROTTLE; } if (props.removeClippedSubviews === undefined) { props.removeClippedSubviews = true; } Object.assign(props, { onScroll: this._onScroll, stickyHeaderIndices: this.props.stickyHeaderIndices.concat(stickySectionHeaderIndices), // Do not pass these events downstream to ScrollView since they will be // registered in ListView's own ScrollResponder.Mixin onKeyboardWillShow: undefined, onKeyboardWillHide: undefined, onKeyboardDidShow: undefined, onKeyboardDidHide: undefined }); return cloneReferencedElement(renderScrollComponent(props), { ref: this._setScrollComponentRef, onContentSizeChange: this._onContentSizeChange, onLayout: this._onLayout, DEPRECATED_sendUpdatedChildFrames: typeof props.onChangeVisibleRows !== undefined }, header, bodyComponents, footer); }, /** * Private methods */ _measureAndUpdateScrollProps: function _measureAndUpdateScrollProps() { var scrollComponent = this.getScrollResponder(); if (!scrollComponent || !scrollComponent.getInnerViewNode) { return; } // RCTScrollViewManager.calculateChildFrames is not available on // every platform RCTScrollViewManager && RCTScrollViewManager.calculateChildFrames && RCTScrollViewManager.calculateChildFrames(findNodeHandle(scrollComponent), this._updateVisibleRows); }, _setScrollComponentRef: function _setScrollComponentRef(scrollComponent) { this._scrollComponent = scrollComponent; }, _onContentSizeChange: function _onContentSizeChange(width, height) { var contentLength = !this.props.horizontal ? height : width; if (contentLength !== this.scrollProperties.contentLength) { this.scrollProperties.contentLength = contentLength; this._updateVisibleRows(); this._renderMoreRowsIfNeeded(); } this.props.onContentSizeChange && this.props.onContentSizeChange(width, height); }, _onLayout: function _onLayout(event) { var _event$nativeEvent$la = event.nativeEvent.layout, width = _event$nativeEvent$la.width, height = _event$nativeEvent$la.height; var visibleLength = !this.props.horizontal ? height : width; if (visibleLength !== this.scrollProperties.visibleLength) { this.scrollProperties.visibleLength = visibleLength; this._updateVisibleRows(); this._renderMoreRowsIfNeeded(); } this.props.onLayout && this.props.onLayout(event); }, _maybeCallOnEndReached: function _maybeCallOnEndReached(event) { if (this.props.onEndReached && this.scrollProperties.contentLength !== this._sentEndForContentLength && this._getDistanceFromEnd(this.scrollProperties) < this.props.onEndReachedThreshold && this.state.curRenderedRowsCount === (this.props.enableEmptySections ? this.props.dataSource.getRowAndSectionCount() : this.props.dataSource.getRowCount())) { this._sentEndForContentLength = this.scrollProperties.contentLength; this.props.onEndReached(event); return true; } return false; }, _renderMoreRowsIfNeeded: function _renderMoreRowsIfNeeded() { if (this.scrollProperties.contentLength === null || this.scrollProperties.visibleLength === null || this.state.curRenderedRowsCount === (this.props.enableEmptySections ? this.props.dataSource.getRowAndSectionCount() : this.props.dataSource.getRowCount())) { this._maybeCallOnEndReached(); return; } var distanceFromEnd = this._getDistanceFromEnd(this.scrollProperties); if (distanceFromEnd < this.props.scrollRenderAheadDistance) { this._pageInNewRows(); } }, _pageInNewRows: function _pageInNewRows() { var _this4 = this; this.setState(function (state, props) { var rowsToRender = Math.min(state.curRenderedRowsCount + props.pageSize, props.enableEmptySections ? props.dataSource.getRowAndSectionCount() : props.dataSource.getRowCount()); _this4._prevRenderedRowsCount = state.curRenderedRowsCount; return { curRenderedRowsCount: rowsToRender }; }, function () { _this4._measureAndUpdateScrollProps(); _this4._prevRenderedRowsCount = _this4.state.curRenderedRowsCount; }); }, _getDistanceFromEnd: function _getDistanceFromEnd(scrollProperties) { return scrollProperties.contentLength - scrollProperties.visibleLength - scrollProperties.offset; }, _updateVisibleRows: function _updateVisibleRows(updatedFrames) { var _this5 = this; if (!this.props.onChangeVisibleRows) { return; // No need to compute visible rows if there is no callback } if (updatedFrames) { updatedFrames.forEach(function (newFrame) { _this5._childFrames[newFrame.index] = merge(newFrame); }); } var isVertical = !this.props.horizontal; var dataSource = this.props.dataSource; var visibleMin = this.scrollProperties.offset; var visibleMax = visibleMin + this.scrollProperties.visibleLength; var allRowIDs = dataSource.rowIdentities; var header = this.props.renderHeader && this.props.renderHeader(); var totalIndex = header ? 1 : 0; var visibilityChanged = false; var changedRows = {}; for (var sectionIdx = 0; sectionIdx < allRowIDs.length; sectionIdx++) { var rowIDs = allRowIDs[sectionIdx]; if (rowIDs.length === 0) { continue; } var sectionID = dataSource.sectionIdentities[sectionIdx]; if (this.props.renderSectionHeader) { totalIndex++; } var visibleSection = this._visibleRows[sectionID]; if (!visibleSection) { visibleSection = {}; } for (var rowIdx = 0; rowIdx < rowIDs.length; rowIdx++) { var rowID = rowIDs[rowIdx]; var frame = this._childFrames[totalIndex]; totalIndex++; if (this.props.renderSeparator && (rowIdx !== rowIDs.length - 1 || sectionIdx === allRowIDs.length - 1)) { totalIndex++; } if (!frame) { break; } var rowVisible = visibleSection[rowID]; var min = isVertical ? frame.y : frame.x; var max = min + (isVertical ? frame.height : frame.width); if (!min && !max || min === max) { break; } if (min > visibleMax || max < visibleMin) { if (rowVisible) { visibilityChanged = true; delete visibleSection[rowID]; if (!changedRows[sectionID]) { changedRows[sectionID] = {}; } changedRows[sectionID][rowID] = false; } } else if (!rowVisible) { visibilityChanged = true; visibleSection[rowID] = true; if (!changedRows[sectionID]) { changedRows[sectionID] = {}; } changedRows[sectionID][rowID] = true; } } if (!isEmpty(visibleSection)) { this._visibleRows[sectionID] = visibleSection; } else if (this._visibleRows[sectionID]) { delete this._visibleRows[sectionID]; } } visibilityChanged && this.props.onChangeVisibleRows(this._visibleRows, changedRows); }, _onScroll: function _onScroll(e) { var isVertical = !this.props.horizontal; this.scrollProperties.visibleLength = e.nativeEvent.layoutMeasurement[isVertical ? 'height' : 'width']; this.scrollProperties.contentLength = e.nativeEvent.contentSize[isVertical ? 'height' : 'width']; this.scrollProperties.offset = e.nativeEvent.contentOffset[isVertical ? 'y' : 'x']; this._updateVisibleRows(e.nativeEvent.updatedChildFrames); if (!this._maybeCallOnEndReached(e)) { this._renderMoreRowsIfNeeded(); } if (this.props.onEndReached && this._getDistanceFromEnd(this.scrollProperties) > this.props.onEndReachedThreshold) { // Scrolled out of the end zone, so it should be able to trigger again. this._sentEndForContentLength = null; } this.props.onScroll && this.props.onScroll(e); } }); export default ListView;
ajax/libs/material-ui/4.9.2/esm/TablePagination/TablePaginationActions.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft'; import KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight'; import useTheme from '../styles/useTheme'; import IconButton from '../IconButton'; /** * @ignore - internal component. */ var _ref = React.createElement(KeyboardArrowRight, null); var _ref2 = React.createElement(KeyboardArrowLeft, null); var _ref3 = React.createElement(KeyboardArrowLeft, null); var _ref4 = React.createElement(KeyboardArrowRight, null); var TablePaginationActions = React.forwardRef(function TablePaginationActions(props, ref) { var backIconButtonProps = props.backIconButtonProps, count = props.count, nextIconButtonProps = props.nextIconButtonProps, onChangePage = props.onChangePage, page = props.page, rowsPerPage = props.rowsPerPage, other = _objectWithoutProperties(props, ["backIconButtonProps", "count", "nextIconButtonProps", "onChangePage", "page", "rowsPerPage"]); var theme = useTheme(); var handleBackButtonClick = function handleBackButtonClick(event) { onChangePage(event, page - 1); }; var handleNextButtonClick = function handleNextButtonClick(event) { onChangePage(event, page + 1); }; return React.createElement("div", _extends({ ref: ref }, other), React.createElement(IconButton, _extends({ onClick: handleBackButtonClick, disabled: page === 0, color: "inherit" }, backIconButtonProps), theme.direction === 'rtl' ? _ref : _ref2), React.createElement(IconButton, _extends({ onClick: handleNextButtonClick, disabled: count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false, color: "inherit" }, nextIconButtonProps), theme.direction === 'rtl' ? _ref3 : _ref4)); }); process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = { /** * Props applied to the back arrow [`IconButton`](/api/icon-button/) element. */ backIconButtonProps: PropTypes.object, /** * The total number of rows. */ count: PropTypes.number.isRequired, /** * Props applied to the next arrow [`IconButton`](/api/icon-button/) element. */ nextIconButtonProps: PropTypes.object, /** * Callback fired when the page is changed. * * @param {object} event The event source of the callback. * @param {number} page The page selected. */ onChangePage: PropTypes.func.isRequired, /** * The zero-based index of the current page. */ page: PropTypes.number.isRequired, /** * The number of rows per page. */ rowsPerPage: PropTypes.number.isRequired } : void 0; export default TablePaginationActions;
ajax/libs/react-native-web/0.17.7/modules/UnimplementedView/index.js
cdnjs/cdnjs
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import View from '../../exports/View'; import React from 'react'; /** * Common implementation for a simple stubbed view. */ var UnimplementedView = /*#__PURE__*/function (_React$Component) { _inheritsLoose(UnimplementedView, _React$Component); function UnimplementedView() { return _React$Component.apply(this, arguments) || this; } var _proto = UnimplementedView.prototype; _proto.setNativeProps = function setNativeProps() {// Do nothing. }; _proto.render = function render() { return /*#__PURE__*/React.createElement(View, { style: [unimplementedViewStyles, this.props.style] }, this.props.children); }; return UnimplementedView; }(React.Component); var unimplementedViewStyles = process.env.NODE_ENV !== 'production' ? { alignSelf: 'flex-start', borderColor: 'red', borderWidth: 1 } : {}; export default UnimplementedView;
ajax/libs/react-instantsearch/4.0.0-beta.2/Dom.js
cdnjs/cdnjs
/*! ReactInstantSearch 4.0.0-beta.2 | © Algolia, inc. | https://community.algolia.com/react-instantsearch/ */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom")); else if(typeof define === 'function' && define.amd) define(["react", "react-dom"], factory); else if(typeof exports === 'object') exports["Dom"] = factory(require("react"), require("react-dom")); else root["ReactInstantSearch"] = root["ReactInstantSearch"] || {}, root["ReactInstantSearch"]["Dom"] = factory(root["React"], root["ReactDOM"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_425__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 428); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_0__; /***/ }), /* 1 */ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isEqual2 = __webpack_require__(104); var _isEqual3 = _interopRequireDefault(_isEqual2); var _has2 = __webpack_require__(56); var _has3 = _interopRequireDefault(_has2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); exports.default = createConnector; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(57); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * @typedef {object} ConnectorDescription * @property {string} displayName - the displayName used by the wrapper * @property {function} refine - a function to filter the local state * @property {function} getSearchParameters - function transforming the local state to a SearchParameters * @property {function} getMetadata - metadata of the widget * @property {function} transitionState - hook after the state has changed * @property {function} getProvidedProps - transform the state into props passed to the wrapped component. * Receives (props, widgetStates, searchState, metadata) and returns the local state. * @property {function} getId - Receives props and return the id that will be used to identify the widget * @property {function} cleanUp - hook when the widget will unmount. Receives (props, searchState) and return a cleaned state. * @property {object} propTypes - PropTypes forwarded to the wrapped component. * @property {object} defaultProps - default values for the props */ /** * Connectors are the HOC used to transform React components * into InstantSearch widgets. * In order to simplify the construction of such connectors * `createConnector` takes a description and transform it into * a connector. * @param {ConnectorDescription} connectorDesc the description of the connector * @return {Connector} a function that wraps a component into * an instantsearch connected one. */ function createConnector(connectorDesc) { if (!connectorDesc.displayName) { throw new Error('`createConnector` requires you to provide a `displayName` property.'); } var hasRefine = (0, _has3.default)(connectorDesc, 'refine'); var hasSearchForFacetValues = (0, _has3.default)(connectorDesc, 'searchForFacetValues'); var hasSearchParameters = (0, _has3.default)(connectorDesc, 'getSearchParameters'); var hasMetadata = (0, _has3.default)(connectorDesc, 'getMetadata'); var hasTransitionState = (0, _has3.default)(connectorDesc, 'transitionState'); var hasCleanUp = (0, _has3.default)(connectorDesc, 'cleanUp'); var isWidget = hasSearchParameters || hasMetadata || hasTransitionState; return function (Composed) { var _class, _temp, _initialiseProps; return _temp = _class = function (_Component) { _inherits(Connector, _Component); function Connector(props, context) { _classCallCheck(this, Connector); var _this = _possibleConstructorReturn(this, (Connector.__proto__ || Object.getPrototypeOf(Connector)).call(this, props, context)); _initialiseProps.call(_this); var _context$ais = context.ais; var store = _context$ais.store; var widgetsManager = _context$ais.widgetsManager; var multiIndexContext = context.multiIndexContext; _this.state = { props: _this.getProvidedProps(props) }; _this.unsubscribe = store.subscribe(function () { _this.setState({ props: _this.getProvidedProps(_this.props) }); }); var getSearchParameters = hasSearchParameters ? function (searchParameters) { return connectorDesc.getSearchParameters.call(_this, searchParameters, _this.props, store.getState().widgets); } : null; var getMetadata = hasMetadata ? function (nextWidgetsState) { return connectorDesc.getMetadata.call(_this, _this.props, nextWidgetsState); } : null; var transitionState = hasTransitionState ? function (prevWidgetsState, nextWidgetsState) { return connectorDesc.transitionState.call(_this, _this.props, prevWidgetsState, nextWidgetsState); } : null; if (isWidget) { _this.unregisterWidget = widgetsManager.registerWidget({ getSearchParameters: getSearchParameters, getMetadata: getMetadata, transitionState: transitionState, multiIndexContext: multiIndexContext }); } return _this; } _createClass(Connector, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if (!(0, _isEqual3.default)(this.props, nextProps)) { this.setState({ props: this.getProvidedProps(nextProps) }); if (isWidget) { // Since props might have changed, we need to re-run getSearchParameters // and getMetadata with the new props. this.context.ais.widgetsManager.update(); if (connectorDesc.transitionState) { this.context.ais.onSearchStateChange(connectorDesc.transitionState.call(this, nextProps, this.context.ais.store.getState().widgets, this.context.ais.store.getState().widgets)); } } } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.unsubscribe(); if (isWidget) { this.unregisterWidget(); //will schedule an update if (hasCleanUp) { var newState = connectorDesc.cleanUp.call(this, this.props, this.context.ais.store.getState().widgets); this.context.ais.store.setState(_extends({}, this.context.ais.store.getState(), { widgets: newState })); this.context.ais.onSearchStateChange((0, _utils.removeEmptyKey)(newState)); } } } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps, nextState) { var propsEqual = (0, _utils.shallowEqual)(this.props, nextProps); if (this.state.props === null || nextState.props === null) { if (this.state.props === nextState.props) { return !propsEqual; } return true; } return !propsEqual || !(0, _utils.shallowEqual)(this.state.props, nextState.props); } }, { key: 'render', value: function render() { var _this2 = this; if (this.state.props === null) { return null; } var refineProps = hasRefine ? { refine: this.refine, createURL: this.createURL } : {}; var searchForFacetValuesProps = hasSearchForFacetValues ? { searchForItems: this.searchForFacetValues, searchForFacetValues: function searchForFacetValues(facetName, query) { if (false) { // eslint-disable-next-line no-console console.warn('react-instantsearch: `searchForFacetValues` has been renamed to' + '`searchForItems`, this will break in the next major version.'); } _this2.searchForFacetValues(facetName, query); } } : {}; return _react2.default.createElement(Composed, _extends({}, this.props, this.state.props, refineProps, searchForFacetValuesProps)); } }]); return Connector; }(_react.Component), _class.displayName = connectorDesc.displayName + '(' + (0, _utils.getDisplayName)(Composed) + ')', _class.defaultClassNames = Composed.defaultClassNames, _class.propTypes = connectorDesc.propTypes, _class.defaultProps = connectorDesc.defaultProps, _class.contextTypes = { // @TODO: more precise state manager propType ais: _react.PropTypes.object.isRequired, multiIndexContext: _react.PropTypes.object }, _initialiseProps = function _initialiseProps() { var _this3 = this; this.getProvidedProps = function (props) { var store = _this3.context.ais.store; var _store$getState = store.getState(); var results = _store$getState.results; var searching = _store$getState.searching; var error = _store$getState.error; var widgets = _store$getState.widgets; var metadata = _store$getState.metadata; var resultsFacetValues = _store$getState.resultsFacetValues; var searchState = { results: results, searching: searching, error: error }; return connectorDesc.getProvidedProps.call(_this3, props, widgets, searchState, metadata, resultsFacetValues); }; this.refine = function () { var _connectorDesc$refine; for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this3.context.ais.onInternalStateUpdate((_connectorDesc$refine = connectorDesc.refine).call.apply(_connectorDesc$refine, [_this3, _this3.props, _this3.context.ais.store.getState().widgets].concat(args))); }; this.searchForFacetValues = function () { for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } _this3.context.ais.onSearchForFacetValues(connectorDesc.searchForFacetValues.apply(connectorDesc, [_this3.props, _this3.context.ais.store.getState().widgets].concat(args))); }; this.createURL = function () { var _connectorDesc$refine2; for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } return _this3.context.ais.createHrefForState((_connectorDesc$refine2 = connectorDesc.refine).call.apply(_connectorDesc$refine2, [_this3, _this3.props, _this3.context.ais.store.getState().widgets].concat(args))); }; this.cleanUp = function () { var _connectorDesc$cleanU; for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { args[_key4] = arguments[_key4]; } return (_connectorDesc$cleanU = connectorDesc.cleanUp).call.apply(_connectorDesc$cleanU, [_this3].concat(args)); }; }, _temp; }; } /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(77); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _get2 = __webpack_require__(72); var _get3 = _interopRequireDefault(_get2); var _omit2 = __webpack_require__(37); var _omit3 = _interopRequireDefault(_omit2); var _has2 = __webpack_require__(56); var _has3 = _interopRequireDefault(_has2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.getIndex = getIndex; exports.getResults = getResults; exports.hasMultipleIndex = hasMultipleIndex; exports.refineValue = refineValue; exports.getCurrentRefinementValue = getCurrentRefinementValue; exports.cleanUpValue = cleanUpValue; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getIndex(context) { return context && context.multiIndexContext ? context.multiIndexContext.targetedIndex : context.ais.mainTargetedIndex; } function getResults(searchResults, context) { if (hasMultipleIndex(context)) { return searchResults.results && searchResults.results[getIndex(context)] ? searchResults.results[getIndex(context)] : null; } else { return searchResults.results ? searchResults.results : null; } } function hasMultipleIndex(context) { return context && context.multiIndexContext; } // eslint-disable-next-line max-params function refineValue(searchState, nextRefinement, context, resetPage, namespace) { if (hasMultipleIndex(context)) { return namespace ? refineMultiIndexWithNamespace(searchState, nextRefinement, context, resetPage, namespace) : refineMultiIndex(searchState, nextRefinement, context, resetPage); } else { return namespace ? refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) : refineSingleIndex(searchState, nextRefinement, resetPage); } } function refineMultiIndex(searchState, nextRefinement, context, resetPage) { var page = resetPage ? { page: 1 } : undefined; var index = getIndex(context); var state = (0, _has3.default)(searchState, 'indices.' + index) ? _extends({}, searchState.indices, _defineProperty({}, index, _extends({}, searchState.indices[index], nextRefinement, page))) : _extends({}, searchState.indices, _defineProperty({}, index, _extends({}, nextRefinement, page))); return _extends({}, searchState, { indices: state }); } function refineSingleIndex(searchState, nextRefinement, resetPage) { var page = resetPage ? { page: 1 } : undefined; return _extends({}, searchState, nextRefinement, page); } // eslint-disable-next-line max-params function refineMultiIndexWithNamespace(searchState, nextRefinement, context, resetPage, namespace) { var _extends4; var index = getIndex(context); var page = resetPage ? { page: 1 } : undefined; var state = (0, _has3.default)(searchState, 'indices.' + index) ? _extends({}, searchState.indices, _defineProperty({}, index, _extends({}, searchState.indices[index], (_extends4 = {}, _defineProperty(_extends4, namespace, _extends({}, searchState.indices[index][namespace], nextRefinement)), _defineProperty(_extends4, 'page', 1), _extends4)))) : _extends({}, searchState.indices, _defineProperty({}, index, _extends(_defineProperty({}, namespace, nextRefinement), page))); return _extends({}, searchState, { indices: state }); } function refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) { var page = resetPage ? { page: 1 } : undefined; return _extends({}, searchState, _defineProperty({}, namespace, _extends({}, searchState[namespace], nextRefinement)), page); } // eslint-disable-next-line max-params function getCurrentRefinementValue(props, searchState, context, id, defaultValue, refinementsCallback) { var index = getIndex(context); var refinements = hasMultipleIndex(context) && (0, _has3.default)(searchState, 'indices.' + index + '.' + id) || !hasMultipleIndex(context) && (0, _has3.default)(searchState, id); if (refinements) { var currentRefinement = hasMultipleIndex(context) ? (0, _get3.default)(searchState.indices[index], id) : (0, _get3.default)(searchState, id); return refinementsCallback(currentRefinement); } if (props.defaultRefinement) { return props.defaultRefinement; } return defaultValue; } function cleanUpValue(searchState, context, id) { var index = getIndex(context); return hasMultipleIndex(context) ? (0, _omit3.default)(searchState, 'indices.' + index + '.' + id) : (0, _omit3.default)(searchState, '' + id); } /***/ }), /* 5 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 6 */ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(14), getRawTag = __webpack_require__(155), objectToString = __webpack_require__(182); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(88), baseKeys = __webpack_require__(75), isArrayLike = __webpack_require__(10); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(134), getValue = __webpack_require__(157); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(18), isLength = __webpack_require__(47); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 11 */ /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(264), baseMatchesProperty = __webpack_require__(265), identity = __webpack_require__(23), isArray = __webpack_require__(1), property = __webpack_require__(334); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = classNames; var _classnames = __webpack_require__(416); var _classnames2 = _interopRequireDefault(_classnames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var prefix = 'ais'; function classNames(block) { return function () { for (var _len = arguments.length, elements = Array(_len), _key = 0; _key < _len; _key++) { elements[_key] = arguments[_key]; } return { className: (0, _classnames2.default)(elements.filter(function (element) { return element !== undefined && element !== false; }).map(function (element) { return prefix + '-' + block + '__' + element; })) }; }; } /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(3); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { var baseKeys = __webpack_require__(75), getTag = __webpack_require__(55), isArguments = __webpack_require__(24), isArray = __webpack_require__(1), isArrayLike = __webpack_require__(10), isBuffer = __webpack_require__(25), isPrototype = __webpack_require__(36), isTypedArray = __webpack_require__(35); /** `Object#toString` result references. */ var mapTag = '[object Map]', setTag = '[object Set]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if `value` is an empty object, collection, map, or set. * * Objects are considered empty if they have no own enumerable string keyed * properties. * * Array-like values such as `arguments` objects, arrays, buffers, strings, or * jQuery-like collections are considered empty if they have a `length` of `0`. * Similarly, maps and sets are considered empty if they have a `size` of `0`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * * _.isEmpty(null); * // => true * * _.isEmpty(true); * // => true * * _.isEmpty(1); * // => true * * _.isEmpty([1, 2, 3]); * // => false * * _.isEmpty({ 'a': 1 }); * // => false */ function isEmpty(value) { if (value == null) { return true; } if (isArrayLike(value) && (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments(value))) { return !value.length; } var tag = getTag(value); if (tag == mapTag || tag == setTag) { return !value.size; } if (isPrototype(value)) { return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty.call(value, key)) { return false; } } return true; } module.exports = isEmpty; /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(11), baseIteratee = __webpack_require__(12), baseMap = __webpack_require__(136), isArray = __webpack_require__(1); /** * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * * function square(n) { * return n * n; * } * * _.map([4, 8], square); * // => [16, 64] * * _.map({ 'a': 4, 'b': 8 }, square); * // => [16, 64] (iteration order is not guaranteed) * * var users = [ * { 'user': 'barney' }, * { 'user': 'fred' } * ]; * * // The `_.property` iteratee shorthand. * _.map(users, 'user'); * // => ['barney', 'fred'] */ function map(collection, iteratee) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, baseIteratee(iteratee, 3)); } module.exports = map; /***/ }), /* 17 */ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(7), isObject = __webpack_require__(5); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(23), overRest = __webpack_require__(183), setToString = __webpack_require__(100); /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ''); } module.exports = baseRest; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(1), isKey = __webpack_require__(71), stringToPath = __webpack_require__(194), toString = __webpack_require__(74); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(90), baseAssignValue = __webpack_require__(41); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(26); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /* 23 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(132), isObjectLike = __webpack_require__(6); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(3), stubFalse = __webpack_require__(204); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(54)(module))) /***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(7), isObjectLike = __webpack_require__(6); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(167), listCacheDelete = __webpack_require__(168), listCacheGet = __webpack_require__(169), listCacheHas = __webpack_require__(170), listCacheSet = __webpack_require__(171); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(17); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(164); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 30 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (typeof value == 'number' || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(9); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _has2 = __webpack_require__(56); var _has3 = _interopRequireDefault(_has2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.default = translatable; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(57); var _propTypes = __webpack_require__(399); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function translatable(defaultTranslations) { return function (Composed) { function Translatable(props) { var translations = props.translations; var otherProps = _objectWithoutProperties(props, ['translations']); var translate = function translate(key) { for (var _len = arguments.length, params = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { params[_key - 1] = arguments[_key]; } var translation = translations && (0, _has3.default)(translations, key) ? translations[key] : defaultTranslations[key]; if (typeof translation === 'function') { return translation.apply(undefined, params); } return translation; }; return _react2.default.createElement(Composed, _extends({ translate: translate }, otherProps)); } Translatable.displayName = 'Translatable(' + (0, _utils.getDisplayName)(Composed) + ')'; Translatable.propTypes = { translations: (0, _propTypes.withKeysPropType)(Object.keys(defaultTranslations)) }; return Translatable; }; } /***/ }), /* 33 */ /***/ (function(module, exports) { /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; /** * Replaces all `placeholder` elements in `array` with an internal placeholder * and returns an array of their indexes. * * @private * @param {Array} array The array to modify. * @param {*} placeholder The placeholder to replace. * @returns {Array} Returns the new array of placeholder indexes. */ function replaceHolders(array, placeholder) { var index = -1, length = array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value === placeholder || value === PLACEHOLDER) { array[index] = PLACEHOLDER; result[resIndex++] = index; } } return result; } module.exports = replaceHolders; /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { var arrayEach = __webpack_require__(85), baseEach = __webpack_require__(62), castFunction = __webpack_require__(141), isArray = __webpack_require__(1); /** * Iterates over elements of `collection` and invokes `iteratee` for each element. * The iteratee is invoked with three arguments: (value, index|key, collection). * Iteratee functions may exit iteration early by explicitly returning `false`. * * **Note:** As with other "Collections" methods, objects with a "length" * property are iterated like arrays. To avoid this behavior use `_.forIn` * or `_.forOwn` for object iteration. * * @static * @memberOf _ * @since 0.1.0 * @alias each * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. * @see _.forEachRight * @example * * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. * * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { var func = isArray(collection) ? arrayEach : baseEach; return func(collection, castFunction(iteratee)); } module.exports = forEach; /***/ }), /* 35 */ /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(135), baseUnary = __webpack_require__(44), nodeUtil = __webpack_require__(181); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /* 36 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 37 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(11), baseClone = __webpack_require__(255), baseUnset = __webpack_require__(277), castPath = __webpack_require__(20), copyObject = __webpack_require__(21), customOmitClone = __webpack_require__(301), flatRest = __webpack_require__(153), getAllKeysIn = __webpack_require__(96); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** * The opposite of `_.pick`; this method creates an object composed of the * own and inherited enumerable property paths of `object` that are not omitted. * * **Note:** This method is considerably slower than `_.pick`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to omit. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ var omit = flatRest(function(object, paths) { var result = {}; if (object == null) { return result; } var isDeep = false; paths = arrayMap(paths, function(path) { path = castPath(path, object); isDeep || (isDeep = path.length > 1); return path; }); copyObject(object, getAllKeysIn(object), result); if (isDeep) { result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); } var length = paths.length; while (length--) { baseUnset(result, paths[length]); } return result; }); module.exports = omit; /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(9), root = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(172), mapCacheDelete = __webpack_require__(173), mapCacheGet = __webpack_require__(174), mapCacheHas = __webpack_require__(175), mapCacheSet = __webpack_require__(176); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /* 40 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(27), stackClear = __webpack_require__(189), stackDelete = __webpack_require__(190), stackGet = __webpack_require__(191), stackHas = __webpack_require__(192), stackSet = __webpack_require__(193); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(150); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /* 42 */ /***/ (function(module, exports, __webpack_require__) { var baseFor = __webpack_require__(130), keys = __webpack_require__(8); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } module.exports = baseForOwn; /***/ }), /* 43 */ /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(128), baseIsNaN = __webpack_require__(262), strictIndexOf = __webpack_require__(316); /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } module.exports = baseIndexOf; /***/ }), /* 44 */ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 45 */ /***/ (function(module, exports) { /** * Gets the argument placeholder value for `func`. * * @private * @param {Function} func The function to inspect. * @returns {*} Returns the placeholder value. */ function getHolder(func) { var object = func; return object.placeholder; } module.exports = getHolder; /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { var createFind = __webpack_require__(297), findIndex = __webpack_require__(196); /** * Iterates over elements of `collection`, returning the first element * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false }, * { 'user': 'pebbles', 'age': 1, 'active': true } * ]; * * _.find(users, function(o) { return o.age < 40; }); * // => object for 'barney' * * // The `_.matches` iteratee shorthand. * _.find(users, { 'age': 1, 'active': true }); * // => object for 'pebbles' * * // The `_.matchesProperty` iteratee shorthand. * _.find(users, ['active', false]); * // => object for 'fred' * * // The `_.property` iteratee shorthand. * _.find(users, 'active'); * // => object for 'barney' */ var find = createFind(findIndex); module.exports = find; /***/ }), /* 47 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(7), getPrototype = __webpack_require__(69), isObjectLike = __webpack_require__(6); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(7), isArray = __webpack_require__(1), isObjectLike = __webpack_require__(6); /** `Object#toString` result references. */ var stringTag = '[object String]'; /** * Checks if `value` is classified as a `String` primitive or object. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); * // => true * * _.isString(1); * // => false */ function isString(value) { return typeof value == 'string' || (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } module.exports = isString; /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(88), baseKeysIn = __webpack_require__(263), isArrayLike = __webpack_require__(10); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { var arrayReduce = __webpack_require__(89), baseEach = __webpack_require__(62), baseIteratee = __webpack_require__(12), baseReduce = __webpack_require__(272), isArray = __webpack_require__(1); /** * Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` * is not given, the first element of `collection` is used as the initial * value. The iteratee is invoked with four arguments: * (accumulator, value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.reduce`, `_.reduceRight`, and `_.transform`. * * The guarded methods are: * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, * and `sortBy` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. * @see _.reduceRight * @example * * _.reduce([1, 2], function(sum, n) { * return sum + n; * }, 0); * // => 3 * * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { * (result[value] || (result[value] = [])).push(key); * return result; * }, {}); * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) */ function reduce(collection, iteratee, accumulator) { var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); } module.exports = reduce; /***/ }), /* 52 */ /***/ (function(module, exports, __webpack_require__) { var toFinite = __webpack_require__(215); /** * Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); * // => 0 * * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { var result = toFinite(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; } module.exports = toInteger; /***/ }), /* 53 */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 54 */ /***/ (function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default if(!module.children) module.children = []; Object.defineProperty(module, "loaded", { enumerable: true, get: function() { return module.l; } }); Object.defineProperty(module, "id", { enumerable: true, get: function() { return module.i; } }); module.webpackPolyfill = 1; } return module; }; /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(120), Map = __webpack_require__(38), Promise = __webpack_require__(123), Set = __webpack_require__(124), WeakMap = __webpack_require__(84), baseGetTag = __webpack_require__(7), toSource = __webpack_require__(79); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { var baseHas = __webpack_require__(131), hasPath = __webpack_require__(97); /** * Checks if `path` is a direct property of `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = { 'a': { 'b': 2 } }; * var other = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.has(object, 'a'); * // => true * * _.has(object, 'a.b'); * // => true * * _.has(object, ['a', 'b']); * // => true * * _.has(other, 'a'); * // => false */ function has(object, path) { return object != null && hasPath(object, path, baseHas); } module.exports = has; /***/ }), /* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defer = undefined; var _isPlainObject2 = __webpack_require__(48); var _isPlainObject3 = _interopRequireDefault(_isPlainObject2); var _isEmpty2 = __webpack_require__(15); var _isEmpty3 = _interopRequireDefault(_isEmpty2); exports.shallowEqual = shallowEqual; exports.isSpecialClick = isSpecialClick; exports.capitalize = capitalize; exports.assertFacetDefined = assertFacetDefined; exports.getDisplayName = getDisplayName; exports.removeEmptyKey = removeEmptyKey; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js function shallowEqual(objA, objB) { if (objA === objB) { return true; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. var hasOwn = Object.prototype.hasOwnProperty; for (var i = 0; i < keysA.length; i++) { if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { return false; } } return true; } function isSpecialClick(event) { var isMiddleClick = event.button === 1; return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey); } function capitalize(key) { return key.length === 0 ? '' : '' + key[0].toUpperCase() + key.slice(1); } function assertFacetDefined(searchParameters, searchResults, facet) { var wasRequested = searchParameters.isConjunctiveFacet(facet) || searchParameters.isDisjunctiveFacet(facet); var wasReceived = Boolean(searchResults.getFacetByName(facet)); if (searchResults.nbHits > 0 && wasRequested && !wasReceived) { // eslint-disable-next-line no-console console.warn('A component requested values for facet "' + facet + '", but no facet ' + 'values were retrieved from the API. This means that you should add ' + ('the attribute "' + facet + '" to the list of attributes for faceting in ') + 'your index settings.'); } } function getDisplayName(Component) { return Component.displayName || Component.name || 'UnknownComponent'; } var resolved = Promise.resolve(); var defer = exports.defer = function defer(f) { resolved.then(f); }; function removeEmptyKey(obj) { Object.keys(obj).forEach(function (key) { var value = obj[key]; if ((0, _isEmpty3.default)(value) && (0, _isPlainObject3.default)(value)) { delete obj[key]; } else if ((0, _isPlainObject3.default)(value)) { removeEmptyKey(value); } }); return obj; } /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(39), setCacheAdd = __webpack_require__(184), setCacheHas = __webpack_require__(185); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /* 59 */ /***/ (function(module, exports) { /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } module.exports = apply; /***/ }), /* 60 */ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 61 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(5); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(42), createBaseEach = __webpack_require__(293); /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; /***/ }), /* 63 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(20), toKey = __webpack_require__(22); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(133), isObjectLike = __webpack_require__(6); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(14), arrayMap = __webpack_require__(11), isArray = __webpack_require__(1), isSymbol = __webpack_require__(26); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }), /* 66 */ /***/ (function(module, exports) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /* 67 */ /***/ (function(module, exports) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(61), isObject = __webpack_require__(5); /** * Creates a function that produces an instance of `Ctor` regardless of * whether it was invoked as part of a `new` expression or by `call` or `apply`. * * @private * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { case 0: return new Ctor; case 1: return new Ctor(args[0]); case 2: return new Ctor(args[0], args[1]); case 3: return new Ctor(args[0], args[1], args[2]); case 4: return new Ctor(args[0], args[1], args[2], args[3]); case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args); // Mimic the constructor's `return` behavior. // See https://es5.github.io/#x13.2.2 for more details. return isObject(result) ? result : thisBinding; }; } module.exports = createCtor; /***/ }), /* 69 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(78); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(86), stubArray = __webpack_require__(107); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(1), isSymbol = __webpack_require__(26); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(63); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(43), toInteger = __webpack_require__(52); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Gets the index at which the first occurrence of `value` is found in `array` * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the * offset from the end of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. * @example * * _.indexOf([1, 2, 1, 2], 2); * // => 1 * * // Search from the `fromIndex`. * _.indexOf([1, 2, 1, 2], 2, 2); * // => 3 */ function indexOf(array, value, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger(fromIndex); if (index < 0) { index = nativeMax(length + index, 0); } return baseIndexOf(array, value, index); } module.exports = indexOf; /***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(65); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { var isPrototype = __webpack_require__(36), nativeKeys = __webpack_require__(180); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(58), arraySome = __webpack_require__(126), cacheHas = __webpack_require__(66); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }), /* 77 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(53))) /***/ }), /* 78 */ /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /* 79 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var has = Object.prototype.hasOwnProperty; var hexTable = (function () { var array = []; for (var i = 0; i < 256; ++i) { array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } return array; }()); exports.arrayToObject = function (source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i]; } } return obj; }; exports.merge = function (target, source, options) { if (!source) { return target; } if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); } else if (typeof target === 'object') { target[source] = true; } else { return [target, source]; } return target; } if (typeof target !== 'object') { return [target].concat(source); } var mergeTarget = target; if (Array.isArray(target) && !Array.isArray(source)) { mergeTarget = exports.arrayToObject(target, options); } if (Array.isArray(target) && Array.isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { if (target[i] && typeof target[i] === 'object') { target[i] = exports.merge(target[i], item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function (acc, key) { var value = source[key]; if (Object.prototype.hasOwnProperty.call(acc, key)) { acc[key] = exports.merge(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; exports.decode = function (str) { try { return decodeURIComponent(str.replace(/\+/g, ' ')); } catch (e) { return str; } }; exports.encode = function (str) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } var string = typeof str === 'string' ? str : String(str); var out = ''; for (var i = 0; i < string.length; ++i) { var c = string.charCodeAt(i); if ( c === 0x2D || // - c === 0x2E || // . c === 0x5F || // _ c === 0x7E || // ~ (c >= 0x30 && c <= 0x39) || // 0-9 (c >= 0x41 && c <= 0x5A) || // a-z (c >= 0x61 && c <= 0x7A) // A-Z ) { out += string.charAt(i); continue; } if (c < 0x80) { out = out + hexTable[c]; continue; } if (c < 0x800) { out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; } return out; }; exports.compact = function (obj, references) { if (typeof obj !== 'object' || obj === null) { return obj; } var refs = references || []; var lookup = refs.indexOf(obj); if (lookup !== -1) { return refs[lookup]; } refs.push(obj); if (Array.isArray(obj)) { var compacted = []; for (var i = 0; i < obj.length; ++i) { if (obj[i] && typeof obj[i] === 'object') { compacted.push(exports.compact(obj[i], refs)); } else if (typeof obj[i] !== 'undefined') { compacted.push(obj[i]); } } return compacted; } var keys = Object.keys(obj); keys.forEach(function (key) { obj[key] = exports.compact(obj[key], refs); }); return obj; }; exports.isRegExp = function (obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; exports.isBuffer = function (obj) { if (obj === null || typeof obj === 'undefined') { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var keys = __webpack_require__(8); var intersection = __webpack_require__(327); var forOwn = __webpack_require__(325); var forEach = __webpack_require__(34); var filter = __webpack_require__(102); var map = __webpack_require__(16); var reduce = __webpack_require__(51); var omit = __webpack_require__(37); var indexOf = __webpack_require__(73); var isNaN = __webpack_require__(214); var isArray = __webpack_require__(1); var isEmpty = __webpack_require__(15); var isEqual = __webpack_require__(104); var isUndefined = __webpack_require__(201); var isString = __webpack_require__(49); var isFunction = __webpack_require__(18); var find = __webpack_require__(46); var trim = __webpack_require__(205); var defaults = __webpack_require__(101); var merge = __webpack_require__(105); var valToNumber = __webpack_require__(245); var filterState = __webpack_require__(241); var RefinementList = __webpack_require__(240); /** * like _.find but using _.isEqual to be able to use it * to find arrays. * @private * @param {any[]} array array to search into * @param {any} searchedValue the value we're looking for * @return {any} the searched value or undefined */ function findArray(array, searchedValue) { return find(array, function(currentValue) { return isEqual(currentValue, searchedValue); }); } /** * The facet list is the structure used to store the list of values used to * filter a single attribute. * @typedef {string[]} SearchParameters.FacetList */ /** * Structure to store numeric filters with the operator as the key. The supported operators * are `=`, `>`, `<`, `>=`, `<=` and `!=`. * @typedef {Object.<string, Array.<number|number[]>>} SearchParameters.OperatorList */ /** * SearchParameters is the data structure that contains all the information * usable for making a search to Algolia API. It doesn't do the search itself, * nor does it contains logic about the parameters. * It is an immutable object, therefore it has been created in a way that each * changes does not change the object itself but returns a copy with the * modification. * This object should probably not be instantiated outside of the helper. It will * be provided when needed. This object is documented for reference as you'll * get it from events generated by the {@link AlgoliaSearchHelper}. * If need be, instantiate the Helper from the factory function {@link SearchParameters.make} * @constructor * @classdesc contains all the parameters of a search * @param {object|SearchParameters} newParameters existing parameters or partial object * for the properties of a new SearchParameters * @see SearchParameters.make * @example <caption>SearchParameters of the first query in * <a href="http://demos.algolia.com/instant-search-demo/">the instant search demo</a></caption> { "query": "", "disjunctiveFacets": [ "customerReviewCount", "category", "salePrice_range", "manufacturer" ], "maxValuesPerFacet": 30, "page": 0, "hitsPerPage": 10, "facets": [ "type", "shipping" ] } */ function SearchParameters(newParameters) { var params = newParameters ? SearchParameters._parseNumbers(newParameters) : {}; /** * Targeted index. This parameter is mandatory. * @member {string} */ this.index = params.index || ''; // Query /** * Query string of the instant search. The empty string is a valid query. * @member {string} * @see https://www.algolia.com/doc/rest#param-query */ this.query = params.query || ''; // Facets /** * This attribute contains the list of all the conjunctive facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * @member {string[]} */ this.facets = params.facets || []; /** * This attribute contains the list of all the disjunctive facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * @member {string[]} */ this.disjunctiveFacets = params.disjunctiveFacets || []; /** * This attribute contains the list of all the hierarchical facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * Hierarchical facets are a sub type of disjunctive facets that * let you filter faceted attributes hierarchically. * @member {string[]|object[]} */ this.hierarchicalFacets = params.hierarchicalFacets || []; // Refinements /** * This attribute contains all the filters that need to be * applied on the conjunctive facets. Each facet must be properly * defined in the `facets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFiters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.facetsRefinements = params.facetsRefinements || {}; /** * This attribute contains all the filters that need to be * excluded from the conjunctive facets. Each facet must be properly * defined in the `facets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters excluded for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFiters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.facetsExcludes = params.facetsExcludes || {}; /** * This attribute contains all the filters that need to be * applied on the disjunctive facets. Each facet must be properly * defined in the `disjunctiveFacets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFiters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.disjunctiveFacetsRefinements = params.disjunctiveFacetsRefinements || {}; /** * This attribute contains all the filters that need to be * applied on the numeric attributes. * * The key is the name of the attribute, and the value is the * filters to apply to this attribute. * * When querying algolia, the values stored in this attribute will * be translated into the `numericFilters` attribute. * @member {Object.<string, SearchParameters.OperatorList>} */ this.numericRefinements = params.numericRefinements || {}; /** * This attribute contains all the tags used to refine the query. * * When querying algolia, the values stored in this attribute will * be translated into the `tagFilters` attribute. * @member {string[]} */ this.tagRefinements = params.tagRefinements || []; /** * This attribute contains all the filters that need to be * applied on the hierarchical facets. Each facet must be properly * defined in the `hierarchicalFacets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. The FacetList values * are structured as a string that contain the values for each level * seperated by the configured separator. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFiters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.hierarchicalFacetsRefinements = params.hierarchicalFacetsRefinements || {}; /** * Contains the numeric filters in the raw format of the Algolia API. Setting * this parameter is not compatible with the usage of numeric filters methods. * @see https://www.algolia.com/doc/javascript#numericFilters * @member {string} */ this.numericFilters = params.numericFilters; /** * Contains the tag filters in the raw format of the Algolia API. Setting this * parameter is not compatible with the of the add/remove/toggle methods of the * tag api. * @see https://www.algolia.com/doc/rest#param-tagFilters * @member {string} */ this.tagFilters = params.tagFilters; /** * Contains the optional tag filters in the raw format of the Algolia API. * @see https://www.algolia.com/doc/rest#param-tagFilters * @member {string} */ this.optionalTagFilters = params.optionalTagFilters; /** * Contains the optional facet filters in the raw format of the Algolia API. * @see https://www.algolia.com/doc/rest#param-tagFilters * @member {string} */ this.optionalFacetFilters = params.optionalFacetFilters; // Misc. parameters /** * Number of hits to be returned by the search API * @member {number} * @see https://www.algolia.com/doc/rest#param-hitsPerPage */ this.hitsPerPage = params.hitsPerPage; /** * Number of values for each facetted attribute * @member {number} * @see https://www.algolia.com/doc/rest#param-maxValuesPerFacet */ this.maxValuesPerFacet = params.maxValuesPerFacet; /** * The current page number * @member {number} * @see https://www.algolia.com/doc/rest#param-page */ this.page = params.page || 0; /** * How the query should be treated by the search engine. * Possible values: prefixAll, prefixLast, prefixNone * @see https://www.algolia.com/doc/rest#param-queryType * @member {string} */ this.queryType = params.queryType; /** * How the typo tolerance behave in the search engine. * Possible values: true, false, min, strict * @see https://www.algolia.com/doc/rest#param-typoTolerance * @member {string} */ this.typoTolerance = params.typoTolerance; /** * Number of characters to wait before doing one character replacement. * @see https://www.algolia.com/doc/rest#param-minWordSizefor1Typo * @member {number} */ this.minWordSizefor1Typo = params.minWordSizefor1Typo; /** * Number of characters to wait before doing a second character replacement. * @see https://www.algolia.com/doc/rest#param-minWordSizefor2Typos * @member {number} */ this.minWordSizefor2Typos = params.minWordSizefor2Typos; /** * Configure the precision of the proximity ranking criterion * @see https://www.algolia.com/doc/rest#param-minProximity */ this.minProximity = params.minProximity; /** * Should the engine allow typos on numerics. * @see https://www.algolia.com/doc/rest#param-allowTyposOnNumericTokens * @member {boolean} */ this.allowTyposOnNumericTokens = params.allowTyposOnNumericTokens; /** * Should the plurals be ignored * @see https://www.algolia.com/doc/rest#param-ignorePlurals * @member {boolean} */ this.ignorePlurals = params.ignorePlurals; /** * Restrict which attribute is searched. * @see https://www.algolia.com/doc/rest#param-restrictSearchableAttributes * @member {string} */ this.restrictSearchableAttributes = params.restrictSearchableAttributes; /** * Enable the advanced syntax. * @see https://www.algolia.com/doc/rest#param-advancedSyntax * @member {boolean} */ this.advancedSyntax = params.advancedSyntax; /** * Enable the analytics * @see https://www.algolia.com/doc/rest#param-analytics * @member {boolean} */ this.analytics = params.analytics; /** * Tag of the query in the analytics. * @see https://www.algolia.com/doc/rest#param-analyticsTags * @member {string} */ this.analyticsTags = params.analyticsTags; /** * Enable the synonyms * @see https://www.algolia.com/doc/rest#param-synonyms * @member {boolean} */ this.synonyms = params.synonyms; /** * Should the engine replace the synonyms in the highlighted results. * @see https://www.algolia.com/doc/rest#param-replaceSynonymsInHighlight * @member {boolean} */ this.replaceSynonymsInHighlight = params.replaceSynonymsInHighlight; /** * Add some optional words to those defined in the dashboard * @see https://www.algolia.com/doc/rest#param-optionalWords * @member {string} */ this.optionalWords = params.optionalWords; /** * Possible values are "lastWords" "firstWords" "allOptional" "none" (default) * @see https://www.algolia.com/doc/rest#param-removeWordsIfNoResults * @member {string} */ this.removeWordsIfNoResults = params.removeWordsIfNoResults; /** * List of attributes to retrieve * @see https://www.algolia.com/doc/rest#param-attributesToRetrieve * @member {string} */ this.attributesToRetrieve = params.attributesToRetrieve; /** * List of attributes to highlight * @see https://www.algolia.com/doc/rest#param-attributesToHighlight * @member {string} */ this.attributesToHighlight = params.attributesToHighlight; /** * Code to be embedded on the left part of the highlighted results * @see https://www.algolia.com/doc/rest#param-highlightPreTag * @member {string} */ this.highlightPreTag = params.highlightPreTag; /** * Code to be embedded on the right part of the highlighted results * @see https://www.algolia.com/doc/rest#param-highlightPostTag * @member {string} */ this.highlightPostTag = params.highlightPostTag; /** * List of attributes to snippet * @see https://www.algolia.com/doc/rest#param-attributesToSnippet * @member {string} */ this.attributesToSnippet = params.attributesToSnippet; /** * Enable the ranking informations in the response, set to 1 to activate * @see https://www.algolia.com/doc/rest#param-getRankingInfo * @member {number} */ this.getRankingInfo = params.getRankingInfo; /** * Remove duplicates based on the index setting attributeForDistinct * @see https://www.algolia.com/doc/rest#param-distinct * @member {boolean|number} */ this.distinct = params.distinct; /** * Center of the geo search. * @see https://www.algolia.com/doc/rest#param-aroundLatLng * @member {string} */ this.aroundLatLng = params.aroundLatLng; /** * Center of the search, retrieve from the user IP. * @see https://www.algolia.com/doc/rest#param-aroundLatLngViaIP * @member {boolean} */ this.aroundLatLngViaIP = params.aroundLatLngViaIP; /** * Radius of the geo search. * @see https://www.algolia.com/doc/rest#param-aroundRadius * @member {number} */ this.aroundRadius = params.aroundRadius; /** * Precision of the geo search. * @see https://www.algolia.com/doc/rest#param-aroundPrecision * @member {number} */ this.minimumAroundRadius = params.minimumAroundRadius; /** * Precision of the geo search. * @see https://www.algolia.com/doc/rest#param-minimumAroundRadius * @member {number} */ this.aroundPrecision = params.aroundPrecision; /** * Geo search inside a box. * @see https://www.algolia.com/doc/rest#param-insideBoundingBox * @member {string} */ this.insideBoundingBox = params.insideBoundingBox; /** * Geo search inside a polygon. * @see https://www.algolia.com/doc/rest#param-insidePolygon * @member {string} */ this.insidePolygon = params.insidePolygon; /** * Allows to specify an ellipsis character for the snippet when we truncate the text * (added before and after if truncated). * The default value is an empty string and we recommend to set it to "…" * @see https://www.algolia.com/doc/rest#param-insidePolygon * @member {string} */ this.snippetEllipsisText = params.snippetEllipsisText; /** * Allows to specify some attributes name on which exact won't be applied. * Attributes are separated with a comma (for example "name,address" ), you can also use a * JSON string array encoding (for example encodeURIComponent('["name","address"]') ). * By default the list is empty. * @see https://www.algolia.com/doc/rest#param-disableExactOnAttributes * @member {string|string[]} */ this.disableExactOnAttributes = params.disableExactOnAttributes; /** * Applies 'exact' on single word queries if the word contains at least 3 characters * and is not a stop word. * Can take two values: true or false. * By default, its set to false. * @see https://www.algolia.com/doc/rest#param-enableExactOnSingleWordQuery * @member {boolean} */ this.enableExactOnSingleWordQuery = params.enableExactOnSingleWordQuery; // Undocumented parameters, still needed otherwise we fail this.offset = params.offset; this.length = params.length; var self = this; forOwn(params, function checkForUnknownParameter(paramValue, paramName) { if (SearchParameters.PARAMETERS.indexOf(paramName) === -1) { self[paramName] = paramValue; } }); } /** * List all the properties in SearchParameters and therefore all the known Algolia properties * This doesn't contain any beta/hidden features. * @private */ SearchParameters.PARAMETERS = keys(new SearchParameters()); /** * @private * @param {object} partialState full or part of a state * @return {object} a new object with the number keys as number */ SearchParameters._parseNumbers = function(partialState) { // Do not reparse numbers in SearchParameters, they ought to be parsed already if (partialState instanceof SearchParameters) return partialState; var numbers = {}; var numberKeys = [ 'aroundPrecision', 'aroundRadius', 'getRankingInfo', 'minWordSizefor2Typos', 'minWordSizefor1Typo', 'page', 'maxValuesPerFacet', 'distinct', 'minimumAroundRadius', 'hitsPerPage', 'minProximity' ]; forEach(numberKeys, function(k) { var value = partialState[k]; if (isString(value)) { var parsedValue = parseFloat(value); numbers[k] = isNaN(parsedValue) ? value : parsedValue; } }); if (partialState.numericRefinements) { var numericRefinements = {}; forEach(partialState.numericRefinements, function(operators, attribute) { numericRefinements[attribute] = {}; forEach(operators, function(values, operator) { var parsedValues = map(values, function(v) { if (isArray(v)) { return map(v, function(vPrime) { if (isString(vPrime)) { return parseFloat(vPrime); } return vPrime; }); } else if (isString(v)) { return parseFloat(v); } return v; }); numericRefinements[attribute][operator] = parsedValues; }); }); numbers.numericRefinements = numericRefinements; } return merge({}, partialState, numbers); }; /** * Factory for SearchParameters * @param {object|SearchParameters} newParameters existing parameters or partial * object for the properties of a new SearchParameters * @return {SearchParameters} frozen instance of SearchParameters */ SearchParameters.make = function makeSearchParameters(newParameters) { var instance = new SearchParameters(newParameters); forEach(newParameters.hierarchicalFacets, function(facet) { if (facet.rootPath) { var currentRefinement = instance.getHierarchicalRefinement(facet.name); if (currentRefinement.length > 0 && currentRefinement[0].indexOf(facet.rootPath) !== 0) { instance = instance.clearRefinements(facet.name); } // get it again in case it has been cleared currentRefinement = instance.getHierarchicalRefinement(facet.name); if (currentRefinement.length === 0) { instance = instance.toggleHierarchicalFacetRefinement(facet.name, facet.rootPath); } } }); return instance; }; /** * Validates the new parameters based on the previous state * @param {SearchParameters} currentState the current state * @param {object|SearchParameters} parameters the new parameters to set * @return {Error|null} Error if the modification is invalid, null otherwise */ SearchParameters.validate = function(currentState, parameters) { var params = parameters || {}; if (currentState.tagFilters && params.tagRefinements && params.tagRefinements.length > 0) { return new Error( '[Tags] Cannot switch from the managed tag API to the advanced API. It is probably ' + 'an error, if it is really what you want, you should first clear the tags with clearTags method.'); } if (currentState.tagRefinements.length > 0 && params.tagFilters) { return new Error( '[Tags] Cannot switch from the advanced tag API to the managed API. It is probably ' + 'an error, if it is not, you should first clear the tags with clearTags method.'); } if (currentState.numericFilters && params.numericRefinements && !isEmpty(params.numericRefinements)) { return new Error( "[Numeric filters] Can't switch from the advanced to the managed API. It" + ' is probably an error, if this is really what you want, you have to first' + ' clear the numeric filters.'); } if (!isEmpty(currentState.numericRefinements) && params.numericFilters) { return new Error( "[Numeric filters] Can't switch from the managed API to the advanced. It" + ' is probably an error, if this is really what you want, you have to first' + ' clear the numeric filters.'); } return null; }; SearchParameters.prototype = { constructor: SearchParameters, /** * Remove all refinements (disjunctive + conjunctive + excludes + numeric filters) * @method * @param {undefined|string|SearchParameters.clearCallback} [attribute] optionnal string or function * - If not given, means to clear all the filters. * - If `string`, means to clear all refinements for the `attribute` named filter. * - If `function`, means to clear all the refinements that return truthy values. * @return {SearchParameters} */ clearRefinements: function clearRefinements(attribute) { var clear = RefinementList.clearRefinement; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(attribute), facetsRefinements: clear(this.facetsRefinements, attribute, 'conjunctiveFacet'), facetsExcludes: clear(this.facetsExcludes, attribute, 'exclude'), disjunctiveFacetsRefinements: clear(this.disjunctiveFacetsRefinements, attribute, 'disjunctiveFacet'), hierarchicalFacetsRefinements: clear(this.hierarchicalFacetsRefinements, attribute, 'hierarchicalFacet') }); }, /** * Remove all the refined tags from the SearchParameters * @method * @return {SearchParameters} */ clearTags: function clearTags() { if (this.tagFilters === undefined && this.tagRefinements.length === 0) return this; return this.setQueryParameters({ tagFilters: undefined, tagRefinements: [] }); }, /** * Set the index. * @method * @param {string} index the index name * @return {SearchParameters} */ setIndex: function setIndex(index) { if (index === this.index) return this; return this.setQueryParameters({ index: index }); }, /** * Query setter * @method * @param {string} newQuery value for the new query * @return {SearchParameters} */ setQuery: function setQuery(newQuery) { if (newQuery === this.query) return this; return this.setQueryParameters({ query: newQuery }); }, /** * Page setter * @method * @param {number} newPage new page number * @return {SearchParameters} */ setPage: function setPage(newPage) { if (newPage === this.page) return this; return this.setQueryParameters({ page: newPage }); }, /** * Facets setter * The facets are the simple facets, used for conjunctive (and) facetting. * @method * @param {string[]} facets all the attributes of the algolia records used for conjunctive facetting * @return {SearchParameters} */ setFacets: function setFacets(facets) { return this.setQueryParameters({ facets: facets }); }, /** * Disjunctive facets setter * Change the list of disjunctive (or) facets the helper chan handle. * @method * @param {string[]} facets all the attributes of the algolia records used for disjunctive facetting * @return {SearchParameters} */ setDisjunctiveFacets: function setDisjunctiveFacets(facets) { return this.setQueryParameters({ disjunctiveFacets: facets }); }, /** * HitsPerPage setter * Hits per page represents the number of hits retrieved for this query * @method * @param {number} n number of hits retrieved per page of results * @return {SearchParameters} */ setHitsPerPage: function setHitsPerPage(n) { if (this.hitsPerPage === n) return this; return this.setQueryParameters({ hitsPerPage: n }); }, /** * typoTolerance setter * Set the value of typoTolerance * @method * @param {string} typoTolerance new value of typoTolerance ("true", "false", "min" or "strict") * @return {SearchParameters} */ setTypoTolerance: function setTypoTolerance(typoTolerance) { if (this.typoTolerance === typoTolerance) return this; return this.setQueryParameters({ typoTolerance: typoTolerance }); }, /** * Add a numeric filter for a given attribute * When value is an array, they are combined with OR * When value is a single value, it will combined with AND * @method * @param {string} attribute attribute to set the filter on * @param {string} operator operator of the filter (possible values: =, >, >=, <, <=, !=) * @param {number | number[]} value value of the filter * @return {SearchParameters} * @example * // for price = 50 or 40 * searchparameter.addNumericRefinement('price', '=', [50, 40]); * @example * // for size = 38 and 40 * searchparameter.addNumericRefinement('size', '=', 38); * searchparameter.addNumericRefinement('size', '=', 40); */ addNumericRefinement: function(attribute, operator, v) { var value = valToNumber(v); if (this.isNumericRefined(attribute, operator, value)) return this; var mod = merge({}, this.numericRefinements); mod[attribute] = merge({}, mod[attribute]); if (mod[attribute][operator]) { // Array copy mod[attribute][operator] = mod[attribute][operator].slice(); // Add the element. Concat can't be used here because value can be an array. mod[attribute][operator].push(value); } else { mod[attribute][operator] = [value]; } return this.setQueryParameters({ numericRefinements: mod }); }, /** * Get the list of conjunctive refinements for a single facet * @param {string} facetName name of the attribute used for facetting * @return {string[]} list of refinements */ getConjunctiveRefinements: function(facetName) { if (!this.isConjunctiveFacet(facetName)) { throw new Error(facetName + ' is not defined in the facets attribute of the helper configuration'); } return this.facetsRefinements[facetName] || []; }, /** * Get the list of disjunctive refinements for a single facet * @param {string} facetName name of the attribute used for facetting * @return {string[]} list of refinements */ getDisjunctiveRefinements: function(facetName) { if (!this.isDisjunctiveFacet(facetName)) { throw new Error( facetName + ' is not defined in the disjunctiveFacets attribute of the helper configuration' ); } return this.disjunctiveFacetsRefinements[facetName] || []; }, /** * Get the list of hierarchical refinements for a single facet * @param {string} facetName name of the attribute used for facetting * @return {string[]} list of refinements */ getHierarchicalRefinement: function(facetName) { // we send an array but we currently do not support multiple // hierarchicalRefinements for a hierarchicalFacet return this.hierarchicalFacetsRefinements[facetName] || []; }, /** * Get the list of exclude refinements for a single facet * @param {string} facetName name of the attribute used for facetting * @return {string[]} list of refinements */ getExcludeRefinements: function(facetName) { if (!this.isConjunctiveFacet(facetName)) { throw new Error(facetName + ' is not defined in the facets attribute of the helper configuration'); } return this.facetsExcludes[facetName] || []; }, /** * Remove all the numeric filter for a given (attribute, operator) * @method * @param {string} attribute attribute to set the filter on * @param {string} [operator] operator of the filter (possible values: =, >, >=, <, <=, !=) * @param {number} [number] the value to be removed * @return {SearchParameters} */ removeNumericRefinement: function(attribute, operator, paramValue) { if (paramValue !== undefined) { var paramValueAsNumber = valToNumber(paramValue); if (!this.isNumericRefined(attribute, operator, paramValueAsNumber)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute && value.op === operator && isEqual(value.val, paramValueAsNumber); }) }); } else if (operator !== undefined) { if (!this.isNumericRefined(attribute, operator)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute && value.op === operator; }) }); } if (!this.isNumericRefined(attribute)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute; }) }); }, /** * Get the list of numeric refinements for a single facet * @param {string} facetName name of the attribute used for facetting * @return {SearchParameters.OperatorList[]} list of refinements */ getNumericRefinements: function(facetName) { return this.numericRefinements[facetName] || {}; }, /** * Return the current refinement for the (attribute, operator) * @param {string} attribute of the record * @param {string} operator applied * @return {number} value of the refinement */ getNumericRefinement: function(attribute, operator) { return this.numericRefinements[attribute] && this.numericRefinements[attribute][operator]; }, /** * Clear numeric filters. * @method * @private * @param {string|SearchParameters.clearCallback} [attribute] optionnal string or function * - If not given, means to clear all the filters. * - If `string`, means to clear all refinements for the `attribute` named filter. * - If `function`, means to clear all the refinements that return truthy values. * @return {Object.<string, OperatorList>} */ _clearNumericRefinements: function _clearNumericRefinements(attribute) { if (isUndefined(attribute)) { return {}; } else if (isString(attribute)) { return omit(this.numericRefinements, attribute); } else if (isFunction(attribute)) { return reduce(this.numericRefinements, function(memo, operators, key) { var operatorList = {}; forEach(operators, function(values, operator) { var outValues = []; forEach(values, function(value) { var predicateResult = attribute({val: value, op: operator}, key, 'numeric'); if (!predicateResult) outValues.push(value); }); if (!isEmpty(outValues)) operatorList[operator] = outValues; }); if (!isEmpty(operatorList)) memo[key] = operatorList; return memo; }, {}); } }, /** * Add a facet to the facets attribute of the helper configuration, if it * isn't already present. * @method * @param {string} facet facet name to add * @return {SearchParameters} */ addFacet: function addFacet(facet) { if (this.isConjunctiveFacet(facet)) { return this; } return this.setQueryParameters({ facets: this.facets.concat([facet]) }); }, /** * Add a disjunctive facet to the disjunctiveFacets attribute of the helper * configuration, if it isn't already present. * @method * @param {string} facet disjunctive facet name to add * @return {SearchParameters} */ addDisjunctiveFacet: function addDisjunctiveFacet(facet) { if (this.isDisjunctiveFacet(facet)) { return this; } return this.setQueryParameters({ disjunctiveFacets: this.disjunctiveFacets.concat([facet]) }); }, /** * Add a hierarchical facet to the hierarchicalFacets attribute of the helper * configuration. * @method * @param {object} hierarchicalFacet hierarchical facet to add * @return {SearchParameters} * @throws will throw an error if a hierarchical facet with the same name was already declared */ addHierarchicalFacet: function addHierarchicalFacet(hierarchicalFacet) { if (this.isHierarchicalFacet(hierarchicalFacet.name)) { throw new Error( 'Cannot declare two hierarchical facets with the same name: `' + hierarchicalFacet.name + '`'); } return this.setQueryParameters({ hierarchicalFacets: this.hierarchicalFacets.concat([hierarchicalFacet]) }); }, /** * Add a refinement on a "normal" facet * @method * @param {string} facet attribute to apply the facetting on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addFacetRefinement: function addFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this; return this.setQueryParameters({ facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value) }); }, /** * Exclude a value from a "normal" facet * @method * @param {string} facet attribute to apply the exclusion on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addExcludeRefinement: function addExcludeRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this; return this.setQueryParameters({ facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value) }); }, /** * Adds a refinement on a disjunctive facet. * @method * @param {string} facet attribute to apply the facetting on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addDisjunctiveFacetRefinement: function addDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this; return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.addRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * addTagRefinement adds a tag to the list used to filter the results * @param {string} tag tag to be added * @return {SearchParameters} */ addTagRefinement: function addTagRefinement(tag) { if (this.isTagRefined(tag)) return this; var modification = { tagRefinements: this.tagRefinements.concat(tag) }; return this.setQueryParameters(modification); }, /** * Remove a facet from the facets attribute of the helper configuration, if it * is present. * @method * @param {string} facet facet name to remove * @return {SearchParameters} */ removeFacet: function removeFacet(facet) { if (!this.isConjunctiveFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ facets: filter(this.facets, function(f) { return f !== facet; }) }); }, /** * Remove a disjunctive facet from the disjunctiveFacets attribute of the * helper configuration, if it is present. * @method * @param {string} facet disjunctive facet name to remove * @return {SearchParameters} */ removeDisjunctiveFacet: function removeDisjunctiveFacet(facet) { if (!this.isDisjunctiveFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ disjunctiveFacets: filter(this.disjunctiveFacets, function(f) { return f !== facet; }) }); }, /** * Remove a hierarchical facet from the hierarchicalFacets attribute of the * helper configuration, if it is present. * @method * @param {string} facet hierarchical facet name to remove * @return {SearchParameters} */ removeHierarchicalFacet: function removeHierarchicalFacet(facet) { if (!this.isHierarchicalFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ hierarchicalFacets: filter(this.hierarchicalFacets, function(f) { return f.name !== facet; }) }); }, /** * Remove a refinement set on facet. If a value is provided, it will clear the * refinement for the given value, otherwise it will clear all the refinement * values for the facetted attribute. * @method * @param {string} facet name of the attribute used for facetting * @param {string} [value] value used to filter * @return {SearchParameters} */ removeFacetRefinement: function removeFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this; return this.setQueryParameters({ facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value) }); }, /** * Remove a negative refinement on a facet * @method * @param {string} facet name of the attribute used for facetting * @param {string} value value used to filter * @return {SearchParameters} */ removeExcludeRefinement: function removeExcludeRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this; return this.setQueryParameters({ facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value) }); }, /** * Remove a refinement on a disjunctive facet * @method * @param {string} facet name of the attribute used for facetting * @param {string} value value used to filter * @return {SearchParameters} */ removeDisjunctiveFacetRefinement: function removeDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this; return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.removeRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * Remove a tag from the list of tag refinements * @method * @param {string} tag the tag to remove * @return {SearchParameters} */ removeTagRefinement: function removeTagRefinement(tag) { if (!this.isTagRefined(tag)) return this; var modification = { tagRefinements: filter(this.tagRefinements, function(t) { return t !== tag; }) }; return this.setQueryParameters(modification); }, /** * Generic toggle refinement method to use with facet, disjunctive facets * and hierarchical facets * @param {string} facet the facet to refine * @param {string} value the associated value * @return {SearchParameters} * @throws will throw an error if the facet is not declared in the settings of the helper * @deprecated since version 2.19.0, see {@link SearchParameters#toggleFacetRefinement} */ toggleRefinement: function toggleRefinement(facet, value) { return this.toggleFacetRefinement(facet, value); }, /** * Generic toggle refinement method to use with facet, disjunctive facets * and hierarchical facets * @param {string} facet the facet to refine * @param {string} value the associated value * @return {SearchParameters} * @throws will throw an error if the facet is not declared in the settings of the helper */ toggleFacetRefinement: function toggleFacetRefinement(facet, value) { if (this.isHierarchicalFacet(facet)) { return this.toggleHierarchicalFacetRefinement(facet, value); } else if (this.isConjunctiveFacet(facet)) { return this.toggleConjunctiveFacetRefinement(facet, value); } else if (this.isDisjunctiveFacet(facet)) { return this.toggleDisjunctiveFacetRefinement(facet, value); } throw new Error('Cannot refine the undeclared facet ' + facet + '; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets'); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for facetting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleConjunctiveFacetRefinement: function toggleConjunctiveFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return this.setQueryParameters({ facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for facetting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleExcludeFacetRefinement: function toggleExcludeFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return this.setQueryParameters({ facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for facetting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleDisjunctiveFacetRefinement: function toggleDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.toggleRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for facetting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleHierarchicalFacetRefinement: function toggleHierarchicalFacetRefinement(facet, value) { if (!this.isHierarchicalFacet(facet)) { throw new Error( facet + ' is not defined in the hierarchicalFacets attribute of the helper configuration'); } var separator = this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(facet)); var mod = {}; var upOneOrMultipleLevel = this.hierarchicalFacetsRefinements[facet] !== undefined && this.hierarchicalFacetsRefinements[facet].length > 0 && ( // remove current refinement: // refinement was 'beer > IPA', call is toggleRefine('beer > IPA'), refinement should be `beer` this.hierarchicalFacetsRefinements[facet][0] === value || // remove a parent refinement of the current refinement: // - refinement was 'beer > IPA > Flying dog' // - call is toggleRefine('beer > IPA') // - refinement should be `beer` this.hierarchicalFacetsRefinements[facet][0].indexOf(value + separator) === 0 ); if (upOneOrMultipleLevel) { if (value.indexOf(separator) === -1) { // go back to root level mod[facet] = []; } else { mod[facet] = [value.slice(0, value.lastIndexOf(separator))]; } } else { mod[facet] = [value]; } return this.setQueryParameters({ hierarchicalFacetsRefinements: defaults({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Adds a refinement on a hierarchical facet. * @param {string} facet the facet name * @param {string} path the hierarchical facet path * @return {SearchParameter} the new state * @throws Error if the facet is not defined or if the facet is refined */ addHierarchicalFacetRefinement: function(facet, path) { if (this.isHierarchicalFacetRefined(facet)) { throw new Error(facet + ' is already refined.'); } var mod = {}; mod[facet] = [path]; return this.setQueryParameters({ hierarchicalFacetsRefinements: defaults({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Removes the refinement set on a hierarchical facet. * @param {string} facet the facet name * @return {SearchParameter} the new state * @throws Error if the facet is not defined or if the facet is not refined */ removeHierarchicalFacetRefinement: function(facet) { if (!this.isHierarchicalFacetRefined(facet)) { throw new Error(facet + ' is not refined.'); } var mod = {}; mod[facet] = []; return this.setQueryParameters({ hierarchicalFacetsRefinements: defaults({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Switch the tag refinement * @method * @param {string} tag the tag to remove or add * @return {SearchParameters} */ toggleTagRefinement: function toggleTagRefinement(tag) { if (this.isTagRefined(tag)) { return this.removeTagRefinement(tag); } return this.addTagRefinement(tag); }, /** * Test if the facet name is from one of the disjunctive facets * @method * @param {string} facet facet name to test * @return {boolean} */ isDisjunctiveFacet: function(facet) { return indexOf(this.disjunctiveFacets, facet) > -1; }, /** * Test if the facet name is from one of the hierarchical facets * @method * @param {string} facetName facet name to test * @return {boolean} */ isHierarchicalFacet: function(facetName) { return this.getHierarchicalFacetByName(facetName) !== undefined; }, /** * Test if the facet name is from one of the conjunctive/normal facets * @method * @param {string} facet facet name to test * @return {boolean} */ isConjunctiveFacet: function(facet) { return indexOf(this.facets, facet) > -1; }, /** * Returns true if the facet is refined, either for a specific value or in * general. * @method * @param {string} facet name of the attribute for used for facetting * @param {string} value, optionnal value. If passed will test that this value * is filtering the given facet. * @return {boolean} returns true if refined */ isFacetRefined: function isFacetRefined(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return RefinementList.isRefined(this.facetsRefinements, facet, value); }, /** * Returns true if the facet contains exclusions or if a specific value is * excluded. * * @method * @param {string} facet name of the attribute for used for facetting * @param {string} [value] optionnal value. If passed will test that this value * is filtering the given facet. * @return {boolean} returns true if refined */ isExcludeRefined: function isExcludeRefined(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return RefinementList.isRefined(this.facetsExcludes, facet, value); }, /** * Returns true if the facet contains a refinement, or if a value passed is a * refinement for the facet. * @method * @param {string} facet name of the attribute for used for facetting * @param {string} value optionnal, will test if the value is used for refinement * if there is one, otherwise will test if the facet contains any refinement * @return {boolean} */ isDisjunctiveFacetRefined: function isDisjunctiveFacetRefined(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value); }, /** * Returns true if the facet contains a refinement, or if a value passed is a * refinement for the facet. * @method * @param {string} facet name of the attribute for used for facetting * @param {string} value optionnal, will test if the value is used for refinement * if there is one, otherwise will test if the facet contains any refinement * @return {boolean} */ isHierarchicalFacetRefined: function isHierarchicalFacetRefined(facet, value) { if (!this.isHierarchicalFacet(facet)) { throw new Error( facet + ' is not defined in the hierarchicalFacets attribute of the helper configuration'); } var refinements = this.getHierarchicalRefinement(facet); if (!value) { return refinements.length > 0; } return indexOf(refinements, value) !== -1; }, /** * Test if the triple (attribute, operator, value) is already refined. * If only the attribute and the operator are provided, it tests if the * contains any refinement value. * @method * @param {string} attribute attribute for which the refinement is applied * @param {string} [operator] operator of the refinement * @param {string} [value] value of the refinement * @return {boolean} true if it is refined */ isNumericRefined: function isNumericRefined(attribute, operator, value) { if (isUndefined(value) && isUndefined(operator)) { return !!this.numericRefinements[attribute]; } var isOperatorDefined = this.numericRefinements[attribute] && !isUndefined(this.numericRefinements[attribute][operator]); if (isUndefined(value) || !isOperatorDefined) { return isOperatorDefined; } var parsedValue = valToNumber(value); var isAttributeValueDefined = !isUndefined( findArray(this.numericRefinements[attribute][operator], parsedValue) ); return isOperatorDefined && isAttributeValueDefined; }, /** * Returns true if the tag refined, false otherwise * @method * @param {string} tag the tag to check * @return {boolean} */ isTagRefined: function isTagRefined(tag) { return indexOf(this.tagRefinements, tag) !== -1; }, /** * Returns the list of all disjunctive facets refined * @method * @param {string} facet name of the attribute used for facetting * @param {value} value value used for filtering * @return {string[]} */ getRefinedDisjunctiveFacets: function getRefinedDisjunctiveFacets() { // attributes used for numeric filter can also be disjunctive var disjunctiveNumericRefinedFacets = intersection( keys(this.numericRefinements), this.disjunctiveFacets ); return keys(this.disjunctiveFacetsRefinements) .concat(disjunctiveNumericRefinedFacets) .concat(this.getRefinedHierarchicalFacets()); }, /** * Returns the list of all disjunctive facets refined * @method * @param {string} facet name of the attribute used for facetting * @param {value} value value used for filtering * @return {string[]} */ getRefinedHierarchicalFacets: function getRefinedHierarchicalFacets() { return intersection( // enforce the order between the two arrays, // so that refinement name index === hierarchical facet index map(this.hierarchicalFacets, 'name'), keys(this.hierarchicalFacetsRefinements) ); }, /** * Returned the list of all disjunctive facets not refined * @method * @return {string[]} */ getUnrefinedDisjunctiveFacets: function() { var refinedFacets = this.getRefinedDisjunctiveFacets(); return filter(this.disjunctiveFacets, function(f) { return indexOf(refinedFacets, f) === -1; }); }, managedParameters: [ 'index', 'facets', 'disjunctiveFacets', 'facetsRefinements', 'facetsExcludes', 'disjunctiveFacetsRefinements', 'numericRefinements', 'tagRefinements', 'hierarchicalFacets', 'hierarchicalFacetsRefinements' ], getQueryParams: function getQueryParams() { var managedParameters = this.managedParameters; var queryParams = {}; forOwn(this, function(paramValue, paramName) { if (indexOf(managedParameters, paramName) === -1 && paramValue !== undefined) { queryParams[paramName] = paramValue; } }); return queryParams; }, /** * Let the user retrieve any parameter value from the SearchParameters * @param {string} paramName name of the parameter * @return {any} the value of the parameter */ getQueryParameter: function getQueryParameter(paramName) { if (!this.hasOwnProperty(paramName)) { throw new Error( "Parameter '" + paramName + "' is not an attribute of SearchParameters " + '(http://algolia.github.io/algoliasearch-helper-js/docs/SearchParameters.html)'); } return this[paramName]; }, /** * Let the user set a specific value for a given parameter. Will return the * same instance if the parameter is invalid or if the value is the same as the * previous one. * @method * @param {string} parameter the parameter name * @param {any} value the value to be set, must be compliant with the definition * of the attribute on the object * @return {SearchParameters} the updated state */ setQueryParameter: function setParameter(parameter, value) { if (this[parameter] === value) return this; var modification = {}; modification[parameter] = value; return this.setQueryParameters(modification); }, /** * Let the user set any of the parameters with a plain object. * @method * @param {object} params all the keys and the values to be updated * @return {SearchParameters} a new updated instance */ setQueryParameters: function setQueryParameters(params) { if (!params) return this; var error = SearchParameters.validate(this, params); if (error) { throw error; } var parsedParams = SearchParameters._parseNumbers(params); return this.mutateMe(function mergeWith(newInstance) { var ks = keys(params); forEach(ks, function(k) { newInstance[k] = parsedParams[k]; }); return newInstance; }); }, /** * Returns an object with only the selected attributes. * @param {string[]} filters filters to retrieve only a subset of the state. It * accepts strings that can be either attributes of the SearchParameters (e.g. hitsPerPage) * or attributes of the index with the notation 'attribute:nameOfMyAttribute' * @return {object} */ filter: function(filters) { return filterState(this, filters); }, /** * Helper function to make it easier to build new instances from a mutating * function * @private * @param {function} fn newMutableState -> previousState -> () function that will * change the value of the newMutable to the desired state * @return {SearchParameters} a new instance with the specified modifications applied */ mutateMe: function mutateMe(fn) { var newState = new this.constructor(this); fn(newState, this); return newState; }, /** * Helper function to get the hierarchicalFacet separator or the default one (`>`) * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.separator or `>` as default */ _getHierarchicalFacetSortBy: function(hierarchicalFacet) { return hierarchicalFacet.sortBy || ['isRefined:desc', 'name:asc']; }, /** * Helper function to get the hierarchicalFacet separator or the default one (`>`) * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.separator or `>` as default */ _getHierarchicalFacetSeparator: function(hierarchicalFacet) { return hierarchicalFacet.separator || ' > '; }, /** * Helper function to get the hierarchicalFacet prefix path or null * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.rootPath or null as default */ _getHierarchicalRootPath: function(hierarchicalFacet) { return hierarchicalFacet.rootPath || null; }, /** * Helper function to check if we show the parent level of the hierarchicalFacet * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.showParentLevel or true as default */ _getHierarchicalShowParentLevel: function(hierarchicalFacet) { if (typeof hierarchicalFacet.showParentLevel === 'boolean') { return hierarchicalFacet.showParentLevel; } return true; }, /** * Helper function to get the hierarchicalFacet by it's name * @param {string} hierarchicalFacetName * @return {object} a hierarchicalFacet */ getHierarchicalFacetByName: function(hierarchicalFacetName) { return find( this.hierarchicalFacets, {name: hierarchicalFacetName} ); }, /** * Get the current breadcrumb for a hierarchical facet, as an array * @param {string} facetName Hierarchical facet name * @return {array.<string>} the path as an array of string */ getHierarchicalFacetBreadcrumb: function(facetName) { if (!this.isHierarchicalFacet(facetName)) { throw new Error( 'Cannot get the breadcrumb of an unknown hierarchical facet: `' + facetName + '`'); } var refinement = this.getHierarchicalRefinement(facetName)[0]; if (!refinement) return []; var separator = this._getHierarchicalFacetSeparator( this.getHierarchicalFacetByName(facetName) ); var path = refinement.split(separator); return map(path, trim); } }; /** * Callback used for clearRefinement method * @callback SearchParameters.clearCallback * @param {OperatorList|FacetList} value the value of the filter * @param {string} key the current attribute name * @param {string} type `numeric`, `disjunctiveFacet`, `conjunctiveFacet`, `hierarchicalFacet` or `exclude` * depending on the type of facet * @return {boolean} `true` if the element should be removed. `false` otherwise. */ module.exports = SearchParameters; /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(61), baseLodash = __webpack_require__(92); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; /** * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. * * @private * @constructor * @param {*} value The value to wrap. */ function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } // Ensure `LazyWrapper` is an instance of `baseLodash`. LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; module.exports = LazyWrapper; /***/ }), /* 83 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(3); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(9), root = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /* 85 */ /***/ (function(module, exports) { /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayEach; /***/ }), /* 86 */ /***/ (function(module, exports) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /* 87 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(43); /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__(140), isArguments = __webpack_require__(24), isArray = __webpack_require__(1), isBuffer = __webpack_require__(25), isIndex = __webpack_require__(30), isTypedArray = __webpack_require__(35); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /* 89 */ /***/ (function(module, exports) { /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } module.exports = arrayReduce; /***/ }), /* 90 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(41), eq = __webpack_require__(17); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /* 91 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(60), isArray = __webpack_require__(1); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /* 92 */ /***/ (function(module, exports) { /** * The function whose prototype chain sequence wrappers inherit from. * * @private */ function baseLodash() { // No operation performed. } module.exports = baseLodash; /***/ }), /* 93 */ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(83); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 94 */ /***/ (function(module, exports, __webpack_require__) { var baseSetData = __webpack_require__(138), createBind = __webpack_require__(295), createCurry = __webpack_require__(296), createHybrid = __webpack_require__(148), createPartial = __webpack_require__(299), getData = __webpack_require__(154), mergeData = __webpack_require__(311), setData = __webpack_require__(186), setWrapToString = __webpack_require__(187), toInteger = __webpack_require__(52); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Creates a function that either curries or invokes `func` with optional * `this` binding and partially applied arguments. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. * 1 - `_.bind` * 2 - `_.bindKey` * 4 - `_.curry` or `_.curryRight` of a bound function * 8 - `_.curry` * 16 - `_.curryRight` * 32 - `_.partial` * 64 - `_.partialRight` * 128 - `_.rearg` * 256 - `_.ary` * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } var length = partials ? partials.length : 0; if (!length) { bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); partials = holders = undefined; } ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); arity = arity === undefined ? arity : toInteger(arity); length -= holders ? holders.length : 0; if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; partials = holders = undefined; } var data = isBindKey ? undefined : getData(func); var newData = [ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity ]; if (data) { mergeData(newData, data); } func = newData[0]; bitmask = newData[1]; thisArg = newData[2]; partials = newData[3]; holders = newData[4]; arity = newData[9] = newData[9] === undefined ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == WRAP_BIND_FLAG) { var result = createBind(func, bitmask, thisArg); } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { result = createCurry(func, bitmask, arity); } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { result = createPartial(func, bitmask, thisArg, partials); } else { result = createHybrid.apply(undefined, newData); } var setter = data ? baseSetData : setData; return setWrapToString(setter(result, newData), func, bitmask); } module.exports = createWrap; /***/ }), /* 95 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(91), getSymbols = __webpack_require__(70), keys = __webpack_require__(8); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }), /* 96 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(91), getSymbolsIn = __webpack_require__(156), keysIn = __webpack_require__(50); /** * Creates an array of own and inherited enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn); } module.exports = getAllKeysIn; /***/ }), /* 97 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(20), isArguments = __webpack_require__(24), isArray = __webpack_require__(1), isIndex = __webpack_require__(30), isLength = __webpack_require__(47), toKey = __webpack_require__(22); /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; /***/ }), /* 98 */ /***/ (function(module, exports) { /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } module.exports = mapToArray; /***/ }), /* 99 */ /***/ (function(module, exports) { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }), /* 100 */ /***/ (function(module, exports, __webpack_require__) { var baseSetToString = __webpack_require__(274), shortOut = __webpack_require__(188); /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = shortOut(baseSetToString); module.exports = setToString; /***/ }), /* 101 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(59), assignInWith = __webpack_require__(321), baseRest = __webpack_require__(19), customDefaultsAssignIn = __webpack_require__(300); /** * Assigns own and inherited enumerable string keyed properties of source * objects to the destination object for all destination properties that * resolve to `undefined`. Source objects are applied from left to right. * Once a property is set, additional values of the same property are ignored. * * **Note:** This method mutates `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.defaultsDeep * @example * * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ var defaults = baseRest(function(args) { args.push(undefined, customDefaultsAssignIn); return apply(assignInWith, undefined, args); }); module.exports = defaults; /***/ }), /* 102 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(86), baseFilter = __webpack_require__(257), baseIteratee = __webpack_require__(12), isArray = __webpack_require__(1); /** * Iterates over elements of `collection`, returning an array of all elements * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * **Note:** Unlike `_.remove`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false } * ]; * * _.filter(users, function(o) { return !o.active; }); * // => objects for ['fred'] * * // The `_.matches` iteratee shorthand. * _.filter(users, { 'age': 36, 'active': true }); * // => objects for ['barney'] * * // The `_.matchesProperty` iteratee shorthand. * _.filter(users, ['active', false]); * // => objects for ['fred'] * * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; return func(collection, baseIteratee(predicate, 3)); } module.exports = filter; /***/ }), /* 103 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(10), isObjectLike = __webpack_require__(6); /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } module.exports = isArrayLikeObject; /***/ }), /* 104 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(64); /** * Performs a deep comparison between two values to determine if they are * equivalent. * * **Note:** This method supports comparing arrays, array buffers, booleans, * date objects, error objects, maps, numbers, `Object` objects, regexes, * sets, strings, symbols, and typed arrays. `Object` objects are compared * by their own, not inherited, enumerable properties. Functions and DOM * nodes are compared by strict equality, i.e. `===`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true * * object === other; * // => false */ function isEqual(value, other) { return baseIsEqual(value, other); } module.exports = isEqual; /***/ }), /* 105 */ /***/ (function(module, exports, __webpack_require__) { var baseMerge = __webpack_require__(266), createAssigner = __webpack_require__(147); /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); module.exports = merge; /***/ }), /* 106 */ /***/ (function(module, exports, __webpack_require__) { var baseOrderBy = __webpack_require__(268), isArray = __webpack_require__(1); /** * This method is like `_.sortBy` except that it allows specifying the sort * orders of the iteratees to sort by. If `orders` is unspecified, all values * are sorted in ascending order. Otherwise, specify an order of "desc" for * descending or "asc" for ascending sort order of corresponding values. * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] * The iteratees to sort by. * @param {string[]} [orders] The sort orders of `iteratees`. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. * @returns {Array} Returns the new sorted array. * @example * * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 34 }, * { 'user': 'fred', 'age': 40 }, * { 'user': 'barney', 'age': 36 } * ]; * * // Sort by `user` in ascending order and by `age` in descending order. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ function orderBy(collection, iteratees, orders, guard) { if (collection == null) { return []; } if (!isArray(iteratees)) { iteratees = iteratees == null ? [] : [iteratees]; } orders = guard ? undefined : orders; if (!isArray(orders)) { orders = orders == null ? [] : [orders]; } return baseOrderBy(collection, iteratees, orders); } module.exports = orderBy; /***/ }), /* 107 */ /***/ (function(module, exports) { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }), /* 108 */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /* 109 */ /***/ (function(module, exports) { var hasOwn = Object.prototype.hasOwnProperty; var toString = Object.prototype.toString; module.exports = function forEach (obj, fn, ctx) { if (toString.call(fn) !== '[object Function]') { throw new TypeError('iterator must be a function'); } var l = obj.length; if (l === +l) { for (var i = 0; i < l; i++) { fn.call(ctx, obj[i], i, obj); } } else { for (var k in obj) { if (hasOwn.call(obj, k)) { fn.call(ctx, obj[k], k, obj); } } } }; /***/ }), /* 110 */ /***/ (function(module, exports, __webpack_require__) { var basePick = __webpack_require__(269), flatRest = __webpack_require__(153); /** * Creates an object composed of the picked `object` properties. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ var pick = flatRest(function(object, paths) { return object == null ? {} : basePick(object, paths); }); module.exports = pick; /***/ }), /* 111 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _indexUtils = __webpack_require__(4); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * connectRange connector provides the logic to create connected * components that will give the ability for a user to refine results using * a numeric range. * @name connectRange * @kind connector * @requirements The attribute passed to the `attributeName` prop must be holding numerical values. * @propType {string} attributeName - Name of the attribute for faceting * @propType {{min: number, max: number}} [defaultRefinement] - Default searchState of the widget containing the start and the end of the range. * @propType {number} [min] - Minimum value. When this isn't set, the minimum value will be automatically computed by Algolia using the data in the index. * @propType {number} [max] - Maximum value. When this isn't set, the maximum value will be automatically computed by Algolia using the data in the index. * @providedPropType {function} refine - a function to select a range. * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied */ function getId(props) { return props.attributeName; } var namespace = 'range'; function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), {}, function (currentRefinement) { var min = currentRefinement.min; var max = currentRefinement.max; if (typeof min === 'string') { min = parseInt(min, 10); } if (typeof max === 'string') { max = parseInt(max, 10); } return { min: min, max: max }; }); } function _refine(props, searchState, nextRefinement, context) { if (!isFinite(nextRefinement.min) || !isFinite(nextRefinement.max)) { throw new Error("You can't provide non finite values to the range connector"); } var id = getId(props); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaRange', propTypes: { id: _react.PropTypes.string, attributeName: _react.PropTypes.string.isRequired, defaultRefinement: _react.PropTypes.shape({ min: _react.PropTypes.number.isRequired, max: _react.PropTypes.number.isRequired }), min: _react.PropTypes.number, max: _react.PropTypes.number }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var attributeName = props.attributeName; var min = props.min; var max = props.max; var hasMin = typeof min !== 'undefined'; var hasMax = typeof max !== 'undefined'; var index = (0, _indexUtils.getIndex)(this.context); var results = (0, _indexUtils.getResults)(searchResults, this.context); if (!hasMin || !hasMax) { if (!results) { return { canRefine: false }; } var stats = results.getFacetByName(attributeName) ? results.getFacetStats(attributeName) : null; if (!stats) { return { canRefine: false }; } if (!hasMin) { min = stats.min; } if (!hasMax) { max = stats.max; } } var count = results ? results.getFacetValues(attributeName).map(function (v) { return { value: v.name, count: v.count }; }) : []; var _getCurrentRefinement = getCurrentRefinement(props, searchState, this.context); var _getCurrentRefinement2 = _getCurrentRefinement.min; var valueMin = _getCurrentRefinement2 === undefined ? min : _getCurrentRefinement2; var _getCurrentRefinement3 = _getCurrentRefinement.max; var valueMax = _getCurrentRefinement3 === undefined ? max : _getCurrentRefinement3; return { min: min, max: max, currentRefinement: { min: valueMin, max: valueMax }, count: count, canRefine: count.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(params, props, searchState) { var attributeName = props.attributeName; var currentRefinement = getCurrentRefinement(props, searchState, this.context); params = params.addDisjunctiveFacet(attributeName); var min = currentRefinement.min; var max = currentRefinement.max; if (typeof min !== 'undefined') { params = params.addNumericRefinement(attributeName, '>=', min); } if (typeof max !== 'undefined') { params = params.addNumericRefinement(attributeName, '<=', max); } return params; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId(props); var currentRefinement = getCurrentRefinement(props, searchState, this.context); var item = void 0; var hasMin = typeof currentRefinement.min !== 'undefined'; var hasMax = typeof currentRefinement.max !== 'undefined'; if (hasMin || hasMax) { var itemLabel = ''; if (hasMin) { itemLabel += currentRefinement.min + ' <= '; } itemLabel += props.attributeName; if (hasMax) { itemLabel += ' <= ' + currentRefinement.max; } item = { label: itemLabel, currentRefinement: currentRefinement, attributeName: props.attributeName, value: function value(nextState) { return _cleanUp(props, nextState, _this.context); } }; } return { id: id, index: (0, _indexUtils.getIndex)(this.context), items: item ? [item] : [] }; } }); /***/ }), /* 112 */ /***/ (function(module, exports) { // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners || undefined; } module.exports = EventEmitter; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. EventEmitter.defaultMaxListeners = 10; // Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. EventEmitter.prototype.setMaxListeners = function(n) { if (!isNumber(n) || n < 0 || isNaN(n)) throw TypeError('n must be a positive number'); this._maxListeners = n; return this; }; EventEmitter.prototype.emit = function(type) { var er, handler, len, args, i, listeners; if (!this._events) this._events = {}; // If there is no 'error' event listener then throw. if (type === 'error') { if (!this._events.error || (isObject(this._events.error) && !this._events.error.length)) { er = arguments[1]; if (er instanceof Error) { throw er; // Unhandled 'error' event } else { // At least give some kind of context to the user var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); err.context = er; throw err; } } } handler = this._events[type]; if (isUndefined(handler)) return false; if (isFunction(handler)) { switch (arguments.length) { // fast cases case 1: handler.call(this); break; case 2: handler.call(this, arguments[1]); break; case 3: handler.call(this, arguments[1], arguments[2]); break; // slower default: args = Array.prototype.slice.call(arguments, 1); handler.apply(this, args); } } else if (isObject(handler)) { args = Array.prototype.slice.call(arguments, 1); listeners = handler.slice(); len = listeners.length; for (i = 0; i < len; i++) listeners[i].apply(this, args); } return true; }; EventEmitter.prototype.addListener = function(type, listener) { var m; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events) this._events = {}; // To avoid recursion in the case that type === "newListener"! Before // adding it to the listeners, first emit "newListener". if (this._events.newListener) this.emit('newListener', type, isFunction(listener.listener) ? listener.listener : listener); if (!this._events[type]) // Optimize the case of one listener. Don't need the extra array object. this._events[type] = listener; else if (isObject(this._events[type])) // If we've already got an array, just append. this._events[type].push(listener); else // Adding the second element, need to change to array. this._events[type] = [this._events[type], listener]; // Check for listener leak if (isObject(this._events[type]) && !this._events[type].warned) { if (!isUndefined(this._maxListeners)) { m = this._maxListeners; } else { m = EventEmitter.defaultMaxListeners; } if (m && m > 0 && this._events[type].length > m) { this._events[type].warned = true; console.error('(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length); if (typeof console.trace === 'function') { // not supported in IE 10 console.trace(); } } } return this; }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.once = function(type, listener) { if (!isFunction(listener)) throw TypeError('listener must be a function'); var fired = false; function g() { this.removeListener(type, g); if (!fired) { fired = true; listener.apply(this, arguments); } } g.listener = listener; this.on(type, g); return this; }; // emits a 'removeListener' event iff the listener was removed EventEmitter.prototype.removeListener = function(type, listener) { var list, position, length, i; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events || !this._events[type]) return this; list = this._events[type]; length = list.length; position = -1; if (list === listener || (isFunction(list.listener) && list.listener === listener)) { delete this._events[type]; if (this._events.removeListener) this.emit('removeListener', type, listener); } else if (isObject(list)) { for (i = length; i-- > 0;) { if (list[i] === listener || (list[i].listener && list[i].listener === listener)) { position = i; break; } } if (position < 0) return this; if (list.length === 1) { list.length = 0; delete this._events[type]; } else { list.splice(position, 1); } if (this._events.removeListener) this.emit('removeListener', type, listener); } return this; }; EventEmitter.prototype.removeAllListeners = function(type) { var key, listeners; if (!this._events) return this; // not listening for removeListener, no need to emit if (!this._events.removeListener) { if (arguments.length === 0) this._events = {}; else if (this._events[type]) delete this._events[type]; return this; } // emit removeListener for all listeners on all events if (arguments.length === 0) { for (key in this._events) { if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = {}; return this; } listeners = this._events[type]; if (isFunction(listeners)) { this.removeListener(type, listeners); } else if (listeners) { // LIFO order while (listeners.length) this.removeListener(type, listeners[listeners.length - 1]); } delete this._events[type]; return this; }; EventEmitter.prototype.listeners = function(type) { var ret; if (!this._events || !this._events[type]) ret = []; else if (isFunction(this._events[type])) ret = [this._events[type]]; else ret = this._events[type].slice(); return ret; }; EventEmitter.prototype.listenerCount = function(type) { if (this._events) { var evlistener = this._events[type]; if (isFunction(evlistener)) return 1; else if (evlistener) return evlistener.length; } return 0; }; EventEmitter.listenerCount = function(emitter, type) { return emitter.listenerCount(type); }; function isFunction(arg) { return typeof arg === 'function'; } function isNumber(arg) { return typeof arg === 'number'; } function isObject(arg) { return typeof arg === 'object' && arg !== null; } function isUndefined(arg) { return arg === void 0; } /***/ }), /* 113 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var formatRegExp = /%[sdj%]/g; exports.format = function(f) { if (!isString(f)) { var objects = []; for (var i = 0; i < arguments.length; i++) { objects.push(inspect(arguments[i])); } return objects.join(' '); } var i = 1; var args = arguments; var len = args.length; var str = String(f).replace(formatRegExp, function(x) { if (x === '%%') return '%'; if (i >= len) return x; switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); case '%j': try { return JSON.stringify(args[i++]); } catch (_) { return '[Circular]'; } default: return x; } }); for (var x = args[i]; i < len; x = args[++i]) { if (isNull(x) || !isObject(x)) { str += ' ' + x; } else { str += ' ' + inspect(x); } } return str; }; // Mark that a method should not be used. // Returns a modified function which warns once by default. // If --no-deprecation is set, then it is a no-op. exports.deprecate = function(fn, msg) { // Allow for deprecating things in the process of starting up. if (isUndefined(global.process)) { return function() { return exports.deprecate(fn, msg).apply(this, arguments); }; } if (process.noDeprecation === true) { return fn; } var warned = false; function deprecated() { if (!warned) { if (process.throwDeprecation) { throw new Error(msg); } else if (process.traceDeprecation) { console.trace(msg); } else { console.error(msg); } warned = true; } return fn.apply(this, arguments); } return deprecated; }; var debugs = {}; var debugEnviron; exports.debuglog = function(set) { if (isUndefined(debugEnviron)) debugEnviron = process.env.NODE_DEBUG || ''; set = set.toUpperCase(); if (!debugs[set]) { if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { var pid = process.pid; debugs[set] = function() { var msg = exports.format.apply(exports, arguments); console.error('%s %d: %s', set, pid, msg); }; } else { debugs[set] = function() {}; } } return debugs[set]; }; /** * Echos the value of a value. Trys to print the value out * in the best way possible given the different types. * * @param {Object} obj The object to print out. * @param {Object} opts Optional options object that alters the output. */ /* legacy: obj, showHidden, depth, colors*/ function inspect(obj, opts) { // default options var ctx = { seen: [], stylize: stylizeNoColor }; // legacy... if (arguments.length >= 3) ctx.depth = arguments[2]; if (arguments.length >= 4) ctx.colors = arguments[3]; if (isBoolean(opts)) { // legacy... ctx.showHidden = opts; } else if (opts) { // got an "options" object exports._extend(ctx, opts); } // set default options if (isUndefined(ctx.showHidden)) ctx.showHidden = false; if (isUndefined(ctx.depth)) ctx.depth = 2; if (isUndefined(ctx.colors)) ctx.colors = false; if (isUndefined(ctx.customInspect)) ctx.customInspect = true; if (ctx.colors) ctx.stylize = stylizeWithColor; return formatValue(ctx, obj, ctx.depth); } exports.inspect = inspect; // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics inspect.colors = { 'bold' : [1, 22], 'italic' : [3, 23], 'underline' : [4, 24], 'inverse' : [7, 27], 'white' : [37, 39], 'grey' : [90, 39], 'black' : [30, 39], 'blue' : [34, 39], 'cyan' : [36, 39], 'green' : [32, 39], 'magenta' : [35, 39], 'red' : [31, 39], 'yellow' : [33, 39] }; // Don't use 'blue' not visible on cmd.exe inspect.styles = { 'special': 'cyan', 'number': 'yellow', 'boolean': 'yellow', 'undefined': 'grey', 'null': 'bold', 'string': 'green', 'date': 'magenta', // "name": intentionally not styling 'regexp': 'red' }; function stylizeWithColor(str, styleType) { var style = inspect.styles[styleType]; if (style) { return '\u001b[' + inspect.colors[style][0] + 'm' + str + '\u001b[' + inspect.colors[style][1] + 'm'; } else { return str; } } function stylizeNoColor(str, styleType) { return str; } function arrayToHash(array) { var hash = {}; array.forEach(function(val, idx) { hash[val] = true; }); return hash; } function formatValue(ctx, value, recurseTimes) { // Provide a hook for user-specified inspect functions. // Check that value is an object with an inspect function on it if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check. !(value.constructor && value.constructor.prototype === value)) { var ret = value.inspect(recurseTimes, ctx); if (!isString(ret)) { ret = formatValue(ctx, ret, recurseTimes); } return ret; } // Primitive types cannot have properties var primitive = formatPrimitive(ctx, value); if (primitive) { return primitive; } // Look up the keys of the object. var keys = Object.keys(value); var visibleKeys = arrayToHash(keys); if (ctx.showHidden) { keys = Object.getOwnPropertyNames(value); } // IE doesn't make error fields non-enumerable // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { return formatError(value); } // Some type of object without properties can be shortcutted. if (keys.length === 0) { if (isFunction(value)) { var name = value.name ? ': ' + value.name : ''; return ctx.stylize('[Function' + name + ']', 'special'); } if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } if (isDate(value)) { return ctx.stylize(Date.prototype.toString.call(value), 'date'); } if (isError(value)) { return formatError(value); } } var base = '', array = false, braces = ['{', '}']; // Make Array say that they are Array if (isArray(value)) { array = true; braces = ['[', ']']; } // Make functions say that they are functions if (isFunction(value)) { var n = value.name ? ': ' + value.name : ''; base = ' [Function' + n + ']'; } // Make RegExps say that they are RegExps if (isRegExp(value)) { base = ' ' + RegExp.prototype.toString.call(value); } // Make dates with properties first say the date if (isDate(value)) { base = ' ' + Date.prototype.toUTCString.call(value); } // Make error with message first say the error if (isError(value)) { base = ' ' + formatError(value); } if (keys.length === 0 && (!array || value.length == 0)) { return braces[0] + base + braces[1]; } if (recurseTimes < 0) { if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } else { return ctx.stylize('[Object]', 'special'); } } ctx.seen.push(value); var output; if (array) { output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); } else { output = keys.map(function(key) { return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); }); } ctx.seen.pop(); return reduceToSingleString(output, base, braces); } function formatPrimitive(ctx, value) { if (isUndefined(value)) return ctx.stylize('undefined', 'undefined'); if (isString(value)) { var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') .replace(/'/g, "\\'") .replace(/\\"/g, '"') + '\''; return ctx.stylize(simple, 'string'); } if (isNumber(value)) return ctx.stylize('' + value, 'number'); if (isBoolean(value)) return ctx.stylize('' + value, 'boolean'); // For some reason typeof null is "object", so special case here. if (isNull(value)) return ctx.stylize('null', 'null'); } function formatError(value) { return '[' + Error.prototype.toString.call(value) + ']'; } function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { var output = []; for (var i = 0, l = value.length; i < l; ++i) { if (hasOwnProperty(value, String(i))) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true)); } else { output.push(''); } } keys.forEach(function(key) { if (!key.match(/^\d+$/)) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true)); } }); return output; } function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { var name, str, desc; desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; if (desc.get) { if (desc.set) { str = ctx.stylize('[Getter/Setter]', 'special'); } else { str = ctx.stylize('[Getter]', 'special'); } } else { if (desc.set) { str = ctx.stylize('[Setter]', 'special'); } } if (!hasOwnProperty(visibleKeys, key)) { name = '[' + key + ']'; } if (!str) { if (ctx.seen.indexOf(desc.value) < 0) { if (isNull(recurseTimes)) { str = formatValue(ctx, desc.value, null); } else { str = formatValue(ctx, desc.value, recurseTimes - 1); } if (str.indexOf('\n') > -1) { if (array) { str = str.split('\n').map(function(line) { return ' ' + line; }).join('\n').substr(2); } else { str = '\n' + str.split('\n').map(function(line) { return ' ' + line; }).join('\n'); } } } else { str = ctx.stylize('[Circular]', 'special'); } } if (isUndefined(name)) { if (array && key.match(/^\d+$/)) { return str; } name = JSON.stringify('' + key); if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { name = name.substr(1, name.length - 2); name = ctx.stylize(name, 'name'); } else { name = name.replace(/'/g, "\\'") .replace(/\\"/g, '"') .replace(/(^"|"$)/g, "'"); name = ctx.stylize(name, 'string'); } } return name + ': ' + str; } function reduceToSingleString(output, base, braces) { var numLinesEst = 0; var length = output.reduce(function(prev, cur) { numLinesEst++; if (cur.indexOf('\n') >= 0) numLinesEst++; return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; }, 0); if (length > 60) { return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; } return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; } // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. function isArray(ar) { return Array.isArray(ar); } exports.isArray = isArray; function isBoolean(arg) { return typeof arg === 'boolean'; } exports.isBoolean = isBoolean; function isNull(arg) { return arg === null; } exports.isNull = isNull; function isNullOrUndefined(arg) { return arg == null; } exports.isNullOrUndefined = isNullOrUndefined; function isNumber(arg) { return typeof arg === 'number'; } exports.isNumber = isNumber; function isString(arg) { return typeof arg === 'string'; } exports.isString = isString; function isSymbol(arg) { return typeof arg === 'symbol'; } exports.isSymbol = isSymbol; function isUndefined(arg) { return arg === void 0; } exports.isUndefined = isUndefined; function isRegExp(re) { return isObject(re) && objectToString(re) === '[object RegExp]'; } exports.isRegExp = isRegExp; function isObject(arg) { return typeof arg === 'object' && arg !== null; } exports.isObject = isObject; function isDate(d) { return isObject(d) && objectToString(d) === '[object Date]'; } exports.isDate = isDate; function isError(e) { return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error); } exports.isError = isError; function isFunction(arg) { return typeof arg === 'function'; } exports.isFunction = isFunction; function isPrimitive(arg) { return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || // ES6 symbol typeof arg === 'undefined'; } exports.isPrimitive = isPrimitive; exports.isBuffer = __webpack_require__(235); function objectToString(o) { return Object.prototype.toString.call(o); } function pad(n) { return n < 10 ? '0' + n.toString(10) : n.toString(10); } var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; // 26 Feb 16:19:34 function timestamp() { var d = new Date(); var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':'); return [d.getDate(), months[d.getMonth()], time].join(' '); } // log is just a thin wrapper to console.log that prepends a timestamp exports.log = function() { console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); }; /** * Inherit the prototype methods from one constructor into another. * * The Function.prototype.inherits from lang.js rewritten as a standalone * function (not on Function.prototype). NOTE: If this file is to be loaded * during bootstrapping this function needs to be rewritten using some native * functions as prototype setup using normal JavaScript does not work as * expected during bootstrapping (see mirror.js in r114903). * * @param {function} ctor Constructor function which needs to inherit the * prototype. * @param {function} superCtor Constructor function to inherit prototype from. */ exports.inherits = __webpack_require__(234); exports._extend = function(origin, add) { // Don't do anything if add isn't an object if (!add || !isObject(add)) return origin; var keys = Object.keys(add); var i = keys.length; while (i--) { origin[keys[i]] = add[keys[i]]; } return origin; }; function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(53), __webpack_require__(108))) /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; module.exports = { 'default': 'RFC3986', formatters: { RFC1738: function (value) { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { return value; } }, RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; /***/ }), /* 115 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var forEach = __webpack_require__(34); var compact = __webpack_require__(323); var indexOf = __webpack_require__(73); var findIndex = __webpack_require__(196); var get = __webpack_require__(72); var sumBy = __webpack_require__(336); var find = __webpack_require__(46); var includes = __webpack_require__(326); var map = __webpack_require__(16); var orderBy = __webpack_require__(106); var defaults = __webpack_require__(101); var merge = __webpack_require__(105); var isArray = __webpack_require__(1); var isFunction = __webpack_require__(18); var partial = __webpack_require__(331); var partialRight = __webpack_require__(332); var formatSort = __webpack_require__(116); var generateHierarchicalTree = __webpack_require__(243); /** * @typedef SearchResults.Facet * @type {object} * @property {string} name name of the attribute in the record * @property {object} data the facetting data: value, number of entries * @property {object} stats undefined unless facet_stats is retrieved from algolia */ /** * @typedef SearchResults.HierarchicalFacet * @type {object} * @property {string} name name of the current value given the hierarchical level, trimmed. * If root node, you get the facet name * @property {number} count number of objets matching this hierarchical value * @property {string} path the current hierarchical value full path * @property {boolean} isRefined `true` if the current value was refined, `false` otherwise * @property {HierarchicalFacet[]} data sub values for the current level */ /** * @typedef SearchResults.FacetValue * @type {object} * @property {string} value the facet value itself * @property {number} count times this facet appears in the results * @property {boolean} isRefined is the facet currently selected * @property {boolean} isExcluded is the facet currently excluded (only for conjunctive facets) */ /** * @typedef Refinement * @type {object} * @property {string} type the type of filter used: * `numeric`, `facet`, `exclude`, `disjunctive`, `hierarchical` * @property {string} attributeName name of the attribute used for filtering * @property {string} name the value of the filter * @property {number} numericValue the value as a number. Only for numeric fitlers. * @property {string} operator the operator used. Only for numeric filters. * @property {number} count the number of computed hits for this filter. Only on facets. * @property {boolean} exhaustive if the count is exhaustive */ function getIndices(obj) { var indices = {}; forEach(obj, function(val, idx) { indices[val] = idx; }); return indices; } function assignFacetStats(dest, facetStats, key) { if (facetStats && facetStats[key]) { dest.stats = facetStats[key]; } } function findMatchingHierarchicalFacetFromAttributeName(hierarchicalFacets, hierarchicalAttributeName) { return find( hierarchicalFacets, function facetKeyMatchesAttribute(hierarchicalFacet) { return includes(hierarchicalFacet.attributes, hierarchicalAttributeName); } ); } /*eslint-disable */ /** * Constructor for SearchResults * @class * @classdesc SearchResults contains the results of a query to Algolia using the * {@link AlgoliaSearchHelper}. * @param {SearchParameters} state state that led to the response * @param {array.<object>} results the results from algolia client * @example <caption>SearchResults of the first query in * <a href="http://demos.algolia.com/instant-search-demo">the instant search demo</a></caption> { "hitsPerPage": 10, "processingTimeMS": 2, "facets": [ { "name": "type", "data": { "HardGood": 6627, "BlackTie": 550, "Music": 665, "Software": 131, "Game": 456, "Movie": 1571 }, "exhaustive": false }, { "exhaustive": false, "data": { "Free shipping": 5507 }, "name": "shipping" } ], "hits": [ { "thumbnailImage": "http://img.bbystatic.com/BestBuy_US/images/products/1688/1688832_54x108_s.gif", "_highlightResult": { "shortDescription": { "matchLevel": "none", "value": "Safeguard your PC, Mac, Android and iOS devices with comprehensive Internet protection", "matchedWords": [] }, "category": { "matchLevel": "none", "value": "Computer Security Software", "matchedWords": [] }, "manufacturer": { "matchedWords": [], "value": "Webroot", "matchLevel": "none" }, "name": { "value": "Webroot SecureAnywhere Internet Security (3-Device) (1-Year Subscription) - Mac/Windows", "matchedWords": [], "matchLevel": "none" } }, "image": "http://img.bbystatic.com/BestBuy_US/images/products/1688/1688832_105x210_sc.jpg", "shipping": "Free shipping", "bestSellingRank": 4, "shortDescription": "Safeguard your PC, Mac, Android and iOS devices with comprehensive Internet protection", "url": "http://www.bestbuy.com/site/webroot-secureanywhere-internet-security-3-devi…d=1219060687969&skuId=1688832&cmp=RMX&ky=2d3GfEmNIzjA0vkzveHdZEBgpPCyMnLTJ", "name": "Webroot SecureAnywhere Internet Security (3-Device) (1-Year Subscription) - Mac/Windows", "category": "Computer Security Software", "salePrice_range": "1 - 50", "objectID": "1688832", "type": "Software", "customerReviewCount": 5980, "salePrice": 49.99, "manufacturer": "Webroot" }, .... ], "nbHits": 10000, "disjunctiveFacets": [ { "exhaustive": false, "data": { "5": 183, "12": 112, "7": 149, ... }, "name": "customerReviewCount", "stats": { "max": 7461, "avg": 157.939, "min": 1 } }, { "data": { "Printer Ink": 142, "Wireless Speakers": 60, "Point & Shoot Cameras": 48, ... }, "name": "category", "exhaustive": false }, { "exhaustive": false, "data": { "> 5000": 2, "1 - 50": 6524, "501 - 2000": 566, "201 - 500": 1501, "101 - 200": 1360, "2001 - 5000": 47 }, "name": "salePrice_range" }, { "data": { "Dynex™": 202, "Insignia™": 230, "PNY": 72, ... }, "name": "manufacturer", "exhaustive": false } ], "query": "", "nbPages": 100, "page": 0, "index": "bestbuy" } **/ /*eslint-enable */ function SearchResults(state, results) { var mainSubResponse = results[0]; this._rawResults = results; /** * query used to generate the results * @member {string} */ this.query = mainSubResponse.query; /** * The query as parsed by the engine given all the rules. * @member {string} */ this.parsedQuery = mainSubResponse.parsedQuery; /** * all the records that match the search parameters. Each record is * augmented with a new attribute `_highlightResult` * which is an object keyed by attribute and with the following properties: * - `value` : the value of the facet highlighted (html) * - `matchLevel`: full, partial or none depending on how the query terms match * @member {object[]} */ this.hits = mainSubResponse.hits; /** * index where the results come from * @member {string} */ this.index = mainSubResponse.index; /** * number of hits per page requested * @member {number} */ this.hitsPerPage = mainSubResponse.hitsPerPage; /** * total number of hits of this query on the index * @member {number} */ this.nbHits = mainSubResponse.nbHits; /** * total number of pages with respect to the number of hits per page and the total number of hits * @member {number} */ this.nbPages = mainSubResponse.nbPages; /** * current page * @member {number} */ this.page = mainSubResponse.page; /** * sum of the processing time of all the queries * @member {number} */ this.processingTimeMS = sumBy(results, 'processingTimeMS'); /** * The position if the position was guessed by IP. * @member {string} * @example "48.8637,2.3615", */ this.aroundLatLng = mainSubResponse.aroundLatLng; /** * The radius computed by Algolia. * @member {string} * @example "126792922", */ this.automaticRadius = mainSubResponse.automaticRadius; /** * String identifying the server used to serve this request. * @member {string} * @example "c7-use-2.algolia.net", */ this.serverUsed = mainSubResponse.serverUsed; /** * Boolean that indicates if the computation of the counts did time out. * @member {boolean} */ this.timeoutCounts = mainSubResponse.timeoutCounts; /** * Boolean that indicates if the computation of the hits did time out. * @member {boolean} */ this.timeoutHits = mainSubResponse.timeoutHits; /** * disjunctive facets results * @member {SearchResults.Facet[]} */ this.disjunctiveFacets = []; /** * disjunctive facets results * @member {SearchResults.HierarchicalFacet[]} */ this.hierarchicalFacets = map(state.hierarchicalFacets, function initFutureTree() { return []; }); /** * other facets results * @member {SearchResults.Facet[]} */ this.facets = []; var disjunctiveFacets = state.getRefinedDisjunctiveFacets(); var facetsIndices = getIndices(state.facets); var disjunctiveFacetsIndices = getIndices(state.disjunctiveFacets); var nextDisjunctiveResult = 1; var self = this; // Since we send request only for disjunctive facets that have been refined, // we get the facets informations from the first, general, response. forEach(mainSubResponse.facets, function(facetValueObject, facetKey) { var hierarchicalFacet = findMatchingHierarchicalFacetFromAttributeName( state.hierarchicalFacets, facetKey ); if (hierarchicalFacet) { // Place the hierarchicalFacet data at the correct index depending on // the attributes order that was defined at the helper initialization var facetIndex = hierarchicalFacet.attributes.indexOf(facetKey); var idxAttributeName = findIndex(state.hierarchicalFacets, {name: hierarchicalFacet.name}); self.hierarchicalFacets[idxAttributeName][facetIndex] = { attribute: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; } else { var isFacetDisjunctive = indexOf(state.disjunctiveFacets, facetKey) !== -1; var isFacetConjunctive = indexOf(state.facets, facetKey) !== -1; var position; if (isFacetDisjunctive) { position = disjunctiveFacetsIndices[facetKey]; self.disjunctiveFacets[position] = { name: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; assignFacetStats(self.disjunctiveFacets[position], mainSubResponse.facets_stats, facetKey); } if (isFacetConjunctive) { position = facetsIndices[facetKey]; self.facets[position] = { name: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; assignFacetStats(self.facets[position], mainSubResponse.facets_stats, facetKey); } } }); // Make sure we do not keep holes within the hierarchical facets this.hierarchicalFacets = compact(this.hierarchicalFacets); // aggregate the refined disjunctive facets forEach(disjunctiveFacets, function(disjunctiveFacet) { var result = results[nextDisjunctiveResult]; var hierarchicalFacet = state.getHierarchicalFacetByName(disjunctiveFacet); // There should be only item in facets. forEach(result.facets, function(facetResults, dfacet) { var position; if (hierarchicalFacet) { position = findIndex(state.hierarchicalFacets, {name: hierarchicalFacet.name}); var attributeIndex = findIndex(self.hierarchicalFacets[position], {attribute: dfacet}); // previous refinements and no results so not able to find it if (attributeIndex === -1) { return; } self.hierarchicalFacets[position][attributeIndex].data = merge( {}, self.hierarchicalFacets[position][attributeIndex].data, facetResults ); } else { position = disjunctiveFacetsIndices[dfacet]; var dataFromMainRequest = mainSubResponse.facets && mainSubResponse.facets[dfacet] || {}; self.disjunctiveFacets[position] = { name: dfacet, data: defaults({}, facetResults, dataFromMainRequest), exhaustive: result.exhaustiveFacetsCount }; assignFacetStats(self.disjunctiveFacets[position], result.facets_stats, dfacet); if (state.disjunctiveFacetsRefinements[dfacet]) { forEach(state.disjunctiveFacetsRefinements[dfacet], function(refinementValue) { // add the disjunctive refinements if it is no more retrieved if (!self.disjunctiveFacets[position].data[refinementValue] && indexOf(state.disjunctiveFacetsRefinements[dfacet], refinementValue) > -1) { self.disjunctiveFacets[position].data[refinementValue] = 0; } }); } } }); nextDisjunctiveResult++; }); // if we have some root level values for hierarchical facets, merge them forEach(state.getRefinedHierarchicalFacets(), function(refinedFacet) { var hierarchicalFacet = state.getHierarchicalFacetByName(refinedFacet); var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var currentRefinement = state.getHierarchicalRefinement(refinedFacet); // if we are already at a root refinement (or no refinement at all), there is no // root level values request if (currentRefinement.length === 0 || currentRefinement[0].split(separator).length < 2) { return; } var result = results[nextDisjunctiveResult]; forEach(result.facets, function(facetResults, dfacet) { var position = findIndex(state.hierarchicalFacets, {name: hierarchicalFacet.name}); var attributeIndex = findIndex(self.hierarchicalFacets[position], {attribute: dfacet}); // previous refinements and no results so not able to find it if (attributeIndex === -1) { return; } // when we always get root levels, if the hits refinement is `beers > IPA` (count: 5), // then the disjunctive values will be `beers` (count: 100), // but we do not want to display // | beers (100) // > IPA (5) // We want // | beers (5) // > IPA (5) var defaultData = {}; if (currentRefinement.length > 0) { var root = currentRefinement[0].split(separator)[0]; defaultData[root] = self.hierarchicalFacets[position][attributeIndex].data[root]; } self.hierarchicalFacets[position][attributeIndex].data = defaults( defaultData, facetResults, self.hierarchicalFacets[position][attributeIndex].data ); }); nextDisjunctiveResult++; }); // add the excludes forEach(state.facetsExcludes, function(excludes, facetName) { var position = facetsIndices[facetName]; self.facets[position] = { name: facetName, data: mainSubResponse.facets[facetName], exhaustive: mainSubResponse.exhaustiveFacetsCount }; forEach(excludes, function(facetValue) { self.facets[position] = self.facets[position] || {name: facetName}; self.facets[position].data = self.facets[position].data || {}; self.facets[position].data[facetValue] = 0; }); }); this.hierarchicalFacets = map(this.hierarchicalFacets, generateHierarchicalTree(state)); this.facets = compact(this.facets); this.disjunctiveFacets = compact(this.disjunctiveFacets); this._state = state; } /** * Get a facet object with its name * @deprecated * @param {string} name name of the attribute facetted * @return {SearchResults.Facet} the facet object */ SearchResults.prototype.getFacetByName = function(name) { var predicate = {name: name}; return find(this.facets, predicate) || find(this.disjunctiveFacets, predicate) || find(this.hierarchicalFacets, predicate); }; /** * Get the facet values of a specified attribute from a SearchResults object. * @private * @param {SearchResults} results the search results to search in * @param {string} attribute name of the facetted attribute to search for * @return {array|object} facet values. For the hierarchical facets it is an object. */ function extractNormalizedFacetValues(results, attribute) { var predicate = {name: attribute}; if (results._state.isConjunctiveFacet(attribute)) { var facet = find(results.facets, predicate); if (!facet) return []; return map(facet.data, function(v, k) { return { name: k, count: v, isRefined: results._state.isFacetRefined(attribute, k), isExcluded: results._state.isExcludeRefined(attribute, k) }; }); } else if (results._state.isDisjunctiveFacet(attribute)) { var disjunctiveFacet = find(results.disjunctiveFacets, predicate); if (!disjunctiveFacet) return []; return map(disjunctiveFacet.data, function(v, k) { return { name: k, count: v, isRefined: results._state.isDisjunctiveFacetRefined(attribute, k) }; }); } else if (results._state.isHierarchicalFacet(attribute)) { return find(results.hierarchicalFacets, predicate); } } /** * Sort nodes of a hierarchical facet results * @private * @param {HierarchicalFacet} node node to upon which we want to apply the sort */ function recSort(sortFn, node) { if (!node.data || node.data.length === 0) { return node; } var children = map(node.data, partial(recSort, sortFn)); var sortedChildren = sortFn(children); var newNode = merge({}, node, {data: sortedChildren}); return newNode; } SearchResults.DEFAULT_SORT = ['isRefined:desc', 'count:desc', 'name:asc']; function vanillaSortFn(order, data) { return data.sort(order); } /** * Get a the list of values for a given facet attribute. Those values are sorted * refinement first, descending count (bigger value on top), and name ascending * (alphabetical order). The sort formula can overridden using either string based * predicates or a function. * * This method will return all the values returned by the Algolia engine plus all * the values already refined. This means that it can happen that the * `maxValuesPerFacet` [configuration](https://www.algolia.com/doc/rest-api/search#param-maxValuesPerFacet) * might not be respected if you have facet values that are already refined. * @param {string} attribute attribute name * @param {object} opts configuration options. * @param {Array.<string> | function} opts.sortBy * When using strings, it consists of * the name of the [FacetValue](#SearchResults.FacetValue) or the * [HierarchicalFacet](#SearchResults.HierarchicalFacet) attributes with the * order (`asc` or `desc`). For example to order the value by count, the * argument would be `['count:asc']`. * * If only the attribute name is specified, the ordering defaults to the one * specified in the default value for this attribute. * * When not specified, the order is * ascending. This parameter can also be a function which takes two facet * values and should return a number, 0 if equal, 1 if the first argument is * bigger or -1 otherwise. * * The default value for this attribute `['isRefined:desc', 'count:desc', 'name:asc']` * @return {FacetValue[]|HierarchicalFacet} depending on the type of facet of * the attribute requested (hierarchical, disjunctive or conjunctive) * @example * helper.on('results', function(content){ * //get values ordered only by name ascending using the string predicate * content.getFacetValues('city', {sortBy: ['name:asc']); * //get values ordered only by count ascending using a function * content.getFacetValues('city', { * // this is equivalent to ['count:asc'] * sortBy: function(a, b) { * if (a.count === b.count) return 0; * if (a.count > b.count) return 1; * if (b.count > a.count) return -1; * } * }); * }); */ SearchResults.prototype.getFacetValues = function(attribute, opts) { var facetValues = extractNormalizedFacetValues(this, attribute); if (!facetValues) throw new Error(attribute + ' is not a retrieved facet.'); var options = defaults({}, opts, {sortBy: SearchResults.DEFAULT_SORT}); if (isArray(options.sortBy)) { var order = formatSort(options.sortBy, SearchResults.DEFAULT_SORT); if (isArray(facetValues)) { return orderBy(facetValues, order[0], order[1]); } // If facetValues is not an array, it's an object thus a hierarchical facet object return recSort(partialRight(orderBy, order[0], order[1]), facetValues); } else if (isFunction(options.sortBy)) { if (isArray(facetValues)) { return facetValues.sort(options.sortBy); } // If facetValues is not an array, it's an object thus a hierarchical facet object return recSort(partial(vanillaSortFn, options.sortBy), facetValues); } throw new Error( 'options.sortBy is optional but if defined it must be ' + 'either an array of string (predicates) or a sorting function' ); }; /** * Returns the facet stats if attribute is defined and the facet contains some. * Otherwise returns undefined. * @param {string} attribute name of the facetted attribute * @return {object} The stats of the facet */ SearchResults.prototype.getFacetStats = function(attribute) { if (this._state.isConjunctiveFacet(attribute)) { return getFacetStatsIfAvailable(this.facets, attribute); } else if (this._state.isDisjunctiveFacet(attribute)) { return getFacetStatsIfAvailable(this.disjunctiveFacets, attribute); } throw new Error(attribute + ' is not present in `facets` or `disjunctiveFacets`'); }; function getFacetStatsIfAvailable(facetList, facetName) { var data = find(facetList, {name: facetName}); return data && data.stats; } /** * Returns all refinements for all filters + tags. It also provides * additional information: count and exhausistivity for each filter. * * See the [refinement type](#Refinement) for an exhaustive view of the available * data. * * @return {Array.<Refinement>} all the refinements */ SearchResults.prototype.getRefinements = function() { var state = this._state; var results = this; var res = []; forEach(state.facetsRefinements, function(refinements, attributeName) { forEach(refinements, function(name) { res.push(getRefinement(state, 'facet', attributeName, name, results.facets)); }); }); forEach(state.facetsExcludes, function(refinements, attributeName) { forEach(refinements, function(name) { res.push(getRefinement(state, 'exclude', attributeName, name, results.facets)); }); }); forEach(state.disjunctiveFacetsRefinements, function(refinements, attributeName) { forEach(refinements, function(name) { res.push(getRefinement(state, 'disjunctive', attributeName, name, results.disjunctiveFacets)); }); }); forEach(state.hierarchicalFacetsRefinements, function(refinements, attributeName) { forEach(refinements, function(name) { res.push(getHierarchicalRefinement(state, attributeName, name, results.hierarchicalFacets)); }); }); forEach(state.numericRefinements, function(operators, attributeName) { forEach(operators, function(values, operator) { forEach(values, function(value) { res.push({ type: 'numeric', attributeName: attributeName, name: value, numericValue: value, operator: operator }); }); }); }); forEach(state.tagRefinements, function(name) { res.push({type: 'tag', attributeName: '_tags', name: name}); }); return res; }; function getRefinement(state, type, attributeName, name, resultsFacets) { var facet = find(resultsFacets, {name: attributeName}); var count = get(facet, 'data[' + name + ']'); var exhaustive = get(facet, 'exhaustive'); return { type: type, attributeName: attributeName, name: name, count: count || 0, exhaustive: exhaustive || false }; } function getHierarchicalRefinement(state, attributeName, name, resultsFacets) { var facet = find(resultsFacets, {name: attributeName}); var facetDeclaration = state.getHierarchicalFacetByName(attributeName); var splitted = name.split(facetDeclaration.separator); var configuredName = splitted[splitted.length - 1]; for (var i = 0; facet !== undefined && i < splitted.length; ++i) { facet = find(facet.data, {name: splitted[i]}); } var count = get(facet, 'count'); var exhaustive = get(facet, 'exhaustive'); return { type: 'hierarchical', attributeName: attributeName, name: configuredName, count: count || 0, exhaustive: exhaustive || false }; } module.exports = SearchResults; /***/ }), /* 116 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var reduce = __webpack_require__(51); var find = __webpack_require__(46); var startsWith = __webpack_require__(335); /** * Transform sort format from user friendly notation to lodash format * @param {string[]} sortBy array of predicate of the form "attribute:order" * @return {array.<string[]>} array containing 2 elements : attributes, orders */ module.exports = function formatSort(sortBy, defaults) { return reduce(sortBy, function preparePredicate(out, sortInstruction) { var sortInstructions = sortInstruction.split(':'); if (defaults && sortInstructions.length === 1) { var similarDefault = find(defaults, function(predicate) { return startsWith(predicate, sortInstruction[0]); }); if (similarDefault) { sortInstructions = similarDefault.split(':'); } } out[0].push(sortInstructions[0]); out[1].push(sortInstructions[1]); return out; }, [[], []]); }; /***/ }), /* 117 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Module containing the functions to serialize and deserialize * {SearchParameters} in the query string format * @module algoliasearchHelper.url */ var shortener = __webpack_require__(242); var SearchParameters = __webpack_require__(81); var qs = __webpack_require__(236); var bind = __webpack_require__(322); var forEach = __webpack_require__(34); var pick = __webpack_require__(110); var map = __webpack_require__(16); var mapKeys = __webpack_require__(328); var mapValues = __webpack_require__(329); var isString = __webpack_require__(49); var isPlainObject = __webpack_require__(48); var isArray = __webpack_require__(1); var invert = __webpack_require__(199); var encode = __webpack_require__(80).encode; function recursiveEncode(input) { if (isPlainObject(input)) { return mapValues(input, recursiveEncode); } if (isArray(input)) { return map(input, recursiveEncode); } if (isString(input)) { return encode(input); } return input; } var refinementsParameters = ['dFR', 'fR', 'nR', 'hFR', 'tR']; var stateKeys = shortener.ENCODED_PARAMETERS; function sortQueryStringValues(prefixRegexp, invertedMapping, a, b) { if (prefixRegexp !== null) { a = a.replace(prefixRegexp, ''); b = b.replace(prefixRegexp, ''); } a = invertedMapping[a] || a; b = invertedMapping[b] || b; if (stateKeys.indexOf(a) !== -1 || stateKeys.indexOf(b) !== -1) { if (a === 'q') return -1; if (b === 'q') return 1; var isARefinements = refinementsParameters.indexOf(a) !== -1; var isBRefinements = refinementsParameters.indexOf(b) !== -1; if (isARefinements && !isBRefinements) { return 1; } else if (isBRefinements && !isARefinements) { return -1; } } return a.localeCompare(b); } /** * Read a query string and return an object containing the state * @param {string} queryString the query string that will be decoded * @param {object} [options] accepted options : * - prefix : the prefix used for the saved attributes, you have to provide the * same that was used for serialization * - mapping : map short attributes to another value e.g. {q: 'query'} * @return {object} partial search parameters object (same properties than in the * SearchParameters but not exhaustive) */ exports.getStateFromQueryString = function(queryString, options) { var prefixForParameters = options && options.prefix || ''; var mapping = options && options.mapping || {}; var invertedMapping = invert(mapping); var partialStateWithPrefix = qs.parse(queryString); var prefixRegexp = new RegExp('^' + prefixForParameters); var partialState = mapKeys( partialStateWithPrefix, function(v, k) { var hasPrefix = prefixForParameters && prefixRegexp.test(k); var unprefixedKey = hasPrefix ? k.replace(prefixRegexp, '') : k; var decodedKey = shortener.decode(invertedMapping[unprefixedKey] || unprefixedKey); return decodedKey || unprefixedKey; } ); var partialStateWithParsedNumbers = SearchParameters._parseNumbers(partialState); return pick(partialStateWithParsedNumbers, SearchParameters.PARAMETERS); }; /** * Retrieve an object of all the properties that are not understandable as helper * parameters. * @param {string} queryString the query string to read * @param {object} [options] the options * - prefixForParameters : prefix used for the helper configuration keys * - mapping : map short attributes to another value e.g. {q: 'query'} * @return {object} the object containing the parsed configuration that doesn't * to the helper */ exports.getUnrecognizedParametersInQueryString = function(queryString, options) { var prefixForParameters = options && options.prefix; var mapping = options && options.mapping || {}; var invertedMapping = invert(mapping); var foreignConfig = {}; var config = qs.parse(queryString); if (prefixForParameters) { var prefixRegexp = new RegExp('^' + prefixForParameters); forEach(config, function(v, key) { if (!prefixRegexp.test(key)) foreignConfig[key] = v; }); } else { forEach(config, function(v, key) { if (!shortener.decode(invertedMapping[key] || key)) foreignConfig[key] = v; }); } return foreignConfig; }; /** * Generate a query string for the state passed according to the options * @param {SearchParameters} state state to serialize * @param {object} [options] May contain the following parameters : * - prefix : prefix in front of the keys * - mapping : map short attributes to another value e.g. {q: 'query'} * - moreAttributes : more values to be added in the query string. Those values * won't be prefixed. * - safe : get safe urls for use in emails, chat apps or any application auto linking urls. * All parameters and values will be encoded in a way that it's safe to share them. * Default to false for legacy reasons () * @return {string} the query string */ exports.getQueryStringFromState = function(state, options) { var moreAttributes = options && options.moreAttributes; var prefixForParameters = options && options.prefix || ''; var mapping = options && options.mapping || {}; var safe = options && options.safe || false; var invertedMapping = invert(mapping); var stateForUrl = safe ? state : recursiveEncode(state); var encodedState = mapKeys( stateForUrl, function(v, k) { var shortK = shortener.encode(k); return prefixForParameters + (mapping[shortK] || shortK); } ); var prefixRegexp = prefixForParameters === '' ? null : new RegExp('^' + prefixForParameters); var sort = bind(sortQueryStringValues, null, prefixRegexp, invertedMapping); if (moreAttributes) { var stateQs = qs.stringify(encodedState, {encode: safe, sort: sort}); var moreQs = qs.stringify(moreAttributes, {encode: safe}); if (!stateQs) return moreQs; return stateQs + '&' + moreQs; } return qs.stringify(encodedState, {encode: safe, sort: sort}); }; /***/ }), /* 118 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = '2.19.0'; /***/ }), /* 119 */ /***/ (function(module, exports) { module.exports = function clone(obj) { return JSON.parse(JSON.stringify(obj)); }; /***/ }), /* 120 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(9), root = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /* 121 */ /***/ (function(module, exports, __webpack_require__) { var hashClear = __webpack_require__(158), hashDelete = __webpack_require__(159), hashGet = __webpack_require__(160), hashHas = __webpack_require__(161), hashSet = __webpack_require__(162); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }), /* 122 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(61), baseLodash = __webpack_require__(92); /** * The base constructor for creating `lodash` wrapper objects. * * @private * @param {*} value The value to wrap. * @param {boolean} [chainAll] Enable explicit method chain sequences. */ function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !!chainAll; this.__index__ = 0; this.__values__ = undefined; } LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; module.exports = LodashWrapper; /***/ }), /* 123 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(9), root = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /* 124 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(9), root = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /* 125 */ /***/ (function(module, exports) { /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { return true; } } return false; } module.exports = arrayIncludesWith; /***/ }), /* 126 */ /***/ (function(module, exports) { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(41), eq = __webpack_require__(17); /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignMergeValue; /***/ }), /* 128 */ /***/ (function(module, exports) { /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } module.exports = baseFindIndex; /***/ }), /* 129 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(60), isFlattenable = __webpack_require__(309); /** * The base implementation of `_.flatten` with support for restricting flattening. * * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } } else if (!isStrict) { result[result.length] = value; } } return result; } module.exports = baseFlatten; /***/ }), /* 130 */ /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(294); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }), /* 131 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.has` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { return object != null && hasOwnProperty.call(object, key); } module.exports = baseHas; /***/ }), /* 132 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(7), isObjectLike = __webpack_require__(6); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }), /* 133 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(40), equalArrays = __webpack_require__(76), equalByTag = __webpack_require__(151), equalObjects = __webpack_require__(152), getTag = __webpack_require__(55), isArray = __webpack_require__(1), isBuffer = __webpack_require__(25), isTypedArray = __webpack_require__(35); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }), /* 134 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(18), isMasked = __webpack_require__(165), isObject = __webpack_require__(5), toSource = __webpack_require__(79); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }), /* 135 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(7), isLength = __webpack_require__(47), isObjectLike = __webpack_require__(6); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /* 136 */ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(62), isArrayLike = __webpack_require__(10); /** * The base implementation of `_.map` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } module.exports = baseMap; /***/ }), /* 137 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(63), baseSet = __webpack_require__(273), castPath = __webpack_require__(20); /** * The base implementation of `_.pickBy` without support for iteratee shorthands. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ function basePickBy(object, paths, predicate) { var index = -1, length = paths.length, result = {}; while (++index < length) { var path = paths[index], value = baseGet(object, path); if (predicate(value, path)) { baseSet(result, castPath(path, object), value); } } return result; } module.exports = basePickBy; /***/ }), /* 138 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(23), metaMap = __webpack_require__(179); /** * The base implementation of `setData` without support for hot loop shorting. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ var baseSetData = !metaMap ? identity : function(func, data) { metaMap.set(func, data); return func; }; module.exports = baseSetData; /***/ }), /* 139 */ /***/ (function(module, exports) { /** * The base implementation of `_.slice` without an iteratee call guard. * * @private * @param {Array} array The array to slice. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the slice of `array`. */ function baseSlice(array, start, end) { var index = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : (length + start); } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } module.exports = baseSlice; /***/ }), /* 140 */ /***/ (function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /* 141 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(23); /** * Casts `value` to `identity` if it's not a function. * * @private * @param {*} value The value to inspect. * @returns {Function} Returns cast function. */ function castFunction(value) { return typeof value == 'function' ? value : identity; } module.exports = castFunction; /***/ }), /* 142 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(3); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(54)(module))) /***/ }), /* 143 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(93); /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } module.exports = cloneTypedArray; /***/ }), /* 144 */ /***/ (function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Creates an array that is the composition of partially applied arguments, * placeholders, and provided arguments into a single array of arguments. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgs(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(leftLength + rangeLength), isUncurried = !isCurried; while (++leftIndex < leftLength) { result[leftIndex] = partials[leftIndex]; } while (++argsIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[holders[argsIndex]] = args[argsIndex]; } } while (rangeLength--) { result[leftIndex++] = args[argsIndex++]; } return result; } module.exports = composeArgs; /***/ }), /* 145 */ /***/ (function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * This function is like `composeArgs` except that the arguments composition * is tailored for `_.partialRight`. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgsRight(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(rangeLength + rightLength), isUncurried = !isCurried; while (++argsIndex < rangeLength) { result[argsIndex] = args[argsIndex]; } var offset = argsIndex; while (++rightIndex < rightLength) { result[offset + rightIndex] = partials[rightIndex]; } while (++holdersIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[offset + holders[holdersIndex]] = args[argsIndex++]; } } return result; } module.exports = composeArgsRight; /***/ }), /* 146 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(3); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /* 147 */ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(19), isIterateeCall = __webpack_require__(213); /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } module.exports = createAssigner; /***/ }), /* 148 */ /***/ (function(module, exports, __webpack_require__) { var composeArgs = __webpack_require__(144), composeArgsRight = __webpack_require__(145), countHolders = __webpack_require__(292), createCtor = __webpack_require__(68), createRecurry = __webpack_require__(149), getHolder = __webpack_require__(45), reorder = __webpack_require__(315), replaceHolders = __webpack_require__(33), root = __webpack_require__(3); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_ARY_FLAG = 128, WRAP_FLIP_FLAG = 512; /** * Creates a function that wraps `func` to invoke it with optional `this` * binding of `thisArg`, partial application, and currying. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [partialsRight] The arguments to append to those provided * to the new function. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { args = composeArgs(args, partials, holders, isCurried); } if (partialsRight) { args = composeArgsRight(args, partialsRight, holdersRight, isCurried); } length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; length = args.length; if (argPos) { args = reorder(args, argPos); } else if (isFlip && length > 1) { args.reverse(); } if (isAry && ary < length) { args.length = ary; } if (this && this !== root && this instanceof wrapper) { fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } module.exports = createHybrid; /***/ }), /* 149 */ /***/ (function(module, exports, __webpack_require__) { var isLaziable = __webpack_require__(310), setData = __webpack_require__(186), setWrapToString = __webpack_require__(187); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64; /** * Creates a function that wraps `func` to continue currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials; bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); } var newData = [ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity ]; var result = wrapFunc.apply(undefined, newData); if (isLaziable(func)) { setData(result, newData); } result.placeholder = placeholder; return setWrapToString(result, func, bitmask); } module.exports = createRecurry; /***/ }), /* 150 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(9); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /* 151 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(14), Uint8Array = __webpack_require__(83), eq = __webpack_require__(17), equalArrays = __webpack_require__(76), mapToArray = __webpack_require__(98), setToArray = __webpack_require__(99); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } module.exports = equalByTag; /***/ }), /* 152 */ /***/ (function(module, exports, __webpack_require__) { var getAllKeys = __webpack_require__(95); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } module.exports = equalObjects; /***/ }), /* 153 */ /***/ (function(module, exports, __webpack_require__) { var flatten = __webpack_require__(197), overRest = __webpack_require__(183), setToString = __webpack_require__(100); /** * A specialized version of `baseRest` which flattens the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @returns {Function} Returns the new function. */ function flatRest(func) { return setToString(overRest(func, undefined, flatten), func + ''); } module.exports = flatRest; /***/ }), /* 154 */ /***/ (function(module, exports, __webpack_require__) { var metaMap = __webpack_require__(179), noop = __webpack_require__(330); /** * Gets metadata for `func`. * * @private * @param {Function} func The function to query. * @returns {*} Returns the metadata for `func`. */ var getData = !metaMap ? noop : function(func) { return metaMap.get(func); }; module.exports = getData; /***/ }), /* 155 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(14); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /* 156 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(60), getPrototype = __webpack_require__(69), getSymbols = __webpack_require__(70), stubArray = __webpack_require__(107); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own and inherited enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); object = getPrototype(object); } return result; }; module.exports = getSymbolsIn; /***/ }), /* 157 */ /***/ (function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /* 158 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(31); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /* 159 */ /***/ (function(module, exports) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /* 160 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(31); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }), /* 161 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(31); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /* 162 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(31); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /* 163 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(61), getPrototype = __webpack_require__(69), isPrototype = __webpack_require__(36); /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } module.exports = initCloneObject; /***/ }), /* 164 */ /***/ (function(module, exports) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /* 165 */ /***/ (function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__(146); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /* 166 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(5); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; /***/ }), /* 167 */ /***/ (function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /* 168 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(28); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /* 169 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(28); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /* 170 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(28); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /* 171 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(28); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /* 172 */ /***/ (function(module, exports, __webpack_require__) { var Hash = __webpack_require__(121), ListCache = __webpack_require__(27), Map = __webpack_require__(38); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /* 173 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(29); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }), /* 174 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(29); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /* 175 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(29); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }), /* 176 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(29); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /* 177 */ /***/ (function(module, exports) { /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } module.exports = matchesStrictComparable; /***/ }), /* 178 */ /***/ (function(module, exports, __webpack_require__) { var memoize = __webpack_require__(203); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }), /* 179 */ /***/ (function(module, exports, __webpack_require__) { var WeakMap = __webpack_require__(84); /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; module.exports = metaMap; /***/ }), /* 180 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(78); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /* 181 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(77); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(54)(module))) /***/ }), /* 182 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /* 183 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(59); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } module.exports = overRest; /***/ }), /* 184 */ /***/ (function(module, exports) { /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } module.exports = setCacheAdd; /***/ }), /* 185 */ /***/ (function(module, exports) { /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } module.exports = setCacheHas; /***/ }), /* 186 */ /***/ (function(module, exports, __webpack_require__) { var baseSetData = __webpack_require__(138), shortOut = __webpack_require__(188); /** * Sets metadata for `func`. * * **Note:** If this function becomes hot, i.e. is invoked a lot in a short * period of time, it will trip its breaker and transition to an identity * function to avoid garbage collection pauses in V8. See * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) * for more details. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ var setData = shortOut(baseSetData); module.exports = setData; /***/ }), /* 187 */ /***/ (function(module, exports, __webpack_require__) { var getWrapDetails = __webpack_require__(304), insertWrapDetails = __webpack_require__(308), setToString = __webpack_require__(100), updateWrapDetails = __webpack_require__(319); /** * Sets the `toString` method of `wrapper` to mimic the source of `reference` * with wrapper details in a comment at the top of the source body. * * @private * @param {Function} wrapper The function to modify. * @param {Function} reference The reference function. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Function} Returns `wrapper`. */ function setWrapToString(wrapper, reference, bitmask) { var source = (reference + ''); return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); } module.exports = setWrapToString; /***/ }), /* 188 */ /***/ (function(module, exports) { /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } module.exports = shortOut; /***/ }), /* 189 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(27); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /* 190 */ /***/ (function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /* 191 */ /***/ (function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /* 192 */ /***/ (function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /* 193 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(27), Map = __webpack_require__(38), MapCache = __webpack_require__(39); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /* 194 */ /***/ (function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__(178); /** Used to match property names within property paths. */ var reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (reLeadingDot.test(string)) { result.push(''); } string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /* 195 */ /***/ (function(module, exports) { /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } module.exports = constant; /***/ }), /* 196 */ /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(128), baseIteratee = __webpack_require__(12), toInteger = __webpack_require__(52); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * This method is like `_.find` except that it returns the index of the first * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ * @since 1.1.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * _.findIndex(users, function(o) { return o.user == 'barney'; }); * // => 0 * * // The `_.matches` iteratee shorthand. * _.findIndex(users, { 'user': 'fred', 'active': false }); * // => 1 * * // The `_.matchesProperty` iteratee shorthand. * _.findIndex(users, ['active', false]); * // => 0 * * // The `_.property` iteratee shorthand. * _.findIndex(users, 'active'); * // => 2 */ function findIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger(fromIndex); if (index < 0) { index = nativeMax(length + index, 0); } return baseFindIndex(array, baseIteratee(predicate, 3), index); } module.exports = findIndex; /***/ }), /* 197 */ /***/ (function(module, exports, __webpack_require__) { var baseFlatten = __webpack_require__(129); /** * Flattens `array` a single level deep. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flatten([1, [2, [3, [4]], 5]]); * // => [1, 2, [3, [4]], 5] */ function flatten(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } module.exports = flatten; /***/ }), /* 198 */ /***/ (function(module, exports, __webpack_require__) { var baseHasIn = __webpack_require__(258), hasPath = __webpack_require__(97); /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn; /***/ }), /* 199 */ /***/ (function(module, exports, __webpack_require__) { var constant = __webpack_require__(195), createInverter = __webpack_require__(298), identity = __webpack_require__(23); /** * Creates an object composed of the inverted keys and values of `object`. * If `object` contains duplicate values, subsequent values overwrite * property assignments of previous values. * * @static * @memberOf _ * @since 0.7.0 * @category Object * @param {Object} object The object to invert. * @returns {Object} Returns the new inverted object. * @example * * var object = { 'a': 1, 'b': 2, 'c': 1 }; * * _.invert(object); * // => { '1': 'c', '2': 'b' } */ var invert = createInverter(function(result, value, key) { result[value] = key; }, constant(identity)); module.exports = invert; /***/ }), /* 200 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(7), isObjectLike = __webpack_require__(6); /** `Object#toString` result references. */ var numberTag = '[object Number]'; /** * Checks if `value` is classified as a `Number` primitive or object. * * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are * classified as numbers, use the `_.isFinite` method. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); * // => true * * _.isNumber(Number.MIN_VALUE); * // => true * * _.isNumber(Infinity); * // => true * * _.isNumber('3'); * // => false */ function isNumber(value) { return typeof value == 'number' || (isObjectLike(value) && baseGetTag(value) == numberTag); } module.exports = isNumber; /***/ }), /* 201 */ /***/ (function(module, exports) { /** * Checks if `value` is `undefined`. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. * @example * * _.isUndefined(void 0); * // => true * * _.isUndefined(null); * // => false */ function isUndefined(value) { return value === undefined; } module.exports = isUndefined; /***/ }), /* 202 */ /***/ (function(module, exports) { /** * Gets the last element of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to query. * @returns {*} Returns the last element of `array`. * @example * * _.last([1, 2, 3]); * // => 3 */ function last(array) { var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } module.exports = last; /***/ }), /* 203 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(39); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /* 204 */ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 205 */ /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(65), castSlice = __webpack_require__(280), charsEndIndex = __webpack_require__(281), charsStartIndex = __webpack_require__(282), stringToArray = __webpack_require__(317), toString = __webpack_require__(74); /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** * Removes leading and trailing whitespace or specified characters from `string`. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to trim. * @param {string} [chars=whitespace] The characters to trim. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {string} Returns the trimmed string. * @example * * _.trim(' abc '); * // => 'abc' * * _.trim('-_-abc-_-', '_-'); * // => 'abc' * * _.map([' foo ', ' bar '], _.trim); * // => ['foo', 'bar'] */ function trim(string, chars, guard) { string = toString(string); if (string && (guard || chars === undefined)) { return string.replace(reTrim, ''); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1; return castSlice(strSymbols, start, end).join(''); } module.exports = trim; /***/ }), /* 206 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _react = __webpack_require__(0); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * connectCurrentRefinements connector provides the logic to build a widget that will * give the user the ability to remove all or some of the filters that were * set. * @name connectCurrentRefinements * @kind connector * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @propType {function} [clearsQuery=false] - Pass true to also clear the search query * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {array.<{label: string, attributeName: string, currentRefinement: string || object, items: array, value: function}>} items - all the filters, the `value` is to pass to the `refine` function for removing all currentrefinements, `label` is for the display. When existing several refinements for the same atribute name, then you get a nested `items` object that contains a `label` and a `value` function to use to remove a single filter. `attributeName` and `currentRefinement` are metadata containing row values. * @providedPropType {string} query - the search query */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaCurrentRefinements', propTypes: { transformItems: _react.PropTypes.func }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata) { var items = metadata.reduce(function (res, meta) { if (typeof meta.items !== 'undefined') { if (!props.clearsQuery && meta.id === 'query') { return res; } else { if (props.clearsQuery && meta.id === 'query' && meta.items[0].currentRefinement === '') { return res; } return res.concat(meta.items); } } return res; }, []); return { items: props.transformItems ? props.transformItems(items) : items, canRefine: items.length > 0 }; }, refine: function refine(props, searchState, items) { // `value` corresponds to our internal clear function computed in each connector metadata. var refinementsToClear = items instanceof Array ? items.map(function (item) { return item.value; }) : [items]; return refinementsToClear.reduce(function (res, clear) { return clear(res); }, searchState); } }); /***/ }), /* 207 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _highlight = __webpack_require__(233); var _highlight2 = _interopRequireDefault(_highlight); var _highlightTags = __webpack_require__(209); var _highlightTags2 = _interopRequireDefault(_highlightTags); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var highlight = function highlight(_ref) { var attributeName = _ref.attributeName; var hit = _ref.hit; var highlightProperty = _ref.highlightProperty; return (0, _highlight2.default)({ attributeName: attributeName, hit: hit, preTag: _highlightTags2.default.highlightPreTag, postTag: _highlightTags2.default.highlightPostTag, highlightProperty: highlightProperty }); }; /** * connectHighlight connector provides the logic to create an highlighter * component that will retrieve, parse and render an highlighted attribute * from an Algolia hit. * @name connectHighlight * @kind connector * @category connector * @providedPropType {function} highlight - the function to retrieve and parse an attribute from a hit. It takes a configuration object with 3 attribute: `highlightProperty` which is the property that contains the highlight structure from the records, `attributeName` which is the name of the attribute to look for and `hit` which is the hit from Algolia. It returns an array of object `{value: string, isHighlighted: boolean}`. * @example * const CustomHighlight = connectHighlight(({highlight, attributeName, hit, highlightProperty) => { * const parsedHit = highlight({attributeName, hit, highlightProperty}); * return parsedHit.map(part => { * if(part.isHighlighted) return <em>{part.value}</em>; * return part.value: * }); * }); */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaHighlighter', propTypes: {}, getProvidedProps: function getProvidedProps() { return { highlight: highlight }; } }); /***/ }), /* 208 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _SearchBox = __webpack_require__(342); var _SearchBox2 = _interopRequireDefault(_SearchBox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var itemsPropType = _react.PropTypes.arrayOf(_react.PropTypes.shape({ value: _react.PropTypes.any, label: _react.PropTypes.string.isRequired, items: function items() { return itemsPropType.apply(undefined, arguments); } })); var List = function (_Component) { _inherits(List, _Component); function List() { _classCallCheck(this, List); var _this = _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).call(this)); _this.defaultProps = { isFromSearch: false }; _this.onShowMoreClick = function () { _this.setState(function (state) { return { extended: !state.extended }; }); }; _this.getLimit = function () { var _this$props = _this.props; var limitMin = _this$props.limitMin; var limitMax = _this$props.limitMax; var extended = _this.state.extended; return extended ? limitMax : limitMin; }; _this.resetQuery = function () { _this.setState({ query: '' }); }; _this.renderItem = function (item, resetQuery) { var items = item.items && _react2.default.createElement( 'div', _this.props.cx('itemItems'), item.items.slice(0, _this.getLimit()).map(function (child) { return _this.renderItem(child, item); }) ); return _react2.default.createElement( 'div', _extends({ key: item.key || item.label }, _this.props.cx('item', item.isRefined && 'itemSelected', item.noRefinement && 'itemNoRefinement', items && 'itemParent', items && item.isRefined && 'itemSelectedParent')), _this.props.renderItem(item, resetQuery), items ); }; _this.state = { extended: false, query: '' }; return _this; } _createClass(List, [{ key: 'renderShowMore', value: function renderShowMore() { var _props = this.props; var showMore = _props.showMore; var translate = _props.translate; var cx = _props.cx; var extended = this.state.extended; var disabled = this.props.limitMin >= this.props.items.length; if (!showMore) { return null; } return _react2.default.createElement( 'button', _extends({ disabled: disabled }, cx('showMore', disabled && 'showMoreDisabled'), { onClick: this.onShowMoreClick }), translate('showMore', extended) ); } }, { key: 'renderSearchBox', value: function renderSearchBox() { var _this2 = this; var _props2 = this.props; var cx = _props2.cx; var searchForItems = _props2.searchForItems; var isFromSearch = _props2.isFromSearch; var translate = _props2.translate; var items = _props2.items; var selectItem = _props2.selectItem; var noResults = items.length === 0 && this.state.query !== '' ? _react2.default.createElement( 'div', cx('noResults'), translate('noResults') ) : null; return _react2.default.createElement( 'div', cx('SearchBox'), _react2.default.createElement(_SearchBox2.default, { currentRefinement: this.state.query, refine: function refine(value) { _this2.setState({ query: value }); searchForItems(value); }, focusShortcuts: [], translate: translate, onSubmit: function onSubmit(e) { e.preventDefault(); e.stopPropagation(); if (isFromSearch) { selectItem(items[0], _this2.resetQuery); } } }), noResults ); } }, { key: 'render', value: function render() { var _this3 = this; var _props3 = this.props; var cx = _props3.cx; var items = _props3.items; var withSearchBox = _props3.withSearchBox; var canRefine = _props3.canRefine; var searchBox = withSearchBox ? this.renderSearchBox() : null; if (items.length === 0) { return _react2.default.createElement( 'div', cx('root', !canRefine && 'noRefinement'), searchBox ); } // Always limit the number of items we show on screen, since the actual // number of retrieved items might vary with the `maxValuesPerFacet` config // option. var limit = this.getLimit(); return _react2.default.createElement( 'div', cx('root', !this.props.canRefine && 'noRefinement'), searchBox, _react2.default.createElement( 'div', cx('items'), items.slice(0, limit).map(function (item) { return _this3.renderItem(item, _this3.resetQuery); }) ), this.renderShowMore() ); } }]); return List; }(_react.Component); List.propTypes = { cx: _react.PropTypes.func.isRequired, // Only required with showMore. translate: _react.PropTypes.func, items: itemsPropType, renderItem: _react.PropTypes.func.isRequired, selectItem: _react.PropTypes.func, showMore: _react.PropTypes.bool, limitMin: _react.PropTypes.number, limitMax: _react.PropTypes.number, limit: _react.PropTypes.number, show: _react.PropTypes.func, searchForItems: _react.PropTypes.func, withSearchBox: _react.PropTypes.bool, isFromSearch: _react.PropTypes.bool, canRefine: _react.PropTypes.bool }; exports.default = List; /***/ }), /* 209 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var timestamp = Date.now().toString(); exports.default = { highlightPreTag: "<ais-highlight-" + timestamp + ">", highlightPostTag: "</ais-highlight-" + timestamp + ">" }; /***/ }), /* 210 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var AlgoliaSearchHelper = __webpack_require__(244); var SearchParameters = __webpack_require__(81); var SearchResults = __webpack_require__(115); /** * The algoliasearchHelper module is the function that will let its * contains everything needed to use the Algoliasearch * Helper. It is a also a function that instanciate the helper. * To use the helper, you also need the Algolia JS client v3. * @example * //using the UMD build * var client = algoliasearch('latency', '6be0576ff61c053d5f9a3225e2a90f76'); * var helper = algoliasearchHelper(client, 'bestbuy', { * facets: ['shipping'], * disjunctiveFacets: ['category'] * }); * helper.on('result', function(result) { * console.log(result); * }); * helper.toggleRefine('Movies & TV Shows') * .toggleRefine('Free shipping') * .search(); * @example * // The helper is an event emitter using the node API * helper.on('result', updateTheResults); * helper.once('result', updateTheResults); * helper.removeListener('result', updateTheResults); * helper.removeAllListeners('result'); * @module algoliasearchHelper * @param {AlgoliaSearch} client an AlgoliaSearch client * @param {string} index the name of the index to query * @param {SearchParameters|object} opts an object defining the initial config of the search. It doesn't have to be a {SearchParameters}, just an object containing the properties you need from it. * @return {AlgoliaSearchHelper} */ function algoliasearchHelper(client, index, opts) { return new AlgoliaSearchHelper(client, index, opts); } /** * The version currently used * @member module:algoliasearchHelper.version * @type {number} */ algoliasearchHelper.version = __webpack_require__(118); /** * Constructor for the Helper. * @member module:algoliasearchHelper.AlgoliaSearchHelper * @type {AlgoliaSearchHelper} */ algoliasearchHelper.AlgoliaSearchHelper = AlgoliaSearchHelper; /** * Constructor for the object containing all the parameters of the search. * @member module:algoliasearchHelper.SearchParameters * @type {SearchParameters} */ algoliasearchHelper.SearchParameters = SearchParameters; /** * Constructor for the object containing the results of the search. * @member module:algoliasearchHelper.SearchResults * @type {SearchResults} */ algoliasearchHelper.SearchResults = SearchResults; /** * URL tools to generate query string and parse them from/into * SearchParameters * @member module:algoliasearchHelper.url * @type {object} {@link url} * */ algoliasearchHelper.url = __webpack_require__(117); module.exports = algoliasearchHelper; /***/ }), /* 211 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) { /** * This is the web browser implementation of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = __webpack_require__(400); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = 'undefined' != typeof chrome && 'undefined' != typeof chrome.storage ? chrome.storage.local : localstorage(); /** * Colors. */ exports.colors = [ 'lightseagreen', 'forestgreen', 'goldenrod', 'dodgerblue', 'darkorchid', 'crimson' ]; /** * Currently only WebKit-based Web Inspectors, Firefox >= v31, * and the Firebug extension (any Firefox version) are known * to support "%c" CSS customizations. * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ function useColors() { // is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 return (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) || // is firebug? http://stackoverflow.com/a/398120/376773 (window.console && (console.firebug || (console.exception && console.table))) || // is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31); } /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ exports.formatters.j = function(v) { try { return JSON.stringify(v); } catch (err) { return '[UnexpectedJSONParseError]: ' + err.message; } }; /** * Colorize log arguments if enabled. * * @api public */ function formatArgs() { var args = arguments; var useColors = this.useColors; args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff); if (!useColors) return args; var c = 'color: ' + this.color; args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1)); // the final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into var index = 0; var lastC = 0; args[0].replace(/%[a-z%]/g, function(match) { if ('%%' === match) return; index++; if ('%c' === match) { // we only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); return args; } /** * Invokes `console.log()` when available. * No-op when `console.log` is not a "function". * * @api public */ function log() { // this hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { try { if (null == namespaces) { exports.storage.removeItem('debug'); } else { exports.storage.debug = namespaces; } } catch(e) {} } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { var r; try { return exports.storage.debug; } catch(e) {} // If debug isn't set in LS, and we're in Electron, try to load $DEBUG if (typeof process !== 'undefined' && 'env' in process) { return process.env.DEBUG; } } /** * Enable namespaces listed in `localStorage.debug` initially. */ exports.enable(load()); /** * Localstorage attempts to return the localstorage. * * This is necessary because safari throws * when a user disables cookies/localstorage * and you attempt to access it. * * @return {LocalStorage} * @api private */ function localstorage(){ try { return window.localStorage; } catch (e) {} } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(108))) /***/ }), /* 212 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This file hosts our error definitions // We use custom error "types" so that we can act on them when we need it // e.g.: if error instanceof errors.UnparsableJSON then.. var inherits = __webpack_require__(345); function AlgoliaSearchError(message, extraProperties) { var forEach = __webpack_require__(109); var error = this; // try to get a stacktrace if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, this.constructor); } else { error.stack = (new Error()).stack || 'Cannot get a stacktrace, browser is too old'; } this.name = 'AlgoliaSearchError'; this.message = message || 'Unknown error'; if (extraProperties) { forEach(extraProperties, function addToErrorObject(value, key) { error[key] = value; }); } } inherits(AlgoliaSearchError, Error); function createCustomError(name, message) { function AlgoliaSearchCustomError() { var args = Array.prototype.slice.call(arguments, 0); // custom message not set, use default if (typeof args[0] !== 'string') { args.unshift(message); } AlgoliaSearchError.apply(this, args); this.name = 'AlgoliaSearch' + name + 'Error'; } inherits(AlgoliaSearchCustomError, AlgoliaSearchError); return AlgoliaSearchCustomError; } // late exports to let various fn defs and inherits take place module.exports = { AlgoliaSearchError: AlgoliaSearchError, UnparsableJSON: createCustomError( 'UnparsableJSON', 'Could not parse the incoming response as JSON, see err.more for details' ), RequestTimeout: createCustomError( 'RequestTimeout', 'Request timedout before getting a response' ), Network: createCustomError( 'Network', 'Network issue, see err.more for details' ), JSONPScriptFail: createCustomError( 'JSONPScriptFail', '<script> was loaded but did not call our provided callback' ), JSONPScriptError: createCustomError( 'JSONPScriptError', '<script> unable to load due to an `error` event on it' ), Unknown: createCustomError( 'Unknown', 'Unknown error occured' ) }; /***/ }), /* 213 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(17), isArrayLike = __webpack_require__(10), isIndex = __webpack_require__(30), isObject = __webpack_require__(5); /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike(object) && isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq(object[index], value); } return false; } module.exports = isIterateeCall; /***/ }), /* 214 */ /***/ (function(module, exports, __webpack_require__) { var isNumber = __webpack_require__(200); /** * Checks if `value` is `NaN`. * * **Note:** This method is based on * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for * `undefined` and other non-number values. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. * @example * * _.isNaN(NaN); * // => true * * _.isNaN(new Number(NaN)); * // => true * * isNaN(undefined); * // => true * * _.isNaN(undefined); * // => false */ function isNaN(value) { // An `NaN` primitive is the only value that is not equal to itself. // Perform the `toStringTag` check first to avoid errors with some // ActiveX objects in IE. return isNumber(value) && value != +value; } module.exports = isNaN; /***/ }), /* 215 */ /***/ (function(module, exports, __webpack_require__) { var toNumber = __webpack_require__(337); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_INTEGER = 1.7976931348623157e+308; /** * Converts `value` to a finite number. * * @static * @memberOf _ * @since 4.12.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted number. * @example * * _.toFinite(3.2); * // => 3.2 * * _.toFinite(Number.MIN_VALUE); * // => 5e-324 * * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * * _.toFinite('3.2'); * // => 3.2 */ function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } return value === value ? value : 0; } module.exports = toFinite; /***/ }), /* 216 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _keys2 = __webpack_require__(8); var _keys3 = _interopRequireDefault(_keys2); var _difference2 = __webpack_require__(324); var _difference3 = _interopRequireDefault(_difference2); var _omit2 = __webpack_require__(37); var _omit3 = _interopRequireDefault(_omit2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId() { return 'configure'; } exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaConfigure', getProvidedProps: function getProvidedProps() { return {}; }, getSearchParameters: function getSearchParameters(searchParameters, props) { var items = (0, _omit3.default)(props, 'children'); return searchParameters.setQueryParameters(items); }, transitionState: function transitionState(props, prevSearchState, nextSearchState) { var id = getId(); var items = (0, _omit3.default)(props, 'children'); var nonPresentKeys = this._props ? (0, _difference3.default)((0, _keys3.default)(this._props), (0, _keys3.default)(props)) : []; this._props = props; var nextValue = _defineProperty({}, id, _extends({}, (0, _omit3.default)(nextSearchState[id], nonPresentKeys), items)); return (0, _indexUtils.refineValue)(nextSearchState, nextValue, this.context); }, cleanUp: function cleanUp(props, searchState) { var id = getId(); var index = (0, _indexUtils.getIndex)(this.context); var subState = (0, _indexUtils.hasMultipleIndex)(this.context) && searchState.indices ? searchState.indices[index] : searchState; var configureKeys = subState[id] ? Object.keys(subState[id]) : []; var configureState = configureKeys.reduce(function (acc, item) { if (!props[item]) { acc[item] = subState[id][item]; } return acc; }, {}); var nextValue = _defineProperty({}, id, configureState); return (0, _indexUtils.refineValue)(searchState, nextValue, this.context); } }); /***/ }), /* 217 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getId = undefined; var _react = __webpack_require__(0); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _algoliasearchHelper = __webpack_require__(210); var _indexUtils = __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var getId = exports.getId = function getId(props) { return props.attributes[0]; }; var namespace = 'hierarchicalMenu'; function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), null, function (currentRefinement) { if (currentRefinement === '') { return null; } return currentRefinement; }); } function getValue(path, props, searchState, context) { var id = props.id; var attributes = props.attributes; var separator = props.separator; var rootPath = props.rootPath; var showParentLevel = props.showParentLevel; var currentRefinement = getCurrentRefinement(props, searchState, context); var nextRefinement = void 0; if (currentRefinement === null) { nextRefinement = path; } else { var tmpSearchParameters = new _algoliasearchHelper.SearchParameters({ hierarchicalFacets: [{ name: id, attributes: attributes, separator: separator, rootPath: rootPath, showParentLevel: showParentLevel }] }); nextRefinement = tmpSearchParameters.toggleHierarchicalFacetRefinement(id, currentRefinement).toggleHierarchicalFacetRefinement(id, path).getHierarchicalRefinement(id)[0]; } return nextRefinement; } function transformValue(value, limit, props, searchState, context) { return value.slice(0, limit).map(function (v) { return { label: v.name, value: getValue(v.path, props, searchState, context), count: v.count, isRefined: v.isRefined, items: v.data && transformValue(v.data, limit, props, searchState, context) }; }); } function _refine(props, searchState, nextRefinement, context) { var id = getId(props); var nextValue = _defineProperty({}, id, nextRefinement || ''); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } var sortBy = ['name:asc']; /** * connectHierarchicalMenu connector provides the logic to build a widget that will * give the user the ability to explore a tree-like structure. * This is commonly used for multi-level categorization of products on e-commerce * websites. From a UX point of view, we suggest not displaying more than two levels deep. * @name connectHierarchicalMenu * @requirements To use this widget, your attributes must be formatted in a specific way. * If you want for example to have a hiearchical menu of categories, objects in your index * should be formatted this way: * * ```json * { * "categories.lvl0": "products", * "categories.lvl1": "products > fruits", * "categories.lvl2": "products > fruits > citrus" * } * ``` * * It's also possible to provide more than one path for each level: * * ```json * { * "categories.lvl0": ["products", "goods"], * "categories.lvl1": ["products > fruits", "goods > to eat"] * } * ``` * * All attributes passed to the `attributes` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * * @kind connector * @propType {string} attributes - List of attributes to use to generate the hierarchy of the menu. See the example for the convention to follow. * @propType {string} [defaultRefinement] - the item value selected by default * @propType {boolean} [showMore=false] - Flag to activate the show more button, for toggling the number of items between limitMin and limitMax. * @propType {number} [limitMin=10] - The maximum number of items displayed. * @propType {number} [limitMax=20] - The maximum number of items displayed when the user triggers the show more. Not considered if `showMore` is false. * @propType {string} [separator='>'] - Specifies the level separator used in the data. * @propType {string[]} [rootPath=null] - The already selected and hidden path. * @propType {boolean} [showParentLevel=true] - Flag to set if the parent level should be displayed. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{items: object, count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the HierarchicalMenu can display. items has the same shape as parent items. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaHierarchicalMenu', propTypes: { attributes: function attributes(props, propName, componentName) { var isNotString = function isNotString(val) { return typeof val !== 'string'; }; if (!Array.isArray(props[propName]) || props[propName].some(isNotString) || props[propName].length < 1) { return new Error('Invalid prop ' + propName + ' supplied to ' + componentName + '. Expected an Array of Strings'); } return undefined; }, separator: _react.PropTypes.string, rootPath: _react.PropTypes.string, showParentLevel: _react.PropTypes.bool, defaultRefinement: _react.PropTypes.string, showMore: _react.PropTypes.bool, limitMin: _react.PropTypes.number, limitMax: _react.PropTypes.number, transformItems: _react.PropTypes.func }, defaultProps: { showMore: false, limitMin: 10, limitMax: 20, separator: ' > ', rootPath: null, showParentLevel: true }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var showMore = props.showMore; var limitMin = props.limitMin; var limitMax = props.limitMax; var id = getId(props); var index = (0, _indexUtils.getIndex)(this.context); var results = (0, _indexUtils.getResults)(searchResults, this.context); var isFacetPresent = Boolean(results) && Boolean(results.getFacetByName(id)); if (!isFacetPresent) { return { items: [], currentRefinement: getCurrentRefinement(props, searchState, this.context), canRefine: false }; } var limit = showMore ? limitMax : limitMin; var value = results.getFacetValues(id, { sortBy: sortBy }); var items = value.data ? transformValue(value.data, limit, props, searchState, this.context) : []; return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: getCurrentRefinement(props, searchState, this.context), canRefine: items.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributes = props.attributes; var separator = props.separator; var rootPath = props.rootPath; var showParentLevel = props.showParentLevel; var showMore = props.showMore; var limitMin = props.limitMin; var limitMax = props.limitMax; var id = getId(props); var limit = showMore ? limitMax : limitMin; searchParameters = searchParameters.addHierarchicalFacet({ name: id, attributes: attributes, separator: separator, rootPath: rootPath, showParentLevel: showParentLevel }).setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit) }); var currentRefinement = getCurrentRefinement(props, searchState, this.context); if (currentRefinement !== null) { searchParameters = searchParameters.toggleHierarchicalFacetRefinement(id, currentRefinement); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var rootAttribute = props.attributes[0]; var id = getId(props); var currentRefinement = getCurrentRefinement(props, searchState, this.context); return { id: id, index: (0, _indexUtils.getIndex)(this.context), items: !currentRefinement ? [] : [{ label: rootAttribute + ': ' + currentRefinement, attributeName: rootAttribute, value: function value(nextState) { return _refine(props, nextState, '', _this.context); }, currentRefinement: currentRefinement }] }; } }); /***/ }), /* 218 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * connectHits connector provides the logic to create connected * components that will render the results retrieved from * Algolia. * * To configure the number of hits retrieved, use [HitsPerPage widget](widgets/HitsPerPage.html), * [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or pass the hitsPerPage * prop to a [Configure](guide/Search_parameters.html) widget. * @name connectHits * @kind connector * @providedPropType {array.<object>} hits - the records that matched the search state */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaHits', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var index = (0, _indexUtils.getIndex)(this.context); var results = (0, _indexUtils.getResults)(searchResults, this.context); var hits = results ? results.hits : []; return { hits: hits }; }, /* Hits needs to be considered as a widget to trigger a search if no others widgets are used. * To be considered as a widget you need either getSearchParameters, getMetadata or getTransitionState * See createConnector.js * */ getSearchParameters: function getSearchParameters(searchParameters) { return searchParameters; } }); /***/ }), /* 219 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(0); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId() { return 'hitsPerPage'; } function getCurrentRefinement(props, searchState, context) { var id = getId(); return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, null, function (currentRefinement) { if (typeof currentRefinement === 'string') { return parseInt(currentRefinement, 10); } return currentRefinement; }); } /** * connectHitsPerPage connector provides the logic to create connected * components that will allow a user to choose to display more or less results from Algolia. * @name connectHitsPerPage * @kind connector * @propType {number} defaultRefinement - The number of items selected by default * @propType {{value: number, label: string}[]} items - List of hits per page options. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{isRefined: boolean, label?: string, value: number}>} items - the list of items the HitsPerPage can display. If no label provided, the value will be displayed. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaHitsPerPage', propTypes: { defaultRefinement: _react.PropTypes.number.isRequired, items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ label: _react.PropTypes.string, value: _react.PropTypes.number.isRequired })).isRequired, transformItems: _react.PropTypes.func }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement(props, searchState, this.context); var items = props.items.map(function (item) { return item.value === currentRefinement ? _extends({}, item, { isRefined: true }) : _extends({}, item, { isRefined: false }); }); return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { var id = getId(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, this.context, resetPage); }, cleanUp: function cleanUp(props, searchState) { return (0, _indexUtils.cleanUpValue)(searchState, this.context, getId()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setHitsPerPage(getCurrentRefinement(props, searchState, this.context)); }, getMetadata: function getMetadata() { return { id: getId() }; } }); /***/ }), /* 220 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function getId() { return 'page'; } function getCurrentRefinement(props, searchState, context) { var id = getId(); var page = 1; return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, page, function (currentRefinement) { if (typeof currentRefinement === 'string') { currentRefinement = parseInt(currentRefinement, 10); } return currentRefinement; }); } /** * InfiniteHits connector provides the logic to create connected * components that will render an continuous list of results retrieved from * Algolia. This connector provides a function to load more results. * @name connectInfiniteHits * @kind connector * @providedPropType {array.<object>} hits - the records that matched the search state * @providedPropType {boolean} hasMore - indicates if there are more pages to load * @providedPropType {function} refine - call to load more results */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaInfiniteHits', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var index = (0, _indexUtils.getIndex)(this.context); var results = (0, _indexUtils.getResults)(searchResults, this.context); if (!results) { this._allResults = []; return { hits: this._allResults, hasMore: false }; } var hits = results.hits; var page = results.page; var nbPages = results.nbPages; var hitsPerPage = results.hitsPerPage; if (page === 0) { this._allResults = hits; } else { var previousPage = this._allResults.length / hitsPerPage - 1; if (page > previousPage) { this._allResults = [].concat(_toConsumableArray(this._allResults), _toConsumableArray(hits)); } else if (page < previousPage) { this._allResults = hits; } // If it is the same page we do not touch the page result list } var lastPageIndex = nbPages - 1; var hasMore = page < lastPageIndex; return { hits: this._allResults, hasMore: hasMore }; }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQueryParameters({ page: getCurrentRefinement(props, searchState, this.context) - 1 }); }, refine: function refine(props, searchState) { var id = getId(); var nextPage = getCurrentRefinement(props, searchState, this.context) + 1; var nextValue = _defineProperty({}, id, nextPage); var resetPage = false; return (0, _indexUtils.refineValue)(searchState, nextValue, this.context, resetPage); } }); /***/ }), /* 221 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _orderBy2 = __webpack_require__(106); var _orderBy3 = _interopRequireDefault(_orderBy2); var _react = __webpack_require__(0); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var namespace = 'menu'; function getId(props) { return props.attributeName; } function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), null, function (currentRefinement) { if (currentRefinement === '') { return null; } return currentRefinement; }); } function getValue(name, props, searchState, context) { var currentRefinement = getCurrentRefinement(props, searchState, context); return name === currentRefinement ? '' : name; } function _refine(props, searchState, nextRefinement, context) { var id = getId(props); var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : ''); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } var sortBy = ['count:desc', 'name:asc']; /** * connectMenu connector provides the logic to build a widget that will * give the user tha ability to choose a single value for a specific facet. * @name connectMenu * @requirements The attribute passed to the `attributeName` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * @kind connector * @propType {string} attributeName - the name of the attribute in the record * @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items * @propType {number} [limitMin=10] - the minimum number of diplayed items * @propType {number} [limitMax=20] - the maximun number of displayed items. Only used when showMore is set to `true` * @propType {string} [defaultRefinement] - the value of the item selected by default * @propType {boolean} [withSearchBox=false] - allow search inside values * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the Menu can display. * @providedPropType {function} searchForItems - a function to toggle a search inside items values * @providedPropType {boolean} isFromSearch - a boolean that says if the `items` props contains facet values from the global search or from the search inside items. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaMenu', propTypes: { attributeName: _react.PropTypes.string.isRequired, showMore: _react.PropTypes.bool, limitMin: _react.PropTypes.number, limitMax: _react.PropTypes.number, defaultRefinement: _react.PropTypes.string, transformItems: _react.PropTypes.func, withSearchBox: _react.PropTypes.bool, searchForFacetValues: _react.PropTypes.bool }, defaultProps: { showMore: false, limitMin: 10, limitMax: 20 }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, meta, searchForFacetValuesResults) { var _this = this; var attributeName = props.attributeName; var showMore = props.showMore; var limitMin = props.limitMin; var limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; var index = (0, _indexUtils.getIndex)(this.context); var results = (0, _indexUtils.getResults)(searchResults, this.context); var canRefine = Boolean(results) && Boolean(results.getFacetByName(attributeName)); var isFromSearch = Boolean(searchForFacetValuesResults && searchForFacetValuesResults[attributeName] && searchForFacetValuesResults.query !== ''); var withSearchBox = props.withSearchBox || props.searchForFacetValues; if (false) { // eslint-disable-next-line no-console console.warn('react-instantsearch: `searchForFacetValues` has been renamed to' + '`withSearchBox`, this will break in the next major version.'); } // Search For Facet Values is not available with derived helper (used for multi index search) if (props.withSearchBox && this.context.multiIndexContext) { throw new Error('react-instantsearch: searching in *List is not available when used inside a' + ' multi index context'); } if (!canRefine) { return { items: [], currentRefinement: getCurrentRefinement(props, searchState, this.context), isFromSearch: isFromSearch, withSearchBox: withSearchBox, canRefine: canRefine }; } var items = isFromSearch ? searchForFacetValuesResults[attributeName].map(function (v) { return { label: v.value, value: getValue(v.value, props, searchState, _this.context), _highlightResult: { label: { value: v.highlighted } }, count: v.count, isRefined: v.isRefined }; }) : results.getFacetValues(attributeName, { sortBy: sortBy }).map(function (v) { return { label: v.name, value: getValue(v.name, props, searchState, _this.context), count: v.count, isRefined: v.isRefined }; }); var sortedItems = withSearchBox && !isFromSearch ? (0, _orderBy3.default)(items, ['isRefined', 'count', 'label'], ['desc', 'desc', 'asc']) : items; var transformedItems = props.transformItems ? props.transformItems(sortedItems) : sortedItems; return { items: transformedItems.slice(0, limit), currentRefinement: getCurrentRefinement(props, searchState, this.context), isFromSearch: isFromSearch, withSearchBox: withSearchBox, canRefine: items.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, searchForFacetValues: function searchForFacetValues(props, searchState, nextRefinement) { return { facetName: props.attributeName, query: nextRefinement }; }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName; var showMore = props.showMore; var limitMin = props.limitMin; var limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; searchParameters = searchParameters.setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit) }); searchParameters = searchParameters.addDisjunctiveFacet(attributeName); var currentRefinement = getCurrentRefinement(props, searchState, this.context); if (currentRefinement !== null) { searchParameters = searchParameters.addDisjunctiveFacetRefinement(attributeName, currentRefinement); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this2 = this; var id = getId(props); var currentRefinement = getCurrentRefinement(props, searchState, this.context); return { id: id, index: (0, _indexUtils.getIndex)(this.context), items: currentRefinement === null ? [] : [{ label: props.attributeName + ': ' + currentRefinement, attributeName: props.attributeName, value: function value(nextState) { return _refine(props, nextState, '', _this2.context); }, currentRefinement: currentRefinement }] }; } }); /***/ }), /* 222 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isEmpty2 = __webpack_require__(15); var _isEmpty3 = _interopRequireDefault(_isEmpty2); var _find3 = __webpack_require__(46); var _find4 = _interopRequireDefault(_find3); var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _react = __webpack_require__(0); var _indexUtils = __webpack_require__(4); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function stringifyItem(item) { if (typeof item.start === 'undefined' && typeof item.end === 'undefined') { return ''; } return (item.start ? item.start : '') + ':' + (item.end ? item.end : ''); } function parseItem(value) { if (value.length === 0) { return { start: null, end: null }; } var _value$split = value.split(':'); var _value$split2 = _slicedToArray(_value$split, 2); var startStr = _value$split2[0]; var endStr = _value$split2[1]; return { start: startStr.length > 0 ? parseInt(startStr, 10) : null, end: endStr.length > 0 ? parseInt(endStr, 10) : null }; } var namespace = 'multiRange'; function getId(props) { return props.attributeName; } function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), '', function (currentRefinement) { if (currentRefinement === '') { return ''; } return currentRefinement; }); } function isRefinementsRangeIncludesInsideItemRange(stats, start, end) { return stats.min > start && stats.min < end || stats.max > start && stats.max < end; } function isItemRangeIncludedInsideRefinementsRange(stats, start, end) { return start > stats.min && start < stats.max || end > stats.min && end < stats.max; } function itemHasRefinement(attributeName, results, value) { var stats = results.getFacetByName(attributeName) ? results.getFacetStats(attributeName) : null; var range = value.split(':'); var start = Number(range[0]) === 0 || value === '' ? Number.NEGATIVE_INFINITY : Number(range[0]); var end = Number(range[1]) === 0 || value === '' ? Number.POSITIVE_INFINITY : Number(range[1]); return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end))); } function _refine(props, searchState, nextRefinement, context) { var nextValue = _defineProperty({}, getId(props, searchState), nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } /** * connectMultiRange connector provides the logic to build a widget that will * give the user the ability to select a range value for a numeric attribute. * Ranges are defined statically. * @name connectMultiRange * @requirements The attribute passed to the `attributeName` prop must be holding numerical values. * @kind connector * @propType {string} attributeName - the name of the attribute in the records * @propType {{label: string, start: number, end: number}[]} items - List of options. With a text label, and upper and lower bounds. * @propType {string} [defaultRefinement] - the value of the item selected by default, follow the shape of a `string` with a pattern of `'{start}:{end}'`. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to select a range. * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied. follow the shape of a `string` with a pattern of `'{start}:{end}'` which corresponds to the current selected item. For instance, when the selected item is `{start: 10, end: 20}`, the searchState of the widget is `'10:20'`. When `start` isn't defined, the searchState of the widget is `':{end}'`, and the same way around when `end` isn't defined. However, when neither `start` nor `end` are defined, the searchState is an empty string. * @providedPropType {array.<{isRefined: boolean, label: string, value: string, isRefined: boolean, noRefinement: boolean}>} items - the list of ranges the MultiRange can display. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaMultiRange', propTypes: { id: _react.PropTypes.string, attributeName: _react.PropTypes.string.isRequired, items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ label: _react.PropTypes.node, start: _react.PropTypes.number, end: _react.PropTypes.number })).isRequired, transformItems: _react.PropTypes.func }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var attributeName = props.attributeName; var currentRefinement = getCurrentRefinement(props, searchState, this.context); var index = (0, _indexUtils.getIndex)(this.context); var results = (0, _indexUtils.getResults)(searchResults, this.context); var items = props.items.map(function (item) { var value = stringifyItem(item); return { label: item.label, value: value, isRefined: value === currentRefinement, noRefinement: results ? itemHasRefinement(getId(props), results, value) : false }; }); var stats = results && results.getFacetByName(attributeName) ? results.getFacetStats(attributeName) : null; var refinedItem = (0, _find4.default)(items, function (item) { return item.isRefined === true; }); if (!items.some(function (item) { return item.value === ''; })) { items.push({ value: '', isRefined: (0, _isEmpty3.default)(refinedItem), noRefinement: !stats, label: 'All' }); } return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement, canRefine: items.length > 0 && items.some(function (item) { return item.noRefinement === false; }) }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName; var _parseItem = parseItem(getCurrentRefinement(props, searchState, this.context)); var start = _parseItem.start; var end = _parseItem.end; searchParameters = searchParameters.addDisjunctiveFacet(attributeName); if (start) { searchParameters = searchParameters.addNumericRefinement(attributeName, '>=', start); } if (end) { searchParameters = searchParameters.addNumericRefinement(attributeName, '<=', end); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId(props); var value = getCurrentRefinement(props, searchState, this.context); var items = []; var index = (0, _indexUtils.getIndex)(this.context); if (value !== '') { var _find2 = (0, _find4.default)(props.items, function (item) { return stringifyItem(item) === value; }); var label = _find2.label; items.push({ label: props.attributeName + ': ' + label, attributeName: props.attributeName, currentRefinement: label, value: function value(nextState) { return _refine(props, nextState, '', _this.context); } }); } return { id: id, index: index, items: items }; } }); /***/ }), /* 223 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _indexUtils = __webpack_require__(4); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId() { return 'page'; } function getCurrentRefinement(props, searchState, context) { var id = getId(); var page = 1; return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, page, function (currentRefinement) { if (typeof currentRefinement === 'string') { return parseInt(currentRefinement, 10); } return currentRefinement; }); } function _refine(props, searchState, nextPage, context) { var id = getId(); var nextValue = _defineProperty({}, id, nextPage); var resetPage = false; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage); } /** * connectPagination connector provides the logic to build a widget that will * let the user displays hits corresponding to a certain page. * @name connectPagination * @kind connector * @propType {boolean} [showFirst=true] - Display the first page link. * @propType {boolean} [showLast=false] - Display the last page link. * @propType {boolean} [showPrevious=true] - Display the previous page link. * @propType {boolean} [showNext=true] - Display the next page link. * @propType {number} [pagesPadding=3] - How many page links to display around the current page. * @propType {number} [maxPages=Infinity] - Maximum number of pages to display. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {number} nbPages - the total of existing pages * @providedPropType {number} currentRefinement - the page refinement currently applied */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaPagination', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var index = (0, _indexUtils.getIndex)(this.context); var results = (0, _indexUtils.getResults)(searchResults, this.context); if (!results) { return null; } var nbPages = results.nbPages; return { nbPages: nbPages, currentRefinement: getCurrentRefinement(props, searchState, this.context), canRefine: nbPages > 1 }; }, refine: function refine(props, searchState, nextPage) { return _refine(props, searchState, nextPage, this.context); }, cleanUp: function cleanUp(props, searchState) { return (0, _indexUtils.cleanUpValue)(searchState, this.context, getId()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setPage(getCurrentRefinement(props, searchState, this.context) - 1); }, getMetadata: function getMetadata() { return { id: getId() }; } }); /***/ }), /* 224 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * connectPoweredBy connector provides the logic to build a widget that * will display a link to algolia. * @name connectPoweredBy * @kind connector * @providedPropType {string} url - the url to redirect to algolia */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaPoweredBy', propTypes: {}, getProvidedProps: function getProvidedProps() { var url = 'https://www.algolia.com/?' + 'utm_source=react-instantsearch&' + 'utm_medium=website&' + ('utm_content=' + location.hostname + '&') + 'utm_campaign=poweredby'; return { url: url }; } }); /***/ }), /* 225 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _indexUtils = __webpack_require__(4); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var namespace = 'refinementList'; function getId(props) { return props.attributeName; } function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), [], function (currentRefinement) { if (typeof currentRefinement === 'string') { // All items were unselected if (currentRefinement === '') { return []; } // Only one item was in the searchState but we know it should be an array return [currentRefinement]; } return currentRefinement; }); } function getValue(name, props, searchState, context) { var currentRefinement = getCurrentRefinement(props, searchState, context); var isAnewValue = currentRefinement.indexOf(name) === -1; var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates : currentRefinement.filter(function (selectedValue) { return selectedValue !== name; }); // cannot use .splice(), it mutates return nextRefinement; } function _refine(props, searchState, nextRefinement, context) { var id = getId(props); // Setting the value to an empty string ensures that it is persisted in // the URL as an empty value. // This is necessary in the case where `defaultRefinement` contains one // item and we try to deselect it. `nextSelected` would be an empty array, // which would not be persisted to the URL. // {foo: ['bar']} => "foo[0]=bar" // {foo: []} => "" var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : ''); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } /** * connectRefinementList connector provides the logic to build a widget that will * give the user the ability to choose multiple values for a specific facet. * @name connectRefinementList * @kind connector * @requirements The attribute passed to the `attributeName` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * @propType {string} attributeName - the name of the attribute in the record * @propType {boolean} [withSearchBox=false] - allow search inside values * @propType {string} [operator=or] - How to apply the refinements. Possible values: 'or' or 'and'. * @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items * @propType {number} [limitMin=10] - the minimum number of displayed items * @propType {number} [limitMax=20] - the maximun number of displayed items. Only used when showMore is set to `true` * @propType {string[]} defaultRefinement - the values of the items selected by default. The searchState of this widget takes the form of a list of `string`s, which correspond to the values of all selected refinements. However, when there are no refinements selected, the value of the searchState is an empty string. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string[]} currentRefinement - the refinement currently applied * @providedPropType {array.<{count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the RefinementList can display. * @providedPropType {function} searchForItems - a function to toggle a search inside items values * @providedPropType {boolean} isFromSearch - a boolean that says if the `items` props contains facet values from the global search or from the search inside items. */ var sortBy = ['isRefined', 'count:desc', 'name:asc']; exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaRefinementList', propTypes: { id: _react.PropTypes.string, attributeName: _react.PropTypes.string.isRequired, operator: _react.PropTypes.oneOf(['and', 'or']), showMore: _react.PropTypes.bool, limitMin: _react.PropTypes.number, limitMax: _react.PropTypes.number, defaultRefinement: _react.PropTypes.arrayOf(_react.PropTypes.string), withSearchBox: _react.PropTypes.bool, searchForFacetValues: _react.PropTypes.bool, // @deprecated transformItems: _react.PropTypes.func }, defaultProps: { operator: 'or', showMore: false, limitMin: 10, limitMax: 20 }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata, searchForFacetValuesResults) { var _this = this; var attributeName = props.attributeName; var showMore = props.showMore; var limitMin = props.limitMin; var limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; var index = (0, _indexUtils.getIndex)(this.context); var results = (0, _indexUtils.getResults)(searchResults, this.context); var canRefine = Boolean(results) && Boolean(results.getFacetByName(attributeName)); var isFromSearch = Boolean(searchForFacetValuesResults && searchForFacetValuesResults[attributeName] && searchForFacetValuesResults.query !== ''); var withSearchBox = props.withSearchBox || props.searchForFacetValues; if (false) { // eslint-disable-next-line no-console console.warn('react-instantsearch: `searchForFacetValues` has been renamed to' + '`withSearchBox`, this will break in the next major version.'); } // Search For Facet Values is not available with derived helper (used for multi index search) if (props.withSearchBox && this.context.multiIndexContext) { throw new Error('react-instantsearch: searching in *List is not available when used inside a' + ' multi index context'); } if (!canRefine) { return { items: [], currentRefinement: getCurrentRefinement(props, searchState, this.context), canRefine: canRefine, isFromSearch: isFromSearch, withSearchBox: withSearchBox }; } var items = isFromSearch ? searchForFacetValuesResults[attributeName].map(function (v) { return { label: v.value, value: getValue(v.value, props, searchState, _this.context), _highlightResult: { label: { value: v.highlighted } }, count: v.count, isRefined: v.isRefined }; }) : results.getFacetValues(attributeName, { sortBy: sortBy }).map(function (v) { return { label: v.name, value: getValue(v.name, props, searchState, _this.context), count: v.count, isRefined: v.isRefined }; }); var transformedItems = props.transformItems ? props.transformItems(items) : items; return { items: transformedItems.slice(0, limit), currentRefinement: getCurrentRefinement(props, searchState, this.context), isFromSearch: isFromSearch, withSearchBox: withSearchBox, canRefine: items.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, searchForFacetValues: function searchForFacetValues(props, searchState, nextRefinement) { return { facetName: props.attributeName, query: nextRefinement }; }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName; var operator = props.operator; var showMore = props.showMore; var limitMin = props.limitMin; var limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet'; var addRefinementKey = addKey + 'Refinement'; searchParameters = searchParameters.setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit) }); searchParameters = searchParameters[addKey](attributeName); return getCurrentRefinement(props, searchState, this.context).reduce(function (res, val) { return res[addRefinementKey](attributeName, val); }, searchParameters); }, getMetadata: function getMetadata(props, searchState) { var id = getId(props); var context = this.context; return { id: id, index: (0, _indexUtils.getIndex)(this.context), items: getCurrentRefinement(props, searchState, context).length > 0 ? [{ attributeName: props.attributeName, label: props.attributeName + ': ', currentRefinement: getCurrentRefinement(props, searchState, context), value: function value(nextState) { return _refine(props, nextState, [], context); }, items: getCurrentRefinement(props, searchState, context).map(function (item) { return { label: '' + item, value: function value(nextState) { var nextSelectedItems = getCurrentRefinement(props, nextState, context).filter(function (other) { return other !== item; }); return _refine(props, searchState, nextSelectedItems, context); } }; }) }] : [] }; } }); /***/ }), /* 226 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * connectScrollTo connector provides the logic to build a widget that will * let the page scroll to a certain point. * @name connectScrollTo * @kind connector * @propType {string} [scrollOn="page"] - Widget searchState key on which to listen for changes, default to the pagination widget. * @providedPropType {any} value - the current refinement applied to the widget listened by scrollTo */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaScrollTo', propTypes: { scrollOn: _react.PropTypes.string }, defaultProps: { scrollOn: 'page' }, getProvidedProps: function getProvidedProps(props, searchState) { var id = props.scrollOn; var value = (0, _indexUtils.getCurrentRefinementValue)(props, searchState, this.context, id, null, function (currentRefinement) { return currentRefinement; }); return { value: value }; } }); /***/ }), /* 227 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _react = __webpack_require__(0); var _indexUtils = __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId() { return 'query'; } function getCurrentRefinement(props, searchState, context) { var id = getId(props); return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, '', function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return ''; }); } function _refine(props, searchState, nextRefinement, context) { var id = getId(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, getId()); } /** * connectSearchBox connector provides the logic to build a widget that will * let the user search for a query. * @name connectSearchBox * @kind connector * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the query to search for. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaSearchBox', propTypes: { defaultRefinement: _react.PropTypes.string }, getProvidedProps: function getProvidedProps(props, searchState) { return { currentRefinement: getCurrentRefinement(props, searchState, this.context) }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQuery(getCurrentRefinement(props, searchState, this.context)); }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId(props); var currentRefinement = getCurrentRefinement(props, searchState, this.context); return { id: id, index: (0, _indexUtils.getIndex)(this.context), items: currentRefinement === null ? [] : [{ label: id + ': ' + currentRefinement, value: function value(nextState) { return _refine(props, nextState, '', _this.context); }, currentRefinement: currentRefinement }] }; } }); /***/ }), /* 228 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(0); var _indexUtils = __webpack_require__(4); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId() { return 'sortBy'; } function getCurrentRefinement(props, searchState, context) { var id = getId(props); return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, null, function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return null; }); } /** * connectSortBy connector provides the logic to build a widget that will * displays a list of indexes allowing a user to change the hits are sorting. * @name connectSortBy * @requirements Algolia handles sorting by creating replica indices. [Read more about sorting](https://www.algolia.com/doc/guides/relevance/sorting/) on * the Algolia website. * @kind connector * @propType {string} defaultRefinement - The default selected index. * @propType {{value: string, label: string}[]} items - The list of indexes to search in. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string[]} currentRefinement - the refinement currently applied * @providedPropType {array.<{isRefined: boolean, label?: string, value: string}>} items - the list of items the HitsPerPage can display. If no label provided, the value will be displayed. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaSortBy', propTypes: { defaultRefinement: _react.PropTypes.string, items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ label: _react.PropTypes.string, value: _react.PropTypes.string.isRequired })).isRequired, transformItems: _react.PropTypes.func }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement(props, searchState, this.context); var items = props.items.map(function (item) { return item.value === currentRefinement ? _extends({}, item, { isRefined: true }) : _extends({}, item, { isRefined: false }); }); return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { var id = getId(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, this.context, resetPage); }, cleanUp: function cleanUp(props, searchState) { return (0, _indexUtils.cleanUpValue)(searchState, this.context, getId()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var selectedIndex = getCurrentRefinement(props, searchState, this.context); return searchParameters.setIndex(selectedIndex); }, getMetadata: function getMetadata() { return { id: getId() }; } }); /***/ }), /* 229 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * connectStats connector provides the logic to build a widget that will * displays algolia search statistics (hits number and processing time). * @name connectStats * @kind connector * @providedPropType {number} nbHits - number of hits returned by Algolia. * @providedPropType {number} processingTimeMS - the time in ms took by Algolia to search for results. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaStats', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var index = (0, _indexUtils.getIndex)(this.context); var results = (0, _indexUtils.getResults)(searchResults, this.context); if (!results) { return null; } return { nbHits: results.nbHits, processingTimeMS: results.processingTimeMS }; } }); /***/ }), /* 230 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId(props) { return props.attributeName; } var namespace = 'toggle'; function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), false, function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return null; }); } function _refine(props, searchState, nextRefinement, context) { var id = getId(props); var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } /** * connectToggle connector provides the logic to build a widget that will * provides an on/off filtering feature based on an attribute value. Note that if you provide an “off” option, it will be refined at initialization. * @name connectToggle * @kind connector * @propType {string} attributeName - Name of the attribute on which to apply the `value` refinement. Required when `value` is present. * @propType {string} label - Label for the toggle. * @propType {string} value - Value of the refinement to apply on `attributeName`. * @propType {boolean} [defaultChecked=false] - Default searchState of the widget. Should the toggle be checked by default? * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {boolean} currentRefinement - the refinement currently applied */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaToggle', propTypes: { label: _react.PropTypes.string, filter: _react.PropTypes.func, attributeName: _react.PropTypes.string, value: _react.PropTypes.any, defaultRefinement: _react.PropTypes.bool }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement(props, searchState, this.context); return { currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName; var value = props.value; var filter = props.filter; var checked = getCurrentRefinement(props, searchState, this.context); if (checked) { if (attributeName) { searchParameters = searchParameters.addFacet(attributeName).addFacetRefinement(attributeName, value); } if (filter) { searchParameters = filter(searchParameters); } } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId(props); var checked = getCurrentRefinement(props, searchState, this.context); var items = []; var index = (0, _indexUtils.getIndex)(this.context); if (checked) { items.push({ label: props.label, currentRefinement: props.label, attributeName: props.attributeName, value: function value(nextState) { return _refine(props, nextState, false, _this.context); } }); } return { id: id, index: index, items: items }; } }); /***/ }), /* 231 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectHighlight = __webpack_require__(207); var _connectHighlight2 = _interopRequireDefault(_connectHighlight); var _Highlight = __webpack_require__(376); var _Highlight2 = _interopRequireDefault(_Highlight); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Renders any attribute from an hit into its highlighted form when relevant. * * Read more about it in the [Highlighting results](guide/Highlighting_results.html) guide. * @name Highlight * @kind widget * @propType {string} attributeName - the location of the highlighted attribute in the hit * @propType {object} hit - the hit object containing the highlighted attribute * @propType {string} [tagName='em'] - the tag to be used for highlighted parts of the hit * @example * import React from 'react'; * * import {InstantSearch, connectHits, Highlight} from 'InstantSearch'; * * const CustomHits = connectHits(hits => { * return hits.map((hit) => <p><Highlight attributeName="description" hit={hit}/></p>); * }); * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <CustomHits /> * </InstantSearch> * ); * } */ exports.default = (0, _connectHighlight2.default)(_Highlight2.default); /***/ }), /* 232 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _omit2 = __webpack_require__(37); var _omit3 = _interopRequireDefault(_omit2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(57); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Link = function (_Component) { _inherits(Link, _Component); function Link() { var _ref; var _temp, _this, _ret; _classCallCheck(this, Link); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Link.__proto__ || Object.getPrototypeOf(Link)).call.apply(_ref, [this].concat(args))), _this), _this.onClick = function (e) { if ((0, _utils.isSpecialClick)(e)) { return; } _this.props.onClick(); e.preventDefault(); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(Link, [{ key: 'render', value: function render() { return _react2.default.createElement('a', _extends({}, (0, _omit3.default)(this.props, 'onClick'), { onClick: this.onClick })); } }]); return Link; }(_react.Component); Link.propTypes = { onClick: _react.PropTypes.func.isRequired }; exports.default = Link; /***/ }), /* 233 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _get2 = __webpack_require__(72); var _get3 = _interopRequireDefault(_get2); exports.default = parseAlgoliaHit; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Find an highlighted attribute given an `attributeName` and an `highlightProperty`, parses it, * and provided an array of objects with the string value and a boolean if this * value is highlighted. * * In order to use this feature, highlight must be activated in the configuration of * the index. The `preTag` and `postTag` attributes are respectively highlightPreTag and * highligtPostTag in Algolia configuration. * * @param {string} preTag - string used to identify the start of an highlighted value * @param {string} postTag - string used to identify the end of an highlighted value * @param {string} highlightProperty - the property that contains the highlight structure in the results * @param {string} attributeName - the highlighted attribute to look for * @param {object} hit - the actual hit returned by Algolia. * @return {object[]} - An array of {value: string, isDefined: boolean}. */ function parseAlgoliaHit(_ref) { var _ref$preTag = _ref.preTag; var preTag = _ref$preTag === undefined ? '<em>' : _ref$preTag; var _ref$postTag = _ref.postTag; var postTag = _ref$postTag === undefined ? '</em>' : _ref$postTag; var highlightProperty = _ref.highlightProperty; var attributeName = _ref.attributeName; var hit = _ref.hit; if (!hit) throw new Error('`hit`, the matching record, must be provided'); var highlightObject = (0, _get3.default)(hit[highlightProperty], attributeName); var highlightedValue = !highlightObject ? '' : highlightObject.value; return parseHighlightedAttribute({ preTag: preTag, postTag: postTag, highlightedValue: highlightedValue }); } /** * Parses an highlighted attribute into an array of objects with the string value, and * a boolean that indicated if this part is highlighted. * * @param {string} preTag - string used to identify the start of an highlighted value * @param {string} postTag - string used to identify the end of an highlighted value * @param {string} highlightedValue - highlighted attribute as returned by Algolia highlight feature * @return {object[]} - An array of {value: string, isDefined: boolean}. */ function parseHighlightedAttribute(_ref2) { var preTag = _ref2.preTag; var postTag = _ref2.postTag; var highlightedValue = _ref2.highlightedValue; var splitByPreTag = highlightedValue.split(preTag); var firstValue = splitByPreTag.shift(); var elements = firstValue === '' ? [] : [{ value: firstValue, isHighlighted: false }]; if (postTag === preTag) { var isHighlighted = true; splitByPreTag.forEach(function (split) { elements.push({ value: split, isHighlighted: isHighlighted }); isHighlighted = !isHighlighted; }); } else { splitByPreTag.forEach(function (split) { var splitByPostTag = split.split(postTag); elements.push({ value: splitByPostTag[0], isHighlighted: true }); if (splitByPostTag[1] !== '') { elements.push({ value: splitByPostTag[1], isHighlighted: false }); } }); } return elements; } /***/ }), /* 234 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor var TempCtor = function () {} TempCtor.prototype = superCtor.prototype ctor.prototype = new TempCtor() ctor.prototype.constructor = ctor } } /***/ }), /* 235 */ /***/ (function(module, exports) { module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } /***/ }), /* 236 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var stringify = __webpack_require__(238); var parse = __webpack_require__(237); var formats = __webpack_require__(114); module.exports = { formats: formats, parse: parse, stringify: stringify }; /***/ }), /* 237 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(80); var has = Object.prototype.hasOwnProperty; var defaults = { allowDots: false, allowPrototypes: false, arrayLimit: 20, decoder: utils.decode, delimiter: '&', depth: 5, parameterLimit: 1000, plainObjects: false, strictNullHandling: false }; var parseValues = function parseValues(str, options) { var obj = {}; var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit); for (var i = 0; i < parts.length; ++i) { var part = parts[i]; var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1; var key, val; if (pos === -1) { key = options.decoder(part); val = options.strictNullHandling ? null : ''; } else { key = options.decoder(part.slice(0, pos)); val = options.decoder(part.slice(pos + 1)); } if (has.call(obj, key)) { obj[key] = [].concat(obj[key]).concat(val); } else { obj[key] = val; } } return obj; }; var parseObject = function parseObject(chain, val, options) { if (!chain.length) { return val; } var root = chain.shift(); var obj; if (root === '[]') { obj = []; obj = obj.concat(parseObject(chain, val, options)); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root; var index = parseInt(cleanRoot, 10); if ( !isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit) ) { obj = []; obj[index] = parseObject(chain, val, options); } else { obj[cleanRoot] = parseObject(chain, val, options); } } return obj; }; var parseKeys = function parseKeys(givenKey, val, options) { if (!givenKey) { return; } // Transform dot notation to bracket notation var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; // The regex chunks var parent = /^([^\[\]]*)/; var child = /(\[[^\[\]]*\])/g; // Get the parent var segment = parent.exec(key); // Stash the parent if it exists var keys = []; if (segment[1]) { // If we aren't using plain objects, optionally prefix keys // that would overwrite object prototype properties if (!options.plainObjects && has.call(Object.prototype, segment[1])) { if (!options.allowPrototypes) { return; } } keys.push(segment[1]); } // Loop through children appending to the array until we hit depth var i = 0; while ((segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].replace(/\[|\]/g, ''))) { if (!options.allowPrototypes) { continue; } } keys.push(segment[1]); } // If there's a remainder, just add whatever is left if (segment) { keys.push('[' + key.slice(segment.index) + ']'); } return parseObject(keys, val, options); }; module.exports = function (str, opts) { var options = opts || {}; if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { throw new TypeError('Decoder has to be a function.'); } options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; options.parseArrays = options.parseArrays !== false; options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; if (str === '' || str === null || typeof str === 'undefined') { return options.plainObjects ? Object.create(null) : {}; } var tempObj = typeof str === 'string' ? parseValues(str, options) : str; var obj = options.plainObjects ? Object.create(null) : {}; // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options); obj = utils.merge(obj, newObj, options); } return utils.compact(obj); }; /***/ }), /* 238 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(80); var formats = __webpack_require__(114); var arrayPrefixGenerators = { brackets: function brackets(prefix) { return prefix + '[]'; }, indices: function indices(prefix, key) { return prefix + '[' + key + ']'; }, repeat: function repeat(prefix) { return prefix; } }; var toISO = Date.prototype.toISOString; var defaults = { delimiter: '&', encode: true, encoder: utils.encode, serializeDate: function serializeDate(date) { return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter) { var obj = object; if (typeof filter === 'function') { obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); } else if (obj === null) { if (strictNullHandling) { return encoder ? encoder(prefix) : prefix; } obj = ''; } if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { if (encoder) { return [formatter(encoder(prefix)) + '=' + formatter(encoder(obj))]; } return [formatter(prefix) + '=' + formatter(String(obj))]; } var values = []; if (typeof obj === 'undefined') { return values; } var objKeys; if (Array.isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } if (Array.isArray(obj)) { values = values.concat(stringify( obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter )); } else { values = values.concat(stringify( obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter )); } } return values; }; module.exports = function (object, opts) { var obj = object; var options = opts || {}; var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null; var sort = typeof options.sort === 'function' ? options.sort : null; var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; if (typeof options.format === 'undefined') { options.format = formats.default; } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { throw new TypeError('Unknown format option provided.'); } var formatter = formats.formatters[options.format]; var objKeys; var filter; if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); } else if (Array.isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; if (typeof obj !== 'object' || obj === null) { return ''; } var arrayFormat; if (options.arrayFormat in arrayPrefixGenerators) { arrayFormat = options.arrayFormat; } else if ('indices' in options) { arrayFormat = options.indices ? 'indices' : 'repeat'; } else { arrayFormat = 'indices'; } var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; if (!objKeys) { objKeys = Object.keys(obj); } if (sort) { objKeys.sort(sort); } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } keys = keys.concat(stringify( obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter )); } return keys.join(delimiter); }; /***/ }), /* 239 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(113); var events = __webpack_require__(112); /** * A DerivedHelper is a way to create sub requests to * Algolia from a main helper. * @class * @classdesc The DerivedHelper provides an event based interface for search callbacks: * - search: when a search is triggered using the `search()` method. * - result: when the response is retrieved from Algolia and is processed. * This event contains a {@link SearchResults} object and the * {@link SearchParameters} corresponding to this answer. */ function DerivedHelper(mainHelper, fn) { this.main = mainHelper; this.fn = fn; this.lastResults = null; } util.inherits(DerivedHelper, events.EventEmitter); /** * Detach this helper from the main helper * @return {undefined} * @throws Error if the derived helper is already detached */ DerivedHelper.prototype.detach = function() { this.removeAllListeners(); this.main.detachDerivedHelper(this); }; DerivedHelper.prototype.getModifiedState = function(parameters) { return this.fn(parameters); }; module.exports = DerivedHelper; /***/ }), /* 240 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Functions to manipulate refinement lists * * The RefinementList is not formally defined through a prototype but is based * on a specific structure. * * @module SearchParameters.refinementList * * @typedef {string[]} SearchParameters.refinementList.Refinements * @typedef {Object.<string, SearchParameters.refinementList.Refinements>} SearchParameters.refinementList.RefinementList */ var isUndefined = __webpack_require__(201); var isString = __webpack_require__(49); var isFunction = __webpack_require__(18); var isEmpty = __webpack_require__(15); var defaults = __webpack_require__(101); var reduce = __webpack_require__(51); var filter = __webpack_require__(102); var omit = __webpack_require__(37); var lib = { /** * Adds a refinement to a RefinementList * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} value the value of the refinement, if the value is not a string it will be converted * @return {RefinementList} a new and updated prefinement list */ addRefinement: function addRefinement(refinementList, attribute, value) { if (lib.isRefined(refinementList, attribute, value)) { return refinementList; } var valueAsString = '' + value; var facetRefinement = !refinementList[attribute] ? [valueAsString] : refinementList[attribute].concat(valueAsString); var mod = {}; mod[attribute] = facetRefinement; return defaults({}, mod, refinementList); }, /** * Removes refinement(s) for an attribute: * - if the value is specified removes the refinement for the value on the attribute * - if no value is specified removes all the refinements for this attribute * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} [value] the value of the refinement * @return {RefinementList} a new and updated refinement lst */ removeRefinement: function removeRefinement(refinementList, attribute, value) { if (isUndefined(value)) { return lib.clearRefinement(refinementList, attribute); } var valueAsString = '' + value; return lib.clearRefinement(refinementList, function(v, f) { return attribute === f && valueAsString === v; }); }, /** * Toggles the refinement value for an attribute. * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} value the value of the refinement * @return {RefinementList} a new and updated list */ toggleRefinement: function toggleRefinement(refinementList, attribute, value) { if (isUndefined(value)) throw new Error('toggleRefinement should be used with a value'); if (lib.isRefined(refinementList, attribute, value)) { return lib.removeRefinement(refinementList, attribute, value); } return lib.addRefinement(refinementList, attribute, value); }, /** * Clear all or parts of a RefinementList. Depending on the arguments, three * behaviors can happen: * - if no attribute is provided: clears the whole list * - if an attribute is provided as a string: clears the list for the specific attribute * - if an attribute is provided as a function: discards the elements for which the function returns true * @param {RefinementList} refinementList the initial list * @param {string} [attribute] the attribute or function to discard * @param {string} [refinementType] optionnal parameter to give more context to the attribute function * @return {RefinementList} a new and updated refinement list */ clearRefinement: function clearRefinement(refinementList, attribute, refinementType) { if (isUndefined(attribute)) { return {}; } else if (isString(attribute)) { return omit(refinementList, attribute); } else if (isFunction(attribute)) { return reduce(refinementList, function(memo, values, key) { var facetList = filter(values, function(value) { return !attribute(value, key, refinementType); }); if (!isEmpty(facetList)) memo[key] = facetList; return memo; }, {}); } }, /** * Test if the refinement value is used for the attribute. If no refinement value * is provided, test if the refinementList contains any refinement for the * given attribute. * @param {RefinementList} refinementList the list of refinement * @param {string} attribute name of the attribute * @param {string} [refinementValue] value of the filter/refinement * @return {boolean} */ isRefined: function isRefined(refinementList, attribute, refinementValue) { var indexOf = __webpack_require__(73); var containsRefinements = !!refinementList[attribute] && refinementList[attribute].length > 0; if (isUndefined(refinementValue) || !containsRefinements) { return containsRefinements; } var refinementValueAsString = '' + refinementValue; return indexOf(refinementList[attribute], refinementValueAsString) !== -1; } }; module.exports = lib; /***/ }), /* 241 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var forEach = __webpack_require__(34); var filter = __webpack_require__(102); var map = __webpack_require__(16); var isEmpty = __webpack_require__(15); var indexOf = __webpack_require__(73); function filterState(state, filters) { var partialState = {}; var attributeFilters = filter(filters, function(f) { return f.indexOf('attribute:') !== -1; }); var attributes = map(attributeFilters, function(aF) { return aF.split(':')[1]; }); if (indexOf(attributes, '*') === -1) { forEach(attributes, function(attr) { if (state.isConjunctiveFacet(attr) && state.isFacetRefined(attr)) { if (!partialState.facetsRefinements) partialState.facetsRefinements = {}; partialState.facetsRefinements[attr] = state.facetsRefinements[attr]; } if (state.isDisjunctiveFacet(attr) && state.isDisjunctiveFacetRefined(attr)) { if (!partialState.disjunctiveFacetsRefinements) partialState.disjunctiveFacetsRefinements = {}; partialState.disjunctiveFacetsRefinements[attr] = state.disjunctiveFacetsRefinements[attr]; } if (state.isHierarchicalFacet(attr) && state.isHierarchicalFacetRefined(attr)) { if (!partialState.hierarchicalFacetsRefinements) partialState.hierarchicalFacetsRefinements = {}; partialState.hierarchicalFacetsRefinements[attr] = state.hierarchicalFacetsRefinements[attr]; } var numericRefinements = state.getNumericRefinements(attr); if (!isEmpty(numericRefinements)) { if (!partialState.numericRefinements) partialState.numericRefinements = {}; partialState.numericRefinements[attr] = state.numericRefinements[attr]; } }); } else { if (!isEmpty(state.numericRefinements)) { partialState.numericRefinements = state.numericRefinements; } if (!isEmpty(state.facetsRefinements)) partialState.facetsRefinements = state.facetsRefinements; if (!isEmpty(state.disjunctiveFacetsRefinements)) { partialState.disjunctiveFacetsRefinements = state.disjunctiveFacetsRefinements; } if (!isEmpty(state.hierarchicalFacetsRefinements)) { partialState.hierarchicalFacetsRefinements = state.hierarchicalFacetsRefinements; } } var searchParameters = filter( filters, function(f) { return f.indexOf('attribute:') === -1; } ); forEach( searchParameters, function(parameterKey) { partialState[parameterKey] = state[parameterKey]; } ); return partialState; } module.exports = filterState; /***/ }), /* 242 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var invert = __webpack_require__(199); var keys = __webpack_require__(8); var keys2Short = { advancedSyntax: 'aS', allowTyposOnNumericTokens: 'aTONT', analyticsTags: 'aT', analytics: 'a', aroundLatLngViaIP: 'aLLVIP', aroundLatLng: 'aLL', aroundPrecision: 'aP', aroundRadius: 'aR', attributesToHighlight: 'aTH', attributesToRetrieve: 'aTR', attributesToSnippet: 'aTS', disjunctiveFacetsRefinements: 'dFR', disjunctiveFacets: 'dF', distinct: 'd', facetsExcludes: 'fE', facetsRefinements: 'fR', facets: 'f', getRankingInfo: 'gRI', hierarchicalFacetsRefinements: 'hFR', hierarchicalFacets: 'hF', highlightPostTag: 'hPoT', highlightPreTag: 'hPrT', hitsPerPage: 'hPP', ignorePlurals: 'iP', index: 'idx', insideBoundingBox: 'iBB', insidePolygon: 'iPg', length: 'l', maxValuesPerFacet: 'mVPF', minimumAroundRadius: 'mAR', minProximity: 'mP', minWordSizefor1Typo: 'mWS1T', minWordSizefor2Typos: 'mWS2T', numericFilters: 'nF', numericRefinements: 'nR', offset: 'o', optionalWords: 'oW', page: 'p', queryType: 'qT', query: 'q', removeWordsIfNoResults: 'rWINR', replaceSynonymsInHighlight: 'rSIH', restrictSearchableAttributes: 'rSA', synonyms: 's', tagFilters: 'tF', tagRefinements: 'tR', typoTolerance: 'tT', optionalTagFilters: 'oTF', optionalFacetFilters: 'oFF', snippetEllipsisText: 'sET', disableExactOnAttributes: 'dEOA', enableExactOnSingleWordQuery: 'eEOSWQ' }; var short2Keys = invert(keys2Short); module.exports = { /** * All the keys of the state, encoded. * @const */ ENCODED_PARAMETERS: keys(short2Keys), /** * Decode a shorten attribute * @param {string} shortKey the shorten attribute * @return {string} the decoded attribute, undefined otherwise */ decode: function(shortKey) { return short2Keys[shortKey]; }, /** * Encode an attribute into a short version * @param {string} key the attribute * @return {string} the shorten attribute */ encode: function(key) { return keys2Short[key]; } }; /***/ }), /* 243 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = generateTrees; var last = __webpack_require__(202); var map = __webpack_require__(16); var reduce = __webpack_require__(51); var orderBy = __webpack_require__(106); var trim = __webpack_require__(205); var find = __webpack_require__(46); var pickBy = __webpack_require__(333); var prepareHierarchicalFacetSortBy = __webpack_require__(116); function generateTrees(state) { return function generate(hierarchicalFacetResult, hierarchicalFacetIndex) { var hierarchicalFacet = state.hierarchicalFacets[hierarchicalFacetIndex]; var hierarchicalFacetRefinement = state.hierarchicalFacetsRefinements[hierarchicalFacet.name] && state.hierarchicalFacetsRefinements[hierarchicalFacet.name][0] || ''; var hierarchicalSeparator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var hierarchicalRootPath = state._getHierarchicalRootPath(hierarchicalFacet); var hierarchicalShowParentLevel = state._getHierarchicalShowParentLevel(hierarchicalFacet); var sortBy = prepareHierarchicalFacetSortBy(state._getHierarchicalFacetSortBy(hierarchicalFacet)); var generateTreeFn = generateHierarchicalTree(sortBy, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel, hierarchicalFacetRefinement); var results = hierarchicalFacetResult; if (hierarchicalRootPath) { results = hierarchicalFacetResult.slice(hierarchicalRootPath.split(hierarchicalSeparator).length); } return reduce(results, generateTreeFn, { name: state.hierarchicalFacets[hierarchicalFacetIndex].name, count: null, // root level, no count isRefined: true, // root level, always refined path: null, // root level, no path data: null }); }; } function generateHierarchicalTree(sortBy, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel, currentRefinement) { return function generateTree(hierarchicalTree, hierarchicalFacetResult, currentHierarchicalLevel) { var parent = hierarchicalTree; if (currentHierarchicalLevel > 0) { var level = 0; parent = hierarchicalTree; while (level < currentHierarchicalLevel) { parent = parent && find(parent.data, {isRefined: true}); level++; } } // we found a refined parent, let's add current level data under it if (parent) { // filter values in case an object has multiple categories: // { // categories: { // level0: ['beers', 'bières'], // level1: ['beers > IPA', 'bières > Belges'] // } // } // // If parent refinement is `beers`, then we do not want to have `bières > Belges` // showing up var onlyMatchingValuesFn = filterFacetValues(parent.path || hierarchicalRootPath, currentRefinement, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel); parent.data = orderBy( map( pickBy(hierarchicalFacetResult.data, onlyMatchingValuesFn), formatHierarchicalFacetValue(hierarchicalSeparator, currentRefinement) ), sortBy[0], sortBy[1] ); } return hierarchicalTree; }; } function filterFacetValues(parentPath, currentRefinement, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel) { return function(facetCount, facetValue) { // we want the facetValue is a child of hierarchicalRootPath if (hierarchicalRootPath && (facetValue.indexOf(hierarchicalRootPath) !== 0 || hierarchicalRootPath === facetValue)) { return false; } // we always want root levels (only when there is no prefix path) return !hierarchicalRootPath && facetValue.indexOf(hierarchicalSeparator) === -1 || // if there is a rootPath, being root level mean 1 level under rootPath hierarchicalRootPath && facetValue.split(hierarchicalSeparator).length - hierarchicalRootPath.split(hierarchicalSeparator).length === 1 || // if current refinement is a root level and current facetValue is a root level, // keep the facetValue facetValue.indexOf(hierarchicalSeparator) === -1 && currentRefinement.indexOf(hierarchicalSeparator) === -1 || // currentRefinement is a child of the facet value currentRefinement.indexOf(facetValue) === 0 || // facetValue is a child of the current parent, add it facetValue.indexOf(parentPath + hierarchicalSeparator) === 0 && (hierarchicalShowParentLevel || facetValue.indexOf(currentRefinement) === 0); }; } function formatHierarchicalFacetValue(hierarchicalSeparator, currentRefinement) { return function format(facetCount, facetValue) { return { name: trim(last(facetValue.split(hierarchicalSeparator))), path: facetValue, count: facetCount, isRefined: currentRefinement === facetValue || currentRefinement.indexOf(facetValue + hierarchicalSeparator) === 0, data: null }; }; } /***/ }), /* 244 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var SearchParameters = __webpack_require__(81); var SearchResults = __webpack_require__(115); var DerivedHelper = __webpack_require__(239); var requestBuilder = __webpack_require__(246); var util = __webpack_require__(113); var events = __webpack_require__(112); var flatten = __webpack_require__(197); var forEach = __webpack_require__(34); var isEmpty = __webpack_require__(15); var map = __webpack_require__(16); var url = __webpack_require__(117); var version = __webpack_require__(118); /** * Event triggered when a parameter is set or updated * @event AlgoliaSearchHelper#event:change * @property {SearchParameters} state the current parameters with the latest changes applied * @property {SearchResults} lastResults the previous results received from Algolia. `null` before * the first request * @example * helper.on('change', function(state, lastResults) { * console.log('The parameters have changed'); * }); */ /** * Event triggered when the search is sent to Algolia * @event AlgoliaSearchHelper#event:search * @property {SearchParameters} state the parameters used for this search * @property {SearchResults} lastResults the results from the previous search. `null` if * it is the first search. * @example * helper.on('search', function(state, lastResults) { * console.log('Search sent'); * }); */ /** * Event triggered when the results are retrieved from Algolia * @event AlgoliaSearchHelper#event:result * @property {SearchResults} results the results received from Algolia * @property {SearchParameters} state the parameters used to query Algolia. Those might * be different from the one in the helper instance (for example if the network is unreliable). * @example * helper.on('result', function(results, state) { * console.log('Search results received'); * }); */ /** * Event triggered when Algolia sends back an error. For example, if an unknown parameter is * used, the error can be caught using this event. * @event AlgoliaSearchHelper#event:error * @property {Error} error the error returned by the Algolia. * @example * helper.on('error', function(error) { * console.log('Houston we got a problem.'); * }); */ /** * Initialize a new AlgoliaSearchHelper * @class * @classdesc The AlgoliaSearchHelper is a class that ease the management of the * search. It provides an event based interface for search callbacks: * - change: when the internal search state is changed. * This event contains a {@link SearchParameters} object and the * {@link SearchResults} of the last result if any. * - search: when a search is triggered using the `search()` method. * - result: when the response is retrieved from Algolia and is processed. * This event contains a {@link SearchResults} object and the * {@link SearchParameters} corresponding to this answer. * - error: when the response is an error. This event contains the error returned by the server. * @param {AlgoliaSearch} client an AlgoliaSearch client * @param {string} index the index name to query * @param {SearchParameters | object} options an object defining the initial * config of the search. It doesn't have to be a {SearchParameters}, * just an object containing the properties you need from it. */ function AlgoliaSearchHelper(client, index, options) { if (!client.addAlgoliaAgent) console.log('Please upgrade to the newest version of the JS Client.'); // eslint-disable-line else if (!doesClientAgentContainsHelper(client)) client.addAlgoliaAgent('JS Helper ' + version); this.setClient(client); var opts = options || {}; opts.index = index; this.state = SearchParameters.make(opts); this.lastResults = null; this._queryId = 0; this._lastQueryIdReceived = -1; this.derivedHelpers = []; } util.inherits(AlgoliaSearchHelper, events.EventEmitter); /** * Start the search with the parameters set in the state. When the * method is called, it triggers a `search` event. The results will * be available through the `result` event. If an error occcurs, an * `error` will be fired instead. * @return {AlgoliaSearchHelper} * @fires search * @fires result * @fires error * @chainable */ AlgoliaSearchHelper.prototype.search = function() { this._search(); return this; }; /** * Gets the search query parameters that would be sent to the Algolia Client * for the hits * @return {object} Query Parameters */ AlgoliaSearchHelper.prototype.getQuery = function() { var state = this.state; return requestBuilder._getHitsSearchParams(state); }; /** * Start a search using a modified version of the current state. This method does * not trigger the helper lifecycle and does not modify the state kept internally * by the helper. This second aspect means that the next search call will be the * same as a search call before calling searchOnce. * @param {object} options can contain all the parameters that can be set to SearchParameters * plus the index * @param {function} [callback] optional callback executed when the response from the * server is back. * @return {promise|undefined} if a callback is passed the method returns undefined * otherwise it returns a promise containing an object with two keys : * - content with a SearchResults * - state with the state used for the query as a SearchParameters * @example * // Changing the number of records returned per page to 1 * // This example uses the callback API * var state = helper.searchOnce({hitsPerPage: 1}, * function(error, content, state) { * // if an error occured it will be passed in error, otherwise its value is null * // content contains the results formatted as a SearchResults * // state is the instance of SearchParameters used for this search * }); * @example * // Changing the number of records returned per page to 1 * // This example uses the promise API * var state1 = helper.searchOnce({hitsPerPage: 1}) * .then(promiseHandler); * * function promiseHandler(res) { * // res contains * // { * // content : SearchResults * // state : SearchParameters (the one used for this specific search) * // } * } */ AlgoliaSearchHelper.prototype.searchOnce = function(options, cb) { var tempState = !options ? this.state : this.state.setQueryParameters(options); var queries = requestBuilder._getQueries(tempState.index, tempState); if (cb) { return this.client.search( queries, function(err, content) { if (err) cb(err, null, tempState); else cb(err, new SearchResults(tempState, content.results), tempState); } ); } return this.client.search(queries).then(function(content) { return { content: new SearchResults(tempState, content.results), state: tempState, _originalResponse: content }; }); }; /** * Structure of each result when using * [`searchForFacetValues()`](reference.html#AlgoliaSearchHelper#searchForFacetValues) * @typedef FacetSearchHit * @type {object} * @property {string} value the facet value * @property {string} highlighted the facet value highlighted with the query string * @property {number} count number of occurence of this facet value * @property {boolean} isRefined true if the value is already refined */ /** * Structure of the data resolved by the * [`searchForFacetValues()`](reference.html#AlgoliaSearchHelper#searchForFacetValues) * promise. * @typedef FacetSearchResult * @type {objet} * @property {FacetSearchHit} facetHits the results for this search for facet values * @property {number} processingTimeMS time taken by the query insde the engine */ /** * Search for facet values based on an query and the name of a facetted attribute. This * triggers a search and will retrun a promise. On top of using the query, it also sends * the parameters from the state so that the search is narrowed to only the possible values. * * See the description of [FacetSearchResult](reference.html#FacetSearchResult) * @param {string} query the string query for the search * @param {string} facet the name of the facetted attribute * @return {promise<FacetSearchResult>} the results of the search */ AlgoliaSearchHelper.prototype.searchForFacetValues = function(facet, query) { var state = this.state; var index = this.client.initIndex(this.state.index); var isDisjunctive = state.isDisjunctiveFacet(facet); var algoliaQuery = requestBuilder.getSearchForFacetQuery(facet, query, this.state); return index.searchForFacetValues(algoliaQuery).then(function addIsRefined(content) { content.facetHits = forEach(content.facetHits, function(f) { f.isRefined = isDisjunctive ? state.isDisjunctiveFacetRefined(facet, f.value) : state.isFacetRefined(facet, f.value); }); return content; }); }; /** * Sets the text query used for the search. * * This method resets the current page to 0. * @param {string} q the user query * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setQuery = function(q) { this.state = this.state.setPage(0).setQuery(q); this._change(); return this; }; /** * Remove all the types of refinements except tags. A string can be provided to remove * only the refinements of a specific attribute. For more advanced use case, you can * provide a function instead. This function should follow the * [clearCallback definition](#SearchParameters.clearCallback). * * This method resets the current page to 0. * @param {string} [name] optional name of the facet / attribute on which we want to remove all refinements * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * // Removing all the refinements * helper.clearRefinements().search(); * @example * // Removing all the filters on a the category attribute. * helper.clearRefinements('category').search(); * @example * // Removing only the exclude filters on the category facet. * helper.clearRefinements(function(value, attribute, type) { * return type === 'exclude' && attribute === 'category'; * }).search(); */ AlgoliaSearchHelper.prototype.clearRefinements = function(name) { this.state = this.state.setPage(0).clearRefinements(name); this._change(); return this; }; /** * Remove all the tag filters. * * This method resets the current page to 0. * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.clearTags = function() { this.state = this.state.setPage(0).clearTags(); this._change(); return this; }; /** * Adds a disjunctive filter to a facetted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addDisjunctiveFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).addDisjunctiveFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addDisjunctiveFacetRefinement} */ AlgoliaSearchHelper.prototype.addDisjunctiveRefine = function() { return this.addDisjunctiveFacetRefinement.apply(this, arguments); }; /** * Adds a refinement on a hierarchical facet. It will throw * an exception if the facet is not defined or if the facet * is already refined. * * This method resets the current page to 0. * @param {string} facet the facet name * @param {string} path the hierarchical facet path * @return {AlgoliaSearchHelper} * @throws Error if the facet is not defined or if the facet is refined * @chainable * @fires change */ AlgoliaSearchHelper.prototype.addHierarchicalFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).addHierarchicalFacetRefinement(facet, value); this._change(); return this; }; /** * Adds a an numeric filter to an attribute with the `operator` and `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} attribute the attribute on which the numeric filter applies * @param {string} operator the operator of the filter * @param {number} value the value of the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addNumericRefinement = function(attribute, operator, value) { this.state = this.state.setPage(0).addNumericRefinement(attribute, operator, value); this._change(); return this; }; /** * Adds a filter to a facetted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).addFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addFacetRefinement} */ AlgoliaSearchHelper.prototype.addRefine = function() { return this.addFacetRefinement.apply(this, arguments); }; /** * Adds a an exclusion filter to a facetted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addFacetExclusion = function(facet, value) { this.state = this.state.setPage(0).addExcludeRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addFacetExclusion} */ AlgoliaSearchHelper.prototype.addExclude = function() { return this.addFacetExclusion.apply(this, arguments); }; /** * Adds a tag filter with the `tag` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} tag the tag to add to the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addTag = function(tag) { this.state = this.state.setPage(0).addTagRefinement(tag); this._change(); return this; }; /** * Removes an numeric filter to an attribute with the `operator` and `value` provided. If the * filter is not set, it doesn't change the filters. * * Some parameters are optionnals, triggering different behaviors: * - if the value is not provided, then all the numeric value will be removed for the * specified attribute/operator couple. * - if the operator is not provided either, then all the numeric filter on this attribute * will be removed. * * This method resets the current page to 0. * @param {string} attribute the attribute on which the numeric filter applies * @param {string} [operator] the operator of the filter * @param {number} [value] the value of the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeNumericRefinement = function(attribute, operator, value) { this.state = this.state.setPage(0).removeNumericRefinement(attribute, operator, value); this._change(); return this; }; /** * Removes a disjunctive filter to a facetted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeDisjunctiveFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).removeDisjunctiveFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeDisjunctiveFacetRefinement} */ AlgoliaSearchHelper.prototype.removeDisjunctiveRefine = function() { return this.removeDisjunctiveFacetRefinement.apply(this, arguments); }; /** * Removes the refinement set on a hierarchical facet. * @param {string} facet the facet name * @return {AlgoliaSearchHelper} * @throws Error if the facet is not defined or if the facet is not refined * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeHierarchicalFacetRefinement = function(facet) { this.state = this.state.setPage(0).removeHierarchicalFacetRefinement(facet); this._change(); return this; }; /** * Removes a filter to a facetted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).removeFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeFacetRefinement} */ AlgoliaSearchHelper.prototype.removeRefine = function() { return this.removeFacetRefinement.apply(this, arguments); }; /** * Removes an exclusion filter to a facetted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeFacetExclusion = function(facet, value) { this.state = this.state.setPage(0).removeExcludeRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeFacetExclusion} */ AlgoliaSearchHelper.prototype.removeExclude = function() { return this.removeFacetExclusion.apply(this, arguments); }; /** * Removes a tag filter with the `tag` provided. If the * filter is not set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} tag tag to remove from the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeTag = function(tag) { this.state = this.state.setPage(0).removeTagRefinement(tag); this._change(); return this; }; /** * Adds or removes an exclusion filter to a facetted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleFacetExclusion = function(facet, value) { this.state = this.state.setPage(0).toggleExcludeFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#toggleFacetExclusion} */ AlgoliaSearchHelper.prototype.toggleExclude = function() { return this.toggleFacetExclusion.apply(this, arguments); }; /** * Adds or removes a filter to a facetted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method can be used for conjunctive, disjunctive and hierarchical filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @throws Error will throw an error if the facet is not declared in the settings of the helper * @fires change * @chainable * @deprecated since version 2.19.0, see {@link AlgoliaSearchHelper#toggleFacetRefinement} */ AlgoliaSearchHelper.prototype.toggleRefinement = function(facet, value) { return this.toggleFacetRefinement(facet, value); }; /** * Adds or removes a filter to a facetted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method can be used for conjunctive, disjunctive and hierarchical filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @throws Error will throw an error if the facet is not declared in the settings of the helper * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).toggleFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#toggleFacetRefinement} */ AlgoliaSearchHelper.prototype.toggleRefine = function() { return this.toggleFacetRefinement.apply(this, arguments); }; /** * Adds or removes a tag filter with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method resets the current page to 0. * @param {string} tag tag to remove or add * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleTag = function(tag) { this.state = this.state.setPage(0).toggleTagRefinement(tag); this._change(); return this; }; /** * Increments the page number by one. * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * helper.setPage(0).nextPage().getPage(); * // returns 1 */ AlgoliaSearchHelper.prototype.nextPage = function() { return this.setPage(this.state.page + 1); }; /** * Decrements the page number by one. * @fires change * @return {AlgoliaSearchHelper} * @chainable * @example * helper.setPage(1).previousPage().getPage(); * // returns 0 */ AlgoliaSearchHelper.prototype.previousPage = function() { return this.setPage(this.state.page - 1); }; /** * @private */ function setCurrentPage(page) { if (page < 0) throw new Error('Page requested below 0.'); this.state = this.state.setPage(page); this._change(); return this; } /** * Change the current page * @deprecated * @param {number} page The page number * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setCurrentPage = setCurrentPage; /** * Updates the current page. * @function * @param {number} page The page number * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setPage = setCurrentPage; /** * Updates the name of the index that will be targeted by the query. * * This method resets the current page to 0. * @param {string} name the index name * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setIndex = function(name) { this.state = this.state.setPage(0).setIndex(name); this._change(); return this; }; /** * Update a parameter of the search. This method reset the page * * The complete list of parameters is available on the * [Algolia website](https://www.algolia.com/doc/rest#query-an-index). * The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts) * or benefit from higher-level APIs (all the kind of filters and facets have their own API) * * This method resets the current page to 0. * @param {string} parameter name of the parameter to update * @param {any} value new value of the parameter * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * helper.setQueryParameter('hitsPerPage', 20).search(); */ AlgoliaSearchHelper.prototype.setQueryParameter = function(parameter, value) { var newState = this.state.setPage(0).setQueryParameter(parameter, value); if (this.state === newState) return this; this.state = newState; this._change(); return this; }; /** * Set the whole state (warning: will erase previous state) * @param {SearchParameters} newState the whole new state * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setState = function(newState) { this.state = new SearchParameters(newState); this._change(); return this; }; /** * Get the current search state stored in the helper. This object is immutable. * @param {string[]} [filters] optionnal filters to retrieve only a subset of the state * @return {SearchParameters|object} if filters is specified a plain object is * returned containing only the requested fields, otherwise return the unfiltered * state * @example * // Get the complete state as stored in the helper * helper.getState(); * @example * // Get a part of the state with all the refinements on attributes and the query * helper.getState(['query', 'attribute:category']); */ AlgoliaSearchHelper.prototype.getState = function(filters) { if (filters === undefined) return this.state; return this.state.filter(filters); }; /** * DEPRECATED Get part of the state as a query string. By default, the output keys will not * be prefixed and will only take the applied refinements and the query. * @deprecated * @param {object} [options] May contain the following parameters : * * **filters** : possible values are all the keys of the [SearchParameters](#searchparameters), `index` for * the index, all the refinements with `attribute:*` or for some specific attributes with * `attribute:theAttribute` * * **prefix** : prefix in front of the keys * * **moreAttributes** : more values to be added in the query string. Those values * won't be prefixed. * @return {string} the query string */ AlgoliaSearchHelper.prototype.getStateAsQueryString = function getStateAsQueryString(options) { var filters = options && options.filters || ['query', 'attribute:*']; var partialState = this.getState(filters); return url.getQueryStringFromState(partialState, options); }; /** * DEPRECATED Read a query string and return an object containing the state. Use * url module. * @deprecated * @static * @param {string} queryString the query string that will be decoded * @param {object} options accepted options : * - prefix : the prefix used for the saved attributes, you have to provide the * same that was used for serialization * @return {object} partial search parameters object (same properties than in the * SearchParameters but not exhaustive) * @see {@link url#getStateFromQueryString} */ AlgoliaSearchHelper.getConfigurationFromQueryString = url.getStateFromQueryString; /** * DEPRECATED Retrieve an object of all the properties that are not understandable as helper * parameters. Use url module. * @deprecated * @static * @param {string} queryString the query string to read * @param {object} options the options * - prefixForParameters : prefix used for the helper configuration keys * @return {object} the object containing the parsed configuration that doesn't * to the helper */ AlgoliaSearchHelper.getForeignConfigurationInQueryString = url.getUnrecognizedParametersInQueryString; /** * DEPRECATED Overrides part of the state with the properties stored in the provided query * string. * @deprecated * @param {string} queryString the query string containing the informations to url the state * @param {object} options optionnal parameters : * - prefix : prefix used for the algolia parameters * - triggerChange : if set to true the state update will trigger a change event */ AlgoliaSearchHelper.prototype.setStateFromQueryString = function(queryString, options) { var triggerChange = options && options.triggerChange || false; var configuration = url.getStateFromQueryString(queryString, options); var updatedState = this.state.setQueryParameters(configuration); if (triggerChange) this.setState(updatedState); else this.overrideStateWithoutTriggeringChangeEvent(updatedState); }; /** * Override the current state without triggering a change event. * Do not use this method unless you know what you are doing. (see the example * for a legit use case) * @param {SearchParameters} newState the whole new state * @return {AlgoliaSearchHelper} * @example * helper.on('change', function(state){ * // In this function you might want to find a way to store the state in the url/history * updateYourURL(state) * }) * window.onpopstate = function(event){ * // This is naive though as you should check if the state is really defined etc. * helper.overrideStateWithoutTriggeringChangeEvent(event.state).search() * } * @chainable */ AlgoliaSearchHelper.prototype.overrideStateWithoutTriggeringChangeEvent = function(newState) { this.state = new SearchParameters(newState); return this; }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasRefinements} */ AlgoliaSearchHelper.prototype.isRefined = function(facet, value) { if (this.state.isConjunctiveFacet(facet)) { return this.state.isFacetRefined(facet, value); } else if (this.state.isDisjunctiveFacet(facet)) { return this.state.isDisjunctiveFacetRefined(facet, value); } throw new Error(facet + ' is not properly defined in this helper configuration' + '(use the facets or disjunctiveFacets keys to configure it)'); }; /** * Check if an attribute has any numeric, conjunctive, disjunctive or hierarchical filters. * @param {string} attribute the name of the attribute * @return {boolean} true if the attribute is filtered by at least one value * @example * // hasRefinements works with numeric, conjunctive, disjunctive and hierarchical filters * helper.hasRefinements('price'); // false * helper.addNumericRefinement('price', '>', 100); * helper.hasRefinements('price'); // true * * helper.hasRefinements('color'); // false * helper.addFacetRefinement('color', 'blue'); * helper.hasRefinements('color'); // true * * helper.hasRefinements('material'); // false * helper.addDisjunctiveFacetRefinement('material', 'plastic'); * helper.hasRefinements('material'); // true * * helper.hasRefinements('categories'); // false * helper.toggleFacetRefinement('categories', 'kitchen > knife'); * helper.hasRefinements('categories'); // true * */ AlgoliaSearchHelper.prototype.hasRefinements = function(attribute) { if (!isEmpty(this.state.getNumericRefinements(attribute))) { return true; } else if (this.state.isConjunctiveFacet(attribute)) { return this.state.isFacetRefined(attribute); } else if (this.state.isDisjunctiveFacet(attribute)) { return this.state.isDisjunctiveFacetRefined(attribute); } else if (this.state.isHierarchicalFacet(attribute)) { return this.state.isHierarchicalFacetRefined(attribute); } // there's currently no way to know that the user did call `addNumericRefinement` at some point // thus we cannot distinguish if there once was a numeric refinement that was cleared // so we will return false in every other situations to be consistent // while what we should do here is throw because we did not find the attribute in any type // of refinement return false; }; /** * Check if a value is excluded for a specific facetted attribute. If the value * is omitted then the function checks if there is any excluding refinements. * * @param {string} facet name of the attribute for used for facetting * @param {string} [value] optionnal value. If passed will test that this value * is filtering the given facet. * @return {boolean} true if refined * @example * helper.isExcludeRefined('color'); // false * helper.isExcludeRefined('color', 'blue') // false * helper.isExcludeRefined('color', 'red') // false * * helper.addFacetExclusion('color', 'red'); * * helper.isExcludeRefined('color'); // true * helper.isExcludeRefined('color', 'blue') // false * helper.isExcludeRefined('color', 'red') // true */ AlgoliaSearchHelper.prototype.isExcluded = function(facet, value) { return this.state.isExcludeRefined(facet, value); }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasRefinements} */ AlgoliaSearchHelper.prototype.isDisjunctiveRefined = function(facet, value) { return this.state.isDisjunctiveFacetRefined(facet, value); }; /** * Check if the string is a currently filtering tag. * @param {string} tag tag to check * @return {boolean} */ AlgoliaSearchHelper.prototype.hasTag = function(tag) { return this.state.isTagRefined(tag); }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasTag} */ AlgoliaSearchHelper.prototype.isTagRefined = function() { return this.hasTagRefinements.apply(this, arguments); }; /** * Get the name of the currently used index. * @return {string} * @example * helper.setIndex('highestPrice_products').getIndex(); * // returns 'highestPrice_products' */ AlgoliaSearchHelper.prototype.getIndex = function() { return this.state.index; }; function getCurrentPage() { return this.state.page; } /** * Get the currently selected page * @deprecated * @return {number} the current page */ AlgoliaSearchHelper.prototype.getCurrentPage = getCurrentPage; /** * Get the currently selected page * @function * @return {number} the current page */ AlgoliaSearchHelper.prototype.getPage = getCurrentPage; /** * Get all the tags currently set to filters the results. * * @return {string[]} The list of tags currently set. */ AlgoliaSearchHelper.prototype.getTags = function() { return this.state.tagRefinements; }; /** * Get a parameter of the search by its name. It is possible that a parameter is directly * defined in the index dashboard, but it will be undefined using this method. * * The complete list of parameters is * available on the * [Algolia website](https://www.algolia.com/doc/rest#query-an-index). * The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts) * or benefit from higher-level APIs (all the kind of filters have their own API) * @param {string} parameterName the parameter name * @return {any} the parameter value * @example * var hitsPerPage = helper.getQueryParameter('hitsPerPage'); */ AlgoliaSearchHelper.prototype.getQueryParameter = function(parameterName) { return this.state.getQueryParameter(parameterName); }; /** * Get the list of refinements for a given attribute. This method works with * conjunctive, disjunctive, excluding and numerical filters. * * See also SearchResults#getRefinements * * @param {string} facetName attribute name used for facetting * @return {Array.<FacetRefinement|NumericRefinement>} All Refinement are objects that contain a value, and * a type. Numeric also contains an operator. * @example * helper.addNumericRefinement('price', '>', 100); * helper.getRefinements('price'); * // [ * // { * // "value": [ * // 100 * // ], * // "operator": ">", * // "type": "numeric" * // } * // ] * @example * helper.addFacetRefinement('color', 'blue'); * helper.addFacetExclusion('color', 'red'); * helper.getRefinements('color'); * // [ * // { * // "value": "blue", * // "type": "conjunctive" * // }, * // { * // "value": "red", * // "type": "exclude" * // } * // ] * @example * helper.addDisjunctiveFacetRefinement('material', 'plastic'); * // [ * // { * // "value": "plastic", * // "type": "disjunctive" * // } * // ] */ AlgoliaSearchHelper.prototype.getRefinements = function(facetName) { var refinements = []; if (this.state.isConjunctiveFacet(facetName)) { var conjRefinements = this.state.getConjunctiveRefinements(facetName); forEach(conjRefinements, function(r) { refinements.push({ value: r, type: 'conjunctive' }); }); var excludeRefinements = this.state.getExcludeRefinements(facetName); forEach(excludeRefinements, function(r) { refinements.push({ value: r, type: 'exclude' }); }); } else if (this.state.isDisjunctiveFacet(facetName)) { var disjRefinements = this.state.getDisjunctiveRefinements(facetName); forEach(disjRefinements, function(r) { refinements.push({ value: r, type: 'disjunctive' }); }); } var numericRefinements = this.state.getNumericRefinements(facetName); forEach(numericRefinements, function(value, operator) { refinements.push({ value: value, operator: operator, type: 'numeric' }); }); return refinements; }; /** * Return the current refinement for the (attribute, operator) * @param {string} attribute of the record * @param {string} operator applied * @return {number} value of the refinement */ AlgoliaSearchHelper.prototype.getNumericRefinement = function(attribute, operator) { return this.state.getNumericRefinement(attribute, operator); }; /** * Get the current breadcrumb for a hierarchical facet, as an array * @param {string} facetName Hierarchical facet name * @return {array.<string>} the path as an array of string */ AlgoliaSearchHelper.prototype.getHierarchicalFacetBreadcrumb = function(facetName) { return this.state.getHierarchicalFacetBreadcrumb(facetName); }; // /////////// PRIVATE /** * Perform the underlying queries * @private * @return {undefined} * @fires search * @fires result * @fires error */ AlgoliaSearchHelper.prototype._search = function() { var state = this.state; var mainQueries = requestBuilder._getQueries(state.index, state); var states = [{ state: state, queriesCount: mainQueries.length, helper: this }]; this.emit('search', state, this.lastResults); var derivedQueries = map(this.derivedHelpers, function(derivedHelper) { var derivedState = derivedHelper.getModifiedState(state); var queries = requestBuilder._getQueries(derivedState.index, derivedState); states.push({ state: derivedState, queriesCount: queries.length, helper: derivedHelper }); derivedHelper.emit('search', derivedState, derivedHelper.lastResults); return queries; }); var queries = mainQueries.concat(flatten(derivedQueries)); var queryId = this._queryId++; this.client.search(queries, this._dispatchAlgoliaResponse.bind(this, states, queryId)); }; /** * Transform the responses as sent by the server and transform them into a user * usable objet that merge the results of all the batch requests. It will dispatch * over the different helper + derived helpers (when there are some). * @private * @param {array.<{SearchParameters, AlgoliaQueries, AlgoliaSearchHelper}>} * state state used for to generate the request * @param {number} queryId id of the current request * @param {Error} err error if any, null otherwise * @param {object} content content of the response * @return {undefined} */ AlgoliaSearchHelper.prototype._dispatchAlgoliaResponse = function(states, queryId, err, content) { if (queryId < this._lastQueryIdReceived) { // Outdated answer return; } this._lastQueryIdReceived = queryId; if (err) { this.emit('error', err); return; } var results = content.results; forEach(states, function(s) { var state = s.state; var queriesCount = s.queriesCount; var helper = s.helper; var specificResults = results.splice(0, queriesCount); var formattedResponse = helper.lastResults = new SearchResults(state, specificResults); helper.emit('result', formattedResponse, state); }); }; AlgoliaSearchHelper.prototype.containsRefinement = function(query, facetFilters, numericFilters, tagFilters) { return query || facetFilters.length !== 0 || numericFilters.length !== 0 || tagFilters.length !== 0; }; /** * Test if there are some disjunctive refinements on the facet * @private * @param {string} facet the attribute to test * @return {boolean} */ AlgoliaSearchHelper.prototype._hasDisjunctiveRefinements = function(facet) { return this.state.disjunctiveRefinements[facet] && this.state.disjunctiveRefinements[facet].length > 0; }; AlgoliaSearchHelper.prototype._change = function() { this.emit('change', this.state, this.lastResults); }; /** * Clears the cache of the underlying Algolia client. * @return {AlgoliaSearchHelper} */ AlgoliaSearchHelper.prototype.clearCache = function() { this.client.clearCache(); return this; }; /** * Updates the internal client instance. If the reference of the clients * are equal then no update is actually done. * @param {AlgoliaSearch} newClient an AlgoliaSearch client * @return {AlgoliaSearchHelper} */ AlgoliaSearchHelper.prototype.setClient = function(newClient) { if (this.client === newClient) return this; if (newClient.addAlgoliaAgent && !doesClientAgentContainsHelper(newClient)) newClient.addAlgoliaAgent('JS Helper ' + version); this.client = newClient; return this; }; /** * Gets the instance of the currently used client. * @return {AlgoliaSearch} */ AlgoliaSearchHelper.prototype.getClient = function() { return this.client; }; /** * Creates an derived instance of the Helper. A derived helper * is a way to request other indices synchronised with the lifecycle * of the main Helper. This mechanism uses the multiqueries feature * of Algolia to aggregate all the requests in a single network call. * * This method takes a function that is used to create a new SearchParameter * that will be used to create requests to Algolia. Those new requests * are created just before the `search` event. The signature of the function * is `SearchParameters -> SearchParameters`. * * This method returns a new DerivedHelper which is an EventEmitter * that fires the same `search`, `result` and `error` events. Those * events, however, will receive data specific to this DerivedHelper * and the SearchParameters that is returned by the call of the * parameter function. * @param {function} fn SearchParameters -> SearchParameters * @return {DerivedHelper} */ AlgoliaSearchHelper.prototype.derive = function(fn) { var derivedHelper = new DerivedHelper(this, fn); this.derivedHelpers.push(derivedHelper); return derivedHelper; }; /** * This method detaches a derived Helper from the main one. Prefer using the one from the * derived helper itself, to remove the event listeners too. * @private * @return {undefined} * @throws Error */ AlgoliaSearchHelper.prototype.detachDerivedHelper = function(derivedHelper) { var pos = this.derivedHelpers.indexOf(derivedHelper); if (pos === -1) throw new Error('Derived helper already detached'); this.derivedHelpers.splice(pos, 1); }; /** * @typedef AlgoliaSearchHelper.NumericRefinement * @type {object} * @property {number[]} value the numbers that are used for filtering this attribute with * the operator specified. * @property {string} operator the facetting data: value, number of entries * @property {string} type will be 'numeric' */ /** * @typedef AlgoliaSearchHelper.FacetRefinement * @type {object} * @property {string} value the string use to filter the attribute * @property {string} type the type of filter: 'conjunctive', 'disjunctive', 'exclude' */ /* * This function tests if the _ua parameter of the client * already contains the JS Helper UA */ function doesClientAgentContainsHelper(client) { // this relies on JS Client internal variable, this might break if implementation changes var currentAgent = client._ua; return !currentAgent ? false : currentAgent.indexOf('JS Helper') !== -1; } module.exports = AlgoliaSearchHelper; /***/ }), /* 245 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var map = __webpack_require__(16); var isArray = __webpack_require__(1); var isNumber = __webpack_require__(200); var isString = __webpack_require__(49); function valToNumber(v) { if (isNumber(v)) { return v; } else if (isString(v)) { return parseFloat(v); } else if (isArray(v)) { return map(v, valToNumber); } throw new Error('The value should be a number, a parseable string or an array of those.'); } module.exports = valToNumber; /***/ }), /* 246 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var forEach = __webpack_require__(34); var map = __webpack_require__(16); var reduce = __webpack_require__(51); var merge = __webpack_require__(105); var isArray = __webpack_require__(1); var requestBuilder = { /** * Get all the queries to send to the client, those queries can used directly * with the Algolia client. * @private * @return {object[]} The queries */ _getQueries: function getQueries(index, state) { var queries = []; // One query for the hits queries.push({ indexName: index, params: requestBuilder._getHitsSearchParams(state) }); // One for each disjunctive facets forEach(state.getRefinedDisjunctiveFacets(), function(refinedFacet) { queries.push({ indexName: index, params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet) }); }); // maybe more to get the root level of hierarchical facets when activated forEach(state.getRefinedHierarchicalFacets(), function(refinedFacet) { var hierarchicalFacet = state.getHierarchicalFacetByName(refinedFacet); var currentRefinement = state.getHierarchicalRefinement(refinedFacet); // if we are deeper than level 0 (starting from `beer > IPA`) // we want to get the root values var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); if (currentRefinement.length > 0 && currentRefinement[0].split(separator).length > 1) { queries.push({ indexName: index, params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet, true) }); } }); return queries; }, /** * Build search parameters used to fetch hits * @private * @return {object.<string, any>} */ _getHitsSearchParams: function(state) { var facets = state.facets .concat(state.disjunctiveFacets) .concat(requestBuilder._getHitsHierarchicalFacetsAttributes(state)); var facetFilters = requestBuilder._getFacetFilters(state); var numericFilters = requestBuilder._getNumericFilters(state); var tagFilters = requestBuilder._getTagFilters(state); var additionalParams = { facets: facets, tagFilters: tagFilters }; if (facetFilters.length > 0) { additionalParams.facetFilters = facetFilters; } if (numericFilters.length > 0) { additionalParams.numericFilters = numericFilters; } return merge(state.getQueryParams(), additionalParams); }, /** * Build search parameters used to fetch a disjunctive facet * @private * @param {string} facet the associated facet name * @param {boolean} hierarchicalRootLevel ?? FIXME * @return {object} */ _getDisjunctiveFacetSearchParams: function(state, facet, hierarchicalRootLevel) { var facetFilters = requestBuilder._getFacetFilters(state, facet, hierarchicalRootLevel); var numericFilters = requestBuilder._getNumericFilters(state, facet); var tagFilters = requestBuilder._getTagFilters(state); var additionalParams = { hitsPerPage: 1, page: 0, attributesToRetrieve: [], attributesToHighlight: [], attributesToSnippet: [], tagFilters: tagFilters }; var hierarchicalFacet = state.getHierarchicalFacetByName(facet); if (hierarchicalFacet) { additionalParams.facets = requestBuilder._getDisjunctiveHierarchicalFacetAttribute( state, hierarchicalFacet, hierarchicalRootLevel ); } else { additionalParams.facets = facet; } if (numericFilters.length > 0) { additionalParams.numericFilters = numericFilters; } if (facetFilters.length > 0) { additionalParams.facetFilters = facetFilters; } return merge(state.getQueryParams(), additionalParams); }, /** * Return the numeric filters in an algolia request fashion * @private * @param {string} [facetName] the name of the attribute for which the filters should be excluded * @return {string[]} the numeric filters in the algolia format */ _getNumericFilters: function(state, facetName) { if (state.numericFilters) { return state.numericFilters; } var numericFilters = []; forEach(state.numericRefinements, function(operators, attribute) { forEach(operators, function(values, operator) { if (facetName !== attribute) { forEach(values, function(value) { if (isArray(value)) { var vs = map(value, function(v) { return attribute + operator + v; }); numericFilters.push(vs); } else { numericFilters.push(attribute + operator + value); } }); } }); }); return numericFilters; }, /** * Return the tags filters depending * @private * @return {string} */ _getTagFilters: function(state) { if (state.tagFilters) { return state.tagFilters; } return state.tagRefinements.join(','); }, /** * Build facetFilters parameter based on current refinements. The array returned * contains strings representing the facet filters in the algolia format. * @private * @param {string} [facet] if set, the current disjunctive facet * @return {array.<string>} */ _getFacetFilters: function(state, facet, hierarchicalRootLevel) { var facetFilters = []; forEach(state.facetsRefinements, function(facetValues, facetName) { forEach(facetValues, function(facetValue) { facetFilters.push(facetName + ':' + facetValue); }); }); forEach(state.facetsExcludes, function(facetValues, facetName) { forEach(facetValues, function(facetValue) { facetFilters.push(facetName + ':-' + facetValue); }); }); forEach(state.disjunctiveFacetsRefinements, function(facetValues, facetName) { if (facetName === facet || !facetValues || facetValues.length === 0) return; var orFilters = []; forEach(facetValues, function(facetValue) { orFilters.push(facetName + ':' + facetValue); }); facetFilters.push(orFilters); }); forEach(state.hierarchicalFacetsRefinements, function(facetValues, facetName) { var facetValue = facetValues[0]; if (facetValue === undefined) { return; } var hierarchicalFacet = state.getHierarchicalFacetByName(facetName); var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var rootPath = state._getHierarchicalRootPath(hierarchicalFacet); var attributeToRefine; var attributesIndex; // we ask for parent facet values only when the `facet` is the current hierarchical facet if (facet === facetName) { // if we are at the root level already, no need to ask for facet values, we get them from // the hits query if (facetValue.indexOf(separator) === -1 || (!rootPath && hierarchicalRootLevel === true) || (rootPath && rootPath.split(separator).length === facetValue.split(separator).length)) { return; } if (!rootPath) { attributesIndex = facetValue.split(separator).length - 2; facetValue = facetValue.slice(0, facetValue.lastIndexOf(separator)); } else { attributesIndex = rootPath.split(separator).length - 1; facetValue = rootPath; } attributeToRefine = hierarchicalFacet.attributes[attributesIndex]; } else { attributesIndex = facetValue.split(separator).length - 1; attributeToRefine = hierarchicalFacet.attributes[attributesIndex]; } if (attributeToRefine) { facetFilters.push([attributeToRefine + ':' + facetValue]); } }); return facetFilters; }, _getHitsHierarchicalFacetsAttributes: function(state) { var out = []; return reduce( state.hierarchicalFacets, // ask for as much levels as there's hierarchical refinements function getHitsAttributesForHierarchicalFacet(allAttributes, hierarchicalFacet) { var hierarchicalRefinement = state.getHierarchicalRefinement(hierarchicalFacet.name)[0]; // if no refinement, ask for root level if (!hierarchicalRefinement) { allAttributes.push(hierarchicalFacet.attributes[0]); return allAttributes; } var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var level = hierarchicalRefinement.split(separator).length; var newAttributes = hierarchicalFacet.attributes.slice(0, level + 1); return allAttributes.concat(newAttributes); }, out); }, _getDisjunctiveHierarchicalFacetAttribute: function(state, hierarchicalFacet, rootLevel) { var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); if (rootLevel === true) { var rootPath = state._getHierarchicalRootPath(hierarchicalFacet); var attributeIndex = 0; if (rootPath) { attributeIndex = rootPath.split(separator).length; } return [hierarchicalFacet.attributes[attributeIndex]]; } var hierarchicalRefinement = state.getHierarchicalRefinement(hierarchicalFacet.name)[0] || ''; // if refinement is 'beers > IPA > Flying dog', // then we want `facets: ['beers > IPA']` as disjunctive facet (parent level values) var parentLevel = hierarchicalRefinement.split(separator).length - 1; return hierarchicalFacet.attributes.slice(0, parentLevel + 1); }, getSearchForFacetQuery: function(facetName, query, state) { var stateForSearchForFacetValues = state.isDisjunctiveFacet(facetName) ? state.clearRefinements(facetName) : state; var queries = merge(requestBuilder._getHitsSearchParams(stateForSearchForFacetValues), { facetQuery: query, facetName: facetName }); return queries; } }; module.exports = requestBuilder; /***/ }), /* 247 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; /***/ }), /* 248 */ /***/ (function(module, exports, __webpack_require__) { var foreach = __webpack_require__(109); module.exports = function map(arr, fn) { var newArr = []; foreach(arr, function(item, itemIndex) { newArr.push(fn(item, itemIndex, arr)); }); return newArr; }; /***/ }), /* 249 */ /***/ (function(module, exports) { /** * Adds the key-value `pair` to `map`. * * @private * @param {Object} map The map to modify. * @param {Array} pair The key-value pair to add. * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { // Don't return `map.set` because it's not chainable in IE 11. map.set(pair[0], pair[1]); return map; } module.exports = addMapEntry; /***/ }), /* 250 */ /***/ (function(module, exports) { /** * Adds `value` to `set`. * * @private * @param {Object} set The set to modify. * @param {*} value The value to add. * @returns {Object} Returns `set`. */ function addSetEntry(set, value) { // Don't return `set.add` because it's not chainable in IE 11. set.add(value); return set; } module.exports = addSetEntry; /***/ }), /* 251 */ /***/ (function(module, exports) { /** * Converts an ASCII `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function asciiToArray(string) { return string.split(''); } module.exports = asciiToArray; /***/ }), /* 252 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(21), keys = __webpack_require__(8); /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } module.exports = baseAssign; /***/ }), /* 253 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(21), keysIn = __webpack_require__(50); /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); } module.exports = baseAssignIn; /***/ }), /* 254 */ /***/ (function(module, exports) { /** * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. * @param {number} [lower] The lower bound. * @param {number} upper The upper bound. * @returns {number} Returns the clamped number. */ function baseClamp(number, lower, upper) { if (number === number) { if (upper !== undefined) { number = number <= upper ? number : upper; } if (lower !== undefined) { number = number >= lower ? number : lower; } } return number; } module.exports = baseClamp; /***/ }), /* 255 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(40), arrayEach = __webpack_require__(85), assignValue = __webpack_require__(90), baseAssign = __webpack_require__(252), baseAssignIn = __webpack_require__(253), cloneBuffer = __webpack_require__(142), copyArray = __webpack_require__(67), copySymbols = __webpack_require__(290), copySymbolsIn = __webpack_require__(291), getAllKeys = __webpack_require__(95), getAllKeysIn = __webpack_require__(96), getTag = __webpack_require__(55), initCloneArray = __webpack_require__(306), initCloneByTag = __webpack_require__(307), initCloneObject = __webpack_require__(163), isArray = __webpack_require__(1), isBuffer = __webpack_require__(25), isObject = __webpack_require__(5), keys = __webpack_require__(8); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} bitmask The bitmask flags. * 1 - Deep clone * 2 - Flatten inherited properties * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, baseClone, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } module.exports = baseClone; /***/ }), /* 256 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(58), arrayIncludes = __webpack_require__(87), arrayIncludesWith = __webpack_require__(125), arrayMap = __webpack_require__(11), baseUnary = __webpack_require__(44), cacheHas = __webpack_require__(66); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * The base implementation of methods like `_.difference` without support * for excluding multiple arrays or iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Array} values The values to exclude. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of filtered values. */ function baseDifference(array, values, iteratee, comparator) { var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length; if (!length) { return result; } if (iteratee) { values = arrayMap(values, baseUnary(iteratee)); } if (comparator) { includes = arrayIncludesWith; isCommon = false; } else if (values.length >= LARGE_ARRAY_SIZE) { includes = cacheHas; isCommon = false; values = new SetCache(values); } outer: while (++index < length) { var value = array[index], computed = iteratee == null ? value : iteratee(value); value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var valuesIndex = valuesLength; while (valuesIndex--) { if (values[valuesIndex] === computed) { continue outer; } } result.push(value); } else if (!includes(values, computed, comparator)) { result.push(value); } } return result; } module.exports = baseDifference; /***/ }), /* 257 */ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(62); /** * The base implementation of `_.filter` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function baseFilter(collection, predicate) { var result = []; baseEach(collection, function(value, index, collection) { if (predicate(value, index, collection)) { result.push(value); } }); return result; } module.exports = baseFilter; /***/ }), /* 258 */ /***/ (function(module, exports) { /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; /***/ }), /* 259 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(58), arrayIncludes = __webpack_require__(87), arrayIncludesWith = __webpack_require__(125), arrayMap = __webpack_require__(11), baseUnary = __webpack_require__(44), cacheHas = __webpack_require__(66); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** * The base implementation of methods like `_.intersection`, without support * for iteratee shorthands, that accepts an array of arrays to inspect. * * @private * @param {Array} arrays The arrays to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of shared values. */ function baseIntersection(arrays, iteratee, comparator) { var includes = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = []; while (othIndex--) { var array = arrays[othIndex]; if (othIndex && iteratee) { array = arrayMap(array, baseUnary(iteratee)); } maxLength = nativeMin(array.length, maxLength); caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) ? new SetCache(othIndex && array) : undefined; } array = arrays[0]; var index = -1, seen = caches[0]; outer: while (++index < length && result.length < maxLength) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = (comparator || value !== 0) ? value : 0; if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator) )) { othIndex = othLength; while (--othIndex) { var cache = caches[othIndex]; if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator)) ) { continue outer; } } if (seen) { seen.push(computed); } result.push(value); } } return result; } module.exports = baseIntersection; /***/ }), /* 260 */ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(42); /** * The base implementation of `_.invert` and `_.invertBy` which inverts * `object` with values transformed by `iteratee` and set by `setter`. * * @private * @param {Object} object The object to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform values. * @param {Object} accumulator The initial inverted object. * @returns {Function} Returns `accumulator`. */ function baseInverter(object, setter, iteratee, accumulator) { baseForOwn(object, function(value, key, object) { setter(accumulator, iteratee(value), key, object); }); return accumulator; } module.exports = baseInverter; /***/ }), /* 261 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(40), baseIsEqual = __webpack_require__(64); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } module.exports = baseIsMatch; /***/ }), /* 262 */ /***/ (function(module, exports) { /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } module.exports = baseIsNaN; /***/ }), /* 263 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(5), isPrototype = __webpack_require__(36), nativeKeysIn = __webpack_require__(312); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /* 264 */ /***/ (function(module, exports, __webpack_require__) { var baseIsMatch = __webpack_require__(261), getMatchData = __webpack_require__(303), matchesStrictComparable = __webpack_require__(177); /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } module.exports = baseMatches; /***/ }), /* 265 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(64), get = __webpack_require__(72), hasIn = __webpack_require__(198), isKey = __webpack_require__(71), isStrictComparable = __webpack_require__(166), matchesStrictComparable = __webpack_require__(177), toKey = __webpack_require__(22); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } module.exports = baseMatchesProperty; /***/ }), /* 266 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(40), assignMergeValue = __webpack_require__(127), baseFor = __webpack_require__(130), baseMergeDeep = __webpack_require__(267), isObject = __webpack_require__(5), keysIn = __webpack_require__(50); /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { if (isObject(srcValue)) { stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(object[key], srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } module.exports = baseMerge; /***/ }), /* 267 */ /***/ (function(module, exports, __webpack_require__) { var assignMergeValue = __webpack_require__(127), cloneBuffer = __webpack_require__(142), cloneTypedArray = __webpack_require__(143), copyArray = __webpack_require__(67), initCloneObject = __webpack_require__(163), isArguments = __webpack_require__(24), isArray = __webpack_require__(1), isArrayLikeObject = __webpack_require__(103), isBuffer = __webpack_require__(25), isFunction = __webpack_require__(18), isObject = __webpack_require__(5), isPlainObject = __webpack_require__(48), isTypedArray = __webpack_require__(35), toPlainObject = __webpack_require__(338); /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = object[key], srcValue = source[key], stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } assignMergeValue(object, key, newValue); } module.exports = baseMergeDeep; /***/ }), /* 268 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(11), baseIteratee = __webpack_require__(12), baseMap = __webpack_require__(136), baseSortBy = __webpack_require__(275), baseUnary = __webpack_require__(44), compareMultiple = __webpack_require__(289), identity = __webpack_require__(23); /** * The base implementation of `_.orderBy` without param guards. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. * @param {string[]} orders The sort orders of `iteratees`. * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { var index = -1; iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); return { 'criteria': criteria, 'index': ++index, 'value': value }; }); return baseSortBy(result, function(object, other) { return compareMultiple(object, other, orders); }); } module.exports = baseOrderBy; /***/ }), /* 269 */ /***/ (function(module, exports, __webpack_require__) { var basePickBy = __webpack_require__(137), hasIn = __webpack_require__(198); /** * The base implementation of `_.pick` without support for individual * property identifiers. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @returns {Object} Returns the new object. */ function basePick(object, paths) { return basePickBy(object, paths, function(value, path) { return hasIn(object, path); }); } module.exports = basePick; /***/ }), /* 270 */ /***/ (function(module, exports) { /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } module.exports = baseProperty; /***/ }), /* 271 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(63); /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } module.exports = basePropertyDeep; /***/ }), /* 272 */ /***/ (function(module, exports) { /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} accumulator The initial value. * @param {boolean} initAccum Specify using the first or last element of * `collection` as the initial value. * @param {Function} eachFunc The function to iterate over `collection`. * @returns {*} Returns the accumulated value. */ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { eachFunc(collection, function(value, index, collection) { accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection); }); return accumulator; } module.exports = baseReduce; /***/ }), /* 273 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(90), castPath = __webpack_require__(20), isIndex = __webpack_require__(30), isObject = __webpack_require__(5), toKey = __webpack_require__(22); /** * The base implementation of `_.set`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { if (!isObject(object)) { return object; } path = castPath(path, object); var index = -1, length = path.length, lastIndex = length - 1, nested = object; while (nested != null && ++index < length) { var key = toKey(path[index]), newValue = value; if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; if (newValue === undefined) { newValue = isObject(objValue) ? objValue : (isIndex(path[index + 1]) ? [] : {}); } } assignValue(nested, key, newValue); nested = nested[key]; } return object; } module.exports = baseSet; /***/ }), /* 274 */ /***/ (function(module, exports, __webpack_require__) { var constant = __webpack_require__(195), defineProperty = __webpack_require__(150), identity = __webpack_require__(23); /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; module.exports = baseSetToString; /***/ }), /* 275 */ /***/ (function(module, exports) { /** * The base implementation of `_.sortBy` which uses `comparer` to define the * sort order of `array` and replaces criteria objects with their corresponding * values. * * @private * @param {Array} array The array to sort. * @param {Function} comparer The function to define sort order. * @returns {Array} Returns `array`. */ function baseSortBy(array, comparer) { var length = array.length; array.sort(comparer); while (length--) { array[length] = array[length].value; } return array; } module.exports = baseSortBy; /***/ }), /* 276 */ /***/ (function(module, exports) { /** * The base implementation of `_.sum` and `_.sumBy` without support for * iteratee shorthands. * * @private * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {number} Returns the sum. */ function baseSum(array, iteratee) { var result, index = -1, length = array.length; while (++index < length) { var current = iteratee(array[index]); if (current !== undefined) { result = result === undefined ? current : (result + current); } } return result; } module.exports = baseSum; /***/ }), /* 277 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(20), last = __webpack_require__(202), parent = __webpack_require__(313), toKey = __webpack_require__(22); /** * The base implementation of `_.unset`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The property path to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ function baseUnset(object, path) { path = castPath(path, object); object = parent(object, path); return object == null || delete object[toKey(last(path))]; } module.exports = baseUnset; /***/ }), /* 278 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(11); /** * The base implementation of `_.values` and `_.valuesIn` which creates an * array of `object` property values corresponding to the property names * of `props`. * * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. * @returns {Object} Returns the array of property values. */ function baseValues(object, props) { return arrayMap(props, function(key) { return object[key]; }); } module.exports = baseValues; /***/ }), /* 279 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLikeObject = __webpack_require__(103); /** * Casts `value` to an empty array if it's not an array like object. * * @private * @param {*} value The value to inspect. * @returns {Array|Object} Returns the cast array-like object. */ function castArrayLikeObject(value) { return isArrayLikeObject(value) ? value : []; } module.exports = castArrayLikeObject; /***/ }), /* 280 */ /***/ (function(module, exports, __webpack_require__) { var baseSlice = __webpack_require__(139); /** * Casts `array` to a slice if it's needed. * * @private * @param {Array} array The array to inspect. * @param {number} start The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the cast slice. */ function castSlice(array, start, end) { var length = array.length; end = end === undefined ? length : end; return (!start && end >= length) ? array : baseSlice(array, start, end); } module.exports = castSlice; /***/ }), /* 281 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(43); /** * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol * that is not found in the character symbols. * * @private * @param {Array} strSymbols The string symbols to inspect. * @param {Array} chrSymbols The character symbols to find. * @returns {number} Returns the index of the last unmatched string symbol. */ function charsEndIndex(strSymbols, chrSymbols) { var index = strSymbols.length; while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} return index; } module.exports = charsEndIndex; /***/ }), /* 282 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(43); /** * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol * that is not found in the character symbols. * * @private * @param {Array} strSymbols The string symbols to inspect. * @param {Array} chrSymbols The character symbols to find. * @returns {number} Returns the index of the first unmatched string symbol. */ function charsStartIndex(strSymbols, chrSymbols) { var index = -1, length = strSymbols.length; while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} return index; } module.exports = charsStartIndex; /***/ }), /* 283 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(93); /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } module.exports = cloneDataView; /***/ }), /* 284 */ /***/ (function(module, exports, __webpack_require__) { var addMapEntry = __webpack_require__(249), arrayReduce = __webpack_require__(89), mapToArray = __webpack_require__(98); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1; /** * Creates a clone of `map`. * * @private * @param {Object} map The map to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned map. */ function cloneMap(map, isDeep, cloneFunc) { var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); return arrayReduce(array, addMapEntry, new map.constructor); } module.exports = cloneMap; /***/ }), /* 285 */ /***/ (function(module, exports) { /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } module.exports = cloneRegExp; /***/ }), /* 286 */ /***/ (function(module, exports, __webpack_require__) { var addSetEntry = __webpack_require__(250), arrayReduce = __webpack_require__(89), setToArray = __webpack_require__(99); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1; /** * Creates a clone of `set`. * * @private * @param {Object} set The set to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned set. */ function cloneSet(set, isDeep, cloneFunc) { var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); return arrayReduce(array, addSetEntry, new set.constructor); } module.exports = cloneSet; /***/ }), /* 287 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(14); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } module.exports = cloneSymbol; /***/ }), /* 288 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(26); /** * Compares values to sort them in ascending order. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {number} Returns the sort order indicator for `value`. */ function compareAscending(value, other) { if (value !== other) { var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || (valIsNull && othIsDefined && othIsReflexive) || (!valIsDefined && othIsReflexive) || !valIsReflexive) { return 1; } if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || (othIsNull && valIsDefined && valIsReflexive) || (!othIsDefined && valIsReflexive) || !othIsReflexive) { return -1; } } return 0; } module.exports = compareAscending; /***/ }), /* 289 */ /***/ (function(module, exports, __webpack_require__) { var compareAscending = __webpack_require__(288); /** * Used by `_.orderBy` to compare multiple properties of a value to another * and stable sort them. * * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, * specify an order of "desc" for descending or "asc" for ascending sort order * of corresponding values. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {boolean[]|string[]} orders The order to sort by for each property. * @returns {number} Returns the sort order indicator for `object`. */ function compareMultiple(object, other, orders) { var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; while (++index < length) { var result = compareAscending(objCriteria[index], othCriteria[index]); if (result) { if (index >= ordersLength) { return result; } var order = orders[index]; return result * (order == 'desc' ? -1 : 1); } } // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications // that causes it, under certain circumstances, to provide the same value for // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 // for more details. // // This also ensures a stable sort in V8 and other engines. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. return object.index - other.index; } module.exports = compareMultiple; /***/ }), /* 290 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(21), getSymbols = __webpack_require__(70); /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } module.exports = copySymbols; /***/ }), /* 291 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(21), getSymbolsIn = __webpack_require__(156); /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return copyObject(source, getSymbolsIn(source), object); } module.exports = copySymbolsIn; /***/ }), /* 292 */ /***/ (function(module, exports) { /** * Gets the number of `placeholder` occurrences in `array`. * * @private * @param {Array} array The array to inspect. * @param {*} placeholder The placeholder to search for. * @returns {number} Returns the placeholder count. */ function countHolders(array, placeholder) { var length = array.length, result = 0; while (length--) { if (array[length] === placeholder) { ++result; } } return result; } module.exports = countHolders; /***/ }), /* 293 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(10); /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } module.exports = createBaseEach; /***/ }), /* 294 */ /***/ (function(module, exports) { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }), /* 295 */ /***/ (function(module, exports, __webpack_require__) { var createCtor = __webpack_require__(68), root = __webpack_require__(3); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; /** * Creates a function that wraps `func` to invoke it with the optional `this` * binding of `thisArg`. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ function createBind(func, bitmask, thisArg) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; } module.exports = createBind; /***/ }), /* 296 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(59), createCtor = __webpack_require__(68), createHybrid = __webpack_require__(148), createRecurry = __webpack_require__(149), getHolder = __webpack_require__(45), replaceHolders = __webpack_require__(33), root = __webpack_require__(3); /** * Creates a function that wraps `func` to enable currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createCurry(func, bitmask, arity) { var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; } var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) ? [] : replaceHolders(args, placeholder); length -= holders.length; if (length < arity) { return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return apply(fn, this, args); } return wrapper; } module.exports = createCurry; /***/ }), /* 297 */ /***/ (function(module, exports, __webpack_require__) { var baseIteratee = __webpack_require__(12), isArrayLike = __webpack_require__(10), keys = __webpack_require__(8); /** * Creates a `_.find` or `_.findLast` function. * * @private * @param {Function} findIndexFunc The function to find the collection index. * @returns {Function} Returns the new find function. */ function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object(collection); if (!isArrayLike(collection)) { var iteratee = baseIteratee(predicate, 3); collection = keys(collection); predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } var index = findIndexFunc(collection, predicate, fromIndex); return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; }; } module.exports = createFind; /***/ }), /* 298 */ /***/ (function(module, exports, __webpack_require__) { var baseInverter = __webpack_require__(260); /** * Creates a function like `_.invertBy`. * * @private * @param {Function} setter The function to set accumulator values. * @param {Function} toIteratee The function to resolve iteratees. * @returns {Function} Returns the new inverter function. */ function createInverter(setter, toIteratee) { return function(object, iteratee) { return baseInverter(object, setter, toIteratee(iteratee), {}); }; } module.exports = createInverter; /***/ }), /* 299 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(59), createCtor = __webpack_require__(68), root = __webpack_require__(3); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; /** * Creates a function that wraps `func` to invoke it with the `this` binding * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; } while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } return apply(fn, isBind ? thisArg : this, args); } return wrapper; } module.exports = createPartial; /***/ }), /* 300 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(17); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used by `_.defaults` to customize its `_.assignIn` use to assign properties * of source objects to the destination object for all destination properties * that resolve to `undefined`. * * @private * @param {*} objValue The destination value. * @param {*} srcValue The source value. * @param {string} key The key of the property to assign. * @param {Object} object The parent object of `objValue`. * @returns {*} Returns the value to assign. */ function customDefaultsAssignIn(objValue, srcValue, key, object) { if (objValue === undefined || (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { return srcValue; } return objValue; } module.exports = customDefaultsAssignIn; /***/ }), /* 301 */ /***/ (function(module, exports, __webpack_require__) { var isPlainObject = __webpack_require__(48); /** * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain * objects. * * @private * @param {*} value The value to inspect. * @param {string} key The key of the property to inspect. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. */ function customOmitClone(value) { return isPlainObject(value) ? undefined : value; } module.exports = customOmitClone; /***/ }), /* 302 */ /***/ (function(module, exports, __webpack_require__) { var realNames = __webpack_require__(314); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the name of `func`. * * @private * @param {Function} func The function to query. * @returns {string} Returns the function name. */ function getFuncName(func) { var result = (func.name + ''), array = realNames[result], length = hasOwnProperty.call(realNames, result) ? array.length : 0; while (length--) { var data = array[length], otherFunc = data.func; if (otherFunc == null || otherFunc == func) { return data.name; } } return result; } module.exports = getFuncName; /***/ }), /* 303 */ /***/ (function(module, exports, __webpack_require__) { var isStrictComparable = __webpack_require__(166), keys = __webpack_require__(8); /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } module.exports = getMatchData; /***/ }), /* 304 */ /***/ (function(module, exports) { /** Used to match wrap detail comments. */ var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; /** * Extracts wrapper details from the `source` body comment. * * @private * @param {string} source The source to inspect. * @returns {Array} Returns the wrapper details. */ function getWrapDetails(source) { var match = source.match(reWrapDetails); return match ? match[1].split(reSplitDetails) : []; } module.exports = getWrapDetails; /***/ }), /* 305 */ /***/ (function(module, exports) { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsZWJ = '\\u200d'; /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** * Checks if `string` contains Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a symbol is found, else `false`. */ function hasUnicode(string) { return reHasUnicode.test(string); } module.exports = hasUnicode; /***/ }), /* 306 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } module.exports = initCloneArray; /***/ }), /* 307 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(93), cloneDataView = __webpack_require__(283), cloneMap = __webpack_require__(284), cloneRegExp = __webpack_require__(285), cloneSet = __webpack_require__(286), cloneSymbol = __webpack_require__(287), cloneTypedArray = __webpack_require__(143); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, cloneFunc, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return cloneMap(object, isDeep, cloneFunc); case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return cloneSet(object, isDeep, cloneFunc); case symbolTag: return cloneSymbol(object); } } module.exports = initCloneByTag; /***/ }), /* 308 */ /***/ (function(module, exports) { /** Used to match wrap detail comments. */ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; /** * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private * @param {string} source The source to modify. * @returns {Array} details The details to insert. * @returns {string} Returns the modified source. */ function insertWrapDetails(source, details) { var length = details.length; if (!length) { return source; } var lastIndex = length - 1; details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; details = details.join(length > 2 ? ', ' : ' '); return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); } module.exports = insertWrapDetails; /***/ }), /* 309 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(14), isArguments = __webpack_require__(24), isArray = __webpack_require__(1); /** Built-in value references. */ var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } module.exports = isFlattenable; /***/ }), /* 310 */ /***/ (function(module, exports, __webpack_require__) { var LazyWrapper = __webpack_require__(82), getData = __webpack_require__(154), getFuncName = __webpack_require__(302), lodash = __webpack_require__(340); /** * Checks if `func` has a lazy counterpart. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` has a lazy counterpart, * else `false`. */ function isLaziable(func) { var funcName = getFuncName(func), other = lodash[funcName]; if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { return false; } if (func === other) { return true; } var data = getData(other); return !!data && func === data[0]; } module.exports = isLaziable; /***/ }), /* 311 */ /***/ (function(module, exports, __webpack_require__) { var composeArgs = __webpack_require__(144), composeArgsRight = __webpack_require__(145), replaceHolders = __webpack_require__(33); /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** * Merges the function metadata of `source` into `data`. * * Merging metadata reduces the number of wrappers used to invoke a function. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` * may be applied regardless of execution order. Methods like `_.ary` and * `_.rearg` modify function arguments, making the order in which they are * executed important, preventing the merging of metadata. However, we make * an exception for a safe combined case where curried functions have `_.ary` * and or `_.rearg` applied. * * @private * @param {Array} data The destination metadata. * @param {Array} source The source metadata. * @returns {Array} Returns `data`. */ function mergeData(data, source) { var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); var isCombo = ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); // Exit early if metadata can't be merged. if (!(isCommon || isCombo)) { return data; } // Use source `thisArg` if available. if (srcBitmask & WRAP_BIND_FLAG) { data[2] = source[2]; // Set when currying a bound function. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; } // Compose partial arguments. var value = source[3]; if (value) { var partials = data[3]; data[3] = partials ? composeArgs(partials, value, source[4]) : value; data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; } // Compose partial right arguments. value = source[5]; if (value) { partials = data[5]; data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; } // Use source `argPos` if available. value = source[7]; if (value) { data[7] = value; } // Use source `ary` if it's smaller. if (srcBitmask & WRAP_ARY_FLAG) { data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); } // Use source `arity` if one is not provided. if (data[9] == null) { data[9] = source[9]; } // Use source `func` and merge bitmasks. data[0] = source[0]; data[1] = newBitmask; return data; } module.exports = mergeData; /***/ }), /* 312 */ /***/ (function(module, exports) { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /* 313 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(63), baseSlice = __webpack_require__(139); /** * Gets the parent value at `path` of `object`. * * @private * @param {Object} object The object to query. * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value. */ function parent(object, path) { return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } module.exports = parent; /***/ }), /* 314 */ /***/ (function(module, exports) { /** Used to lookup unminified function names. */ var realNames = {}; module.exports = realNames; /***/ }), /* 315 */ /***/ (function(module, exports, __webpack_require__) { var copyArray = __webpack_require__(67), isIndex = __webpack_require__(30); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** * Reorder `array` according to the specified indexes where the element at * the first index is assigned as the first element, the element at * the second index is assigned as the second element, and so on. * * @private * @param {Array} array The array to reorder. * @param {Array} indexes The arranged array indexes. * @returns {Array} Returns `array`. */ function reorder(array, indexes) { var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); while (length--) { var index = indexes[length]; array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; } return array; } module.exports = reorder; /***/ }), /* 316 */ /***/ (function(module, exports) { /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } module.exports = strictIndexOf; /***/ }), /* 317 */ /***/ (function(module, exports, __webpack_require__) { var asciiToArray = __webpack_require__(251), hasUnicode = __webpack_require__(305), unicodeToArray = __webpack_require__(318); /** * Converts `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function stringToArray(string) { return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); } module.exports = stringToArray; /***/ }), /* 318 */ /***/ (function(module, exports) { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsAstral = '[' + rsAstralRange + ']', rsCombo = '[' + rsComboRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ var reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** * Converts a Unicode `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function unicodeToArray(string) { return string.match(reUnicode) || []; } module.exports = unicodeToArray; /***/ }), /* 319 */ /***/ (function(module, exports, __webpack_require__) { var arrayEach = __webpack_require__(85), arrayIncludes = __webpack_require__(87); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512; /** Used to associate wrap methods with their bit flags. */ var wrapFlags = [ ['ary', WRAP_ARY_FLAG], ['bind', WRAP_BIND_FLAG], ['bindKey', WRAP_BIND_KEY_FLAG], ['curry', WRAP_CURRY_FLAG], ['curryRight', WRAP_CURRY_RIGHT_FLAG], ['flip', WRAP_FLIP_FLAG], ['partial', WRAP_PARTIAL_FLAG], ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], ['rearg', WRAP_REARG_FLAG] ]; /** * Updates wrapper `details` based on `bitmask` flags. * * @private * @returns {Array} details The details to modify. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Array} Returns `details`. */ function updateWrapDetails(details, bitmask) { arrayEach(wrapFlags, function(pair) { var value = '_.' + pair[0]; if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { details.push(value); } }); return details.sort(); } module.exports = updateWrapDetails; /***/ }), /* 320 */ /***/ (function(module, exports, __webpack_require__) { var LazyWrapper = __webpack_require__(82), LodashWrapper = __webpack_require__(122), copyArray = __webpack_require__(67); /** * Creates a clone of `wrapper`. * * @private * @param {Object} wrapper The wrapper to clone. * @returns {Object} Returns the cloned wrapper. */ function wrapperClone(wrapper) { if (wrapper instanceof LazyWrapper) { return wrapper.clone(); } var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); result.__actions__ = copyArray(wrapper.__actions__); result.__index__ = wrapper.__index__; result.__values__ = wrapper.__values__; return result; } module.exports = wrapperClone; /***/ }), /* 321 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(21), createAssigner = __webpack_require__(147), keysIn = __webpack_require__(50); /** * This method is like `_.assignIn` except that it accepts `customizer` * which is invoked to produce the assigned values. If `customizer` returns * `undefined`, assignment is handled by the method instead. The `customizer` * is invoked with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.0.0 * @alias extendWith * @category Object * @param {Object} object The destination object. * @param {...Object} sources The source objects. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. * @see _.assignWith * @example * * function customizer(objValue, srcValue) { * return _.isUndefined(objValue) ? srcValue : objValue; * } * * var defaults = _.partialRight(_.assignInWith, customizer); * * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { copyObject(source, keysIn(source), object, customizer); }); module.exports = assignInWith; /***/ }), /* 322 */ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(19), createWrap = __webpack_require__(94), getHolder = __webpack_require__(45), replaceHolders = __webpack_require__(33); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_PARTIAL_FLAG = 32; /** * Creates a function that invokes `func` with the `this` binding of `thisArg` * and `partials` prepended to the arguments it receives. * * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to bind. * @param {*} thisArg The `this` binding of `func`. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new bound function. * @example * * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; * } * * var object = { 'user': 'fred' }; * * var bound = _.bind(greet, object, 'hi'); * bound('!'); * // => 'hi fred!' * * // Bound with placeholders. * var bound = _.bind(greet, object, _, '!'); * bound('hi'); * // => 'hi fred!' */ var bind = baseRest(function(func, thisArg, partials) { var bitmask = WRAP_BIND_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bind)); bitmask |= WRAP_PARTIAL_FLAG; } return createWrap(func, bitmask, thisArg, partials, holders); }); // Assign default placeholders. bind.placeholder = {}; module.exports = bind; /***/ }), /* 323 */ /***/ (function(module, exports) { /** * Creates an array with all falsey values removed. The values `false`, `null`, * `0`, `""`, `undefined`, and `NaN` are falsey. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to compact. * @returns {Array} Returns the new array of filtered values. * @example * * _.compact([0, 1, false, 2, '', 3]); * // => [1, 2, 3] */ function compact(array) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value) { result[resIndex++] = value; } } return result; } module.exports = compact; /***/ }), /* 324 */ /***/ (function(module, exports, __webpack_require__) { var baseDifference = __webpack_require__(256), baseFlatten = __webpack_require__(129), baseRest = __webpack_require__(19), isArrayLikeObject = __webpack_require__(103); /** * Creates an array of `array` values not included in the other given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. The order and references of result values are * determined by the first array. * * **Note:** Unlike `_.pullAll`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. * @see _.without, _.xor * @example * * _.difference([2, 1], [2, 3]); * // => [1] */ var difference = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; }); module.exports = difference; /***/ }), /* 325 */ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(42), castFunction = __webpack_require__(141); /** * Iterates over own enumerable string keyed properties of an object and * invokes `iteratee` for each property. The iteratee is invoked with three * arguments: (value, key, object). Iteratee functions may exit iteration * early by explicitly returning `false`. * * @static * @memberOf _ * @since 0.3.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. * @see _.forOwnRight * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.forOwn(new Foo, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { return object && baseForOwn(object, castFunction(iteratee)); } module.exports = forOwn; /***/ }), /* 326 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(43), isArrayLike = __webpack_require__(10), isString = __webpack_require__(49), toInteger = __webpack_require__(52), values = __webpack_require__(339); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as * the offset from the end of `collection`. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object|string} collection The collection to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. * @returns {boolean} Returns `true` if `value` is found, else `false`. * @example * * _.includes([1, 2, 3], 1); * // => true * * _.includes([1, 2, 3], 1, 2); * // => false * * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { collection = isArrayLike(collection) ? collection : values(collection); fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; var length = collection.length; if (fromIndex < 0) { fromIndex = nativeMax(length + fromIndex, 0); } return isString(collection) ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) : (!!length && baseIndexOf(collection, value, fromIndex) > -1); } module.exports = includes; /***/ }), /* 327 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(11), baseIntersection = __webpack_require__(259), baseRest = __webpack_require__(19), castArrayLikeObject = __webpack_require__(279); /** * Creates an array of unique values that are included in all given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. The order and references of result values are * determined by the first array. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @returns {Array} Returns the new array of intersecting values. * @example * * _.intersection([2, 1], [2, 3]); * // => [2] */ var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped) : []; }); module.exports = intersection; /***/ }), /* 328 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(41), baseForOwn = __webpack_require__(42), baseIteratee = __webpack_require__(12); /** * The opposite of `_.mapValues`; this method creates an object with the * same values as `object` and keys generated by running each own enumerable * string keyed property of `object` thru `iteratee`. The iteratee is invoked * with three arguments: (value, key, object). * * @static * @memberOf _ * @since 3.8.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapValues * @example * * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { * return key + value; * }); * // => { 'a1': 1, 'b2': 2 } */ function mapKeys(object, iteratee) { var result = {}; iteratee = baseIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { baseAssignValue(result, iteratee(value, key, object), value); }); return result; } module.exports = mapKeys; /***/ }), /* 329 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(41), baseForOwn = __webpack_require__(42), baseIteratee = __webpack_require__(12); /** * Creates an object with the same keys as `object` and values generated * by running each own enumerable string keyed property of `object` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, key, object). * * @static * @memberOf _ * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example * * var users = { * 'fred': { 'user': 'fred', 'age': 40 }, * 'pebbles': { 'user': 'pebbles', 'age': 1 } * }; * * _.mapValues(users, function(o) { return o.age; }); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) * * // The `_.property` iteratee shorthand. * _.mapValues(users, 'age'); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) */ function mapValues(object, iteratee) { var result = {}; iteratee = baseIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } module.exports = mapValues; /***/ }), /* 330 */ /***/ (function(module, exports) { /** * This method returns `undefined`. * * @static * @memberOf _ * @since 2.3.0 * @category Util * @example * * _.times(2, _.noop); * // => [undefined, undefined] */ function noop() { // No operation performed. } module.exports = noop; /***/ }), /* 331 */ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(19), createWrap = __webpack_require__(94), getHolder = __webpack_require__(45), replaceHolders = __webpack_require__(33); /** Used to compose bitmasks for function metadata. */ var WRAP_PARTIAL_FLAG = 32; /** * Creates a function that invokes `func` with `partials` prepended to the * arguments it receives. This method is like `_.bind` except it does **not** * alter the `this` binding. * * The `_.partial.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. * * **Note:** This method doesn't set the "length" property of partially * applied functions. * * @static * @memberOf _ * @since 0.2.0 * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new partially applied function. * @example * * function greet(greeting, name) { * return greeting + ' ' + name; * } * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); * // => 'hello fred' * * // Partially applied with placeholders. * var greetFred = _.partial(greet, _, 'fred'); * greetFred('hi'); * // => 'hi fred' */ var partial = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partial)); return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); }); // Assign default placeholders. partial.placeholder = {}; module.exports = partial; /***/ }), /* 332 */ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(19), createWrap = __webpack_require__(94), getHolder = __webpack_require__(45), replaceHolders = __webpack_require__(33); /** Used to compose bitmasks for function metadata. */ var WRAP_PARTIAL_RIGHT_FLAG = 64; /** * This method is like `_.partial` except that partially applied arguments * are appended to the arguments it receives. * * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. * * **Note:** This method doesn't set the "length" property of partially * applied functions. * * @static * @memberOf _ * @since 1.0.0 * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new partially applied function. * @example * * function greet(greeting, name) { * return greeting + ' ' + name; * } * * var greetFred = _.partialRight(greet, 'fred'); * greetFred('hi'); * // => 'hi fred' * * // Partially applied with placeholders. * var sayHelloTo = _.partialRight(greet, 'hello', _); * sayHelloTo('fred'); * // => 'hello fred' */ var partialRight = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partialRight)); return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); // Assign default placeholders. partialRight.placeholder = {}; module.exports = partialRight; /***/ }), /* 333 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(11), baseIteratee = __webpack_require__(12), basePickBy = __webpack_require__(137), getAllKeysIn = __webpack_require__(96); /** * Creates an object composed of the `object` properties `predicate` returns * truthy for. The predicate is invoked with two arguments: (value, key). * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The source object. * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pickBy(object, _.isNumber); * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { if (object == null) { return {}; } var props = arrayMap(getAllKeysIn(object), function(prop) { return [prop]; }); predicate = baseIteratee(predicate); return basePickBy(object, props, function(value, path) { return predicate(value, path[0]); }); } module.exports = pickBy; /***/ }), /* 334 */ /***/ (function(module, exports, __webpack_require__) { var baseProperty = __webpack_require__(270), basePropertyDeep = __webpack_require__(271), isKey = __webpack_require__(71), toKey = __webpack_require__(22); /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; /***/ }), /* 335 */ /***/ (function(module, exports, __webpack_require__) { var baseClamp = __webpack_require__(254), baseToString = __webpack_require__(65), toInteger = __webpack_require__(52), toString = __webpack_require__(74); /** * Checks if `string` starts with the given target string. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=0] The position to search from. * @returns {boolean} Returns `true` if `string` starts with `target`, * else `false`. * @example * * _.startsWith('abc', 'a'); * // => true * * _.startsWith('abc', 'b'); * // => false * * _.startsWith('abc', 'b', 1); * // => true */ function startsWith(string, target, position) { string = toString(string); position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); target = baseToString(target); return string.slice(position, position + target.length) == target; } module.exports = startsWith; /***/ }), /* 336 */ /***/ (function(module, exports, __webpack_require__) { var baseIteratee = __webpack_require__(12), baseSum = __webpack_require__(276); /** * This method is like `_.sum` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the value to be summed. * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the sum. * @example * * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; * * _.sumBy(objects, function(o) { return o.n; }); * // => 20 * * // The `_.property` iteratee shorthand. * _.sumBy(objects, 'n'); * // => 20 */ function sumBy(array, iteratee) { return (array && array.length) ? baseSum(array, baseIteratee(iteratee, 2)) : 0; } module.exports = sumBy; /***/ }), /* 337 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(5), isSymbol = __webpack_require__(26); /** Used as references for various `Number` constants. */ var NAN = 0 / 0; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = toNumber; /***/ }), /* 338 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(21), keysIn = __webpack_require__(50); /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return copyObject(value, keysIn(value)); } module.exports = toPlainObject; /***/ }), /* 339 */ /***/ (function(module, exports, __webpack_require__) { var baseValues = __webpack_require__(278), keys = __webpack_require__(8); /** * Creates an array of the own enumerable string keyed property values of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property values. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.values(new Foo); * // => [1, 2] (iteration order is not guaranteed) * * _.values('hi'); * // => ['h', 'i'] */ function values(object) { return object == null ? [] : baseValues(object, keys(object)); } module.exports = values; /***/ }), /* 340 */ /***/ (function(module, exports, __webpack_require__) { var LazyWrapper = __webpack_require__(82), LodashWrapper = __webpack_require__(122), baseLodash = __webpack_require__(92), isArray = __webpack_require__(1), isObjectLike = __webpack_require__(6), wrapperClone = __webpack_require__(320); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates a `lodash` object which wraps `value` to enable implicit method * chain sequences. Methods that operate on and return arrays, collections, * and functions can be chained together. Methods that retrieve a single value * or may return a primitive value will automatically end the chain sequence * and return the unwrapped value. Otherwise, the value must be unwrapped * with `_#value`. * * Explicit chain sequences, which must be unwrapped with `_#value`, may be * enabled using `_.chain`. * * The execution of chained methods is lazy, that is, it's deferred until * `_#value` is implicitly or explicitly called. * * Lazy evaluation allows several methods to support shortcut fusion. * Shortcut fusion is an optimization to merge iteratee calls; this avoids * the creation of intermediate arrays and can greatly reduce the number of * iteratee executions. Sections of a chain sequence qualify for shortcut * fusion if the section is applied to an array and iteratees accept only * one argument. The heuristic for whether a section qualifies for shortcut * fusion is subject to change. * * Chaining is supported in custom builds as long as the `_#value` method is * directly or indirectly included in the build. * * In addition to lodash methods, wrappers have `Array` and `String` methods. * * The wrapper `Array` methods are: * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` * * The wrapper `String` methods are: * `replace` and `split` * * The wrapper methods that support shortcut fusion are: * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` * * The chainable wrapper methods are: * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, * `zipObject`, `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, * `upperFirst`, `value`, and `words` * * @name _ * @constructor * @category Seq * @param {*} value The value to wrap in a `lodash` instance. * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * function square(n) { * return n * n; * } * * var wrapped = _([1, 2, 3]); * * // Returns an unwrapped value. * wrapped.reduce(_.add); * // => 6 * * // Returns a wrapped value. * var squares = wrapped.map(square); * * _.isArray(squares); * // => false * * _.isArray(squares.value()); * // => true */ function lodash(value) { if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { if (value instanceof LodashWrapper) { return value; } if (hasOwnProperty.call(value, '__wrapped__')) { return wrapperClone(value); } } return new LodashWrapper(value); } // Ensure wrappers are instances of `baseLodash`. lodash.prototype = baseLodash.prototype; lodash.prototype.constructor = lodash; module.exports = lodash; /***/ }), /* 341 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Highlighter; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function Highlighter(_ref) { var hit = _ref.hit; var attributeName = _ref.attributeName; var highlight = _ref.highlight; var highlightProperty = _ref.highlightProperty; var tagName = _ref.tagName; var parsedHighlightedValue = highlight({ hit: hit, attributeName: attributeName, highlightProperty: highlightProperty }); var reactHighlighted = parsedHighlightedValue.map(function (v, i) { var key = 'split-' + i + '-' + v.value; if (!v.isHighlighted) { return _react2.default.createElement( 'span', { key: key, className: 'ais-Highlight__nonHighlighted' }, v.value ); } var HighlightedTag = tagName ? tagName : 'em'; return _react2.default.createElement( HighlightedTag, { key: key, className: 'ais-Highlight__highlighted' }, v.value ); }); return _react2.default.createElement( 'span', { className: 'ais-Highlight' }, reactHighlighted ); } Highlighter.propTypes = { hit: _react2.default.PropTypes.object.isRequired, attributeName: _react2.default.PropTypes.string.isRequired, highlight: _react2.default.PropTypes.func.isRequired, highlightProperty: _react2.default.PropTypes.string.isRequired, tagName: _react2.default.PropTypes.string }; /***/ }), /* 342 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('SearchBox'); var SearchBox = function (_Component) { _inherits(SearchBox, _Component); function SearchBox(props) { _classCallCheck(this, SearchBox); var _this = _possibleConstructorReturn(this, (SearchBox.__proto__ || Object.getPrototypeOf(SearchBox)).call(this)); _this.getQuery = function () { return _this.props.searchAsYouType ? _this.props.currentRefinement : _this.state.query; }; _this.setQuery = function (val) { var _this$props = _this.props; var refine = _this$props.refine; var searchAsYouType = _this$props.searchAsYouType; if (searchAsYouType) { refine(val); } else { _this.setState({ query: val }); } }; _this.onInputMount = function (input) { _this.input = input; if (_this.props.__inputRef) { _this.props.__inputRef(input); } }; _this.onKeyDown = function (e) { if (!_this.props.focusShortcuts) { return; } var shortcuts = _this.props.focusShortcuts.map(function (key) { return typeof key === 'string' ? key.toUpperCase().charCodeAt(0) : key; }); var elt = e.target || e.srcElement; var tagName = elt.tagName; if (elt.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA') { // already in an input return; } var which = e.which || e.keyCode; if (shortcuts.indexOf(which) === -1) { // not the right shortcut return; } _this.input.focus(); e.stopPropagation(); e.preventDefault(); }; _this.onSubmit = function (e) { e.preventDefault(); e.stopPropagation(); _this.input.blur(); var _this$props2 = _this.props; var refine = _this$props2.refine; var searchAsYouType = _this$props2.searchAsYouType; if (!searchAsYouType) { refine(_this.getQuery()); } return false; }; _this.onChange = function (e) { _this.setQuery(e.target.value); if (_this.props.onChange) { _this.props.onChange(e); } }; _this.onReset = function () { _this.setQuery(''); _this.input.focus(); if (_this.props.onReset) { _this.props.onReset(); } }; _this.state = { query: props.searchAsYouType ? null : props.currentRefinement }; return _this; } _createClass(SearchBox, [{ key: 'componentDidMount', value: function componentDidMount() { document.addEventListener('keydown', this.onKeyDown); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { document.removeEventListener('keydown', this.onKeyDown); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { // Reset query when the searchParameters query has changed. // This is kind of an anti-pattern (props in state), but it works here // since we know for sure that searchParameters having changed means a // new search has been triggered. if (!nextProps.searchAsYouType && nextProps.currentRefinement !== this.props.currentRefinement) { this.setState({ query: nextProps.currentRefinement }); } } // From https://github.com/algolia/autocomplete.js/pull/86 }, { key: 'render', value: function render() { var _this2 = this; var _props = this.props; var translate = _props.translate; var autoFocus = _props.autoFocus; var query = this.getQuery(); var submitComponent = this.props.submitComponent ? this.props.submitComponent : _react2.default.createElement( 'svg', { role: 'img', width: '1em', height: '1em' }, _react2.default.createElement('use', { xlinkHref: '#sbx-icon-search-13' }) ); var resetComponent = this.props.resetComponent ? this.props.resetComponent : _react2.default.createElement( 'svg', { role: 'img', width: '1em', height: '1em' }, _react2.default.createElement('use', { xlinkHref: '#sbx-icon-clear-3' }) ); var searchInputEvents = Object.keys(this.props).reduce(function (props, prop) { if (['onsubmit', 'onreset', 'onchange'].indexOf(prop.toLowerCase()) === -1 && prop.indexOf('on') === 0) { return _extends({}, props, _defineProperty({}, prop, _this2.props[prop])); } return props; }, {}); /* eslint-disable max-len */ return _react2.default.createElement( 'form', _extends({ noValidate: true, onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit, onReset: this.onReset }, cx('root'), { action: '', role: 'search' }), _react2.default.createElement( 'svg', { xmlns: 'http://www.w3.org/2000/svg', style: { display: 'none' } }, _react2.default.createElement( 'symbol', { xmlns: 'http://www.w3.org/2000/svg', id: 'sbx-icon-search-13', viewBox: '0 0 40 40' }, _react2.default.createElement('path', { d: 'M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z', fillRule: 'evenodd' }) ), _react2.default.createElement( 'symbol', { xmlns: 'http://www.w3.org/2000/svg', id: 'sbx-icon-clear-3', viewBox: '0 0 20 20' }, _react2.default.createElement('path', { d: 'M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z', fillRule: 'evenodd' }) ) ), _react2.default.createElement( 'div', _extends({ role: 'search' }, cx('wrapper')), _react2.default.createElement('input', _extends({ ref: this.onInputMount, type: 'search', placeholder: translate('placeholder'), autoFocus: autoFocus, autoComplete: 'off', autoCorrect: 'off', autoCapitalize: 'off', spellCheck: 'false', required: true, value: query, onChange: this.onChange }, searchInputEvents, cx('input'))), _react2.default.createElement( 'button', _extends({ type: 'submit', title: translate('submitTitle') }, cx('submit')), submitComponent ), _react2.default.createElement( 'button', _extends({ type: 'reset', title: translate('resetTitle') }, cx('reset'), { onClick: this.onReset }), resetComponent ) ) ); /* eslint-enable */ } }]); return SearchBox; }(_react.Component); SearchBox.propTypes = { currentRefinement: _react.PropTypes.string, refine: _react.PropTypes.func.isRequired, translate: _react.PropTypes.func.isRequired, resetComponent: _react.PropTypes.element, submitComponent: _react.PropTypes.element, focusShortcuts: _react.PropTypes.arrayOf(_react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number])), autoFocus: _react.PropTypes.bool, searchAsYouType: _react.PropTypes.bool, onSubmit: _react.PropTypes.func, onReset: _react.PropTypes.func, onChange: _react.PropTypes.func, // For testing purposes __inputRef: _react.PropTypes.func }; SearchBox.defaultProps = { currentRefinement: '', focusShortcuts: ['s', '/'], autoFocus: false, searchAsYouType: true }; exports.default = (0, _translatable2.default)({ resetTitle: 'Clear the search query.', submitTitle: 'Submit your search query.', placeholder: 'Search here…' })(SearchBox); /***/ }), /* 343 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _has2 = __webpack_require__(56); var _has3 = _interopRequireDefault(_has2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Select = function (_Component) { _inherits(Select, _Component); function Select() { var _ref; var _temp, _this, _ret; _classCallCheck(this, Select); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Select.__proto__ || Object.getPrototypeOf(Select)).call.apply(_ref, [this].concat(args))), _this), _this.onChange = function (e) { _this.props.onSelect(e.target.value); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(Select, [{ key: 'render', value: function render() { var _props = this.props; var cx = _props.cx; var items = _props.items; var selectedItem = _props.selectedItem; return _react2.default.createElement( 'select', _extends({}, cx('root'), { value: selectedItem, onChange: this.onChange }), items.map(function (item) { return _react2.default.createElement( 'option', { key: (0, _has3.default)(item, 'key') ? item.key : item.value, disabled: item.disabled, value: item.value }, (0, _has3.default)(item, 'label') ? item.label : item.value ); }) ); } }]); return Select; }(_react.Component); Select.propTypes = { cx: _react.PropTypes.func.isRequired, onSelect: _react.PropTypes.func.isRequired, items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ value: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]).isRequired, key: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]), label: _react.PropTypes.string, disabled: _react.PropTypes.bool })).isRequired, selectedItem: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]).isRequired }; exports.default = Select; /***/ }), /* 344 */ /***/ (function(module, exports, __webpack_require__) { module.exports = buildSearchMethod; var errors = __webpack_require__(212); /** * Creates a search method to be used in clients * @param {string} queryParam the name of the attribute used for the query * @param {string} url the url * @return {function} the search method */ function buildSearchMethod(queryParam, url) { /** * The search method. Prepares the data and send the query to Algolia. * @param {string} query the string used for query search * @param {object} args additional parameters to send with the search * @param {function} [callback] the callback to be called with the client gets the answer * @return {undefined|Promise} If the callback is not provided then this methods returns a Promise */ return function search(query, args, callback) { // warn V2 users on how to search if (typeof query === 'function' && typeof args === 'object' || typeof callback === 'object') { // .search(query, params, cb) // .search(cb, params) throw new errors.AlgoliaSearchError('index.search usage is index.search(query, params, cb)'); } // Normalizing the function signature if (arguments.length === 0 || typeof query === 'function') { // Usage : .search(), .search(cb) callback = query; query = ''; } else if (arguments.length === 1 || typeof args === 'function') { // Usage : .search(query/args), .search(query, cb) callback = args; args = undefined; } // At this point we have 3 arguments with values // Usage : .search(args) // careful: typeof null === 'object' if (typeof query === 'object' && query !== null) { args = query; query = undefined; } else if (query === undefined || query === null) { // .search(undefined/null) query = ''; } var params = ''; if (query !== undefined) { params += queryParam + '=' + encodeURIComponent(query); } var additionalUA; if (args !== undefined) { if (args.additionalUA) { additionalUA = args.additionalUA; delete args.additionalUA; } // `_getSearchParams` will augment params, do not be fooled by the = versus += from previous if params = this.as._getSearchParams(args, params); } return this._search(params, url, callback, additionalUA); }; } /***/ }), /* 345 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor var TempCtor = function () {} TempCtor.prototype = superCtor.prototype ctor.prototype = new TempCtor() ctor.prototype.constructor = ctor } } /***/ }), /* 346 */, /* 347 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); exports.default = createIndex; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _Index = __webpack_require__(394); var _Index2 = _interopRequireDefault(_Index); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * Creates a specialized root Index component. It accepts * a specification of the root Element. * @param {object} root - the defininition of the root of an Index sub tree. * @returns {object} a Index root */ function createIndex(root) { var _class, _temp; return _temp = _class = function (_Component) { _inherits(CreateIndex, _Component); function CreateIndex() { _classCallCheck(this, CreateIndex); return _possibleConstructorReturn(this, (CreateIndex.__proto__ || Object.getPrototypeOf(CreateIndex)).apply(this, arguments)); } _createClass(CreateIndex, [{ key: 'render', value: function render() { return _react2.default.createElement(_Index2.default, { indexName: this.props.indexName, root: root, children: this.props.children }); } }]); return CreateIndex; }(_react.Component), _class.propTypes = { children: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.arrayOf(_react2.default.PropTypes.node), _react2.default.PropTypes.node]), indexName: _react.PropTypes.string.isRequired }, _temp; } /***/ }), /* 348 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); exports.default = createInstantSearch; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _InstantSearch = __webpack_require__(395); var _InstantSearch2 = _interopRequireDefault(_InstantSearch); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _name$author$descript = { name: 'react-instantsearch', author: { name: 'Algolia, Inc.', url: 'https://www.algolia.com' }, description: '\u26A1 Lightning-fast search for React and React Native apps', version: '4.0.0-beta.2', scripts: { build: './scripts/build.sh', 'build-and-publish': './scripts/build-and-publish.sh' }, homepage: 'https://community.algolia.com/react-instantsearch/', repository: { type: 'git', url: 'https://github.com/algolia/react-instantsearch/' }, dependencies: { algoliasearch: '^3.21.1', 'algoliasearch-helper': '2.19.0', classnames: '^2.2.5', lodash: '^4.17.4' }, license: 'MIT', devDependencies: { enzyme: '^2.7.1', react: '^15.4.2', 'react-dom': '^15.4.2', 'react-native': '^0.41.2', 'react-test-renderer': '^15.4.2' } }; var version = _name$author$descript.version; /** * Creates a specialized root InstantSearch component. It accepts * an algolia client and a specification of the root Element. * @param {function} defaultAlgoliaClient - a function that builds an Algolia client * @param {object} root - the defininition of the root of an InstantSearch sub tree. * @returns {object} an InstantSearch root */ function createInstantSearch(defaultAlgoliaClient, root) { var _class, _temp; return _temp = _class = function (_Component) { _inherits(CreateInstantSearch, _Component); function CreateInstantSearch(props) { _classCallCheck(this, CreateInstantSearch); var _this = _possibleConstructorReturn(this, (CreateInstantSearch.__proto__ || Object.getPrototypeOf(CreateInstantSearch)).call(this)); _this.client = props.algoliaClient || defaultAlgoliaClient(props.appId, props.apiKey); _this.client.addAlgoliaAgent('react-instantsearch ' + version); return _this; } _createClass(CreateInstantSearch, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var props = this.props; if (nextProps.algoliaClient) { this.client = nextProps.algoliaClient; } else if (props.appId !== nextProps.appId || props.apiKey !== nextProps.apiKey) { this.client = defaultAlgoliaClient(nextProps.appId, nextProps.apiKey); } this.client.addAlgoliaAgent('react-instantsearch ' + version); } }, { key: 'render', value: function render() { return _react2.default.createElement(_InstantSearch2.default, { createURL: this.props.createURL, indexName: this.props.indexName, searchParameters: this.props.searchParameters, searchState: this.props.searchState, onSearchStateChange: this.props.onSearchStateChange, root: root, algoliaClient: this.client, children: this.props.children }); } }]); return CreateInstantSearch; }(_react.Component), _class.propTypes = { algoliaClient: _react.PropTypes.object, appId: _react.PropTypes.string, apiKey: _react.PropTypes.string, children: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.arrayOf(_react2.default.PropTypes.node), _react2.default.PropTypes.node]), indexName: _react.PropTypes.string.isRequired, searchParameters: _react.PropTypes.object, createURL: _react.PropTypes.func, searchState: _react.PropTypes.object, onSearchStateChange: _react.PropTypes.func }, _temp; } /***/ }), /* 349 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectCurrentRefinements = __webpack_require__(206); var _connectCurrentRefinements2 = _interopRequireDefault(_connectCurrentRefinements); var _ClearAll = __webpack_require__(372); var _ClearAll2 = _interopRequireDefault(_ClearAll); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The ClearAll widget displays a button that lets the user clean every refinement applied * to the search. * @name ClearAll * @kind widget * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @propType {boolean} [clearsQuery=false] - Pass true to also clear the search query * @themeKey ais-ClearAll__root - the widget button * @translationKey reset - the clear all button value * @example * import React from 'react'; * * import {ClearAll, RefinementList} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <ClearAll /> * <RefinementList attributeName="colors" defaultRefinement={['Black']} /> * </InstantSearch> * ); * } */ exports.default = (0, _connectCurrentRefinements2.default)(_ClearAll2.default); /***/ }), /* 350 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectConfigure = __webpack_require__(216); var _connectConfigure2 = _interopRequireDefault(_connectConfigure); var _Configure = __webpack_require__(373); var _Configure2 = _interopRequireDefault(_Configure); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Configure is a widget that lets you provide raw search parameters * to the Algolia API. * * Any of the props added to this widget will be forwarded to Algolia. For more information * on the different parameters that can be set, have a look at the * [reference](https://www.algolia.com/doc/api-client/javascript/search#search-parameters). * * This widget can be used either with react-dom and react-native. It will not render anything * on screen, only configure some parameters. * * Read more in the [Search parameters](guide/Search_parameters.html) guide. * @name Configure * @kind widget * @example * import React from 'react'; * * import {Configure} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <Configure distinct={1} /> * </InstantSearch> * ); * } */ exports.default = (0, _connectConfigure2.default)(_Configure2.default); /***/ }), /* 351 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectCurrentRefinements = __webpack_require__(206); var _connectCurrentRefinements2 = _interopRequireDefault(_connectCurrentRefinements); var _CurrentRefinements = __webpack_require__(374); var _CurrentRefinements2 = _interopRequireDefault(_CurrentRefinements); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The CurrentRefinements widget displays the list of currently applied filters. * * It allows the user to selectively remove them. * @name CurrentRefinements * @kind widget * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @themeKey ais-CurrentRefinements__root - the root div of the widget * @themeKey ais-CurrentRefinements__items - the container of the filters * @themeKey ais-CurrentRefinements__item - a single filter * @themeKey ais-CurrentRefinements__itemLabel - the label of a filter * @themeKey ais-CurrentRefinements__itemClear - the trigger to remove the filter * @themeKey ais-CurrentRefinements__noRefinement - present when there is no refinement * @translationKey clearFilter - the remove filter button label * @example * import React from 'react'; * * import {ClearAll, RefinementList} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <CurrentRefinements /> * <RefinementList attributeName="colors" defaultRefinement={['Black']} /> * </InstantSearch> * ); * } */ exports.default = (0, _connectCurrentRefinements2.default)(_CurrentRefinements2.default); /***/ }), /* 352 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectHierarchicalMenu = __webpack_require__(217); var _connectHierarchicalMenu2 = _interopRequireDefault(_connectHierarchicalMenu); var _HierarchicalMenu = __webpack_require__(375); var _HierarchicalMenu2 = _interopRequireDefault(_HierarchicalMenu); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The hierarchical menu lets the user browse attributes using a tree-like structure. * * This is commonly used for multi-level categorization of products on e-commerce * websites. From a UX point of view, we suggest not displaying more than two levels deep. * * @name HierarchicalMenu * @kind widget * @requirements To use this widget, your attributes must be formatted in a specific way. * If you want for example to have a hiearchical menu of categories, objects in your index * should be formatted this way: * * ```json * { * "categories.lvl0": "products", * "categories.lvl1": "products > fruits", * "categories.lvl2": "products > fruits > citrus" * } * ``` * * It's also possible to provide more than one path for each level: * * ```json * { * "categories.lvl0": ["products", "goods"], * "categories.lvl1": ["products > fruits", "goods > to eat"] * } * ``` * * All attributes passed to the `attributes` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * * @propType {string} attributes - List of attributes to use to generate the hierarchy of the menu. See the example for the convention to follow. * @propType {boolean} [showMore=false] - Flag to activate the show more button, for toggling the number of items between limitMin and limitMax. * @propType {number} [limitMin=10] - The maximum number of items displayed. * @propType {number} [limitMax=20] - The maximum number of items displayed when the user triggers the show more. Not considered if `showMore` is false. * @propType {string} [separator='>'] - Specifies the level separator used in the data. * @propType {string[]} [rootPath=null] - The already selected and hidden path. * @propType {boolean} [showParentLevel=true] - Flag to set if the parent level should be displayed. * @propType {string} [defaultRefinement] - the item value selected by default * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @themeKey ais-HierarchicalMenu__root - Container of the widget * @themeKey ais-HierarchicalMenu__items - Container of the items * @themeKey ais-HierarchicalMenu__item - Id for a single list item * @themeKey ais-HierarchicalMenu__itemSelected - Id for the selected items in the list * @themeKey ais-HierarchicalMenu__itemParent - Id for the elements that have a sub list displayed * @themeKey HierarchicalMenu__itemSelectedParent - Id for parents that have currently a child selected * @themeKey ais-HierarchicalMenu__itemLink - the link containing the label and the count * @themeKey ais-HierarchicalMenu__itemLabel - the label of the entry * @themeKey ais-HierarchicalMenu__itemCount - the count of the entry * @themeKey ais-HierarchicalMenu__itemItems - id representing a children * @themeKey ais-HierarchicalMenu__showMore - container for the show more button * @themeKey ais-HierarchicalMenu__noRefinement - present when there is no refinement * @translationKey showMore - Label value of the button which toggles the number of items * @example * import React from 'react'; * import { * InstantSearch, * HierarchicalMenu, * } from 'react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <HierarchicalMenu * id="categories" * key="categories" * attributes={[ * 'category', * 'sub_category', * 'sub_sub_category', * ]} * /> * </InstantSearch> * ); * } */ exports.default = (0, _connectHierarchicalMenu2.default)(_HierarchicalMenu2.default); /***/ }), /* 353 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectHits = __webpack_require__(218); var _connectHits2 = _interopRequireDefault(_connectHits); var _Hits = __webpack_require__(377); var _Hits2 = _interopRequireDefault(_Hits); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Displays a list of hits. * * To configure the number of hits being shown, use the [HitsPerPage widget](widgets/HitsPerPage.html), * [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or the [Configure widget](widgets/Configure.html). * * @name Hits * @kind widget * @propType {Component} [hitComponent] - Component used for rendering each hit from * the results. If it is not provided the rendering defaults to displaying the * hit in its JSON form. The component will be called with a `hit` prop. * @themeKey ais-Hits__root - the root of the component * @example * import React from 'react'; * import { * InstantSearch, * Hits, * } from 'react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <Hits /> * </InstantSearch> * ); * } */ exports.default = (0, _connectHits2.default)(_Hits2.default); /***/ }), /* 354 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectHitsPerPage = __webpack_require__(219); var _connectHitsPerPage2 = _interopRequireDefault(_connectHitsPerPage); var _HitsPerPage = __webpack_require__(378); var _HitsPerPage2 = _interopRequireDefault(_HitsPerPage); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The HitsPerPage widget displays a dropdown menu to let the user change the number * of displayed hits. * * If you only want to configure the number of hits per page without * displaying a widget, you should use the `<Configure hitsPerPage={20} />` widget. See [`<Configure /> documentation`](widgets/Configure.html) * * @name HitsPerPage * @kind widget * @propType {{value: number, label: string}[]} items - List of available options. * @propType {number} defaultRefinement - The number of items selected by default * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @themeKey ais-HitsPerPage__root - the root of the component. * @example * import React from 'react'; * import { * InstantSearch, * HitsPerPage, * } from 'react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <HitsPerPage * defaultRefinement={20} * items={[{value: '30', label: 'Show 20 hits'}, {value: '50', label: 'Show 50 hits'}]} * /> * </InstantSearch> * ); * } */ exports.default = (0, _connectHitsPerPage2.default)(_HitsPerPage2.default); /***/ }), /* 355 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectInfiniteHits = __webpack_require__(220); var _connectInfiniteHits2 = _interopRequireDefault(_connectInfiniteHits); var _InfiniteHits = __webpack_require__(379); var _InfiniteHits2 = _interopRequireDefault(_InfiniteHits); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Displays an infinite list of hits along with a **load more** button. * * To configure the number of hits being shown, use the [HitsPerPage widget](widgets/HitsPerPage.html), * [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or the [Configure widget](widgets/Configure.html). * * @name InfiniteHits * @kind widget * @propType {Component} hitComponent - Component used for rendering each hit from * the results. If it is not provided the rendering defaults to displaying the * hit in its JSON form. The component will be called with a `hit` prop. * @themeKey root - the root of the component * @translationKey loadMore - the label of load more button * @example * import React from 'react'; * import { * InstantSearch, * Hits, * } from 'react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <InfiniteHits /> * </InstantSearch> * ); * } */ exports.default = (0, _connectInfiniteHits2.default)(_InfiniteHits2.default); /***/ }), /* 356 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectMenu = __webpack_require__(221); var _connectMenu2 = _interopRequireDefault(_connectMenu); var _Menu = __webpack_require__(381); var _Menu2 = _interopRequireDefault(_Menu); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The Menu component displays a menu that lets the user choose a single value for a specific attribute. * @name Menu * @kind widget * @requirements The attribute passed to the `attributeName` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * @propType {string} attributeName - the name of the attribute in the record * @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items * @propType {number} [limitMin=10] - the minimum number of diplayed items * @propType {number} [limitMax=20] - the maximun number of displayed items. Only used when showMore is set to `true` * @propType {string} [defaultRefinement] - the value of the item selected by default * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @propType {boolean} [withSearchBox=false] - true if the component should display an input to search for facet values * @themeKey ais-Menu__root - the root of the component * @themeKey ais-Menu__items - the container of all items in the menu * @themeKey ais-Menu__item - a single item * @themeKey ais-Menu__itemLinkSelected - the selected menu item * @themeKey ais-Menu__itemLink - the item link * @themeKey ais-Menu__itemLabelSelected - the selected item label * @themeKey ais-Menu__itemLabel - the item label * @themeKey ais-Menu__itemCount - the item count * @themeKey ais-Menu__itemCountSelected - the selected item count * @themeKey ais-Menu__noRefinement - present when there is no refinement * @themeKey ais-Menu__showMore - the button that let the user toggle more results * @themeKey ais-Menu__SearchBox - the container of the search for facet values searchbox. See [the SearchBox documentation](widgets/SearchBox.html#classnames) for the classnames and translation keys of the SearchBox. * @translationkey showMore - The label of the show more button. Accepts one parameters, a boolean that is true if the values are expanded * @translationkey noResults - The label of the no results text when no search for facet values results are found. * @example * import React from 'react'; * * import {Menu, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <Menu * attributeName="category" * /> * </InstantSearch> * ); * } */ exports.default = (0, _connectMenu2.default)(_Menu2.default); /***/ }), /* 357 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectMultiRange = __webpack_require__(222); var _connectMultiRange2 = _interopRequireDefault(_connectMultiRange); var _MultiRange = __webpack_require__(382); var _MultiRange2 = _interopRequireDefault(_MultiRange); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * MultiRange is a widget used for selecting the range value of a numeric attribute. * @name MultiRange * @kind widget * @requirements The attribute passed to the `attributeName` prop must be holding numerical values. * @propType {string} attributeName - the name of the attribute in the records * @propType {{label: string, start: number, end: number}[]} items - List of options. With a text label, and upper and lower bounds. * @propType {string} [defaultRefinement] - the value of the item selected by default, follow the format "min:max". * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @themeKey ais-MultiRange__root - The root component of the widget * @themeKey ais-MultiRange__items - The container of the items * @themeKey ais-MultiRange__item - A single item * @themeKey ais-MultiRange__itemSelected - The selected item * @themeKey ais-MultiRange__itemLabel - The label of an item * @themeKey ais-MultiRange__itemLabelSelected - The selected label item * @themeKey ais-MultiRange__itemRadio - The radio of an item * @themeKey ais-MultiRange__itemRadioSelected - The selected radio item * @themeKey ais-MultiRange__noRefinement - present when there is no refinement for all ranges * @themeKey ais-MultiRange__itemNoRefinement - present when there is no refinement for one range * @themeKey ais-MultiRange__itemAll - indicate the range that will contain all the results * @translationkey all - The label of the largest range added automatically by react instantsearch * @example * import React from 'react'; * * import {InstantSearch, MultiRange} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <MultiRange attributeName="price" * items={[ * {end: 10, label: '<$10'}, * {start: 10, end: 100, label: '$10-$100'}, * {start: 100, end: 500, label: '$100-$500'}, * {start: 500, label: '>$500'}, * ]} * /> * </InstantSearch> * ); * } */ exports.default = (0, _connectMultiRange2.default)(_MultiRange2.default); /***/ }), /* 358 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectPagination = __webpack_require__(223); var _connectPagination2 = _interopRequireDefault(_connectPagination); var _Pagination = __webpack_require__(383); var _Pagination2 = _interopRequireDefault(_Pagination); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The Pagination widget displays a simple pagination system allowing the user to * change the current page. * @name Pagination * @kind widget * @propType {boolean} [showFirst=true] - Display the first page link. * @propType {boolean} [showLast=false] - Display the last page link. * @propType {boolean} [showPrevious=true] - Display the previous page link. * @propType {boolean} [showNext=true] - Display the next page link. * @propType {number} [pagesPadding=3] - How many page links to display around the current page. * @propType {number} [maxPages=Infinity] - Maximum number of pages to display. * @themeKey ais-Pagination__root - The root component of the widget * @themeKey ais-Pagination__itemFirst - The first page link item * @themeKey ais-Pagination__itemPrevious - The previous page link item * @themeKey ais-Pagination__itemPage - The page link item * @themeKey ais-Pagination__itemNext - The next page link item * @themeKey ais-Pagination__itemLast - The last page link item * @themeKey ais-Pagination__itemDisabled - a disabled item * @themeKey ais-Pagination__itemSelected - a selected item * @themeKey ais-Pagination__itemLink - The link of an item * @themeKey ais-Pagination__noRefinement - present when there is no refinement * @translationKey previous - Label value for the previous page link * @translationKey next - Label value for the next page link * @translationKey first - Label value for the first page link * @translationKey last - Label value for the last page link * @translationkey page - Label value for a page item. You get function(currentRefinement) and you need to return a string * @translationKey ariaPrevious - Accessibility label value for the previous page link * @translationKey ariaNext - Accessibility label value for the next page link * @translationKey ariaFirst - Accessibility label value for the first page link * @translationKey ariaLast - Accessibility label value for the last page link * @translationkey ariaPage - Accessibility label value for a page item. You get function(currentRefinement) and you need to return a string * @example * import React from 'react'; * * import {Pagination, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <Pagination/> * </InstantSearch> * ); * } */ exports.default = (0, _connectPagination2.default)(_Pagination2.default); /***/ }), /* 359 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _Panel = __webpack_require__(384); var _Panel2 = _interopRequireDefault(_Panel); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The Panel widget wraps other widgets in a consistent panel design. * * It also reacts, indicates and set CSS classes when widgets are no more * relevant for refining. E.g. when a RefinementList becomes empty because of * the current search results. * @name Panel * @kind widget * @propType {string} title - The panel title * @themeKey ais-Panel__root - Container of the widget * @themeKey ais-Panel__title - The panel title * @themeKey ais-Panel__noRefinement - Present if the panel content is empty * @example * import React from 'react'; * * import {Panel, RefinementList, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <Panel title="category"> * <RefinementList attributeName="category" /> * </Panel> * </InstantSearch> * ); * } */ exports.default = _Panel2.default; /***/ }), /* 360 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectPoweredBy = __webpack_require__(224); var _connectPoweredBy2 = _interopRequireDefault(_connectPoweredBy); var _PoweredBy = __webpack_require__(385); var _PoweredBy2 = _interopRequireDefault(_PoweredBy); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * PoweredBy displays an Algolia logo. * * Algolia requires that you use this widget if you are on a [community or free plan](https://www.algolia.com/pricing). * @name PoweredBy * @kind widget * @themeKey ais-PoweredBy__root - The root component of the widget * @themeKey ais-PoweredBy__searchBy - The powered by label * @themeKey ais-PoweredBy__algoliaLink - The algolia logo link * @translationKey searchBy - Label value for the powered by * @example * import React from 'react'; * * import {PoweredBy, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <PoweredBy /> * </InstantSearch> * ); * } */ exports.default = (0, _connectPoweredBy2.default)(_PoweredBy2.default); /***/ }), /* 361 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectRange = __webpack_require__(111); var _connectRange2 = _interopRequireDefault(_connectRange); var _RangeInput = __webpack_require__(386); var _RangeInput2 = _interopRequireDefault(_RangeInput); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * RangeInput allows a user to select a numeric range using a minimum and maximum input. * @name RangeInput * @kind widget * @requirements The attribute passed to the `attributeName` prop must be holding numerical values. * @propType {string} attributeName - the name of the attribute in the record * @propType {{min: number, max: number}} [defaultRefinement] - Default state of the widget containing the start and the end of the range. * @propType {number} [min] - Minimum value. When this isn't set, the minimum value will be automatically computed by Algolia using the data in the index. * @propType {number} [max] - Maximum value. When this isn't set, the maximum value will be automatically computed by Algolia using the data in the index. * @themeKey ais-RangeInput__root - The root component of the widget * @themeKey ais-RangeInput__labelMin - The label for the min input * @themeKey ais-RangeInput__inputMin - The min input * @themeKey ais-RangeInput__separator - The separator between input * @themeKey ais-RangeInput__labelMax - The label for the max input * @themeKey ais-RangeInput__inputMax - The max input * @themeKey ais-RangeInput__submit - The submit button * @themeKey ais-RangeInput__noRefinement - present when there is no refinement * @translationKey submit - Label value for the submit button * @translationKey separator - Label value for the input separator * @example * import React from 'react'; * * import {RangeInput, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <RangeInput attributeName="price"/> * </InstantSearch> * ); * } */ exports.default = (0, _connectRange2.default)(_RangeInput2.default); /***/ }), /* 362 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectRange = __webpack_require__(111); var _connectRange2 = _interopRequireDefault(_connectRange); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Since a lot of sliders already exist, we did not include one by default. * However you can easily connect React InstantSearch to an existing one * using the [connectRange connector](connectors/connectRange.html). * * @name RangeSlider * @requirements To connect any slider to Algolia, the underlying attribute used must be holding numerical values. * @kind widget * @example * * // Here's an example showing how to connect the airbnb rheostat slider to React InstantSearch using the * // range connector * * import React, {PropTypes} from 'react'; * import {connectRange} from 'react-instantsearch/connectors'; * import Rheostat from 'rheostat'; * * const Range = React.createClass({ propTypes: { min: React.PropTypes.number, max: React.PropTypes.number, currentRefinement: React.PropTypes.object, refine: React.PropTypes.func.isRequired, canRefine: React.PropTypes.bool.isRequired, }, getInitialState() { return {currentValues: {min: this.props.min, max: this.props.max}}; }, componentWillReceiveProps(sliderState) { if (sliderState.canRefine) { this.setState({currentValues: {min: sliderState.currentRefinement.min, max: sliderState.currentRefinement.max}}); } }, onValuesUpdated(sliderState) { this.setState({currentValues: {min: sliderState.values[0], max: sliderState.values[1]}}); }, onChange(sliderState) { if (this.props.currentRefinement.min !== sliderState.values[0] || this.props.currentRefinement.max !== sliderState.values[1]) { this.props.refine({min: sliderState.values[0], max: sliderState.values[1]}); } }, render() { const {min, max, currentRefinement} = this.props; const {currentValues} = this.state; return min !== max ? <div> <Rheostat min={min} max={max} values={[currentRefinement.min, currentRefinement.max]} onChange={this.onChange} onValuesUpdated={this.onValuesUpdated} /> <div style={{display: 'flex', justifyContent: 'space-between'}}> <div>{currentValues.min}</div> <div>{currentValues.max}</div> </div> </div> : null; }, }); const ConnectedRange = connectRange(Range); */ exports.default = (0, _connectRange2.default)(function () { return _react2.default.createElement( 'div', null, 'We do not provide any Slider, see the documentation to learn how to connect one easily:', _react2.default.createElement( 'a', { target: '_blank', href: 'https://community.algolia.com/react-instantsearch/widgets/RangeSlider.html' }, 'https://community.algolia.com/react-instantsearch/widgets/RangeSlider.html' ) ); }); /***/ }), /* 363 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectRefinementList = __webpack_require__(225); var _connectRefinementList2 = _interopRequireDefault(_connectRefinementList); var _RefinementList = __webpack_require__(387); var _RefinementList2 = _interopRequireDefault(_RefinementList); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The RefinementList component displays a list that let the end user choose multiple values for a specific facet. * @name RefinementList * @kind widget * @propType {string} attributeName - the name of the attribute in the record * @propType {boolean} [withSearchBox=false] - true if the component should display an input to search for facet values * @propType {string} [operator=or] - How to apply the refinements. Possible values: 'or' or 'and'. * @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items * @propType {number} [limitMin=10] - the minimum number of displayed items * @propType {number} [limitMax=20] - the maximum number of displayed items. Only used when showMore is set to `true` * @propType {string[]} [defaultRefinement] - the values of the items selected by default * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @themeKey ais-RefinementList__root - the root of the component * @themeKey ais-RefinementList__items - the container of all items in the list * @themeKey ais-RefinementList__itemSelected - the selected list item * @themeKey ais-RefinementList__itemCheckbox - the item checkbox * @themeKey ais-RefinementList__itemCheckboxSelected - the selected item checkbox * @themeKey ais-RefinementList__itemLabel - the item label * @themeKey ais-RefinementList__itemLabelSelected - the selected item label * @themeKey RefinementList__itemCount - the item count * @themeKey RefinementList__itemCountSelected - the selected item count * @themeKey ais-RefinementList__showMore - the button that let the user toggle more results * @themeKey ais-RefinementList__noRefinement - present when there is no refinement * @themeKey ais-RefinementList__SearchBox - the container of the search for facet values searchbox. See [the SearchBox documentation](widgets/SearchBox.html#classnames) for the classnames and translation keys of the SearchBox. * @translationkey showMore - The label of the show more button. Accepts one parameters, a boolean that is true if the values are expanded * @translationkey noResults - The label of the no results text when no search for facet values results are found. * @requirements The attribute passed to the `attributeName` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * @example * import React from 'react'; * * import {RefinementList, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <RefinementList attributeName="colors" /> * </InstantSearch> * ); * } */ exports.default = (0, _connectRefinementList2.default)(_RefinementList2.default); /***/ }), /* 364 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectScrollTo = __webpack_require__(226); var _connectScrollTo2 = _interopRequireDefault(_connectScrollTo); var _ScrollTo = __webpack_require__(388); var _ScrollTo2 = _interopRequireDefault(_ScrollTo); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The ScrollTo component will made the page scroll to the component wrapped by it when one of the * [search state](guide/Search_state.html) prop is updated. By default when the page number changes, * the scroll goes to the wrapped component. * * @name ScrollTo * @kind widget * @propType {string} [scrollOn="page"] - Widget state key on which to listen for changes. * @example * import React from 'react'; * * import {ScrollTo, Hits, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <ScrollTo> * <Hits /> * </ScrollTo> * </InstantSearch> * ); * } */ exports.default = (0, _connectScrollTo2.default)(_ScrollTo2.default); /***/ }), /* 365 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectSearchBox = __webpack_require__(227); var _connectSearchBox2 = _interopRequireDefault(_connectSearchBox); var _SearchBox = __webpack_require__(342); var _SearchBox2 = _interopRequireDefault(_SearchBox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The SearchBox component displays a search box that lets the user search for a specific query. * @name SearchBox * @kind widget * @propType {string[]} [focusShortcuts=['s','/']] - List of keyboard shortcuts that focus the search box. Accepts key names and key codes. * @propType {boolean} [autoFocus=false] - Should the search box be focused on render? * @propType {boolean} [searchAsYouType=true] - Should we search on every change to the query? If you disable this option, new searches will only be triggered by clicking the search button or by pressing the enter key while the search box is focused. * @propType {function} [onSubmit] - Intercept submit event sent from the SearchBox form container. * @propType {function} [onReset] - Listen to `reset` event sent from the SearchBox form container. * @propType {function} [on*] - Listen to any events sent form the search input itself. * @propType {React.Element} [submitComponent] - Change the apparence of the default submit button (magnifying glass). * @propType {React.Element} [resetComponent] - Change the apparence of the default reset button (cross). * @propType {string} [defaultRefinement] - Provide default refinement value when component is mounted. * @themeKey ais-SearchBox__root - the root of the component * @themeKey ais-SearchBox__wrapper - the search box wrapper * @themeKey ais-SearchBox__input - the search box input * @themeKey ais-SearchBox__submit - the submit button * @themeKey ais-SearchBox__reset - the reset button * @translationkey submitTitle - The submit button title * @translationkey resetTitle - The reset button title * @translationkey placeholder - The label of the input placeholder * @example * import React from 'react'; * * import {SearchBox, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <SearchBox /> * </InstantSearch> * ); * } */ exports.default = (0, _connectSearchBox2.default)(_SearchBox2.default); /***/ }), /* 366 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectHighlight = __webpack_require__(207); var _connectHighlight2 = _interopRequireDefault(_connectHighlight); var _Snippet = __webpack_require__(389); var _Snippet2 = _interopRequireDefault(_Snippet); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Renders any attribute from an hit into its highlighted snippet form when relevant. * * Read more about it in the [Highlighting results](guide/Highlighting_results.html) guide. * @name Snippet * @kind widget * @propType {string} attributeName - the location of the highlighted snippet attribute in the hit * @propType {object} hit - the hit object containing the highlighted snippet attribute * @propType {string} [tagName='em'] - the tag to be used for highlighted parts of the attribute * @example * import React from 'react'; * * import {InstantSearch, connectHits, Snippet} from 'InstantSearch'; * * const CustomHits = connectHits(hits => { * return hits.map((hit) => <p><Snippet attributeName="description" hit={hit}/></p>); * }); * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <CustomHits /> * </InstantSearch> * ); * } */ exports.default = (0, _connectHighlight2.default)(_Snippet2.default); /***/ }), /* 367 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectSortBy = __webpack_require__(228); var _connectSortBy2 = _interopRequireDefault(_connectSortBy); var _SortBy = __webpack_require__(390); var _SortBy2 = _interopRequireDefault(_SortBy); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The SortBy component displays a list of indexes allowing a user to change the hits are sorting. * @name SortBy * @requirements Algolia handles sorting by creating replica indices. [Read more about sorting](https://www.algolia.com/doc/guides/relevance/sorting/) on * the Algolia website. * @kind widget * @propType {{value: string, label: string}[]} items - The list of indexes to search in. * @propType {string} defaultRefinement - The default selected index. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @themeKey ais-SortBy__root - the root of the component * @example * import React from 'react'; * * import {SortBy, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <SortBy * items={[ * {value: 'ikea', label: 'Featured'}, * {value: 'ikea_price_asc', label: 'Price asc.'}, * {value: 'ikea_price_desc', label: 'Price desc.'}, * ]} * defaultRefinement="ikea" * /> * </InstantSearch> * ); * } */ exports.default = (0, _connectSortBy2.default)(_SortBy2.default); /***/ }), /* 368 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectRange = __webpack_require__(111); var _connectRange2 = _interopRequireDefault(_connectRange); var _StarRating = __webpack_require__(391); var _StarRating2 = _interopRequireDefault(_StarRating); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * StarRating lets the user refine search results by clicking on stars. * * The stars are based on the selected `attributeName`. * @requirements The attribute passed to the `attributeName` prop must be holding numerical values. * @name StarRating * @kind widget * @propType {string} attributeName - the name of the attribute in the record * @propType {number} [min] - Minimum value for the rating. When this isn't set, the minimum value will be automatically computed by Algolia using the data in the index. * @propType {number} [max] - Maximum value for the rating. When this isn't set, the maximum value will be automatically computed by Algolia using the data in the index. * @propType {{min: number, max: number}} [defaultRefinement] - Default state of the widget containing the lower bound (end) and the max for the rating. * @themeKey ais-StarRating__root - The root component of the widget * @themeKey ais-StarRating__ratingLink - The item link * @themeKey ais-StarRating__ratingLinkSelected - The selected link item * @themeKey ais-StarRating__ratingLinkDisabled - The disabled link item * @themeKey ais-StarRating__ratingIcon - The rating icon * @themeKey ais-StarRating__ratingIconSelected - The selected rating icon * @themeKey ais-StarRating__ratingIconDisabled - The disabled rating icon * @themeKey ais-StarRating__ratingIconEmpty - The rating empty icon * @themeKey ais-StarRating__ratingIconEmptySelected - The selected rating empty icon * @themeKey ais-StarRating__ratingIconEmptyDisabled - The disabled rating empty icon * @themeKey ais-StarRating__ratingLabel - The link label * @themeKey ais-StarRating__ratingLabelSelected - The selected link label * @themeKey ais-StarRating__ratingLabelDisabled - The disabled link label * @themeKey ais-StarRating__ratingCount - The link count * @themeKey ais-StarRating__ratingCountSelected - The selected link count * @themeKey ais-StarRating__ratingCountDisabled - The disabled link count * @themeKey ais-StarRating__noRefinement - present when there is no refinement * @translationKey ratingLabel - Label value for the rating link * @example * import React from 'react'; * * import {StarRating, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <StarRating attributeName="rating" /> * </InstantSearch> * ); * } */ exports.default = (0, _connectRange2.default)(_StarRating2.default); /***/ }), /* 369 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectStats = __webpack_require__(229); var _connectStats2 = _interopRequireDefault(_connectStats); var _Stats = __webpack_require__(392); var _Stats2 = _interopRequireDefault(_Stats); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The Stats component displays the total number of matching hits and the time it took to get them (time spent in the Algolia server). * @name Stats * @kind widget * @themeKey ais-Stats__root - the root of the component * @translationkey stats - The string displayed by the stats widget. You get function(n, ms) and you need to return a string. n is a number of hits retrieved, ms is a processed time. * @example * import React from 'react'; * * import {Stats, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <Stats /> * </InstantSearch> * ); * } */ exports.default = (0, _connectStats2.default)(_Stats2.default); /***/ }), /* 370 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectToggle = __webpack_require__(230); var _connectToggle2 = _interopRequireDefault(_connectToggle); var _Toggle = __webpack_require__(393); var _Toggle2 = _interopRequireDefault(_Toggle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * The Toggle provides an on/off filtering feature based on an attribute value. Note that if you provide an “off” option, it will be refined at initialization. * @name Toggle * @kind widget * @propType {string} attributeName - Name of the attribute on which to apply the `value` refinement. Required when `value` is present. * @propType {string} label - Label for the toggle. * @propType {string} value - Value of the refinement to apply on `attributeName` when checked. * @propType {boolean} [defaultChecked=false] - Default state of the widget. Should the toggle be checked by default? * @themeKey ais-Toggle__root - the root of the component * @themeKey ais-Toggle__checkbox - the toggle checkbox * @themeKey ais-Toggle__label - the toggle label * @example * import React from 'react'; * * import {Toggle, InstantSearch} from '../packages/react-instantsearch/dom'; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea" * > * <Toggle attributeName="materials" * label="Made with solid pine" * value={'Solid pine'} * /> * </InstantSearch> * ); * } */ exports.default = (0, _connectToggle2.default)(_Toggle2.default); /***/ }), /* 371 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var AlgoliaSearchCore = __webpack_require__(402); var createAlgoliasearch = __webpack_require__(404); module.exports = createAlgoliasearch(AlgoliaSearchCore, '(lite) '); /***/ }), /* 372 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('ClearAll'); var ClearAll = function (_Component) { _inherits(ClearAll, _Component); function ClearAll() { _classCallCheck(this, ClearAll); return _possibleConstructorReturn(this, (ClearAll.__proto__ || Object.getPrototypeOf(ClearAll)).apply(this, arguments)); } _createClass(ClearAll, [{ key: 'render', value: function render() { var _props = this.props; var translate = _props.translate; var items = _props.items; var refine = _props.refine; var isDisabled = items.length === 0; if (isDisabled) { return _react2.default.createElement( 'button', _extends({}, cx('root'), { disabled: true }), translate('reset') ); } return _react2.default.createElement( 'button', _extends({}, cx('root'), { onClick: refine.bind(null, items) }), translate('reset') ); } }]); return ClearAll; }(_react.Component); ClearAll.propTypes = { translate: _react.PropTypes.func.isRequired, items: _react.PropTypes.arrayOf(_react.PropTypes.object).isRequired, refine: _react.PropTypes.func.isRequired }; exports.default = (0, _translatable2.default)({ reset: 'Clear all filters' })(ClearAll); /***/ }), /* 373 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function () { return null; }; /***/ }), /* 374 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('CurrentRefinements'); var CurrentRefinements = function (_Component) { _inherits(CurrentRefinements, _Component); function CurrentRefinements() { _classCallCheck(this, CurrentRefinements); return _possibleConstructorReturn(this, (CurrentRefinements.__proto__ || Object.getPrototypeOf(CurrentRefinements)).apply(this, arguments)); } _createClass(CurrentRefinements, [{ key: 'componentWillMount', value: function componentWillMount() { if (this.context.canRefine) this.context.canRefine(this.props.canRefine); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(props) { if (this.context.canRefine) this.context.canRefine(props.canRefine); } }, { key: 'render', value: function render() { var _props = this.props; var translate = _props.translate; var items = _props.items; var refine = _props.refine; var canRefine = _props.canRefine; return _react2.default.createElement( 'div', cx('root', !canRefine && 'noRefinement'), _react2.default.createElement( 'div', cx('items'), items.map(function (item) { return _react2.default.createElement( 'div', _extends({ key: item.label }, cx('item', item.items && 'itemParent')), _react2.default.createElement( 'span', cx('itemLabel'), item.label ), item.items ? item.items.map(function (nestedItem) { return _react2.default.createElement( 'div', _extends({ key: nestedItem.label }, cx('item')), _react2.default.createElement( 'span', cx('itemLabel'), nestedItem.label ), _react2.default.createElement( 'button', _extends({}, cx('itemClear'), { onClick: refine.bind(null, nestedItem.value) }), translate('clearFilter', nestedItem) ) ); }) : _react2.default.createElement( 'button', _extends({}, cx('itemClear'), { onClick: refine.bind(null, item.value) }), translate('clearFilter', item) ) ); }) ) ); } }]); return CurrentRefinements; }(_react.Component); CurrentRefinements.propTypes = { translate: _react.PropTypes.func.isRequired, items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ label: _react.PropTypes.string })).isRequired, refine: _react.PropTypes.func.isRequired, canRefine: _react.PropTypes.bool.isRequired, transformItems: _react.PropTypes.func }; CurrentRefinements.contextTypes = { canRefine: _react.PropTypes.func }; exports.default = (0, _translatable2.default)({ clearFilter: '✕' })(CurrentRefinements); /***/ }), /* 375 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _pick2 = __webpack_require__(110); var _pick3 = _interopRequireDefault(_pick2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _List = __webpack_require__(208); var _List2 = _interopRequireDefault(_List); var _Link = __webpack_require__(232); var _Link2 = _interopRequireDefault(_Link); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('HierarchicalMenu'); var itemsPropType = _react.PropTypes.arrayOf(_react.PropTypes.shape({ label: _react.PropTypes.string.isRequired, value: _react.PropTypes.string, count: _react.PropTypes.number.isRequired, items: function items() { return itemsPropType.apply(undefined, arguments); } })); var HierarchicalMenu = function (_Component) { _inherits(HierarchicalMenu, _Component); function HierarchicalMenu() { var _ref; var _temp, _this, _ret; _classCallCheck(this, HierarchicalMenu); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = HierarchicalMenu.__proto__ || Object.getPrototypeOf(HierarchicalMenu)).call.apply(_ref, [this].concat(args))), _this), _this.renderItem = function (item) { var _this$props = _this.props; var createURL = _this$props.createURL; var refine = _this$props.refine; return _react2.default.createElement( _Link2.default, _extends({}, cx('itemLink'), { onClick: function onClick() { return refine(item.value); }, href: createURL(item.value) }), _react2.default.createElement( 'span', cx('itemLabel'), item.label ), ' ', _react2.default.createElement( 'span', cx('itemCount'), item.count ) ); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(HierarchicalMenu, [{ key: 'componentWillMount', value: function componentWillMount() { if (this.context.canRefine) this.context.canRefine(this.props.canRefine); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(props) { if (this.context.canRefine) this.context.canRefine(props.canRefine); } }, { key: 'render', value: function render() { return _react2.default.createElement(_List2.default, _extends({ renderItem: this.renderItem, cx: cx }, (0, _pick3.default)(this.props, ['translate', 'items', 'showMore', 'limitMin', 'limitMax', 'isEmpty', 'canRefine']))); } }]); return HierarchicalMenu; }(_react.Component); HierarchicalMenu.propTypes = { translate: _react.PropTypes.func.isRequired, refine: _react.PropTypes.func.isRequired, createURL: _react.PropTypes.func.isRequired, canRefine: _react.PropTypes.bool.isRequired, items: itemsPropType, showMore: _react.PropTypes.bool, limitMin: _react.PropTypes.number, limitMax: _react.PropTypes.number, transformItems: _react.PropTypes.func }; HierarchicalMenu.contextTypes = { canRefine: _react.PropTypes.func }; exports.default = (0, _translatable2.default)({ showMore: function showMore(extended) { return extended ? 'Show less' : 'Show more'; } })(HierarchicalMenu); /***/ }), /* 376 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.default = Highlight; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _Highlighter = __webpack_require__(341); var _Highlighter2 = _interopRequireDefault(_Highlighter); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function Highlight(props) { return _react2.default.createElement(_Highlighter2.default, _extends({ highlightProperty: '_highlightResult' }, props)); } Highlight.propTypes = { hit: _react2.default.PropTypes.object.isRequired, attributeName: _react2.default.PropTypes.string.isRequired, highlight: _react2.default.PropTypes.func.isRequired, tagName: _react2.default.PropTypes.string }; /***/ }), /* 377 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('Hits'); var Hits = function (_Component) { _inherits(Hits, _Component); function Hits() { _classCallCheck(this, Hits); return _possibleConstructorReturn(this, (Hits.__proto__ || Object.getPrototypeOf(Hits)).apply(this, arguments)); } _createClass(Hits, [{ key: 'render', value: function render() { var _props = this.props; var ItemComponent = _props.hitComponent; var hits = _props.hits; return _react2.default.createElement( 'div', cx('root'), hits.map(function (hit) { return _react2.default.createElement(ItemComponent, { key: hit.objectID, hit: hit }); }) ); } }]); return Hits; }(_react.Component); Hits.propTypes = { hits: _react.PropTypes.array, hitComponent: _react.PropTypes.func.isRequired }; Hits.defaultProps = { hitComponent: function hitComponent(hit) { return (// eslint-disable-line react/display-name _react2.default.createElement( 'div', { style: { borderBottom: '1px solid #bbb', paddingBottom: '5px', marginBottom: '5px' } }, JSON.stringify(hit).slice(0, 100), '...' ) ); } }; exports.default = Hits; /***/ }), /* 378 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _Select = __webpack_require__(343); var _Select2 = _interopRequireDefault(_Select); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('HitsPerPage'); var HitsPerPage = function (_Component) { _inherits(HitsPerPage, _Component); function HitsPerPage() { _classCallCheck(this, HitsPerPage); return _possibleConstructorReturn(this, (HitsPerPage.__proto__ || Object.getPrototypeOf(HitsPerPage)).apply(this, arguments)); } _createClass(HitsPerPage, [{ key: 'render', value: function render() { var _props = this.props; var currentRefinement = _props.currentRefinement; var refine = _props.refine; var items = _props.items; return _react2.default.createElement(_Select2.default, { onSelect: refine, selectedItem: currentRefinement, items: items, cx: cx }); } }]); return HitsPerPage; }(_react.Component); HitsPerPage.propTypes = { refine: _react.PropTypes.func.isRequired, currentRefinement: _react.PropTypes.number.isRequired, transformItems: _react.PropTypes.func, items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ /** * Number of hits to display. */ value: _react.PropTypes.number.isRequired, /** * Label to display on the option. */ label: _react.PropTypes.string })) }; exports.default = HitsPerPage; /***/ }), /* 379 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('InfiniteHits'); var InfiniteHits = function (_Component) { _inherits(InfiniteHits, _Component); function InfiniteHits() { _classCallCheck(this, InfiniteHits); return _possibleConstructorReturn(this, (InfiniteHits.__proto__ || Object.getPrototypeOf(InfiniteHits)).apply(this, arguments)); } _createClass(InfiniteHits, [{ key: 'render', value: function render() { var _props = this.props; var ItemComponent = _props.hitComponent; var hits = _props.hits; var hasMore = _props.hasMore; var refine = _props.refine; var translate = _props.translate; var renderedHits = hits.map(function (hit) { return _react2.default.createElement(ItemComponent, { key: hit.objectID, hit: hit }); }); var loadMoreButton = hasMore ? _react2.default.createElement( 'button', _extends({}, cx('loadMore'), { onClick: function onClick() { return refine(); } }), translate('loadMore') ) : _react2.default.createElement( 'button', _extends({}, cx('loadMore'), { disabled: true }), translate('loadMore') ); return _react2.default.createElement( 'div', cx('root'), renderedHits, loadMoreButton ); } }]); return InfiniteHits; }(_react.Component); InfiniteHits.propTypes = { hits: _react.PropTypes.array, hitComponent: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.func]).isRequired, hasMore: _react.PropTypes.bool.isRequired, refine: _react.PropTypes.func.isRequired, translate: _react.PropTypes.func.isRequired }; InfiniteHits.defaultProps = { hitComponent: function hitComponent(hit) { return (// eslint-disable-line react/display-name _react2.default.createElement( 'div', { style: { borderBottom: '1px solid #bbb', paddingBottom: '5px', marginBottom: '5px' } }, JSON.stringify(hit).slice(0, 100), '...' ) ); } }; exports.default = (0, _translatable2.default)({ loadMore: 'Load more' })(InfiniteHits); /***/ }), /* 380 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _has2 = __webpack_require__(56); var _has3 = _interopRequireDefault(_has2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _Link = __webpack_require__(232); var _Link2 = _interopRequireDefault(_Link); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var LinkList = function (_Component) { _inherits(LinkList, _Component); function LinkList() { _classCallCheck(this, LinkList); return _possibleConstructorReturn(this, (LinkList.__proto__ || Object.getPrototypeOf(LinkList)).apply(this, arguments)); } _createClass(LinkList, [{ key: 'render', value: function render() { var _props = this.props; var cx = _props.cx; var createURL = _props.createURL; var items = _props.items; var onSelect = _props.onSelect; var canRefine = _props.canRefine; return _react2.default.createElement( 'ul', cx('root', !canRefine && 'noRefinement'), items.map(function (item) { return _react2.default.createElement( 'li', _extends({ key: (0, _has3.default)(item, 'key') ? item.key : item.value }, cx('item', item.selected && !item.disabled && 'itemSelected', item.disabled && 'itemDisabled', item.modifier), { disabled: item.disabled }), item.disabled ? _react2.default.createElement( 'span', cx('itemLink', 'itemLinkDisabled'), (0, _has3.default)(item, 'label') ? item.label : item.value ) : _react2.default.createElement( _Link2.default, _extends({}, cx('itemLink', item.selected && 'itemLinkSelected'), { 'aria-label': item.ariaLabel, href: createURL(item.value), onClick: onSelect.bind(null, item.value) }), (0, _has3.default)(item, 'label') ? item.label : item.value ) ); }) ); } }]); return LinkList; }(_react.Component); LinkList.propTypes = { cx: _react.PropTypes.func.isRequired, createURL: _react.PropTypes.func.isRequired, items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ value: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number, _react.PropTypes.object]).isRequired, key: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]), label: _react.PropTypes.node, modifier: _react.PropTypes.string, ariaLabel: _react.PropTypes.string, disabled: _react.PropTypes.bool })), onSelect: _react.PropTypes.func.isRequired, canRefine: _react.PropTypes.bool.isRequired }; exports.default = LinkList; /***/ }), /* 381 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _pick2 = __webpack_require__(110); var _pick3 = _interopRequireDefault(_pick2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _List = __webpack_require__(208); var _List2 = _interopRequireDefault(_List); var _Link = __webpack_require__(232); var _Link2 = _interopRequireDefault(_Link); var _Highlight = __webpack_require__(231); var _Highlight2 = _interopRequireDefault(_Highlight); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('Menu'); var Menu = function (_Component) { _inherits(Menu, _Component); function Menu() { var _ref; var _temp, _this, _ret; _classCallCheck(this, Menu); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Menu.__proto__ || Object.getPrototypeOf(Menu)).call.apply(_ref, [this].concat(args))), _this), _this.renderItem = function (item, resetQuery) { var createURL = _this.props.createURL; var label = _this.props.isFromSearch ? _react2.default.createElement(_Highlight2.default, { attributeName: 'label', hit: item }) : item.label; return _react2.default.createElement( _Link2.default, _extends({}, cx('itemLink', item.isRefined && 'itemLinkSelected'), { onClick: function onClick() { return _this.selectItem(item, resetQuery); }, href: createURL(item.value) }), _react2.default.createElement( 'span', cx('itemLabel', item.isRefined && 'itemLabelSelected'), label ), ' ', _react2.default.createElement( 'span', cx('itemCount', item.isRefined && 'itemCountSelected'), item.count ) ); }, _this.selectItem = function (item, resetQuery) { resetQuery(); _this.props.refine(item.value); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(Menu, [{ key: 'componentWillMount', value: function componentWillMount() { if (this.context.canRefine) this.context.canRefine(this.props.canRefine); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(props) { if (this.context.canRefine) this.context.canRefine(props.canRefine); } }, { key: 'render', value: function render() { return _react2.default.createElement(_List2.default, _extends({ renderItem: this.renderItem, selectItem: this.selectItem, cx: cx }, (0, _pick3.default)(this.props, ['translate', 'items', 'showMore', 'limitMin', 'limitMax', 'isFromSearch', 'searchForItems', 'withSearchBox', 'canRefine']))); } }]); return Menu; }(_react.Component); Menu.propTypes = { translate: _react.PropTypes.func.isRequired, refine: _react.PropTypes.func.isRequired, searchForItems: _react.PropTypes.func.isRequired, withSearchBox: _react.PropTypes.bool, createURL: _react.PropTypes.func.isRequired, items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ label: _react.PropTypes.string.isRequired, value: _react.PropTypes.string.isRequired, count: _react.PropTypes.number.isRequired, isRefined: _react.PropTypes.bool.isRequired })), isFromSearch: _react.PropTypes.bool.isRequired, canRefine: _react.PropTypes.bool.isRequired, showMore: _react.PropTypes.bool, limitMin: _react.PropTypes.number, limitMax: _react.PropTypes.number, transformItems: _react.PropTypes.func }; Menu.contextTypes = { canRefine: _react.PropTypes.func }; exports.default = (0, _translatable2.default)({ showMore: function showMore(extended) { return extended ? 'Show less' : 'Show more'; }, noResults: 'No results', submit: null, reset: null, resetTitle: 'Clear the search query.', submitTitle: 'Submit your search query.', placeholder: 'Search here…' })(Menu); /***/ }), /* 382 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _List = __webpack_require__(208); var _List2 = _interopRequireDefault(_List); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('MultiRange'); var MultiRange = function (_Component) { _inherits(MultiRange, _Component); function MultiRange() { var _ref; var _temp, _this, _ret; _classCallCheck(this, MultiRange); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = MultiRange.__proto__ || Object.getPrototypeOf(MultiRange)).call.apply(_ref, [this].concat(args))), _this), _this.renderItem = function (item) { var _this$props = _this.props; var refine = _this$props.refine; var translate = _this$props.translate; var label = item.value === '' ? translate('all') : item.label; return _react2.default.createElement( 'label', cx(item.value === '' && 'itemAll'), _react2.default.createElement('input', _extends({}, cx('itemRadio', item.isRefined && 'itemRadioSelected'), { type: 'radio', checked: item.isRefined, disabled: item.noRefinement, onChange: refine.bind(null, item.value) })), _react2.default.createElement('span', cx('itemBox', 'itemBox', item.isRefined && 'itemBoxSelected')), _react2.default.createElement( 'span', cx('itemLabel', 'itemLabel', item.isRefined && 'itemLabelSelected'), label ) ); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(MultiRange, [{ key: 'componentWillMount', value: function componentWillMount() { if (this.context.canRefine) this.context.canRefine(this.props.canRefine); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(props) { if (this.context.canRefine) this.context.canRefine(props.canRefine); } }, { key: 'render', value: function render() { var _props = this.props; var items = _props.items; var canRefine = _props.canRefine; return _react2.default.createElement(_List2.default, { renderItem: this.renderItem, showMore: false, canRefine: canRefine, cx: cx, items: items.map(function (item) { return _extends({}, item, { key: item.value }); }) }); } }]); return MultiRange; }(_react.Component); MultiRange.propTypes = { items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ label: _react.PropTypes.node.isRequired, value: _react.PropTypes.string.isRequired, isRefined: _react.PropTypes.bool.isRequired, noRefinement: _react.PropTypes.bool.isRequired })).isRequired, refine: _react.PropTypes.func.isRequired, transformItems: _react.PropTypes.func, canRefine: _react.PropTypes.bool.isRequired, translate: _react.PropTypes.func.isRequired }; MultiRange.contextTypes = { canRefine: _react.PropTypes.func }; exports.default = (0, _translatable2.default)({ all: 'All' })(MultiRange); /***/ }), /* 383 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _range2 = __webpack_require__(421); var _range3 = _interopRequireDefault(_range2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(57); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _LinkList = __webpack_require__(380); var _LinkList2 = _interopRequireDefault(_LinkList); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('Pagination'); function getPagesDisplayedCount(padding, total) { return Math.min(2 * padding + 1, total); } function calculatePaddingLeft(current, padding, total, totalDisplayedPages) { if (current <= padding) { return current; } if (current >= total - padding) { return totalDisplayedPages - (total - current); } return padding; } function getPages(page, total, padding) { var totalDisplayedPages = getPagesDisplayedCount(padding, total); if (totalDisplayedPages === total) return (0, _range3.default)(1, total + 1); var paddingLeft = calculatePaddingLeft(page, padding, total, totalDisplayedPages); var paddingRight = totalDisplayedPages - paddingLeft; var first = page - paddingLeft; var last = page + paddingRight; return (0, _range3.default)(first + 1, last + 1); } var Pagination = function (_Component) { _inherits(Pagination, _Component); function Pagination() { _classCallCheck(this, Pagination); return _possibleConstructorReturn(this, (Pagination.__proto__ || Object.getPrototypeOf(Pagination)).apply(this, arguments)); } _createClass(Pagination, [{ key: 'componentWillMount', value: function componentWillMount() { if (this.context.canRefine) this.context.canRefine(this.props.canRefine); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(props) { if (this.context.canRefine) this.context.canRefine(props.canRefine); } }, { key: 'getItem', value: function getItem(modifier, translationKey, value) { var _props = this.props; var nbPages = _props.nbPages; var maxPages = _props.maxPages; var translate = _props.translate; return { key: modifier + '.' + value, modifier: modifier, disabled: value < 1 || value >= Math.min(maxPages, nbPages), label: translate(translationKey, value), value: value, ariaLabel: translate('aria' + (0, _utils.capitalize)(translationKey), value) }; } }, { key: 'render', value: function render() { var _props2 = this.props; var nbPages = _props2.nbPages; var maxPages = _props2.maxPages; var currentRefinement = _props2.currentRefinement; var pagesPadding = _props2.pagesPadding; var showFirst = _props2.showFirst; var showPrevious = _props2.showPrevious; var showNext = _props2.showNext; var showLast = _props2.showLast; var refine = _props2.refine; var createURL = _props2.createURL; var translate = _props2.translate; var ListComponent = _props2.listComponent; var otherProps = _objectWithoutProperties(_props2, ['nbPages', 'maxPages', 'currentRefinement', 'pagesPadding', 'showFirst', 'showPrevious', 'showNext', 'showLast', 'refine', 'createURL', 'translate', 'listComponent']); var totalPages = Math.min(nbPages, maxPages); var lastPage = totalPages; var items = []; if (showFirst) { items.push({ key: 'first', modifier: 'itemFirst', disabled: currentRefinement === 1, label: translate('first'), value: 1, ariaLabel: translate('ariaFirst') }); } if (showPrevious) { items.push({ key: 'previous', modifier: 'itemPrevious', disabled: currentRefinement === 1, label: translate('previous'), value: currentRefinement - 1, ariaLabel: translate('ariaPrevious') }); } items = items.concat(getPages(currentRefinement, totalPages, pagesPadding).map(function (value) { return { key: value, modifier: 'itemPage', label: translate('page', value), value: value, selected: value === currentRefinement, ariaLabel: translate('ariaPage', value) }; })); if (showNext) { items.push({ key: 'next', modifier: 'itemNext', disabled: currentRefinement === lastPage || lastPage <= 1, label: translate('next'), value: currentRefinement + 1, ariaLabel: translate('ariaNext') }); } if (showLast) { items.push({ key: 'last', modifier: 'itemLast', disabled: currentRefinement === lastPage || lastPage <= 1, label: translate('last'), value: lastPage, ariaLabel: translate('ariaLast') }); } return _react2.default.createElement(ListComponent, _extends({}, otherProps, { cx: cx, items: items, onSelect: refine, createURL: createURL })); } }]); return Pagination; }(_react.Component); Pagination.propTypes = { nbPages: _react.PropTypes.number.isRequired, currentRefinement: _react.PropTypes.number.isRequired, refine: _react.PropTypes.func.isRequired, createURL: _react.PropTypes.func.isRequired, canRefine: _react.PropTypes.bool.isRequired, translate: _react.PropTypes.func.isRequired, listComponent: _react.PropTypes.func, showFirst: _react.PropTypes.bool, showPrevious: _react.PropTypes.bool, showNext: _react.PropTypes.bool, showLast: _react.PropTypes.bool, pagesPadding: _react.PropTypes.number, maxPages: _react.PropTypes.number }; Pagination.defaultProps = { listComponent: _LinkList2.default, showFirst: true, showPrevious: true, showNext: true, showLast: false, pagesPadding: 3, maxPages: Infinity }; Pagination.contextTypes = { canRefine: _react.PropTypes.func }; exports.default = (0, _translatable2.default)({ previous: '‹', next: '›', first: '«', last: '»', page: function page(currentRefinement) { return currentRefinement.toString(); }, ariaPrevious: 'Previous page', ariaNext: 'Next page', ariaFirst: 'First page', ariaLast: 'Last page', ariaPage: function ariaPage(currentRefinement) { return 'Page ' + currentRefinement.toString(); } })(Pagination); /***/ }), /* 384 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('Panel'); var Panel = function (_Component) { _inherits(Panel, _Component); _createClass(Panel, [{ key: 'getChildContext', value: function getChildContext() { return { canRefine: this.canRefine }; } }]); function Panel(props) { _classCallCheck(this, Panel); var _this = _possibleConstructorReturn(this, (Panel.__proto__ || Object.getPrototypeOf(Panel)).call(this, props)); _this.state = { canRefine: true }; _this.canRefine = function (canRefine) { _this.setState({ canRefine: canRefine }); }; return _this; } _createClass(Panel, [{ key: 'render', value: function render() { return _react2.default.createElement( 'div', cx('root', !this.state.canRefine && 'noRefinement'), _react2.default.createElement( 'h5', cx('title'), this.props.title ), this.props.children ); } }]); return Panel; }(_react.Component); Panel.propTypes = { title: _react.PropTypes.string.isRequired, children: _react.PropTypes.node }; Panel.childContextTypes = { canRefine: _react.PropTypes.func }; exports.default = Panel; /***/ }), /* 385 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('PoweredBy'); /* eslint-disable max-len */ var AlgoliaLogo = function AlgoliaLogo() { return _react2.default.createElement( 'svg', { xmlns: 'http://www.w3.org/2000/svg', baseProfile: 'basic', viewBox: '0 0 1366 362' }, _react2.default.createElement( 'linearGradient', { id: 'g', x1: '428.258', x2: '434.145', y1: '404.15', y2: '409.85', gradientUnits: 'userSpaceOnUse', gradientTransform: 'matrix(94.045 0 0 -94.072 -40381.527 38479.52)' }, _react2.default.createElement('stop', { offset: '0', stopColor: '#00AEFF' }), _react2.default.createElement('stop', { offset: '1', stopColor: '#3369E7' }) ), _react2.default.createElement('path', { d: 'M61.8 15.4h242.8c23.9 0 43.4 19.4 43.4 43.4v242.9c0 23.9-19.4 43.4-43.4 43.4H61.8c-23.9 0-43.4-19.4-43.4-43.4v-243c0-23.9 19.4-43.3 43.4-43.3z', fill: 'url(#g)' }), _react2.default.createElement('path', { d: 'M187 98.7c-51.4 0-93.1 41.7-93.1 93.2S135.6 285 187 285s93.1-41.7 93.1-93.2-41.6-93.1-93.1-93.1zm0 158.8c-36.2 0-65.6-29.4-65.6-65.6s29.4-65.6 65.6-65.6 65.6 29.4 65.6 65.6-29.3 65.6-65.6 65.6zm0-117.8v48.9c0 1.4 1.5 2.4 2.8 1.7l43.4-22.5c1-.5 1.3-1.7.8-2.7-9-15.8-25.7-26.6-45-27.3-1 0-2 .8-2 1.9zm-60.8-35.9l-5.7-5.7c-5.6-5.6-14.6-5.6-20.2 0l-6.8 6.8c-5.6 5.6-5.6 14.6 0 20.2l5.6 5.6c.9.9 2.2.7 3-.2 3.3-4.5 6.9-8.8 10.9-12.8 4.1-4.1 8.3-7.7 12.9-11 1-.6 1.1-2 .3-2.9zM217.5 89V77.7c0-7.9-6.4-14.3-14.3-14.3h-33.3c-7.9 0-14.3 6.4-14.3 14.3v11.6c0 1.3 1.2 2.2 2.5 1.9 9.3-2.7 19.1-4.1 29-4.1 9.5 0 18.9 1.3 28 3.8 1.2.3 2.4-.6 2.4-1.9z', fill: '#FFFFFF' }), _react2.default.createElement('path', { d: 'M842.5 267.6c0 26.7-6.8 46.2-20.5 58.6-13.7 12.4-34.6 18.6-62.8 18.6-10.3 0-31.7-2-48.8-5.8l6.3-31c14.3 3 33.2 3.8 43.1 3.8 15.7 0 26.9-3.2 33.6-9.6s10-15.9 10-28.5v-6.4c-3.9 1.9-9 3.8-15.3 5.8-6.3 1.9-13.6 2.9-21.8 2.9-10.8 0-20.6-1.7-29.5-5.1-8.9-3.4-16.6-8.4-22.9-15-6.3-6.6-11.3-14.9-14.8-24.8s-5.3-27.6-5.3-40.6c0-12.2 1.9-27.5 5.6-37.7 3.8-10.2 9.2-19 16.5-26.3 7.2-7.3 16-12.9 26.3-17s22.4-6.7 35.5-6.7c12.7 0 24.4 1.6 35.8 3.5 11.4 1.9 21.1 3.9 29 6.1v155.2zm-108.7-77.2c0 16.4 3.6 34.6 10.8 42.2 7.2 7.6 16.5 11.4 27.9 11.4 6.2 0 12.1-.9 17.6-2.6 5.5-1.7 9.9-3.7 13.4-6.1v-97.1c-2.8-.6-14.5-3-25.8-3.3-14.2-.4-25 5.4-32.6 14.7-7.5 9.3-11.3 25.6-11.3 40.8zm294.3 0c0 13.2-1.9 23.2-5.8 34.1s-9.4 20.2-16.5 27.9c-7.1 7.7-15.6 13.7-25.6 17.9s-25.4 6.6-33.1 6.6c-7.7-.1-23-2.3-32.9-6.6-9.9-4.3-18.4-10.2-25.5-17.9-7.1-7.7-12.6-17-16.6-27.9s-6-20.9-6-34.1c0-13.2 1.8-25.9 5.8-36.7 4-10.8 9.6-20 16.8-27.7s15.8-13.6 25.6-17.8c9.9-4.2 20.8-6.2 32.6-6.2s22.7 2.1 32.7 6.2c10 4.2 18.6 10.1 25.6 17.8 7.1 7.7 12.6 16.9 16.6 27.7 4.2 10.8 6.3 23.5 6.3 36.7zm-40 .1c0-16.9-3.7-31-10.9-40.8-7.2-9.9-17.3-14.8-30.2-14.8-12.9 0-23 4.9-30.2 14.8-7.2 9.9-10.7 23.9-10.7 40.8 0 17.1 3.6 28.6 10.8 38.5 7.2 10 17.3 14.9 30.2 14.9 12.9 0 23-5 30.2-14.9 7.2-10 10.8-21.4 10.8-38.5zm127.1 86.4c-64.1.3-64.1-51.8-64.1-60.1L1051 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9zm68.9 0h-39.3V108.1l39.3-6.2v175zm-19.7-193.5c13.1 0 23.8-10.6 23.8-23.7S1177.6 36 1164.4 36s-23.8 10.6-23.8 23.7 10.7 23.7 23.8 23.7zm117.4 18.6c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4s8.9 13.5 11.1 21.7c2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6s-25.9 2.7-41.1 2.7c-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 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1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18s13.7 5.3 23.6 5.3zm158.5 31.9c-64.1.3-64.1-51.8-64.1-60.1L610.6 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9z', fill: '#182359' }) ); }; /* eslint-enable max-len */ var PoweredBy = function (_Component) { _inherits(PoweredBy, _Component); function PoweredBy() { _classCallCheck(this, PoweredBy); return _possibleConstructorReturn(this, (PoweredBy.__proto__ || Object.getPrototypeOf(PoweredBy)).apply(this, arguments)); } _createClass(PoweredBy, [{ key: 'render', value: function render() { var _props = this.props; var translate = _props.translate; var url = _props.url; return _react2.default.createElement( 'div', cx('root'), _react2.default.createElement( 'span', cx('searchBy'), translate('searchBy'), ' ' ), _react2.default.createElement( 'a', _extends({ href: url, target: '_blank' }, cx('algoliaLink')), _react2.default.createElement(AlgoliaLogo, null) ) ); } }]); return PoweredBy; }(_react.Component); PoweredBy.propTypes = { url: _react.PropTypes.string.isRequired, translate: _react.PropTypes.func.isRequired }; exports.default = (0, _translatable2.default)({ searchBy: 'Search by' })(PoweredBy); /***/ }), /* 386 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isNaN2 = __webpack_require__(214); var _isNaN3 = _interopRequireDefault(_isNaN2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('RangeInput'); var RangeInput = function (_Component) { _inherits(RangeInput, _Component); function RangeInput(props) { _classCallCheck(this, RangeInput); var _this = _possibleConstructorReturn(this, (RangeInput.__proto__ || Object.getPrototypeOf(RangeInput)).call(this, props)); _this.onSubmit = function (e) { e.preventDefault(); e.stopPropagation(); if (!(0, _isNaN3.default)(parseFloat(_this.state.from, 10)) && !(0, _isNaN3.default)(parseFloat(_this.state.to, 10))) { _this.props.refine({ min: _this.state.from, max: _this.state.to }); } }; _this.state = _this.props.canRefine ? { from: props.currentRefinement.min, to: props.currentRefinement.max } : { from: '', to: '' }; return _this; } _createClass(RangeInput, [{ key: 'componentWillMount', value: function componentWillMount() { if (this.context.canRefine) this.context.canRefine(this.props.canRefine); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if (nextProps.canRefine) { this.setState({ from: nextProps.currentRefinement.min, to: nextProps.currentRefinement.max }); } if (this.context.canRefine) this.context.canRefine(nextProps.canRefine); } }, { key: 'render', value: function render() { var _this2 = this; var _props = this.props; var translate = _props.translate; var canRefine = _props.canRefine; return _react2.default.createElement( 'form', _extends({}, cx('root', !canRefine && 'noRefinement'), { onSubmit: this.onSubmit }), _react2.default.createElement( 'fieldset', _extends({ disabled: !canRefine }, cx('fieldset')), _react2.default.createElement( 'label', cx('labelMin'), _react2.default.createElement('input', _extends({}, cx('inputMin'), { type: 'number', value: this.state.from, onChange: function onChange(e) { return _this2.setState({ from: e.target.value }); } })) ), _react2.default.createElement( 'span', cx('separator'), translate('separator') ), _react2.default.createElement( 'label', cx('labelMax'), _react2.default.createElement('input', _extends({}, cx('inputMax'), { type: 'number', value: this.state.to, onChange: function onChange(e) { return _this2.setState({ to: e.target.value }); } })) ), _react2.default.createElement( 'button', _extends({}, cx('submit'), { type: 'submit' }), translate('submit') ) ) ); } }]); return RangeInput; }(_react.Component); RangeInput.propTypes = { translate: _react.PropTypes.func.isRequired, refine: _react.PropTypes.func.isRequired, min: _react.PropTypes.number, max: _react.PropTypes.number, currentRefinement: _react.PropTypes.shape({ min: _react.PropTypes.number, max: _react.PropTypes.number }), canRefine: _react.PropTypes.bool.isRequired }; RangeInput.contextTypes = { canRefine: _react.PropTypes.func }; exports.default = (0, _translatable2.default)({ submit: 'ok', separator: 'to' })(RangeInput); /***/ }), /* 387 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _pick2 = __webpack_require__(110); var _pick3 = _interopRequireDefault(_pick2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _List = __webpack_require__(208); var _List2 = _interopRequireDefault(_List); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); var _Highlight = __webpack_require__(231); var _Highlight2 = _interopRequireDefault(_Highlight); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('RefinementList'); var RefinementList = function (_Component) { _inherits(RefinementList, _Component); function RefinementList(props) { _classCallCheck(this, RefinementList); var _this = _possibleConstructorReturn(this, (RefinementList.__proto__ || Object.getPrototypeOf(RefinementList)).call(this, props)); _this.selectItem = function (item, resetQuery) { resetQuery(); _this.props.refine(item.value); }; _this.renderItem = function (item, resetQuery) { var label = _this.props.isFromSearch ? _react2.default.createElement(_Highlight2.default, { attributeName: 'label', hit: item }) : item.label; return _react2.default.createElement( 'label', null, _react2.default.createElement('input', _extends({}, cx('itemCheckbox', item.isRefined && 'itemCheckboxSelected'), { type: 'checkbox', checked: item.isRefined, onChange: function onChange() { return _this.selectItem(item, resetQuery); } })), _react2.default.createElement('span', cx('itemBox', 'itemBox', item.isRefined && 'itemBoxSelected')), _react2.default.createElement( 'span', cx('itemLabel', 'itemLabel', item.isRefined && 'itemLabelSelected'), label ), ' ', _react2.default.createElement( 'span', cx('itemCount', item.isRefined && 'itemCountSelected'), item.count ) ); }; _this.state = { query: '' }; return _this; } _createClass(RefinementList, [{ key: 'componentWillMount', value: function componentWillMount() { if (this.context.canRefine) this.context.canRefine(this.props.canRefine); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(props) { if (this.context.canRefine) this.context.canRefine(props.canRefine); } }, { key: 'render', value: function render() { return _react2.default.createElement( 'div', null, _react2.default.createElement(_List2.default, _extends({ renderItem: this.renderItem, selectItem: this.selectItem, cx: cx }, (0, _pick3.default)(this.props, ['translate', 'items', 'showMore', 'limitMin', 'limitMax', 'isFromSearch', 'searchForItems', 'withSearchBox', 'canRefine']), { query: this.state.query })) ); } }]); return RefinementList; }(_react.Component); RefinementList.propTypes = { translate: _react.PropTypes.func.isRequired, refine: _react.PropTypes.func.isRequired, searchForItems: _react.PropTypes.func.isRequired, withSearchBox: _react.PropTypes.bool, createURL: _react.PropTypes.func.isRequired, items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ label: _react.PropTypes.string.isRequired, value: _react.PropTypes.arrayOf(_react.PropTypes.string).isRequired, count: _react.PropTypes.number.isRequired, isRefined: _react.PropTypes.bool.isRequired })), isFromSearch: _react.PropTypes.bool.isRequired, canRefine: _react.PropTypes.bool.isRequired, showMore: _react.PropTypes.bool, limitMin: _react.PropTypes.number, limitMax: _react.PropTypes.number, transformItems: _react.PropTypes.func }; RefinementList.contextTypes = { canRefine: _react.PropTypes.func }; exports.default = (0, _translatable2.default)({ showMore: function showMore(extended) { return extended ? 'Show less' : 'Show more'; }, noResults: 'No results', submit: null, reset: null, resetTitle: 'Clear the search query.', submitTitle: 'Submit your search query.', placeholder: 'Search here…' })(RefinementList); /***/ }), /* 388 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _reactDom = __webpack_require__(425); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ScrollTo = function (_Component) { _inherits(ScrollTo, _Component); function ScrollTo() { _classCallCheck(this, ScrollTo); return _possibleConstructorReturn(this, (ScrollTo.__proto__ || Object.getPrototypeOf(ScrollTo)).apply(this, arguments)); } _createClass(ScrollTo, [{ key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { var value = this.props.value; if (value !== prevProps.value) { var el = (0, _reactDom.findDOMNode)(this); el.scrollIntoView(); } } }, { key: 'render', value: function render() { return _react.Children.only(this.props.children); } }]); return ScrollTo; }(_react.Component); ScrollTo.propTypes = { value: _react.PropTypes.any, children: _react.PropTypes.node }; exports.default = ScrollTo; /***/ }), /* 389 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.default = Snippet; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _Highlighter = __webpack_require__(341); var _Highlighter2 = _interopRequireDefault(_Highlighter); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function Snippet(props) { return _react2.default.createElement(_Highlighter2.default, _extends({ highlightProperty: '_snippetResult' }, props)); } Snippet.propTypes = { hit: _react2.default.PropTypes.object.isRequired, attributeName: _react2.default.PropTypes.string.isRequired, highlight: _react2.default.PropTypes.func.isRequired, tagName: _react2.default.PropTypes.string }; /***/ }), /* 390 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _Select = __webpack_require__(343); var _Select2 = _interopRequireDefault(_Select); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('SortBy'); var SortBy = function (_Component) { _inherits(SortBy, _Component); function SortBy() { var _ref; var _temp, _this, _ret; _classCallCheck(this, SortBy); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = SortBy.__proto__ || Object.getPrototypeOf(SortBy)).call.apply(_ref, [this].concat(args))), _this), _this.onChange = function (e) { _this.props.refine(e.target.value); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(SortBy, [{ key: 'render', value: function render() { var _props = this.props; var refine = _props.refine; var items = _props.items; var currentRefinement = _props.currentRefinement; return _react2.default.createElement(_Select2.default, { cx: cx, selectedItem: currentRefinement, onSelect: refine, items: items }); } }]); return SortBy; }(_react.Component); SortBy.propTypes = { refine: _react.PropTypes.func.isRequired, items: _react.PropTypes.arrayOf(_react.PropTypes.shape({ label: _react.PropTypes.string, value: _react.PropTypes.string.isRequired })).isRequired, currentRefinement: _react.PropTypes.string.isRequired, transformItems: _react.PropTypes.func }; exports.default = SortBy; /***/ }), /* 391 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isEmpty2 = __webpack_require__(15); var _isEmpty3 = _interopRequireDefault(_isEmpty2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('StarRating'); var StarRating = function (_Component) { _inherits(StarRating, _Component); function StarRating() { _classCallCheck(this, StarRating); return _possibleConstructorReturn(this, (StarRating.__proto__ || Object.getPrototypeOf(StarRating)).apply(this, arguments)); } _createClass(StarRating, [{ key: 'componentWillMount', value: function componentWillMount() { if (this.context.canRefine) this.context.canRefine(this.props.canRefine); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(props) { if (this.context.canRefine) this.context.canRefine(props.canRefine); } }, { key: 'onClick', value: function onClick(min, max, e) { e.preventDefault(); e.stopPropagation(); if (min === this.props.currentRefinement.min && max === this.props.currentRefinement.max) { this.props.refine({ min: this.props.min, max: this.props.max }); } else { this.props.refine({ min: min, max: max }); } } }, { key: 'buildItem', value: function buildItem(_ref) { var max = _ref.max; var lowerBound = _ref.lowerBound; var count = _ref.count; var translate = _ref.translate; var createURL = _ref.createURL; var isLastSelectableItem = _ref.isLastSelectableItem; var disabled = !count; var isCurrentMinLower = this.props.currentRefinement.min < lowerBound; var selected = isLastSelectableItem && isCurrentMinLower || !disabled && lowerBound === this.props.currentRefinement.min && max === this.props.currentRefinement.max; var icons = []; for (var icon = 0; icon < max; icon++) { var iconTheme = icon >= lowerBound ? 'ratingIconEmpty' : 'ratingIcon'; icons.push(_react2.default.createElement('span', _extends({ key: icon }, cx(iconTheme, selected && iconTheme + 'Selected', disabled && iconTheme + 'Disabled')))); } // The last item of the list (the default item), should not // be clickable if it is selected. var isLastAndSelect = isLastSelectableItem && selected; var StarsWrapper = isLastAndSelect ? 'div' : 'a'; var onClickHandler = isLastAndSelect ? {} : { href: createURL({ min: lowerBound, max: max }), onClick: this.onClick.bind(this, lowerBound, max) }; return _react2.default.createElement( StarsWrapper, _extends({}, cx('ratingLink', selected && 'ratingLinkSelected', disabled && 'ratingLinkDisabled'), { disabled: disabled, key: lowerBound }, onClickHandler), icons, _react2.default.createElement( 'span', cx('ratingLabel', selected && 'ratingLabelSelected', disabled && 'ratingLabelDisabled'), translate('ratingLabel') ), _react2.default.createElement( 'span', null, ' ' ), _react2.default.createElement( 'span', cx('ratingCount', selected && 'ratingCountSelected', disabled && 'ratingCountDisabled'), count ) ); } }, { key: 'render', value: function render() { var _this2 = this; var _props = this.props; var translate = _props.translate; var refine = _props.refine; var min = _props.min; var max = _props.max; var count = _props.count; var createURL = _props.createURL; var canRefine = _props.canRefine; var items = []; var _loop = function _loop(i) { var hasCount = !(0, _isEmpty3.default)(count.filter(function (item) { return Number(item.value) === i; })); var lastSelectableItem = count.reduce(function (acc, item) { return item.value < acc.value || !acc.value && hasCount ? item : acc; }, {}); var itemCount = count.reduce(function (acc, item) { return item.value >= i && hasCount ? acc + item.count : acc; }, 0); items.push(_this2.buildItem({ lowerBound: i, max: max, refine: refine, count: itemCount, translate: translate, createURL: createURL, isLastSelectableItem: i === Number(lastSelectableItem.value) })); }; for (var i = max; i >= min; i--) { _loop(i); } return _react2.default.createElement( 'div', cx('root', !canRefine && 'noRefinement'), items ); } }]); return StarRating; }(_react.Component); StarRating.propTypes = { translate: _react.PropTypes.func.isRequired, refine: _react.PropTypes.func.isRequired, createURL: _react.PropTypes.func.isRequired, min: _react.PropTypes.number, max: _react.PropTypes.number, currentRefinement: _react.PropTypes.shape({ min: _react.PropTypes.number, max: _react.PropTypes.number }), count: _react.PropTypes.arrayOf(_react.PropTypes.shape({ value: _react.PropTypes.string, count: _react.PropTypes.number })), canRefine: _react.PropTypes.bool.isRequired }; StarRating.contextTypes = { canRefine: _react.PropTypes.func }; exports.default = (0, _translatable2.default)({ ratingLabel: ' & Up' })(StarRating); /***/ }), /* 392 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _translatable = __webpack_require__(32); var _translatable2 = _interopRequireDefault(_translatable); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('Stats'); var Stats = function (_Component) { _inherits(Stats, _Component); function Stats() { _classCallCheck(this, Stats); return _possibleConstructorReturn(this, (Stats.__proto__ || Object.getPrototypeOf(Stats)).apply(this, arguments)); } _createClass(Stats, [{ key: 'render', value: function render() { var _props = this.props; var translate = _props.translate; var nbHits = _props.nbHits; var processingTimeMS = _props.processingTimeMS; return _react2.default.createElement( 'span', cx('root'), translate('stats', nbHits, processingTimeMS) ); } }]); return Stats; }(_react.Component); Stats.propTypes = { translate: _react.PropTypes.func.isRequired, nbHits: _react.PropTypes.number.isRequired, processingTimeMS: _react.PropTypes.number.isRequired }; exports.default = (0, _translatable2.default)({ stats: function stats(n, ms) { return n.toLocaleString() + ' results found in ' + ms.toLocaleString() + 'ms'; } })(Stats); /***/ }), /* 393 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _classNames = __webpack_require__(13); var _classNames2 = _interopRequireDefault(_classNames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var cx = (0, _classNames2.default)('Toggle'); var Toggle = function (_Component) { _inherits(Toggle, _Component); function Toggle() { var _ref; var _temp, _this, _ret; _classCallCheck(this, Toggle); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Toggle.__proto__ || Object.getPrototypeOf(Toggle)).call.apply(_ref, [this].concat(args))), _this), _this.onChange = function (e) { _this.props.refine(e.target.checked); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(Toggle, [{ key: 'render', value: function render() { var _props = this.props; var currentRefinement = _props.currentRefinement; var label = _props.label; return _react2.default.createElement( 'label', cx('root'), _react2.default.createElement('input', _extends({}, cx('checkbox'), { type: 'checkbox', checked: currentRefinement, onChange: this.onChange })), _react2.default.createElement( 'span', cx('label'), label ) ); } }]); return Toggle; }(_react.Component); Toggle.propTypes = { currentRefinement: _react.PropTypes.bool.isRequired, refine: _react.PropTypes.func.isRequired, label: _react.PropTypes.string.isRequired }; exports.default = Toggle; /***/ }), /* 394 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint valid-jsdoc: 0 */ /** * @description * `<Index>` is the component that allows you to apply widgets to a dedicated index. It's * useful if you want to build an interface that targets multiple indices. * @kind widget * @name <Index> * @propType {string} indexName - index in which to search. * @example * import {InstantSearch, Index, SearchBox, Hits, Configure} from 'react-instantsearch/dom'; * * export default function Search() { * return ( * <InstantSearch appId="" apiKey="" indexName="index1"> <SearchBox/> <Configure hitsPerPage={1} /> <Index indexName="index1"> <Hits /> </Index> <Index indexName="index2"> <Hits /> </Index> </InstantSearch> * ); * } */ var Index = function (_Component) { _inherits(Index, _Component); function Index() { _classCallCheck(this, Index); return _possibleConstructorReturn(this, (Index.__proto__ || Object.getPrototypeOf(Index)).apply(this, arguments)); } _createClass(Index, [{ key: 'getChildContext', value: function getChildContext() { return { multiIndexContext: { targetedIndex: this.props.indexName } }; } }, { key: 'render', value: function render() { var childrenCount = _react.Children.count(this.props.children); var _props$root = this.props.root; var Root = _props$root.Root; var props = _props$root.props; if (childrenCount === 0) return null;else return _react2.default.createElement( Root, props, this.props.children ); } }]); return Index; }(_react.Component); Index.propTypes = { // @TODO: These props are currently constant. indexName: _react.PropTypes.string.isRequired, children: _react.PropTypes.node, root: _react.PropTypes.shape({ Root: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.string, _react2.default.PropTypes.func]), props: _react.PropTypes.object }).isRequired }; Index.childContextTypes = { // @TODO: more precise widgets manager propType multiIndexContext: _react.PropTypes.object.isRequired }; exports.default = Index; /***/ }), /* 395 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _createInstantSearchManager = __webpack_require__(396); var _createInstantSearchManager2 = _interopRequireDefault(_createInstantSearchManager); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function validateNextProps(props, nextProps) { if (!props.searchState && nextProps.searchState) { throw new Error("You can't switch <InstantSearch> from being uncontrolled to controlled"); } else if (props.searchState && !nextProps.searchState) { throw new Error("You can't switch <InstantSearch> from being controlled to uncontrolled"); } } /* eslint valid-jsdoc: 0 */ /** * @description * `<InstantSearch>` is the root component of all React InstantSearch implementations. * It provides all the connected components (aka widgets) a means to interact * with the searchState. * @kind widget * @requirements You will need to have an Algolia account to be able to use this widget. * [Create one now](https://www.algolia.com/users/sign_up). * @propType {string} appId - Your Algolia application id. * @propType {string} apiKey - Your Algolia search-only API key. * @propType {string} indexName - Main index in which to search. * @propType {object} [algoliaClient] - Provide a custom Algolia client instead of the internal one. * @propType {func} [onSearchStateChange] - Function to be called everytime a new search is done. Useful for [URL Routing](guide/Routing.html). * @propType {object} [searchState] - Object to inject some search state. Switches the InstantSearch component in controlled mode. Useful for [URL Routing](guide/Routing.html). * @propType {func} [createURL] - Function to call when creating links, useful for [URL Routing](guide/Routing.html). * @example * import {InstantSearch, SearchBox, Hits} from 'react-instantsearch/dom'; * * export default function Search() { * return ( * <InstantSearch * appId="appId" * apiKey="apiKey" * indexName="indexName" * > * <SearchBox /> * <Hits /> * </InstantSearch> * ); * } */ var InstantSearch = function (_Component) { _inherits(InstantSearch, _Component); function InstantSearch(props) { _classCallCheck(this, InstantSearch); var _this = _possibleConstructorReturn(this, (InstantSearch.__proto__ || Object.getPrototypeOf(InstantSearch)).call(this, props)); _this.isControlled = Boolean(props.searchState); var initialState = _this.isControlled ? props.searchState : {}; _this.isUnmounting = false; _this.aisManager = (0, _createInstantSearchManager2.default)({ indexName: props.indexName, searchParameters: props.searchParameters, algoliaClient: props.algoliaClient, initialState: initialState }); return _this; } _createClass(InstantSearch, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { validateNextProps(this.props, nextProps); if (this.props.indexName !== nextProps.indexName) { this.aisManager.updateIndex(nextProps.indexName); } if (this.isControlled) { this.aisManager.onExternalStateUpdate(nextProps.searchState); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.isUnmounting = true; this.aisManager.skipSearch(); } }, { key: 'getChildContext', value: function getChildContext() { // If not already cached, cache the bound methods so that we can forward them as part // of the context. if (!this._aisContextCache) { this._aisContextCache = { ais: { onInternalStateUpdate: this.onWidgetsInternalStateUpdate.bind(this), createHrefForState: this.createHrefForState.bind(this), onSearchForFacetValues: this.onSearchForFacetValues.bind(this), onSearchStateChange: this.onSearchStateChange.bind(this) } }; } return { ais: _extends({}, this._aisContextCache.ais, { store: this.aisManager.store, widgetsManager: this.aisManager.widgetsManager, mainTargetedIndex: this.props.indexName }) }; } }, { key: 'createHrefForState', value: function createHrefForState(searchState) { searchState = this.aisManager.transitionState(searchState); return this.isControlled && this.props.createURL ? this.props.createURL(searchState, this.getKnownKeys()) : '#'; } }, { key: 'onWidgetsInternalStateUpdate', value: function onWidgetsInternalStateUpdate(searchState) { searchState = this.aisManager.transitionState(searchState); this.onSearchStateChange(searchState); if (!this.isControlled) { this.aisManager.onExternalStateUpdate(searchState); } } }, { key: 'onSearchStateChange', value: function onSearchStateChange(searchState) { if (this.props.onSearchStateChange && !this.isUnmounting) { this.props.onSearchStateChange(searchState); } } }, { key: 'onSearchForFacetValues', value: function onSearchForFacetValues(searchState) { this.aisManager.onSearchForFacetValues(searchState); } }, { key: 'getKnownKeys', value: function getKnownKeys() { return this.aisManager.getWidgetsIds(); } }, { key: 'render', value: function render() { var childrenCount = _react.Children.count(this.props.children); var _props$root = this.props.root; var Root = _props$root.Root; var props = _props$root.props; if (childrenCount === 0) return null;else return _react2.default.createElement( Root, props, this.props.children ); } }]); return InstantSearch; }(_react.Component); InstantSearch.propTypes = { // @TODO: These props are currently constant. indexName: _react.PropTypes.string.isRequired, algoliaClient: _react.PropTypes.object.isRequired, searchParameters: _react.PropTypes.object, createURL: _react.PropTypes.func, searchState: _react.PropTypes.object, onSearchStateChange: _react.PropTypes.func, children: _react.PropTypes.node, root: _react.PropTypes.shape({ Root: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.string, _react2.default.PropTypes.func]), props: _react.PropTypes.object }).isRequired }; InstantSearch.childContextTypes = { // @TODO: more precise widgets manager propType ais: _react.PropTypes.object.isRequired }; exports.default = InstantSearch; /***/ }), /* 396 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isEmpty2 = __webpack_require__(15); var _isEmpty3 = _interopRequireDefault(_isEmpty2); var _omit2 = __webpack_require__(37); var _omit3 = _interopRequireDefault(_omit2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.default = createInstantSearchManager; var _algoliasearchHelper = __webpack_require__(210); var _algoliasearchHelper2 = _interopRequireDefault(_algoliasearchHelper); var _createWidgetsManager = __webpack_require__(398); var _createWidgetsManager2 = _interopRequireDefault(_createWidgetsManager); var _createStore = __webpack_require__(397); var _createStore2 = _interopRequireDefault(_createStore); var _highlightTags = __webpack_require__(209); var _highlightTags2 = _interopRequireDefault(_highlightTags); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * Creates a new instance of the InstantSearchManager which controls the widgets and * trigger the search when the widgets are updated. * @param {string} indexName - the main index name * @param {object} initialState - initial widget state * @param {object} SearchParameters - optional additional parameters to send to the algolia API * @return {InstantSearchManager} a new instance of InstantSearchManager */ function createInstantSearchManager(_ref) { var indexName = _ref.indexName; var _ref$initialState = _ref.initialState; var initialState = _ref$initialState === undefined ? {} : _ref$initialState; var algoliaClient = _ref.algoliaClient; var _ref$searchParameters = _ref.searchParameters; var searchParameters = _ref$searchParameters === undefined ? {} : _ref$searchParameters; var baseSP = new _algoliasearchHelper.SearchParameters(_extends({}, searchParameters, { index: indexName }, _highlightTags2.default)); var helper = (0, _algoliasearchHelper2.default)(algoliaClient, indexName, baseSP); helper.on('result', handleSearchSuccess); helper.on('error', handleSearchError); var derivedHelpers = {}; var indexMapping = {}; // keep track of the original index where the parameters applied when sortBy is used. var initialSearchParameters = helper.state; var widgetsManager = (0, _createWidgetsManager2.default)(onWidgetsUpdate); var store = (0, _createStore2.default)({ widgets: initialState, metadata: [], results: null, error: null, searching: false }); var skip = false; function skipSearch() { skip = true; } function updateClient(client) { helper.setClient(client); search(); } function getMetadata(state) { return widgetsManager.getWidgets().filter(function (widget) { return Boolean(widget.getMetadata); }).map(function (widget) { return widget.getMetadata(state); }); } function getSearchParameters() { indexMapping = {}; var sharedParameters = widgetsManager.getWidgets().filter(function (widget) { return Boolean(widget.getSearchParameters); }).filter(function (widget) { return !widget.multiIndexContext; }).reduce(function (res, widget) { return widget.getSearchParameters(res); }, initialSearchParameters); indexMapping[sharedParameters.index] = indexName; var derivatedWidgets = widgetsManager.getWidgets().filter(function (widget) { return Boolean(widget.getSearchParameters); }).filter(function (widget) { return widget.multiIndexContext && widget.multiIndexContext.targetedIndex !== indexName; }).reduce(function (indices, widget) { var targetedIndex = widget.multiIndexContext.targetedIndex; var index = indices.find(function (i) { return i.targetedIndex === targetedIndex; }); if (index) { index.widgets.push(widget); } else { indices.push({ targetedIndex: targetedIndex, widgets: [widget] }); } return indices; }, []); var mainIndexParameters = widgetsManager.getWidgets().filter(function (widget) { return Boolean(widget.getSearchParameters); }).filter(function (widget) { return widget.multiIndexContext && widget.multiIndexContext.targetedIndex === indexName; }).reduce(function (res, widget) { return widget.getSearchParameters(res); }, sharedParameters); return { sharedParameters: sharedParameters, mainIndexParameters: mainIndexParameters, derivatedWidgets: derivatedWidgets }; } function search() { if (!skip) { var _getSearchParameters = getSearchParameters(helper.state); var sharedParameters = _getSearchParameters.sharedParameters; var mainIndexParameters = _getSearchParameters.mainIndexParameters; var derivatedWidgets = _getSearchParameters.derivatedWidgets; Object.values(derivedHelpers).forEach(function (d) { return d.detach(); }); derivedHelpers = {}; helper.setState(sharedParameters); derivatedWidgets.forEach(function (derivatedSearchParameters) { var index = derivatedSearchParameters.targetedIndex; var derivedHelper = helper.derive(function () { var parameters = derivatedSearchParameters.widgets.reduce(function (res, widget) { return widget.getSearchParameters(res); }, sharedParameters.setIndex(index)); indexMapping[parameters.index] = index; return parameters; }); derivedHelper.on('result', handleSearchSuccess); derivedHelper.on('error', handleSearchError); derivedHelpers[index] = derivedHelper; }); helper.setState(mainIndexParameters); helper.search(); } } function handleSearchSuccess(content) { var state = store.getState(); var results = state.results ? state.results : []; if (!(0, _isEmpty3.default)(derivedHelpers)) { results[indexMapping[content.index]] = content; } else { results = content; } var nextState = (0, _omit3.default)(_extends({}, store.getState(), { results: results, searching: false }), 'resultsFacetValues'); store.setState(nextState); } function handleSearchError(error) { var nextState = (0, _omit3.default)(_extends({}, store.getState(), { error: error, searching: false }), 'resultsFacetValues'); store.setState(nextState); } // Called whenever a widget has been rendered with new props. function onWidgetsUpdate() { var metadata = getMetadata(store.getState().widgets); store.setState(_extends({}, store.getState(), { metadata: metadata, searching: true })); // Since the `getSearchParameters` method of widgets also depends on props, // the result search parameters might have changed. search(); } function transitionState(nextSearchState) { var searchState = store.getState().widgets; return widgetsManager.getWidgets().filter(function (widget) { return Boolean(widget.transitionState); }).reduce(function (res, widget) { return widget.transitionState(searchState, res); }, nextSearchState); } function onExternalStateUpdate(nextSearchState) { var metadata = getMetadata(nextSearchState); store.setState(_extends({}, store.getState(), { widgets: nextSearchState, metadata: metadata, searching: true })); search(); } function onSearchForFacetValues(nextSearchState) { store.setState(_extends({}, store.getState(), { searchingForFacetValues: true })); helper.searchForFacetValues(nextSearchState.facetName, nextSearchState.query).then(function (content) { var _extends2; store.setState(_extends({}, store.getState(), { resultsFacetValues: _extends({}, store.getState().resultsFacetValues, (_extends2 = {}, _defineProperty(_extends2, nextSearchState.facetName, content.facetHits), _defineProperty(_extends2, 'query', nextSearchState.query), _extends2)), searchingForFacetValues: false })); }, function (error) { store.setState(_extends({}, store.getState(), { error: error, searchingForFacetValues: false })); }).catch(function (error) { // Since setState is synchronous, any error that occurs in the render of a // component will be swallowed by this promise. // This is a trick to make the error show up correctly in the console. // See http://stackoverflow.com/a/30741722/969302 setTimeout(function () { throw error; }); }); } function updateIndex(newIndex) { initialSearchParameters = initialSearchParameters.setIndex(newIndex); search(); } function getWidgetsIds() { return store.getState().metadata.reduce(function (res, meta) { return typeof meta.id !== 'undefined' ? res.concat(meta.id) : res; }, []); } return { store: store, widgetsManager: widgetsManager, getWidgetsIds: getWidgetsIds, onExternalStateUpdate: onExternalStateUpdate, transitionState: transitionState, onSearchForFacetValues: onSearchForFacetValues, updateClient: updateClient, updateIndex: updateIndex, skipSearch: skipSearch }; } /***/ }), /* 397 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = createStore; function createStore(initialState) { var state = initialState; var listeners = []; function dispatch() { listeners.forEach(function (listener) { return listener(); }); } return { getState: function getState() { return state; }, setState: function setState(nextState) { state = nextState; dispatch(); }, subscribe: function subscribe(listener) { listeners.push(listener); return function unsubcribe() { listeners.splice(listeners.indexOf(listener), 1); }; } }; } /***/ }), /* 398 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = createWidgetsManager; var _utils = __webpack_require__(57); function createWidgetsManager(onWidgetsUpdate) { var widgets = []; // Is an update scheduled? var scheduled = false; // The state manager's updates need to be batched since more than one // component can register or unregister widgets during the same tick. function scheduleUpdate() { if (scheduled) { return; } scheduled = true; (0, _utils.defer)(function () { scheduled = false; onWidgetsUpdate(); }); } return { registerWidget: function registerWidget(widget) { widgets.push(widget); scheduleUpdate(); return function unregisterWidget() { widgets.splice(widgets.indexOf(widget), 1); scheduleUpdate(); }; }, update: scheduleUpdate, getWidgets: function getWidgets() { return widgets; } }; } /***/ }), /* 399 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.withKeysPropType = exports.stateManagerPropType = exports.configManagerPropType = undefined; var _react = __webpack_require__(0); var configManagerPropType = exports.configManagerPropType = _react.PropTypes.shape({ register: _react.PropTypes.func.isRequired, swap: _react.PropTypes.func.isRequired, unregister: _react.PropTypes.func.isRequired }); var stateManagerPropType = exports.stateManagerPropType = _react.PropTypes.shape({ createURL: _react.PropTypes.func.isRequired, setState: _react.PropTypes.func.isRequired, getState: _react.PropTypes.func.isRequired, unlisten: _react.PropTypes.func.isRequired }); var withKeysPropType = exports.withKeysPropType = function withKeysPropType(keys) { return function (props, propName, componentName) { var prop = props[propName]; if (prop) { var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = Object.keys(prop)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var key = _step.value; if (keys.indexOf(key) === -1) { return new Error('Unknown `' + propName + '` key `' + key + '`. Check the render method ' + ('of `' + componentName + '`.')); } } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } } return undefined; }; }; /***/ }), /* 400 */ /***/ (function(module, exports, __webpack_require__) { /** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = debug.debug = debug; exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; exports.humanize = __webpack_require__(401); /** * The currently active debug mode names, and names to skip. */ exports.names = []; exports.skips = []; /** * Map of special "%n" handling functions, for the debug "format" argument. * * Valid key names are a single, lowercased letter, i.e. "n". */ exports.formatters = {}; /** * Previously assigned color. */ var prevColor = 0; /** * Previous log timestamp. */ var prevTime; /** * Select a color. * * @return {Number} * @api private */ function selectColor() { return exports.colors[prevColor++ % exports.colors.length]; } /** * Create a debugger with the given `namespace`. * * @param {String} namespace * @return {Function} * @api public */ function debug(namespace) { // define the `disabled` version function disabled() { } disabled.enabled = false; // define the `enabled` version function enabled() { var self = enabled; // set `diff` timestamp var curr = +new Date(); var ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; // add the `color` if not set if (null == self.useColors) self.useColors = exports.useColors(); if (null == self.color && self.useColors) self.color = selectColor(); var args = new Array(arguments.length); for (var i = 0; i < args.length; i++) { args[i] = arguments[i]; } args[0] = exports.coerce(args[0]); if ('string' !== typeof args[0]) { // anything else let's inspect with %o args = ['%o'].concat(args); } // apply any `formatters` transformations var index = 0; args[0] = args[0].replace(/%([a-z%])/g, function(match, format) { // if we encounter an escaped % then don't increase the array index if (match === '%%') return match; index++; var formatter = exports.formatters[format]; if ('function' === typeof formatter) { var val = args[index]; match = formatter.call(self, val); // now we need to remove `args[index]` since it's inlined in the `format` args.splice(index, 1); index--; } return match; }); // apply env-specific formatting args = exports.formatArgs.apply(self, args); var logFn = enabled.log || exports.log || console.log.bind(console); logFn.apply(self, args); } enabled.enabled = true; var fn = exports.enabled(namespace) ? enabled : disabled; fn.namespace = namespace; return fn; } /** * Enables a debug mode by namespaces. This can include modes * separated by a colon and wildcards. * * @param {String} namespaces * @api public */ function enable(namespaces) { exports.save(namespaces); var split = (namespaces || '').split(/[\s,]+/); var len = split.length; for (var i = 0; i < len; i++) { if (!split[i]) continue; // ignore empty strings namespaces = split[i].replace(/[\\^$+?.()|[\]{}]/g, '\\$&').replace(/\*/g, '.*?'); if (namespaces[0] === '-') { exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); } else { exports.names.push(new RegExp('^' + namespaces + '$')); } } } /** * Disable debug output. * * @api public */ function disable() { exports.enable(''); } /** * Returns true if the given mode name is enabled, false otherwise. * * @param {String} name * @return {Boolean} * @api public */ function enabled(name) { var i, len; for (i = 0, len = exports.skips.length; i < len; i++) { if (exports.skips[i].test(name)) { return false; } } for (i = 0, len = exports.names.length; i < len; i++) { if (exports.names[i].test(name)) { return true; } } return false; } /** * Coerce `val`. * * @param {Mixed} val * @return {Mixed} * @api private */ function coerce(val) { if (val instanceof Error) return val.stack || val.message; return val; } /***/ }), /* 401 */ /***/ (function(module, exports) { /** * Helpers. */ var s = 1000 var m = s * 60 var h = m * 60 var d = h * 24 var y = d * 365.25 /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} options * @throws {Error} throw an error if val is not a non-empty string or a number * @return {String|Number} * @api public */ module.exports = function (val, options) { options = options || {} var type = typeof val if (type === 'string' && val.length > 0) { return parse(val) } else if (type === 'number' && isNaN(val) === false) { return options.long ? fmtLong(val) : fmtShort(val) } throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)) } /** * Parse the given `str` and return milliseconds. * * @param {String} str * @return {Number} * @api private */ function parse(str) { str = String(str) if (str.length > 10000) { return } var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str) if (!match) { return } var n = parseFloat(match[1]) var type = (match[2] || 'ms').toLowerCase() switch (type) { case 'years': case 'year': case 'yrs': case 'yr': case 'y': return n * y case 'days': case 'day': case 'd': return n * d case 'hours': case 'hour': case 'hrs': case 'hr': case 'h': return n * h case 'minutes': case 'minute': case 'mins': case 'min': case 'm': return n * m case 'seconds': case 'second': case 'secs': case 'sec': case 's': return n * s case 'milliseconds': case 'millisecond': case 'msecs': case 'msec': case 'ms': return n default: return undefined } } /** * Short format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtShort(ms) { if (ms >= d) { return Math.round(ms / d) + 'd' } if (ms >= h) { return Math.round(ms / h) + 'h' } if (ms >= m) { return Math.round(ms / m) + 'm' } if (ms >= s) { return Math.round(ms / s) + 's' } return ms + 'ms' } /** * Long format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtLong(ms) { return plural(ms, d, 'day') || plural(ms, h, 'hour') || plural(ms, m, 'minute') || plural(ms, s, 'second') || ms + ' ms' } /** * Pluralization helper. */ function plural(ms, n, name) { if (ms < n) { return } if (ms < n * 1.5) { return Math.floor(ms / n) + ' ' + name } return Math.ceil(ms / n) + ' ' + name + 's' } /***/ }), /* 402 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {module.exports = AlgoliaSearchCore; var errors = __webpack_require__(212); var exitPromise = __webpack_require__(410); var IndexCore = __webpack_require__(403); var store = __webpack_require__(414); // We will always put the API KEY in the JSON body in case of too long API KEY, // to avoid query string being too long and failing in various conditions (our server limit, browser limit, // proxies limit) var MAX_API_KEY_LENGTH = 500; var RESET_APP_DATA_TIMER = process.env.RESET_APP_DATA_TIMER && parseInt(process.env.RESET_APP_DATA_TIMER, 10) || 60 * 2 * 1000; // after 2 minutes reset to first host /* * Algolia Search library initialization * https://www.algolia.com/ * * @param {string} applicationID - Your applicationID, found in your dashboard * @param {string} apiKey - Your API key, found in your dashboard * @param {Object} [opts] * @param {number} [opts.timeout=2000] - The request timeout set in milliseconds, * another request will be issued after this timeout * @param {string} [opts.protocol='http:'] - The protocol used to query Algolia Search API. * Set to 'https:' to force using https. * Default to document.location.protocol in browsers * @param {Object|Array} [opts.hosts={ * read: [this.applicationID + '-dsn.algolia.net'].concat([ * this.applicationID + '-1.algolianet.com', * this.applicationID + '-2.algolianet.com', * this.applicationID + '-3.algolianet.com'] * ]), * write: [this.applicationID + '.algolia.net'].concat([ * this.applicationID + '-1.algolianet.com', * this.applicationID + '-2.algolianet.com', * this.applicationID + '-3.algolianet.com'] * ]) - The hosts to use for Algolia Search API. * If you provide them, you will less benefit from our HA implementation */ function AlgoliaSearchCore(applicationID, apiKey, opts) { var debug = __webpack_require__(211)('algoliasearch'); var clone = __webpack_require__(119); var isArray = __webpack_require__(247); var map = __webpack_require__(248); var usage = 'Usage: algoliasearch(applicationID, apiKey, opts)'; if (opts._allowEmptyCredentials !== true && !applicationID) { throw new errors.AlgoliaSearchError('Please provide an application ID. ' + usage); } if (opts._allowEmptyCredentials !== true && !apiKey) { throw new errors.AlgoliaSearchError('Please provide an API key. ' + usage); } this.applicationID = applicationID; this.apiKey = apiKey; this.hosts = { read: [], write: [] }; opts = opts || {}; var protocol = opts.protocol || 'https:'; this._timeouts = opts.timeouts || { connect: 1 * 1000, // 500ms connect is GPRS latency read: 2 * 1000, write: 30 * 1000 }; // backward compat, if opts.timeout is passed, we use it to configure all timeouts like before if (opts.timeout) { this._timeouts.connect = this._timeouts.read = this._timeouts.write = opts.timeout; } // while we advocate for colon-at-the-end values: 'http:' for `opts.protocol` // we also accept `http` and `https`. It's a common error. if (!/:$/.test(protocol)) { protocol = protocol + ':'; } if (opts.protocol !== 'http:' && opts.protocol !== 'https:') { throw new errors.AlgoliaSearchError('protocol must be `http:` or `https:` (was `' + opts.protocol + '`)'); } this._checkAppIdData(); if (!opts.hosts) { var defaultHosts = map(this._shuffleResult, function(hostNumber) { return applicationID + '-' + hostNumber + '.algolianet.com'; }); // no hosts given, compute defaults this.hosts.read = [this.applicationID + '-dsn.algolia.net'].concat(defaultHosts); this.hosts.write = [this.applicationID + '.algolia.net'].concat(defaultHosts); } else if (isArray(opts.hosts)) { // when passing custom hosts, we need to have a different host index if the number // of write/read hosts are different. this.hosts.read = clone(opts.hosts); this.hosts.write = clone(opts.hosts); } else { this.hosts.read = clone(opts.hosts.read); this.hosts.write = clone(opts.hosts.write); } // add protocol and lowercase hosts this.hosts.read = map(this.hosts.read, prepareHost(protocol)); this.hosts.write = map(this.hosts.write, prepareHost(protocol)); this.extraHeaders = []; // In some situations you might want to warm the cache this.cache = opts._cache || {}; this._ua = opts._ua; this._useCache = opts._useCache === undefined || opts._cache ? true : opts._useCache; this._useFallback = opts.useFallback === undefined ? true : opts.useFallback; this._setTimeout = opts._setTimeout; debug('init done, %j', this); } /* * Get the index object initialized * * @param indexName the name of index * @param callback the result callback with one argument (the Index instance) */ AlgoliaSearchCore.prototype.initIndex = function(indexName) { return new IndexCore(this, indexName); }; /** * Add an extra field to the HTTP request * * @param name the header field name * @param value the header field value */ AlgoliaSearchCore.prototype.setExtraHeader = function(name, value) { this.extraHeaders.push({ name: name.toLowerCase(), value: value }); }; /** * Augment sent x-algolia-agent with more data, each agent part * is automatically separated from the others by a semicolon; * * @param algoliaAgent the agent to add */ AlgoliaSearchCore.prototype.addAlgoliaAgent = function(algoliaAgent) { if (this._ua.indexOf(';' + algoliaAgent) === -1) { this._ua += ';' + algoliaAgent; } }; /* * Wrapper that try all hosts to maximize the quality of service */ AlgoliaSearchCore.prototype._jsonRequest = function(initialOpts) { this._checkAppIdData(); var requestDebug = __webpack_require__(211)('algoliasearch:' + initialOpts.url); var body; var additionalUA = initialOpts.additionalUA || ''; var cache = initialOpts.cache; var client = this; var tries = 0; var usingFallback = false; var hasFallback = client._useFallback && client._request.fallback && initialOpts.fallback; var headers; if ( this.apiKey.length > MAX_API_KEY_LENGTH && initialOpts.body !== undefined && (initialOpts.body.params !== undefined || // index.search() initialOpts.body.requests !== undefined) // client.search() ) { initialOpts.body.apiKey = this.apiKey; headers = this._computeRequestHeaders(additionalUA, false); } else { headers = this._computeRequestHeaders(additionalUA); } if (initialOpts.body !== undefined) { body = safeJSONStringify(initialOpts.body); } requestDebug('request start'); var debugData = []; function doRequest(requester, reqOpts) { client._checkAppIdData(); var startTime = new Date(); var cacheID; if (client._useCache) { cacheID = initialOpts.url; } // as we sometime use POST requests to pass parameters (like query='aa'), // the cacheID must also include the body to be different between calls if (client._useCache && body) { cacheID += '_body_' + reqOpts.body; } // handle cache existence if (client._useCache && cache && cache[cacheID] !== undefined) { requestDebug('serving response from cache'); return client._promise.resolve(JSON.parse(cache[cacheID])); } // if we reached max tries if (tries >= client.hosts[initialOpts.hostType].length) { if (!hasFallback || usingFallback) { requestDebug('could not get any response'); // then stop return client._promise.reject(new errors.AlgoliaSearchError( 'Cannot connect to the AlgoliaSearch API.' + ' Send an email to [email protected] to report and resolve the issue.' + ' Application id was: ' + client.applicationID, {debugData: debugData} )); } requestDebug('switching to fallback'); // let's try the fallback starting from here tries = 0; // method, url and body are fallback dependent reqOpts.method = initialOpts.fallback.method; reqOpts.url = initialOpts.fallback.url; reqOpts.jsonBody = initialOpts.fallback.body; if (reqOpts.jsonBody) { reqOpts.body = safeJSONStringify(reqOpts.jsonBody); } // re-compute headers, they could be omitting the API KEY headers = client._computeRequestHeaders(additionalUA); reqOpts.timeouts = client._getTimeoutsForRequest(initialOpts.hostType); client._setHostIndexByType(0, initialOpts.hostType); usingFallback = true; // the current request is now using fallback return doRequest(client._request.fallback, reqOpts); } var currentHost = client._getHostByType(initialOpts.hostType); var url = currentHost + reqOpts.url; var options = { body: reqOpts.body, jsonBody: reqOpts.jsonBody, method: reqOpts.method, headers: headers, timeouts: reqOpts.timeouts, debug: requestDebug }; requestDebug('method: %s, url: %s, headers: %j, timeouts: %d', options.method, url, options.headers, options.timeouts); if (requester === client._request.fallback) { requestDebug('using fallback'); } // `requester` is any of this._request or this._request.fallback // thus it needs to be called using the client as context return requester.call(client, url, options).then(success, tryFallback); function success(httpResponse) { // compute the status of the response, // // When in browser mode, using XDR or JSONP, we have no statusCode available // So we rely on our API response `status` property. // But `waitTask` can set a `status` property which is not the statusCode (it's the task status) // So we check if there's a `message` along `status` and it means it's an error // // That's the only case where we have a response.status that's not the http statusCode var status = httpResponse && httpResponse.body && httpResponse.body.message && httpResponse.body.status || // this is important to check the request statusCode AFTER the body eventual // statusCode because some implementations (jQuery XDomainRequest transport) may // send statusCode 200 while we had an error httpResponse.statusCode || // When in browser mode, using XDR or JSONP // we default to success when no error (no response.status && response.message) // If there was a JSON.parse() error then body is null and it fails httpResponse && httpResponse.body && 200; requestDebug('received response: statusCode: %s, computed statusCode: %d, headers: %j', httpResponse.statusCode, status, httpResponse.headers); var httpResponseOk = Math.floor(status / 100) === 2; var endTime = new Date(); debugData.push({ currentHost: currentHost, headers: removeCredentials(headers), content: body || null, contentLength: body !== undefined ? body.length : null, method: reqOpts.method, timeouts: reqOpts.timeouts, url: reqOpts.url, startTime: startTime, endTime: endTime, duration: endTime - startTime, statusCode: status }); if (httpResponseOk) { if (client._useCache && cache) { cache[cacheID] = httpResponse.responseText; } return httpResponse.body; } var shouldRetry = Math.floor(status / 100) !== 4; if (shouldRetry) { tries += 1; return retryRequest(); } requestDebug('unrecoverable error'); // no success and no retry => fail var unrecoverableError = new errors.AlgoliaSearchError( httpResponse.body && httpResponse.body.message, {debugData: debugData, statusCode: status} ); return client._promise.reject(unrecoverableError); } function tryFallback(err) { // error cases: // While not in fallback mode: // - CORS not supported // - network error // While in fallback mode: // - timeout // - network error // - badly formatted JSONP (script loaded, did not call our callback) // In both cases: // - uncaught exception occurs (TypeError) requestDebug('error: %s, stack: %s', err.message, err.stack); var endTime = new Date(); debugData.push({ currentHost: currentHost, headers: removeCredentials(headers), content: body || null, contentLength: body !== undefined ? body.length : null, method: reqOpts.method, timeouts: reqOpts.timeouts, url: reqOpts.url, startTime: startTime, endTime: endTime, duration: endTime - startTime }); if (!(err instanceof errors.AlgoliaSearchError)) { err = new errors.Unknown(err && err.message, err); } tries += 1; // stop the request implementation when: if ( // we did not generate this error, // it comes from a throw in some other piece of code err instanceof errors.Unknown || // server sent unparsable JSON err instanceof errors.UnparsableJSON || // max tries and already using fallback or no fallback tries >= client.hosts[initialOpts.hostType].length && (usingFallback || !hasFallback)) { // stop request implementation for this command err.debugData = debugData; return client._promise.reject(err); } // When a timeout occured, retry by raising timeout if (err instanceof errors.RequestTimeout) { return retryRequestWithHigherTimeout(); } return retryRequest(); } function retryRequest() { requestDebug('retrying request'); client._incrementHostIndex(initialOpts.hostType); return doRequest(requester, reqOpts); } function retryRequestWithHigherTimeout() { requestDebug('retrying request with higher timeout'); client._incrementHostIndex(initialOpts.hostType); client._incrementTimeoutMultipler(); reqOpts.timeouts = client._getTimeoutsForRequest(initialOpts.hostType); return doRequest(requester, reqOpts); } } var promise = doRequest( client._request, { url: initialOpts.url, method: initialOpts.method, body: body, jsonBody: initialOpts.body, timeouts: client._getTimeoutsForRequest(initialOpts.hostType) } ); // either we have a callback // either we are using promises if (initialOpts.callback) { promise.then(function okCb(content) { exitPromise(function() { initialOpts.callback(null, content); }, client._setTimeout || setTimeout); }, function nookCb(err) { exitPromise(function() { initialOpts.callback(err); }, client._setTimeout || setTimeout); }); } else { return promise; } }; /* * Transform search param object in query string * @param {object} args arguments to add to the current query string * @param {string} params current query string * @return {string} the final query string */ AlgoliaSearchCore.prototype._getSearchParams = function(args, params) { if (args === undefined || args === null) { return params; } for (var key in args) { if (key !== null && args[key] !== undefined && args.hasOwnProperty(key)) { params += params === '' ? '' : '&'; params += key + '=' + encodeURIComponent(Object.prototype.toString.call(args[key]) === '[object Array]' ? safeJSONStringify(args[key]) : args[key]); } } return params; }; AlgoliaSearchCore.prototype._computeRequestHeaders = function(additionalUA, withAPIKey) { var forEach = __webpack_require__(109); var ua = additionalUA ? this._ua + ';' + additionalUA : this._ua; var requestHeaders = { 'x-algolia-agent': ua, 'x-algolia-application-id': this.applicationID }; // browser will inline headers in the url, node.js will use http headers // but in some situations, the API KEY will be too long (big secured API keys) // so if the request is a POST and the KEY is very long, we will be asked to not put // it into headers but in the JSON body if (withAPIKey !== false) { requestHeaders['x-algolia-api-key'] = this.apiKey; } if (this.userToken) { requestHeaders['x-algolia-usertoken'] = this.userToken; } if (this.securityTags) { requestHeaders['x-algolia-tagfilters'] = this.securityTags; } if (this.extraHeaders) { forEach(this.extraHeaders, function addToRequestHeaders(header) { requestHeaders[header.name] = header.value; }); } return requestHeaders; }; /** * Search through multiple indices at the same time * @param {Object[]} queries An array of queries you want to run. * @param {string} queries[].indexName The index name you want to target * @param {string} [queries[].query] The query to issue on this index. Can also be passed into `params` * @param {Object} queries[].params Any search param like hitsPerPage, .. * @param {Function} callback Callback to be called * @return {Promise|undefined} Returns a promise if no callback given */ AlgoliaSearchCore.prototype.search = function(queries, opts, callback) { var isArray = __webpack_require__(247); var map = __webpack_require__(248); var usage = 'Usage: client.search(arrayOfQueries[, callback])'; if (!isArray(queries)) { throw new Error(usage); } if (typeof opts === 'function') { callback = opts; opts = {}; } else if (opts === undefined) { opts = {}; } var client = this; var postObj = { requests: map(queries, function prepareRequest(query) { var params = ''; // allow query.query // so we are mimicing the index.search(query, params) method // {indexName:, query:, params:} if (query.query !== undefined) { params += 'query=' + encodeURIComponent(query.query); } return { indexName: query.indexName, params: client._getSearchParams(query.params, params) }; }) }; var JSONPParams = map(postObj.requests, function prepareJSONPParams(request, requestId) { return requestId + '=' + encodeURIComponent( '/1/indexes/' + encodeURIComponent(request.indexName) + '?' + request.params ); }).join('&'); var url = '/1/indexes/*/queries'; if (opts.strategy !== undefined) { url += '?strategy=' + opts.strategy; } return this._jsonRequest({ cache: this.cache, method: 'POST', url: url, body: postObj, hostType: 'read', fallback: { method: 'GET', url: '/1/indexes/*', body: { params: JSONPParams } }, callback: callback }); }; /** * Set the extra security tagFilters header * @param {string|array} tags The list of tags defining the current security filters */ AlgoliaSearchCore.prototype.setSecurityTags = function(tags) { if (Object.prototype.toString.call(tags) === '[object Array]') { var strTags = []; for (var i = 0; i < tags.length; ++i) { if (Object.prototype.toString.call(tags[i]) === '[object Array]') { var oredTags = []; for (var j = 0; j < tags[i].length; ++j) { oredTags.push(tags[i][j]); } strTags.push('(' + oredTags.join(',') + ')'); } else { strTags.push(tags[i]); } } tags = strTags.join(','); } this.securityTags = tags; }; /** * Set the extra user token header * @param {string} userToken The token identifying a uniq user (used to apply rate limits) */ AlgoliaSearchCore.prototype.setUserToken = function(userToken) { this.userToken = userToken; }; /** * Clear all queries in client's cache * @return undefined */ AlgoliaSearchCore.prototype.clearCache = function() { this.cache = {}; }; /** * Set the number of milliseconds a request can take before automatically being terminated. * @deprecated * @param {Number} milliseconds */ AlgoliaSearchCore.prototype.setRequestTimeout = function(milliseconds) { if (milliseconds) { this._timeouts.connect = this._timeouts.read = this._timeouts.write = milliseconds; } }; /** * Set the three different (connect, read, write) timeouts to be used when requesting * @param {Object} timeouts */ AlgoliaSearchCore.prototype.setTimeouts = function(timeouts) { this._timeouts = timeouts; }; /** * Get the three different (connect, read, write) timeouts to be used when requesting * @param {Object} timeouts */ AlgoliaSearchCore.prototype.getTimeouts = function() { return this._timeouts; }; AlgoliaSearchCore.prototype._getAppIdData = function() { var data = store.get(this.applicationID); if (data !== null) this._cacheAppIdData(data); return data; }; AlgoliaSearchCore.prototype._setAppIdData = function(data) { data.lastChange = (new Date()).getTime(); this._cacheAppIdData(data); return store.set(this.applicationID, data); }; AlgoliaSearchCore.prototype._checkAppIdData = function() { var data = this._getAppIdData(); var now = (new Date()).getTime(); if (data === null || now - data.lastChange > RESET_APP_DATA_TIMER) { return this._resetInitialAppIdData(data); } return data; }; AlgoliaSearchCore.prototype._resetInitialAppIdData = function(data) { var newData = data || {}; newData.hostIndexes = {read: 0, write: 0}; newData.timeoutMultiplier = 1; newData.shuffleResult = newData.shuffleResult || shuffle([1, 2, 3]); return this._setAppIdData(newData); }; AlgoliaSearchCore.prototype._cacheAppIdData = function(data) { this._hostIndexes = data.hostIndexes; this._timeoutMultiplier = data.timeoutMultiplier; this._shuffleResult = data.shuffleResult; }; AlgoliaSearchCore.prototype._partialAppIdDataUpdate = function(newData) { var foreach = __webpack_require__(109); var currentData = this._getAppIdData(); foreach(newData, function(value, key) { currentData[key] = value; }); return this._setAppIdData(currentData); }; AlgoliaSearchCore.prototype._getHostByType = function(hostType) { return this.hosts[hostType][this._getHostIndexByType(hostType)]; }; AlgoliaSearchCore.prototype._getTimeoutMultiplier = function() { return this._timeoutMultiplier; }; AlgoliaSearchCore.prototype._getHostIndexByType = function(hostType) { return this._hostIndexes[hostType]; }; AlgoliaSearchCore.prototype._setHostIndexByType = function(hostIndex, hostType) { var clone = __webpack_require__(119); var newHostIndexes = clone(this._hostIndexes); newHostIndexes[hostType] = hostIndex; this._partialAppIdDataUpdate({hostIndexes: newHostIndexes}); return hostIndex; }; AlgoliaSearchCore.prototype._incrementHostIndex = function(hostType) { return this._setHostIndexByType( (this._getHostIndexByType(hostType) + 1) % this.hosts[hostType].length, hostType ); }; AlgoliaSearchCore.prototype._incrementTimeoutMultipler = function() { var timeoutMultiplier = Math.max(this._timeoutMultiplier + 1, 4); return this._partialAppIdDataUpdate({timeoutMultiplier: timeoutMultiplier}); }; AlgoliaSearchCore.prototype._getTimeoutsForRequest = function(hostType) { return { connect: this._timeouts.connect * this._timeoutMultiplier, complete: this._timeouts[hostType] * this._timeoutMultiplier }; }; function prepareHost(protocol) { return function prepare(host) { return protocol + '//' + host.toLowerCase(); }; } // Prototype.js < 1.7, a widely used library, defines a weird // Array.prototype.toJSON function that will fail to stringify our content // appropriately // refs: // - https://groups.google.com/forum/#!topic/prototype-core/E-SAVvV_V9Q // - https://github.com/sstephenson/prototype/commit/038a2985a70593c1a86c230fadbdfe2e4898a48c // - http://stackoverflow.com/a/3148441/147079 function safeJSONStringify(obj) { /* eslint no-extend-native:0 */ if (Array.prototype.toJSON === undefined) { return JSON.stringify(obj); } var toJSON = Array.prototype.toJSON; delete Array.prototype.toJSON; var out = JSON.stringify(obj); Array.prototype.toJSON = toJSON; return out; } function shuffle(array) { var currentIndex = array.length; var temporaryValue; var randomIndex; // While there remain elements to shuffle... while (currentIndex !== 0) { // Pick a remaining element... randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1; // And swap it with the current element. temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; } function removeCredentials(headers) { var newHeaders = {}; for (var headerName in headers) { if (Object.prototype.hasOwnProperty.call(headers, headerName)) { var value; if (headerName === 'x-algolia-api-key' || headerName === 'x-algolia-application-id') { value = '**hidden for security purposes**'; } else { value = headers[headerName]; } newHeaders[headerName] = value; } } return newHeaders; } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(108))) /***/ }), /* 403 */ /***/ (function(module, exports, __webpack_require__) { var buildSearchMethod = __webpack_require__(344); var deprecate = __webpack_require__(408); var deprecatedMessage = __webpack_require__(409); module.exports = IndexCore; /* * Index class constructor. * You should not use this method directly but use initIndex() function */ function IndexCore(algoliasearch, indexName) { this.indexName = indexName; this.as = algoliasearch; this.typeAheadArgs = null; this.typeAheadValueOption = null; // make sure every index instance has it's own cache this.cache = {}; } /* * Clear all queries in cache */ IndexCore.prototype.clearCache = function() { this.cache = {}; }; /* * Search inside the index using XMLHttpRequest request (Using a POST query to * minimize number of OPTIONS queries: Cross-Origin Resource Sharing). * * @param {string} [query] the full text query * @param {object} [args] (optional) if set, contains an object with query parameters: * - page: (integer) Pagination parameter used to select the page to retrieve. * Page is zero-based and defaults to 0. Thus, * to retrieve the 10th page you need to set page=9 * - hitsPerPage: (integer) Pagination parameter used to select the number of hits per page. Defaults to 20. * - attributesToRetrieve: a string that contains the list of object attributes * you want to retrieve (let you minimize the answer size). * Attributes are separated with a comma (for example "name,address"). * You can also use an array (for example ["name","address"]). * By default, all attributes are retrieved. You can also use '*' to retrieve all * values when an attributesToRetrieve setting is specified for your index. * - attributesToHighlight: a string that contains the list of attributes you * want to highlight according to the query. * Attributes are separated by a comma. You can also use an array (for example ["name","address"]). * If an attribute has no match for the query, the raw value is returned. * By default all indexed text attributes are highlighted. * You can use `*` if you want to highlight all textual attributes. * Numerical attributes are not highlighted. * A matchLevel is returned for each highlighted attribute and can contain: * - full: if all the query terms were found in the attribute, * - partial: if only some of the query terms were found, * - none: if none of the query terms were found. * - attributesToSnippet: a string that contains the list of attributes to snippet alongside * the number of words to return (syntax is `attributeName:nbWords`). * Attributes are separated by a comma (Example: attributesToSnippet=name:10,content:10). * You can also use an array (Example: attributesToSnippet: ['name:10','content:10']). * By default no snippet is computed. * - minWordSizefor1Typo: the minimum number of characters in a query word to accept one typo in this word. * Defaults to 3. * - minWordSizefor2Typos: the minimum number of characters in a query word * to accept two typos in this word. Defaults to 7. * - getRankingInfo: if set to 1, the result hits will contain ranking * information in _rankingInfo attribute. * - aroundLatLng: search for entries around a given * latitude/longitude (specified as two floats separated by a comma). * For example aroundLatLng=47.316669,5.016670). * You can specify the maximum distance in meters with the aroundRadius parameter (in meters) * and the precision for ranking with aroundPrecision * (for example if you set aroundPrecision=100, two objects that are distant of * less than 100m will be considered as identical for "geo" ranking parameter). * At indexing, you should specify geoloc of an object with the _geoloc attribute * (in the form {"_geoloc":{"lat":48.853409, "lng":2.348800}}) * - insideBoundingBox: search entries inside a given area defined by the two extreme points * of a rectangle (defined by 4 floats: p1Lat,p1Lng,p2Lat,p2Lng). * For example insideBoundingBox=47.3165,4.9665,47.3424,5.0201). * At indexing, you should specify geoloc of an object with the _geoloc attribute * (in the form {"_geoloc":{"lat":48.853409, "lng":2.348800}}) * - numericFilters: a string that contains the list of numeric filters you want to * apply separated by a comma. * The syntax of one filter is `attributeName` followed by `operand` followed by `value`. * Supported operands are `<`, `<=`, `=`, `>` and `>=`. * You can have multiple conditions on one attribute like for example numericFilters=price>100,price<1000. * You can also use an array (for example numericFilters: ["price>100","price<1000"]). * - tagFilters: filter the query by a set of tags. You can AND tags by separating them by commas. * To OR tags, you must add parentheses. For example, tags=tag1,(tag2,tag3) means tag1 AND (tag2 OR tag3). * You can also use an array, for example tagFilters: ["tag1",["tag2","tag3"]] * means tag1 AND (tag2 OR tag3). * At indexing, tags should be added in the _tags** attribute * of objects (for example {"_tags":["tag1","tag2"]}). * - facetFilters: filter the query by a list of facets. * Facets are separated by commas and each facet is encoded as `attributeName:value`. * For example: `facetFilters=category:Book,author:John%20Doe`. * You can also use an array (for example `["category:Book","author:John%20Doe"]`). * - facets: List of object attributes that you want to use for faceting. * Comma separated list: `"category,author"` or array `['category','author']` * Only attributes that have been added in **attributesForFaceting** index setting * can be used in this parameter. * You can also use `*` to perform faceting on all attributes specified in **attributesForFaceting**. * - queryType: select how the query words are interpreted, it can be one of the following value: * - prefixAll: all query words are interpreted as prefixes, * - prefixLast: only the last word is interpreted as a prefix (default behavior), * - prefixNone: no query word is interpreted as a prefix. This option is not recommended. * - optionalWords: a string that contains the list of words that should * be considered as optional when found in the query. * Comma separated and array are accepted. * - distinct: If set to 1, enable the distinct feature (disabled by default) * if the attributeForDistinct index setting is set. * This feature is similar to the SQL "distinct" keyword: when enabled * in a query with the distinct=1 parameter, * all hits containing a duplicate value for the attributeForDistinct attribute are removed from results. * For example, if the chosen attribute is show_name and several hits have * the same value for show_name, then only the best * one is kept and others are removed. * - restrictSearchableAttributes: List of attributes you want to use for * textual search (must be a subset of the attributesToIndex index setting) * either comma separated or as an array * @param {function} [callback] the result callback called with two arguments: * error: null or Error('message'). If false, the content contains the error. * content: the server answer that contains the list of results. */ IndexCore.prototype.search = buildSearchMethod('query'); /* * -- BETA -- * Search a record similar to the query inside the index using XMLHttpRequest request (Using a POST query to * minimize number of OPTIONS queries: Cross-Origin Resource Sharing). * * @param {string} [query] the similar query * @param {object} [args] (optional) if set, contains an object with query parameters. * All search parameters are supported (see search function), restrictSearchableAttributes and facetFilters * are the two most useful to restrict the similar results and get more relevant content */ IndexCore.prototype.similarSearch = buildSearchMethod('similarQuery'); /* * Browse index content. The response content will have a `cursor` property that you can use * to browse subsequent pages for this query. Use `index.browseFrom(cursor)` when you want. * * @param {string} query - The full text query * @param {Object} [queryParameters] - Any search query parameter * @param {Function} [callback] - The result callback called with two arguments * error: null or Error('message') * content: the server answer with the browse result * @return {Promise|undefined} Returns a promise if no callback given * @example * index.browse('cool songs', { * tagFilters: 'public,comments', * hitsPerPage: 500 * }, callback); * @see {@link https://www.algolia.com/doc/rest_api#Browse|Algolia REST API Documentation} */ IndexCore.prototype.browse = function(query, queryParameters, callback) { var merge = __webpack_require__(411); var indexObj = this; var page; var hitsPerPage; // we check variadic calls that are not the one defined // .browse()/.browse(fn) // => page = 0 if (arguments.length === 0 || arguments.length === 1 && typeof arguments[0] === 'function') { page = 0; callback = arguments[0]; query = undefined; } else if (typeof arguments[0] === 'number') { // .browse(2)/.browse(2, 10)/.browse(2, fn)/.browse(2, 10, fn) page = arguments[0]; if (typeof arguments[1] === 'number') { hitsPerPage = arguments[1]; } else if (typeof arguments[1] === 'function') { callback = arguments[1]; hitsPerPage = undefined; } query = undefined; queryParameters = undefined; } else if (typeof arguments[0] === 'object') { // .browse(queryParameters)/.browse(queryParameters, cb) if (typeof arguments[1] === 'function') { callback = arguments[1]; } queryParameters = arguments[0]; query = undefined; } else if (typeof arguments[0] === 'string' && typeof arguments[1] === 'function') { // .browse(query, cb) callback = arguments[1]; queryParameters = undefined; } // otherwise it's a .browse(query)/.browse(query, queryParameters)/.browse(query, queryParameters, cb) // get search query parameters combining various possible calls // to .browse(); queryParameters = merge({}, queryParameters || {}, { page: page, hitsPerPage: hitsPerPage, query: query }); var params = this.as._getSearchParams(queryParameters, ''); return this.as._jsonRequest({ method: 'POST', url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/browse', body: {params: params}, hostType: 'read', callback: callback }); }; /* * Continue browsing from a previous position (cursor), obtained via a call to `.browse()`. * * @param {string} query - The full text query * @param {Object} [queryParameters] - Any search query parameter * @param {Function} [callback] - The result callback called with two arguments * error: null or Error('message') * content: the server answer with the browse result * @return {Promise|undefined} Returns a promise if no callback given * @example * index.browseFrom('14lkfsakl32', callback); * @see {@link https://www.algolia.com/doc/rest_api#Browse|Algolia REST API Documentation} */ IndexCore.prototype.browseFrom = function(cursor, callback) { return this.as._jsonRequest({ method: 'POST', url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/browse', body: {cursor: cursor}, hostType: 'read', callback: callback }); }; /* * Search for facet values * https://www.algolia.com/doc/rest-api/search#search-for-facet-values * * @param {string} params.facetName Facet name, name of the attribute to search for values in. * Must be declared as a facet * @param {string} params.facetQuery Query for the facet search * @param {string} [params.*] Any search parameter of Algolia, * see https://www.algolia.com/doc/api-client/javascript/search#search-parameters * Pagination is not supported. The page and hitsPerPage parameters will be ignored. * @param callback (optional) */ IndexCore.prototype.searchForFacetValues = function(params, callback) { var clone = __webpack_require__(119); var omit = __webpack_require__(412); var usage = 'Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])'; if (params.facetName === undefined || params.facetQuery === undefined) { throw new Error(usage); } var facetName = params.facetName; var filteredParams = omit(clone(params), function(keyName) { return keyName === 'facetName'; }); var searchParameters = this.as._getSearchParams(filteredParams, ''); return this.as._jsonRequest({ method: 'POST', url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/facets/' + encodeURIComponent(facetName) + '/query', hostType: 'read', body: {params: searchParameters}, callback: callback }); }; IndexCore.prototype.searchFacet = deprecate(function(params, callback) { return this.searchForFacetValues(params, callback); }, deprecatedMessage( 'index.searchFacet(params[, callback])', 'index.searchForFacetValues(params[, callback])' )); IndexCore.prototype._search = function(params, url, callback, additionalUA) { return this.as._jsonRequest({ cache: this.cache, method: 'POST', url: url || '/1/indexes/' + encodeURIComponent(this.indexName) + '/query', body: {params: params}, hostType: 'read', fallback: { method: 'GET', url: '/1/indexes/' + encodeURIComponent(this.indexName), body: {params: params} }, callback: callback, additionalUA: additionalUA }); }; /* * Get an object from this index * * @param objectID the unique identifier of the object to retrieve * @param attrs (optional) if set, contains the array of attribute names to retrieve * @param callback (optional) the result callback called with two arguments * error: null or Error('message') * content: the object to retrieve or the error message if a failure occured */ IndexCore.prototype.getObject = function(objectID, attrs, callback) { var indexObj = this; if (arguments.length === 1 || typeof attrs === 'function') { callback = attrs; attrs = undefined; } var params = ''; if (attrs !== undefined) { params = '?attributes='; for (var i = 0; i < attrs.length; ++i) { if (i !== 0) { params += ','; } params += attrs[i]; } } return this.as._jsonRequest({ method: 'GET', url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/' + encodeURIComponent(objectID) + params, hostType: 'read', callback: callback }); }; /* * Get several objects from this index * * @param objectIDs the array of unique identifier of objects to retrieve */ IndexCore.prototype.getObjects = function(objectIDs, attributesToRetrieve, callback) { var isArray = __webpack_require__(247); var map = __webpack_require__(248); var usage = 'Usage: index.getObjects(arrayOfObjectIDs[, callback])'; if (!isArray(objectIDs)) { throw new Error(usage); } var indexObj = this; if (arguments.length === 1 || typeof attributesToRetrieve === 'function') { callback = attributesToRetrieve; attributesToRetrieve = undefined; } var body = { requests: map(objectIDs, function prepareRequest(objectID) { var request = { indexName: indexObj.indexName, objectID: objectID }; if (attributesToRetrieve) { request.attributesToRetrieve = attributesToRetrieve.join(','); } return request; }) }; return this.as._jsonRequest({ method: 'POST', url: '/1/indexes/*/objects', hostType: 'read', body: body, callback: callback }); }; IndexCore.prototype.as = null; IndexCore.prototype.indexName = null; IndexCore.prototype.typeAheadArgs = null; IndexCore.prototype.typeAheadValueOption = null; /***/ }), /* 404 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var global = __webpack_require__(418); var Promise = global.Promise || __webpack_require__(417).Promise; // This is the standalone browser build entry point // Browser implementation of the Algolia Search JavaScript client, // using XMLHttpRequest, XDomainRequest and JSONP as fallback module.exports = function createAlgoliasearch(AlgoliaSearch, uaSuffix) { var inherits = __webpack_require__(345); var errors = __webpack_require__(212); var inlineHeaders = __webpack_require__(406); var jsonpRequest = __webpack_require__(407); var places = __webpack_require__(413); uaSuffix = uaSuffix || ''; if (false) { require('debug').enable('algoliasearch*'); } function algoliasearch(applicationID, apiKey, opts) { var cloneDeep = __webpack_require__(119); var getDocumentProtocol = __webpack_require__(405); opts = cloneDeep(opts || {}); if (opts.protocol === undefined) { opts.protocol = getDocumentProtocol(); } opts._ua = opts._ua || algoliasearch.ua; return new AlgoliaSearchBrowser(applicationID, apiKey, opts); } algoliasearch.version = __webpack_require__(415); algoliasearch.ua = 'Algolia for vanilla JavaScript ' + uaSuffix + algoliasearch.version; algoliasearch.initPlaces = places(algoliasearch); // we expose into window no matter how we are used, this will allow // us to easily debug any website running algolia global.__algolia = { debug: __webpack_require__(211), algoliasearch: algoliasearch }; var support = { hasXMLHttpRequest: 'XMLHttpRequest' in global, hasXDomainRequest: 'XDomainRequest' in global }; if (support.hasXMLHttpRequest) { support.cors = 'withCredentials' in new XMLHttpRequest(); } function AlgoliaSearchBrowser() { // call AlgoliaSearch constructor AlgoliaSearch.apply(this, arguments); } inherits(AlgoliaSearchBrowser, AlgoliaSearch); AlgoliaSearchBrowser.prototype._request = function request(url, opts) { return new Promise(function wrapRequest(resolve, reject) { // no cors or XDomainRequest, no request if (!support.cors && !support.hasXDomainRequest) { // very old browser, not supported reject(new errors.Network('CORS not supported')); return; } url = inlineHeaders(url, opts.headers); var body = opts.body; var req = support.cors ? new XMLHttpRequest() : new XDomainRequest(); var reqTimeout; var timedOut; var connected = false; reqTimeout = setTimeout(onTimeout, opts.timeouts.connect); // we set an empty onprogress listener // so that XDomainRequest on IE9 is not aborted // refs: // - https://github.com/algolia/algoliasearch-client-js/issues/76 // - https://social.msdn.microsoft.com/Forums/ie/en-US/30ef3add-767c-4436-b8a9-f1ca19b4812e/ie9-rtm-xdomainrequest-issued-requests-may-abort-if-all-event-handlers-not-specified?forum=iewebdevelopment req.onprogress = onProgress; if ('onreadystatechange' in req) req.onreadystatechange = onReadyStateChange; req.onload = onLoad; req.onerror = onError; // do not rely on default XHR async flag, as some analytics code like hotjar // breaks it and set it to false by default if (req instanceof XMLHttpRequest) { req.open(opts.method, url, true); } else { req.open(opts.method, url); } // headers are meant to be sent after open if (support.cors) { if (body) { if (opts.method === 'POST') { // https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Simple_requests req.setRequestHeader('content-type', 'application/x-www-form-urlencoded'); } else { req.setRequestHeader('content-type', 'application/json'); } } req.setRequestHeader('accept', 'application/json'); } req.send(body); // event object not received in IE8, at least // but we do not use it, still important to note function onLoad(/* event */) { // When browser does not supports req.timeout, we can // have both a load and timeout event, since handled by a dumb setTimeout if (timedOut) { return; } clearTimeout(reqTimeout); var out; try { out = { body: JSON.parse(req.responseText), responseText: req.responseText, statusCode: req.status, // XDomainRequest does not have any response headers headers: req.getAllResponseHeaders && req.getAllResponseHeaders() || {} }; } catch (e) { out = new errors.UnparsableJSON({ more: req.responseText }); } if (out instanceof errors.UnparsableJSON) { reject(out); } else { resolve(out); } } function onError(event) { if (timedOut) { return; } clearTimeout(reqTimeout); // error event is trigerred both with XDR/XHR on: // - DNS error // - unallowed cross domain request reject( new errors.Network({ more: event }) ); } function onTimeout() { timedOut = true; req.abort(); reject(new errors.RequestTimeout()); } function onConnect() { connected = true; clearTimeout(reqTimeout); reqTimeout = setTimeout(onTimeout, opts.timeouts.complete); } function onProgress() { if (!connected) onConnect(); } function onReadyStateChange() { if (!connected && req.readyState > 1) onConnect(); } }); }; AlgoliaSearchBrowser.prototype._request.fallback = function requestFallback(url, opts) { url = inlineHeaders(url, opts.headers); return new Promise(function wrapJsonpRequest(resolve, reject) { jsonpRequest(url, opts, function jsonpRequestDone(err, content) { if (err) { reject(err); return; } resolve(content); }); }); }; AlgoliaSearchBrowser.prototype._promise = { reject: function rejectPromise(val) { return Promise.reject(val); }, resolve: function resolvePromise(val) { return Promise.resolve(val); }, delay: function delayPromise(ms) { return new Promise(function resolveOnTimeout(resolve/* , reject*/) { setTimeout(resolve, ms); }); } }; return algoliasearch; }; /***/ }), /* 405 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = getDocumentProtocol; function getDocumentProtocol() { var protocol = window.document.location.protocol; // when in `file:` mode (local html file), default to `http:` if (protocol !== 'http:' && protocol !== 'https:') { protocol = 'http:'; } return protocol; } /***/ }), /* 406 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = inlineHeaders; var encode = __webpack_require__(424); function inlineHeaders(url, headers) { if (/\?/.test(url)) { url += '&'; } else { url += '?'; } return url + encode(headers); } /***/ }), /* 407 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = jsonpRequest; var errors = __webpack_require__(212); var JSONPCounter = 0; function jsonpRequest(url, opts, cb) { if (opts.method !== 'GET') { cb(new Error('Method ' + opts.method + ' ' + url + ' is not supported by JSONP.')); return; } opts.debug('JSONP: start'); var cbCalled = false; var timedOut = false; JSONPCounter += 1; var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); var cbName = 'algoliaJSONP_' + JSONPCounter; var done = false; window[cbName] = function(data) { removeGlobals(); if (timedOut) { opts.debug('JSONP: Late answer, ignoring'); return; } cbCalled = true; clean(); cb(null, { body: data/* , // We do not send the statusCode, there's no statusCode in JSONP, it will be // computed using data.status && data.message like with XDR statusCode*/ }); }; // add callback by hand url += '&callback=' + cbName; // add body params manually if (opts.jsonBody && opts.jsonBody.params) { url += '&' + opts.jsonBody.params; } var ontimeout = setTimeout(timeout, opts.timeouts.complete); // script onreadystatechange needed only for // <= IE8 // https://github.com/angular/angular.js/issues/4523 script.onreadystatechange = readystatechange; script.onload = success; script.onerror = error; script.async = true; script.defer = true; script.src = url; head.appendChild(script); function success() { opts.debug('JSONP: success'); if (done || timedOut) { return; } done = true; // script loaded but did not call the fn => script loading error if (!cbCalled) { opts.debug('JSONP: Fail. Script loaded but did not call the callback'); clean(); cb(new errors.JSONPScriptFail()); } } function readystatechange() { if (this.readyState === 'loaded' || this.readyState === 'complete') { success(); } } function clean() { clearTimeout(ontimeout); script.onload = null; script.onreadystatechange = null; script.onerror = null; head.removeChild(script); } function removeGlobals() { try { delete window[cbName]; delete window[cbName + '_loaded']; } catch (e) { window[cbName] = window[cbName + '_loaded'] = undefined; } } function timeout() { opts.debug('JSONP: Script timeout'); timedOut = true; clean(); cb(new errors.RequestTimeout()); } function error() { opts.debug('JSONP: Script error'); if (done || timedOut) { return; } clean(); cb(new errors.JSONPScriptError()); } } /***/ }), /* 408 */ /***/ (function(module, exports) { module.exports = function deprecate(fn, message) { var warned = false; function deprecated() { if (!warned) { /* eslint no-console:0 */ console.log(message); warned = true; } return fn.apply(this, arguments); } return deprecated; }; /***/ }), /* 409 */ /***/ (function(module, exports) { module.exports = function deprecatedMessage(previousUsage, newUsage) { var githubAnchorLink = previousUsage.toLowerCase() .replace('.', '') .replace('()', ''); return 'algoliasearch: `' + previousUsage + '` was replaced by `' + newUsage + '`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#' + githubAnchorLink; }; /***/ }), /* 410 */ /***/ (function(module, exports) { // Parse cloud does not supports setTimeout // We do not store a setTimeout reference in the client everytime // We only fallback to a fake setTimeout when not available // setTimeout cannot be override globally sadly module.exports = function exitPromise(fn, _setTimeout) { _setTimeout(fn, 0); }; /***/ }), /* 411 */ /***/ (function(module, exports, __webpack_require__) { var foreach = __webpack_require__(109); module.exports = function merge(destination/* , sources */) { var sources = Array.prototype.slice.call(arguments); foreach(sources, function(source) { for (var keyName in source) { if (source.hasOwnProperty(keyName)) { if (typeof destination[keyName] === 'object' && typeof source[keyName] === 'object') { destination[keyName] = merge({}, destination[keyName], source[keyName]); } else if (source[keyName] !== undefined) { destination[keyName] = source[keyName]; } } } }); return destination; }; /***/ }), /* 412 */ /***/ (function(module, exports, __webpack_require__) { module.exports = function omit(obj, test) { var keys = __webpack_require__(422); var foreach = __webpack_require__(109); var filtered = {}; foreach(keys(obj), function doFilter(keyName) { if (test(keyName) !== true) { filtered[keyName] = obj[keyName]; } }); return filtered; }; /***/ }), /* 413 */ /***/ (function(module, exports, __webpack_require__) { module.exports = createPlacesClient; var buildSearchMethod = __webpack_require__(344); function createPlacesClient(algoliasearch) { return function places(appID, apiKey, opts) { var cloneDeep = __webpack_require__(119); opts = opts && cloneDeep(opts) || {}; opts.hosts = opts.hosts || [ 'places-dsn.algolia.net', 'places-1.algolianet.com', 'places-2.algolianet.com', 'places-3.algolianet.com' ]; // allow initPlaces() no arguments => community rate limited if (arguments.length === 0 || typeof appID === 'object' || appID === undefined) { appID = ''; apiKey = ''; opts._allowEmptyCredentials = true; } var client = algoliasearch(appID, apiKey, opts); var index = client.initIndex('places'); index.search = buildSearchMethod('query', '/1/places/query'); return index; }; } /***/ }), /* 414 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var debug = __webpack_require__(211)('algoliasearch:src/hostIndexState.js'); var localStorageNamespace = 'algoliasearch-client-js'; var store; var moduleStore = { state: {}, set: function(key, data) { this.state[key] = data; return this.state[key]; }, get: function(key) { return this.state[key] || null; } }; var localStorageStore = { set: function(key, data) { moduleStore.set(key, data); // always replicate localStorageStore to moduleStore in case of failure try { var namespace = JSON.parse(global.localStorage[localStorageNamespace]); namespace[key] = data; global.localStorage[localStorageNamespace] = JSON.stringify(namespace); return namespace[key]; } catch (e) { return localStorageFailure(key, e); } }, get: function(key) { try { return JSON.parse(global.localStorage[localStorageNamespace])[key] || null; } catch (e) { return localStorageFailure(key, e); } } }; function localStorageFailure(key, e) { debug('localStorage failed with', e); cleanup(); store = moduleStore; return store.get(key); } store = supportsLocalStorage() ? localStorageStore : moduleStore; module.exports = { get: getOrSet, set: getOrSet, supportsLocalStorage: supportsLocalStorage }; function getOrSet(key, data) { if (arguments.length === 1) { return store.get(key); } return store.set(key, data); } function supportsLocalStorage() { try { if ('localStorage' in global && global.localStorage !== null) { if (!global.localStorage[localStorageNamespace]) { // actual creation of the namespace global.localStorage.setItem(localStorageNamespace, JSON.stringify({})); } return true; } return false; } catch (_) { return false; } } // In case of any error on localStorage, we clean our own namespace, this should handle // quota errors when a lot of keys + data are used function cleanup() { try { global.localStorage.removeItem(localStorageNamespace); } catch (_) { // nothing to do } } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(53))) /***/ }), /* 415 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = '3.21.1'; /***/ }), /* 416 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames () { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg)) { classes.push(classNames.apply(null, arg)); } else if (argType === 'object') { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(' '); } if (typeof module !== 'undefined' && module.exports) { module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () { return classNames; }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else { window.classNames = classNames; } }()); /***/ }), /* 417 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process, global) {var require;/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version 4.0.5 */ (function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.ES6Promise = factory()); }(this, (function () { 'use strict'; function objectOrFunction(x) { return typeof x === 'function' || typeof x === 'object' && x !== null; } function isFunction(x) { return typeof x === 'function'; } var _isArray = undefined; if (!Array.isArray) { _isArray = function (x) { return Object.prototype.toString.call(x) === '[object Array]'; }; } else { _isArray = Array.isArray; } var isArray = _isArray; var len = 0; var vertxNext = undefined; var customSchedulerFn = undefined; var asap = function asap(callback, arg) { queue[len] = callback; queue[len + 1] = arg; len += 2; if (len === 2) { // If len is 2, that means that we need to schedule an async flush. // If additional callbacks are queued before the queue is flushed, they // will be processed by this flush that we are scheduling. if (customSchedulerFn) { customSchedulerFn(flush); } else { scheduleFlush(); } } }; function setScheduler(scheduleFn) { customSchedulerFn = scheduleFn; } function setAsap(asapFn) { asap = asapFn; } var browserWindow = typeof window !== 'undefined' ? window : undefined; var browserGlobal = browserWindow || {}; var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]'; // test for web worker but not in IE10 var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; // node function useNextTick() { // node version 0.10.x displays a deprecation warning when nextTick is used recursively // see https://github.com/cujojs/when/issues/410 for details return function () { return process.nextTick(flush); }; } // vertx function useVertxTimer() { if (typeof vertxNext !== 'undefined') { return function () { vertxNext(flush); }; } return useSetTimeout(); } function useMutationObserver() { var iterations = 0; var observer = new BrowserMutationObserver(flush); var node = document.createTextNode(''); observer.observe(node, { characterData: true }); return function () { node.data = iterations = ++iterations % 2; }; } // web worker function useMessageChannel() { var channel = new MessageChannel(); channel.port1.onmessage = flush; return function () { return channel.port2.postMessage(0); }; } function useSetTimeout() { // Store setTimeout reference so es6-promise will be unaffected by // other code modifying setTimeout (like sinon.useFakeTimers()) var globalSetTimeout = setTimeout; return function () { return globalSetTimeout(flush, 1); }; } var queue = new Array(1000); function flush() { for (var i = 0; i < len; i += 2) { var callback = queue[i]; var arg = queue[i + 1]; callback(arg); queue[i] = undefined; queue[i + 1] = undefined; } len = 0; } function attemptVertx() { try { var r = require; var vertx = __webpack_require__(426); vertxNext = vertx.runOnLoop || vertx.runOnContext; return useVertxTimer(); } catch (e) { return useSetTimeout(); } } var scheduleFlush = undefined; // Decide what async method to use to triggering processing of queued callbacks: if (isNode) { scheduleFlush = useNextTick(); } else if (BrowserMutationObserver) { scheduleFlush = useMutationObserver(); } else if (isWorker) { scheduleFlush = useMessageChannel(); } else if (browserWindow === undefined && "function" === 'function') { scheduleFlush = attemptVertx(); } else { scheduleFlush = useSetTimeout(); } function then(onFulfillment, onRejection) { var _arguments = arguments; var parent = this; var child = new this.constructor(noop); if (child[PROMISE_ID] === undefined) { makePromise(child); } var _state = parent._state; if (_state) { (function () { var callback = _arguments[_state - 1]; asap(function () { return invokeCallback(_state, child, callback, parent._result); }); })(); } else { subscribe(parent, child, onFulfillment, onRejection); } return child; } /** `Promise.resolve` returns a promise that will become resolved with the passed `value`. It is shorthand for the following: ```javascript let promise = new Promise(function(resolve, reject){ resolve(1); }); promise.then(function(value){ // value === 1 }); ``` Instead of writing the above, your code now simply becomes the following: ```javascript let promise = Promise.resolve(1); promise.then(function(value){ // value === 1 }); ``` @method resolve @static @param {Any} value value that the returned promise will be resolved with Useful for tooling. @return {Promise} a promise that will become fulfilled with the given `value` */ function resolve(object) { /*jshint validthis:true */ var Constructor = this; if (object && typeof object === 'object' && object.constructor === Constructor) { return object; } var promise = new Constructor(noop); _resolve(promise, object); return promise; } var PROMISE_ID = Math.random().toString(36).substring(16); function noop() {} var PENDING = void 0; var FULFILLED = 1; var REJECTED = 2; var GET_THEN_ERROR = new ErrorObject(); function selfFulfillment() { return new TypeError("You cannot resolve a promise with itself"); } function cannotReturnOwn() { return new TypeError('A promises callback cannot return that same promise.'); } function getThen(promise) { try { return promise.then; } catch (error) { GET_THEN_ERROR.error = error; return GET_THEN_ERROR; } } function tryThen(then, value, fulfillmentHandler, rejectionHandler) { try { then.call(value, fulfillmentHandler, rejectionHandler); } catch (e) { return e; } } function handleForeignThenable(promise, thenable, then) { asap(function (promise) { var sealed = false; var error = tryThen(then, thenable, function (value) { if (sealed) { return; } sealed = true; if (thenable !== value) { _resolve(promise, value); } else { fulfill(promise, value); } }, function (reason) { if (sealed) { return; } sealed = true; _reject(promise, reason); }, 'Settle: ' + (promise._label || ' unknown promise')); if (!sealed && error) { sealed = true; _reject(promise, error); } }, promise); } function handleOwnThenable(promise, thenable) { if (thenable._state === FULFILLED) { fulfill(promise, thenable._result); } else if (thenable._state === REJECTED) { _reject(promise, thenable._result); } else { subscribe(thenable, undefined, function (value) { return _resolve(promise, value); }, function (reason) { return _reject(promise, reason); }); } } function handleMaybeThenable(promise, maybeThenable, then$$) { if (maybeThenable.constructor === promise.constructor && then$$ === then && maybeThenable.constructor.resolve === resolve) { handleOwnThenable(promise, maybeThenable); } else { if (then$$ === GET_THEN_ERROR) { _reject(promise, GET_THEN_ERROR.error); } else if (then$$ === undefined) { fulfill(promise, maybeThenable); } else if (isFunction(then$$)) { handleForeignThenable(promise, maybeThenable, then$$); } else { fulfill(promise, maybeThenable); } } } function _resolve(promise, value) { if (promise === value) { _reject(promise, selfFulfillment()); } else if (objectOrFunction(value)) { handleMaybeThenable(promise, value, getThen(value)); } else { fulfill(promise, value); } } function publishRejection(promise) { if (promise._onerror) { promise._onerror(promise._result); } publish(promise); } function fulfill(promise, value) { if (promise._state !== PENDING) { return; } promise._result = value; promise._state = FULFILLED; if (promise._subscribers.length !== 0) { asap(publish, promise); } } function _reject(promise, reason) { if (promise._state !== PENDING) { return; } promise._state = REJECTED; promise._result = reason; asap(publishRejection, promise); } function subscribe(parent, child, onFulfillment, onRejection) { var _subscribers = parent._subscribers; var length = _subscribers.length; parent._onerror = null; _subscribers[length] = child; _subscribers[length + FULFILLED] = onFulfillment; _subscribers[length + REJECTED] = onRejection; if (length === 0 && parent._state) { asap(publish, parent); } } function publish(promise) { var subscribers = promise._subscribers; var settled = promise._state; if (subscribers.length === 0) { return; } var child = undefined, callback = undefined, detail = promise._result; for (var i = 0; i < subscribers.length; i += 3) { child = subscribers[i]; callback = subscribers[i + settled]; if (child) { invokeCallback(settled, child, callback, detail); } else { callback(detail); } } promise._subscribers.length = 0; } function ErrorObject() { this.error = null; } var TRY_CATCH_ERROR = new ErrorObject(); function tryCatch(callback, detail) { try { return callback(detail); } catch (e) { TRY_CATCH_ERROR.error = e; return TRY_CATCH_ERROR; } } function invokeCallback(settled, promise, callback, detail) { var hasCallback = isFunction(callback), value = undefined, error = undefined, succeeded = undefined, failed = undefined; if (hasCallback) { value = tryCatch(callback, detail); if (value === TRY_CATCH_ERROR) { failed = true; error = value.error; value = null; } else { succeeded = true; } if (promise === value) { _reject(promise, cannotReturnOwn()); return; } } else { value = detail; succeeded = true; } if (promise._state !== PENDING) { // noop } else if (hasCallback && succeeded) { _resolve(promise, value); } else if (failed) { _reject(promise, error); } else if (settled === FULFILLED) { fulfill(promise, value); } else if (settled === REJECTED) { _reject(promise, value); } } function initializePromise(promise, resolver) { try { resolver(function resolvePromise(value) { _resolve(promise, value); }, function rejectPromise(reason) { _reject(promise, reason); }); } catch (e) { _reject(promise, e); } } var id = 0; function nextId() { return id++; } function makePromise(promise) { promise[PROMISE_ID] = id++; promise._state = undefined; promise._result = undefined; promise._subscribers = []; } function Enumerator(Constructor, input) { this._instanceConstructor = Constructor; this.promise = new Constructor(noop); if (!this.promise[PROMISE_ID]) { makePromise(this.promise); } if (isArray(input)) { this._input = input; this.length = input.length; this._remaining = input.length; this._result = new Array(this.length); if (this.length === 0) { fulfill(this.promise, this._result); } else { this.length = this.length || 0; this._enumerate(); if (this._remaining === 0) { fulfill(this.promise, this._result); } } } else { _reject(this.promise, validationError()); } } function validationError() { return new Error('Array Methods must be provided an Array'); }; Enumerator.prototype._enumerate = function () { var length = this.length; var _input = this._input; for (var i = 0; this._state === PENDING && i < length; i++) { this._eachEntry(_input[i], i); } }; Enumerator.prototype._eachEntry = function (entry, i) { var c = this._instanceConstructor; var resolve$$ = c.resolve; if (resolve$$ === resolve) { var _then = getThen(entry); if (_then === then && entry._state !== PENDING) { this._settledAt(entry._state, i, entry._result); } else if (typeof _then !== 'function') { this._remaining--; this._result[i] = entry; } else if (c === Promise) { var promise = new c(noop); handleMaybeThenable(promise, entry, _then); this._willSettleAt(promise, i); } else { this._willSettleAt(new c(function (resolve$$) { return resolve$$(entry); }), i); } } else { this._willSettleAt(resolve$$(entry), i); } }; Enumerator.prototype._settledAt = function (state, i, value) { var promise = this.promise; if (promise._state === PENDING) { this._remaining--; if (state === REJECTED) { _reject(promise, value); } else { this._result[i] = value; } } if (this._remaining === 0) { fulfill(promise, this._result); } }; Enumerator.prototype._willSettleAt = function (promise, i) { var enumerator = this; subscribe(promise, undefined, function (value) { return enumerator._settledAt(FULFILLED, i, value); }, function (reason) { return enumerator._settledAt(REJECTED, i, reason); }); }; /** `Promise.all` accepts an array of promises, and returns a new promise which is fulfilled with an array of fulfillment values for the passed promises, or rejected with the reason of the first passed promise to be rejected. It casts all elements of the passed iterable to promises as it runs this algorithm. Example: ```javascript let promise1 = resolve(1); let promise2 = resolve(2); let promise3 = resolve(3); let promises = [ promise1, promise2, promise3 ]; Promise.all(promises).then(function(array){ // The array here would be [ 1, 2, 3 ]; }); ``` If any of the `promises` given to `all` are rejected, the first promise that is rejected will be given as an argument to the returned promises's rejection handler. For example: Example: ```javascript let promise1 = resolve(1); let promise2 = reject(new Error("2")); let promise3 = reject(new Error("3")); let promises = [ promise1, promise2, promise3 ]; Promise.all(promises).then(function(array){ // Code here never runs because there are rejected promises! }, function(error) { // error.message === "2" }); ``` @method all @static @param {Array} entries array of promises @param {String} label optional string for labeling the promise. Useful for tooling. @return {Promise} promise that is fulfilled when all `promises` have been fulfilled, or rejected if any of them become rejected. @static */ function all(entries) { return new Enumerator(this, entries).promise; } /** `Promise.race` returns a new promise which is settled in the same way as the first passed promise to settle. Example: ```javascript let promise1 = new Promise(function(resolve, reject){ setTimeout(function(){ resolve('promise 1'); }, 200); }); let promise2 = new Promise(function(resolve, reject){ setTimeout(function(){ resolve('promise 2'); }, 100); }); Promise.race([promise1, promise2]).then(function(result){ // result === 'promise 2' because it was resolved before promise1 // was resolved. }); ``` `Promise.race` is deterministic in that only the state of the first settled promise matters. For example, even if other promises given to the `promises` array argument are resolved, but the first settled promise has become rejected before the other promises became fulfilled, the returned promise will become rejected: ```javascript let promise1 = new Promise(function(resolve, reject){ setTimeout(function(){ resolve('promise 1'); }, 200); }); let promise2 = new Promise(function(resolve, reject){ setTimeout(function(){ reject(new Error('promise 2')); }, 100); }); Promise.race([promise1, promise2]).then(function(result){ // Code here never runs }, function(reason){ // reason.message === 'promise 2' because promise 2 became rejected before // promise 1 became fulfilled }); ``` An example real-world use case is implementing timeouts: ```javascript Promise.race([ajax('foo.json'), timeout(5000)]) ``` @method race @static @param {Array} promises array of promises to observe Useful for tooling. @return {Promise} a promise which settles in the same way as the first passed promise to settle. */ function race(entries) { /*jshint validthis:true */ var Constructor = this; if (!isArray(entries)) { return new Constructor(function (_, reject) { return reject(new TypeError('You must pass an array to race.')); }); } else { return new Constructor(function (resolve, reject) { var length = entries.length; for (var i = 0; i < length; i++) { Constructor.resolve(entries[i]).then(resolve, reject); } }); } } /** `Promise.reject` returns a promise rejected with the passed `reason`. It is shorthand for the following: ```javascript let promise = new Promise(function(resolve, reject){ reject(new Error('WHOOPS')); }); promise.then(function(value){ // Code here doesn't run because the promise is rejected! }, function(reason){ // reason.message === 'WHOOPS' }); ``` Instead of writing the above, your code now simply becomes the following: ```javascript let promise = Promise.reject(new Error('WHOOPS')); promise.then(function(value){ // Code here doesn't run because the promise is rejected! }, function(reason){ // reason.message === 'WHOOPS' }); ``` @method reject @static @param {Any} reason value that the returned promise will be rejected with. Useful for tooling. @return {Promise} a promise rejected with the given `reason`. */ function reject(reason) { /*jshint validthis:true */ var Constructor = this; var promise = new Constructor(noop); _reject(promise, reason); return promise; } function needsResolver() { throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); } function needsNew() { throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); } /** Promise objects represent the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise's eventual value or the reason why the promise cannot be fulfilled. Terminology ----------- - `promise` is an object or function with a `then` method whose behavior conforms to this specification. - `thenable` is an object or function that defines a `then` method. - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). - `exception` is a value that is thrown using the throw statement. - `reason` is a value that indicates why a promise was rejected. - `settled` the final resting state of a promise, fulfilled or rejected. A promise can be in one of three states: pending, fulfilled, or rejected. Promises that are fulfilled have a fulfillment value and are in the fulfilled state. Promises that are rejected have a rejection reason and are in the rejected state. A fulfillment value is never a thenable. Promises can also be said to *resolve* a value. If this value is also a promise, then the original promise's settled state will match the value's settled state. So a promise that *resolves* a promise that rejects will itself reject, and a promise that *resolves* a promise that fulfills will itself fulfill. Basic Usage: ------------ ```js let promise = new Promise(function(resolve, reject) { // on success resolve(value); // on failure reject(reason); }); promise.then(function(value) { // on fulfillment }, function(reason) { // on rejection }); ``` Advanced Usage: --------------- Promises shine when abstracting away asynchronous interactions such as `XMLHttpRequest`s. ```js function getJSON(url) { return new Promise(function(resolve, reject){ let xhr = new XMLHttpRequest(); xhr.open('GET', url); xhr.onreadystatechange = handler; xhr.responseType = 'json'; xhr.setRequestHeader('Accept', 'application/json'); xhr.send(); function handler() { if (this.readyState === this.DONE) { if (this.status === 200) { resolve(this.response); } else { reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); } } }; }); } getJSON('/posts.json').then(function(json) { // on fulfillment }, function(reason) { // on rejection }); ``` Unlike callbacks, promises are great composable primitives. ```js Promise.all([ getJSON('/posts'), getJSON('/comments') ]).then(function(values){ values[0] // => postsJSON values[1] // => commentsJSON return values; }); ``` @class Promise @param {function} resolver Useful for tooling. @constructor */ function Promise(resolver) { this[PROMISE_ID] = nextId(); this._result = this._state = undefined; this._subscribers = []; if (noop !== resolver) { typeof resolver !== 'function' && needsResolver(); this instanceof Promise ? initializePromise(this, resolver) : needsNew(); } } Promise.all = all; Promise.race = race; Promise.resolve = resolve; Promise.reject = reject; Promise._setScheduler = setScheduler; Promise._setAsap = setAsap; Promise._asap = asap; Promise.prototype = { constructor: Promise, /** The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise's eventual value or the reason why the promise cannot be fulfilled. ```js findUser().then(function(user){ // user is available }, function(reason){ // user is unavailable, and you are given the reason why }); ``` Chaining -------- The return value of `then` is itself a promise. This second, 'downstream' promise is resolved with the return value of the first promise's fulfillment or rejection handler, or rejected if the handler throws an exception. ```js findUser().then(function (user) { return user.name; }, function (reason) { return 'default name'; }).then(function (userName) { // If `findUser` fulfilled, `userName` will be the user's name, otherwise it // will be `'default name'` }); findUser().then(function (user) { throw new Error('Found user, but still unhappy'); }, function (reason) { throw new Error('`findUser` rejected and we're unhappy'); }).then(function (value) { // never reached }, function (reason) { // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. }); ``` If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. ```js findUser().then(function (user) { throw new PedagogicalException('Upstream error'); }).then(function (value) { // never reached }).then(function (value) { // never reached }, function (reason) { // The `PedgagocialException` is propagated all the way down to here }); ``` Assimilation ------------ Sometimes the value you want to propagate to a downstream promise can only be retrieved asynchronously. This can be achieved by returning a promise in the fulfillment or rejection handler. The downstream promise will then be pending until the returned promise is settled. This is called *assimilation*. ```js findUser().then(function (user) { return findCommentsByAuthor(user); }).then(function (comments) { // The user's comments are now available }); ``` If the assimliated promise rejects, then the downstream promise will also reject. ```js findUser().then(function (user) { return findCommentsByAuthor(user); }).then(function (comments) { // If `findCommentsByAuthor` fulfills, we'll have the value here }, function (reason) { // If `findCommentsByAuthor` rejects, we'll have the reason here }); ``` Simple Example -------------- Synchronous Example ```javascript let result; try { result = findResult(); // success } catch(reason) { // failure } ``` Errback Example ```js findResult(function(result, err){ if (err) { // failure } else { // success } }); ``` Promise Example; ```javascript findResult().then(function(result){ // success }, function(reason){ // failure }); ``` Advanced Example -------------- Synchronous Example ```javascript let author, books; try { author = findAuthor(); books = findBooksByAuthor(author); // success } catch(reason) { // failure } ``` Errback Example ```js function foundBooks(books) { } function failure(reason) { } findAuthor(function(author, err){ if (err) { failure(err); // failure } else { try { findBoooksByAuthor(author, function(books, err) { if (err) { failure(err); } else { try { foundBooks(books); } catch(reason) { failure(reason); } } }); } catch(error) { failure(err); } // success } }); ``` Promise Example; ```javascript findAuthor(). then(findBooksByAuthor). then(function(books){ // found books }).catch(function(reason){ // something went wrong }); ``` @method then @param {Function} onFulfilled @param {Function} onRejected Useful for tooling. @return {Promise} */ then: then, /** `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same as the catch block of a try/catch statement. ```js function findAuthor(){ throw new Error('couldn't find that author'); } // synchronous try { findAuthor(); } catch(reason) { // something went wrong } // async with promises findAuthor().catch(function(reason){ // something went wrong }); ``` @method catch @param {Function} onRejection Useful for tooling. @return {Promise} */ 'catch': function _catch(onRejection) { return this.then(null, onRejection); } }; function polyfill() { var local = undefined; if (typeof global !== 'undefined') { local = global; } else if (typeof self !== 'undefined') { local = self; } else { try { local = Function('return this')(); } catch (e) { throw new Error('polyfill failed because global object is unavailable in this environment'); } } var P = local.Promise; if (P) { var promiseToString = null; try { promiseToString = Object.prototype.toString.call(P.resolve()); } catch (e) { // silently ignored } if (promiseToString === '[object Promise]' && !P.cast) { return; } } local.Promise = Promise; } // Strange compat.. Promise.polyfill = polyfill; Promise.Promise = Promise; return Promise; }))); //# sourceMappingURL=es6-promise.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(108), __webpack_require__(53))) /***/ }), /* 418 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {if (typeof window !== "undefined") { module.exports = window; } else if (typeof global !== "undefined") { module.exports = global; } else if (typeof self !== "undefined"){ module.exports = self; } else { module.exports = {}; } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(53))) /***/ }), /* 419 */ /***/ (function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil, nativeMax = Math.max; /** * The base implementation of `_.range` and `_.rangeRight` which doesn't * coerce arguments. * * @private * @param {number} start The start of the range. * @param {number} end The end of the range. * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Array} Returns the range of numbers. */ function baseRange(start, end, step, fromRight) { var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result = Array(length); while (length--) { result[fromRight ? length : ++index] = start; start += step; } return result; } module.exports = baseRange; /***/ }), /* 420 */ /***/ (function(module, exports, __webpack_require__) { var baseRange = __webpack_require__(419), isIterateeCall = __webpack_require__(213), toFinite = __webpack_require__(215); /** * Creates a `_.range` or `_.rangeRight` function. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new range function. */ function createRange(fromRight) { return function(start, end, step) { if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { end = step = undefined; } // Ensure the sign of `-0` is preserved. start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { end = toFinite(end); } step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); return baseRange(start, end, step, fromRight); }; } module.exports = createRange; /***/ }), /* 421 */ /***/ (function(module, exports, __webpack_require__) { var createRange = __webpack_require__(420); /** * Creates an array of numbers (positive and/or negative) progressing from * `start` up to, but not including, `end`. A step of `-1` is used if a negative * `start` is specified without an `end` or `step`. If `end` is not specified, * it's set to `start` with `start` then set to `0`. * * **Note:** JavaScript follows the IEEE-754 standard for resolving * floating-point values which can produce unexpected results. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. * @returns {Array} Returns the range of numbers. * @see _.inRange, _.rangeRight * @example * * _.range(4); * // => [0, 1, 2, 3] * * _.range(-4); * // => [0, -1, -2, -3] * * _.range(1, 5); * // => [1, 2, 3, 4] * * _.range(0, 20, 5); * // => [0, 5, 10, 15] * * _.range(0, -4, -1); * // => [0, -1, -2, -3] * * _.range(1, 4, 0); * // => [1, 1, 1] * * _.range(0); * // => [] */ var range = createRange(); module.exports = range; /***/ }), /* 422 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // modified from https://github.com/es-shims/es5-shim var has = Object.prototype.hasOwnProperty; var toStr = Object.prototype.toString; var slice = Array.prototype.slice; var isArgs = __webpack_require__(423); var isEnumerable = Object.prototype.propertyIsEnumerable; var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); var dontEnums = [ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor' ]; var equalsConstructorPrototype = function (o) { var ctor = o.constructor; return ctor && ctor.prototype === o; }; var excludedKeys = { $console: true, $external: true, $frame: true, $frameElement: true, $frames: true, $innerHeight: true, $innerWidth: true, $outerHeight: true, $outerWidth: true, $pageXOffset: true, $pageYOffset: true, $parent: true, $scrollLeft: true, $scrollTop: true, $scrollX: true, $scrollY: true, $self: true, $webkitIndexedDB: true, $webkitStorageInfo: true, $window: true }; var hasAutomationEqualityBug = (function () { /* global window */ if (typeof window === 'undefined') { return false; } for (var k in window) { try { if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { try { equalsConstructorPrototype(window[k]); } catch (e) { return true; } } } catch (e) { return true; } } return false; }()); var equalsConstructorPrototypeIfNotBuggy = function (o) { /* global window */ if (typeof window === 'undefined' || !hasAutomationEqualityBug) { return equalsConstructorPrototype(o); } try { return equalsConstructorPrototype(o); } catch (e) { return false; } }; var keysShim = function keys(object) { var isObject = object !== null && typeof object === 'object'; var isFunction = toStr.call(object) === '[object Function]'; var isArguments = isArgs(object); var isString = isObject && toStr.call(object) === '[object String]'; var theKeys = []; if (!isObject && !isFunction && !isArguments) { throw new TypeError('Object.keys called on a non-object'); } var skipProto = hasProtoEnumBug && isFunction; if (isString && object.length > 0 && !has.call(object, 0)) { for (var i = 0; i < object.length; ++i) { theKeys.push(String(i)); } } if (isArguments && object.length > 0) { for (var j = 0; j < object.length; ++j) { theKeys.push(String(j)); } } else { for (var name in object) { if (!(skipProto && name === 'prototype') && has.call(object, name)) { theKeys.push(String(name)); } } } if (hasDontEnumBug) { var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); for (var k = 0; k < dontEnums.length; ++k) { if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { theKeys.push(dontEnums[k]); } } } return theKeys; }; keysShim.shim = function shimObjectKeys() { if (Object.keys) { var keysWorksWithArguments = (function () { // Safari 5.0 bug return (Object.keys(arguments) || '').length === 2; }(1, 2)); if (!keysWorksWithArguments) { var originalKeys = Object.keys; Object.keys = function keys(object) { if (isArgs(object)) { return originalKeys(slice.call(object)); } else { return originalKeys(object); } }; } } else { Object.keys = keysShim; } return Object.keys || keysShim; }; module.exports = keysShim; /***/ }), /* 423 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var toStr = Object.prototype.toString; module.exports = function isArguments(value) { var str = toStr.call(value); var isArgs = str === '[object Arguments]'; if (!isArgs) { isArgs = str !== '[object Array]' && value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && toStr.call(value.callee) === '[object Function]'; } return isArgs; }; /***/ }), /* 424 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var stringifyPrimitive = function(v) { switch (typeof v) { case 'string': return v; case 'boolean': return v ? 'true' : 'false'; case 'number': return isFinite(v) ? v : ''; default: return ''; } }; module.exports = function(obj, sep, eq, name) { sep = sep || '&'; eq = eq || '='; if (obj === null) { obj = undefined; } if (typeof obj === 'object') { return map(objectKeys(obj), function(k) { var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; if (isArray(obj[k])) { return map(obj[k], function(v) { return ks + encodeURIComponent(stringifyPrimitive(v)); }).join(sep); } else { return ks + encodeURIComponent(stringifyPrimitive(obj[k])); } }).join(sep); } if (!name) return ''; return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); }; var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; function map (xs, f) { if (xs.map) return xs.map(f); var res = []; for (var i = 0; i < xs.length; i++) { res.push(f(xs[i], i)); } return res; } var objectKeys = Object.keys || function (obj) { var res = []; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); } return res; }; /***/ }), /* 425 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_425__; /***/ }), /* 426 */ /***/ (function(module, exports) { /* (ignored) */ /***/ }), /* 427 */, /* 428 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Panel = exports.Toggle = exports.Stats = exports.SortBy = exports.SearchBox = exports.ScrollTo = exports.ClearAll = exports.RefinementList = exports.StarRating = exports.RangeSlider = exports.RangeInput = exports.PoweredBy = exports.Pagination = exports.MultiRange = exports.Menu = exports.InfiniteHits = exports.HitsPerPage = exports.Hits = exports.Snippet = exports.Highlight = exports.HierarchicalMenu = exports.CurrentRefinements = exports.Configure = exports.Index = exports.InstantSearch = undefined; var _Configure = __webpack_require__(350); Object.defineProperty(exports, 'Configure', { enumerable: true, get: function get() { return _interopRequireDefault(_Configure).default; } }); var _CurrentRefinements = __webpack_require__(351); Object.defineProperty(exports, 'CurrentRefinements', { enumerable: true, get: function get() { return _interopRequireDefault(_CurrentRefinements).default; } }); var _HierarchicalMenu = __webpack_require__(352); Object.defineProperty(exports, 'HierarchicalMenu', { enumerable: true, get: function get() { return _interopRequireDefault(_HierarchicalMenu).default; } }); var _Highlight = __webpack_require__(231); Object.defineProperty(exports, 'Highlight', { enumerable: true, get: function get() { return _interopRequireDefault(_Highlight).default; } }); var _Snippet = __webpack_require__(366); Object.defineProperty(exports, 'Snippet', { enumerable: true, get: function get() { return _interopRequireDefault(_Snippet).default; } }); var _Hits = __webpack_require__(353); Object.defineProperty(exports, 'Hits', { enumerable: true, get: function get() { return _interopRequireDefault(_Hits).default; } }); var _HitsPerPage = __webpack_require__(354); Object.defineProperty(exports, 'HitsPerPage', { enumerable: true, get: function get() { return _interopRequireDefault(_HitsPerPage).default; } }); var _InfiniteHits = __webpack_require__(355); Object.defineProperty(exports, 'InfiniteHits', { enumerable: true, get: function get() { return _interopRequireDefault(_InfiniteHits).default; } }); var _Menu = __webpack_require__(356); Object.defineProperty(exports, 'Menu', { enumerable: true, get: function get() { return _interopRequireDefault(_Menu).default; } }); var _MultiRange = __webpack_require__(357); Object.defineProperty(exports, 'MultiRange', { enumerable: true, get: function get() { return _interopRequireDefault(_MultiRange).default; } }); var _Pagination = __webpack_require__(358); Object.defineProperty(exports, 'Pagination', { enumerable: true, get: function get() { return _interopRequireDefault(_Pagination).default; } }); var _PoweredBy = __webpack_require__(360); Object.defineProperty(exports, 'PoweredBy', { enumerable: true, get: function get() { return _interopRequireDefault(_PoweredBy).default; } }); var _RangeInput = __webpack_require__(361); Object.defineProperty(exports, 'RangeInput', { enumerable: true, get: function get() { return _interopRequireDefault(_RangeInput).default; } }); var _RangeSlider = __webpack_require__(362); Object.defineProperty(exports, 'RangeSlider', { enumerable: true, get: function get() { return _interopRequireDefault(_RangeSlider).default; } }); var _StarRating = __webpack_require__(368); Object.defineProperty(exports, 'StarRating', { enumerable: true, get: function get() { return _interopRequireDefault(_StarRating).default; } }); var _RefinementList = __webpack_require__(363); Object.defineProperty(exports, 'RefinementList', { enumerable: true, get: function get() { return _interopRequireDefault(_RefinementList).default; } }); var _ClearAll = __webpack_require__(349); Object.defineProperty(exports, 'ClearAll', { enumerable: true, get: function get() { return _interopRequireDefault(_ClearAll).default; } }); var _ScrollTo = __webpack_require__(364); Object.defineProperty(exports, 'ScrollTo', { enumerable: true, get: function get() { return _interopRequireDefault(_ScrollTo).default; } }); var _SearchBox = __webpack_require__(365); Object.defineProperty(exports, 'SearchBox', { enumerable: true, get: function get() { return _interopRequireDefault(_SearchBox).default; } }); var _SortBy = __webpack_require__(367); Object.defineProperty(exports, 'SortBy', { enumerable: true, get: function get() { return _interopRequireDefault(_SortBy).default; } }); var _Stats = __webpack_require__(369); Object.defineProperty(exports, 'Stats', { enumerable: true, get: function get() { return _interopRequireDefault(_Stats).default; } }); var _Toggle = __webpack_require__(370); Object.defineProperty(exports, 'Toggle', { enumerable: true, get: function get() { return _interopRequireDefault(_Toggle).default; } }); var _Panel = __webpack_require__(359); Object.defineProperty(exports, 'Panel', { enumerable: true, get: function get() { return _interopRequireDefault(_Panel).default; } }); var _createInstantSearch = __webpack_require__(348); var _createInstantSearch2 = _interopRequireDefault(_createInstantSearch); var _createIndex = __webpack_require__(347); var _createIndex2 = _interopRequireDefault(_createIndex); var _lite = __webpack_require__(371); var _lite2 = _interopRequireDefault(_lite); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var InstantSearch = (0, _createInstantSearch2.default)(_lite2.default, { Root: 'div', props: { className: 'ais-InstantSearch__root' } }); exports.InstantSearch = InstantSearch; var Index = (0, _createIndex2.default)({ Root: 'div', props: { className: 'ais-MultiIndex__root' } }); exports.Index = Index; /***/ }) /******/ ]); }); //# sourceMappingURL=Dom.js.map
ajax/libs/boardgame-io/0.49.5/esm/react.js
cdnjs/cdnjs
import 'nanoid/non-secure'; import './Debug-8ca6996f.js'; import 'redux'; import './turn-order-406c4349.js'; import 'immer'; import 'lodash.isplainobject'; import './reducer-95b86815.js'; import 'rfc6902'; import './initialize-6ecd151b.js'; import './transport-ce07b771.js'; import { C as Client$1 } from './client-b9540450.js'; import 'flatted'; import 'setimmediate'; import { M as MCTSBot } from './ai-763ecd6c.js'; import { L as LobbyClient } from './client-5f57c3f2.js'; import React from 'react'; import PropTypes from 'prop-types'; import Cookies from 'react-cookies'; import './util-93cda368.js'; import { S as SocketIO, L as Local } from './socketio-195158e7.js'; import './master-3e35d48c.js'; import './filter-player-view-7cb2b79d.js'; import 'socket.io-client'; /* * Copyright 2017 The boardgame.io Authors * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ /** * Client * * boardgame.io React client. * * @param {...object} game - The return value of `Game`. * @param {...object} numPlayers - The number of players. * @param {...object} board - The React component for the game. * @param {...object} loading - (optional) The React component for the loading state. * @param {...object} multiplayer - Set to a falsy value or a transportFactory, e.g., SocketIO() * @param {...object} debug - Enables the Debug UI. * @param {...object} enhancer - Optional enhancer to send to the Redux store * * Returns: * A React component that wraps board and provides an * API through props for it to interact with the framework * and dispatch actions such as MAKE_MOVE, GAME_EVENT, RESET, * UNDO and REDO. */ function Client(opts) { var _a; const { game, numPlayers, board, multiplayer, enhancer } = opts; let { loading, debug } = opts; // Component that is displayed before the client has synced // with the game master. if (loading === undefined) { const Loading = () => React.createElement("div", { className: "bgio-loading" }, "connecting..."); loading = Loading; } /* * WrappedBoard * * The main React component that wraps the passed in * board component and adds the API to its props. */ return _a = class WrappedBoard extends React.Component { constructor(props) { super(props); if (debug === undefined) { debug = props.debug; } this.client = Client$1({ game, debug, numPlayers, multiplayer, matchID: props.matchID, playerID: props.playerID, credentials: props.credentials, enhancer, }); } componentDidMount() { this.unsubscribe = this.client.subscribe(() => this.forceUpdate()); this.client.start(); } componentWillUnmount() { this.client.stop(); this.unsubscribe(); } componentDidUpdate(prevProps) { if (this.props.matchID != prevProps.matchID) { this.client.updateMatchID(this.props.matchID); } if (this.props.playerID != prevProps.playerID) { this.client.updatePlayerID(this.props.playerID); } if (this.props.credentials != prevProps.credentials) { this.client.updateCredentials(this.props.credentials); } } render() { const state = this.client.getState(); if (state === null) { return React.createElement(loading); } let _board = null; if (board) { _board = React.createElement(board, { ...state, ...this.props, isMultiplayer: !!multiplayer, moves: this.client.moves, events: this.client.events, matchID: this.client.matchID, playerID: this.client.playerID, reset: this.client.reset, undo: this.client.undo, redo: this.client.redo, log: this.client.log, matchData: this.client.matchData, sendChatMessage: this.client.sendChatMessage, chatMessages: this.client.chatMessages, }); } return React.createElement("div", { className: "bgio-client" }, _board); } }, _a.propTypes = { // The ID of a game to connect to. // Only relevant in multiplayer. matchID: PropTypes.string, // The ID of the player associated with this client. // Only relevant in multiplayer. playerID: PropTypes.string, // This client's authentication credentials. // Only relevant in multiplayer. credentials: PropTypes.string, // Enable / disable the Debug UI. debug: PropTypes.any, }, _a.defaultProps = { matchID: 'default', playerID: null, credentials: null, debug: true, }, _a; } /* * Copyright 2018 The boardgame.io Authors * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ class _LobbyConnectionImpl { constructor({ server, gameComponents, playerName, playerCredentials, }) { this.client = new LobbyClient({ server }); this.gameComponents = gameComponents; this.playerName = playerName || 'Visitor'; this.playerCredentials = playerCredentials; this.matches = []; } async refresh() { try { this.matches = []; const games = await this.client.listGames(); for (const game of games) { if (!this._getGameComponents(game)) continue; const { matches } = await this.client.listMatches(game); this.matches.push(...matches); } } catch (error) { throw new Error('failed to retrieve list of matches (' + error + ')'); } } _getMatchInstance(matchID) { for (const inst of this.matches) { if (inst['matchID'] === matchID) return inst; } } _getGameComponents(gameName) { for (const comp of this.gameComponents) { if (comp.game.name === gameName) return comp; } } _findPlayer(playerName) { for (const inst of this.matches) { if (inst.players.some((player) => player.name === playerName)) return inst; } } async join(gameName, matchID, playerID) { try { let inst = this._findPlayer(this.playerName); if (inst) { throw new Error('player has already joined ' + inst.matchID); } inst = this._getMatchInstance(matchID); if (!inst) { throw new Error('game instance ' + matchID + ' not found'); } const json = await this.client.joinMatch(gameName, matchID, { playerID, playerName: this.playerName, }); inst.players[Number.parseInt(playerID)].name = this.playerName; this.playerCredentials = json.playerCredentials; } catch (error) { throw new Error('failed to join match ' + matchID + ' (' + error + ')'); } } async leave(gameName, matchID) { try { const inst = this._getMatchInstance(matchID); if (!inst) throw new Error('match instance not found'); for (const player of inst.players) { if (player.name === this.playerName) { await this.client.leaveMatch(gameName, matchID, { playerID: player.id.toString(), credentials: this.playerCredentials, }); delete player.name; delete this.playerCredentials; return; } } throw new Error('player not found in match'); } catch (error) { throw new Error('failed to leave match ' + matchID + ' (' + error + ')'); } } async disconnect() { const inst = this._findPlayer(this.playerName); if (inst) { await this.leave(inst.gameName, inst.matchID); } this.matches = []; this.playerName = 'Visitor'; } async create(gameName, numPlayers) { try { const comp = this._getGameComponents(gameName); if (!comp) throw new Error('game not found'); if (numPlayers < comp.game.minPlayers || numPlayers > comp.game.maxPlayers) throw new Error('invalid number of players ' + numPlayers); await this.client.createMatch(gameName, { numPlayers }); } catch (error) { throw new Error('failed to create match for ' + gameName + ' (' + error + ')'); } } } /** * LobbyConnection * * Lobby model. * * @param {string} server - '<host>:<port>' of the server. * @param {Array} gameComponents - A map of Board and Game objects for the supported games. * @param {string} playerName - The name of the player. * @param {string} playerCredentials - The credentials currently used by the player, if any. * * Returns: * A JS object that synchronizes the list of running game instances with the server and provides an API to create/join/start instances. */ function LobbyConnection(opts) { return new _LobbyConnectionImpl(opts); } /* * Copyright 2018 The boardgame.io Authors. * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ class LobbyLoginForm extends React.Component { constructor() { super(...arguments); this.state = { playerName: this.props.playerName, nameErrorMsg: '', }; this.onClickEnter = () => { if (this.state.playerName === '') return; this.props.onEnter(this.state.playerName); }; this.onKeyPress = (event) => { if (event.key === 'Enter') { this.onClickEnter(); } }; this.onChangePlayerName = (event) => { const name = event.target.value.trim(); this.setState({ playerName: name, nameErrorMsg: name.length > 0 ? '' : 'empty player name', }); }; } render() { return (React.createElement("div", null, React.createElement("p", { className: "phase-title" }, "Choose a player name:"), React.createElement("input", { type: "text", value: this.state.playerName, onChange: this.onChangePlayerName, onKeyPress: this.onKeyPress }), React.createElement("span", { className: "buttons" }, React.createElement("button", { className: "buttons", onClick: this.onClickEnter }, "Enter")), React.createElement("br", null), React.createElement("span", { className: "error-msg" }, this.state.nameErrorMsg, React.createElement("br", null)))); } } LobbyLoginForm.defaultProps = { playerName: '', }; /* * Copyright 2018 The boardgame.io Authors. * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ class LobbyMatchInstance extends React.Component { constructor() { super(...arguments); this._createSeat = (player) => { return player.name || '[free]'; }; this._createButtonJoin = (inst, seatId) => (React.createElement("button", { key: 'button-join-' + inst.matchID, onClick: () => this.props.onClickJoin(inst.gameName, inst.matchID, '' + seatId) }, "Join")); this._createButtonLeave = (inst) => (React.createElement("button", { key: 'button-leave-' + inst.matchID, onClick: () => this.props.onClickLeave(inst.gameName, inst.matchID) }, "Leave")); this._createButtonPlay = (inst, seatId) => (React.createElement("button", { key: 'button-play-' + inst.matchID, onClick: () => this.props.onClickPlay(inst.gameName, { matchID: inst.matchID, playerID: '' + seatId, numPlayers: inst.players.length, }) }, "Play")); this._createButtonSpectate = (inst) => (React.createElement("button", { key: 'button-spectate-' + inst.matchID, onClick: () => this.props.onClickPlay(inst.gameName, { matchID: inst.matchID, numPlayers: inst.players.length, }) }, "Spectate")); this._createInstanceButtons = (inst) => { const playerSeat = inst.players.find((player) => player.name === this.props.playerName); const freeSeat = inst.players.find((player) => !player.name); if (playerSeat && freeSeat) { // already seated: waiting for match to start return this._createButtonLeave(inst); } if (freeSeat) { // at least 1 seat is available return this._createButtonJoin(inst, freeSeat.id); } // match is full if (playerSeat) { return (React.createElement("div", null, [ this._createButtonPlay(inst, playerSeat.id), this._createButtonLeave(inst), ])); } // allow spectating return this._createButtonSpectate(inst); }; } render() { const match = this.props.match; let status = 'OPEN'; if (!match.players.some((player) => !player.name)) { status = 'RUNNING'; } return (React.createElement("tr", { key: 'line-' + match.matchID }, React.createElement("td", { key: 'cell-name-' + match.matchID }, match.gameName), React.createElement("td", { key: 'cell-status-' + match.matchID }, status), React.createElement("td", { key: 'cell-seats-' + match.matchID }, match.players.map((player) => this._createSeat(player)).join(', ')), React.createElement("td", { key: 'cell-buttons-' + match.matchID }, this._createInstanceButtons(match)))); } } /* * Copyright 2018 The boardgame.io Authors. * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ class LobbyCreateMatchForm extends React.Component { constructor(props) { super(props); this.state = { selectedGame: 0, numPlayers: 2, }; this._createGameNameOption = (game, idx) => { return (React.createElement("option", { key: 'name-option-' + idx, value: idx }, game.game.name)); }; this._createNumPlayersOption = (idx) => { return (React.createElement("option", { key: 'num-option-' + idx, value: idx }, idx)); }; this._createNumPlayersRange = (game) => { return Array.from({ length: game.maxPlayers + 1 }) .map((_, i) => i) .slice(game.minPlayers); }; this.onChangeNumPlayers = (event) => { this.setState({ numPlayers: Number.parseInt(event.target.value), }); }; this.onChangeSelectedGame = (event) => { const idx = Number.parseInt(event.target.value); this.setState({ selectedGame: idx, numPlayers: this.props.games[idx].game.minPlayers, }); }; this.onClickCreate = () => { this.props.createMatch(this.props.games[this.state.selectedGame].game.name, this.state.numPlayers); }; /* fix min and max number of players */ for (const game of props.games) { const matchDetails = game.game; if (!matchDetails.minPlayers) { matchDetails.minPlayers = 1; } if (!matchDetails.maxPlayers) { matchDetails.maxPlayers = 4; } console.assert(matchDetails.maxPlayers >= matchDetails.minPlayers); } this.state = { selectedGame: 0, numPlayers: props.games[0].game.minPlayers, }; } render() { return (React.createElement("div", null, React.createElement("select", { value: this.state.selectedGame, onChange: (evt) => this.onChangeSelectedGame(evt) }, this.props.games.map((game, index) => this._createGameNameOption(game, index))), React.createElement("span", null, "Players:"), React.createElement("select", { value: this.state.numPlayers, onChange: this.onChangeNumPlayers }, this._createNumPlayersRange(this.props.games[this.state.selectedGame].game).map((number) => this._createNumPlayersOption(number))), React.createElement("span", { className: "buttons" }, React.createElement("button", { onClick: this.onClickCreate }, "Create")))); } } /* * Copyright 2018 The boardgame.io Authors. * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ var LobbyPhases; (function (LobbyPhases) { LobbyPhases["ENTER"] = "enter"; LobbyPhases["PLAY"] = "play"; LobbyPhases["LIST"] = "list"; })(LobbyPhases || (LobbyPhases = {})); /** * Lobby * * React lobby component. * * @param {Array} gameComponents - An array of Board and Game objects for the supported games. * @param {string} lobbyServer - Address of the lobby server (for example 'localhost:8000'). * If not set, defaults to the server that served the page. * @param {string} gameServer - Address of the game server (for example 'localhost:8001'). * If not set, defaults to the server that served the page. * @param {function} clientFactory - Function that is used to create the game clients. * @param {number} refreshInterval - Interval between server updates (default: 2000ms). * @param {bool} debug - Enable debug information (default: false). * * Returns: * A React component that provides a UI to create, list, join, leave, play or * spectate matches (game instances). */ class Lobby extends React.Component { constructor(props) { super(props); this.state = { phase: LobbyPhases.ENTER, playerName: 'Visitor', runningMatch: null, errorMsg: '', credentialStore: {}, }; this._createConnection = (props) => { const name = this.state.playerName; this.connection = LobbyConnection({ server: props.lobbyServer, gameComponents: props.gameComponents, playerName: name, playerCredentials: this.state.credentialStore[name], }); }; this._updateCredentials = (playerName, credentials) => { this.setState((prevState) => { // clone store or componentDidUpdate will not be triggered const store = Object.assign({}, prevState.credentialStore); store[playerName] = credentials; return { credentialStore: store }; }); }; this._updateConnection = async () => { await this.connection.refresh(); this.forceUpdate(); }; this._enterLobby = (playerName) => { this.setState({ playerName, phase: LobbyPhases.LIST }); }; this._exitLobby = async () => { await this.connection.disconnect(); this.setState({ phase: LobbyPhases.ENTER, errorMsg: '' }); }; this._createMatch = async (gameName, numPlayers) => { try { await this.connection.create(gameName, numPlayers); await this.connection.refresh(); // rerender this.setState({}); } catch (error) { this.setState({ errorMsg: error.message }); } }; this._joinMatch = async (gameName, matchID, playerID) => { try { await this.connection.join(gameName, matchID, playerID); await this.connection.refresh(); this._updateCredentials(this.connection.playerName, this.connection.playerCredentials); } catch (error) { this.setState({ errorMsg: error.message }); } }; this._leaveMatch = async (gameName, matchID) => { try { await this.connection.leave(gameName, matchID); await this.connection.refresh(); this._updateCredentials(this.connection.playerName, this.connection.playerCredentials); } catch (error) { this.setState({ errorMsg: error.message }); } }; this._startMatch = (gameName, matchOpts) => { const gameCode = this.connection._getGameComponents(gameName); if (!gameCode) { this.setState({ errorMsg: 'game ' + gameName + ' not supported', }); return; } let multiplayer = undefined; if (matchOpts.numPlayers > 1) { multiplayer = this.props.gameServer ? SocketIO({ server: this.props.gameServer }) : SocketIO(); } if (matchOpts.numPlayers == 1) { const maxPlayers = gameCode.game.maxPlayers; const bots = {}; for (let i = 1; i < maxPlayers; i++) { bots[i + ''] = MCTSBot; } multiplayer = Local({ bots }); } const app = this.props.clientFactory({ game: gameCode.game, board: gameCode.board, debug: this.props.debug, multiplayer, }); const match = { app: app, matchID: matchOpts.matchID, playerID: matchOpts.numPlayers > 1 ? matchOpts.playerID : '0', credentials: this.connection.playerCredentials, }; this.setState({ phase: LobbyPhases.PLAY, runningMatch: match }); }; this._exitMatch = () => { this.setState({ phase: LobbyPhases.LIST, runningMatch: null }); }; this._getPhaseVisibility = (phase) => { return this.state.phase !== phase ? 'hidden' : 'phase'; }; this.renderMatches = (matches, playerName) => { return matches.map((match) => { const { matchID, gameName, players } = match; return (React.createElement(LobbyMatchInstance, { key: 'instance-' + matchID, match: { matchID, gameName, players: Object.values(players) }, playerName: playerName, onClickJoin: this._joinMatch, onClickLeave: this._leaveMatch, onClickPlay: this._startMatch })); }); }; this._createConnection(this.props); } componentDidMount() { const cookie = Cookies.load('lobbyState') || {}; if (cookie.phase && cookie.phase === LobbyPhases.PLAY) { cookie.phase = LobbyPhases.LIST; } this.setState({ phase: cookie.phase || LobbyPhases.ENTER, playerName: cookie.playerName || 'Visitor', credentialStore: cookie.credentialStore || {}, }); this._startRefreshInterval(); } componentDidUpdate(prevProps, prevState) { const name = this.state.playerName; const creds = this.state.credentialStore[name]; if (prevState.phase !== this.state.phase || prevState.credentialStore[name] !== creds || prevState.playerName !== name) { this._createConnection(this.props); this._updateConnection(); const cookie = { phase: this.state.phase, playerName: name, credentialStore: this.state.credentialStore, }; Cookies.save('lobbyState', cookie, { path: '/' }); } if (prevProps.refreshInterval !== this.props.refreshInterval) { this._startRefreshInterval(); } } componentWillUnmount() { this._clearRefreshInterval(); } _startRefreshInterval() { this._clearRefreshInterval(); this._currentInterval = setInterval(this._updateConnection, this.props.refreshInterval); } _clearRefreshInterval() { clearInterval(this._currentInterval); } render() { const { gameComponents, renderer } = this.props; const { errorMsg, playerName, phase, runningMatch } = this.state; if (renderer) { return renderer({ errorMsg, gameComponents, matches: this.connection.matches, phase, playerName, runningMatch, handleEnterLobby: this._enterLobby, handleExitLobby: this._exitLobby, handleCreateMatch: this._createMatch, handleJoinMatch: this._joinMatch, handleLeaveMatch: this._leaveMatch, handleExitMatch: this._exitMatch, handleRefreshMatches: this._updateConnection, handleStartMatch: this._startMatch, }); } return (React.createElement("div", { id: "lobby-view", style: { padding: 50 } }, React.createElement("div", { className: this._getPhaseVisibility(LobbyPhases.ENTER) }, React.createElement(LobbyLoginForm, { key: playerName, playerName: playerName, onEnter: this._enterLobby })), React.createElement("div", { className: this._getPhaseVisibility(LobbyPhases.LIST) }, React.createElement("p", null, "Welcome, ", playerName), React.createElement("div", { className: "phase-title", id: "match-creation" }, React.createElement("span", null, "Create a match:"), React.createElement(LobbyCreateMatchForm, { games: gameComponents, createMatch: this._createMatch })), React.createElement("p", { className: "phase-title" }, "Join a match:"), React.createElement("div", { id: "instances" }, React.createElement("table", null, React.createElement("tbody", null, this.renderMatches(this.connection.matches, playerName))), React.createElement("span", { className: "error-msg" }, errorMsg, React.createElement("br", null))), React.createElement("p", { className: "phase-title" }, "Matches that become empty are automatically deleted.")), React.createElement("div", { className: this._getPhaseVisibility(LobbyPhases.PLAY) }, runningMatch && (React.createElement(runningMatch.app, { matchID: runningMatch.matchID, playerID: runningMatch.playerID, credentials: runningMatch.credentials })), React.createElement("div", { className: "buttons", id: "match-exit" }, React.createElement("button", { onClick: this._exitMatch }, "Exit match"))), React.createElement("div", { className: "buttons", id: "lobby-exit" }, React.createElement("button", { onClick: this._exitLobby }, "Exit lobby")))); } } Lobby.propTypes = { gameComponents: PropTypes.array.isRequired, lobbyServer: PropTypes.string, gameServer: PropTypes.string, debug: PropTypes.bool, clientFactory: PropTypes.func, refreshInterval: PropTypes.number, }; Lobby.defaultProps = { debug: false, clientFactory: Client, refreshInterval: 2000, }; export { Client, Lobby };
ajax/libs/react-native-web/0.13.5/exports/Button/index.js
cdnjs/cdnjs
/** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import StyleSheet from '../StyleSheet'; import TouchableOpacity from '../TouchableOpacity'; import Text from '../Text'; import React from 'react'; export default function Button(props) { var accessibilityLabel = props.accessibilityLabel, color = props.color, disabled = props.disabled, onPress = props.onPress, testID = props.testID, title = props.title; return React.createElement(TouchableOpacity, { accessibilityLabel: accessibilityLabel, accessibilityRole: "button", disabled: disabled, onPress: onPress, style: [styles.button, color && { backgroundColor: color }, disabled && styles.buttonDisabled], testID: testID }, React.createElement(Text, { style: [styles.text, disabled && styles.textDisabled] }, title)); } var styles = StyleSheet.create({ button: { backgroundColor: '#2196F3', borderRadius: 2 }, text: { color: '#fff', fontWeight: '500', padding: 8, textAlign: 'center', textTransform: 'uppercase' }, buttonDisabled: { backgroundColor: '#dfdfdf' }, textDisabled: { color: '#a1a1a1' } });
ajax/libs/primereact/7.2.1/fileupload/fileupload.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { Button } from 'primereact/button'; import { Messages } from 'primereact/messages'; import { ProgressBar } from 'primereact/progressbar'; import { DomHandler, classNames, IconUtils, ObjectUtils } from 'primereact/utils'; import { Ripple } from 'primereact/ripple'; import { localeOption } from 'primereact/api'; function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$1(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread(); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var FileUpload = /*#__PURE__*/function (_Component) { _inherits(FileUpload, _Component); var _super = _createSuper(FileUpload); function FileUpload(props) { var _this; _classCallCheck(this, FileUpload); _this = _super.call(this, props); _this.state = { files: [], msgs: [], focused: false, progress: 0 }; _this.choose = _this.choose.bind(_assertThisInitialized(_this)); _this.upload = _this.upload.bind(_assertThisInitialized(_this)); _this.clear = _this.clear.bind(_assertThisInitialized(_this)); _this.onFileSelect = _this.onFileSelect.bind(_assertThisInitialized(_this)); _this.onDragEnter = _this.onDragEnter.bind(_assertThisInitialized(_this)); _this.onDragOver = _this.onDragOver.bind(_assertThisInitialized(_this)); _this.onDragLeave = _this.onDragLeave.bind(_assertThisInitialized(_this)); _this.onDrop = _this.onDrop.bind(_assertThisInitialized(_this)); _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this)); _this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this)); _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this)); _this.onSimpleUploaderClick = _this.onSimpleUploaderClick.bind(_assertThisInitialized(_this)); _this.duplicateIEEvent = false; return _this; } _createClass(FileUpload, [{ key: "hasFiles", value: function hasFiles() { return this.state.files && this.state.files.length > 0; } }, { key: "isImage", value: function isImage(file) { return /^image\//.test(file.type); } }, { key: "chooseDisabled", value: function chooseDisabled() { return this.props.disabled || this.props.fileLimit && this.props.fileLimit <= this.state.files.length + this.uploadedFileCount; } }, { key: "uploadDisabled", value: function uploadDisabled() { return this.props.disabled || !this.hasFiles(); } }, { key: "cancelDisabled", value: function cancelDisabled() { return this.props.disabled || !this.hasFiles(); } }, { key: "chooseButtonLabel", value: function chooseButtonLabel() { return this.props.chooseLabel || this.props.chooseOptions.label || localeOption('choose'); } }, { key: "uploadButtonLabel", value: function uploadButtonLabel() { return this.props.uploadLabel || this.props.uploadOptions.label || localeOption('upload'); } }, { key: "cancelButtonLabel", value: function cancelButtonLabel() { return this.props.cancelLabel || this.props.cancelOptions.label || localeOption('cancel'); } }, { key: "remove", value: function remove(event, index) { this.clearInputElement(); var currentFiles = _toConsumableArray(this.state.files); var removedFile = this.state.files[index]; currentFiles.splice(index, 1); this.setState({ files: currentFiles }); if (this.props.onRemove) { this.props.onRemove({ originalEvent: event, file: removedFile }); } } }, { key: "clearInputElement", value: function clearInputElement() { if (this.fileInput) { this.fileInput.value = ''; } } }, { key: "clearIEInput", value: function clearIEInput() { if (this.fileInput) { this.duplicateIEEvent = true; //IE11 fix to prevent onFileChange trigger again this.fileInput.value = ''; } } }, { key: "formatSize", value: function formatSize(bytes) { if (bytes === 0) { return '0 B'; } var k = 1000, dm = 3, sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; } }, { key: "onFileSelect", value: function onFileSelect(event) { var _this2 = this; if (event.type !== 'drop' && this.isIE11() && this.duplicateIEEvent) { this.duplicateIEEvent = false; return; } this.setState({ msgs: [] }); this.files = this.state.files ? _toConsumableArray(this.state.files) : []; var files = event.dataTransfer ? event.dataTransfer.files : event.target.files; for (var i = 0; i < files.length; i++) { var file = files[i]; if (!this.isFileSelected(file)) { if (this.validate(file)) { if (this.isImage(file)) { file.objectURL = window.URL.createObjectURL(file); } this.files.push(file); } } } this.setState({ files: this.files }, function () { if (_this2.hasFiles() && _this2.props.auto) { _this2.upload(); } }); if (this.props.onSelect) { this.props.onSelect({ originalEvent: event, files: files }); } if (event.type !== 'drop' && this.isIE11()) { this.clearIEInput(); } else { this.clearInputElement(); } if (this.props.mode === 'basic' && this.files.length > 0) { this.fileInput.style.display = 'none'; } } }, { key: "isFileSelected", value: function isFileSelected(file) { var _iterator = _createForOfIteratorHelper(this.state.files), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var sFile = _step.value; if (sFile.name + sFile.type + sFile.size === file.name + file.type + file.size) return true; } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } return false; } }, { key: "isIE11", value: function isIE11() { return !!window['MSInputMethodContext'] && !!document['documentMode']; } }, { key: "validate", value: function validate(file) { if (this.props.maxFileSize && file.size > this.props.maxFileSize) { var message = { severity: 'error', summary: this.props.invalidFileSizeMessageSummary.replace('{0}', file.name), detail: this.props.invalidFileSizeMessageDetail.replace('{0}', this.formatSize(this.props.maxFileSize)) }; if (this.props.mode === 'advanced') { this.messagesUI.show(message); } if (this.props.onValidationFail) { this.props.onValidationFail(file); } return false; } return true; } }, { key: "upload", value: function upload() { var _this3 = this; if (this.props.customUpload) { if (this.props.fileLimit) { this.uploadedFileCount += this.state.files.length; } if (this.props.uploadHandler) { this.props.uploadHandler({ files: this.state.files, options: { clear: this.clear, props: this.props } }); } } else { this.setState({ msgs: [] }); var xhr = new XMLHttpRequest(); var formData = new FormData(); if (this.props.onBeforeUpload) { this.props.onBeforeUpload({ 'xhr': xhr, 'formData': formData }); } var _iterator2 = _createForOfIteratorHelper(this.state.files), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var file = _step2.value; formData.append(this.props.name, file, file.name); } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } xhr.upload.addEventListener('progress', function (event) { if (event.lengthComputable) { _this3.setState({ progress: Math.round(event.loaded * 100 / event.total) }, function () { if (_this3.props.onProgress) { _this3.props.onProgress({ originalEvent: event, progress: _this3.state.progress }); } }); } }); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { _this3.setState({ progress: 0 }); if (xhr.status >= 200 && xhr.status < 300) { if (_this3.props.fileLimit) { _this3.uploadedFileCount += _this3.state.files.length; } if (_this3.props.onUpload) { _this3.props.onUpload({ xhr: xhr, files: _this3.state.files }); } } else { if (_this3.props.onError) { _this3.props.onError({ xhr: xhr, files: _this3.state.files }); } } _this3.clear(); } }; xhr.open('POST', this.props.url, true); if (this.props.onBeforeSend) { this.props.onBeforeSend({ 'xhr': xhr, 'formData': formData }); } xhr.withCredentials = this.props.withCredentials; xhr.send(formData); } } }, { key: "clear", value: function clear() { this.setState({ files: [] }); if (this.props.onClear) { this.props.onClear(); } this.clearInputElement(); } }, { key: "choose", value: function choose() { this.fileInput.click(); } }, { key: "onFocus", value: function onFocus() { this.setState({ focused: true }); } }, { key: "onBlur", value: function onBlur() { this.setState({ focused: false }); } }, { key: "onKeyDown", value: function onKeyDown(event) { if (event.which === 13) { // enter this.choose(); } } }, { key: "onDragEnter", value: function onDragEnter(event) { if (!this.props.disabled) { event.dataTransfer.dropEffect = "copy"; event.stopPropagation(); event.preventDefault(); } } }, { key: "onDragOver", value: function onDragOver(event) { if (!this.props.disabled) { event.dataTransfer.dropEffect = "copy"; DomHandler.addClass(this.content, 'p-fileupload-highlight'); event.stopPropagation(); event.preventDefault(); } } }, { key: "onDragLeave", value: function onDragLeave(event) { if (!this.props.disabled) { event.dataTransfer.dropEffect = "copy"; DomHandler.removeClass(this.content, 'p-fileupload-highlight'); } } }, { key: "onDrop", value: function onDrop(event) { if (!this.props.disabled) { DomHandler.removeClass(this.content, 'p-fileupload-highlight'); event.stopPropagation(); event.preventDefault(); var files = event.dataTransfer ? event.dataTransfer.files : event.target.files; var allowDrop = this.props.multiple || files && files.length === 0; if (allowDrop) { this.onFileSelect(event); } } } }, { key: "onSimpleUploaderClick", value: function onSimpleUploaderClick() { if (this.hasFiles()) { this.upload(); } else { this.fileInput.click(); } } }, { key: "renderChooseButton", value: function renderChooseButton() { var _this4 = this; var _this$props$chooseOpt = this.props.chooseOptions, className = _this$props$chooseOpt.className, style = _this$props$chooseOpt.style, icon = _this$props$chooseOpt.icon, iconOnly = _this$props$chooseOpt.iconOnly; var chooseClassName = classNames('p-button p-fileupload-choose p-component', { 'p-disabled': this.props.disabled, 'p-focus': this.state.focused, 'p-button-icon-only': iconOnly }, className); var labelClassName = 'p-button-label p-clickable'; var label = iconOnly ? /*#__PURE__*/React.createElement("span", { className: labelClassName, dangerouslySetInnerHTML: { __html: "&nbsp;" } }) : /*#__PURE__*/React.createElement("span", { className: labelClassName }, this.chooseButtonLabel()); return /*#__PURE__*/React.createElement("span", { className: chooseClassName, style: style, onClick: this.choose, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, tabIndex: 0 }, /*#__PURE__*/React.createElement("input", { ref: function ref(el) { return _this4.fileInput = el; }, type: "file", onChange: this.onFileSelect, multiple: this.props.multiple, accept: this.props.accept, disabled: this.chooseDisabled() }), IconUtils.getJSXIcon(icon || 'pi pi-fw pi-plus', { className: 'p-button-icon p-button-icon-left p-clickable' }, { props: this.props }), label, /*#__PURE__*/React.createElement(Ripple, null)); } }, { key: "renderFile", value: function renderFile(file, index) { var _this5 = this; var preview = this.isImage(file) ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("img", { alt: file.name, role: "presentation", src: file.objectURL, width: this.props.previewWidth })) : null; var fileName = /*#__PURE__*/React.createElement("div", { className: "p-fileupload-filename" }, file.name); var size = /*#__PURE__*/React.createElement("div", null, this.formatSize(file.size)); var removeButton = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, { type: "button", icon: "pi pi-times", onClick: function onClick(e) { return _this5.remove(e, index); } })); var content = /*#__PURE__*/React.createElement(React.Fragment, null, preview, fileName, size, removeButton); if (this.props.itemTemplate) { var defaultContentOptions = { onRemove: function onRemove(event) { return _this5.remove(event, index); }, previewElement: preview, fileNameElement: fileName, sizeElement: size, removeElement: removeButton, formatSize: this.formatSize(file.size), files: this.state.files, index: index, element: content, props: this.props }; content = ObjectUtils.getJSXElement(this.props.itemTemplate, file, defaultContentOptions); } return /*#__PURE__*/React.createElement("div", { className: "p-fileupload-row", key: file.name + file.type + file.size }, content); } }, { key: "renderFiles", value: function renderFiles() { var _this6 = this; return /*#__PURE__*/React.createElement("div", { className: "p-fileupload-files" }, this.state.files.map(function (file, index) { return _this6.renderFile(file, index); })); } }, { key: "renderEmptyContent", value: function renderEmptyContent() { if (this.props.emptyTemplate && !this.hasFiles()) { return ObjectUtils.getJSXElement(this.props.emptyTemplate, this.props); } return null; } }, { key: "renderProgressBarContent", value: function renderProgressBarContent() { if (this.props.progressBarTemplate) { return ObjectUtils.getJSXElement(this.props.progressBarTemplate, this.props); } return /*#__PURE__*/React.createElement(ProgressBar, { value: this.state.progress, showValue: false }); } }, { key: "renderAdvanced", value: function renderAdvanced() { var _this7 = this; var className = classNames('p-fileupload p-fileupload-advanced p-component', this.props.className); var headerClassName = classNames('p-fileupload-buttonbar', this.props.headerClassName); var contentClassName = classNames('p-fileupload-content', this.props.contentClassName); var uploadButton, cancelButton, filesList, progressBar; var chooseButton = this.renderChooseButton(); var emptyContent = this.renderEmptyContent(); if (!this.props.auto) { var uploadOptions = this.props.uploadOptions; var cancelOptions = this.props.cancelOptions; var uploadLabel = !uploadOptions.iconOnly ? this.uploadButtonLabel() : ''; var cancelLabel = !cancelOptions.iconOnly ? this.cancelButtonLabel() : ''; uploadButton = /*#__PURE__*/React.createElement(Button, { type: "button", label: uploadLabel, icon: uploadOptions.icon || 'pi pi-upload', onClick: this.upload, disabled: this.uploadDisabled(), style: uploadOptions.style, className: uploadOptions.className }); cancelButton = /*#__PURE__*/React.createElement(Button, { type: "button", label: cancelLabel, icon: cancelOptions.icon || 'pi pi-times', onClick: this.clear, disabled: this.cancelDisabled(), style: cancelOptions.style, className: cancelOptions.className }); } if (this.hasFiles()) { filesList = this.renderFiles(); progressBar = this.renderProgressBarContent(); } var header = /*#__PURE__*/React.createElement("div", { className: headerClassName, style: this.props.headerStyle }, chooseButton, uploadButton, cancelButton); if (this.props.headerTemplate) { var defaultContentOptions = { className: headerClassName, chooseButton: chooseButton, uploadButton: uploadButton, cancelButton: cancelButton, element: header, props: this.props }; header = ObjectUtils.getJSXElement(this.props.headerTemplate, defaultContentOptions); } return /*#__PURE__*/React.createElement("div", { id: this.props.id, className: className, style: this.props.style }, header, /*#__PURE__*/React.createElement("div", { ref: function ref(el) { _this7.content = el; }, className: contentClassName, style: this.props.contentStyle, onDragEnter: this.onDragEnter, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onDrop: this.onDrop }, progressBar, /*#__PURE__*/React.createElement(Messages, { ref: function ref(el) { return _this7.messagesUI = el; } }), filesList, emptyContent)); } }, { key: "renderBasic", value: function renderBasic() { var _this8 = this; var hasFiles = this.hasFiles(); var chooseOptions = this.props.chooseOptions; var className = classNames('p-fileupload p-fileupload-basic p-component', this.props.className); var buttonClassName = classNames('p-button p-component p-fileupload-choose', { 'p-fileupload-choose-selected': hasFiles, 'p-disabled': this.props.disabled, 'p-focus': this.state.focused }, chooseOptions.className); var chooseIcon = chooseOptions.icon || classNames({ 'pi pi-plus': !chooseOptions.icon && (!hasFiles || this.props.auto), 'pi pi-upload': !chooseOptions.icon && hasFiles && !this.props.auto }); var labelClassName = 'p-button-label p-clickable'; var chooseLabel = chooseOptions.iconOnly ? /*#__PURE__*/React.createElement("span", { className: labelClassName, dangerouslySetInnerHTML: { __html: "&nbsp;" } }) : /*#__PURE__*/React.createElement("span", { className: labelClassName }, this.chooseButtonLabel()); var label = this.props.auto ? chooseLabel : /*#__PURE__*/React.createElement("span", { className: labelClassName }, hasFiles ? this.state.files[0].name : chooseLabel); var icon = IconUtils.getJSXIcon(chooseIcon, { className: 'p-button-icon p-button-icon-left' }, { props: this.props, hasFiles: hasFiles }); return /*#__PURE__*/React.createElement("div", { className: className, style: this.props.style }, /*#__PURE__*/React.createElement(Messages, { ref: function ref(el) { return _this8.messagesUI = el; } }), /*#__PURE__*/React.createElement("span", { className: buttonClassName, style: chooseOptions.style, onMouseUp: this.onSimpleUploaderClick, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, tabIndex: 0 }, icon, label, !hasFiles && /*#__PURE__*/React.createElement("input", { ref: function ref(el) { return _this8.fileInput = el; }, type: "file", accept: this.props.accept, multiple: this.props.multiple, disabled: this.props.disabled, onChange: this.onFileSelect }), /*#__PURE__*/React.createElement(Ripple, null))); } }, { key: "render", value: function render() { if (this.props.mode === 'advanced') return this.renderAdvanced();else if (this.props.mode === 'basic') return this.renderBasic(); } }]); return FileUpload; }(Component); _defineProperty(FileUpload, "defaultProps", { id: null, name: null, url: null, mode: 'advanced', multiple: false, accept: null, disabled: false, auto: false, maxFileSize: null, invalidFileSizeMessageSummary: '{0}: Invalid file size, ', invalidFileSizeMessageDetail: 'maximum upload size is {0}.', style: null, className: null, widthCredentials: false, previewWidth: 50, chooseLabel: null, uploadLabel: null, cancelLabel: null, chooseOptions: { label: null, icon: null, iconOnly: false, className: null, style: null }, uploadOptions: { label: null, icon: null, iconOnly: false, className: null, style: null }, cancelOptions: { label: null, icon: null, iconOnly: false, className: null, style: null }, customUpload: false, headerClassName: null, headerStyle: null, contentClassName: null, contentStyle: null, headerTemplate: null, itemTemplate: null, emptyTemplate: null, progressBarTemplate: null, onBeforeUpload: null, onBeforeSend: null, onUpload: null, onError: null, onClear: null, onSelect: null, onProgress: null, onValidationFail: null, uploadHandler: null, onRemove: null }); export { FileUpload };
ajax/libs/react-native-web/0.14.6/exports/ScrollView/index.js
cdnjs/cdnjs
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import createReactClass from 'create-react-class'; import dismissKeyboard from '../../modules/dismissKeyboard'; import invariant from 'fbjs/lib/invariant'; import ScrollResponder from '../../modules/ScrollResponder'; import ScrollViewBase from './ScrollViewBase'; import StyleSheet from '../StyleSheet'; import View from '../View'; import React from 'react'; var emptyObject = {}; /* eslint-disable react/prefer-es6-class */ var ScrollView = createReactClass({ displayName: "ScrollView", mixins: [ScrollResponder.Mixin], getInitialState: function getInitialState() { return this.scrollResponderMixinGetInitialState(); }, flashScrollIndicators: function flashScrollIndicators() { this.scrollResponderFlashScrollIndicators(); }, setNativeProps: function setNativeProps(props) { if (this._scrollNodeRef) { this._scrollNodeRef.setNativeProps(props); } }, /** * Returns a reference to the underlying scroll responder, which supports * operations like `scrollTo`. All ScrollView-like components should * implement this method so that they can be composed while providing access * to the underlying scroll responder's methods. */ getScrollResponder: function getScrollResponder() { return this; }, getScrollableNode: function getScrollableNode() { return this._scrollNodeRef; }, getInnerViewNode: function getInnerViewNode() { return this._innerViewRef; }, /** * Scrolls to a given x, y offset, either immediately or with a smooth animation. * Syntax: * * scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) * * Note: The weird argument signature is due to the fact that, for historical reasons, * the function also accepts separate arguments as as alternative to the options object. * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. */ scrollTo: function scrollTo(y, x, animated) { if (typeof y === 'number') { console.warn('`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.'); } else { var _ref = y || emptyObject; x = _ref.x; y = _ref.y; animated = _ref.animated; } this.getScrollResponder().scrollResponderScrollTo({ x: x || 0, y: y || 0, animated: animated !== false }); }, /** * If this is a vertical ScrollView scrolls to the bottom. * If this is a horizontal ScrollView scrolls to the right. * * Use `scrollToEnd({ animated: true })` for smooth animated scrolling, * `scrollToEnd({ animated: false })` for immediate scrolling. * If no options are passed, `animated` defaults to true. */ scrollToEnd: function scrollToEnd(options) { // Default to true var animated = (options && options.animated) !== false; var horizontal = this.props.horizontal; var scrollResponder = this.getScrollResponder(); var scrollResponderNode = scrollResponder.scrollResponderGetScrollableNode(); var x = horizontal ? scrollResponderNode.scrollWidth : 0; var y = horizontal ? 0 : scrollResponderNode.scrollHeight; scrollResponder.scrollResponderScrollTo({ x: x, y: y, animated: animated }); }, render: function render() { var _this$props = this.props, contentContainerStyle = _this$props.contentContainerStyle, horizontal = _this$props.horizontal, onContentSizeChange = _this$props.onContentSizeChange, refreshControl = _this$props.refreshControl, stickyHeaderIndices = _this$props.stickyHeaderIndices, pagingEnabled = _this$props.pagingEnabled, keyboardDismissMode = _this$props.keyboardDismissMode, onScroll = _this$props.onScroll, other = _objectWithoutPropertiesLoose(_this$props, ["contentContainerStyle", "horizontal", "onContentSizeChange", "refreshControl", "stickyHeaderIndices", "pagingEnabled", "keyboardDismissMode", "onScroll"]); if (process.env.NODE_ENV !== 'production' && this.props.style) { var style = StyleSheet.flatten(this.props.style); var childLayoutProps = ['alignItems', 'justifyContent'].filter(function (prop) { return style && style[prop] !== undefined; }); invariant(childLayoutProps.length === 0, "ScrollView child layout (" + JSON.stringify(childLayoutProps) + ") " + 'must be applied through the contentContainerStyle prop.'); } var contentSizeChangeProps = {}; if (onContentSizeChange) { contentSizeChangeProps = { onLayout: this._handleContentOnLayout }; } var hasStickyHeaderIndices = !horizontal && Array.isArray(stickyHeaderIndices); var children = hasStickyHeaderIndices || pagingEnabled ? React.Children.map(this.props.children, function (child, i) { var isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1; if (child != null && (isSticky || pagingEnabled)) { return React.createElement(View, { style: StyleSheet.compose(isSticky && styles.stickyHeader, pagingEnabled && styles.pagingEnabledChild) }, child); } else { return child; } }) : this.props.children; var contentContainer = React.createElement(View, _extends({}, contentSizeChangeProps, { children: children, collapsable: false, ref: this._setInnerViewRef, style: StyleSheet.compose(horizontal && styles.contentContainerHorizontal, contentContainerStyle) })); var baseStyle = horizontal ? styles.baseHorizontal : styles.baseVertical; var pagingEnabledStyle = horizontal ? styles.pagingEnabledHorizontal : styles.pagingEnabledVertical; var props = _objectSpread({}, other, { style: [baseStyle, pagingEnabled && pagingEnabledStyle, this.props.style], onTouchStart: this.scrollResponderHandleTouchStart, onTouchMove: this.scrollResponderHandleTouchMove, onTouchEnd: this.scrollResponderHandleTouchEnd, onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag, onScrollEndDrag: this.scrollResponderHandleScrollEndDrag, onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin, onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd, onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder, onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture, onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder, onScroll: this._handleScroll, onResponderGrant: this.scrollResponderHandleResponderGrant, onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest, onResponderTerminate: this.scrollResponderHandleTerminate, onResponderRelease: this.scrollResponderHandleResponderRelease, onResponderReject: this.scrollResponderHandleResponderReject }); var ScrollViewClass = ScrollViewBase; invariant(ScrollViewClass !== undefined, 'ScrollViewClass must not be undefined'); if (refreshControl) { return React.cloneElement(refreshControl, { style: props.style }, React.createElement(ScrollViewClass, _extends({}, props, { ref: this._setScrollNodeRef, style: baseStyle }), contentContainer)); } return React.createElement(ScrollViewClass, _extends({}, props, { ref: this._setScrollNodeRef }), contentContainer); }, _handleContentOnLayout: function _handleContentOnLayout(e) { var _e$nativeEvent$layout = e.nativeEvent.layout, width = _e$nativeEvent$layout.width, height = _e$nativeEvent$layout.height; this.props.onContentSizeChange(width, height); }, _handleScroll: function _handleScroll(e) { if (process.env.NODE_ENV !== 'production') { if (this.props.onScroll && this.props.scrollEventThrottle == null) { console.log('You specified `onScroll` on a <ScrollView> but not ' + '`scrollEventThrottle`. You will only receive one event. ' + 'Using `16` you get all the events but be aware that it may ' + "cause frame drops, use a bigger number if you don't need as " + 'much precision.'); } } if (this.props.keyboardDismissMode === 'on-drag') { dismissKeyboard(); } this.scrollResponderHandleScroll(e); }, _setInnerViewRef: function _setInnerViewRef(component) { this._innerViewRef = component; }, _setScrollNodeRef: function _setScrollNodeRef(component) { this._scrollNodeRef = component; } }); var commonStyle = { flexGrow: 1, flexShrink: 1, // Enable hardware compositing in modern browsers. // Creates a new layer with its own backing surface that can significantly // improve scroll performance. transform: [{ translateZ: 0 }], // iOS native scrolling WebkitOverflowScrolling: 'touch' }; var styles = StyleSheet.create({ baseVertical: _objectSpread({}, commonStyle, { flexDirection: 'column', overflowX: 'hidden', overflowY: 'auto' }), baseHorizontal: _objectSpread({}, commonStyle, { flexDirection: 'row', overflowX: 'auto', overflowY: 'hidden' }), contentContainerHorizontal: { flexDirection: 'row' }, stickyHeader: { position: 'sticky', top: 0, zIndex: 10 }, pagingEnabledHorizontal: { scrollSnapType: 'x mandatory' }, pagingEnabledVertical: { scrollSnapType: 'y mandatory' }, pagingEnabledChild: { scrollSnapAlign: 'start' } }); export default ScrollView;
ajax/libs/react-native-web/0.12.0/modules/UnimplementedView/index.js
cdnjs/cdnjs
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import View from '../../exports/View'; import React from 'react'; /** * Common implementation for a simple stubbed view. */ var UnimplementedView = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(UnimplementedView, _React$Component); function UnimplementedView() { return _React$Component.apply(this, arguments) || this; } var _proto = UnimplementedView.prototype; _proto.setNativeProps = function setNativeProps() {// Do nothing. // This method is required in order to use this view as a Touchable* child. // See ensureComponentIsNative.js for more info }; _proto.render = function render() { return React.createElement(View, { style: [unimplementedViewStyles, this.props.style] }, this.props.children); }; return UnimplementedView; }(React.Component); var unimplementedViewStyles = process.env.NODE_ENV !== 'production' ? { alignSelf: 'flex-start', borderColor: 'red', borderWidth: 1 } : {}; export default UnimplementedView;
ajax/libs/material-ui/4.9.2/es/internal/svg-icons/CheckCircle.js
cdnjs/cdnjs
import React from 'react'; import createSvgIcon from './createSvgIcon'; /** * @ignore - internal component. */ export default createSvgIcon(React.createElement("path", { d: "M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z" }), 'CheckCircle');
ajax/libs/react-native-web/0.12.3/exports/Button/index.js
cdnjs/cdnjs
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * Copyright (c) Nicolas Gallagher. * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ import StyleSheet from '../StyleSheet'; import TouchableOpacity from '../TouchableOpacity'; import Text from '../Text'; import React from 'react'; var Button = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(Button, _React$Component); function Button() { return _React$Component.apply(this, arguments) || this; } var _proto = Button.prototype; _proto.render = function render() { var _this$props = this.props, accessibilityLabel = _this$props.accessibilityLabel, color = _this$props.color, disabled = _this$props.disabled, onPress = _this$props.onPress, testID = _this$props.testID, title = _this$props.title; return React.createElement(TouchableOpacity, { accessibilityLabel: accessibilityLabel, accessibilityRole: "button", disabled: disabled, onPress: onPress, style: [styles.button, color && { backgroundColor: color }, disabled && styles.buttonDisabled], testID: testID }, React.createElement(Text, { style: [styles.text, disabled && styles.textDisabled] }, title)); }; return Button; }(React.Component); var styles = StyleSheet.create({ button: { backgroundColor: '#2196F3', borderRadius: 2 }, text: { color: '#fff', fontWeight: '500', padding: 8, textAlign: 'center', textTransform: 'uppercase' }, buttonDisabled: { backgroundColor: '#dfdfdf' }, textDisabled: { color: '#a1a1a1' } }); export default Button;
ajax/libs/material-ui/4.9.2/es/ListItemIcon/ListItemIcon.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import ListContext from '../List/ListContext'; export const styles = theme => ({ /* Styles applied to the root element. */ root: { minWidth: 56, color: theme.palette.action.active, flexShrink: 0, display: 'inline-flex' }, /* Styles applied to the root element when the parent `ListItem` uses `alignItems="flex-start"`. */ alignItemsFlexStart: { marginTop: 8 } }); /** * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`. */ const ListItemIcon = React.forwardRef(function ListItemIcon(props, ref) { const { classes, className } = props, other = _objectWithoutPropertiesLoose(props, ["classes", "className"]); const context = React.useContext(ListContext); return React.createElement("div", _extends({ className: clsx(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart), ref: ref }, other)); }); process.env.NODE_ENV !== "production" ? ListItemIcon.propTypes = { /** * The content of the component, normally `Icon`, `SvgIcon`, * or a `@material-ui/icons` SVG icon element. */ children: PropTypes.element.isRequired, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string } : void 0; export default withStyles(styles, { name: 'MuiListItemIcon' })(ListItemIcon);
ajax/libs/material-ui/4.9.4/esm/Chip/Chip.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import CancelIcon from '../internal/svg-icons/Cancel'; import withStyles from '../styles/withStyles'; import { emphasize, fade } from '../styles/colorManipulator'; import useForkRef from '../utils/useForkRef'; import unsupportedProp from '../utils/unsupportedProp'; import capitalize from '../utils/capitalize'; import ButtonBase from '../ButtonBase'; export var styles = function styles(theme) { var backgroundColor = theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[700]; var deleteIconColor = fade(theme.palette.text.primary, 0.26); return { /* Styles applied to the root element. */ root: { fontFamily: theme.typography.fontFamily, fontSize: theme.typography.pxToRem(13), display: 'inline-flex', alignItems: 'center', justifyContent: 'center', height: 32, color: theme.palette.getContrastText(backgroundColor), backgroundColor: backgroundColor, borderRadius: 32 / 2, whiteSpace: 'nowrap', transition: theme.transitions.create(['background-color', 'box-shadow']), // label will inherit this from root, then `clickable` class overrides this for both cursor: 'default', // We disable the focus ring for mouse, touch and keyboard users. outline: 0, textDecoration: 'none', border: 'none', // Remove `button` border padding: 0, // Remove `button` padding verticalAlign: 'middle', boxSizing: 'border-box', '&$disabled': { opacity: 0.5, pointerEvents: 'none' }, '& $avatar': { marginLeft: 5, marginRight: -6, width: 24, height: 24, color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300], fontSize: theme.typography.pxToRem(12) }, '& $avatarColorPrimary': { color: theme.palette.primary.contrastText, backgroundColor: theme.palette.primary.dark }, '& $avatarColorSecondary': { color: theme.palette.secondary.contrastText, backgroundColor: theme.palette.secondary.dark }, '& $avatarSmall': { marginLeft: 4, marginRight: -4, width: 18, height: 18, fontSize: theme.typography.pxToRem(10) } }, /* Styles applied to the root element if `size="small"`. */ sizeSmall: { height: 24 }, /* Styles applied to the root element if `color="primary"`. */ colorPrimary: { backgroundColor: theme.palette.primary.main, color: theme.palette.primary.contrastText }, /* Styles applied to the root element if `color="secondary"`. */ colorSecondary: { backgroundColor: theme.palette.secondary.main, color: theme.palette.secondary.contrastText }, /* Pseudo-class applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `onClick` is defined or `clickable={true}`. */ clickable: { userSelect: 'none', WebkitTapHighlightColor: 'transparent', cursor: 'pointer', '&:hover, &:focus': { backgroundColor: emphasize(backgroundColor, 0.08) }, '&:active': { boxShadow: theme.shadows[1] } }, /* Styles applied to the root element if `onClick` and `color="primary"` is defined or `clickable={true}`. */ clickableColorPrimary: { '&:hover, &:focus': { backgroundColor: emphasize(theme.palette.primary.main, 0.08) } }, /* Styles applied to the root element if `onClick` and `color="secondary"` is defined or `clickable={true}`. */ clickableColorSecondary: { '&:hover, &:focus': { backgroundColor: emphasize(theme.palette.secondary.main, 0.08) } }, /* Styles applied to the root element if `onDelete` is defined. */ deletable: { '&:focus': { backgroundColor: emphasize(backgroundColor, 0.08) } }, /* Styles applied to the root element if `onDelete` and `color="primary"` is defined. */ deletableColorPrimary: { '&:focus': { backgroundColor: emphasize(theme.palette.primary.main, 0.2) } }, /* Styles applied to the root element if `onDelete` and `color="secondary"` is defined. */ deletableColorSecondary: { '&:focus': { backgroundColor: emphasize(theme.palette.secondary.main, 0.2) } }, /* Styles applied to the root element if `variant="outlined"`. */ outlined: { backgroundColor: 'transparent', border: "1px solid ".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'), '$clickable&:hover, $clickable&:focus, $deletable&:focus': { backgroundColor: fade(theme.palette.text.primary, theme.palette.action.hoverOpacity) }, '& $avatar': { marginLeft: 4 }, '& $avatarSmall': { marginLeft: 2 }, '& $icon': { marginLeft: 4 }, '& $iconSmall': { marginLeft: 2 }, '& $deleteIcon': { marginRight: 5 }, '& $deleteIconSmall': { marginRight: 3 } }, /* Styles applied to the root element if `variant="outlined"` and `color="primary"`. */ outlinedPrimary: { color: theme.palette.primary.main, border: "1px solid ".concat(theme.palette.primary.main), '$clickable&:hover, $clickable&:focus, $deletable&:focus': { backgroundColor: fade(theme.palette.primary.main, theme.palette.action.hoverOpacity) } }, /* Styles applied to the root element if `variant="outlined"` and `color="secondary"`. */ outlinedSecondary: { color: theme.palette.secondary.main, border: "1px solid ".concat(theme.palette.secondary.main), '$clickable&:hover, $clickable&:focus, $deletable&:focus': { backgroundColor: fade(theme.palette.secondary.main, theme.palette.action.hoverOpacity) } }, // TODO v5: remove /* Styles applied to the `avatar` element. */ avatar: {}, /* Styles applied to the `avatar` element if `size="small"`. */ avatarSmall: {}, /* Styles applied to the `avatar` element if `color="primary"`. */ avatarColorPrimary: {}, /* Styles applied to the `avatar` element if `color="secondary"`. */ avatarColorSecondary: {}, /* Styles applied to the `icon` element. */ icon: { color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300], marginLeft: 5, marginRight: -6 }, /* Styles applied to the `icon` element if `size="small"`. */ iconSmall: { width: 18, height: 18, marginLeft: 4, marginRight: -4 }, /* Styles applied to the `icon` element if `color="primary"`. */ iconColorPrimary: { color: 'inherit' }, /* Styles applied to the `icon` element if `color="secondary"`. */ iconColorSecondary: { color: 'inherit' }, /* Styles applied to the label `span` element. */ label: { overflow: 'hidden', textOverflow: 'ellipsis', paddingLeft: 12, paddingRight: 12, whiteSpace: 'nowrap' }, /* Styles applied to the label `span` element if `size="small"`. */ labelSmall: { paddingLeft: 8, paddingRight: 8 }, /* Styles applied to the `deleteIcon` element. */ deleteIcon: { WebkitTapHighlightColor: 'transparent', color: deleteIconColor, height: 22, width: 22, cursor: 'pointer', margin: '0 5px 0 -6px', '&:hover': { color: fade(deleteIconColor, 0.4) } }, /* Styles applied to the `deleteIcon` element if `size="small"`. */ deleteIconSmall: { height: 16, width: 16, marginRight: 4, marginLeft: -4 }, /* Styles applied to the deleteIcon element if `color="primary"` and `variant="default"`. */ deleteIconColorPrimary: { color: fade(theme.palette.primary.contrastText, 0.7), '&:hover, &:active': { color: theme.palette.primary.contrastText } }, /* Styles applied to the deleteIcon element if `color="secondary"` and `variant="default"`. */ deleteIconColorSecondary: { color: fade(theme.palette.secondary.contrastText, 0.7), '&:hover, &:active': { color: theme.palette.secondary.contrastText } }, /* Styles applied to the deleteIcon element if `color="primary"` and `variant="outlined"`. */ deleteIconOutlinedColorPrimary: { color: fade(theme.palette.primary.main, 0.7), '&:hover, &:active': { color: theme.palette.primary.main } }, /* Styles applied to the deleteIcon element if `color="secondary"` and `variant="outlined"`. */ deleteIconOutlinedColorSecondary: { color: fade(theme.palette.secondary.main, 0.7), '&:hover, &:active': { color: theme.palette.secondary.main } } }; }; /** * Chips represent complex entities in small blocks, such as a contact. */ var Chip = React.forwardRef(function Chip(props, ref) { var avatarProp = props.avatar, classes = props.classes, className = props.className, clickableProp = props.clickable, _props$color = props.color, color = _props$color === void 0 ? 'default' : _props$color, ComponentProp = props.component, deleteIconProp = props.deleteIcon, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, iconProp = props.icon, label = props.label, onClick = props.onClick, onDelete = props.onDelete, onKeyUp = props.onKeyUp, _props$size = props.size, size = _props$size === void 0 ? 'medium' : _props$size, _props$variant = props.variant, variant = _props$variant === void 0 ? 'default' : _props$variant, other = _objectWithoutProperties(props, ["avatar", "classes", "className", "clickable", "color", "component", "deleteIcon", "disabled", "icon", "label", "onClick", "onDelete", "onKeyUp", "size", "variant"]); var chipRef = React.useRef(null); var handleRef = useForkRef(chipRef, ref); var handleDeleteIconClick = function handleDeleteIconClick(event) { // Stop the event from bubbling up to the `Chip` event.stopPropagation(); if (onDelete) { onDelete(event); } }; var handleKeyUp = function handleKeyUp(event) { if (onKeyUp) { onKeyUp(event); } // Ignore events from children of `Chip`. if (event.currentTarget !== event.target) { return; } var key = event.key; if (onDelete && (key === 'Backspace' || key === 'Delete')) { onDelete(event); } else if (key === 'Escape' && chipRef.current) { chipRef.current.blur(); } }; var clickable = clickableProp !== false && onClick ? true : clickableProp; var small = size === 'small'; var Component = ComponentProp || (clickable ? ButtonBase : 'div'); var moreProps = Component === ButtonBase ? { component: 'div' } : {}; var deleteIcon = null; if (onDelete) { var customClasses = clsx(color !== 'default' && (variant === "default" ? classes["deleteIconColor".concat(capitalize(color))] : classes["deleteIconOutlinedColor".concat(capitalize(color))]), small && classes.deleteIconSmall); deleteIcon = deleteIconProp && React.isValidElement(deleteIconProp) ? React.cloneElement(deleteIconProp, { className: clsx(deleteIconProp.props.className, classes.deleteIcon, customClasses), onClick: handleDeleteIconClick }) : React.createElement(CancelIcon, { className: clsx(classes.deleteIcon, customClasses), onClick: handleDeleteIconClick }); } var avatar = null; if (avatarProp && React.isValidElement(avatarProp)) { avatar = React.cloneElement(avatarProp, { className: clsx(classes.avatar, avatarProp.props.className, small && classes.avatarSmall, color !== 'default' && classes["avatarColor".concat(capitalize(color))]) }); } var icon = null; if (iconProp && React.isValidElement(iconProp)) { icon = React.cloneElement(iconProp, { className: clsx(classes.icon, iconProp.props.className, small && classes.iconSmall, color !== 'default' && classes["iconColor".concat(capitalize(color))]) }); } if (process.env.NODE_ENV !== 'production') { if (avatar && icon) { console.error('Material-UI: the Chip component can not handle the avatar ' + 'and the icon prop at the same time. Pick one.'); } } return React.createElement(Component, _extends({ role: clickable || onDelete ? 'button' : undefined, className: clsx(classes.root, className, color !== 'default' && [classes["color".concat(capitalize(color))], clickable && classes["clickableColor".concat(capitalize(color))], onDelete && classes["deletableColor".concat(capitalize(color))]], variant !== "default" && [classes.outlined, { 'primary': classes.outlinedPrimary, 'secondary': classes.outlinedSecondary }[color]], disabled && classes.disabled, small && classes.sizeSmall, clickable && classes.clickable, onDelete && classes.deletable), "aria-disabled": disabled ? true : undefined, tabIndex: clickable || onDelete ? 0 : undefined, onClick: onClick, onKeyUp: handleKeyUp, ref: handleRef }, moreProps, other), avatar || icon, React.createElement("span", { className: clsx(classes.label, small && classes.labelSmall) }, label), deleteIcon); }); process.env.NODE_ENV !== "production" ? Chip.propTypes = { /** * Avatar element. */ avatar: PropTypes.element, /** * This prop isn't supported. * Use the `component` prop if you need to change the children structure. */ children: unsupportedProp, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * If `true`, the chip will appear clickable, and will raise when pressed, * even if the onClick prop is not defined. * If false, the chip will not be clickable, even if onClick prop is defined. * This can be used, for example, * along with the component prop to indicate an anchor Chip is clickable. */ clickable: PropTypes.bool, /** * The color of the component. It supports those theme colors that make sense for this component. */ color: PropTypes.oneOf(['default', 'primary', 'secondary']), /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: PropTypes.elementType, /** * Override the default delete icon element. Shown only if `onDelete` is set. */ deleteIcon: PropTypes.element, /** * If `true`, the chip should be displayed in a disabled state. */ disabled: PropTypes.bool, /** * Icon element. */ icon: PropTypes.element, /** * The content of the label. */ label: PropTypes.node, /** * @ignore */ onClick: PropTypes.func, /** * Callback function fired when the delete icon is clicked. * If set, the delete icon will be shown. */ onDelete: PropTypes.func, /** * @ignore */ onKeyDown: PropTypes.func, /** * @ignore */ onKeyUp: PropTypes.func, /** * The size of the chip. */ size: PropTypes.oneOf(['small', 'medium']), /** * The variant to use. */ variant: PropTypes.oneOf(['default', 'outlined']) } : void 0; export default withStyles(styles, { name: 'MuiChip' })(Chip);
ajax/libs/material-ui/4.9.4/esm/Select/SelectInput.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import _typeof from "@babel/runtime/helpers/esm/typeof"; import React from 'react'; import { isFragment } from 'react-is'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import capitalize from '../utils/capitalize'; import { refType } from '@material-ui/utils'; import Menu from '../Menu/Menu'; import { isFilled } from '../InputBase/utils'; import useForkRef from '../utils/useForkRef'; import useControlled from '../utils/useControlled'; function areEqualValues(a, b) { if (_typeof(b) === 'object' && b !== null) { return a === b; } return String(a) === String(b); } function isEmpty(display) { return display == null || typeof display === 'string' && !display.trim(); } /** * @ignore - internal component. */ var SelectInput = React.forwardRef(function SelectInput(props, ref) { var autoFocus = props.autoFocus, autoWidth = props.autoWidth, children = props.children, classes = props.classes, className = props.className, defaultValue = props.defaultValue, disabled = props.disabled, displayEmpty = props.displayEmpty, IconComponent = props.IconComponent, inputRefProp = props.inputRef, labelId = props.labelId, _props$MenuProps = props.MenuProps, MenuProps = _props$MenuProps === void 0 ? {} : _props$MenuProps, multiple = props.multiple, name = props.name, onBlur = props.onBlur, onChange = props.onChange, onClose = props.onClose, onFocus = props.onFocus, onOpen = props.onOpen, openProp = props.open, readOnly = props.readOnly, renderValue = props.renderValue, required = props.required, _props$SelectDisplayP = props.SelectDisplayProps, SelectDisplayProps = _props$SelectDisplayP === void 0 ? {} : _props$SelectDisplayP, tabIndexProp = props.tabIndex, type = props.type, valueProp = props.value, _props$variant = props.variant, variant = _props$variant === void 0 ? 'standard' : _props$variant, other = _objectWithoutProperties(props, ["autoFocus", "autoWidth", "children", "classes", "className", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "required", "SelectDisplayProps", "tabIndex", "type", "value", "variant"]); var _useControlled = useControlled({ controlled: valueProp, default: defaultValue, name: 'SelectInput' }), _useControlled2 = _slicedToArray(_useControlled, 2), value = _useControlled2[0], setValue = _useControlled2[1]; var inputRef = React.useRef(null); var _React$useState = React.useState(null), displayNode = _React$useState[0], setDisplayNode = _React$useState[1]; var _React$useRef = React.useRef(openProp != null), isOpenControlled = _React$useRef.current; var _React$useState2 = React.useState(), menuMinWidthState = _React$useState2[0], setMenuMinWidthState = _React$useState2[1]; var _React$useState3 = React.useState(false), openState = _React$useState3[0], setOpenState = _React$useState3[1]; var handleRef = useForkRef(ref, inputRefProp); React.useImperativeHandle(handleRef, function () { return { focus: function focus() { displayNode.focus(); }, node: inputRef.current, value: value }; }, [displayNode, value]); React.useEffect(function () { if (autoFocus && displayNode) { displayNode.focus(); } }, [autoFocus, displayNode]); var update = function update(open, event) { if (open) { if (onOpen) { onOpen(event); } } else if (onClose) { onClose(event); } if (!isOpenControlled) { setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth); setOpenState(open); } }; var handleMouseDown = function handleMouseDown(event) { // Ignore everything but left-click if (event.button !== 0) { return; } // Hijack the default focus behavior. event.preventDefault(); displayNode.focus(); update(true, event); }; var handleClose = function handleClose(event) { update(false, event); }; var handleItemClick = function handleItemClick(child) { return function (event) { if (!multiple) { update(false, event); } var newValue; if (multiple) { newValue = Array.isArray(value) ? _toConsumableArray(value) : []; var itemIndex = value.indexOf(child.props.value); if (itemIndex === -1) { newValue.push(child.props.value); } else { newValue.splice(itemIndex, 1); } } else { newValue = child.props.value; } setValue(newValue); if (onChange) { event.persist(); // Preact support, target is read only property on a native event. Object.defineProperty(event, 'target', { writable: true, value: { value: newValue, name: name } }); onChange(event, child); } }; }; var handleKeyDown = function handleKeyDown(event) { if (!readOnly) { var validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on MacOS, but it's recommended by // https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html 'Enter']; if (validKeys.indexOf(event.key) !== -1) { event.preventDefault(); update(true, event); } } }; var open = displayNode !== null && (isOpenControlled ? openProp : openState); var handleBlur = function handleBlur(event) { // if open event.stopImmediatePropagation if (!open && onBlur) { event.persist(); // Preact support, target is read only property on a native event. Object.defineProperty(event, 'target', { writable: true, value: { value: value, name: name } }); onBlur(event); } }; delete other['aria-invalid']; var display; var displaySingle; var displayMultiple = []; var computeDisplay = false; var foundMatch = false; // No need to display any value if the field is empty. if (isFilled({ value: value }) || displayEmpty) { if (renderValue) { display = renderValue(value); } else { computeDisplay = true; } } var items = React.Children.map(children, function (child) { if (!React.isValidElement(child)) { return null; } if (process.env.NODE_ENV !== 'production') { if (isFragment(child)) { console.error(["Material-UI: the Select component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n')); } } var selected; if (multiple) { if (!Array.isArray(value)) { throw new Error('Material-UI: the `value` prop must be an array ' + 'when using the `Select` component with `multiple`.'); } selected = value.some(function (v) { return areEqualValues(v, child.props.value); }); if (selected && computeDisplay) { displayMultiple.push(child.props.children); } } else { selected = areEqualValues(value, child.props.value); if (selected && computeDisplay) { displaySingle = child.props.children; } } if (selected) { foundMatch = true; } return React.cloneElement(child, { 'aria-selected': selected ? 'true' : undefined, onClick: handleItemClick(child), onKeyUp: function onKeyUp(event) { if (event.key === ' ') { // otherwise our MenuItems dispatches a click event // it's not behavior of the native <option> and causes // the select to close immediately since we open on space keydown event.preventDefault(); } var onKeyUp = child.props.onKeyUp; if (typeof onKeyUp === 'function') { onKeyUp(event); } }, role: 'option', selected: selected, value: undefined, // The value is most likely not a valid HTML attribute. 'data-value': child.props.value // Instead, we provide it as a data attribute. }); }); if (process.env.NODE_ENV !== 'production') { // eslint-disable-next-line react-hooks/rules-of-hooks React.useEffect(function () { if (!foundMatch && !multiple && value !== '') { var values = React.Children.toArray(children).map(function (child) { return child.props.value; }); console.warn(["Material-UI: you have provided an out-of-range value `".concat(value, "` for the select ").concat(name ? "(name=\"".concat(name, "\") ") : '', "component."), "Consider providing a value that matches one of the available options or ''.", "The available values are ".concat(values.filter(function (x) { return x != null; }).map(function (x) { return "`".concat(x, "`"); }).join(', ') || '""', ".")].join('\n')); } }, [foundMatch, children, multiple, name, value]); } if (computeDisplay) { display = multiple ? displayMultiple.join(', ') : displaySingle; } // Avoid performing a layout computation in the render method. var menuMinWidth = menuMinWidthState; if (!autoWidth && isOpenControlled && displayNode) { menuMinWidth = displayNode.clientWidth; } var tabIndex; if (typeof tabIndexProp !== 'undefined') { tabIndex = tabIndexProp; } else { tabIndex = disabled ? null : 0; } var buttonId = SelectDisplayProps.id || (name ? "mui-component-select-".concat(name) : undefined); return React.createElement(React.Fragment, null, React.createElement("div", _extends({ className: clsx(classes.root, // TODO v5: merge root and select classes.select, classes.selectMenu, classes[variant], className, disabled && classes.disabled), ref: setDisplayNode, tabIndex: tabIndex, role: "button", "aria-expanded": open ? 'true' : undefined, "aria-labelledby": "".concat(labelId || '', " ").concat(buttonId || ''), "aria-haspopup": "listbox", onKeyDown: handleKeyDown, onMouseDown: disabled || readOnly ? null : handleMouseDown, onBlur: handleBlur, onFocus: onFocus }, SelectDisplayProps, { // The id is required for proper a11y id: buttonId }), isEmpty(display) ? // eslint-disable-next-line react/no-danger React.createElement("span", { dangerouslySetInnerHTML: { __html: '&#8203;' } }) : display), React.createElement("input", _extends({ value: Array.isArray(value) ? value.join(',') : value, name: name, ref: inputRef, type: "hidden", autoFocus: autoFocus }, other)), React.createElement(IconComponent, { className: clsx(classes.icon, classes["icon".concat(capitalize(variant))], open && classes.iconOpen) }), React.createElement(Menu, _extends({ id: "menu-".concat(name || ''), anchorEl: displayNode, open: open, onClose: handleClose }, MenuProps, { MenuListProps: _extends({ 'aria-labelledby': labelId, role: 'listbox', disableListWrap: true }, MenuProps.MenuListProps), PaperProps: _extends({}, MenuProps.PaperProps, { style: _extends({ minWidth: menuMinWidth }, MenuProps.PaperProps != null ? MenuProps.PaperProps.style : null) }) }), items)); }); process.env.NODE_ENV !== "production" ? SelectInput.propTypes = { /** * @ignore */ autoFocus: PropTypes.bool, /** * If `true`, the width of the popover will automatically be set according to the items inside the * menu, otherwise it will be at least the width of the select input. */ autoWidth: PropTypes.bool, /** * The option elements to populate the select with. * Can be some `<MenuItem>` elements. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * The CSS class name of the select element. */ className: PropTypes.string, /** * The default element value. Use when the component is not controlled. */ defaultValue: PropTypes.any, /** * If `true`, the select will be disabled. */ disabled: PropTypes.bool, /** * If `true`, the selected item is displayed even if its value is empty. */ displayEmpty: PropTypes.bool, /** * The icon that displays the arrow. */ IconComponent: PropTypes.elementType.isRequired, /** * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }` * Equivalent to `ref` */ inputRef: refType, /** * The ID of an element that acts as an additional label. The Select will * be labelled by the additional label and the selected value. */ labelId: PropTypes.string, /** * Props applied to the [`Menu`](/api/menu/) element. */ MenuProps: PropTypes.object, /** * If `true`, `value` must be an array and the menu will support multiple selections. */ multiple: PropTypes.bool, /** * Name attribute of the `select` or hidden `input` element. */ name: PropTypes.string, /** * @ignore */ onBlur: PropTypes.func, /** * Callback function fired when a menu item is selected. * * @param {object} event The event source of the callback. * You can pull out the new value by accessing `event.target.value` (any). * @param {object} [child] The react element that was selected. */ onChange: PropTypes.func, /** * Callback fired when the component requests to be closed. * Use in controlled mode (see open). * * @param {object} event The event source of the callback. */ onClose: PropTypes.func, /** * @ignore */ onFocus: PropTypes.func, /** * Callback fired when the component requests to be opened. * Use in controlled mode (see open). * * @param {object} event The event source of the callback. */ onOpen: PropTypes.func, /** * Control `select` open state. */ open: PropTypes.bool, /** * @ignore */ readOnly: PropTypes.bool, /** * Render the selected value. * * @param {any} value The `value` provided to the component. * @returns {ReactNode} */ renderValue: PropTypes.func, /** * @ignore */ required: PropTypes.bool, /** * Props applied to the clickable div element. */ SelectDisplayProps: PropTypes.object, /** * @ignore */ tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * @ignore */ type: PropTypes.any, /** * The input value. */ value: PropTypes.any, /** * The variant to use. */ variant: PropTypes.oneOf(['standard', 'outlined', 'filled']) } : void 0; export default SelectInput;
ajax/libs/primereact/7.0.0-rc.2/badge/badge.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { classNames } from 'primereact/core'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Badge = /*#__PURE__*/function (_Component) { _inherits(Badge, _Component); var _super = _createSuper(Badge); function Badge() { _classCallCheck(this, Badge); return _super.apply(this, arguments); } _createClass(Badge, [{ key: "render", value: function render() { var badgeClassName = classNames('p-badge p-component', { 'p-badge-no-gutter': this.props.value && String(this.props.value).length === 1, 'p-badge-dot': !this.props.value, 'p-badge-lg': this.props.size === 'large', 'p-badge-xl': this.props.size === 'xlarge', 'p-badge-info': this.props.severity === 'info', 'p-badge-success': this.props.severity === 'success', 'p-badge-warning': this.props.severity === 'warning', 'p-badge-danger': this.props.severity === 'danger' }, this.props.className); return /*#__PURE__*/React.createElement("span", { className: badgeClassName, style: this.props.style }, this.props.value); } }]); return Badge; }(Component); _defineProperty(Badge, "defaultProps", { value: null, severity: null, size: null, style: null, className: null }); export { Badge };
ajax/libs/material-ui/4.9.3/es/Input/Input.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { refType } from '@material-ui/utils'; import InputBase from '../InputBase'; import withStyles from '../styles/withStyles'; export const styles = theme => { const light = theme.palette.type === 'light'; const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)'; return { /* Styles applied to the root element. */ root: { position: 'relative' }, /* Styles applied to the root element if the component is a descendant of `FormControl`. */ formControl: { 'label + &': { marginTop: 16 } }, /* Styles applied to the root element if the component is focused. */ focused: {}, /* Styles applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if color secondary. */ colorSecondary: { '&$underline:after': { borderBottomColor: theme.palette.secondary.main } }, /* Styles applied to the root element if `disableUnderline={false}`. */ underline: { '&:after': { borderBottom: `2px solid ${theme.palette.primary.main}`, left: 0, bottom: 0, // Doing the other way around crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242 content: '""', position: 'absolute', right: 0, transform: 'scaleX(0)', transition: theme.transitions.create('transform', { duration: theme.transitions.duration.shorter, easing: theme.transitions.easing.easeOut }), pointerEvents: 'none' // Transparent to the hover style. }, '&$focused:after': { transform: 'scaleX(1)' }, '&$error:after': { borderBottomColor: theme.palette.error.main, transform: 'scaleX(1)' // error is always underlined in red }, '&:before': { borderBottom: `1px solid ${bottomLineColor}`, left: 0, bottom: 0, // Doing the other way around crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242 content: '"\\00a0"', position: 'absolute', right: 0, transition: theme.transitions.create('border-bottom-color', { duration: theme.transitions.duration.shorter }), pointerEvents: 'none' // Transparent to the hover style. }, '&:hover:not($disabled):before': { borderBottom: `2px solid ${theme.palette.text.primary}`, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { borderBottom: `1px solid ${bottomLineColor}` } }, '&$disabled:before': { borderBottomStyle: 'dotted' } }, /* Pseudo-class applied to the root element if `error={true}`. */ error: {}, /* Styles applied to the `input` element if `margin="dense"`. */ marginDense: {}, /* Styles applied to the root element if `multiline={true}`. */ multiline: {}, /* Styles applied to the root element if `fullWidth={true}`. */ fullWidth: {}, /* Styles applied to the `input` element. */ input: {}, /* Styles applied to the `input` element if `margin="dense"`. */ inputMarginDense: {}, /* Styles applied to the `input` element if `multiline={true}`. */ inputMultiline: {}, /* Styles applied to the `input` element if `type="search"`. */ inputTypeSearch: {} }; }; const Input = React.forwardRef(function Input(props, ref) { const { disableUnderline, classes, fullWidth = false, inputComponent = 'input', multiline = false, type = 'text' } = props, other = _objectWithoutPropertiesLoose(props, ["disableUnderline", "classes", "fullWidth", "inputComponent", "multiline", "type"]); return React.createElement(InputBase, _extends({ classes: _extends({}, classes, { root: clsx(classes.root, !disableUnderline && classes.underline), underline: null }), fullWidth: fullWidth, inputComponent: inputComponent, multiline: multiline, ref: ref, type: type }, other)); }); process.env.NODE_ENV !== "production" ? Input.propTypes = { /** * This prop helps users to fill forms faster, especially on mobile devices. * The name can be confusing, as it's more like an autofill. * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill). */ autoComplete: PropTypes.string, /** * If `true`, the `input` element will be focused during the first mount. */ autoFocus: PropTypes.bool, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * The CSS class name of the wrapper element. */ className: PropTypes.string, /** * The color of the component. It supports those theme colors that make sense for this component. */ color: PropTypes.oneOf(['primary', 'secondary']), /** * The default `input` element value. Use when the component is not controlled. */ defaultValue: PropTypes.any, /** * If `true`, the `input` element will be disabled. */ disabled: PropTypes.bool, /** * If `true`, the input will not have an underline. */ disableUnderline: PropTypes.bool, /** * End `InputAdornment` for this component. */ endAdornment: PropTypes.node, /** * If `true`, the input will indicate an error. This is normally obtained via context from * FormControl. */ error: PropTypes.bool, /** * If `true`, the input will take up the full width of its container. */ fullWidth: PropTypes.bool, /** * The id of the `input` element. */ id: PropTypes.string, /** * The component used for the native input. * Either a string to use a DOM element or a component. */ inputComponent: PropTypes.elementType, /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. */ inputProps: PropTypes.object, /** * Pass a ref to the `input` element. */ inputRef: refType, /** * If `dense`, will adjust vertical spacing. This is normally obtained via context from * FormControl. */ margin: PropTypes.oneOf(['dense', 'none']), /** * If `true`, a textarea element will be rendered. */ multiline: PropTypes.bool, /** * Name attribute of the `input` element. */ name: PropTypes.string, /** * Callback fired when the value is changed. * * @param {object} event The event source of the callback. * You can pull out the new value by accessing `event.target.value` (string). */ onChange: PropTypes.func, /** * The short hint displayed in the input before the user enters a value. */ placeholder: PropTypes.string, /** * It prevents the user from changing the value of the field * (not from interacting with the field). */ readOnly: PropTypes.bool, /** * If `true`, the `input` element will be required. */ required: PropTypes.bool, /** * Number of rows to display when multiline option is set to true. */ rows: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * Maximum number of rows to display when multiline option is set to true. */ rowsMax: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * Start `InputAdornment` for this component. */ startAdornment: PropTypes.node, /** * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types). */ type: PropTypes.string, /** * The value of the `input` element, required for a controlled component. */ value: PropTypes.any } : void 0; Input.muiName = 'Input'; export default withStyles(styles, { name: 'MuiInput' })(Input);
ajax/libs/primereact/6.5.0-rc.1/confirmdialog/confirmdialog.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { DomHandler, classNames, ObjectUtils } from 'primereact/utils'; import { Dialog } from 'primereact/dialog'; import { Button } from 'primereact/button'; import { localeOption } from 'primereact/api'; import { Portal } from 'primereact/portal'; function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var propTypes = {exports: {}}; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; var ReactPropTypesSecret_1 = ReactPropTypesSecret$1; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = ReactPropTypesSecret_1; function emptyFunction() {} function emptyFunctionWithReset() {} emptyFunctionWithReset.resetWarningCache = emptyFunction; var factoryWithThrowingShims = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; } shim.isRequired = shim; function getShim() { return shim; } // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod propTypes.exports = factoryWithThrowingShims(); } var PropTypes = propTypes.exports; function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function confirmDialog(props) { var appendTo = props.appendTo || document.body; var confirmDialogWrapper = document.createDocumentFragment(); DomHandler.appendChild(confirmDialogWrapper, appendTo); props = _objectSpread(_objectSpread({}, props), { visible: props.visible === undefined ? true : props.visible }); var confirmDialogEl = /*#__PURE__*/React.createElement(ConfirmDialog, props); ReactDOM.render(confirmDialogEl, confirmDialogWrapper); var updateConfirmDialog = function updateConfirmDialog(newProps) { props = _objectSpread(_objectSpread({}, props), newProps); ReactDOM.render( /*#__PURE__*/React.cloneElement(confirmDialogEl, props), confirmDialogWrapper); }; return { _destroy: function _destroy() { ReactDOM.unmountComponentAtNode(confirmDialogWrapper); }, show: function show() { updateConfirmDialog({ visible: true, onHide: function onHide() { updateConfirmDialog({ visible: false }); // reset } }); }, hide: function hide() { updateConfirmDialog({ visible: false }); }, update: function update(newProps) { updateConfirmDialog(newProps); } }; } var ConfirmDialog = /*#__PURE__*/function (_Component) { _inherits(ConfirmDialog, _Component); var _super = _createSuper(ConfirmDialog); function ConfirmDialog(props) { var _this; _classCallCheck(this, ConfirmDialog); _this = _super.call(this, props); _this.state = { visible: props.visible }; _this.reject = _this.reject.bind(_assertThisInitialized(_this)); _this.accept = _this.accept.bind(_assertThisInitialized(_this)); _this.hide = _this.hide.bind(_assertThisInitialized(_this)); return _this; } _createClass(ConfirmDialog, [{ key: "acceptLabel", value: function acceptLabel() { return this.props.acceptLabel || localeOption('accept'); } }, { key: "rejectLabel", value: function rejectLabel() { return this.props.rejectLabel || localeOption('reject'); } }, { key: "accept", value: function accept() { if (this.props.accept) { this.props.accept(); } this.hide('accept'); } }, { key: "reject", value: function reject() { if (this.props.reject) { this.props.reject(); } this.hide('reject'); } }, { key: "show", value: function show() { this.setState({ visible: true }); } }, { key: "hide", value: function hide(result) { var _this2 = this; this.setState({ visible: false }, function () { if (_this2.props.onHide) { _this2.props.onHide(result); } }); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.visible !== this.props.visible) { this.setState({ visible: this.props.visible }); } } }, { key: "renderFooter", value: function renderFooter() { var acceptClassName = classNames('p-confirm-dialog-accept', this.props.acceptClassName); var rejectClassName = classNames('p-confirm-dialog-reject', { 'p-button-text': !this.props.rejectClassName }, this.props.rejectClassName); var content = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, { label: this.rejectLabel(), icon: this.props.rejectIcon, className: rejectClassName, onClick: this.reject }), /*#__PURE__*/React.createElement(Button, { label: this.acceptLabel(), icon: this.props.acceptIcon, className: acceptClassName, onClick: this.accept, autoFocus: true })); if (this.props.footer) { var defaultContentOptions = { accept: this.accept, reject: this.reject, acceptClassName: acceptClassName, rejectClassName: rejectClassName, acceptLabel: this.acceptLabel(), rejectLabel: this.rejectLabel(), element: content, props: this.props }; return ObjectUtils.getJSXElement(this.props.footer, defaultContentOptions); } return content; } }, { key: "renderElement", value: function renderElement() { var className = classNames('p-confirm-dialog', this.props.className); var iconClassName = classNames('p-confirm-dialog-icon', this.props.icon); var dialogProps = ObjectUtils.findDiffKeys(this.props, ConfirmDialog.defaultProps); var message = ObjectUtils.getJSXElement(this.props.message, this.props); var footer = this.renderFooter(); return /*#__PURE__*/React.createElement(Dialog, _extends({ visible: this.state.visible }, dialogProps, { className: className, footer: footer, onHide: this.hide, breakpoints: this.props.breakpoints }), /*#__PURE__*/React.createElement("i", { className: iconClassName }), /*#__PURE__*/React.createElement("span", { className: "p-confirm-dialog-message" }, message)); } }, { key: "render", value: function render() { var element = this.renderElement(); return /*#__PURE__*/React.createElement(Portal, { element: element, appendTo: this.props.appendTo }); } }]); return ConfirmDialog; }(Component); _defineProperty(ConfirmDialog, "defaultProps", { visible: false, message: null, rejectLabel: null, acceptLabel: null, icon: null, rejectIcon: null, acceptIcon: null, rejectClassName: null, acceptClassName: null, className: null, appendTo: null, footer: null, breakpoints: null, onHide: null, accept: null, reject: null }); _defineProperty(ConfirmDialog, "propTypes", { visible: PropTypes.bool, message: PropTypes.any, rejectLabel: PropTypes.string, acceptLabel: PropTypes.string, icon: PropTypes.string, rejectIcon: PropTypes.string, acceptIcon: PropTypes.string, rejectClassName: PropTypes.string, acceptClassName: PropTypes.string, appendTo: PropTypes.oneOfType([PropTypes.object, PropTypes.string]), className: PropTypes.string, footer: PropTypes.any, breakpoints: PropTypes.object, onHide: PropTypes.func, accept: PropTypes.func, reject: PropTypes.func }); export { ConfirmDialog, confirmDialog };
ajax/libs/react-helmet/6.0.0-beta.2/es/Helmet.js
cdnjs/cdnjs
import PropTypes from 'prop-types'; import withSideEffect from 'react-side-effect'; import isEqual from 'react-fast-compare'; import React from 'react'; import objectAssign from 'object-assign'; var ATTRIBUTE_NAMES = { BODY: "bodyAttributes", HTML: "htmlAttributes", TITLE: "titleAttributes" }; var TAG_NAMES = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link", META: "meta", NOSCRIPT: "noscript", SCRIPT: "script", STYLE: "style", TITLE: "title" }; var VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) { return TAG_NAMES[name]; }); var TAG_PROPERTIES = { CHARSET: "charset", CSS_TEXT: "cssText", HREF: "href", HTTPEQUIV: "http-equiv", INNER_HTML: "innerHTML", ITEM_PROP: "itemprop", NAME: "name", PROPERTY: "property", REL: "rel", SRC: "src", TARGET: "target" }; var REACT_TAG_MAP = { accesskey: "accessKey", charset: "charSet", class: "className", contenteditable: "contentEditable", contextmenu: "contextMenu", "http-equiv": "httpEquiv", itemprop: "itemProp", tabindex: "tabIndex" }; var HELMET_PROPS = { DEFAULT_TITLE: "defaultTitle", DEFER: "defer", ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters", ON_CHANGE_CLIENT_STATE: "onChangeClientState", TITLE_TEMPLATE: "titleTemplate" }; var HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) { obj[REACT_TAG_MAP[key]] = key; return obj; }, {}); var SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE]; var HELMET_ATTRIBUTE = "data-react-helmet"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; var createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }; var objectWithoutProperties = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; var possibleConstructorReturn = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }; var encodeSpecialCharacters = function encodeSpecialCharacters(str) { var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (encode === false) { return String(str); } return String(str).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"); }; var getTitleFromPropsList = function getTitleFromPropsList(propsList) { var innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE); var innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE); if (innermostTemplate && innermostTitle) { // use function arg to avoid need to escape $ characters return innermostTemplate.replace(/%s/g, function () { return Array.isArray(innermostTitle) ? innermostTitle.join("") : innermostTitle; }); } var innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE); return innermostTitle || innermostDefaultTitle || undefined; }; var getOnChangeClientState = function getOnChangeClientState(propsList) { return getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {}; }; var getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) { return propsList.filter(function (props) { return typeof props[tagType] !== "undefined"; }).map(function (props) { return props[tagType]; }).reduce(function (tagAttrs, current) { return _extends({}, tagAttrs, current); }, {}); }; var getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) { return propsList.filter(function (props) { return typeof props[TAG_NAMES.BASE] !== "undefined"; }).map(function (props) { return props[TAG_NAMES.BASE]; }).reverse().reduce(function (innermostBaseTag, tag) { if (!innermostBaseTag.length) { var keys = Object.keys(tag); for (var i = 0; i < keys.length; i++) { var attributeKey = keys[i]; var lowerCaseAttributeKey = attributeKey.toLowerCase(); if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) { return innermostBaseTag.concat(tag); } } } return innermostBaseTag; }, []); }; var getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) { // Calculate list of tags, giving priority innermost component (end of the propslist) var approvedSeenTags = {}; return propsList.filter(function (props) { if (Array.isArray(props[tagName])) { return true; } if (typeof props[tagName] !== "undefined") { warn("Helmet: " + tagName + " should be of type \"Array\". Instead found type \"" + _typeof(props[tagName]) + "\""); } return false; }).map(function (props) { return props[tagName]; }).reverse().reduce(function (approvedTags, instanceTags) { var instanceSeenTags = {}; instanceTags.filter(function (tag) { var primaryAttributeKey = void 0; var keys = Object.keys(tag); for (var i = 0; i < keys.length; i++) { var attributeKey = keys[i]; var lowerCaseAttributeKey = attributeKey.toLowerCase(); // Special rule with link tags, since rel and href are both primary tags, rel takes priority if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === "canonical") && !(lowerCaseAttributeKey === TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === "stylesheet")) { primaryAttributeKey = lowerCaseAttributeKey; } // Special case for innerHTML which doesn't work lowercased if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === TAG_PROPERTIES.INNER_HTML || attributeKey === TAG_PROPERTIES.CSS_TEXT || attributeKey === TAG_PROPERTIES.ITEM_PROP)) { primaryAttributeKey = attributeKey; } } if (!primaryAttributeKey || !tag[primaryAttributeKey]) { return false; } var value = tag[primaryAttributeKey].toLowerCase(); if (!approvedSeenTags[primaryAttributeKey]) { approvedSeenTags[primaryAttributeKey] = {}; } if (!instanceSeenTags[primaryAttributeKey]) { instanceSeenTags[primaryAttributeKey] = {}; } if (!approvedSeenTags[primaryAttributeKey][value]) { instanceSeenTags[primaryAttributeKey][value] = true; return true; } return false; }).reverse().forEach(function (tag) { return approvedTags.push(tag); }); // Update seen tags with tags from this instance var keys = Object.keys(instanceSeenTags); for (var i = 0; i < keys.length; i++) { var attributeKey = keys[i]; var tagUnion = objectAssign({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]); approvedSeenTags[attributeKey] = tagUnion; } return approvedTags; }, []).reverse(); }; var getInnermostProperty = function getInnermostProperty(propsList, property) { for (var i = propsList.length - 1; i >= 0; i--) { var props = propsList[i]; if (props.hasOwnProperty(property)) { return props[property]; } } return null; }; var reducePropsToState = function reducePropsToState(propsList) { return { baseTag: getBaseTagFromPropsList([TAG_PROPERTIES.HREF, TAG_PROPERTIES.TARGET], propsList), bodyAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY, propsList), defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER), encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS), htmlAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML, propsList), linkTags: getTagsFromPropsList(TAG_NAMES.LINK, [TAG_PROPERTIES.REL, TAG_PROPERTIES.HREF], propsList), metaTags: getTagsFromPropsList(TAG_NAMES.META, [TAG_PROPERTIES.NAME, TAG_PROPERTIES.CHARSET, TAG_PROPERTIES.HTTPEQUIV, TAG_PROPERTIES.PROPERTY, TAG_PROPERTIES.ITEM_PROP], propsList), noscriptTags: getTagsFromPropsList(TAG_NAMES.NOSCRIPT, [TAG_PROPERTIES.INNER_HTML], propsList), onChangeClientState: getOnChangeClientState(propsList), scriptTags: getTagsFromPropsList(TAG_NAMES.SCRIPT, [TAG_PROPERTIES.SRC, TAG_PROPERTIES.INNER_HTML], propsList), styleTags: getTagsFromPropsList(TAG_NAMES.STYLE, [TAG_PROPERTIES.CSS_TEXT], propsList), title: getTitleFromPropsList(propsList), titleAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE, propsList) }; }; var rafPolyfill = function () { var clock = Date.now(); return function (callback) { var currentTime = Date.now(); if (currentTime - clock > 16) { clock = currentTime; callback(currentTime); } else { setTimeout(function () { rafPolyfill(callback); }, 0); } }; }(); var cafPolyfill = function cafPolyfill(id) { return clearTimeout(id); }; var requestAnimationFrame = typeof window !== "undefined" ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill; var cancelAnimationFrame = typeof window !== "undefined" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill; var warn = function warn(msg) { return console && typeof console.warn === "function" && console.warn(msg); }; var _helmetCallback = null; var handleClientStateChange = function handleClientStateChange(newState) { if (_helmetCallback) { cancelAnimationFrame(_helmetCallback); } if (newState.defer) { _helmetCallback = requestAnimationFrame(function () { commitTagChanges(newState, function () { _helmetCallback = null; }); }); } else { commitTagChanges(newState); _helmetCallback = null; } }; var commitTagChanges = function commitTagChanges(newState, cb) { var baseTag = newState.baseTag, bodyAttributes = newState.bodyAttributes, htmlAttributes = newState.htmlAttributes, linkTags = newState.linkTags, metaTags = newState.metaTags, noscriptTags = newState.noscriptTags, onChangeClientState = newState.onChangeClientState, scriptTags = newState.scriptTags, styleTags = newState.styleTags, title = newState.title, titleAttributes = newState.titleAttributes; updateAttributes(TAG_NAMES.BODY, bodyAttributes); updateAttributes(TAG_NAMES.HTML, htmlAttributes); updateTitle(title, titleAttributes); var tagUpdates = { baseTag: updateTags(TAG_NAMES.BASE, baseTag), linkTags: updateTags(TAG_NAMES.LINK, linkTags), metaTags: updateTags(TAG_NAMES.META, metaTags), noscriptTags: updateTags(TAG_NAMES.NOSCRIPT, noscriptTags), scriptTags: updateTags(TAG_NAMES.SCRIPT, scriptTags), styleTags: updateTags(TAG_NAMES.STYLE, styleTags) }; var addedTags = {}; var removedTags = {}; Object.keys(tagUpdates).forEach(function (tagType) { var _tagUpdates$tagType = tagUpdates[tagType], newTags = _tagUpdates$tagType.newTags, oldTags = _tagUpdates$tagType.oldTags; if (newTags.length) { addedTags[tagType] = newTags; } if (oldTags.length) { removedTags[tagType] = tagUpdates[tagType].oldTags; } }); cb && cb(); onChangeClientState(newState, addedTags, removedTags); }; var flattenArray = function flattenArray(possibleArray) { return Array.isArray(possibleArray) ? possibleArray.join("") : possibleArray; }; var updateTitle = function updateTitle(title, attributes) { if (typeof title !== "undefined" && document.title !== title) { document.title = flattenArray(title); } updateAttributes(TAG_NAMES.TITLE, attributes); }; var updateAttributes = function updateAttributes(tagName, attributes) { var elementTag = document.getElementsByTagName(tagName)[0]; if (!elementTag) { return; } var helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE); var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(",") : []; var attributesToRemove = [].concat(helmetAttributes); var attributeKeys = Object.keys(attributes); for (var i = 0; i < attributeKeys.length; i++) { var attribute = attributeKeys[i]; var value = attributes[attribute] || ""; if (elementTag.getAttribute(attribute) !== value) { elementTag.setAttribute(attribute, value); } if (helmetAttributes.indexOf(attribute) === -1) { helmetAttributes.push(attribute); } var indexToSave = attributesToRemove.indexOf(attribute); if (indexToSave !== -1) { attributesToRemove.splice(indexToSave, 1); } } for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) { elementTag.removeAttribute(attributesToRemove[_i]); } if (helmetAttributes.length === attributesToRemove.length) { elementTag.removeAttribute(HELMET_ATTRIBUTE); } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(",")) { elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(",")); } }; var updateTags = function updateTags(type, tags) { var headElement = document.head || document.querySelector(TAG_NAMES.HEAD); var tagNodes = headElement.querySelectorAll(type + "[" + HELMET_ATTRIBUTE + "]"); var oldTags = Array.prototype.slice.call(tagNodes); var newTags = []; var indexToDelete = void 0; if (tags && tags.length) { tags.forEach(function (tag) { var newElement = document.createElement(type); for (var attribute in tag) { if (tag.hasOwnProperty(attribute)) { if (attribute === TAG_PROPERTIES.INNER_HTML) { newElement.innerHTML = tag.innerHTML; } else if (attribute === TAG_PROPERTIES.CSS_TEXT) { if (newElement.styleSheet) { newElement.styleSheet.cssText = tag.cssText; } else { newElement.appendChild(document.createTextNode(tag.cssText)); } } else { var value = typeof tag[attribute] === "undefined" ? "" : tag[attribute]; newElement.setAttribute(attribute, value); } } } newElement.setAttribute(HELMET_ATTRIBUTE, "true"); // Remove a duplicate tag from domTagstoRemove, so it isn't cleared. if (oldTags.some(function (existingTag, index) { indexToDelete = index; return newElement.isEqualNode(existingTag); })) { oldTags.splice(indexToDelete, 1); } else { newTags.push(newElement); } }); } oldTags.forEach(function (tag) { return tag.parentNode.removeChild(tag); }); newTags.forEach(function (tag) { return headElement.appendChild(tag); }); return { oldTags: oldTags, newTags: newTags }; }; var generateElementAttributesAsString = function generateElementAttributesAsString(attributes) { return Object.keys(attributes).reduce(function (str, key) { var attr = typeof attributes[key] !== "undefined" ? key + "=\"" + attributes[key] + "\"" : "" + key; return str ? str + " " + attr : attr; }, ""); }; var generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) { var attributeString = generateElementAttributesAsString(attributes); var flattenedTitle = flattenArray(title); return attributeString ? "<" + type + " " + HELMET_ATTRIBUTE + "=\"true\" " + attributeString + ">" + encodeSpecialCharacters(flattenedTitle, encode) + "</" + type + ">" : "<" + type + " " + HELMET_ATTRIBUTE + "=\"true\">" + encodeSpecialCharacters(flattenedTitle, encode) + "</" + type + ">"; }; var generateTagsAsString = function generateTagsAsString(type, tags, encode) { return tags.reduce(function (str, tag) { var attributeHtml = Object.keys(tag).filter(function (attribute) { return !(attribute === TAG_PROPERTIES.INNER_HTML || attribute === TAG_PROPERTIES.CSS_TEXT); }).reduce(function (string, attribute) { var attr = typeof tag[attribute] === "undefined" ? attribute : attribute + "=\"" + encodeSpecialCharacters(tag[attribute], encode) + "\""; return string ? string + " " + attr : attr; }, ""); var tagContent = tag.innerHTML || tag.cssText || ""; var isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1; return str + "<" + type + " " + HELMET_ATTRIBUTE + "=\"true\" " + attributeHtml + (isSelfClosing ? "/>" : ">" + tagContent + "</" + type + ">"); }, ""); }; var convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) { var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; return Object.keys(attributes).reduce(function (obj, key) { obj[REACT_TAG_MAP[key] || key] = attributes[key]; return obj; }, initProps); }; var convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) { var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; return Object.keys(props).reduce(function (obj, key) { obj[HTML_TAG_MAP[key] || key] = props[key]; return obj; }, initAttributes); }; var generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) { var _initProps; // assigning into an array to define toString function on it var initProps = (_initProps = { key: title }, _initProps[HELMET_ATTRIBUTE] = true, _initProps); var props = convertElementAttributestoReactProps(attributes, initProps); return [React.createElement(TAG_NAMES.TITLE, props, title)]; }; var generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) { return tags.map(function (tag, i) { var _mappedTag; var mappedTag = (_mappedTag = { key: i }, _mappedTag[HELMET_ATTRIBUTE] = true, _mappedTag); Object.keys(tag).forEach(function (attribute) { var mappedAttribute = REACT_TAG_MAP[attribute] || attribute; if (mappedAttribute === TAG_PROPERTIES.INNER_HTML || mappedAttribute === TAG_PROPERTIES.CSS_TEXT) { var content = tag.innerHTML || tag.cssText; mappedTag.dangerouslySetInnerHTML = { __html: content }; } else { mappedTag[mappedAttribute] = tag[attribute]; } }); return React.createElement(type, mappedTag); }); }; var getMethodsForTag = function getMethodsForTag(type, tags, encode) { switch (type) { case TAG_NAMES.TITLE: return { toComponent: function toComponent() { return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode); }, toString: function toString() { return generateTitleAsString(type, tags.title, tags.titleAttributes, encode); } }; case ATTRIBUTE_NAMES.BODY: case ATTRIBUTE_NAMES.HTML: return { toComponent: function toComponent() { return convertElementAttributestoReactProps(tags); }, toString: function toString() { return generateElementAttributesAsString(tags); } }; default: return { toComponent: function toComponent() { return generateTagsAsReactComponent(type, tags); }, toString: function toString() { return generateTagsAsString(type, tags, encode); } }; } }; var mapStateOnServer = function mapStateOnServer(_ref) { var baseTag = _ref.baseTag, bodyAttributes = _ref.bodyAttributes, encode = _ref.encode, htmlAttributes = _ref.htmlAttributes, linkTags = _ref.linkTags, metaTags = _ref.metaTags, noscriptTags = _ref.noscriptTags, scriptTags = _ref.scriptTags, styleTags = _ref.styleTags, _ref$title = _ref.title, title = _ref$title === undefined ? "" : _ref$title, titleAttributes = _ref.titleAttributes; return { base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode), bodyAttributes: getMethodsForTag(ATTRIBUTE_NAMES.BODY, bodyAttributes, encode), htmlAttributes: getMethodsForTag(ATTRIBUTE_NAMES.HTML, htmlAttributes, encode), link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode), meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode), noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode), script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode), style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode), title: getMethodsForTag(TAG_NAMES.TITLE, { title: title, titleAttributes: titleAttributes }, encode) }; }; var Helmet = function Helmet(Component) { var _class, _temp; return _temp = _class = function (_React$Component) { inherits(HelmetWrapper, _React$Component); function HelmetWrapper() { classCallCheck(this, HelmetWrapper); return possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return !isEqual(this.props, nextProps); }; HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) { if (!nestedChildren) { return null; } switch (child.type) { case TAG_NAMES.SCRIPT: case TAG_NAMES.NOSCRIPT: return { innerHTML: nestedChildren }; case TAG_NAMES.STYLE: return { cssText: nestedChildren }; } throw new Error("<" + child.type + " /> elements are self-closing and can not contain children. Refer to our API for more information."); }; HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) { var _babelHelpers$extends; var child = _ref.child, arrayTypeChildren = _ref.arrayTypeChildren, newChildProps = _ref.newChildProps, nestedChildren = _ref.nestedChildren; return _extends({}, arrayTypeChildren, (_babelHelpers$extends = {}, _babelHelpers$extends[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _babelHelpers$extends)); }; HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) { var _babelHelpers$extends2, _babelHelpers$extends3; var child = _ref2.child, newProps = _ref2.newProps, newChildProps = _ref2.newChildProps, nestedChildren = _ref2.nestedChildren; switch (child.type) { case TAG_NAMES.TITLE: return _extends({}, newProps, (_babelHelpers$extends2 = {}, _babelHelpers$extends2[child.type] = nestedChildren, _babelHelpers$extends2.titleAttributes = _extends({}, newChildProps), _babelHelpers$extends2)); case TAG_NAMES.BODY: return _extends({}, newProps, { bodyAttributes: _extends({}, newChildProps) }); case TAG_NAMES.HTML: return _extends({}, newProps, { htmlAttributes: _extends({}, newChildProps) }); } return _extends({}, newProps, (_babelHelpers$extends3 = {}, _babelHelpers$extends3[child.type] = _extends({}, newChildProps), _babelHelpers$extends3)); }; HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) { var newFlattenedProps = _extends({}, newProps); Object.keys(arrayTypeChildren).forEach(function (arrayChildName) { var _babelHelpers$extends4; newFlattenedProps = _extends({}, newFlattenedProps, (_babelHelpers$extends4 = {}, _babelHelpers$extends4[arrayChildName] = arrayTypeChildren[arrayChildName], _babelHelpers$extends4)); }); return newFlattenedProps; }; HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) { if (process.env.NODE_ENV !== "production") { if (!VALID_TAG_NAMES.some(function (name) { return child.type === name; })) { if (typeof child.type === "function") { return warn("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information."); } return warn("Only elements types " + VALID_TAG_NAMES.join(", ") + " are allowed. Helmet does not support rendering <" + child.type + "> elements. Refer to our API for more information."); } if (nestedChildren && typeof nestedChildren !== "string" && (!Array.isArray(nestedChildren) || nestedChildren.some(function (nestedChild) { return typeof nestedChild !== "string"; }))) { throw new Error("Helmet expects a string as a child of <" + child.type + ">. Did you forget to wrap your children in braces? ( <" + child.type + ">{``}</" + child.type + "> ) Refer to our API for more information."); } } return true; }; HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) { var _this2 = this; var arrayTypeChildren = {}; React.Children.forEach(children, function (child) { if (!child || !child.props) { return; } var _child$props = child.props, nestedChildren = _child$props.children, childProps = objectWithoutProperties(_child$props, ["children"]); var newChildProps = convertReactPropstoHtmlAttributes(childProps); _this2.warnOnInvalidChildren(child, nestedChildren); switch (child.type) { case TAG_NAMES.LINK: case TAG_NAMES.META: case TAG_NAMES.NOSCRIPT: case TAG_NAMES.SCRIPT: case TAG_NAMES.STYLE: arrayTypeChildren = _this2.flattenArrayTypeChildren({ child: child, arrayTypeChildren: arrayTypeChildren, newChildProps: newChildProps, nestedChildren: nestedChildren }); break; default: newProps = _this2.mapObjectTypeChildren({ child: child, newProps: newProps, newChildProps: newChildProps, nestedChildren: nestedChildren }); break; } }); newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps); return newProps; }; HelmetWrapper.prototype.render = function render() { var _props = this.props, children = _props.children, props = objectWithoutProperties(_props, ["children"]); var newProps = _extends({}, props); if (children) { newProps = this.mapChildrenToProps(children, newProps); } return React.createElement(Component, newProps); }; createClass(HelmetWrapper, null, [{ key: "canUseDOM", // Component.peek comes from react-side-effect: // For testing, you may use a static peek() method available on the returned component. // It lets you get the current state without resetting the mounted instance stack. // Don’t use it for anything other than testing. /** * @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"} * @param {Object} bodyAttributes: {"className": "root"} * @param {String} defaultTitle: "Default Title" * @param {Boolean} defer: true * @param {Boolean} encodeSpecialCharacters: true * @param {Object} htmlAttributes: {"lang": "en", "amp": undefined} * @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}] * @param {Array} meta: [{"name": "description", "content": "Test description"}] * @param {Array} noscript: [{"innerHTML": "<img src='http://mysite.com/js/test.js'"}] * @param {Function} onChangeClientState: "(newState) => console.log(newState)" * @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}] * @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}] * @param {String} title: "Title" * @param {Object} titleAttributes: {"itemprop": "name"} * @param {String} titleTemplate: "MySite.com - %s" */ set: function set$$1(canUseDOM) { Component.canUseDOM = canUseDOM; } }]); return HelmetWrapper; }(React.Component), _class.propTypes = { base: PropTypes.object, bodyAttributes: PropTypes.object, children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]), defaultTitle: PropTypes.string, defer: PropTypes.bool, encodeSpecialCharacters: PropTypes.bool, htmlAttributes: PropTypes.object, link: PropTypes.arrayOf(PropTypes.object), meta: PropTypes.arrayOf(PropTypes.object), noscript: PropTypes.arrayOf(PropTypes.object), onChangeClientState: PropTypes.func, script: PropTypes.arrayOf(PropTypes.object), style: PropTypes.arrayOf(PropTypes.object), title: PropTypes.string, titleAttributes: PropTypes.object, titleTemplate: PropTypes.string }, _class.defaultProps = { defer: true, encodeSpecialCharacters: true }, _class.peek = Component.peek, _class.rewind = function () { var mappedState = Component.rewind(); if (!mappedState) { // provide fallback if mappedState is undefined mappedState = mapStateOnServer({ baseTag: [], bodyAttributes: {}, encodeSpecialCharacters: true, htmlAttributes: {}, linkTags: [], metaTags: [], noscriptTags: [], scriptTags: [], styleTags: [], title: "", titleAttributes: {} }); } return mappedState; }, _temp; }; var NullComponent = function NullComponent() { return null; }; var HelmetSideEffects = withSideEffect(reducePropsToState, handleClientStateChange, mapStateOnServer)(NullComponent); var HelmetExport = Helmet(HelmetSideEffects); HelmetExport.renderStatic = HelmetExport.rewind; export { HelmetExport as Helmet };
ajax/libs/material-ui/4.11.1/esm/utils/createSvgIcon.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import SvgIcon from '../SvgIcon'; /** * Private module reserved for @material-ui/x packages. */ export default function createSvgIcon(path, displayName) { var Component = function Component(props, ref) { return /*#__PURE__*/React.createElement(SvgIcon, _extends({ ref: ref }, props), path); }; if (process.env.NODE_ENV !== 'production') { // Need to set `displayName` on the inner component for React.memo. // React prior to 16.14 ignores `displayName` on the wrapper. Component.displayName = "".concat(displayName, "Icon"); } Component.muiName = SvgIcon.muiName; return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component)); }
ajax/libs/material-ui/4.9.4/esm/FormControl/FormControl.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { isFilled, isAdornedStart } from '../InputBase/utils'; import withStyles from '../styles/withStyles'; import capitalize from '../utils/capitalize'; import isMuiElement from '../utils/isMuiElement'; import FormControlContext from './FormControlContext'; export var styles = { /* Styles applied to the root element. */ root: { display: 'inline-flex', flexDirection: 'column', position: 'relative', // Reset fieldset default style. minWidth: 0, padding: 0, margin: 0, border: 0, zIndex: 0, // Fix blur label text issue verticalAlign: 'top' // Fix alignment issue on Safari. }, /* Styles applied to the root element if `margin="normal"`. */ marginNormal: { marginTop: 16, marginBottom: 8 }, /* Styles applied to the root element if `margin="dense"`. */ marginDense: { marginTop: 8, marginBottom: 4 }, /* Styles applied to the root element if `fullWidth={true}`. */ fullWidth: { width: '100%' } }; /** * Provides context such as filled/focused/error/required for form inputs. * Relying on the context provides high flexibility and ensures that the state always stays * consistent across the children of the `FormControl`. * This context is used by the following components: * * - FormLabel * - FormHelperText * - Input * - InputLabel * * You can find one composition example below and more going to [the demos](/components/text-fields/#components). * * ```jsx * <FormControl> * <InputLabel htmlFor="my-input">Email address</InputLabel> * <Input id="my-input" aria-describedby="my-helper-text" /> * <FormHelperText id="my-helper-text">We'll never share your email.</FormHelperText> * </FormControl> * ``` * * ⚠️Only one input can be used within a FormControl. */ var FormControl = React.forwardRef(function FormControl(props, ref) { var children = props.children, classes = props.classes, className = props.className, _props$color = props.color, color = _props$color === void 0 ? 'primary' : _props$color, _props$component = props.component, Component = _props$component === void 0 ? 'div' : _props$component, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$error = props.error, error = _props$error === void 0 ? false : _props$error, _props$fullWidth = props.fullWidth, fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, _props$hiddenLabel = props.hiddenLabel, hiddenLabel = _props$hiddenLabel === void 0 ? false : _props$hiddenLabel, _props$margin = props.margin, margin = _props$margin === void 0 ? 'none' : _props$margin, _props$required = props.required, required = _props$required === void 0 ? false : _props$required, size = props.size, _props$variant = props.variant, variant = _props$variant === void 0 ? 'standard' : _props$variant, other = _objectWithoutProperties(props, ["children", "classes", "className", "color", "component", "disabled", "error", "fullWidth", "hiddenLabel", "margin", "required", "size", "variant"]); var _React$useState = React.useState(function () { // We need to iterate through the children and find the Input in order // to fully support server-side rendering. var initialAdornedStart = false; if (children) { React.Children.forEach(children, function (child) { if (!isMuiElement(child, ['Input', 'Select'])) { return; } var input = isMuiElement(child, ['Select']) ? child.props.input : child; if (input && isAdornedStart(input.props)) { initialAdornedStart = true; } }); } return initialAdornedStart; }), adornedStart = _React$useState[0], setAdornedStart = _React$useState[1]; var _React$useState2 = React.useState(function () { // We need to iterate through the children and find the Input in order // to fully support server-side rendering. var initialFilled = false; if (children) { React.Children.forEach(children, function (child) { if (!isMuiElement(child, ['Input', 'Select'])) { return; } if (isFilled(child.props, true)) { initialFilled = true; } }); } return initialFilled; }), filled = _React$useState2[0], setFilled = _React$useState2[1]; var _React$useState3 = React.useState(false), focused = _React$useState3[0], setFocused = _React$useState3[1]; if (disabled && focused) { setFocused(false); } var registerEffect; if (process.env.NODE_ENV !== 'production') { // eslint-disable-next-line react-hooks/rules-of-hooks var registeredInput = React.useRef(false); registerEffect = function registerEffect() { if (registeredInput.current) { console.error(['Material-UI: there are multiple InputBase components inside a FormControl.', 'This is not supported. It might cause infinite rendering loops.', 'Only use one InputBase.'].join('\n')); } registeredInput.current = true; return function () { registeredInput.current = false; }; }; } var onFilled = React.useCallback(function () { setFilled(true); }, []); var onEmpty = React.useCallback(function () { setFilled(false); }, []); var childContext = { adornedStart: adornedStart, setAdornedStart: setAdornedStart, color: color, disabled: disabled, error: error, filled: filled, focused: focused, fullWidth: fullWidth, hiddenLabel: hiddenLabel, margin: (size === 'small' ? 'dense' : undefined) || margin, onBlur: function onBlur() { setFocused(false); }, onEmpty: onEmpty, onFilled: onFilled, onFocus: function onFocus() { setFocused(true); }, registerEffect: registerEffect, required: required, variant: variant }; return React.createElement(FormControlContext.Provider, { value: childContext }, React.createElement(Component, _extends({ className: clsx(classes.root, className, margin !== 'none' && classes["margin".concat(capitalize(margin))], fullWidth && classes.fullWidth), ref: ref }, other), children)); }); process.env.NODE_ENV !== "production" ? FormControl.propTypes = { /** * The contents of the form control. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * The color of the component. It supports those theme colors that make sense for this component. */ color: PropTypes.oneOf(['primary', 'secondary']), /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: PropTypes.elementType, /** * If `true`, the label, input and helper text should be displayed in a disabled state. */ disabled: PropTypes.bool, /** * If `true`, the label should be displayed in an error state. */ error: PropTypes.bool, /** * If `true`, the component will take up the full width of its container. */ fullWidth: PropTypes.bool, /** * If `true`, the label will be hidden. * This is used to increase density for a `FilledInput`. * Be sure to add `aria-label` to the `input` element. */ hiddenLabel: PropTypes.bool, /** * If `dense` or `normal`, will adjust vertical spacing of this and contained components. */ margin: PropTypes.oneOf(['none', 'dense', 'normal']), /** * If `true`, the label will indicate that the input is required. */ required: PropTypes.bool, /** * The size of the text field. */ size: PropTypes.oneOf(['small', 'medium']), /** * The variant to use. */ variant: PropTypes.oneOf(['standard', 'outlined', 'filled']) } : void 0; export default withStyles(styles, { name: 'MuiFormControl' })(FormControl);
ajax/libs/material-ui/4.9.2/es/Snackbar/Snackbar.js
cdnjs/cdnjs
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import { duration } from '../styles/transitions'; import ClickAwayListener from '../ClickAwayListener'; import useEventCallback from '../utils/useEventCallback'; import capitalize from '../utils/capitalize'; import createChainedFunction from '../utils/createChainedFunction'; import Grow from '../Grow'; import SnackbarContent from '../SnackbarContent'; export const styles = theme => { const top1 = { top: 8 }; const bottom1 = { bottom: 8 }; const right = { justifyContent: 'flex-end' }; const left = { justifyContent: 'flex-start' }; const top3 = { top: 24 }; const bottom3 = { bottom: 24 }; const right3 = { right: 24 }; const left3 = { left: 24 }; const center = { left: '50%', right: 'auto', transform: 'translateX(-50%)' }; return { /* Styles applied to the root element. */ root: { zIndex: theme.zIndex.snackbar, position: 'fixed', display: 'flex', left: 8, right: 8, justifyContent: 'center', alignItems: 'center' }, /* Styles applied to the root element if `anchorOrigin={{ 'top', 'center' }}`. */ anchorOriginTopCenter: _extends({}, top1, { [theme.breakpoints.up('sm')]: _extends({}, top3, {}, center) }), /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'center' }}`. */ anchorOriginBottomCenter: _extends({}, bottom1, { [theme.breakpoints.up('sm')]: _extends({}, bottom3, {}, center) }), /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }}`. */ anchorOriginTopRight: _extends({}, top1, {}, right, { [theme.breakpoints.up('sm')]: _extends({ left: 'auto' }, top3, {}, right3) }), /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }}`. */ anchorOriginBottomRight: _extends({}, bottom1, {}, right, { [theme.breakpoints.up('sm')]: _extends({ left: 'auto' }, bottom3, {}, right3) }), /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }}`. */ anchorOriginTopLeft: _extends({}, top1, {}, left, { [theme.breakpoints.up('sm')]: _extends({ right: 'auto' }, top3, {}, left3) }), /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }}`. */ anchorOriginBottomLeft: _extends({}, bottom1, {}, left, { [theme.breakpoints.up('sm')]: _extends({ right: 'auto' }, bottom3, {}, left3) }) }; }; const Snackbar = React.forwardRef(function Snackbar(props, ref) { const { action, anchorOrigin: { vertical, horizontal } = { vertical: 'bottom', horizontal: 'center' }, autoHideDuration = null, children, classes, className, ClickAwayListenerProps, ContentProps, disableWindowBlurListener = false, message, onClose, onEnter, onEntered, onEntering, onExit, onExited, onExiting, onMouseEnter, onMouseLeave, open, resumeHideDuration, TransitionComponent = Grow, transitionDuration = { enter: duration.enteringScreen, exit: duration.leavingScreen }, TransitionProps } = props, other = _objectWithoutPropertiesLoose(props, ["action", "anchorOrigin", "autoHideDuration", "children", "classes", "className", "ClickAwayListenerProps", "ContentProps", "disableWindowBlurListener", "message", "onClose", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "TransitionComponent", "transitionDuration", "TransitionProps"]); const timerAutoHide = React.useRef(); const [exited, setExited] = React.useState(true); const handleClose = useEventCallback((...args) => { if (onClose) { onClose(...args); } }); const setAutoHideTimer = useEventCallback(autoHideDurationParam => { if (!onClose || autoHideDurationParam == null) { return; } clearTimeout(timerAutoHide.current); timerAutoHide.current = setTimeout(() => { handleClose(null, 'timeout'); }, autoHideDurationParam); }); React.useEffect(() => { if (open) { setAutoHideTimer(autoHideDuration); } return () => { clearTimeout(timerAutoHide.current); }; }, [open, autoHideDuration, setAutoHideTimer]); // Pause the timer when the user is interacting with the Snackbar // or when the user hide the window. const handlePause = () => { clearTimeout(timerAutoHide.current); }; // Restart the timer when the user is no longer interacting with the Snackbar // or when the window is shown back. const handleResume = React.useCallback(() => { if (autoHideDuration != null) { setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5); } }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]); const handleMouseEnter = event => { if (onMouseEnter) { onMouseEnter(event); } handlePause(); }; const handleMouseLeave = event => { if (onMouseLeave) { onMouseLeave(event); } handleResume(); }; const handleClickAway = event => { if (onClose) { onClose(event, 'clickaway'); } }; const handleExited = () => { setExited(true); }; const handleEnter = () => { setExited(false); }; React.useEffect(() => { if (!disableWindowBlurListener && open) { window.addEventListener('focus', handleResume); window.addEventListener('blur', handlePause); return () => { window.removeEventListener('focus', handleResume); window.removeEventListener('blur', handlePause); }; } return undefined; }, [disableWindowBlurListener, handleResume, open]); // So we only render active snackbars. if (!open && exited) { return null; } return React.createElement(ClickAwayListener, _extends({ onClickAway: handleClickAway }, ClickAwayListenerProps), React.createElement("div", _extends({ className: clsx(classes.root, classes[`anchorOrigin${capitalize(vertical)}${capitalize(horizontal)}`], className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: ref }, other), React.createElement(TransitionComponent, _extends({ appear: true, in: open, onEnter: createChainedFunction(handleEnter, onEnter), onEntered: onEntered, onEntering: onEntering, onExit: onExit, onExited: createChainedFunction(handleExited, onExited), onExiting: onExiting, timeout: transitionDuration, direction: vertical === 'top' ? 'down' : 'up' }, TransitionProps), children || React.createElement(SnackbarContent, _extends({ message: message, action: action }, ContentProps))))); }); process.env.NODE_ENV !== "production" ? Snackbar.propTypes = { /** * The action to display. It renders after the message, at the end of the snackbar. */ action: PropTypes.node, /** * The anchor of the `Snackbar`. */ anchorOrigin: PropTypes.shape({ horizontal: PropTypes.oneOf(['left', 'center', 'right']).isRequired, vertical: PropTypes.oneOf(['top', 'bottom']).isRequired }), /** * The number of milliseconds to wait before automatically calling the * `onClose` function. `onClose` should then set the state of the `open` * prop to hide the Snackbar. This behavior is disabled by default with * the `null` value. */ autoHideDuration: PropTypes.number, /** * Replace the `SnackbarContent` component. */ children: PropTypes.element, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * Props applied to the `ClickAwayListener` element. */ ClickAwayListenerProps: PropTypes.object, /** * Props applied to the [`SnackbarContent`](/api/snackbar-content/) element. */ ContentProps: PropTypes.object, /** * If `true`, the `autoHideDuration` timer will expire even if the window is not focused. */ disableWindowBlurListener: PropTypes.bool, /** * When displaying multiple consecutive Snackbars from a parent rendering a single * <Snackbar/>, add the key prop to ensure independent treatment of each message. * e.g. <Snackbar key={message} />, otherwise, the message may update-in-place and * features such as autoHideDuration may be canceled. */ key: PropTypes.any, /** * The message to display. */ message: PropTypes.node, /** * Callback fired when the component requests to be closed. * Typically `onClose` is used to set state in the parent component, * which is used to control the `Snackbar` `open` prop. * The `reason` parameter can optionally be used to control the response to `onClose`, * for example ignoring `clickaway`. * * @param {object} event The event source of the callback. * @param {string} reason Can be: `"timeout"` (`autoHideDuration` expired), `"clickaway"`. */ onClose: PropTypes.func, /** * Callback fired before the transition is entering. */ onEnter: PropTypes.func, /** * Callback fired when the transition has entered. */ onEntered: PropTypes.func, /** * Callback fired when the transition is entering. */ onEntering: PropTypes.func, /** * Callback fired before the transition is exiting. */ onExit: PropTypes.func, /** * Callback fired when the transition has exited. */ onExited: PropTypes.func, /** * Callback fired when the transition is exiting. */ onExiting: PropTypes.func, /** * @ignore */ onMouseEnter: PropTypes.func, /** * @ignore */ onMouseLeave: PropTypes.func, /** * If `true`, `Snackbar` is open. */ open: PropTypes.bool, /** * The number of milliseconds to wait before dismissing after user interaction. * If `autoHideDuration` prop isn't specified, it does nothing. * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't, * we default to `autoHideDuration / 2` ms. */ resumeHideDuration: PropTypes.number, /** * The component used for the transition. * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent: PropTypes.elementType, /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. */ transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({ enter: PropTypes.number, exit: PropTypes.number })]), /** * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element. */ TransitionProps: PropTypes.object } : void 0; export default withStyles(styles, { flip: false, name: 'MuiSnackbar' })(Snackbar);
ajax/libs/material-ui/4.9.4/esm/List/ListContext.js
cdnjs/cdnjs
import React from 'react'; /** * @ignore - internal component. */ var ListContext = React.createContext({}); if (process.env.NODE_ENV !== 'production') { ListContext.displayName = 'ListContext'; } export default ListContext;
ajax/libs/primereact/7.0.1/badge/badge.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { classNames } from 'primereact/utils'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Badge = /*#__PURE__*/function (_Component) { _inherits(Badge, _Component); var _super = _createSuper(Badge); function Badge() { _classCallCheck(this, Badge); return _super.apply(this, arguments); } _createClass(Badge, [{ key: "render", value: function render() { var badgeClassName = classNames('p-badge p-component', { 'p-badge-no-gutter': this.props.value && String(this.props.value).length === 1, 'p-badge-dot': !this.props.value, 'p-badge-lg': this.props.size === 'large', 'p-badge-xl': this.props.size === 'xlarge', 'p-badge-info': this.props.severity === 'info', 'p-badge-success': this.props.severity === 'success', 'p-badge-warning': this.props.severity === 'warning', 'p-badge-danger': this.props.severity === 'danger' }, this.props.className); return /*#__PURE__*/React.createElement("span", { className: badgeClassName, style: this.props.style }, this.props.value); } }]); return Badge; }(Component); _defineProperty(Badge, "defaultProps", { value: null, severity: null, size: null, style: null, className: null }); export { Badge };
ajax/libs/material-ui/4.9.4/esm/Button/Button.js
cdnjs/cdnjs
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import _extends from "@babel/runtime/helpers/esm/extends"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import { fade } from '../styles/colorManipulator'; import ButtonBase from '../ButtonBase'; import capitalize from '../utils/capitalize'; export var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: _extends({}, theme.typography.button, { boxSizing: 'border-box', minWidth: 64, padding: '6px 16px', borderRadius: theme.shape.borderRadius, color: theme.palette.text.primary, transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], { duration: theme.transitions.duration.short }), '&:hover': { textDecoration: 'none', backgroundColor: fade(theme.palette.text.primary, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' }, '&$disabled': { backgroundColor: 'transparent' } }, '&$disabled': { color: theme.palette.action.disabled } }), /* Styles applied to the span element that wraps the children. */ label: { width: '100%', // Ensure the correct width for iOS Safari display: 'inherit', alignItems: 'inherit', justifyContent: 'inherit' }, /* Styles applied to the root element if `variant="text"`. */ text: { padding: '6px 8px' }, /* Styles applied to the root element if `variant="text"` and `color="primary"`. */ textPrimary: { color: theme.palette.primary.main, '&:hover': { backgroundColor: fade(theme.palette.primary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } } }, /* Styles applied to the root element if `variant="text"` and `color="secondary"`. */ textSecondary: { color: theme.palette.secondary.main, '&:hover': { backgroundColor: fade(theme.palette.secondary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } } }, /* Styles applied to the root element if `variant="outlined"`. */ outlined: { padding: '5px 15px', border: "1px solid ".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'), '&$disabled': { border: "1px solid ".concat(theme.palette.action.disabledBackground) } }, /* Styles applied to the root element if `variant="outlined"` and `color="primary"`. */ outlinedPrimary: { color: theme.palette.primary.main, border: "1px solid ".concat(fade(theme.palette.primary.main, 0.5)), '&:hover': { border: "1px solid ".concat(theme.palette.primary.main), backgroundColor: fade(theme.palette.primary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } } }, /* Styles applied to the root element if `variant="outlined"` and `color="secondary"`. */ outlinedSecondary: { color: theme.palette.secondary.main, border: "1px solid ".concat(fade(theme.palette.secondary.main, 0.5)), '&:hover': { border: "1px solid ".concat(theme.palette.secondary.main), backgroundColor: fade(theme.palette.secondary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } }, '&$disabled': { border: "1px solid ".concat(theme.palette.action.disabled) } }, /* Styles applied to the root element if `variant="contained"`. */ contained: { color: theme.palette.getContrastText(theme.palette.grey[300]), backgroundColor: theme.palette.grey[300], boxShadow: theme.shadows[2], '&:hover': { backgroundColor: theme.palette.grey.A100, boxShadow: theme.shadows[4], // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { boxShadow: theme.shadows[2], backgroundColor: theme.palette.grey[300] }, '&$disabled': { backgroundColor: theme.palette.action.disabledBackground } }, '&$focusVisible': { boxShadow: theme.shadows[6] }, '&:active': { boxShadow: theme.shadows[8] }, '&$disabled': { color: theme.palette.action.disabled, boxShadow: theme.shadows[0], backgroundColor: theme.palette.action.disabledBackground } }, /* Styles applied to the root element if `variant="contained"` and `color="primary"`. */ containedPrimary: { color: theme.palette.primary.contrastText, backgroundColor: theme.palette.primary.main, '&:hover': { backgroundColor: theme.palette.primary.dark, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: theme.palette.primary.main } } }, /* Styles applied to the root element if `variant="contained"` and `color="secondary"`. */ containedSecondary: { color: theme.palette.secondary.contrastText, backgroundColor: theme.palette.secondary.main, '&:hover': { backgroundColor: theme.palette.secondary.dark, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: theme.palette.secondary.main } } }, /* Styles applied to the root element if `disableElevation={true}`. */ disableElevation: { boxShadow: 'none', '&:hover': { boxShadow: 'none' }, '&$focusVisible': { boxShadow: 'none' }, '&:active': { boxShadow: 'none' }, '&$disabled': { boxShadow: 'none' } }, /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */ focusVisible: {}, /* Pseudo-class applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `color="inherit"`. */ colorInherit: { color: 'inherit', borderColor: 'currentColor' }, /* Styles applied to the root element if `size="small"` and `variant="text"`. */ textSizeSmall: { padding: '4px 5px', fontSize: theme.typography.pxToRem(13) }, /* Styles applied to the root element if `size="large"` and `variant="text"`. */ textSizeLarge: { padding: '8px 11px', fontSize: theme.typography.pxToRem(15) }, /* Styles applied to the root element if `size="small"` and `variant="outlined"`. */ outlinedSizeSmall: { padding: '3px 9px', fontSize: theme.typography.pxToRem(13) }, /* Styles applied to the root element if `size="large"` and `variant="outlined"`. */ outlinedSizeLarge: { padding: '7px 21px', fontSize: theme.typography.pxToRem(15) }, /* Styles applied to the root element if `size="small"` and `variant="contained"`. */ containedSizeSmall: { padding: '4px 10px', fontSize: theme.typography.pxToRem(13) }, /* Styles applied to the root element if `size="large"` and `variant="contained"`. */ containedSizeLarge: { padding: '8px 22px', fontSize: theme.typography.pxToRem(15) }, /* Styles applied to the root element if `size="small"`. */ sizeSmall: {}, /* Styles applied to the root element if `size="large"`. */ sizeLarge: {}, /* Styles applied to the root element if `fullWidth={true}`. */ fullWidth: { width: '100%' }, /* Styles applied to the startIcon element if supplied. */ startIcon: { display: 'inherit', marginRight: 8, marginLeft: -4, '&$iconSizeSmall': { marginLeft: -2 } }, /* Styles applied to the endIcon element if supplied. */ endIcon: { display: 'inherit', marginRight: -4, marginLeft: 8, '&$iconSizeSmall': { marginRight: -2 } }, /* Styles applied to the icon element if supplied and `size="small"`. */ iconSizeSmall: { '& > *:first-child': { fontSize: 18 } }, /* Styles applied to the icon element if supplied and `size="medium"`. */ iconSizeMedium: { '& > *:first-child': { fontSize: 20 } }, /* Styles applied to the icon element if supplied and `size="large"`. */ iconSizeLarge: { '& > *:first-child': { fontSize: 22 } } }; }; var Button = React.forwardRef(function Button(props, ref) { var children = props.children, classes = props.classes, className = props.className, _props$color = props.color, color = _props$color === void 0 ? 'default' : _props$color, _props$component = props.component, component = _props$component === void 0 ? 'button' : _props$component, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$disableElevati = props.disableElevation, disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati, _props$disableFocusRi = props.disableFocusRipple, disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi, endIconProp = props.endIcon, focusVisibleClassName = props.focusVisibleClassName, _props$fullWidth = props.fullWidth, fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, _props$size = props.size, size = _props$size === void 0 ? 'medium' : _props$size, startIconProp = props.startIcon, _props$type = props.type, type = _props$type === void 0 ? 'button' : _props$type, _props$variant = props.variant, variant = _props$variant === void 0 ? 'text' : _props$variant, other = _objectWithoutProperties(props, ["children", "classes", "className", "color", "component", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"]); var startIcon = startIconProp && React.createElement("span", { className: clsx(classes.startIcon, classes["iconSize".concat(capitalize(size))]) }, startIconProp); var endIcon = endIconProp && React.createElement("span", { className: clsx(classes.endIcon, classes["iconSize".concat(capitalize(size))]) }, endIconProp); return React.createElement(ButtonBase, _extends({ className: clsx(classes.root, classes[variant], className, color === 'inherit' ? classes.colorInherit : color !== 'default' && classes["".concat(variant).concat(capitalize(color))], size !== 'medium' && [classes["".concat(variant, "Size").concat(capitalize(size))], classes["size".concat(capitalize(size))]], disableElevation && classes.disableElevation, disabled && classes.disabled, fullWidth && classes.fullWidth), component: component, disabled: disabled, focusRipple: !disableFocusRipple, focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName), ref: ref, type: type }, other), React.createElement("span", { className: classes.label }, startIcon, children, endIcon)); }); process.env.NODE_ENV !== "production" ? Button.propTypes = { /** * The content of the button. */ children: PropTypes.node.isRequired, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * The color of the component. It supports those theme colors that make sense for this component. */ color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']), /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: PropTypes.elementType, /** * If `true`, the button will be disabled. */ disabled: PropTypes.bool, /** * If `true`, no elevation is used. */ disableElevation: PropTypes.bool, /** * If `true`, the keyboard focus ripple will be disabled. * `disableRipple` must also be true. */ disableFocusRipple: PropTypes.bool, /** * If `true`, the ripple effect will be disabled. * * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure * to highlight the element by applying separate styles with the `focusVisibleClassName`. */ disableRipple: PropTypes.bool, /** * Element placed after the children. */ endIcon: PropTypes.node, /** * @ignore */ focusVisibleClassName: PropTypes.string, /** * If `true`, the button will take up the full width of its container. */ fullWidth: PropTypes.bool, /** * The URL to link to when the button is clicked. * If defined, an `a` element will be used as the root node. */ href: PropTypes.string, /** * The size of the button. * `small` is equivalent to the dense button styling. */ size: PropTypes.oneOf(['small', 'medium', 'large']), /** * Element placed before the children. */ startIcon: PropTypes.node, /** * @ignore */ type: PropTypes.string, /** * The variant to use. */ variant: PropTypes.oneOf(['text', 'outlined', 'contained']) } : void 0; export default withStyles(styles, { name: 'MuiButton' })(Button);
ajax/libs/material-ui/4.9.2/es/CardActions/CardActions.js
cdnjs/cdnjs
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; export const styles = { /* Styles applied to the root element. */ root: { display: 'flex', alignItems: 'center', padding: 8 }, /* Styles applied to the root element if `disableSpacing={false}`. */ spacing: { '& > :not(:first-child)': { marginLeft: 8 } } }; const CardActions = React.forwardRef(function CardActions(props, ref) { const { disableSpacing = false, classes, className } = props, other = _objectWithoutPropertiesLoose(props, ["disableSpacing", "classes", "className"]); return React.createElement("div", _extends({ className: clsx(classes.root, className, !disableSpacing && classes.spacing), ref: ref }, other)); }); process.env.NODE_ENV !== "production" ? CardActions.propTypes = { /** * The content of the component. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * If `true`, the actions do not have additional margin. */ disableSpacing: PropTypes.bool } : void 0; export default withStyles(styles, { name: 'MuiCardActions' })(CardActions);
ajax/libs/primereact/6.5.0-rc.1/csstransition/csstransition.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { CSSTransition as CSSTransition$1 } from 'react-transition-group'; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var CSSTransition = /*#__PURE__*/function (_Component) { _inherits(CSSTransition, _Component); var _super = _createSuper(CSSTransition); function CSSTransition(props) { var _this; _classCallCheck(this, CSSTransition); _this = _super.call(this, props); _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this)); _this.onEntering = _this.onEntering.bind(_assertThisInitialized(_this)); _this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this)); _this.onExit = _this.onExit.bind(_assertThisInitialized(_this)); _this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this)); _this.onExited = _this.onExited.bind(_assertThisInitialized(_this)); return _this; } _createClass(CSSTransition, [{ key: "onEnter", value: function onEnter(node, isAppearing) { this.props.onEnter && this.props.onEnter(node, isAppearing); // component this.props.options && this.props.options.onEnter && this.props.options.onEnter(node, isAppearing); // user option } }, { key: "onEntering", value: function onEntering(node, isAppearing) { this.props.onEntering && this.props.onEntering(node, isAppearing); // component this.props.options && this.props.options.onEntering && this.props.options.onEntering(node, isAppearing); // user option } }, { key: "onEntered", value: function onEntered(node, isAppearing) { this.props.onEntered && this.props.onEntered(node, isAppearing); // component this.props.options && this.props.options.onEntered && this.props.options.onEntered(node, isAppearing); // user option } }, { key: "onExit", value: function onExit(node) { this.props.onExit && this.props.onExit(node); // component this.props.options && this.props.options.onExit && this.props.options.onExit(node); // user option } }, { key: "onExiting", value: function onExiting(node) { this.props.onExiting && this.props.onExiting(node); // component this.props.options && this.props.options.onExiting && this.props.options.onExiting(node); // user option } }, { key: "onExited", value: function onExited(node) { this.props.onExited && this.props.onExited(node); // component this.props.options && this.props.options.onExited && this.props.options.onExited(node); // user option } }, { key: "render", value: function render() { var immutableProps = { nodeRef: this.props.nodeRef, in: this.props.in, onEnter: this.onEnter, onEntering: this.onEntering, onEntered: this.onEntered, onExit: this.onExit, onExiting: this.onExiting, onExited: this.onExited }; var mutableProps = { classNames: this.props.classNames, timeout: this.props.timeout, unmountOnExit: this.props.unmountOnExit }; var props = _objectSpread(_objectSpread(_objectSpread({}, mutableProps), this.props.options || {}), immutableProps); return /*#__PURE__*/React.createElement(CSSTransition$1, props, this.props.children); } }]); return CSSTransition; }(Component); export { CSSTransition };
ajax/libs/material-ui/4.11.4/esm/styles/useTheme.js
cdnjs/cdnjs
import { useTheme as useThemeWithoutDefault } from '@material-ui/styles'; import React from 'react'; import defaultTheme from './defaultTheme'; export default function useTheme() { var theme = useThemeWithoutDefault() || defaultTheme; if (process.env.NODE_ENV !== 'production') { // eslint-disable-next-line react-hooks/rules-of-hooks React.useDebugValue(theme); } return theme; }