PageSourceSearch

https://www.grepixit.com/assets/js/halkaBox.min.js

js grepixit.com collected 2026-09-24 10:27:26 UTC 13,578 bytes, 7 lines download raw bytes

1/*  
2    halkaBox.js , url: https://github.com/ahmednooor/halkaBox.js
3    Version: 1.4.1
4    Auther: Ahmed Noor , url: https://github.com/ahmednooor
5    License: MIT , url: https://opensource.org/licenses/MIT
6*/
7var halkaBox=function(){"use strict";function b(b){var c;for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function c(b,c){function U(a){var b=document.createElement("div");b.classList.add("hb-loader"),"dark"===N.theme&&(b.style.borderTop="5px solid #999");var c=document.createElement("img");if(g[a]=document.createElement("div"),g[a].classList.add("hb-image-div"),g[a].style.opacity=0,g[a].style.display="none",k.appendChild(g[a]),g[a].appendChild(b),g[a].appendChild(c),e[a].getAttribute("title")){var d=document.createElement("p");d.classList.add("hb-caption"),d.innerHTML='<span class="hb-caption-text">'+e[a].getAttribute("title")+"</span>",g[a].appendChild(d),"light"===N.theme?d.classList.add("hb-caption-white"):"dark"===N.theme&&d.classList.add("hb-caption-black")}c.onload=function(){b.style.display="none"},c.onerror=function(){var c=document.createElement("p");c.innerHTML="Image not found.","light"===N.theme?c.classList.add("hb-err-text-black"):"dark"===N.theme&&c.classList.add("hb-err-text-white"),b.style.display="none",g[a].appendChild(c)},c.src=e[a].href}function V(a,b){a+b>=f&&(b=f-a-1);for(var c=a;c<=a+b;)g[c]||U(c),c+=1}function W(a,b){a-b<0&&(b=a);for(var c=a;c>=a-b;)g[c]||U(c),c-=1}function X(a){z.innerHTML=a+1+" "}function Y(){f>1&&"hb-single"!==b&&!Q&&(Q=!0,"slide"===N.animation?(g[h].style.animation="slideNextOut 0.3s ease-out forwards",window.setTimeout(function(){g[h].style.opacity=0,g[h].style.display="none",cb(g[h].getElementsByTagName("img")[0]),h>f-2&&(h=-1),h+=1,X(h),V(h,N.preload),g[h].style.display="block",g[h].style.animation="slideNextIn 0.3s ease-out forwards",Q=!1},300)):"fade"===N.animation&&(g[h].style.opacity=0,window.setTimeout(function(){g[h].style.display="none",cb(g[h].getElementsByTagName("img")[0]),h>f-2&&(h=-1),h+=1,X(h),V(h,N.preload),g[h].style.display="block",window.setTimeout(function(){g[h].style.opacity=1},50),Q=!1},300)))}function Z(){f>1&&"hb-single"!==b&&!Q&&(Q=!0,"slide"===N.animation?(g[h].style.animation="slidePreviousOut 0.3s ease-out forwards",window.setTimeout(function(){g[h].style.opacity=0,g[h].style.display="none",cb(g[h].getElementsByTagName("img")[0]),0===h&&(h=f),h-=1,X(h),W(h,N.preload),g[h].style.display="block",g[h].style.animation="slidePreviousIn 0.3s ease-out forwards",Q=!1},300)):"fade"===N.animation&&(g[h].style.opacity=0,window.setTimeout(function(){g[h].style.display="none",cb(g[h].getElementsByTagName("img")[0]),0===h&&(h=f),h-=1,X(h),W(h,N.preload),g[h].style.display="block",window.setTimeout(function(){g[h].style.opacity=1},50),Q=!1},300)))}function $(){g[h].style.opacity=0,i.style.opacity=0,window.setTimeout(function(){g[h].style.display="none",i.style.display="none",cb(g[h].getElementsByTagName("img")[0])},300),e[h].focus(),e[h].blur(),tb(),O=!0,P=!0}function _(a){a.preventDefault(),$()}function ab(a){a.stopPropagation(),a.preventDefault(),a.target===k||a.target===j||a.target===g[h]?_(a):rb()}function bb(a){a.stopPropagation(),a.preventDefault(),27===a.which?_(a):37===a.which&&"hb-single"!==b?Z():39===a.which&&"hb-single"!==b&&Y()}function cb(a){a.removeAttribute("style"),a.style.transition="all 150ms ease-out",L=100,K=!1,window.setTimeout(function(){a.removeAttribute("style")},160)}function db(a){var b=parseInt(window.getComputedStyle(a,null).getPropertyValue("width")),c=parseInt(window.getComputedStyle(a,null).getPropertyValue("height")),d=parseInt(window.getComputedStyle(a,null).getPropertyValue("left")),e=parseInt(window.getComputedStyle(a,null).getPropertyValue("top"));a.style.transition="all 150ms ease-out",b>=window.innerWidth?d>b/2?(a.style.left=b/2+"px",a.style.right="auto"):d<-1*(b-window.innerWidth-b/2)&&(a.style.left=-1*(b-window.innerWidth-b/2)+"px",a.style.right="auto"):b<window.innerWidth&&(d<b/2?(a.style.left=b/2+"px",a.style.right="auto"):d>window.innerWidth-b+b/2&&(a.style.left=window.innerWidth-b+b/2+"px",a.style.right="auto")),c>=window.innerHeight?e>c/2?(a.style.top=c/2+"px",a.style.bottom="auto"):e<-1*(c-window.innerHeight-c/2)&&(a.style.top=-1*(c-window.innerHeight-c/2)+"px",a.style.bottom="auto"):c<window.innerHeight&&(e<c/2?(a.style.top=c/2+"px",a.style.bottom="auto"):e>window.innerHeight-c+c/2&&(a.style.top=window.innerHeight-c+c/2+"px",a.style.bottom="auto")),b<=window.innerWidth&&c<=window.innerHeight&&cb(a),window.setTimeout(function(){a.style.transition=""},160)}function eb(a,b,c){var d=window.getComputedStyle(c,null).getPropertyValue("left"),e=window.getComputedStyle(c,null).getPropertyValue("top");c.style.position="absolute",c.style.top=parseInt(e)+b+"px",c.style.left=parseInt(d)+a+"px",c.style.right="auto",c.style.bottom="auto"}function fb(a){if(N.isZoomable){var b=parseInt(window.getComputedStyle(a,null).getPropertyValue("width")),c=parseInt(window.getComputedStyle(a,null).getPropertyValue("height"));L>
7=50&&L<=400&&b<a.naturalWidth&&c<a.naturalHeight?(a.style.position="absolute",a.style.maxWidth=parseInt(L)+"%",a.style.maxHeight=parseInt(L)+"%",K=!0):L>=50&&L<=400&&L<=parseInt(a.style.maxWidth)?(a.style.position="absolute",a.style.maxWidth=parseInt(L)+"%",a.style.maxHeight=parseInt(L)+"%",K=!0):b>=a.naturalWidth||c>=a.naturalHeight?L=parseInt(a.style.maxWidth):L>=400?L=400:K=!1}}function gb(a){a.preventDefault(),G=a.clientX,I=a.clientY,g[h].addEventListener("mousemove",hb,!1)}function hb(a){a.preventDefault();var b=a.clientX-G,c=a.clientY-I;G=a.clientX,I=a.clientY,eb(b,c,g[h].getElementsByTagName("img")[0])}function ib(a){a.preventDefault(),g[h].removeEventListener("mousemove",hb),db(g[h].getElementsByTagName("img")[0])}function jb(a){if(a.preventDefault(),a.ctrlKey){if(!N.isZoomable)return;a.deltaY<0?L+=20:K&&L>100&&(L-=20),L>100?(g[h].addEventListener("mousedown",gb,!1),g[h].addEventListener("mouseup",ib,!1),g[h].style.cursor="move",pb(),nb(),tb(),i.addEventListener("wheel",jb,!1)):(g[h].removeEventListener("mousedown",gb),g[h].removeEventListener("mouseup",ib),g[h].style.cursor="",qb(),ob(),sb()),fb(g[h].getElementsByTagName("img")[0]),db(g[h].getElementsByTagName("img")[0])}else L<=100&&!S&&(S=!0,window.setTimeout(function(){S=!1},600),a.deltaY<0?Z():a.deltaY>0&&Y())}function kb(a){return window.innerWidth<window.innerHeight!==F&&(F=F===!0?!1:!0,E=window.innerWidth),G=a.touches[0].clientX,I=a.touches[0].clientY,a.touches.length>1?(H=a.touches[1].clientX,void(J=a.touches[1].clientY)):!1}function lb(a){a.preventDefault();var b=a.touches[0]||a.changedTouches[0],c=a.touches.length;if(D===!1&&K===!1&&window.innerWidth===E&&2!==c)return void(b.clientX-G>50&&b.clientY-I<25&&b.clientY-I>-25?(D=!0,Z()):b.clientX-G<-50&&b.clientY-I<25&&b.clientY-I>-25?(D=!0,Y()):b.clientY-I>80&&N.swipeDownToClose&&_(a));if(2===c){D=!0;var d=Math.sqrt(Math.pow(H-G,2)+Math.pow(J-I,2)),e=Math.sqrt(Math.pow(a.touches[1].clientX-a.touches[0].clientX,2)+Math.pow(a.touches[1].clientY-a.touches[0].clientY,2));G=a.touches[0].clientX,I=a.touches[0].clientY,H=a.touches[1].clientX,J=a.touches[1].clientY,d<e?L+=e-d:L-=d-e,fb(g[h].getElementsByTagName("img")[0])}else{if(K!==!0)return!1;D=!0;var f=a.touches[0].clientX-G,i=a.touches[0].clientY-I;G=a.touches[0].clientX,I=a.touches[0].clientY,eb(f,i,g[h].getElementsByTagName("img")[0])}}function mb(){D=!1,db(g[h].getElementsByTagName("img")[0])}function nb(){p.style.opacity=0,n.style.opacity=0,l.style.opacity=0,r.style.opacity=0,O=!0}function ob(){p.style.opacity="",n.style.opacity="",l.style.opacity="",r.style.opacity="",O=!1}function pb(){var a=k.getElementsByClassName("hb-caption"),b=0;for(b=0;b<a.length;b+=1)a[b].style.display="none";P=!0}function qb(){var a=k.getElementsByClassName("hb-caption"),b=0;for(b=0;b<a.length;b+=1)a[b].style.display="";P=!1}function rb(){P?qb():pb(),O&&!P?ob():!O&&P&&nb()}function sb(){"hb-single"!==b&&(w.addEventListener("click",Y,!1),v.addEventListener("click",Z,!1)),i.addEventListener("touchstart",kb,!1),i.addEventListener("touchmove",lb,!1),i.addEventListener("touchend",mb,!1),N.nextPrevOnWheel&&i.addEventListener("wheel",jb,!1),u.addEventListener("click",_,!1),k.addEventListener("click",ab,!1),window.addEventListener("mouseout",nb,!1),window.addEventListener("mouseover",ob,!1),window.addEventListener("keyup",bb,!1)}function tb(){"hb-single"!==b&&(w.removeEventListener("click",Y,!1),v.removeEventListener("click",Z,!1)),i.removeEventListener("touchstart",kb,!1),i.removeEventListener("touchmove",lb,!1),i.removeEventListener("touchend",mb,!1),N.nextPrevOnWheel&&i.removeEventListener("wheel",jb,!1),u.removeEventListener("click",_,!1),k.removeEventListener("click",ab,!1),window.removeEventListener("mouseout",nb,!1),window.removeEventListener("mouseover",ob,!1),window.removeEventListener("keyup",bb,!1)}function ub(a){h=a,e[h].blur(),X(h),i.style.display="block",window.setTimeout(function(){i.style.opacity=1},10),V(h,N.preload),W(h,N.preload),g[h].style.animation="none",g[h].style.display="block",g[h].style.opacity=1,cb(g[h].getElementsByTagName("img")[0]),rb(),sb()}function vb(a,b){b.preventDefault(),ub(a)}function xb(){if(!T){for(var a=0;a<f;a+=1)e[a].removeEventListener("click",R[a],!1);document.getElementById("hb-wrapper"+b)&&(tb(),i.parentNode.removeChild(i)),T=!0}}var h,u,v,w,x,y,z,G,H,I,J,M,d=document.getElementsByTagName("body")[0],e=document.getElementsByClassName(b),f=e.length,g=[],i=document.createElement("div"),j=document.createElement("div"),k=document.createElement("div"),l=document.createElement("div"),m=document.createElement("button"),n=document.createElement("div"),o=document.createElement("button"),p=document.createElement("div"),q=document.createElement("button"),r=document.createElement("p"),s=document.createElement("span"),t=document.createElement("span"),A='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 580 580" style="" xml:space="preserve"><path d="M332.1,290l235-235c11.7-11.7,11.7-30.7,0-42.4c-11.7-11.7-30.7-11.7-42.4,0L290,247.2L55.3,12.5c-11.7-11.7-30.7-11.7-42.4,0C1.2,24.3,1.2,43.2,12.9,55l235,235l-235,235c-11.7,11.7-11.7,30.7,0,42.4c5.9,5.9,13.5,8.8,21.2,8.8s15.4-2.9,21.2-8.8L290,332.8l234.7,234.7c5.9,5.9,13.5,8.8,21.2,8.8s15.4-2.9,21.2-8.8c11.7-11.7,11.7-30.7,0-42.4L332.1,290z"/></svg>',B='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 580 580" style="" xml:space="preserve"><path d="M576,289.5c0-16.6-13.4-30-30-30H106.4L311,55c11.7-11.7,11.7-30.7,0-42.4c-11.7-11.7-30.7-11.7-42.4,0L12.8,268.3C7,274.1,3.9,281.8,4,289.7c0,0.1,0,0.2,0,0.3c0,0.1,0,0.2,0,0.3c-0.1,7.9,3,15.7,8.8,21.4l255.8,255.8c5.9,5.9,13.5,8.8,21.2,8.8s15.4-2.9,21.2-8.8c11.7-11.7,11.7-30.7,0-42.4L106.4,320.5H546c16.6,0,30-13.4,30-30c0-0.2,0-0.3,0-0.5	C576,289.8,576,289.7,576,289.5z"/></svg>',C='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 580 580" style="" xml:space="preserve"><path d="M576,290c0-0.1,0-0.2,0-0.3c0.1-7.9-3-15.7-8.8-21.4L311.5,12.5c-11.7-11.7-30.7-11.7-42.4,0s-11.7,30.7,0,42.4l204.5,204.5 H34c-16.6,0-30,13.4-30,30c0,0.2,0,0.3,0,0.5c0,0.2,0,0.3,0,0.5c0,16.6,13.4,30,30,30h439.6L269,525c-11.7,11.7-11.7,30.7,0,42.4 
7c5.9,5.9,13.5,8.8,21.2,8.8s15.4-2.9,21.2-8.8l255.7-255.8c5.8-5.8,8.8-13.6,8.8-21.4C576,290.2,576,290.1,576,290z"/></svg>',D=!1,E=window.innerWidth,F=window.innerWidth<window.innerHeight?!0:!1,K=!1,L=100,N={},O=!0,P=!0,Q=!1,R=[],S=!1,T=!1;for(M in a)a.hasOwnProperty(M)&&(N[M]=a[M]);for(M in c)c.hasOwnProperty(M)&&(N[M]=c[M]);i.setAttribute("class","hb-wrapper"),i.setAttribute("id","hb-wrapper"+b),j.setAttribute("class","hb-main-container"),k.setAttribute("class","hb-image-container"),l.setAttribute("class","hb-close-icon-container"),m.setAttribute("id","hb-close-"+b),m.setAttribute("class","hb-close"),n.setAttribute("class","hb-left-icon-container"),o.setAttribute("id","hb-left-"+b),o.setAttribute("class","hb-left"),p.setAttribute("class","hb-right-icon-container"),q.setAttribute("id","hb-right-"+b),q.setAttribute("class","hb-right"),r.setAttribute("id","hb-counter-"+b),r.setAttribute("class","hb-counter"),s.setAttribute("id","hb-counter-total"+b),s.setAttribute("class","hb-counter-total"),t.setAttribute("id","hb-counter-current"+b),t.setAttribute("class","hb-counter-current"),r.appendChild(t),r.appendChild(s),s.innerHTML="/ "+f,p.appendChild(q),q.innerHTML=C,n.appendChild(o),o.innerHTML=B,l.appendChild(m),m.innerHTML=A,j.appendChild(k),j.appendChild(l),j.appendChild(n),j.appendChild(p),j.appendChild(r),i.appendChild(j),("ontouchstart"in window&&N.hideButtons===!0||"hb-single"===b||1===f)&&(p.style.display="none",n.style.display="none"),("hb-single"===b||1===f)&&(r.style.display="none"),"dark"===N.theme&&i.classList.add("hb-dark-theme"),i.style.display="none",d.appendChild(i),u=document.getElementById("hb-close-"+b),v=document.getElementById("hb-left-"+b),w=document.getElementById("hb-right-"+b),x=document.getElementById("hb-counter-"+b),y=document.getElementById("hb-counter-total"+b),z=document.getElementById("hb-counter-current"+b);for(var wb=0;wb<f;wb+=1)R.push(vb.bind(this,wb)),e[wb].addEventListener("click",R[wb],!1);return{open:ub,close:$,next:Y,previous:Z,destroy:xb}}var a={hideButtons:!0,animation:"slide",theme:"light",preload:2,swipeDownToClose:!1,nextPrevOnWheel:!0,isZoomable:!0};return"undefined"===typeof module||"undefined"===typeof module.exports?{run:c,options:b}:void(module.exports={run:c,options:b})}();

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.