/*
CSV Stringify

Please look at the [project documentation](https://csv.js.org/stringify/) for
additional information.
*/

/* WEBPACK VAR INJECTION */

/* harmony default export */

/* harmony export (binding) */

/* harmony import */

/*#__PURE__*/

/**
	* Tests if every element in an array-like object passes a test condition.
	*
	* @private
	* @param {*} value - value to test
	* @returns {boolean} boolean indicating whether a value is an array-like object for which all elements pass a test condition
	*/

/**
     * @ignore
     * @override
     * @return {JSX.Element}
     */

/**
     * @ignore
     * @override
     * @return {Object}
     */

/**
     * @override
     * @return {JSX.Element}
     */

/**
     * @override
     * @return {Object}
     * @property {Function} children
     * @property {Function} classNames
     * @property {Boolean} draggableTrack
     * @property {Function} onTrackDrag
     * @property {Function} onTrackMouseDown
     * @property {Function} percentages
     */

/**
     * @param {Object} props
     * @param {InputRangeClassNames} props.classNames
     * @param {Boolean} props.draggableTrack
     * @param {Function} props.onTrackDrag
     * @param {Function} props.onTrackMouseDown
     * @param {number} props.percentages
     */

/**
     * @param {Object} props
     * @param {boolean} [props.allowSameValues]
     * @param {string} [props.ariaLabelledby]
     * @param {string} [props.ariaControls]
     * @param {InputRangeClassNames} [props.classNames]
     * @param {boolean} [props.disabled = false]
     * @param {Function} [props.formatLabel]
     * @param {number|Range} [props.maxValue = 10]
     * @param {number|Range} [props.minValue = 0]
     * @param {string} [props.name]
     * @param {string} props.onChange
     * @param {Function} [props.onChangeComplete]
     * @param {Function} [props.onChangeStart]
     * @param {number} [props.step = 1]
     * @param {number|Range} props.value
     */

/**
     * @param {Object} props
     * @param {string} [props.ariaLabelledby]
     * @param {string} [props.ariaControls]
     * @param {InputRangeClassNames} props.classNames
     * @param {Function} [props.formatLabel]
     * @param {number} [props.maxValue]
     * @param {number} [props.minValue]
     * @param {Function} props.onSliderKeyDown
     * @param {Function} props.onSliderDrag
     * @param {number} props.percentage
     * @param {number} props.type
     * @param {number} props.value
     */

/**
     * @private
     * @param {SyntheticEvent} event
     * @return {void}
     */

/**
     * @private
     * @param {SyntheticEvent} event - User event
     */

/**
     * @private
     * @return {Object}
     */

/**
     * @private
     * @return {Object} CSS styles
     */

/**
     * @private
     * @return {void}
     */

/**
     * @private
     * @type {?Component}
     */

/**
     * @private
     * @type {?number}
     */

/**
     * @private
     * @type {?string}
     */

/**
     * @private
     * @type {bool}
     */

/**
     * Accepted propTypes of Slider
     * @override
     * @return {Object}
     * @property {Function} ariaLabelledby
     * @property {Function} ariaControls
     * @property {Function} className
     * @property {Function} formatLabel
     * @property {Function} maxValue
     * @property {Function} minValue
     * @property {Function} onSliderDrag
     * @property {Function} onSliderKeyDown
     * @property {Function} percentage
     * @property {Function} type
     * @property {Function} value
     */

/**
     * Decrement the value of a slider by key name
     * @private
     * @param {string} key
     * @return {void}
     */

/**
     * Handle any "keydown" event received by the component
     * @private
     * @param {SyntheticEvent} event
     * @return {void}
     */

/**
     * Handle any "keydown" event received by the slider
     * @private
     * @param {SyntheticEvent} event
     * @param {string} key
     * @return {void}
     */

/**
     * Handle any "keyup" event received by the component
     * @private
     * @param {SyntheticEvent} event
     * @return {void}
     */

/**
     * Handle any "mousedown" event received by the component
     * @private
     * @param {SyntheticEvent} event
     * @return {void}
     */

/**
     * Handle any "mousedown" event received by the track
     * @private
     * @param {SyntheticEvent} event
     * @param {Point} position
     * @return {void}
     */

/**
     * Handle any "mousemove" event received by the slider
     * @private
     * @param {SyntheticEvent} event
     * @param {string} key
     * @return {void}
     */

/**
     * Handle any "mousemove" event received by the track
     * @private
     * @param {SyntheticEvent} event
     * @return {void}
     */

/**
     * Handle any "mouseup" event received by the component
     * @private
     * @param {SyntheticEvent} event
     */

/**
     * Handle any "touchend" event received by the component
     * @private
     * @param {SyntheticEvent} event
     */

/**
     * Handle any "touchstart" event received by the component
     * @private
     * @param {SyntheticEvent} event
     * @return {void}
     */

