@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 3.07 kB
JavaScript
module.exports=function(i){var n={};function r(e){if(n[e])return n[e].exports;var t=n[e]={exports:{},id:e,loaded:!1};return i[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}return r.m=i,r.c=n,r.p="",r(0)}({0:function(e,t,i){e.exports=i(1752)},3:function(e,t){e.exports=function(){throw Error("define cannot be used indirect")}},20:function(e,t){e.exports=require("../kendo.core")},1752:function(e,t,i){var n;i(3),i=[i(20)],void 0===(t="function"==typeof(n=function(){var t=window.kendo.jQuery,i=(window.kendo.util=window.kendo.util||{},kendo.Class.extend({init:function(e){this._size=e;this._length=0;this._map={}},put:function(e,t){var i=this._map;var n={key:e,value:t};i[e]=n;if(!this._head)this._head=this._tail=n;else{this._tail.newer=n;n.older=this._tail;this._tail=n}if(this._length>=this._size){i[this._head.key]=null;this._head=this._head.newer;this._head.older=null}else this._length++},get:function(e){var t=this._map[e];if(t){if(t===this._head&&t!==this._tail){this._head=t.newer;this._head.older=null}if(t!==this._tail){if(t.older){t.older.newer=t.newer;t.newer.older=t.older}t.older=this._tail;t.newer=null;this._tail.newer=t;this._tail=t}return t.value}}})),n=/\r?\n|\r|\t/g,r=" ";function p(e){return String(e).replace(n,r)}function f(e){var t=[];for(var i in e)t.push(i+e[i]);return t.sort().join("")}function c(e){var t=2166136261;for(var i=0;i<e.length;++i){t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);t^=e.charCodeAt(i)}return t>>>0}function v(){return{width:0,height:0,baseline:0}}var a={baselineMarkerSize:1},_;if(typeof document!=="undefined"){_=document.createElement("div");_.style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;"+"padding: 0 !important; margin: 0 !important; border: 0 !important;"+"line-height: normal !important; visibility: hidden !important; white-space: pre!important;"}var o=kendo.Class.extend({init:function(e){this._cache=new i(1e3);this.options=t.extend({},a,e)},measure:function(e,t,i){if(i===void 0)i={};if(typeof e==="undefined"||e===null)return v();var d=f(t);var n=c(e+d);var r=this._cache.get(n);if(r)return r;var o=v();var a=i.box||_;var s=this._baselineMarker().cloneNode(false);for(var h in t){var l=t[h];if(typeof l!=="undefined")a.style[h]=l}var u=i.normalizeText!==false?p(e):String(e);a.textContent=u;a.appendChild(s);document.body.appendChild(a);if(u.length){o.width=a.offsetWidth-this.options.baselineMarkerSize;o.height=a.offsetHeight;o.baseline=s.offsetTop+this.options.baselineMarkerSize}if(o.width>0&&o.height>0)this._cache.put(n,o);a.parentNode.removeChild(a);return o},_baselineMarker:function(){var e=document.createElement("div");e.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;";return e}});function e(e,t,i){return o.current.measure(e,t,i)}o.current=new o,kendo.deepExtend(kendo.util,{LRUCache:i,TextMetrics:o,measureText:e,objectKey:f,hashKey:c,normalizeText:p})})?n.apply(t,i):n)||(e.exports=t)}});