{"version":3,"file":"telex.js","sources":["../node_modules/lodash.debounce/index.js","../src/index.js"],"sourcesContent":["/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \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","/* telex js-file. Build with rollup -c */\r\n/*jshint esversion: 6, strict: false*/\r\n\r\n/**\r\n * options: see defaults.\r\n *\r\n * msgs: array of messages.\r\n * A message is a plain object having the properties:\r\n * - content The content of the message. Can be text, but also a piece of HTML (like a link).\r\n * - id (Optional). Id of the message, starting with a word character.\r\n * It is only used in the `remove` method. It is not used as a DOM-id.\r\n * - class (Optional). The CSS-class of the message. May be used for styling purposes.\r\n */\r\nimport debounce from 'lodash.debounce';\r\n\r\nfunction Widget(id, options, msgs) {\r\n Object.setPrototypeOf(this, {\r\n\r\n defaults: {\r\n /**\r\n * Speed in pixels per second, Integer or Float\r\n */\r\n speed: 200,\r\n\r\n /**\r\n * 'normal' (to left) or 'reverse' (to right) - direction of movement\r\n */\r\n direction: 'normal',\r\n\r\n /** string, timing-function used for the animation; 'ease-in-out' may be another useful value\r\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function\r\n */\r\n timing: 'linear',\r\n\r\n /**\r\n * boolean, pause ticker on hover\r\n */\r\n pauseOnHover: false,\r\n\r\n /**\r\n * function(tlx), callback after each refresh cycle. Opportunity to reload Telex with new messages.\r\n * tlx points to the Telex instance.\r\n */\r\n onCycle: function(tlx) {\r\n }\r\n },\r\n\r\n animStart: function(msg) {\r\n if (msg) {\r\n let msgWidth = this._elementWidth(msg),\r\n duration = 1000 * msgWidth / this.speed;\r\n\r\n if (msg.classList.contains('telex-head')) this.onCycle(this);\r\n\r\n Object.assign(msg.style, {\r\n marginLeft: `-${msgWidth}px`,\r\n animationName: 'telex',\r\n animationDirection: this.direction,\r\n animationDuration: `${duration}ms`,\r\n animationTimingFunction: this.timing,\r\n });\r\n }\r\n },\r\n\r\n animStop: function(msg) {\r\n if (msg) {\r\n Object.assign(msg.style, {\r\n marginLeft: null,\r\n animationName: 'none',\r\n });\r\n }\r\n },\r\n\r\n discardMsg: function(msg) {\r\n if (msg) {\r\n msg.classList.add('telex-discard');\r\n }\r\n },\r\n\r\n populate: function() {\r\n let prevMsgCnt = this.element.childNodes.length;\r\n\r\n this.element.childNodes.forEach(v => { this.discardMsg(v); });\r\n\r\n let telexWidth = this._elementWidth(this.element),\r\n accu = { total: 0, max: 0 };\r\n\r\n do { // keep creating divs from msg's...\r\n accu = this._messages.reduce((ac, cur, idx) => {\r\n if (typeof cur === 'string') { cur = { content: cur }; }\r\n let div = document.createElement('div');\r\n div.innerHTML = cur.content;\r\n if (cur.class) { div.classList.add(cur.class); }\r\n if (idx === 0) { div.classList.add('telex-head'); }\r\n this.element.appendChild(div);\r\n let w = this._elementWidth(div);\r\n return {\r\n total: ac.total + w,\r\n max: w > ac.max ? w : ac.max\r\n };\r\n }, accu);\r\n\r\n } while (accu.total > 0 && accu.total < (telexWidth + accu.max)); // ... until total width is big enough\r\n\r\n if (! prevMsgCnt) {\r\n this.animStart(this.element.firstChild);\r\n } // If this is the first child, start animation\r\n },\r\n\r\n _setAnimationState: function(state) {\r\n let firstChild = this.element.firstChild;\r\n if (firstChild) { firstChild.style.animationPlayState = state; }\r\n },\r\n\r\n _elementWidth(el) {\r\n return el.getBoundingClientRect().width; // returns fractional value (el.offsetWidth gives integer value)\r\n },\r\n\r\n _removeIfDiscarded: function(msg) {\r\n if (msg && msg.classList.contains('telex-discard')) {\r\n this.element.removeChild(msg);\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n set messages(msg) {\r\n this._messages = msg;\r\n this.populate();\r\n },\r\n\r\n get messages() {\r\n return this._messages;\r\n },\r\n\r\n add: function(message) {\r\n this._messages.unshift(message);\r\n this.populate();\r\n },\r\n\r\n remove: function(id) {\r\n let i = this._messages.findIndex(e => e.id === id);\r\n if (i >= 0) { this._messages.splice(i, 1); }\r\n this.populate();\r\n },\r\n\r\n update: function(id, msg) {\r\n let i = this._messages.findIndex(e => e.id === id);\r\n if (i >= 0) {\r\n this._messages.splice(i, 1, msg);\r\n }\r\n this.populate();\r\n },\r\n\r\n pause: function() {\r\n this._setAnimationState('paused');\r\n },\r\n\r\n resume: function() {\r\n this._setAnimationState('running');\r\n },\r\n });\r\n\r\n this.element = document.getElementById(id);\r\n\r\n this.element.classList.add('telex');\r\n\r\n this.element.addEventListener('animationend', e => { // bubbles up from firstchild\r\n this.animStop(e.target);\r\n\r\n if (this.direction === e.target.style.animationDirection) { // skip if direction changed\r\n if (this.direction === 'normal') { // rotate child nodes right\r\n while (this._removeIfDiscarded(this.element.firstChild)) { /* do nothing */}\r\n let c = this.element.firstChild\r\n if (c) this.element.appendChild(c);\r\n }\r\n else { // direction 'reverse', rotate child nodes left\r\n let c, nodes = this.element.childNodes;\r\n do {\r\n c = nodes[nodes.length - 1];\r\n }\r\n while (this._removeIfDiscarded(c));\r\n if (c) this.element.insertBefore(c, this.element.firstChild);\r\n }\r\n }\r\n this.animStart(this.element.firstChild);\r\n });\r\n\r\n this.element.addEventListener('mouseenter', e => {\r\n if (this.pauseOnHover) {\r\n this._setAnimationState('paused');\r\n }\r\n });\r\n\r\n this.element.addEventListener('mouseleave', e => {\r\n if (this.pauseOnHover && ! this._paused) {\r\n this._setAnimationState('running');\r\n }\r\n });\r\n\r\n window.addEventListener('resize', debounce(e => {\r\n this.populate();\r\n }, 300));\r\n\r\n Object.assign(this, this.defaults, options);\r\n\r\n this._messages = msgs;\r\n this.populate();\r\n}\r\n\r\nfunction widget(id, options, msgs) {\r\n return new this.Widget(id, options, msgs);\r\n}\r\n\r\nimport './index.scss';\r\nexport {Widget, widget};\r\n\r\n// const Telex = { Widget, widget };"],"names":["reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","global","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","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","undefined","apply","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","debounced","isInvoking","arguments","this","cancel","clearTimeout","flush","id","msgs","setPrototypeOf","defaults","speed","direction","timing","pauseOnHover","onCycle","tlx","animStart","msg","let","msgWidth","_elementWidth","duration","classList","contains","assign","style","marginLeft","animationName","animationDirection","animationDuration","animationTimingFunction","animStop","discardMsg","add","populate","prevMsgCnt","element","childNodes","length","forEach","v","telexWidth","accu","total","_messages","reduce","ac","cur","idx","content","div","document","createElement","innerHTML","class","appendChild","w","firstChild","_setAnimationState","state","animationPlayState","el","getBoundingClientRect","width","_removeIfDiscarded","removeChild","messages","message","unshift","remove","i","findIndex","e","splice","update","pause","resume","getElementById","addEventListener","target","c","nodes","insertBefore","_paused","window","debounce","Widget"],"mappings":";;;;wLAmBIA,EAAS,aAGTC,EAAa,qBAGbC,EAAa,aAGbC,EAAY,cAGZC,EAAeC,SAGfC,EAA8B,iBAAVC,GAAsBA,GAAUA,EAAOC,SAAWA,QAAUD,EAGhFE,EAA0B,iBAARC,MAAoBA,MAAQA,KAAKF,SAAWA,QAAUE,KAGxEC,EAAOL,GAAcG,GAAYG,SAAS,cAATA,GAUjCC,EAPcL,OAAOM,UAOQC,SAG7BC,EAAYC,KAAKC,IACjBC,EAAYF,KAAKG,IAkBjBC,EAAM,WACR,OAAOV,EAAKW,KAAKD,OA4MnB,SAASE,EAASC,GAChB,IAAIC,SAAcD,EAClB,QAASA,IAAkB,UAARC,GAA4B,YAARA,GA4EzC,SAASC,EAASF,GAChB,GAAoB,iBAATA,EACT,OAAOA,EAET,GAhCF,SAAkBA,GAChB,MAAuB,iBAATA,GAtBhB,SAAsBA,GACpB,QAASA,GAAyB,iBAATA,EAsBtBG,CAAaH,IAzTF,mBAyTYX,EAAee,KAAKJ,GA8B1CK,CAASL,GACX,OA3VM,IA6VR,GAAID,EAASC,GAAQ,CACnB,IAAIM,EAAgC,mBAAjBN,EAAMO,QAAwBP,EAAMO,UAAYP,EACnEA,EAAQD,EAASO,GAAUA,EAAQ,GAAMA,EAE3C,GAAoB,iBAATN,EACT,OAAiB,IAAVA,EAAcA,GAASA,EAEhCA,EAAQA,EAAMQ,QAAQhC,EAAQ,IAC9B,IAAIiC,EAAW/B,EAAWgC,KAAKV,GAC/B,OAAQS,GAAY9B,EAAU+B,KAAKV,GAC/BpB,EAAaoB,EAAMW,MAAM,GAAIF,EAAW,EAAI,GAC3ChC,EAAWiC,KAAKV,GAxWb,KAwW6BA,EAGvC,MAtPA,SAAkBY,EAAMC,EAAMC,GAC5B,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAiB,EACjBC,GAAU,EACVC,GAAS,EACTC,GAAW,EAEf,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