/**
     * Handle the end of any mouse/touch event
     * @private
     * @return {void}
     */

/**
     * Handle the start of any mouse/touch event
     * @private
     * @return {void}
     */

/**
     * Increment the value of a slider by key name
     * @private
     * @param {string} key
     * @return {void}
     */

/**
     * Listen to mousemove event
     * @private
     * @return {void}
     */

/**
     * Listen to mouseup event
     * @private
     * @return {void}
     */

/**
     * Listen to touchend event
     * @private
     * @return {void}
     */

/**
     * Listen to touchmove event
     * @private
     * @return {void}
     */

/**
     * Return JSX of hidden inputs
     * @private
     * @return {JSX.Element}
     */

/**
     * Return JSX of sliders
     * @private
     * @return {JSX.Element}
     */

/**
     * Return all the slider keys
     * @private
     * @return {string[]}
     */

/**
     * Return the CSS class name of the component
     * @private
     * @return {string}
     */

/**
     * Return the bounding rect of the track
     * @private
     * @return {ClientRect}
     */

/**
     * Return the slider key closest to a point
     * @private
     * @param {Point} position
     * @return {string}
     */

/**
     * Return true if the component accepts a min and max value
     * @private
     * @return {boolean}
     */

/**
     * Return true if the difference between the new and the current value is
     * greater or equal to the step amount of the component
     * @private
     * @param {Range} values
     * @return {boolean}
     */

/**
     * Return true if the new value should trigger a render
     * @private
     * @param {Range} values
     * @return {boolean}
     */

/**
     * Return true if the range is within the max and min value of the component
     * @private
     * @param {Range} values
     * @return {boolean}
     */

/**
     * Stop listening to mouseup event
     * @private
     * @return {void}
     */

/**
     * Stop listening to touchend event
     * @private
     * @return {void}
     */

/**
     * Update the position of a slider
     * @private
     * @param {string} key
     * @param {Point} position
     * @return {void}
     */

/**
     * Update the positions of multiple sliders
     * @private
     * @param {Object} positions
     * @param {Point} positions.min
     * @param {Point} positions.max
     * @return {void}
     */

/**
     * Update the value of a slider
     * @private
     * @param {string} key
     * @param {number} value
     * @return {void}
     */

/**
     * Update the values of multiple sliders
     * @private
     * @param {Range|number} values
     * @return {void}
     */

/**
   * @ignore
   * @override
   * @return {void}
   */

/**
   * @private
   * @return {ClientRect}
   */

/**
   * A Callback fired by the Overlay when it wishes to be hidden.
   *
   * __required__ when `rootClose` is `true`.
   *
   * @type func
   */

/**
   * A DOM Element, Ref to an element, or function that returns either. The `container` will have the Portal children
   * appended to it.
   */

/**
   * A DOM Element, Ref to an element, or function that returns either. The `target` element is where
   * the overlay is positioned relative to.
   */

/**
   * A `react-transition-group@2.0.0` `<Transition/>` component
   * used to animate the overlay as it changes visibility.
   */

/**
   * A render prop that returns an element to overlay and position. See
   * the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info.
   *
   * @type {Function ({
   *   show: boolean,
   *   placement: Placement,
   *   outOfBoundaries: ?boolean,
   *   scheduleUpdate: () => void,
   *   props: {
   *     ref: (?HTMLElement) => void,
   *     style: { [string]: string | number },
   *     aria-labelledby: ?string
   *   },
   *   arrowProps: {
   *     ref: (?HTMLElement) => void,
   *     style: { [string]: string | number },
   *   },
   * }) => React.Element}
   */

/**
   * A set of popper options and props passed directly to react-popper's Popper component.
   */

/**
   * Callback fired after the Overlay finishes transitioning in
   */

/**
   * Callback fired after the Overlay finishes transitioning out
   */

/**
   * Callback fired as the Overlay begins to transition in
   */

/**
   * Callback fired as the Overlay begins to transition out
   */

/**
   * Callback fired before the Overlay transitions in
   */

/**
   * Callback fired right before the Overlay transitions out
   */

/**
   * Control how much space there is between the edge of the boundary element and overlay.
   * A convenience shortcut to setting `popperConfig.modfiers.preventOverflow.padding`
   */

/**
   * Enables the Popper.js `flip` modifier, allowing the Overlay to
   * automatically adjust it's placement in case of overlap with the viewport or toggle.
   * Refer to the [flip docs](https://popper.js.org/popper-documentation.html#modifiers..flip.enabled) for more info
   */

/**
   * Set the visibility of the Overlay
   */

/**
   * Specify disabled for disable RootCloseWrapper
   */

/**
   * Specify event for toggling overlay
   */

/**
   * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay
   */

