/*! * chartjs-plugin-deferred v2.0.0 * https://chartjs-plugin-deferred.netlify.app * (c) 2016-2022 chartjs-plugin-deferred contributors * Released under the MIT license */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("chart.js/helpers")):"function"==typeof define&&define.amd?define(["chart.js/helpers"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).ChartDeferred=t(e.Chart.helpers)}(this,(function(e){"use strict";var t="$chartjs_deferred";function r(t,r){r?window.setTimeout(t,r):e.requestAnimFrame.call(window,t)}function n(e,t){var r=parseInt(e,10);return isNaN(r)?0:"string"==typeof e&&-1!==e.indexOf("%")?r/100*t:r}function d(e){var t=e.$deferred.options,r=e.canvas;if(!r||null===r.offsetParent)return!1;var d=r.getBoundingClientRect(),o=n(t.yOffset||0,d.height),i=n(t.xOffset||0,d.width);return d.right-i>=0&&d.bottom-o>=0&&d.left+i<=window.innerWidth&&d.top+o<=window.innerHeight}function o(e){var n=e.target[t];n.ticking||(n.ticking=!0,r((function(){var e,t,r=n.charts.slice(),o=r.length;for(t=0;t0)return o.delayed=!0,r((function(){e.ctx&&(o.delayed=!1,e.update())}),n.delay),!1}if(o.delayed)return!1},destroy:function(e){f(e)}}}));