// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/dijit/geoenrichment/ReportPlayer/core/grid/valueFieldUtils/ValueFieldTextTrimmer",["dojo/dom-style"],function(d){var e={_IS_RICH_TEXT_RE:/<\w/,checkValueLabelOverflow:function(a,c){a.valueLabel&&void 0!==c&&(a.valueLabel.innerHTML!==c&&(a.valueLabel.innerHTML=c),delete a.valueLabel.__untrimmedText);if(a.trimTextIfOverflows&&a.valueLabel&&a.valueLabel.innerHTML&&!e._IS_RICH_TEXT_RE.test(a.valueLabel.innerHTML)){var b=a.valueLabel.__untrimmedText||a.valueLabel.innerHTML;b!==a.valueLabel.innerHTML&&
(a.valueLabel.innerHTML=b);a.valueLabel.__untrimmedText=b;for(var b=b.trim(),f=a.domNode.clientHeight,g=d.toPixelValue(a.domNode,d.get(a.domNode,"fontSize"));!(a.valueLabel.clientHeight<1.5*g||-1===a.valueLabel.innerHTML.lastIndexOf(" ")||a.valueLabel.clientHeight<=f);)b=b.substr(0,b.lastIndexOf(" ")).trim(),a.valueLabel.innerHTML=b+"..."}}};return e});