/**
 * @ignore
 * @param {Object} props
 * @param {InputRangeClassNames} props.classNames
 * @param {Function} props.formatLabel
 * @param {string} props.type
 */

/**
 * @ignore
 * @param {Object} props
 * @return {?Error} Return Error if validation fails
 */

/**
 * @ignore
 * @param {Object} props - React component props
 * @return {?Error} Return Error if validation fails
 */

/**
 * @ignore
 * @typedef {Object} ClientRect
 * @property {number} height
 * @property {number} left
 * @property {number} top
 * @property {number} width
 */

/**
 * @ignore
 * @typedef {Object} Point
 * @property {number} x
 * @property {number} y
 */

/**
 * @ignore
 */

/**
 * @type {Object}
 * @property {Function} children
 * @property {Function} classNames
 * @property {Function} formatLabel
 * @property {Function} type
 */

/**
 * @typedef {Function} LabelFormatter
 * @param {number} value
 * @param {string} type
 * @return {string}
 */

/**
 * @typedef {Object} InputRangeClassNames
 * @property {string} activeTrack
 * @property {string} disabledInputRange
 * @property {string} inputRange
 * @property {string} labelContainer
 * @property {string} maxLabel
 * @property {string} minLabel
 * @property {string} slider
 * @property {string} sliderContainer
 * @property {string} track
 * @property {string} valueLabel
 */

/**
 * @typedef {Object} Range
 * @property {number} min - Min value
 * @property {number} max - Max value
 */

/**
 * A React component that allows users to input numeric values within a range
 * by dragging its sliders.
 */

/**
 * Calculate the absolute difference between two numbers
 * @ignore
 * @param {number} numA
 * @param {number} numB
 * @return {number}
 */

/**
 * Calculate the distance between pointA and pointB
 * @ignore
 * @param {Point} pointA
 * @param {Point} pointB
 * @return {number} Distance
 */

/**
 * Captialize a string
 * @ignore
 * @param {string} string
 * @return {string}
 */

/**
 * Check if a value is a number
 * @ignore
 * @param {*} value
 * @return {boolean}
 */

/**
 * Check if a value is an object
 * @ignore
 * @param {*} value
 * @return {boolean}
 */

/**
 * Check if a value is defined
 * @ignore
 * @param {*} value
 * @return {boolean}
 */

/**
 * Clamp a value between a min and max value
 * @ignore
 * @param {number} value
 * @param {number} min
 * @param {number} max
 * @return {number}
 */

/**
 * Convert a model value into a percentage value
 * @ignore
 * @param {number} value
 * @param {number} minValue
 * @param {number} maxValue
 * @return {number}
 */

/**
 * Convert a point into a model value
 * @ignore
 * @param {Point} position
 * @param {number} minValue
 * @param {number} maxValue
 * @param {ClientRect} clientRect
 * @return {number}
 */

/**
 * Convert a point into a percentage value
 * @ignore
 * @param {Point} position
 * @param {ClientRect} clientRect
 * @return {number} Percentage value
 */

/**
 * Convert a range of values into points
 * @ignore
 * @param {Range} values
 * @param {number} minValue
 * @param {number} maxValue
 * @param {ClientRect} clientRect
 * @return {Range}
 */

/**
 * Convert a value into a point
 * @ignore
 * @param {number} value
 * @param {number} minValue
 * @param {number} maxValue
 * @param {ClientRect} clientRect
 * @return {Point} Position
 */

/**
 * Convert a value into a step value
 * @ignore
 * @param {number} value
 * @param {number} valuePerStep
 * @return {number}
 */

/**
 * Convert an event into a point
 * @ignore
 * @param {Event} event
 * @param {ClientRect} clientRect
 * @return {Point}
 */

/**
 * Convert model values into percentage values
 * @ignore
 * @param {Range} values
 * @param {number} minValue
 * @param {number} maxValue
 * @return {Range}
 */

/**
 * Convert props into a range value
 * @ignore
 * @param {Object} props
 * @param {boolean} isMultiValue
 * @return {Range}
 */

/**
 * Return a descriptor removing the value and returning a getter
 * The getter will return a .bind version of the function
 * and memoize the result against a symbol on the instance
 */

/**
 * Use boundMethod to bind all methods on the target.prototype
 */

/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* Convert a string to lowercase.
*
* @module @stdlib/string/lowercase
*
* @example
* var lowercase = require( '@stdlib/string/lowercase' );
*
* var str = lowercase( 'bEEp' );
* // returns 'beep'
*/

/**
* Converts a string to lowercase.
*
* @param {string} str - string to convert
* @throws {TypeError} must provide a primitive string
* @returns {string} lowercase string
*
* @example
* var str = lowercase( 'bEEp' );
* // returns 'beep'
*/

