PageSourceSearch

https://www.vectorstock.com/cache/v2/js/banner-cyber-monday.943567d886bccbefaed9.min.js

js vectorstock.com collected 2026-09-27 20:55:14 UTC 26,272 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkVectorStockWebsite=self.webpackChunkVectorStockWebsite||[]).push([[6122],{8134(t,e,i){i.r(e),i.d(e,{default:()=>K});var n=i(15297);function r(t){return r="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},r(t)}function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function s(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}var a=["#4734ac","#7558a1","#a07392","#c18a7a","#df9f55"],h=function(){function t(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvasWidth=e,this.canvasHeight=i,this.startRandom=!!n,this._width=0,this._height=0,this._length=0,this._color="#000000",this._frame=0,this._frames=0,this._targetYPos=0,this._targetXPos=0,this._yMove=0,this._xMove=0,this.x=null,this.y=null,this.opacity=1,this._init()}return e=t,(i=[{key:"_init",value:function(){var e=Math.round(Math.random()*(this.canvasWidth+this.canvasHeight*t.settings.angle));this._length=t.settings.lengthMin+Math.floor(Math.random()*(t.settings.lengthMax-t.settings.lengthMin)),this._frames=t.settings.framesMin+Math.floor(Math.random()*(t.settings.framesMax-t.settings.framesMin)),this._frame=this.startRandom?Math.floor(Math.random()*this._frames):0,this._width=this._length,this._height=this._width/t.settings.angle,this._targetYPos=this.canvasHeight+this._height,this._targetXPos=e-(this.canvasHeight+this._height)*t.settings.angle,this._yMove=this._targetYPos/this._frames,this._xMove=(this._targetXPos-e)/this._frames;var i=Math.floor((e-(this._targetXPos-e)/2)/(this.canvasWidth/a.length));i=Math.min(i,a.length-1),i=Math.max(i,0),this._color=a[i],this.x=e+this._frame*this._xMove,this.y=this._frame*this._yMove,t.instances.push(this)}},{key:"draw",value:function(e){this.x+=this._xMove*t.speed,this.y+=this._yMove*t.speed;var i=this.x+this._width,n=(this.canvasWidth-300)/2,r=n+300,o=this.x+this._width;if(this.x>n&&this.x<r||o>n&&o<r?this.opacity=Math.max(.15,.9*this.opacity):this.opacity<1&&(this.opacity=Math.min(1,1.1*this.opacity)),e.globalAlpha=this.opacity,e.beginPath(),e.moveTo(this.x,this.y),e.lineTo(this.x+this._width,this.y-this._height),e.strokeStyle=this._color,e.lineWidth=1,e.stroke(),e.globalAlpha=1,this._frame+=t.speed,this._frame>=this._frames||i<0){var s=t.instances.indexOf(this);-1!==s&&t.instances.splice(s,1)}}},{key:"updateCanvasWidth",value:function(t){this.canvasWidth=t}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i}();function u(t){return u="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},u(t)}function c(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function l(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=u(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}h.settings={angle:1,density:75,lengthMin:50,lengthMax:300,framesMin:50,framesMax:100},h.speed=1,h.scale=1,h.instances=[],h.max_instances=0,h.updateCanvasWidth=function(t){for(var e=0;e<h.instances.length;e+=1)h.instances[e].updateCanvasWidth(t)},h.updateLimits=function(t){h.max_instances=Math.round(t/h.settings.density*h.scale)},h.populate=function(t,e,i){for(;h.instances.length<h.max_instances;)new h(t,e,i)};var f=[["#2b1eb9","#df8686"],["#643daa","#f09161"],["#bc639c","#f1a343"]],p=function(){function t(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvasWidth=e,this.canvasHeight=i,this.startRandom=!!n,this.xpos=0,this.ypos=0,this.target_xpos=0,this.target_ypos=0,this.xmove=0,this.ymove=0,this.x=0,this.y=0,this.opacity=1,this.frame=0,this.frames=0}return e=t,i=[{key:"updateCanvasWidth",value:function(t){this.canvasWidth=t}},{key:"setSpeedAndPace",value:function(){this.xmove=(this.target_xpos-this.xpos)/this.frames,this.ymove=(this.target_ypos-this.ypos)/this.frames,this.x=this.xpos+this.frame*this.xmove,this.y=this.ypos+this.frame*this.ymove}},{key:"generateXpos",value:function(){return Math.round(Math.random()*this.canvasWidth)}},{key:"generateGradientCoordinates",value:function(t){var e=[[],[]];return Math.random()>.5?(e[0][0]=Math.round(Math.random()*t),e[0][1]=t-e[0][0],e[1][0]=Math.random()>.5?0:t,e[1][1]=Math.abs(e[1][0]-t)):(e[0][0]=Math.random()>.5?0:t,e[0][1]=Math.abs(e[0][0]-t),e[1][0]=Math.round(Math.random()*t),e[1][1]=t-e[1][0]),e}},{key:"generateGradientSwatches",value:function(t){var e=Math.floor(t/(this.canvasWidth/f.length));return e=Math.min(e,f.length-1),e=Math.max(e,0),f[e]}},{key:"avoidCollision",value:function(e){for(var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!1,r=0;r<t.instances.length;r+=1)if(Math.abs(t.instances[r].xpos-this.xpos)<e){this.xpos=this.generateXpos(),n=!0;break}n&&i<5&&this.avoidCollision(e,i+1)}},{key:"draw",value:function(e){if(this.frame+=t.speed,this.frame>=this.frames){var i=t.instances.indexOf(this);-1!==i&&t.instances.splice(i,1)}}}
1],i&&c(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i}();function d(t){return d="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},d(t)}function y(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function m(t){var e=function(t){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=d(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}function b(t,e,i){return e=w(e),function(t,e){if(e&&("object"==d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,v()?Reflect.construct(e,i||[],w(t).constructor):e.apply(t,i))}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(v=function(){return!!t})()}function g(){return g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,i){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=w(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(arguments.length<3?t:i):r.value}},g.apply(null,arguments)}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}p.settings={density:500},p.speed=1,p.scale=1,p.instances=[],p.max_instances=0,p.types=[],p.updateCanvasWidth=function(t){for(var e=0;e<p.instances.length;e+=1)p.instances[e].updateCanvasWidth(t)},p.updateLimits=function(t){p.max_instances=Math.round(t/p.settings.density*p.scale)},p.registerType=function(t){"function"!=typeof t||p.types.includes(t)||p.types.push(t)},p.populate=function(t,e,i){var n=p.types;if(n.length)for(;p.instances.length<p.max_instances;)new(0,n[Math.floor(Math.random()*n.length)])(t,e,i)};var M=function(t){function e(t,i){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=b(this,e,[t,i,r])).radius=0,n.stroke=0,n.gradientSwatches=null,n.gradientCoordinates=null,n._init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(e,t),i=e,n=[{key:"_init",value:function(){var t=Math.random();this.radius=e.settings.radiusMin+Math.round(t*(e.settings.radiusMax-e.settings.radiusMin));var i=2*this.radius;this.stroke=e.settings.lineStrokeMin+Math.round(t*(e.settings.lineStrokeMax-e.settings.lineStrokeMin)),this.xpos=this.generateXpos(),this.ypos=-this.radius,this.frames=e.settings.framesMin+Math.round((1-t)*(e.settings.framesMax-e.settings.framesMin)),this.frame=this.startRandom?Math.round(Math.random()*this.frames):0,this.gradientCoordinates=this.generateGradientCoordinates(i),this.avoidCollision(i);var n=this.xpos-(this.canvasHeight+this.radius)/2;this.gradientSwatches=this.generateGradientSwatches(n),this.target_xpos=this.xpos-(this.canvasHeight+this.radius),this.target_ypos=this.canvasHeight+this.radius,this.setSpeedAndPace(),p.instances.push(this)}},{key:"generateXpos",value:function(){return Math.round(Math.random()*this.canvasWidth)+(this.canvasHeight+this.radius)}},{key:"draw",value:function(t){this.x+=this.xmove*p.speed,this.y+=this.ymove*p.speed;var i=this.x-this.radius,n=this.y-this.radius,r=t.createLinearGradient(i+this.gradientCoordinates[0][0],n+this.gradientCoordinates[1][0],i+this.gradientCoordinates[0][1],n+this.gradientCoordinates[1][1]);r.addColorStop(0,this.gradientSwatches[0]),r.addColorStop(1,this.gradientSwatches[1]);var o,s,a,h=(this.canvasWidth-300)/2,u=h+300,c=this.x+this.radius;i>h&&i<u||c>h&&c<u?this.opacity=Math.max(.25,.9*this.opacity):this.opacity<1&&(this.opacity=Math.min(1,1.1*this.opacity)),t.globalAlpha=this.opacity,t.beginPath(),t.arc(this.x,this.y,this.radius,0,2*Math.PI,!1),t.strokeStyle=r,t.lineWidth=this.stroke,t.stroke(),t.globalAlpha=1,(o=e,s=this,"function"==typeof(a=g(w(1&3?o.prototype:o),"draw",s))?function(t){return a.apply(s,t)}:a)([t])}}],n&&y(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n}(p);function x(t){return x="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},x(t)}function S(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,k(n.key),n)}}function k(t){var e=function(t){if("object"!=x(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=x(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==x(e)?e:e+""}function P(t,e,i){return e=j(e),function(t,e){if(e&&("object"==x(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,i||[],j(t).constructor):e.apply(t,i))}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(O=function(){return!!t})()}function C(){return C="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,
1i){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=j(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(arguments.length<3?t:i):r.value}},C.apply(null,arguments)}function j(t){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},j(t)}function T(t,e){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},T(t,e)}M.settings={radiusMin:25,radiusMax:75,lineStrokeMin:1,lineStrokeMax:3,framesMin:75,framesMax:150},p.registerType(M);var E=function(t){function e(t,i){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=P(this,e,[t,i,r])).size=0,n.stroke=0,n.rotation=0,n.rotationRate=0,n.gradientSwatches=null,n.gradientCoordinates=null,n._init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&T(t,e)}(e,t),i=e,n=[{key:"_init",value:function(){var t=Math.random();this.size=e.settings.sizeMin+Math.round(t*(e.settings.sizeMax-e.settings.sizeMin)),this.stroke=e.settings.lineStrokeMin+Math.round(t*(e.settings.lineStrokeMax-e.settings.lineStrokeMin)),this.rotation=Math.round(360*Math.random()),this.xpos=this.generateXpos(),this.ypos=-1.42*this.size,this.frames=e.settings.framesMin+Math.round((1-t)*(e.settings.framesMax-e.settings.framesMin)),this.frame=this.startRandom?Math.round(Math.random()*this.frames):0;var i=e.settings.rotationRateMin+Math.round(Math.random()*(e.settings.rotationRateMax-e.settings.rotationRateMin));this.rotationRate=i/this.frames,this.gradientCoordinates=this.generateGradientCoordinates(this.size),this.avoidCollision(this.size);var n=this.xpos-this.size/2;this.gradientSwatches=this.generateGradientSwatches(n);var r=this.canvasHeight+(1.42*this.size-this.size);this.target_xpos=this.xpos-r,this.target_ypos=r,this.setSpeedAndPace(),p.instances.push(this)}},{key:"generateXpos",value:function(){return Math.round(Math.random()*this.canvasWidth-this.size/2)}},{key:"draw",value:function(t){this.x+=this.xmove*p.speed,this.y+=this.ymove*p.speed,this.rotation-=this.rotationRate*p.speed;var i=this.x+this.size/2,n=this.y+this.size/2,r=this.x-i,o=this.y-n,s=t.createLinearGradient(r+this.gradientCoordinates[0][0],o+this.gradientCoordinates[1][0],r+this.gradientCoordinates[0][1],o+this.gradientCoordinates[1][1]);s.addColorStop(0,this.gradientSwatches[0]),s.addColorStop(1,this.gradientSwatches[1]);var a,h,u,c=(this.canvasWidth-300)/2,l=c+300;r>c&&r<l||i>c&&i<l?this.opacity=Math.max(.25,.9*this.opacity):this.opacity<1&&(this.opacity=Math.min(1,1.1*this.opacity)),t.globalAlpha=this.opacity,t.strokeStyle=s,t.lineWidth=this.stroke,t.save(),t.translate(i,n),t.rotate(this.rotation*(Math.PI/180)),t.strokeRect(this.x-i,this.y-n,this.size,this.size),t.restore(),t.globalAlpha=1,(a=e,h=this,"function"==typeof(u=C(j(1&3?a.prototype:a),"draw",h))?function(t){return u.apply(h,t)}:u)([t])}}],n&&S(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n}(p);function A(t){return A="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},A(t)}function W(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,R(n.key),n)}}function R(t){var e=function(t){if("object"!=A(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=A(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==A(e)?e:e+""}function z(t,e,i){return e=L(e),H(t,I()?Reflect.construct(e,i||[],L(t).constructor):e.apply(t,i))}function H(t,e){if(e&&("object"==A(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function I(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(I=function(){return!!t})()}
1function L(t){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},L(t)}function B(t,e){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},B(t,e)}E.settings={sizeMin:25,sizeMax:75,lineStrokeMin:1,lineStrokeMax:3,rotationRateMin:15,rotationRateMax:75,framesMin:75,framesMax:150},p.registerType(E);var F=function(t){function e(t){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=z(this,e)).canvas=t,i.canvas?(i.bannerWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,i.bannerHeight=i._getBannerHeight(),i.isPlaying=!0,i.isClosed=!1,i.frameCount=0,i.fps=0,i.context=null,i.fpsTimes=[],i._rafId=null,i._onFrameAnimation=i._onFrameAnimation.bind(i),i._init(),i):H(i)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&B(t,e)}(e,t),i=e,(n=[{key:"_init",value:function(){this._setupCanvas(),this._updateMaxSprites();var t=!0;h.populate(this.bannerWidth,this.bannerHeight,t),p.populate(this.bannerWidth,this.bannerHeight,t),this._animate()}},{key:"_getBannerHeight",value:function(){var t=this.canvas.parentElement;return t&&t.clientHeight||this.canvas.clientHeight||80}},{key:"_setupCanvas",value:function(){this.context||(this.context=this.canvas.getContext("2d",{alpha:!0})),this.bannerWidth=window.innerWidth||document.documentElement.clientWidth||this.canvas.clientWidth||this.bannerWidth,this.bannerHeight=this._getBannerHeight(),this.canvas.width=2*this.bannerWidth,this.canvas.height=2*this.bannerHeight,this.canvas.style.width="".concat(this.bannerWidth,"px"),this.canvas.style.height="".concat(this.bannerHeight,"px"),this.context.setTransform(1,0,0,1,0,0),this.context.scale(2,2)}},{key:"_animate",value:function(){window.requestAnimationFrame?this._rafId=window.requestAnimationFrame(this._onFrameAnimation):this._rafId=window.setTimeout(this._onFrameAnimation,1e3/60)}},{key:"_updateMaxSprites",value:function(){h.updateLimits(this.bannerWidth),p.updateLimits(this.bannerWidth)}},{key:"_onFrameAnimation",value:function(){if(this.context&&this.canvas){if(!this.isClosed&&this.isPlaying){this.context.clearRect(0,0,this.canvas.width,this.canvas.height),h.populate(this.bannerWidth,this.bannerHeight),p.populate(this.bannerWidth,this.bannerHeight);for(var t=window.performance&&performance.now?performance.now():Date.now();this.fpsTimes.length>0&&this.fpsTimes[0]<=t-1e3;)this.fpsTimes.shift();this.fpsTimes.push(t),this.fps=this.fpsTimes.length;for(var e=h.instances.length-1;e>=0;e-=1)h.instances[e].draw(this.context);for(var i=p.instances.length-1;i>=0;i-=1)p.instances[i].draw(this.context)}this.frameCount+=1,this.frameCount%600==0&&this.fps&&this.fps<50&&(h.scale*=.9,p.scale*=.9,this._updateMaxSprites()),this.isClosed?(this.triggerEvent("closed"),this._rafId=null):this._animate()}}},{key:"mouseover",value:function(){h.speed=.15,p.speed=.15}},{key:"mouseout",value:function(){h.speed=1,p.speed=1}},{key:"resize",value:function(){this._setupCanvas(),this._updateMaxSprites(),h.updateCanvasWidth(this.bannerWidth),p.updateCanvasWidth(this.bannerWidth)}},{key:"pause",value:function(){this.isPlaying=!1}},{key:"play",value:function(){this.isPlaying=!0}},{key:"close",value:function(){this.isClosed=!0}},{key:"destroy",value:function(){this.isClosed=!0,this._rafId&&(window.cancelAnimationFrame?cancelAnimationFrame(this._rafId):clearTimeout(this._rafId),this._rafId=null),this.context=null,this.canvas=null}}])&&W(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n}(n.b),X=i(7546);function q(t){return q="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},q(t)}function D(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,G(n.key),n)}}function G(t){var e=function(t){if("object"!=q(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=q(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==q(e)?e:e+""}var N=function(){return t=function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.container=e;var n=Number(i)||0;this.tsExpiry=Date.now()+Math.max(0,n),this.container&&Number.isFinite(this.tsExpiry)&&(this.labelA=null,this.labelB=null,this.labelExpiry=null,this._switchTimeoutId=null,this._expiryTimeoutId=null,this._init())},(e=[{key:"_init",value:function(){var t=this,e=this.container.querySelectorAll(".button .label");this.labelA=e[0]||null,this.labelB=e[1]||null,this.labelExpiry=this.labelA?this.labelA.querySelector("var"):null,this.labelA&&this.labelB&&this.labelExpiry&&(this._updateExpiry(),this._switchTimeoutId=window.setTimeout(function(){t._switchLabels(t.labelB,t.labelA)},3e3))}},{key:"_switchLabels",value:function(t,e){var i=this,n=Date.now(),r=this.tsExpiry-n;Math.ceil(r/36e5)>=100||(window.setTimeout(function(){e.classList.remove("reveal","conceal")},600),t.classList.add("reveal"),e.classList.add("conceal"),this._switchTimeoutId=window.setTimeout(function(){i._switchLabels(e,t)},3e3))}},{key:"_updateExpiry",value:function(){var t,e,i,n=this,r=Date.now(),o=this.tsExpiry-r;o<=0?(t=0,e=0,i=0):o<36e7?(t=Math.floor(o/36e5),e=Math.floor(o%36e5/6e4),i=Math.floor(o%6e4/1e3)):(t=99,e=99,i=99);var s=X.H.zeroPad(t,2),a=X.H.zeroPad(e,2),h=X.H.zeroPad(i,2);this.labelExpiry&&(this.labelExpiry.textContent="".concat(s,":").concat(a,":").concat(h)),this._expiryTimeoutId=window.setTimeout(function(){n._updateExpiry()},1e3)}},{key:"destroy",value:function(){this._switchTimeoutId&&(clearTimeout(this._switchTimeoutId),this._switchTimeoutId=null),this._expiryTimeoutId&&(clearTimeout(this._expiryTimeoutId),this._expiryTimeoutId=null),this.container=null,this.labelA=null,this.labelB=null,this.labelExpiry=null}}])&&D(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Y(t){return Y="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},Y(t)}function V(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,J(n.key),n)}}function J(t){var e=function(t){if("object"!=Y(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Y(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Y(e)?e:e+""}var K=function(){return t=function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.banner=e,this.banner){this._onResize=this._onResize.bind(this);var i=this.banner.getAttribute("data-expires"),n=i?parseInt(i,10):null;this.expiryMsRemaining=Number.isFinite(n)&&n>0?n:null,this.cookieShow=this.banner.getAttribute("data-cookie"),this.expiryMsRemaining&&(this.bannerLink=this.banner.querySelector("a"),this.canvas=this.banner.querySelector("#banner-bg-animation"),this.messageContainer=this.banner.querySelector("#banner-message"),this.buttonClose=this.banner.querySelector('button[name="but-close"]'),this.bannerAnimation=null,this.bannerMessage=null,this._intersectionObserver=null,this._init())}},(e=[{key:"_init",value:function(){var t=this;this.canvas&&(this.bannerAnimation=new F(this.canvas)),this.messageContainer&&(this.bannerMessage=new N(this.messageContainer,this.expiryMsRemaining)),this.bannerLink&&this.bannerAnimation&&(this.bannerLink.addEventListener("mouseover",function(){t.bannerAnimation.mouseover()}),this.bannerLink.addEventListener("mouseout",function(){t.bannerAnimation.mouseout()})),this.buttonClose&&this.bannerAnimation&&this.buttonClose.addEventListener("click",function(){var e=document.querySelector("#vs-page #header-permanent");e&&e.removeAttribute("data-banner"),t.bannerAnimation.addEventListener("closed",function(){t._removeBanner()}),t.bannerAnimation.close(),window.dispatchEvent(new CustomEvent("banner-removed")),t.cookieShow&&(document.cookie="".concat(t.cookieShow,"=1; path=/"))}),this.bannerAnimation&&window.addEventListener("resize",this._onResize),window.IntersectionObserver&&this.bannerAnimation&&(this._intersectionObserver=new IntersectionObserver(function(e){e.forEach(function(e){e.isIntersecting?t.bannerAnimation.play():t.bannerAnimation.pause()})},{root:null,rootMargin:"100px",threshold:0}),this._intersectionObserver.observe(this.banner))}},{key:"_onResize",value:function(){this.bannerAnimation&&this.bannerAnimation.resize()}},{key:"_removeBanner",value:function(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=null),window.removeEventListener("resize",this._onResize),this.bannerMessage&&(this.bannerMessage.destroy(),this.bannerMessage=null),this.bannerAnimation&&(this.bannerAnimation.destroy(),this.bannerAnimation=null),this.banner&&this.banner.parentNode&&this.banner.parentNode.removeChild(this.banner),this.banner=null}},{key:"destroy",value:function(){this._removeBanner()}}])&&V(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()}}]);

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.