const pagelimit=52,maxlength={title:70,description:200};let widthbox,imageposition,ctrlDown,commentscontainer,snapshotScriptsBefore,pg=2,loadcontent=!0,loadcomment=!1;const actionfingerprint={};let time_progress;function snapshotScripts(){let e=[];return document.querySelectorAll("script[src]").forEach((function(t){e.push(t.src)})),e}function subscriptionCheck(e){if(!get_cookie("id"))return;sendpost("/api/subscription.php","getall=true",(t=>{0!=t&&1==t.includes(String(e))&&document.querySelectorAll(".headerUser__subscriptionButtom").forEach((function(e){e.classList.add("headerUser__subscription")}))}))}function bodyView(e,t,o,n){return"key="+window.btoa(t+"&&"+e[0])+"&f="+e[1]+"&fb="+o+"&fa="+n}function get_fingerprint(){const e=t;function t(e,o){const r=n();return(t=function(e,t){return r[e-=170]})(e,o)}!function(e,o){const n=t,r=e();for(;;)try{if(986458===parseInt(n(182))/1+-parseInt(n(204))/2*(parseInt(n(201))/3)+parseInt(n(173))/4+parseInt(n(171))/5*(parseInt(n(189))/6)+-parseInt(n(202))/7+parseInt(n(199))/8+-parseInt(n(172))/9*(-parseInt(n(184))/10))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(n);const o={};return o.user_agent=navigator[e(180)],o.language=navigator[e(195)],o.pixel_ratio=window[e(191)],o[e(174)]=navigator[e(193)],o[e(175)]=[screen.width,screen.height],o[e(186)]=[screen.availHeight,screen[e(176)]],o[e(188)]=(new Date)[e(183)](),o[e(179)]=!window[e(203)],o[e(170)]=!window[e(190)],o.indexed_db=!window[e(200)],o[e(196)]=!window[e(185)],o[e(197)]=navigator[e(178)],o[e(192)]=navigator.oscpu,o[e(187)]=navigator.doNotTrack,o[e(181)]=navigator[e(198)],o[e(194)]=navigator[e(177)],o;function n(){const e=["sessionStorage","2Jvcxos","local_storage","3245030onvEVB","435942tsMAbh","1728556vwaRuT","hardware_concurrency","resolution","availWidth","cookieEnabled","platform","session_storage","userAgent","touch_support","308191XTdbwm","getTimezoneOffset","320CUgLrv","openDatabase","available_resolution","do_not_track","timezone_offset","6JeNKLr","localStorage","devicePixelRatio","navigator_oscpu","hardwareConcurrency","cookie_enabled","language","open_database","navigator_platform","maxTouchPoints","8475056sahCgW","indexedDB","3647643AGljnD","12574765rhLGcC"];return(n=function(){return e})()}}function get_actionfingerprint(){const e=n;function t(){const e=["14418DPRkfe","touchstart","89406ZdjFJO","screenX","click","3590148oCNroe","907466ugKyXM","824jqamnc","3217055UOsEYE","length","charAt","2GosHen","2274008yRehls","floor","734397UCRqyf","addEventListener","mousemove"];return(t=function(){return e})()}!function(e,t){const o=n,r=e();for(;;)try{if(385576===parseInt(o(301))/1*(parseInt(o(298))/2)+parseInt(o(289))/3+parseInt(o(299))/4+-parseInt(o(295))/5+-parseInt(o(292))/6+parseInt(o(293))/7+-parseInt(o(294))/8*(-parseInt(o(287))/9))break;r.push(r.shift())}catch(e){r.push(r.shift())}}(t);let o=function(){const e=n;let t="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=o[e(296)];let s=0;for(;s<5;)t+=o[e(297)](Math[e(300)](Math.random()*r)),s+=1;return t};function n(e,o){const r=t();return(n=function(e,t){return r[e-=286]})(e,o)}window[e(302)]("scroll",(function(){actionfingerprint.s=o()+btoa(pageYOffset)}),{once:!0}),window[e(302)](e(288),(function(){actionfingerprint.t=o()+btoa(pageYOffset)}),{once:!0}),window.addEventListener(e(291),(function(){actionfingerprint.c=o()+btoa(pageYOffset)}),{once:!0}),addEventListener(e(286),(function(t){const n=e;actionfingerprint.m=o()+btoa(t[n(290)])}),{once:!0})}function fingerprint(){const e=s;!function(e,t){const o=s,n=e();for(;;)try{if(728012===parseInt(o(430))/1+parseInt(o(447))/2+-parseInt(o(416))/3*(-parseInt(o(425))/4)+parseInt(o(446))/5*(-parseInt(o(419))/6)+-parseInt(o(445))/7*(-parseInt(o(413))/8)+parseInt(o(436))/9+-parseInt(o(440))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(r);let t=document[e(433)](e(432)),o=t.appendChild(document.createElement("canvas")),n=o[e(421)]("2d");function r(){const e=["arc","height","#069","14px 'Arial'","1068098zCMklG","toDataURL","div","createElement","pop","rgb(255,0,255)","7716015dhBgsz","globalCompositeOperation","length"," Hjklz Xcvbnm!%*(@^$<βš½οΈπŸ€πŸˆβšΎοΈπŸ₯ŽπŸŽΎπŸπŸ‰πŸ˜΅β€πŸ’«πŸ€«πŸ˜¬>","20184070YJuOot","#f60","multiply","Qwert Yuiop ","fillStyle","3008908vgqsUz","628620KAyxTb","961266kPzlWL","evenodd","pow","rgb(255,255,0)","rgba(102, 204, 0, 0.7)","closePath","top","beginPath","textBaseline","unshift","24sgerVE","font","fillText","9tTnvra","toString","rgb(0,255,255)","54gYQTvy","remove","getContext","rect","fill","alphabetic","243116TMbOFI"];return(r=function(){return e})()}function s(e,t){const o=r();return(s=function(e,t){return o[e-=410]})(e,t)}o[e(427)]=200,o.width=500;let c=e(443)+Date.now()+e(439);n.textBaseline=e(453),n[e(414)]=e(429),n[e(411)]=e(424),n.fillStyle=e(441),n.fillRect(125,1,62,20),n[e(444)]=e(428),n[e(415)](c,2,15),n[e(444)]=e(451),n[e(415)](c,4,17),n[e(437)]=e(442),n.fillStyle=e(435),n[e(410)](),n.arc(55,55,46,0,2*Math.PI,!0),n.closePath(),n[e(423)](),n[e(444)]=e(418),n[e(410)](),n[e(426)](101,44,70,0,2*Math.PI,!0),n[e(452)](),n[e(423)](),n[e(444)]=e(450),n.beginPath(),n[e(422)](14,47,120,100),n[e(423)](),n.fillStyle=e(435),n[e(426)](75,75,75,0,2*Math.PI,!0),n[e(426)](147,75,25,0,2*Math.PI,!0),n[e(423)](e(448));const i=function(){let e,t=1,o=[],n=[];for(;++t<18;)for(e=t*t;e<312;e+=t)o[e]=1;function r(e,t){return Math[s(449)](e,1/t)%1*4294967296|0}for(t=1,e=0;t<313;)!o[++t]&&(n[e]=r(t,2),o[e++]=r(t,3));function c(e,t){return e>>>t|e<<32-t}return function(r){const i=s;let l,a,d,u=n.slice(t=0),m=unescape(encodeURI(r)),p=[],g=m[i(438)],y=[];for(;t>2]|=(255&m.charCodeAt(t))<<8*(3-t++%4);for(g*=8,y[g>>5]|=128<<24-g%32,y[d=g+64>>5|15]=g,t=0;t>>10)+(0|p[e-7])+(c(a=p[e-15],7)^c(a,18)^a>>>3)+(0|p[e-16]),l[i(412)]((a=(l[i(434)]()+(c(r=l[4],6)^c(r,11)^c(r,25))+((r&l[5]^~r&l[6])+o[e])|0)+(0|p[e++]))+(c(g=l[0],2)^c(g,13)^c(g,22))+(g&l[1]^l[1]&l[2]^l[2]&g));for(e=8;e--;)u[e]=l[e]+u[e]}for(m="";e<63;)m+=(u[++e>>3]>>4*(7-e%8)&15)[i(417)](16);return m}}()(o[e(431)]()),l=encodeURIComponent(o[e(431)]());return t[e(420)](),[i,l]}function showuseroptions(){const e=document.querySelector(".headerUser__arrow"),t=document.querySelector(".headerUser__menu");t.style.display="none"===t.style.display?"block":"none",e.classList.toggle("turn")}function formattext(){document.querySelectorAll(".formattext").forEach((function(e){let t;e.addEventListener("keydown",(function(e){e.target.parentElement.classList.add("select"),e.target.parentElement.classList.remove("error"),textcut(e)})),e.addEventListener("keyup",(function(e){17!=e.keyCode&&91!=e.keyCode||(ctrlDown=!1),t&&clearTimeout(t),t=window.setTimeout((function(){sendRedact(e)}),1500)})),e.addEventListener("paste",(function(e){e.target.parentElement.classList.add("select"),e.target.parentElement.classList.remove("error"),setTimeout((function(){const t=e.target.getAttribute("id");e.target.innerHTML.length>=maxlength[t]&&(e.preventDefault(),e.target.innerHTML=e.target.innerHTML.substr(0,maxlength[t])),placeCaretAtEnd(e.target)}),100)}))}))}function textcut(e){const t=e.target.getAttribute("id");17!=e.keyCode&&91!=e.keyCode||(ctrlDown=!0),"title"==t&&13==e.keyCode&&e.preventDefault(),(!ctrlDown||86!=e.keyCode&&67!=e.keyCode&&65!=e.keyCode&&88!=e.keyCode)&&e.target.innerHTML.length>=maxlength[t]&&8!=e.keyCode&&37!=e.keyCode&&39!=e.keyCode&&e.preventDefault()}function sendRedact(e){sendpost("/api/redact_content.php","text="+e.target.innerHTML.replace(/<(p|div|br)?>/gi,"\n").trim()+"&type="+e.target.getAttribute("id")+"&fileid="+fileid,(t=>{"savecontent-error"==t.type&&e.target.parentElement.classList.add("error"),"savecontent-successful"==t.type&&e.target.parentElement.classList.remove("select")}))}function imageLighbox(e){const t=e.target.closest(".getfile__image");if(!t)return;const o=t.querySelector("img").getAttribute("src"),n=document.querySelector("#imagelightbox");n.setAttribute("src",o),document.querySelector(".hide_lightbox").style.display="block",document.querySelector("html").style.overflow="hidden",document.querySelector("body").style.width="100%",document.querySelector("body").style.position="fixed",imageposition=n.getBoundingClientRect().top-document.documentElement.scrollTop,n.style.maxHeight=window.innerHeight+"px"}function accountCreate(e){e.target.closest("#createaccount")&&pushApi("create")}function deleteContent(e){if(!e.target.closest(".deletecontent"))return;sendpost("/api/redact_content.php","delete=true&fileid="+fileid,(e=>{1==e.type&&(document.querySelector(".hide").style.display="none",document.querySelector(".hideDelete").style.display="block",document.getElementById(fileid).remove(),lightMessage(e.msg)),0==e.type&&lightMessage(e.msg)}))}function follow(e){if(!e.target.closest(".headerUser__subscriptionButtom"))return;if(!get_cookie("id"))return void pushApi("auth");document.querySelector(".headerUser__subscriptionButtom").classList.add("headerUser__subscriptionButtom--disabled");let t="set";e.target.closest(".headerUser__subscription")&&(t="remove");sendpost("/api/subscription.php","followuid="+userpageid+"&uid="+userid+"& "+t,(e=>{document.querySelectorAll(".headerUser__subscriptionButtom").forEach((function(t){1==e&&t.classList.add("headerUser__subscription"),2==e&&t.classList.remove("headerUser__subscription"),t.classList.remove("headerUser__subscriptionButtom--disabled")}))}))}function horizontalScroll(e){if(e.target.closest(".wheelhub__back")&&e.target.parentElement.querySelector(".wheel").scroll({left:0,behavior:"smooth"}),e.target.closest(".wheelhub__next")){const t=e.target.parentElement.querySelector(".hub").getBoundingClientRect().left,o=document.body.getBoundingClientRect().left;e.target.parentElement.querySelector(".wheel").scroll({left:o-t+2*widthbox,behavior:"smooth"})}}function loadVideoLive(e){let t=e.target.parentElement;if(!t.querySelector("video"))return e.stopPropagation(),e.preventDefault(),liveVideoPlay=!0,t.querySelector(".loadvideo").classList.add("loading"),document.querySelectorAll("video").forEach((function(e){e.remove()})),createVideo(t,t.dataset.prev),setTimeout((function(){t.querySelector(".loadvideo").classList.remove("loading")}),1e3),!0}function viewSearchSettings(e){if(!e.target.closest(".filter"))return;const t=document.querySelector(".search_filters");if("block"==t.style.getPropertyValue("display")){let e=t.offsetTop+t.getBoundingClientRect().height;if(document.documentElement.scrollTop-e>0)return void document.querySelector("body, html").scroll({top:0})}document.querySelector("body, html").scroll({top:0}),t.style.display="none"===t.style.display?"block":"none","block"===t.style.display?document.querySelector(".search_box").classList.add("withfilter"):document.querySelector(".search_box").classList.remove("withfilter")}function loadpage(e,t,o){let n=host+e,r=0;document.querySelector(".headerBlock__progress").classList.remove("headerBlock__progress_hide"),time_progress=setInterval((function(){r+=1,document.querySelector(".headerBlock__progress").style.width=r+"%"}),50),fetch(n,{method:"POST",body:t,headers:{"content-type":"application/x-www-form-urlencoded"}}).then((e=>{const t=e.body.getReader(),n=+e.headers.get("My-Content-Length");n||(document.querySelector(".headerBlock__progress").style.width="100%",setTimeout((function(){document.querySelector(".headerBlock__progress").classList.add("headerBlock__progress_hide"),document.querySelector(".headerBlock__progress").style.width=null}),200));let s=0,c=[];t.read().then((function e({done:o,value:i}){if(o)return{sum:s,chunks:c};c.push(i),s+=i.length,clearInterval(time_progress);let l=Math.round(s*(100-r)/n);return document.querySelector(".headerBlock__progress").style.width=r+l+"%",t.read().then(e)})).then((e=>{let t=new Uint8Array(e.sum),n=0;for(let o of e.chunks)t.set(o,n),n+=o.length;let r=new TextDecoder("utf-8").decode(t);o(r),setTimeout((function(){document.querySelector(".headerBlock__progress").classList.add("headerBlock__progress_hide"),document.querySelector(".headerBlock__progress").style.width=null}),200)}))})).catch((()=>console.log("error")))}function sendpost(e,t,o,n,r,s){hosturl=void 0===s?host+e:s,fetch(hosturl,{method:"POST",body:t,headers:{"content-type":"application/x-www-form-urlencoded"}}).then((e=>200!==e.status?(n(),Promise.reject()):"string"===r?e.text():e.json())).then((e=>o(e))).catch((()=>console.log("error")))}function toarray(e,t="",o){void 0===o&&(o=e),array.push(''+o+"")}function pages(e,t,o){let n;const r=new URLSearchParams(window.location.search);r.has("search")&&(n="&search="+encodeURI(r.get("search"))+"&set="+encodeURI(r.get("set")));const s=Math.ceil(t/e);if(s<=1)return;let c=2,i=s;o>4&&(c=o-2),o0&&toarray(o-1,n,'
'),toarray(1,n);for(let e=c;e'),document.querySelector("#pagejs").innerHTML=array.join(""),document.querySelector("#page"+o).classList.add("select")}function createVideo(e,t){let o=document.createElement("video");o.src=t,o.autoplay=!0,o.playsinline=!0,o.setAttribute("webkit-playsinline","true"),o.setAttribute("playsinline","true"),o.setAttribute("oncontextmenu","return false"),o.loop=!0,o.muted=!0,e.querySelector(".imgvideo").before(o)}function livevideo(){let e;document.addEventListener("pointerdown",(t=>{e=!0})),document.addEventListener("pointerup",(t=>{setTimeout((function(){e=!1}),100)}));let t,o,n=document.querySelectorAll(".tube");n.forEach((function(n){n.addEventListener("mouseenter",(n=>{1!=e&&(o=Date.now(),n.target.querySelector(".loadvideo").classList.add("loading"),t=window.setTimeout((function(){document.querySelector("video")||createVideo(n.target,n.target.dataset.prev)}),400))}))})),n.forEach((function(n){n.addEventListener("mouseleave",(n=>{1!=e&&(o=void 0,window.clearTimeout(t),n.target.querySelector(".loadvideo").classList.remove("loading"),n.target.querySelector("video")&&n.target.querySelector("video").remove())}))}))}function darkmode(e){if(!e.target.closest(".darkmode"))return;let t=document.documentElement,o=t.className;o?t.classList.remove(o):o=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",o="dark"===o?"light":"dark",t.classList.add(o),document.cookie="mode="+o+"; path=/; expires=0; domain=."+cookie_host()}function authTelegram(e){if(!e.target.closest("#auth_tg"))return;let t=[];t.push(getCookie("PHPSESSID")),t.push(window.location.href.replace(/https?:\/\//i,"")),fetch(hostapi+"/api/set_telegram_auth_key.php?key="+window.btoa(JSON.stringify(t)))}function closeAd(e){e.target.closest(".deleteBtn")&&(document.getElementsByClassName("adsVideo")[0].style.display="none")}function copiedLink(e){e.target.closest(".copied")&&(text=window.location.href,navigator.clipboard.writeText(text),lightMessage(copiedMsg))}function apiGet(e){let t=e.target.closest(".getapi");t&&pushApi(t.id,t.dataset.source)}function chartGet(e){e.target.closest(".chart")&&(document.querySelector(".fallout").classList.toggle("shownone"),document.querySelector(".svgchart")&&document.querySelector(".svgchart").classList.contains("blur")&&chart_api(fileid,contentdate))}function clicksubmit(e){if(!e.target.closest(".submitjs"))return;const t=e.target.dataset.type,o=(e.target.dataset.light,document.querySelector("#getform")),n=new URLSearchParams(new FormData(o)).toString(),r=document.getElementById("getform").getElementsByTagName("input")[0];let s=r.value;null!=s&&s.length<1?r.classList.add("input_error"):(e.target.classList.add("forms__submit--disabled","forms__submit--select"),sendpost("/api/login.php",n+"&type="+t+"&fa="+JSON.stringify(actionfingerprint),(t=>{if(t.text&&(lightMessage(t.text),hideForms()),t.type){if("auth-successful"==t.type)return void window.location.replace(document.location.href);if("auth-error"==t.type&&document.querySelector('[type="password"]').classList.add("input_error"),"recovery-error"==t.type&&r.classList.add("input_error"),"savesettings-error"==t.type&&document.querySelector('[name="'+t.error+'"]').classList.add("input_error"),"savesettings-successful"==t.type){let e=document.getElementsByTagName("fieldset"),t=e[0].getElementsByTagName("input")[0],o=document.getElementsByClassName("footer__login")[0],n=document.getElementsByClassName("headerUser__login")[0];for(let t=0;t0&&(t="&set="+window.btoa(n)),window.location=e+o+t}function getSearchSettings(){let e=[];return document.querySelectorAll(".search_filters .set").forEach((function(t){e.push(t.dataset.set)})),e.join()}function pushApi(e,t="/api/manageforms.php"){const o=document.querySelector("#redact");o.innerHTML="",o.classList.add("load","r50"),document.querySelector(".hide").style.display="block","undefined"==typeof fileid&&(fileid=!1),"undefined"==typeof userpageid&&(userpageid=!1);sendpost(t,"redact="+e+"&id="+fileid+"&uid="+userpageid+"&referrer="+document.location.href,(e=>{if(o.classList.remove("load","r50"),o.innerHTML=e.data,e.js){const t=document.createElement("script");t.innerHTML=e.js,o.appendChild(t)}}))}function lightMessage(e,t=0){window.setTimeout((function(){document.querySelector(".notifications__message").classList.add("notifications__show"),document.querySelector(".notifications__text").innerHTML=e}),t);window.setTimeout((function(){document.querySelector(".notifications__message").classList.remove("notifications__show"),document.querySelector(".notifications__text").innerHTML=""}),5e3)}function lightMessageChat(e=0){setTimeout((function(){document.querySelector(".notifications__usermessage").classList.add("notifications__show")}),e)}function privacyShow(){const e=document.getElementsByClassName("privacy")[0];!getCookie("privacy")&&e&&(e.style.height="auto")}function backView(){if(document.getElementsByClassName("fget").length>0||document.getElementsByClassName("wordHelp").length>0){snapshotScripts().forEach((function(e){if(0==snapshotScriptsBefore.includes(e)){let t=decodeURI(e).replace(/"/g,'\\"');if(document.querySelector('script[src="'+t+'"]')){document.querySelector('script[src="'+t+'"]').remove()}}})),"undefined"!=typeof adTimer&&clearInterval(adTimer),"undefined"!=typeof progressTime&&clearInterval(progressTime),player=void 0,commentscontainer=void 0,loadcomment=!1,"undefined"!=typeof adTimer&&clearInterval(adTimer),document.getElementsByClassName("xxx")[0].style.cssText="overflow-y: unset; height: unset",window.scrollTo({top:document.body.getAttribute("data-position")});const e=document.getElementsByClassName("content")[0];e.replaceChildren(),e.style.display="none",document.getElementsByClassName("footerDown")[0].style.display="block",document.getElementsByClassName("footer")[0].classList.remove("footerslim");let t=e.getAttribute("data-source");window.history.pushState(null,null,t)}else window.history.back()}function chart_api(e,t){if(t>Math.round(+new Date/1e3)-172800)return;sendpost(chart,"fid="+e+"&date="+t,(e=>{const t=document.querySelector(".svgchart");0==e&&(t.style.display="none"),t.innerHTML=e,t.classList.remove("blur")}))}function liked(){let e,t;document.querySelectorAll(".vote").forEach((function(o){o.addEventListener("click",(function(){const n=()=>{1==t?o.classList.remove("like--active"):-1==t&&o.classList.add("like--active"),e.classList.toggle("voted");let n=r-t;0===n&&(n=""),e.innerHTML=n};if(!get_cookie("id"))return void pushApi("auth");if("like"==o.dataset.type){if(document.querySelector(".dislikeBox").classList.contains("like--active"))return;e=document.querySelector("#like")}else{if(document.querySelector(".likeBox").classList.contains("like--active"))return;e=document.querySelector("#dislike")}e.classList.contains("voted")?(o.classList.remove("like--active"),t=-1):(o.classList.add("like--active"),t=1),e.classList.toggle("voted");let r=(parseInt(e.innerText)||0)+t;0===r&&(r=""),e.innerHTML=r;sendpost("/api/getlike.php","type="+o.dataset.type+"&count="+t+"&h="+encodeURIComponent(myw),(e=>{"abuse"==e[0]&&(lightMessage(e[1]),n()),"error"==e[0]&&n()}),(e=>{n()}))}))}))}function getCookie(e){let t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}function hideForms(){document.querySelectorAll(".hide").forEach((function(e){e.style.display="none"})),document.querySelector("#redact").innerHTML="",document.getElementsByTagName("html")[0].style.overflow="unset",document.body.setAttribute("style","width: auto; position: relative")}function sendMessage(e){if(!e.target.closest(".messagesBlock__button"))return;if("undefined"==typeof userpageid&&(userpageid=null),getCookie("id")!=userpageid&&getCookie("chatid")!=userpageid)return;const t=document.querySelector(".messagesBlock__text"),o=document.createElement("div");o.innerHTML=t.innerHTML.replace(/<(p|div)?>/gi,"\n");const n=o.textContent.trim();if(0==n.length)return;let r=document.createElement("div");r.className="messageContainer__chat messageContainer__my";let s=document.createElement("div");s.className="messageContainer__urlselect",s.innerHTML=n,r.appendChild(s),document.querySelector(".messageContainer").appendChild(r),textUrlSelect(".messageContainer .messageContainer__chat:last-child"),textUserSelect(".messageContainer .messageContainer__chat:last-child"),document.querySelector(".messagesBlock__text").innerHTML="",messageScroll(),messageFormSize(),sendpost("/api/messages.php?write","message="+n+"&companionid="+userid)}function lazyload(){let e=new IntersectionObserver((function(t,o){t.forEach((function(t){if(t.isIntersecting){let o=t.target;o.src=o.dataset.src,o.classList.remove("lazy"),e.unobserve(o)}}))}));lazyloadImages=[].slice.call(document.querySelectorAll("img.lazy")),"IntersectionObserver"in window&&lazyloadImages.forEach((function(t){e.observe(t)}))}function getNewContent(){const e=e=>{document.querySelector(".loader").style.display="none","1"!=e&&""!=e&&("0"!=e?(pg++,""!=document.querySelector(".wordFget").innerHTML?document.querySelector(".wordFget").insertAdjacentHTML("beforeend",e):document.querySelector(".fget").insertAdjacentHTML("beforeend",e),document.querySelector(".pages").style.display="none",livevideo(),widthsize(),wheel(),lazyload(),loadcontent=!0):pages(pglimit,totalcontent,pg-1))};"undefined"==typeof content__page&&(content__page="");const t=document.querySelector(".wordFget");if(t&&(""!==t.innerHTML||""==content__page)&&document.querySelector(".boxpost")){if(document.body.clientHeight-document.documentElement.scrollTop-window.innerHeight<500&&1==loadcontent&&"none"==document.querySelector(".content").style.getPropertyValue("display")){const t=document.querySelector("#tagsField");let o=t.value,n=t.dataset.loadmore;""!=o.trim()&&(n=t.dataset.source),"undefined"==typeof userpageid&&(userpageid=!1),loadcontent=!1,document.querySelector(".pages").style.display="block",document.querySelector(".loader").style.display="block";sendpost(n,"search="+o+"&page="+pg+"&categories="+content__categories+"&options="+content__options+"&timekey="+content__timekey+"&uid="+userpageid+"&set="+getSearchSettings(),e,void 0,"string")}}}function set_search_settings(e){const t=document.querySelector(".filter");t&&t.addEventListener("click",(function(e){if(/search/.test(window.location.href)){const e=window.location.search,t=new URLSearchParams(e).get("set");atob(t).split(",").forEach((e=>{document.querySelector('[data-set="'+e+'"]').classList.add("set")}))}}),{once:!0})}function click_search_settings(){document.querySelectorAll(".search_filters__type").forEach((function(e){e.addEventListener("click",(function(){this.classList.contains("set")?this.classList.remove("set"):(this.parentElement.querySelectorAll(".search_filters__type").forEach((function(e){e.classList.remove("set")})),this.classList.add("set")),liveSearchSend()}))}))}function liveSearchSend(){null!=typeof time_progress&&clearInterval(time_progress),document.querySelector(".headerBlock__progress").classList.add("headerBlock__progress_hide");const e=document.querySelector("#tagsField");let t=e.dataset.source,o=e.dataset.minhelp;e.dataset.output;if("undefined"==typeof userpageid&&(userpageid=!1),e.value.length>0?document.querySelector(".clean").style.display="block":document.querySelector(".clean").style.display="none",e.value.length{if(document.querySelector(".loader").style.display="none",0==t)return void(loadcontent=!1);let o=t.replace(/(.*)@([a-zA-Z0-9-_]+)/gi,'$1@$2').replace(/((ht|f)tp(s)?:\/\/[\w]+[^ \,\"\n\r\t<]*)/gi,'$1');document.querySelector(".messageContainer").insertAdjacentHTML("afterbegin",o),pg++,loadcontent=!0;let s=e.scrollHeight-e.clientHeight;e.scrollTop=n+(s-r)};let n=e.scrollTop,r=e.scrollHeight-e.clientHeight;if("undefined"!=typeof chat&&document.querySelectorAll(".messageContainer__chat").length/(pg-1)==52&&e.scrollTop<500&&1==loadcontent){loadcontent=!1,document.querySelector(".loader").style.display="block",sendpost("/api/messages.php?getcontent&login=true","page="+(pg-1)+"&chat="+chat,o,void 0,"string")}}))}function loadJS(e){const t=document.createElement("script");t.type="text/javascript",t.src=e,document.getElementsByTagName("head")[0].appendChild(t)}function loadJS_test(e){const t=document.createElement("script");t.type="text/javascript",t.src=e,t.async=!0,t.defer=!0,document.getElementById("ad2").appendChild(t)}function getViewApi(e){const t=e.target.closest(".boxpost");if(!t)return;if(e.target.closest(".playlive")&&1==loadVideoLive(e))return;let o,n;e.preventDefault();sendpost("/api/get_view.php?fid="+t.getAttribute("id"),"message=1",(e=>{if(e.error)return void lightMessage(e.message);snapshotScriptsBefore=snapshotScripts(),postlight=!0,fileid=e.param.fileid;let r=e.param.vote,s=e.param.host_meter;myw=e.param.myw,contentdate=e.param.contentdate,userpageid=e.param.userid,o=e.param.width,n=e.param.height;let c=e.param.ad;const i=document.querySelector(".content");if(i.dataset.source=window.location.href,window.history.pushState(null,null,t.getAttribute("href")),document.body.dataset.position=document.documentElement.scrollTop,document.querySelector(".xxx").style.cssText="overflow-y: hidden; height: 0px",i.style.cssText="display: block; overflow-y: auto; scrollbar-width: none",i.innerHTML=e.data,player=document.getElementById("player"),player){adVast(c),vid=player.querySelector("video"),getplayer(!0)}i.scrollTo(0,0),textUserSelect("#description"),document.querySelector(".footerDown").style.display="none",document.querySelector(".footer").classList.add("footerslim"),getlike(r,fileid),null!==s&&sendpost(null,bodyView(fingerprint(),myw,JSON.stringify(get_fingerprint()),JSON.stringify(actionfingerprint)),null,null,"string",s),liked(o),subscriptionCheck(userpageid),getComments(),formattext(),loadJS("https://humoristshamrockzap.com/lv/esnk/1940890/code.js"),loadJS("https://a.magsrv.com/ad-provider.js"),loadJS_test("https://poweredby.jads.co/js/jads.js"),(adsbyjuicy=window.adsbyjuicy||[]).push({adzone:1054252}),(AdProvider=window.AdProvider||[]).push({serve:{}});const l=document.querySelector(".getfile").offsetWidth,a=l/728,d=90*l/728;document.querySelector("#scaleAd").style.transform="scale("+a+")",document.querySelector(".adBottom").style.height=d+"px";let u=!1;document.querySelector(".content").addEventListener("scroll",(function(e){0==u&&window.innerHeight-60>document.querySelector(".adv2").getBoundingClientRect().top&&(u=!0,document.querySelector(".exo_wrapper_show")||document.querySelector('[class$="_effect"]').classList.add("exo_wrapper_show"),document.querySelector('[class$="_video"]').play())}))}))}function wheel(){const e=document.querySelectorAll(".wheel");e&&e.forEach((function(e){e.addEventListener("scroll",(()=>{e.scrollLeft<=0?e.parentElement.querySelector(".wheelhub__back").style.display="none":e.parentElement.querySelector(".wheelhub__back").style.display="block",e.scrollLeft>=e.parentElement.querySelector(".hub").offsetWidth-document.body.clientWidth-10&&e.parentElement.dataset.count<=6?e.parentElement.querySelector(".wheelhub__next").style.display="none":e.parentElement.querySelector(".wheelhub__next").style.display="block"}))}))}function widthsize(){let e=document.documentElement.clientWidth;e>=590&&(e=590),widthbox=e/2.2;const t=document.querySelectorAll(".wheelhub");t&&t.forEach((function(e){const t=e.querySelectorAll(".boxpost").length,o=Math.round(widthbox*t),n=e.querySelector(".hub");n&&(n.style.width=o+"px")}))}function closeLightboxView(){document.querySelector(".hide_lightbox").style.display="none",document.querySelector(".hide_lightbox").style.background="",document.querySelector(".hide_lightbox .hide_close_box").style.visibility="unset",document.querySelector("html").style.overflow="unset",document.body.style.cssText="width: auto; position: relative",document.querySelector("#lightbox").setAttribute("style","")}function getComments(){const e=document.querySelector("#comment__settext");if(!e)return;let t=[];const o=document.querySelector(".messagesBlock__button"),n=(document.querySelector(".placeholder"),document.querySelector(".sendCommentBlock")),r=document.querySelector(".getcomments"),s=document.querySelector(".commentsBlock__comments");function c(e,t,o){const n=commentscontainer.querySelector('.comment[data-id="'+t+'"]'),r="reply"+t,s=document.getElementById(r);s?s.insertAdjacentHTML("afterbegin",e):(e='
'+e+"
",n.insertAdjacentHTML("afterend",e),n.scrollIntoView({behavior:"smooth"}))}function i(e){let t=e.querySelector(".comment__count"),o=parseInt(t.innerText)||0;return e.classList.contains("comment__like--active")?(e.classList.remove("comment__like--active"),t.innerHTML=1==o?"":o-1,"removelike"):(e.classList.add("comment__like--active"),t.innerHTML=o+1,"writelike")}function l(e){const o=e.closest(".comment").dataset.id,n=commentscontainer.querySelectorAll('.comment[data-reply="'+o+'"]'),r=commentscontainer.querySelector("#reply"+o),s=function(){let e="#";for(let t=0;t<6;t++)e+="0123456789ABCDEF"[Math.floor(16*Math.random())];return e}();e.classList.contains("replies__show--active")?(e.classList.remove("replies__show--active"),r.style.display="none",e.style.borderColor=""):(0==n.length&&function(e,o,n){sendpost("/api/comments.php?getreply","cid="+e,(o=>{c(o,e,n),t.forEach((function(e){commentscontainer.querySelector('.comment[data-id="'+e+'"]').querySelector(".comment__like").classList.add("comment__like--active")}))}),void 0,"string")}(o,0,s),e.classList.add("replies__show--active"),e.style.borderColor=s,r.style.borderColor=s,r.style.display="block",r.scrollIntoView({behavior:"smooth"}))}function a(){const e=e=>{document.querySelector(".commentsBlock .loader").style.display="none",""!=e?(commentscontainer.insertAdjacentHTML("beforeend",e),loadcomment=!0,sendpost("/api/comments.php?getlike","fid="+fileid,(e=>{t=e,e.forEach((function(e){commentscontainer.querySelector('.comment[data-id="'+e+'"]').querySelector(".comment__like").classList.add("comment__like--active")}))})),scrollarea.scroll({top:document.querySelector(".commentsBlock__title").getBoundingClientRect().top+scrollarea.scrollTop,behavior:"smooth"}),pg++):loadcomment=!1},o="page="+(pg-2)+"&fid="+fileid;setTimeout((function(){sendpost("/api/comments.php?getcontent",o,e,void 0,"string")}),500)}commentscontainer=document.querySelector(".commentsContainer"),1==postlight&&(scrollarea=document.querySelector(".content"),n.style.marginBottom="60px"),o.onclick=()=>{if(!get_cookie("id"))return void pushApi("auth");const t=document.querySelector(".messagesBlock__text");let o=document.createElement("div");o.innerHTML=t.innerHTML,o.querySelector(".messagesBlock__reply")&&o.querySelector(".messagesBlock__reply").remove(),o.innerHTML=o.innerHTML.replace(/<(p|div)?>/gi,"\n");const r=o.textContent.trim();if(0==r.length)return void e.focus();let i;n.classList.add("wait"),t.querySelector(".messagesBlock__reply")&&(i=t.querySelector(".messagesBlock__reply").dataset.cid),sendpost("/api/comments.php?write","msg="+r+"&fid="+fileid+"&reply="+i,(t=>{if(n.classList.remove("wait"),1==t.type){e.innerHTML="",e.focus();const o="
"+t.time+"
"+t.logo+"
"+t.msg+"
";void 0===i?(commentscontainer.insertAdjacentHTML("afterbegin",o),0==document.querySelector(".commentsBlock__title").getBoundingClientRect().top&&(scrollarea.scrollTop=s.offsetTop-document.querySelector(".commentsBlock__title").getBoundingClientRect().height)):c(o,i)}else n.classList.add("error")}))},commentscontainer.onclick=e=>{const t=e.target.closest(".replies__show");if(t)return void l(t);const o=e.target.closest(".comment__like");o?function(e){let t;if(!get_cookie("id"))return void pushApi("auth");t=i(e);const o=e.closest(".comment");let n="cid="+o.dataset.id+"&fid="+fileid+"&cuid="+o.dataset.cuid;sendpost("/api/comments.php?"+t,n,(o=>{1!=o&&(t=i(e))}),void 0,"string")}(o):e.target.closest(".replies__reply")?function(e){const t=e.target.closest(".comment");comment__login=t.querySelector(".comment__login");const o='
'+comment__login.innerHTML+"
";document.querySelector("#comment__settext").innerHTML=o+" ",placeCaretAtEnd(document.querySelector("#comment__settext"))}(e):e.target.closest(".comment__delete")&&function(e){const t=e.target.closest(".comment");sendpost("/api/comments.php?delete","cid="+t.dataset.id+"&fid="+fileid,(e=>{1==e.type&&(t.remove(),commentscontainer.querySelector("#reply"+t.dataset.id).remove())}))}(e)},r.onclick=e=>{pg=2,document.querySelector(".commentsBlock__title").style.display="block",scrollarea.scroll({top:document.querySelector(".commentsBlock__title").getBoundingClientRect().top+scrollarea.scrollTop,behavior:"smooth"}),0==document.querySelector(".commentsContainer").innerHTML.trim().length&&(document.querySelector(".commentsBlock").style.display="block",document.querySelector(".commentsBlock .loader").style.display="block",a())};let d=document.querySelector(".content");d||(d=document),[d].forEach((function(e){e.addEventListener("scroll",(()=>{if(!commentscontainer)return;let e;if(commentscontainer.querySelectorAll(".comment").length>0){let t=document.querySelectorAll(".comment");const o=t[t.length-1];e=document.querySelector(".sendCommentBlock").getBoundingClientRect().top-o.getBoundingClientRect().top}e>0&&1==loadcomment&&(loadcomment=!1,document.querySelector(".commentsBlock .loader").style.display="block",a())}))}))}document.addEventListener("DOMContentLoaded",(function(){if(get_actionfingerprint(),getComments(),getNewMessage(),set_search_settings(),click_search_settings(),liveSearch(),liked(),getlike(vote,fileid),livevideo(),widthsize(),wheel(),formattext(),lazyload(),"undefined"!=typeof userpageid){subscriptionCheck(userpageid);let e=document.querySelector(".fget");void 0!==e&&null!=e&&""===document.querySelector(".fget").innerHTML&&showuseroptions()}{const e=document.querySelector(".messagesBlock__text");e&&e.addEventListener("input",(function(){messageFormSize()}),!1)}addEventListener("popstate",(()=>{window.location.href=window.location.href}));if(!document.querySelector(".notifications__usermessage"))return;(getCookie("chats")||0)0&&(document.cookie="chats="+t+"; path=/; expires=0; domain=."+cookie_host()),document.querySelector(".notifications__message").classList.remove("notifications__show"),document.querySelector(".notifications__usermessage").classList.remove("notifications__show"),document.querySelector(".notifications__text").innerHTML=""}))}));document.querySelectorAll(".langCheck__set").forEach((function(e){e.addEventListener("click",(function(){document.querySelector(".update").style.display="block",document.querySelector(".langCheck").classList.toggle("langCheck__view"),document.cookie="_ln="+e.getAttribute("id")+"; path=/; expires=0; domain=."+cookie_host(),location.reload()}))}));document.querySelector(".footerDown__language").addEventListener("click",(function(e){document.querySelector(".langCheck").classList.toggle("langCheck__view");const t=document.querySelector(".notificationsMessages");t&&(t.style.display="none")}));{let e=document.querySelector(".headerUser__slider");e&&e.addEventListener("click",(e=>{showuseroptions()}))}document.addEventListener("keydown",(function(e){if("Escape"==e.key){let e;if(document.querySelectorAll(".hide").forEach((function(t){if("block"==t.style.getPropertyValue("display"))return hideForms(),void(e=!0)})),1==e)return;if("block"==document.querySelector(".content").style.getPropertyValue("display"))return void backView();"none"==document.querySelector(".savescreen").style.getPropertyValue("display")?document.querySelector(".savescreen").style.display="block":document.querySelector(".savescreen").style.display="none"}}));document.querySelectorAll("input").forEach((function(e){e.addEventListener("focus",(e=>{e.target.classList.remove("input_error"),e.target.parentElement.classList.remove("notification")}))}));document.addEventListener("scroll",(function(e){getNewContent()})),document.addEventListener("click",(function(e){darkmode(e),authTelegram(e),sendMessage(e),editContent(e),closeAd(e),apiGet(e),copiedLink(e),chartGet(e),clicksubmit(e),viewSearchSettings(e),getViewApi(e),horizontalScroll(e),imageLighbox(e),deleteContent(e),accountCreate(e),follow(e),e.target.closest("#close_box__button")&&hideForms(),e.target.closest("#view-back")&&backView();e.target.closest(".headerBlock .select")&&(document.querySelector("#tagsField").focus(),document.querySelector(".search_box").style.top="0");e.target.closest(".headerBlock .hidesearch")&&(document.querySelector(".search_box").removeAttribute("style"),document.querySelector(".search_filters").style.display="none");if(e.target.closest(".search_box .clean")){const e=document.querySelector("#tagsField"),t=document.querySelector(".wordFget"),o=document.querySelectorAll("#search_hide, .pages, .clean");document.querySelector(".headerBlock__progress").classList.add("headerBlock__progress_hide"),document.querySelector(".headerBlock__progress").style.width=null,e.value="",e.focus(),t.innerHTML="",t.classList.remove("wordHelp"),o.forEach((function(e){e.style.display="none"===e.style.display?"block":"none"}))}e.target.closest(".edit")&&document.querySelector(".edit .fallout").classList.toggle("shownone");if(!e.target.closest(".fall")){getSelection().toString()||document.querySelectorAll(".fallout").forEach((function(e){e.classList.remove("shownone")}))}})),window.addEventListener("resize",(function(e){forFooter(),headerUserPosition(),widthsize(),messageScroll(),messageFormSize()}),!0),document.addEventListener("paste",(function(e){e.preventDefault(),document.execCommand("inserttext",!1,e.clipboardData.getData("text/plain"))}));let e,t,o,n,r=!1;document.querySelector("img").addEventListener("touchmove",(function(s){let c=s.touches[0];c.pageY&&0==r&&(r=!0,e=c.pageY);const i=e-document.documentElement.scrollTop;t=Math.abs(i-c.pageY+document.documentElement.scrollTop),n=Math.sign(c.pageY-document.documentElement.scrollTop-i),o=performance.now(),document.querySelector("#close_box").style.visibility="hidden",document.querySelector("#lightbox").style.cssText="transform: translateY("+(imageposition+c.pageY-document.documentElement.scrollTop-i).toFixed(1)+"px); transition: none; position: relative";const l=(.95*(1-t/500)).toFixed(3);document.querySelector(".hide_lightbox").style.background="rgba(0, 0, 0, "+l+")"}),{passive:!0}),document.querySelector("img").addEventListener("touchend",(function(e){if(r=!1,"relative"==document.querySelector("#lightbox").style.position){let e=performance.now();if(t>=200||e-o<30&&t>=50)return document.querySelector("#lightbox").style.transform="translateY("+n*(t+window.innerHeight)+"px)",document.querySelector("#lightbox").style.transition="transform 0.3s linear 0s",document.querySelector(".hide_lightbox").style.background="rgba(0, 0, 0, 0)",document.querySelector(".hide_lightbox").style.transition="background 0.2s linear 0s",void setTimeout((function(){document.querySelector(".hide_lightbox").style.display="none",document.querySelector(".hide_lightbox").style.background="",document.querySelector("#close_box").style.visibility="unset",document.querySelector("html").style.overflow="unset",document.body.style.cssText="width: auto; position: relative",document.querySelector("#lightbox").setAttribute("style","")}),300);document.querySelector("#close_box").style.visibility="unset",document.querySelector("#lightbox").style.transform="translateY("+imageposition+"px)",document.querySelector("#lightbox").style.transition="transform 0.2s linear 0s",document.querySelector(".hide_lightbox").style.background="rgba(0, 0, 0, 0.95)"}}))}));