{"version":3,"sources":["webpack:///../node_modules/lodash.debounce/index.js","webpack:///./Scripts/Components/QuickSearchMobile.js","webpack:///./Scripts/Containers/QuickSearchMobile.Container.js"],"names":["global","FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","Object","freeSelf","self","root","Function","objectToString","prototype","toString","nativeMax","Math","max","nativeMin","min","now","Date","isObject","value","type","toNumber","isObjectLike","call","isSymbol","other","valueOf","replace","isBinary","test","slice","module","exports","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","undefined","apply","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","setTimeout","remainingWait","debounced","isInvoking","arguments","this","leadingEdge","cancel","clearTimeout","flush","QuickSearchMobile","Component","_this","searchInput","focus","_this2","_this$props","props","query","showFullForm","onSearch","onBlur","onKeyDown","toggleShowFullForm","searchUrl","selectedItem","react_default","a","createElement","className","role","onClick","e","focusOnInput","translate","concat","placeholder","autoComplete","onChange","event","target","ref","input","keyCode","QuickSearchMobileContainer","QuickSearchMobile_Container_classCallCheck","QuickSearchMobile_Container_possibleConstructorReturn","QuickSearchMobile_Container_getPrototypeOf","state","_objectSpread","clickHandler","bind","QuickSearchMobile_Container_assertThisInitialized","lastClickedNode","document","addEventListener","removeEventListener","length","setState","searchContainer","contains","prevProps","querySelector","scrollIntoView","behavior","block","inline","window","__litium","quickSearchUrl","react","Components_QuickSearchMobile","debouncedQuery","debounce","dispatch","text","connect","quickSearch","showResult","setSearchQuery","opt","handleKeyDown"],"mappings":"8EAAA,SAAAA,GAUA,IAAAC,EAAA,sBAGAC,EAAA,IAGAC,EAAA,kBAGAC,EAAA,aAGAC,EAAA,qBAGAC,EAAA,aAGAC,EAAA,cAGAC,EAAAC,SAGAC,EAAA,iBAAAV,QAAAW,iBAAAX,EAGAY,EAAA,iBAAAC,iBAAAF,iBAAAE,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AR,OAAgBN,EAASO,YAAc1C,EAAOyC,OAIlDJ,CAA6ChC","file":"5.548cd6256e167bdf795e.js","sourcesContent":["/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        result = wait - timeSinceLastCall;\n\n    return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","import React, { Component } from 'react';\r\nimport { translate } from '../Services/translation';\r\n\r\nclass QuickSearchMobile extends Component {\r\n    focusOnInput() {\r\n        setTimeout(() => {\r\n            this.searchInput && this.searchInput.focus();\r\n        }, 0);\r\n    }\r\n\r\n    render() {\r\n        const { query, showFullForm, onSearch, onBlur, onKeyDown, toggleShowFullForm, selectedItem, searchUrl } = this.props;\r\n        return (\r\n            <div className=\"quick-search\" role=\"search\">\r\n                <a className=\"quick-search__link\" onClick={e => { toggleShowFullForm(); this.focusOnInput() }}>\r\n                    <i className=\"quick-search__iconWhite\"></i>\r\n                    <span className=\"quick-search__title\">{translate('general.search')}</span>\r\n                </a>\r\n                <div className={`quick-search__form ${showFullForm ? 'quick-search__form--force-show' : ''}`} role=\"search\">\r\n                    <input className=\"quick-search__input\" type=\"search\" placeholder={translate('general.search')}\r\n                        autoComplete=\"off\" value={query} onChange={event => onSearch(event.target.value)}\r\n                        onKeyDown={event => onKeyDown(event, { searchUrl })} ref={(input) => { this.searchInput = input; }}\r\n                        onBlur={() => onBlur()} />\r\n                    <button className=\"quick-search__submit-button\" type=\"submit\" onClick={event => onKeyDown({keyCode: 13}, {searchUrl})}>\r\n                        <i className=\"quick-search__submit-icon\"></i>\r\n                        <span className=\"quick-search__submit-title\">{translate('general.search')}</span>\r\n                    </button>\r\n                </div>\r\n            </div>\r\n        )\r\n    }\r\n}\r\n\r\nexport default QuickSearchMobile;","import React, { Component, Fragment } from 'react';\r\nimport * as debounce from 'lodash.debounce';\r\nimport { connect } from 'react-redux';\r\nimport QuickSearchMobile from '../Components/QuickSearchMobile';\r\nimport { query, setSearchQuery, toggleShowFullForm, handleKeyDown } from '../Actions/QuickSearch.action';\r\n\r\nclass QuickSearchMobileContainer extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.state = {...props};\r\n        this.clickHandler = this.clickHandler.bind(this);\r\n        this.lastClickedNode = null;\r\n    }\r\n\r\n    componentDidMount() {\r\n        document.addEventListener('mousedown', this.clickHandler);\r\n    }\r\n\r\n    componentWillUnmount() {\r\n        document.removeEventListener('mousedown', this.clickHandler);\r\n    }\r\n\r\n    componentWillUpdate({ showFullForm } = props) {\r\n        if (this.state.showFullForm !== showFullForm) {\r\n            this.setState({...this.state, showFullForm});\r\n        }\r\n    }\r\n\r\n    clickHandler(event) {\r\n        this.lastClickedNode = event.target;\r\n    }\r\n\r\n    onBlur() {\r\n        const { showFullForm, toggleShowFullForm } = this.props;\r\n        if (this.searchContainer && !this.searchContainer.contains(this.lastClickedNode)) {\r\n            showFullForm && toggleShowFullForm();\r\n        }\r\n    }\r\n\r\n    componentDidUpdate(prevProps) {\r\n        if (this.props.selectedItem !== prevProps.selectedItem) {\r\n            document.querySelector('.quick-search-result__item--selected').scrollIntoView({behavior: 'smooth', block: 'end', inline: 'nearest'});\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { query } = this.props;\r\n        const searchUrl = window.__litium.quickSearchUrl + (query.length > 0 ? `?q=${query}` : '');\r\n        return (\r\n            <Fragment>\r\n                <QuickSearchMobile {...{...this.props, searchUrl, onBlur: () => this.onBlur() }} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapStateToProps = state => {\r\n    return {\r\n        query: state.quickSearch.query,\r\n        result: state.quickSearch.result,\r\n        showResult: state.quickSearch.showResult,\r\n        showFullForm: state.quickSearch.showFullForm,\r\n        selectedItem: state.quickSearch.selectedItem,\r\n    }\r\n}\r\n\r\n// debouncing function to 200ms so we don't send query request on every key stroke\r\nconst debouncedQuery = debounce((dispatch, text) => dispatch(query(text)), 200);\r\n\r\nconst mapDispatchToProps = dispatch => {\r\n    return {\r\n        onSearch: (text) => {\r\n            dispatch(setSearchQuery(text));\r\n            debouncedQuery(dispatch, text);\r\n        },\r\n        toggleShowFullForm: () => dispatch(toggleShowFullForm()),\r\n        onKeyDown: (event, opt) => dispatch(handleKeyDown(event, opt)),\r\n    }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(QuickSearchMobileContainer);"],"sourceRoot":""}