1
Fork 0
mirror of https://github.com/thegeneralist01/books synced 2026-01-09 23:00:25 +01:00
books/getting-tall/bamboo-method/Scribd_files/9.772e45042b410ec999f6.js
TheGeneralist c80c5cfd18
add books
2024-12-14 21:21:54 +01:00

2 lines
No EOL
2.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{350:function(e,t,n){window.$clamp=function(e,t){function n(e,t){return u.getComputedStyle||(u.getComputedStyle=function(e,t){return this.el=e,this.getPropertyValue=function(t){var n=/(\-([a-z]){1})/g;return"float"==t&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,(function(e,t,n){return n.toUpperCase()}))),e.currentStyle&&e.currentStyle[t]?e.currentStyle[t]:null},this}),u.getComputedStyle(e,null).getPropertyValue(t)}function i(t){t=t||e.clientHeight;var n=a(e);return Math.max(Math.floor(t/n),0)}function a(e){var t=n(e,"line-height");return"normal"==t&&(t=1.2*parseInt(n(e,"font-size"))),parseInt(t)}function l(t){return t.lastChild.children&&0<t.lastChild.children.length?l(Array.prototype.slice.call(t.children).pop()):t.lastChild&&t.lastChild.nodeValue&&""!=t.lastChild.nodeValue&&t.lastChild.nodeValue!=c.truncationChar?t.lastChild:(t.lastChild.parentNode.removeChild(t.lastChild),l(e))}function r(e,t){e.nodeValue=t+c.truncationChar}t=t||{};var o,u=window,c={clamp:t.clamp||2,useNativeClamp:void 0===t.useNativeClamp||t.useNativeClamp,splitOnChars:t.splitOnChars||[".","-","","—"," "],animate:t.animate||!1,truncationChar:t.truncationChar||"…",truncationHTML:t.truncationHTML},p=e.style,s=e.innerHTML,h=void 0!==e.style.webkitLineClamp,d=c.clamp,C=d.indexOf&&(-1<d.indexOf("px")||-1<d.indexOf("em"));c.truncationHTML&&((o=document.createElement("span")).innerHTML=c.truncationHTML);var m,f,g,v,w=c.splitOnChars.slice(0),y=w[0];return"auto"==d?d=i():C&&(d=i(parseInt(d))),h&&c.useNativeClamp?(p.overflow="hidden",p.textOverflow="ellipsis",p.webkitBoxOrient="vertical",p.display="-webkit-box",p.webkitLineClamp=d,C&&(p.height=c.clamp+"px")):(v=d,(p=a(e)*v)<=e.clientHeight&&(g=function t(n,i){if(i){var a=n.nodeValue.replace(c.truncationChar,"");if(m||(y=0<w.length?w.shift():"",m=a.split(y)),1<m.length?(f=m.pop(),r(n,m.join(y))):m=null,o&&(n.nodeValue=n.nodeValue.replace(c.truncationChar,""),e.innerHTML=n.nodeValue+" "+o.innerHTML+c.truncationChar),m){if(e.clientHeight<=i){if(!(0<=w.length&&""!=y))return e.innerHTML;r(n,m.join(y)+y+f),m=null}}else""==y&&(r(n,""),n=l(e),w=c.splitOnChars.slice(0),y=w[0],f=m=null);if(!c.animate)return t(n,i);setTimeout((function(){t(n,i)}),!0===c.animate?10:c.animate)}}(l(e),p))),{original:s,clamped:g}}}}]);
//# sourceMappingURL=https://www.scribd.com/webpack/monolith/9.772e45042b410ec999f6.js.map