PageSourceSearch

https://splittestmonkey.com/wp-content/plugins/thrive-visual-edito…/number-counter.min.js?v=3.4&ver=3.4

js splittestmonkey.com collected 2026-10-10 00:43:07 UTC 7,002 bytes, 5 lines download raw bytes

1/*! Thrive Architect - 2021-11-04
2* http://www.thrivethemes.com/
3* Copyright (c) 2021 Thrive Themes */
4
5"use strict";function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(u){var h,d,i,m,p,o={".js":[],".json":[],".css":[],".html":[]},l="function"==typeof require?require:null;return m=function(t){var e=new Error("Could not find module '"+t+"'");return e.code="MODULE_NOT_FOUND",e},p=function(t,e,n){var r,i;if("function"==typeof t[e+n])return e+n;for(r=0;i=o[n][r];++r)if("function"==typeof t[e+i])return e+i;return null},h=function(t,e,n,r,i,o){var a,s,u,l,c,f;for("."!==(a=(n=n.split("/")).pop())&&".."!==a||(n.push(a),a="");null!=(s=n.shift());)if(s&&"."!==s&&(".."===s?(t=e.pop(),o=o.slice(0,o.lastIndexOf("/"))):(e.push(t),t=t[s],o+="/"+s),!t))throw m(r);if(a&&"function"!=typeof t[a]&&((f=(f=(f=(f=p(t,a,".js"))||p(t,a,".json"))||p(t,a,".css"))||p(t,a,".html"))?a=f:2!==i&&"object"===_typeof(t[a])&&(e.push(t),t=t[a],o+="/"+a,a="")),!a)return 1!==i&&t[":mainpath:"]?h(t,e,t[":mainpath:"],r,1,o):h(t,e,"index",r,2,o);if(!(c=t[a]))throw m(r);return c.hasOwnProperty("module")?c.module.exports:(u={},c.module=l={exports:u,id:o+"/"+a},c.call(u,u,l,d(t,e,o)),l.exports)},i=function(t,e,n,r){var i,o=n,a=n.charAt(0),s=0;if("/"===a){if(o=o.slice(1),!(t=u["/"])){if(l)return l(n);throw m(n)}r="/",e=[]}else if("."!==a){if(i=o.split("/",1)[0],!(t=u[i])){if(l)return l(n);throw m(n)}r=i,e=[],(o=o.slice(i.length+1))||(s=(o=t[":mainpath:"])?1:(o="index",2))}return h(t,e,o,n,s,r)},(d=function(e,n,r){return function(t){return i(e,[].concat(n),t,r)}})(u,[],"")}({workspace:{editor:{js:{frontend:{modules:{models:{
5"number-counter.js":function(t,e,n){var r=function(){function r(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window;_classCallCheck(this,r),this.$element=t,this.$number=this.$element.find(".tve-number"),this.window=e}return _createClass(r,[{key:"init",value:function(){this.currentValue=Number(this.getData("from")),this.started=!1,this.finished=!1,this.type=this.getData("anim");var t=this.getData("speed")+7;return this.loops=Math.ceil(t/100),this.increment=(this.getData("to")-this.getData("from"))/this.loops,this}},{key:"getData",value:function(t){var e=0<arguments.length&&void 0!==t?t:"",n=this.$element.attr("data-".concat(e));return void 0===n&&(n=r.defaultOptions[e]),n}},{key:"start",value:function(){"function"==typeof this["".concat(this.type,"Animation")]&&(this.started=!0,this["".concat(this.type,"Animation")]())}},{key:"tickerAnimation",value:function(){this.loopCount=0,this.interval&&clearInterval(this.interval),this.interval=setInterval(this.updateValue.bind(this),this.getData("refresh-interval"))}},{key:"slideAnimation",value:function(){var a=this;this.recalculateDigitWidth();var s=this.getData("formatted-from"),t=this.getData("final-number"),e=_slicedToArray(this.compareNumberRange(s,t),2);s=e[0],t=e[1],this.$number.empty(),t.split("").forEach(function(t,e){var n=a.window.ThriveGlobal.$j('<div class="tcb-digit">'.concat(t,"</div>")).appendTo(a.$number);if([",","."," ","-"].includes(t))n.addClass("tcb-character-digit");else{n.empty(),t=parseInt(t);var r=a.getSize(),i=a.window.Scroller.getNewInstance({width:r,amount:r||25,direction:a.window.Scroller.DIRECTION.DOWN,interval:a.getData("speed"),separatorType:a.window.Scroller.SEPARATOR.THOUSAND});i.appendTo(n[0]);var o=s[e];[",","."," ","-"].includes(o)||i.scrollFromTo(o,t)}})}},{key:"recalculateDigitWidth",value:function(){var t=this.$number.clone();t.addClass("tve-number-counter-temporary-clone").insertAfter(this.$number);var e=t.text("1").width();"italic"===t.css("font-style")&&(e+=e/10),this.window.TCB_Front.inlineCssVariable(this.$element,"--tve-number-counter-digit-width","".concat(e,"px")),t.remove()}},{key:"compareNumberRange",value:function(t,e){var n=e.length-t.length;return 0<n?t="0".repeat(Math.abs(n))+t:n<0&&(e="0".repeat(Math.abs(n))+e),[t,e]}},{key:"getDividerSize",value:function(){var t=this.getSize();return t<=50?10:t/5}},{key:"getSize",value:function(){return parseFloat(this.$element.css("font-size"))}},{key:"updateValue",value:function(){this.currentValue+=this.increment,this.loopCount++,this.render(),this.loopCount>=this.loops&&(clearInterval(this.interval),this.onFinish())}},{key:"onFinish",value:function(){this.finished=!0;var t=this.getData("final-number");this.$element.find(".tve-number").html(t)}},{key:"render",value:function(t){void 0===t&&(t=this.currentValue);var e=t.toFixed(this.getData("decimals"));e=e.replace(/\B(?=(?:\d{3})+(?!\d))/g,this.getData("thousand-divider"));var n=".(?=".concat(new Array(parseInt(this.getData("decimals"))).fill(".").join(""),"$)");0!==parseInt(this.getData("decimals"))&&(e=e.replace(new RegExp(n),this.getData("decimal-character"))),this.$number.html(e)}}]),r}();_defineProperty(r,"defaultOptions",{from:100,to:15e3,speed:2500,"refresh-interval":10,"decimal-character":".","thousand-divider":",",decimals:0}),e.exports=r}},
5"number-counter.js":function(t,e,n){void 0===TCB_Front.js_modules["number-counter"]&&TCB_Front.setModuleLoadedStatus("number-counter",!1),function(r,e){if(!TCB_Front.isModuleLoaded("number-counter")){var i=n("./models/number-counter"),o=[];r(window).on("tcb_after_dom_ready",function(){r(".tve-number-counter .tve-number-wrapper").each(function(t,e){var n=new i(r(e));n.$number.html(n.getData("final-number")),n.init().render(),o.push(n)}),e.$window.trigger("scroll")}),e.add_scroll_callback(function(){o.forEach(function(t){!t.started&&e.isInViewport(t.$element)&&t.start()})},e),window.TCB_Front.NumberCounter=i,e.setModuleLoadedStatus("number-counter",!0)}}(ThriveGlobal.$j,TCB_Front)}
5}}}}}})("workspace/editor/js/frontend/modules/number-counter");

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.