/**
* Return a function which tests if every element in an array-like object passes a test condition.
*
* @module @stdlib/assert/tools/array-like-function
*
* @example
* var isOdd = require( '@stdlib/assert/is-odd' );
* var arraylikefcn = require( '@stdlib/assert/tools/array-like-function' );
*
* var arr1 = [ 1, 3, 5, 7 ];
* var arr2 = [ 3, 5, 8 ];
*
* var validate = arraylikefcn( isOdd );
*
* var bool = validate( arr1 );
* // returns true
*
* bool = validate( arr2 );
* // returns false
*/

/**
* Returns a function which tests if every element in an array-like object passes a test condition.
*
* @param {Function} predicate - function to apply
* @throws {TypeError} must provide a function
* @returns {Function} an array-like object function
*
* @example
* var isOdd = require( '@stdlib/assert/is-odd' );
*
* var arr1 = [ 1, 3, 5, 7 ];
* var arr2 = [ 3, 5, 8 ];
*
* var validate = arraylikefcn( isOdd );
*
* var bool = validate( arr1 );
* // returns true
*
* bool = validate( arr2 );
* // returns false
*/

/**
* Test if a value is an array-like object of numbers.
*
* @module @stdlib/assert/is-number-array
*
* @example
* var isNumberArray = require( '@stdlib/assert/is-number-array' );
*
* var bool = isNumberArray( [ 1, 2, 3 ] );
* // returns true
*
* bool = isNumberArray( [ '1', 2, 3 ] );
* // returns false
*
* @example
* var isNumberArray = require( '@stdlib/assert/is-number-array' ).primitives;
*
* var bool = isNumberArray( [ 1, 2, 3 ] );
* // returns true
*
* bool = isNumberArray( [ 1, new Number( 2 ) ] );
* // returns false
*
* @example
* var isNumberArray = require( '@stdlib/assert/is-number-array' ).objects;
*
* var bool = isNumberArray( [ new Number( 1 ), new Number( 2 ) ] );
* // returns true
*
* bool = isNumberArray( [ new Number( 1 ), 2 ] );
* // returns false
*/

/**
* Test if a value is an empty array.
*
* @module @stdlib/assert/is-empty-array
*
* @example
* var isEmptyArray = require( '@stdlib/assert/is-empty-array' );
*
* var bool = isEmptyArray( [] );
* // returns true
*
* bool = isEmptyArray( [ 1, 2, 3 ] );
* // returns false
*
* bool = isEmptyArray( {} );
* // returns false
*/

/**
* Tests if a value is an empty array.
*
* @param {*} value - value to test
* @returns {boolean} boolean indicating whether value is an empty array
*
* @example
* var bool = isEmptyArray( [] );
* // returns true
*
* @example
* var bool = isEmptyArray( [ 1, 2, 3 ] );
* // returns false
*
* @example
* var bool = isEmptyArray( {} );
* // returns false
*/

/** @ignore */

/** Specify where the overlay element is positioned in relation to the target element */

/***/

// (Using reflect to get all keys including symbols)

// @ts-ignore

// Cast boolean to string by default

// Cast date to timestamp string by default

// Cast number to string using native casting by default

// Cast record elements

// Chunk validation

// Convert the record into a string

// Detect columns from the first record

// Don't bother showing anything if we don't have to.

// Don't un-render the overlay while it's transitioning out.

// EXPORTS //

// Emit and stringify the record if an object or an array

// Emit the csv

// Emit the header

// Exports

// Expose options

// Give a chance for events to be registered later

// Ignore special case target method

// In IE11 calling Object.defineProperty has a side-effect of evaluating the

// Information

// Internal state

// Leave string untouched

// Lodash implementation of `get`

// MAIN //

// MODULES //

// Match anything that isn't a dot or bracket.

// Merge with user options

// Module

// Normalize option `bom`

// Normalize option `cast`

// Normalize option `columns`

// Normalize option `delimiter`

// Normalize option `eof`

// Normalize option `escape`

// Normalize option `header`

// Normalize option `quote`

// Normalize option `quoted_empty`

// Normalize option `quoted_match`

// Normalize option `quoted_string`

// Normalize option `quoted`

// Normalize option `record_delimiter`

// Normalize option cast.bigint

// Normalize option cast.boolean

// Normalize option cast.date

// Normalize option cast.number

// Normalize option cast.object

// Normalize option cast.string

// Only methods need binding

// Record is a literal object

// Record is an array

// Stringify object as JSON by default

// Use Reflect if exists

// Use symbols if support is provided

// We are getting an array but the user has specified output columns. In

// eslint-disable-next-line no-prototype-builtins

// getter for the property which is being replaced. This causes infinite

// let { value, ...options } = value

// recursion and an "Out of stack space" error.

// this case, we respect the columns indexes

//# sourceMappingURL=index.js.map

//# sourceMappingURL=value-transformer.js.map
