{"version":3,"sources":["webpack:///./node_modules/line-height/lib/line-height.js","webpack:///./node_modules/computed-style/dist/computedStyle.commonjs.js","webpack:///./node_modules/react-truncate-markup/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","webpack:///./node_modules/classnames/index.js","webpack:///./node_modules/react-truncate-markup/es/index.js","webpack:///./node_modules/react-truncate-markup/es/tokenize-rules.js"],"names":["computedStyle","module","exports","node","lnHeightStr","lnHeight","parseFloat","_lnHeightStyle","style","lineHeight","indexOf","Math","round","nodeName","_node","document","createElement","innerHTML","toUpperCase","setAttribute","fontSizeStr","fontSize","padding","border","body","appendChild","offsetHeight","removeChild","el","prop","getComputedStyle","window","currentStyle","replace","word","letter","MapShim","Map","getIndex","arr","key","result","some","entry","index","anonymous","this","__entries__","prototypeAccessors","size","configurable","get","length","prototype","set","value","push","delete","entries","splice","has","clear","forEach","callback","ctx","i","list","call","Object","defineProperties","isBrowser","global$1","global","self","Function","requestAnimationFrame$1","requestAnimationFrame","bind","setTimeout","Date","now","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","delay","leadingCall","trailingCall","lastCallTime","resolvePending","proxy","timeoutCallback","timeStamp","throttle","addObserver","observer","connect_","removeObserver","observers","disconnect_","updateObservers_","activeObservers","filter","gatherActive","hasActive","broadcastActive","addEventListener","observe","attributes","childList","characterData","subtree","removeEventListener","disconnect","ref","propertyName","getInstance","instance_","defineConfigurable","target","props","keys","defineProperty","enumerable","writable","getWindowOf","ownerDocument","defaultView","emptyRect","createRectInit","toFloat","getBordersSize","styles","positions","len","arguments","reduce","position","getHTMLElementContentRect","clientWidth","clientHeight","paddings","getPaddings","horizPad","left","right","vertPad","top","bottom","width","height","boxSizing","documentElement","isDocumentElement","vertScrollbar","horizScrollbar","abs","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getBBox","getContentRect","bbox","getSVGContentRect","x","y","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","rect","broadcastRect","ResizeObserverEntry","rectInit","Constr","contentRect","DOMRectReadOnly","create","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","TypeError","callback_","controller_","callbackCtx_","Element","observations","unobserve","clearActive","this$1","observation","map","WeakMap","ResizeObserver","method","apply","hasOwn","hasOwnProperty","classNames","classes","arg","argType","Array","isArray","inner","join","default","_class","_temp","characters","tokenizeString","isAtomic","str","words","match","test","_typeof","Symbol","iterator","obj","constructor","_extends","assign","source","SPLIT","toString","string","undefined","newString","child","children","tokenize","cloneWithChildren","isRootEl","level","display","validateTree","type","isValid","_React$Component","TruncateMarkup","instance","Constructor","_classCallCheck","_this","ReferenceError","_possibleConstructorReturn","splitDirectionSeq","shouldTruncate","wasLastCharTested","endFound","latestThatFits","origText","onTruncateCalled","policy","onTruncate","wasTruncated","handleResize","prevResizeObserver","initialRender","resizeObserver","setState","text","truncate","setRef","isNewEl","state","childrenElementWithRef","subClass","superClass","setPrototypeOf","__proto__","_inherits","componentDidMount","UNSAFE_componentWillReceiveProps","nextProps","_this2","componentDidUpdate","fits","tryToFit","componentWillUnmount","truncateOriginalText","Children","only","cloneElement","rootEl","splitDirections","newRootEl","split","ellipsis","newChildren","newChildrenWithEllipsis","concat","shouldRenderEllipsis","wordWrap","isRoot","splitString","splitArray","wordsArray","splitDirection","restSplitDirections","slice","pivotIndex","ceil","beforeString","substring","afterString","array","item","beforeArray","afterArray","maxLines","lines","getBoundingClientRect","render","Component","defaultProps","propTypes"],"mappings":"8EACA,IAAIA,EAAgB,EAAQ,MA+F5BC,EAAOC,QAxFP,SAAoBC,GAElB,IAAIC,EAAcJ,EAAcG,EAAM,eAClCE,EAAWC,WAAWF,EAAa,IAGvC,GAAIA,IAAgBC,EAAW,GAAI,CAEjC,IAAIE,EAAiBJ,EAAKK,MAAMC,WAChCN,EAAKK,MAAMC,WAAaL,EAAc,KAGtCA,EAAcJ,EAAcG,EAAM,eAClCE,EAAWC,WAAWF,EAAa,IA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EAAQ,GAE3B,MAAO,CAACF,EAAkB4E,EAAMlB,GAAyB,EAAOxD,IAGlE,IAAIiE,EAAiBb,EAAgB,GACjCc,EAAsBd,EAAgBe,MAAM,GAE5CC,EAAa5S,KAAK6S,KAAKI,EAAMxQ,OAAS,GACtC0Q,EAAcF,EAAMN,MAAM,EAAGC,GAEjC,GAAIH,IAAmB3E,EACrB,OAAO3L,KAAKoQ,WAAWY,EAAaT,EAAqBlE,GAE3D,IAAI4E,EAAaH,EAAMN,MAAMC,GAE7B,OAAOO,EAAYjB,OAAO/P,KAAKoQ,WAAWa,EAAYV,EAAqBlE,KAG7EM,EAAepM,UAAU0O,KAAO,WAC9B,IAAIiC,EAAWlR,KAAKgF,MAAMmM,MAGtBrK,EADwB9G,KAAKlB,GAAGsS,wBACDtK,OAUnC,OAAOoK,GARarT,KAAKC,MAAMgJ,EAAStJ,WAAWwC,KAAKrC,cAW1DgP,EAAepM,UAAU8Q,OAAS,WAChC,OAAOrR,KAAKqO,MAAMJ,MAGbtB,EAjX8B,CAkXrC,IAAM2E,WAAY5G,EAAO6G,aAAe,CACxCJ,MAAO,EACPvB,SAAU,MACVjS,WAAY,GACZ+P,WAAY,aACZxB,SAAU,cACTvB,GAEH,EAAe6G,UAaX","file":"0.30f99638e1ae8a406eb5.js","sourcesContent":["// Load in dependencies\nvar computedStyle = require('computed-style');\n\n/**\n * Calculate the `line-height` of a given node\n * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.\n * @returns {Number} `line-height` of the element in pixels\n */\nfunction lineHeight(node) {\n // Grab the line-height via style\n var lnHeightStr = computedStyle(node, 'line-height');\n var lnHeight = parseFloat(lnHeightStr, 10);\n\n // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')\n if (lnHeightStr === lnHeight + '') {\n // Save the old lineHeight style and update the em unit to the element\n var _lnHeightStyle = node.style.lineHeight;\n node.style.lineHeight = lnHeightStr + 'em';\n\n // Calculate the em based height\n lnHeightStr = computedStyle(node, 'line-height');\n lnHeight = parseFloat(lnHeightStr, 10);\n\n // Revert the lineHeight style\n if (_lnHeightStyle) {\n node.style.lineHeight = _lnHeightStyle;\n } else {\n delete node.style.lineHeight;\n }\n }\n\n // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)\n // DEV: `em` units are converted to `pt` in IE6\n // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length\n if (lnHeightStr.indexOf('pt') !== -1) {\n lnHeight *= 4;\n lnHeight /= 3;\n // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)\n } else if (lnHeightStr.indexOf('mm') !== -1) {\n lnHeight *= 96;\n lnHeight /= 25.4;\n // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)\n } else if (lnHeightStr.indexOf('cm') !== -1) {\n lnHeight *= 96;\n lnHeight /= 2.54;\n // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)\n } else if (lnHeightStr.indexOf('in') !== -1) {\n lnHeight *= 96;\n // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)\n } else if (lnHeightStr.indexOf('pc') !== -1) {\n lnHeight *= 16;\n }\n\n // Continue our computation\n lnHeight = Math.round(lnHeight);\n\n // If the line-height is \"normal\", calculate by font-size\n if (lnHeightStr === 'normal') {\n // Create a temporary node\n var nodeName = node.nodeName;\n var _node = document.createElement(nodeName);\n _node.innerHTML = ' ';\n\n // If we have a text area, reset it to only 1 row\n // https://github.com/twolfson/line-height/issues/4\n if (nodeName.toUpperCase() === 'TEXTAREA') {\n _node.setAttribute('rows', '1');\n }\n\n // Set the font-size of the element\n var fontSizeStr = computedStyle(node, 'font-size');\n _node.style.fontSize = fontSizeStr;\n\n // Remove default padding/border which can affect offset height\n // https://github.com/twolfson/line-height/issues/4\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight\n _node.style.padding = '0px';\n _node.style.border = '0px';\n\n // Append it to the body\n var body = document.body;\n body.appendChild(_node);\n\n // Assume the line height of the element is the height\n var height = _node.offsetHeight;\n lnHeight = height;\n\n // Remove our child from the DOM\n body.removeChild(_node);\n }\n\n // Return the calculated height\n return lnHeight;\n}\n\n// Export lineHeight\nmodule.exports = lineHeight;\n","// This code has been refactored for 140 bytes\n// You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js\nvar computedStyle = function (el, prop, getComputedStyle) {\n getComputedStyle = window.getComputedStyle;\n\n // In one fell swoop\n return (\n // If we have getComputedStyle\n getComputedStyle ?\n // Query it\n // TODO: From CSS-Query notes, we might need (node, null) for FF\n getComputedStyle(el) :\n\n // Otherwise, we are in IE and use currentStyle\n el.currentStyle\n )[\n // Switch to camelCase for CSSOM\n // DEV: Grabbed from jQuery\n // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194\n // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597\n prop.replace(/-(\\w)/gi, function (word, letter) {\n return letter.toUpperCase();\n })\n ];\n};\n\nmodule.exports = computedStyle;\n","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\n/* eslint-disable require-jsdoc, valid-jsdoc */\nvar MapShim = (function () {\n if (typeof Map !== 'undefined') {\n return Map;\n }\n\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\n function getIndex(arr, key) {\n var result = -1;\n\n arr.some(function (entry, index) {\n if (entry[0] === key) {\n result = index;\n\n return true;\n }\n\n return false;\n });\n\n return result;\n }\n\n return (function () {\n function anonymous() {\n this.__entries__ = [];\n }\n\n var prototypeAccessors = { size: { configurable: true } };\n\n /**\r\n * @returns {boolean}\r\n */\n prototypeAccessors.size.get = function () {\n return this.__entries__.length;\n };\n\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\n anonymous.prototype.get = function (key) {\n var index = getIndex(this.__entries__, key);\n var entry = this.__entries__[index];\n\n return entry && entry[1];\n };\n\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\n anonymous.prototype.set = function (key, value) {\n var index = getIndex(this.__entries__, key);\n\n if (~index) {\n this.__entries__[index][1] = value;\n } else {\n this.__entries__.push([key, value]);\n }\n };\n\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\n anonymous.prototype.delete = function (key) {\n var entries = this.__entries__;\n var index = getIndex(entries, key);\n\n if (~index) {\n entries.splice(index, 1);\n }\n };\n\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\n anonymous.prototype.has = function (key) {\n return !!~getIndex(this.__entries__, key);\n };\n\n /**\r\n * @returns {void}\r\n */\n anonymous.prototype.clear = function () {\n this.__entries__.splice(0);\n };\n\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\n anonymous.prototype.forEach = function (callback, ctx) {\n var this$1 = this;\n if ( ctx === void 0 ) ctx = null;\n\n for (var i = 0, list = this$1.__entries__; i < list.length; i += 1) {\n var entry = list[i];\n\n callback.call(ctx, entry[1], entry[0]);\n }\n };\n\n Object.defineProperties( anonymous.prototype, prototypeAccessors );\n\n return anonymous;\n }());\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\nvar global$1 = (function () {\n if (typeof global !== 'undefined' && global.Math === Math) {\n return global;\n }\n\n if (typeof self !== 'undefined' && self.Math === Math) {\n return self;\n }\n\n if (typeof window !== 'undefined' && window.Math === Math) {\n return window;\n }\n\n // eslint-disable-next-line no-new-func\n return Function('return this')();\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\nvar requestAnimationFrame$1 = (function () {\n if (typeof requestAnimationFrame === 'function') {\n // It's required to use a bounded function because IE sometimes throws\n // an \"Invalid calling object\" error if rAF is invoked without the global\n // object on the left hand side.\n return requestAnimationFrame.bind(global$1);\n }\n\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\n})();\n\n// Defines minimum timeout before adding a trailing call.\nvar trailingTimeout = 2;\n\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\nvar throttle = function (callback, delay) {\n var leadingCall = false,\n trailingCall = false,\n lastCallTime = 0;\n\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\n function resolvePending() {\n if (leadingCall) {\n leadingCall = false;\n\n callback();\n }\n\n if (trailingCall) {\n proxy();\n }\n }\n\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\n function timeoutCallback() {\n requestAnimationFrame$1(resolvePending);\n }\n\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\n function proxy() {\n var timeStamp = Date.now();\n\n if (leadingCall) {\n // Reject immediately following calls.\n if (timeStamp - lastCallTime < trailingTimeout) {\n return;\n }\n\n // Schedule new call to be in invoked when the pending one is resolved.\n // This is important for \"transitions\" which never actually start\n // immediately so there is a chance that we might miss one if change\n // happens amids the pending invocation.\n trailingCall = true;\n } else {\n leadingCall = true;\n trailingCall = false;\n\n setTimeout(timeoutCallback, delay);\n }\n\n lastCallTime = timeStamp;\n }\n\n return proxy;\n};\n\n// Minimum delay before invoking the update of observers.\nvar REFRESH_DELAY = 20;\n\n// A list of substrings of CSS properties used to find transition events that\n// might affect dimensions of observed elements.\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\n\n// Check if MutationObserver is available.\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\n\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\nvar ResizeObserverController = function() {\n this.connected_ = false;\n this.mutationEventsAdded_ = false;\n this.mutationsObserver_ = null;\n this.observers_ = [];\n\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\n};\n\n/**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\n\n\n/**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\n\n\n/**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\n\n/**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\nResizeObserverController.prototype.addObserver = function (observer) {\n if (!~this.observers_.indexOf(observer)) {\n this.observers_.push(observer);\n }\n\n // Add listeners if they haven't been added yet.\n if (!this.connected_) {\n this.connect_();\n }\n};\n\n/**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\nResizeObserverController.prototype.removeObserver = function (observer) {\n var observers = this.observers_;\n var index = observers.indexOf(observer);\n\n // Remove observer if it's present in registry.\n if (~index) {\n observers.splice(index, 1);\n }\n\n // Remove listeners if controller has no connected observers.\n if (!observers.length && this.connected_) {\n this.disconnect_();\n }\n};\n\n/**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\nResizeObserverController.prototype.refresh = function () {\n var changesDetected = this.updateObservers_();\n\n // Continue running updates if changes have been detected as there might\n // be future ones caused by CSS transitions.\n if (changesDetected) {\n this.refresh();\n }\n};\n\n/**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\nResizeObserverController.prototype.updateObservers_ = function () {\n // Collect observers that have active observations.\n var activeObservers = this.observers_.filter(function (observer) {\n return observer.gatherActive(), observer.hasActive();\n });\n\n // Deliver notifications in a separate cycle in order to avoid any\n // collisions between observers, e.g. when multiple instances of\n // ResizeObserver are tracking the same element and the callback of one\n // of them changes content dimensions of the observed target. Sometimes\n // this may result in notifications being blocked for the rest of observers.\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\n\n return activeObservers.length > 0;\n};\n\n/**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\nResizeObserverController.prototype.connect_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already added.\n if (!isBrowser || this.connected_) {\n return;\n }\n\n // Subscription to the \"Transitionend\" event is used as a workaround for\n // delayed transitions. This way it's possible to capture at least the\n // final state of an element.\n document.addEventListener('transitionend', this.onTransitionEnd_);\n\n window.addEventListener('resize', this.refresh);\n\n if (mutationObserverSupported) {\n this.mutationsObserver_ = new MutationObserver(this.refresh);\n\n this.mutationsObserver_.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n } else {\n document.addEventListener('DOMSubtreeModified', this.refresh);\n\n this.mutationEventsAdded_ = true;\n }\n\n this.connected_ = true;\n};\n\n/**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\nResizeObserverController.prototype.disconnect_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already removed.\n if (!isBrowser || !this.connected_) {\n return;\n }\n\n document.removeEventListener('transitionend', this.onTransitionEnd_);\n window.removeEventListener('resize', this.refresh);\n\n if (this.mutationsObserver_) {\n this.mutationsObserver_.disconnect();\n }\n\n if (this.mutationEventsAdded_) {\n document.removeEventListener('DOMSubtreeModified', this.refresh);\n }\n\n this.mutationsObserver_ = null;\n this.mutationEventsAdded_ = false;\n this.connected_ = false;\n};\n\n/**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\nResizeObserverController.prototype.onTransitionEnd_ = function (ref) {\n var propertyName = ref.propertyName; if ( propertyName === void 0 ) propertyName = '';\n\n // Detect whether transition may affect dimensions of an element.\n var isReflowProperty = transitionKeys.some(function (key) {\n return !!~propertyName.indexOf(key);\n });\n\n if (isReflowProperty) {\n this.refresh();\n }\n};\n\n/**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\nResizeObserverController.getInstance = function () {\n if (!this.instance_) {\n this.instance_ = new ResizeObserverController();\n }\n\n return this.instance_;\n};\n\nResizeObserverController.instance_ = null;\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\nvar defineConfigurable = (function (target, props) {\n for (var i = 0, list = Object.keys(props); i < list.length; i += 1) {\n var key = list[i];\n\n Object.defineProperty(target, key, {\n value: props[key],\n enumerable: false,\n writable: false,\n configurable: true\n });\n }\n\n return target;\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\nvar getWindowOf = (function (target) {\n // Assume that the element is an instance of Node, which means that it\n // has the \"ownerDocument\" property from which we can retrieve a\n // corresponding global object.\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\n\n // Return the local global object if it's not possible extract one from\n // provided element.\n return ownerGlobal || global$1;\n});\n\n// Placeholder of an empty content rectangle.\nvar emptyRect = createRectInit(0, 0, 0, 0);\n\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\nfunction toFloat(value) {\n return parseFloat(value) || 0;\n}\n\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\nfunction getBordersSize(styles) {\n var positions = [], len = arguments.length - 1;\n while ( len-- > 0 ) positions[ len ] = arguments[ len + 1 ];\n\n return positions.reduce(function (size, position) {\n var value = styles['border-' + position + '-width'];\n\n return size + toFloat(value);\n }, 0);\n}\n\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\nfunction getPaddings(styles) {\n var positions = ['top', 'right', 'bottom', 'left'];\n var paddings = {};\n\n for (var i = 0, list = positions; i < list.length; i += 1) {\n var position = list[i];\n\n var value = styles['padding-' + position];\n\n paddings[position] = toFloat(value);\n }\n\n return paddings;\n}\n\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\nfunction getSVGContentRect(target) {\n var bbox = target.getBBox();\n\n return createRectInit(0, 0, bbox.width, bbox.height);\n}\n\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\nfunction getHTMLElementContentRect(target) {\n // Client width & height properties can't be\n // used exclusively as they provide rounded values.\n var clientWidth = target.clientWidth;\n var clientHeight = target.clientHeight;\n\n // By this condition we can catch all non-replaced inline, hidden and\n // detached elements. Though elements with width & height properties less\n // than 0.5 will be discarded as well.\n //\n // Without it we would need to implement separate methods for each of\n // those cases and it's not possible to perform a precise and performance\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\n // gives wrong results for elements with width & height less than 0.5.\n if (!clientWidth && !clientHeight) {\n return emptyRect;\n }\n\n var styles = getWindowOf(target).getComputedStyle(target);\n var paddings = getPaddings(styles);\n var horizPad = paddings.left + paddings.right;\n var vertPad = paddings.top + paddings.bottom;\n\n // Computed styles of width & height are being used because they are the\n // only dimensions available to JS that contain non-rounded values. It could\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\n // affected by CSS transformations let alone paddings, borders and scroll bars.\n var width = toFloat(styles.width),\n height = toFloat(styles.height);\n\n // Width & height include paddings and borders when the 'border-box' box\n // model is applied (except for IE).\n if (styles.boxSizing === 'border-box') {\n // Following conditions are required to handle Internet Explorer which\n // doesn't include paddings and borders to computed CSS dimensions.\n //\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\n // properties then it's either IE, and thus we don't need to subtract\n // anything, or an element merely doesn't have paddings/borders styles.\n if (Math.round(width + horizPad) !== clientWidth) {\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\n }\n\n if (Math.round(height + vertPad) !== clientHeight) {\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\n }\n }\n\n // Following steps can't be applied to the document's root element as its\n // client[Width/Height] properties represent viewport area of the window.\n // Besides, it's as well not necessary as the <html> itself neither has\n // rendered scroll bars nor it can be clipped.\n if (!isDocumentElement(target)) {\n // In some browsers (only in Firefox, actually) CSS width & height\n // include scroll bars size which can be removed at this step as scroll\n // bars are the only difference between rounded dimensions + paddings\n // and \"client\" properties, though that is not always true in Chrome.\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\n\n // Chrome has a rather weird rounding of \"client\" properties.\n // E.g. for an element with content width of 314.2px it sometimes gives\n // the client width of 315px and for the width of 314.7px it may give\n // 314px. And it doesn't happen all the time. So just ignore this delta\n // as a non-relevant.\n if (Math.abs(vertScrollbar) !== 1) {\n width -= vertScrollbar;\n }\n\n if (Math.abs(horizScrollbar) !== 1) {\n height -= horizScrollbar;\n }\n }\n\n return createRectInit(paddings.left, paddings.top, width, height);\n}\n\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\nvar isSVGGraphicsElement = (function () {\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\n // interface.\n if (typeof SVGGraphicsElement !== 'undefined') {\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\n }\n\n // If it's so, then check that element is at least an instance of the\n // SVGElement and that it has the \"getBBox\" method.\n // eslint-disable-next-line no-extra-parens\n return function (target) { return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function'; };\n})();\n\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\nfunction isDocumentElement(target) {\n return target === getWindowOf(target).document.documentElement;\n}\n\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\nfunction getContentRect(target) {\n if (!isBrowser) {\n return emptyRect;\n }\n\n if (isSVGGraphicsElement(target)) {\n return getSVGContentRect(target);\n }\n\n return getHTMLElementContentRect(target);\n}\n\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\nfunction createReadOnlyRect(ref) {\n var x = ref.x;\n var y = ref.y;\n var width = ref.width;\n var height = ref.height;\n\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\n var rect = Object.create(Constr.prototype);\n\n // Rectangle's properties are not writable and non-enumerable.\n defineConfigurable(rect, {\n x: x, y: y, width: width, height: height,\n top: y,\n right: x + width,\n bottom: height + y,\n left: x\n });\n\n return rect;\n}\n\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\nfunction createRectInit(x, y, width, height) {\n return { x: x, y: y, width: width, height: height };\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\nvar ResizeObservation = function(target) {\n this.broadcastWidth = 0;\n this.broadcastHeight = 0;\n this.contentRect_ = createRectInit(0, 0, 0, 0);\n\n this.target = target;\n};\n\n/**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\n\n\n/**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\n\n\n/**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\nResizeObservation.prototype.isActive = function () {\n var rect = getContentRect(this.target);\n\n this.contentRect_ = rect;\n\n return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;\n};\n\n/**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\nResizeObservation.prototype.broadcastRect = function () {\n var rect = this.contentRect_;\n\n this.broadcastWidth = rect.width;\n this.broadcastHeight = rect.height;\n\n return rect;\n};\n\nvar ResizeObserverEntry = function(target, rectInit) {\n var contentRect = createReadOnlyRect(rectInit);\n\n // According to the specification following properties are not writable\n // and are also not enumerable in the native implementation.\n //\n // Property accessors are not being used as they'd require to define a\n // private WeakMap storage which may cause memory leaks in browsers that\n // don't support this type of collections.\n defineConfigurable(this, { target: target, contentRect: contentRect });\n};\n\nvar ResizeObserverSPI = function(callback, controller, callbackCtx) {\n this.activeObservations_ = [];\n this.observations_ = new MapShim();\n\n if (typeof callback !== 'function') {\n throw new TypeError('The callback provided as parameter 1 is not a function.');\n }\n\n this.callback_ = callback;\n this.controller_ = controller;\n this.callbackCtx_ = callbackCtx;\n};\n\n/**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\n\n\n/**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\n\n\n/**\r\n * Public ResizeObserver instance which will be passed to the callback\r\n * function and used as a value of it's \"this\" binding.\r\n *\r\n * @private {ResizeObserver}\r\n */\n\n/**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\nResizeObserverSPI.prototype.observe = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n // Do nothing if current environment doesn't have the Element interface.\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n\n var observations = this.observations_;\n\n // Do nothing if element is already being observed.\n if (observations.has(target)) {\n return;\n }\n\n observations.set(target, new ResizeObservation(target));\n\n this.controller_.addObserver(this);\n\n // Force the update of observations.\n this.controller_.refresh();\n};\n\n/**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\nResizeObserverSPI.prototype.unobserve = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n // Do nothing if current environment doesn't have the Element interface.\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n\n var observations = this.observations_;\n\n // Do nothing if element is not being observed.\n if (!observations.has(target)) {\n return;\n }\n\n observations.delete(target);\n\n if (!observations.size) {\n this.controller_.removeObserver(this);\n }\n};\n\n/**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\nResizeObserverSPI.prototype.disconnect = function () {\n this.clearActive();\n this.observations_.clear();\n this.controller_.removeObserver(this);\n};\n\n/**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\nResizeObserverSPI.prototype.gatherActive = function () {\n var this$1 = this;\n\n this.clearActive();\n\n this.observations_.forEach(function (observation) {\n if (observation.isActive()) {\n this$1.activeObservations_.push(observation);\n }\n });\n};\n\n/**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\nResizeObserverSPI.prototype.broadcastActive = function () {\n // Do nothing if observer doesn't have active observations.\n if (!this.hasActive()) {\n return;\n }\n\n var ctx = this.callbackCtx_;\n\n // Create ResizeObserverEntry instance for every active observation.\n var entries = this.activeObservations_.map(function (observation) {\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\n });\n\n this.callback_.call(ctx, entries, ctx);\n this.clearActive();\n};\n\n/**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\nResizeObserverSPI.prototype.clearActive = function () {\n this.activeObservations_.splice(0);\n};\n\n/**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\nResizeObserverSPI.prototype.hasActive = function () {\n return this.activeObservations_.length > 0;\n};\n\n// Registry of internal observers. If WeakMap is not available use current shim\n// for the Map collection as it has all required methods and because WeakMap\n// can't be fully polyfilled anyway.\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\n\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\nvar ResizeObserver = function(callback) {\n if (!(this instanceof ResizeObserver)) {\n throw new TypeError('Cannot call a class as a function.');\n }\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n var controller = ResizeObserverController.getInstance();\n var observer = new ResizeObserverSPI(callback, controller, this);\n\n observers.set(this, observer);\n};\n\n// Expose public methods of ResizeObserver.\n['observe', 'unobserve', 'disconnect'].forEach(function (method) {\n ResizeObserver.prototype[method] = function () {\n return (ref = observers.get(this))[method].apply(ref, arguments);\n var ref;\n };\n});\n\nvar index = (function () {\n // Export existing implementation if available.\n if (typeof global$1.ResizeObserver !== 'undefined') {\n return global$1.ResizeObserver;\n }\n\n return ResizeObserver;\n})();\n\nexport default index;\n","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","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; };\n\nvar _class, _temp;\n\nvar _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; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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; }\n\nfunction _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; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport getLineHeight from 'line-height';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport TOKENIZE_POLICY from './tokenize-rules';\n\nvar SPLIT = {\n LEFT: true,\n RIGHT: false\n};\n\nvar toString = function toString(node) {\n var string = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n if (!node) {\n return string;\n } else if (typeof node === 'string') {\n return string + node;\n } else if (Array.isArray(node)) {\n var newString = string;\n node.forEach(function (child) {\n newString = toString(child, newString);\n });\n\n return newString;\n }\n\n return toString(node.props.children, string);\n};\n\nvar getTokenizePolicyByProp = function getTokenizePolicyByProp(tokenize) {\n if (process.env.NODE_ENV !== 'production' && !TOKENIZE_POLICY[tokenize]) {\n /* eslint-disable no-console */\n console.warn('ReactTruncateMarkup: Unknown option for prop \\'tokenize\\': \\'' + tokenize + '\\'. Option \\'characters\\' will be used instead.');\n /* eslint-enable */\n }\n\n return TOKENIZE_POLICY[tokenize] || TOKENIZE_POLICY.characters;\n};\n\nvar cloneWithChildren = function cloneWithChildren(node, children, isRootEl, level) {\n var getDisplayStyle = function getDisplayStyle() {\n if (isRootEl) {\n return {\n // root element cannot be an inline element because of the line calculation\n display: (node.props.style || {}).display || 'block'\n };\n } else if (level === 2) {\n return {\n // level 2 elements (direct children of the root element) need to be inline because of the ellipsis.\n // if level 2 element was a block element, ellipsis would get rendered on a new line, breaking the max number of lines\n display: (node.props.style || {}).display || 'inline-block'\n };\n } else return {};\n };\n\n return _extends({}, node, {\n props: _extends({}, node.props, {\n style: _extends({}, node.props.style, getDisplayStyle()),\n children: children\n })\n });\n};\n\nvar validateTree = function validateTree(node) {\n if (typeof node === 'string') {\n return true;\n } else if (typeof node.type === 'function') {\n if (process.env.NODE_ENV !== 'production') {\n /* eslint-disable no-console */\n console.error('ReactTruncateMarkup tried to render <' + node.type.name + ' />, but truncating React components is not supported, the full content is rendered instead. Only DOM elements are supported.');\n /* eslint-enable */\n }\n\n return false;\n }\n\n if (node.props.children) {\n if (Array.isArray(node.props.children)) {\n return node.props.children.reduce(function (isValid, child) {\n return isValid && validateTree(child);\n }, true);\n }\n\n return validateTree(node.props.children);\n }\n\n return true;\n};\n\nvar TruncateMarkup = (_temp = _class = function (_React$Component) {\n _inherits(TruncateMarkup, _React$Component);\n\n function TruncateMarkup(props) {\n _classCallCheck(this, TruncateMarkup);\n\n var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));\n\n _this.isValid = validateTree(_this.props.children);\n _this.lineHeight = null;\n _this.splitDirectionSeq = [];\n _this.shouldTruncate = true;\n _this.wasLastCharTested = false;\n _this.endFound = false;\n _this.latestThatFits = null;\n _this.origText = null;\n _this.onTruncateCalled = false;\n _this.policy = null;\n\n _this.onTruncate = function (wasTruncated) {\n if (!_this.onTruncateCalled) {\n _this.onTruncateCalled = true;\n _this.props.onTruncate(wasTruncated);\n }\n };\n\n _this.handleResize = function (el, prevResizeObserver) {\n // clean up previous observer\n if (prevResizeObserver) {\n prevResizeObserver.disconnect();\n }\n\n // unmounting or just unsetting the element to be replaced with a new one later\n if (!el) return null;\n\n /* Wrapper element resize handing */\n var initialRender = true;\n var resizeCallback = function resizeCallback() {\n if (initialRender) {\n // ResizeObserer cb is called on initial render too so we are skipping here\n initialRender = false;\n } else {\n // wrapper element has been resized, recalculating with the original text\n _this.shouldTruncate = false;\n _this.latestThatFits = null;\n\n _this.setState({\n text: _this.origText\n }, function () {\n _this.shouldTruncate = true;\n _this.onTruncateCalled = false;\n _this.truncate();\n });\n }\n };\n\n var resizeObserver = prevResizeObserver || new ResizeObserver(resizeCallback);\n\n resizeObserver.observe(el);\n\n return resizeObserver;\n };\n\n _this.setRef = function (el) {\n var isNewEl = _this.el !== el;\n _this.el = el;\n\n // whenever we obtain a new element, attach resize handler\n if (isNewEl) {\n _this.resizeObserver = _this.handleResize(el, _this.resizeObserver);\n }\n };\n\n _this.state = {\n text: _this.childrenElementWithRef(_this.props.children)\n };\n return _this;\n }\n\n TruncateMarkup.prototype.componentDidMount = function componentDidMount() {\n if (!this.isValid) {\n return;\n }\n\n this.origText = this.state.text;\n\n // get the computed line-height of the parent element\n // it'll be used for determining whether the text fits the container or not\n this.lineHeight = this.props.lineHeight || getLineHeight(this.el);\n this.policy = getTokenizePolicyByProp(this.props.tokenize);\n this.truncate();\n };\n\n TruncateMarkup.prototype.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) {\n var _this2 = this;\n\n this.policy = getTokenizePolicyByProp(nextProps.tokenize);\n this.shouldTruncate = false;\n this.latestThatFits = null;\n this.isValid = validateTree(nextProps.children);\n\n this.setState({\n text: this.childrenElementWithRef(nextProps.children)\n }, function () {\n if (!_this2.isValid) {\n return;\n }\n\n _this2.origText = _this2.state.text;\n _this2.lineHeight = nextProps.lineHeight || getLineHeight(_this2.el);\n _this2.shouldTruncate = true;\n _this2.truncate();\n });\n };\n\n TruncateMarkup.prototype.componentDidUpdate = function componentDidUpdate() {\n if (this.shouldTruncate === false || this.isValid === false) {\n return;\n }\n\n if (this.endFound) {\n // we've found the end where we cannot split the text further\n // that means we've already found the max subtree that fits the container\n // so we are rendering that\n if (this.state.text !== this.latestThatFits) {\n /* eslint-disable react/no-did-update-set-state */\n this.setState({\n text: this.latestThatFits\n });\n\n return;\n /* eslint-enable */\n }\n\n this.onTruncate( /* wasTruncated */true);\n\n return;\n }\n\n if (this.splitDirectionSeq.length) {\n if (this.fits()) {\n this.latestThatFits = this.state.text;\n // we've found a subtree that fits the container\n // but we need to check if we didn't cut too much of it off\n // so we are changing the last splitting decision from splitting and going left\n // to splitting and going right\n this.splitDirectionSeq.splice(this.splitDirectionSeq.length - 1, 1, SPLIT.RIGHT, SPLIT.LEFT);\n } else {\n this.splitDirectionSeq.push(SPLIT.LEFT);\n }\n\n this.tryToFit(this.origText, this.splitDirectionSeq);\n }\n };\n\n TruncateMarkup.prototype.componentWillUnmount = function componentWillUnmount() {\n this.lineHeight = null;\n this.origText = null;\n this.latestThatFits = null;\n this.splitDirectionSeq = [];\n };\n\n TruncateMarkup.prototype.truncate = function truncate() {\n if (this.fits()) {\n // the whole text fits on the first try, no need to do anything else\n this.shouldTruncate = false;\n this.onTruncate( /* wasTruncated */false);\n\n return;\n }\n\n this.truncateOriginalText();\n };\n\n TruncateMarkup.prototype.childrenElementWithRef = function childrenElementWithRef(children) {\n var child = React.Children.only(children);\n\n return React.cloneElement(child, {\n ref: this.setRef\n });\n };\n\n TruncateMarkup.prototype.truncateOriginalText = function truncateOriginalText() {\n this.endFound = false;\n this.splitDirectionSeq = [SPLIT.LEFT];\n this.wasLastCharTested = false;\n\n this.tryToFit(this.origText, this.splitDirectionSeq);\n };\n\n /**\n * Splits rootEl based on instructions and updates React's state with the returned element\n * After React rerenders the new text, we'll check if the new text fits in componentDidUpdate\n * @param {ReactElement} rootEl - the original children element\n * @param {Array} splitDirections - list of SPLIT.RIGHT/LEFT instructions\n */\n\n\n TruncateMarkup.prototype.tryToFit = function tryToFit(rootEl, splitDirections) {\n if (!rootEl.props.children) {\n // no markup in container\n return;\n }\n\n var newRootEl = this.split(rootEl, splitDirections, /* isRootEl */true);\n\n var ellipsis = typeof this.props.ellipsis === 'function' ? this.props.ellipsis(newRootEl) : this.props.ellipsis;\n\n ellipsis = (typeof ellipsis === 'undefined' ? 'undefined' : _typeof(ellipsis)) === 'object' ? React.cloneElement(ellipsis, { key: 'ellipsis' }) : ellipsis;\n\n var newChildren = newRootEl.props.children;\n var newChildrenWithEllipsis = Array.isArray(newChildren) ? [].concat(newChildren, [ellipsis]) : [newChildren, ellipsis];\n\n // edge case tradeoff EC#1 - on initial render it doesn't fit in the requested number of lines (1) so it starts truncating\n // - because of truncating and the ellipsis position, div#lvl2 will have display set to 'inline-block',\n // causing the whole body to fit in 1 line again\n // - if that happens, ellipsis is not needed anymore as the whole body is rendered\n // - NOTE this could be fixed by checking for this exact case and handling it separately so it renders <div>foo {ellipsis}</div>\n //\n // Example:\n // <TruncateMarkup lines={1}>\n // <div>\n // foo\n // <div id=\"lvl2\">bar</div>\n // </div>\n // </TruncateMarkup>\n var shouldRenderEllipsis = toString(newChildren) !== toString(this.origText);\n\n this.setState({\n text: _extends({}, newRootEl, {\n props: _extends({}, newRootEl.props, {\n style: _extends({\n wordWrap: 'break-word'\n }, newRootEl.props.style),\n children: shouldRenderEllipsis ? newChildrenWithEllipsis : newChildren\n })\n })\n });\n };\n\n /**\n * Splits JSX node based on its type\n * @param {null|string|Array|Object} node - JSX node\n * @param {Array} splitDirections - list of SPLIT.RIGHT/LEFT instructions\n * @return {null|string|Array|Object} - split JSX node\n */\n\n\n TruncateMarkup.prototype.split = function split(node, splitDirections) {\n var isRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n\n if (!node) {\n return node;\n } else if (typeof node === 'string') {\n return this.splitString(node, splitDirections, level);\n } else if (Array.isArray(node)) {\n return this.splitArray(node, splitDirections, level);\n }\n\n var newChildren = this.split(node.props.children, splitDirections,\n /* isRoot */false, level + 1);\n\n return cloneWithChildren(node, newChildren, isRoot, level);\n };\n\n TruncateMarkup.prototype.splitString = function splitString(string) {\n var splitDirections = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var level = arguments[2];\n\n if (!splitDirections.length) {\n return string;\n }\n\n if (splitDirections.length && this.policy.isAtomic(string)) {\n // allow for an extra render test with the current character included\n // in most cases this variation was already tested, but some edge cases require this check\n // NOTE could be removed once EC#1 is taken care of\n if (!this.wasLastCharTested) {\n this.wasLastCharTested = true;\n } else {\n // we are trying to split further but we have nowhere to go now\n // that means we've already found the max subtree that fits the container\n this.endFound = true;\n }\n\n return string;\n }\n\n if (this.policy.tokenizeString) {\n var wordsArray = this.splitArray(this.policy.tokenizeString(string), splitDirections, level);\n\n // in order to preserve the input structure\n return wordsArray.join('');\n }\n\n var splitDirection = splitDirections[0],\n restSplitDirections = splitDirections.slice(1);\n\n var pivotIndex = Math.ceil(string.length / 2);\n var beforeString = string.substring(0, pivotIndex);\n\n if (splitDirection === SPLIT.LEFT) {\n return this.splitString(beforeString, restSplitDirections, level);\n }\n var afterString = string.substring(pivotIndex);\n\n return beforeString + this.splitString(afterString, restSplitDirections, level);\n };\n\n TruncateMarkup.prototype.splitArray = function splitArray(array) {\n var splitDirections = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var level = arguments[2];\n\n if (!splitDirections.length) {\n return array;\n }\n\n if (array.length === 1) {\n var item = array[0];\n\n\n if (typeof item === 'string') {\n return [this.splitString(item, splitDirections, level)];\n }\n var children = item.props.children;\n\n\n var newChildren = this.split(children, splitDirections,\n /* isRoot */false, level + 1);\n\n return [cloneWithChildren(item, newChildren, /* isRoot */false, level)];\n }\n\n var splitDirection = splitDirections[0],\n restSplitDirections = splitDirections.slice(1);\n\n var pivotIndex = Math.ceil(array.length / 2);\n var beforeArray = array.slice(0, pivotIndex);\n\n if (splitDirection === SPLIT.LEFT) {\n return this.splitArray(beforeArray, restSplitDirections, level);\n }\n var afterArray = array.slice(pivotIndex);\n\n return beforeArray.concat(this.splitArray(afterArray, restSplitDirections, level));\n };\n\n TruncateMarkup.prototype.fits = function fits() {\n var maxLines = this.props.lines;\n\n var _el$getBoundingClient = this.el.getBoundingClientRect(),\n height = _el$getBoundingClient.height;\n\n var computedLines = Math.round(height / parseFloat(this.lineHeight));\n\n if (process.env.NODE_ENV !== 'production' && computedLines <= 0) {\n /* eslint-disable no-console */\n console.warn('ReactTruncateMarkup: number of currently rendered lines: ' + computedLines + ', not truncating...\\n It may be caused by target element not being visible at the time of computation.');\n /* eslint-enable */\n }\n\n return maxLines >= computedLines;\n };\n\n TruncateMarkup.prototype.render = function render() {\n return this.state.text;\n };\n\n return TruncateMarkup;\n}(React.Component), _class.defaultProps = {\n lines: 1,\n ellipsis: '...',\n lineHeight: '',\n onTruncate: function onTruncate() {},\n tokenize: 'characters'\n}, _temp);\nexport { TruncateMarkup as default };\nTruncateMarkup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.element.isRequired,\n lines: PropTypes.number,\n ellipsis: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.func]),\n lineHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n onTruncate: PropTypes.func,\n // eslint-disable-next-line\n onAfterTruncate: function onAfterTruncate(props, propName, componentName) {\n if (props[propName]) {\n return new Error(componentName + ': Setting `onAfterTruncate` prop is deprecated, use `onTruncate` instead.');\n }\n },\n tokenize: PropTypes.oneOf(['characters', 'words'])\n} : {};","var TOKENIZE_POLICY = {\n characters: {\n tokenizeString: null,\n isAtomic: function isAtomic(str) {\n return str.length <= 1;\n }\n },\n words: {\n tokenizeString: function tokenizeString(str) {\n return str.match(/(\\s*\\S[\\S\\xA0]*)/g);\n },\n isAtomic: function isAtomic(str) {\n return (/^\\s*[\\S\\xA0]*\\s*$/.test(str)\n );\n }\n }\n};\n\nexport default TOKENIZE_POLICY;"],"sourceRoot":""}