D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
sadaunjx
/
forsa2you.com
/
wp-content
/
plugins
/
ad-inserter
/
includes
/
js
/
Filename :
ai-insert.min.js
back
Copy
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var d=0;return function(){return d<a.length?{done:!1,value:a[d++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var d="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return d?d.call(a):$jscomp.arrayIterator(a)}; if("undefined"!=typeof ai_block_class_def){var ai_process_elements=function(){ai_process_elements_active||setTimeout(function(){ai_process_elements_active=!1;"function"==typeof ai_process_rotations&&ai_process_rotations();"function"==typeof ai_process_lists&&ai_process_lists(jQuery(".ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery(".ai-ip-data"));"function"==typeof ai_process_filter_hooks&&ai_process_filter_hooks();"function"==typeof ai_adb_process_blocks&& ai_adb_process_blocks();"function"==typeof ai_process_impressions&&1==ai_tracking_finished&&ai_process_impressions();"function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers();"function"==typeof ai_install_close_buttons&&ai_install_close_buttons(document)},5);ai_process_elements_active=!0};ai_insert=function(a,d,m){if(-1!=d.indexOf(":eq("))if(window.jQuery&&window.jQuery.fn)var k=jQuery(d);else{console.error("AI INSERT USING jQuery QUERIES:",d,"- jQuery not found"); return}else k=document.querySelectorAll(d);for(var u=0,y=k.length;u<y;u++){var e=k[u];selector_string=e.hasAttribute("id")?"#"+e.getAttribute("id"):e.hasAttribute("class")?"."+e.getAttribute("class").replace(RegExp(" ","g"),"."):"";var w=document.createElement("div");w.innerHTML=m;var n=w.getElementsByClassName("ai-selector-counter")[0];null!=n&&(n.innerText=u+1);n=w.getElementsByClassName("ai-debug-name ai-main")[0];if(null!=n){var r=a.toUpperCase();"undefined"!=typeof ai_front&&("before"==a?r=ai_front.insertion_before: "after"==a?r=ai_front.insertion_after:"prepend"==a?r=ai_front.insertion_prepend:"append"==a?r=ai_front.insertion_append:"replace-content"==a?r=ai_front.insertion_replace_content:"replace-element"==a&&(r=ai_front.insertion_replace_element));-1==selector_string.indexOf(".ai-viewports")&&(n.innerText=r+" "+d+" ("+e.tagName.toLowerCase()+selector_string+")")}n=document.createRange();try{var v=n.createContextualFragment(w.innerHTML)}catch(t){}"before"==a?e.parentNode.insertBefore(v,e):"after"==a?e.parentNode.insertBefore(v, e.nextSibling):"prepend"==a?e.insertBefore(v,e.firstChild):"append"==a?e.insertBefore(v,null):"replace-content"==a?(e.innerHTML="",e.insertBefore(v,null)):"replace-element"==a&&(e.parentNode.insertBefore(v,e),e.parentNode.removeChild(e))}};ai_insert_code=function(a){function d(n,r){return null==n?!1:n.classList?n.classList.contains(r):-1<(" "+n.className+" ").indexOf(" "+r+" ")}function m(n,r){null!=n&&(n.classList?n.classList.add(r):n.className+=" "+r)}function k(n,r){null!=n&&(n.classList?n.classList.remove(r): n.className=n.className.replace(new RegExp("(^|\\b)"+r.split(" ").join("|")+"(\\b|$)","gi")," "))}if("undefined"!=typeof a){var u=!1;if(d(a,"no-visibility-check")||a.offsetWidth||a.offsetHeight||a.getClientRects().length){u=a.getAttribute("data-code");var y=a.getAttribute("data-insertion-position"),e=a.getAttribute("data-selector");if(null!=u)if(null!=y&&null!=e){if(-1!=e.indexOf(":eq(")?window.jQuery&&window.jQuery.fn&&jQuery(e).length:document.querySelectorAll(e).length)ai_insert(y,e,b64d(u)),k(a, "ai-viewports")}else{y=document.createRange();try{var w=y.createContextualFragment(b64d(u))}catch(n){}a.parentNode.insertBefore(w,a.nextSibling);k(a,"ai-viewports")}u=!0}else w=a.previousElementSibling,d(w,"ai-debug-bar")&&d(w,"ai-debug-script")&&(k(w,"ai-debug-script"),m(w,"ai-debug-viewport-invisible")),k(a,"ai-viewports");return u}};ai_insert_list_code=function(a){var d=document.getElementsByClassName(a)[0];if("undefined"!=typeof d){var m=ai_insert_code(d),k=d.closest("div."+ai_block_class_def); if(k){m||k.removeAttribute("data-ai");var u=k.querySelectorAll(".ai-debug-block");k&&u.length&&(k.classList.remove("ai-list-block"),k.classList.remove("ai-list-block-ip"),k.classList.remove("ai-list-block-filter"),k.style.visibility="",k.classList.contains("ai-remove-position")&&(k.style.position=""))}d.classList.remove(a);m&&ai_process_elements()}};ai_insert_viewport_code=function(a){var d=document.getElementsByClassName(a)[0];if("undefined"!=typeof d){var m=ai_insert_code(d);d.classList.remove(a); m&&(a=d.closest("div."+ai_block_class_def),null!=a&&(m=d.getAttribute("style"),null!=m&&a.setAttribute("style",a.getAttribute("style")+" "+m)));setTimeout(function(){d.removeAttribute("style")},2);ai_process_elements()}};ai_insert_adsense_fallback_codes=function(a){a.style.display="none";var d=a.closest(".ai-fallback-adsense"),m=d.nextElementSibling;m.getAttribute("data-code")?ai_insert_code(m)&&ai_process_elements():m.style.display="block";d.classList.contains("ai-empty-code")&&null!=a.closest("."+ ai_block_class_def)&&(a=a.closest("."+ai_block_class_def).getElementsByClassName("code-block-label"),0!=a.length&&(a[0].style.display="none"))};ai_insert_code_by_class=function(a){var d=document.getElementsByClassName(a)[0];"undefined"!=typeof d&&(ai_insert_code(d),d.classList.remove(a))};ai_insert_client_code=function(a,d){var m=document.getElementsByClassName(a)[0];if("undefined"!=typeof m){var k=m.getAttribute("data-code");null!=k&&ai_check_block()&&(m.setAttribute("data-code",k.substring(Math.floor(d/ 19))),ai_insert_code_by_class(a),m.remove())}};ai_process_elements_active=!1;var targetNode=document.querySelector("body"),config={attributes:!0,childList:!1,subtree:!0},ai_adsense_callback=function(a,d){for(var m=$jscomp.makeIterator(a),k=m.next();!k.done;k=m.next())k=k.value,"attributes"===k.type&&"data-ad-status"==k.attributeName&&"unfilled"==k.target.dataset.adStatus&&k.target.closest(".ai-fallback-adsense")&&ai_insert_adsense_fallback_codes(k.target)},observer=new MutationObserver(ai_adsense_callback); observer.observe(targetNode,config);var Arrive=function(a,d,m){function k(t,c,f){e.addMethod(c,f,t.unbindEvent);e.addMethod(c,f,t.unbindEventWithSelectorOrCallback);e.addMethod(c,f,t.unbindEventWithSelectorAndCallback)}function u(t){t.arrive=r.bindEvent;k(r,t,"unbindArrive");t.leave=v.bindEvent;k(v,t,"unbindLeave")}if(a.MutationObserver&&"undefined"!==typeof HTMLElement){var y=0,e=function(){var t=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector|| HTMLElement.prototype.msMatchesSelector;return{matchesSelector:function(c,f){return c instanceof HTMLElement&&t.call(c,f)},addMethod:function(c,f,g){var b=c[f];c[f]=function(){if(g.length==arguments.length)return g.apply(this,arguments);if("function"==typeof b)return b.apply(this,arguments)}},callCallbacks:function(c,f){f&&f.options.onceOnly&&1==f.firedElems.length&&(c=[c[0]]);for(var g=0,b;b=c[g];g++)b&&b.callback&&b.callback.call(b.elem,b.elem);f&&f.options.onceOnly&&1==f.firedElems.length&&f.me.unbindEventWithSelectorAndCallback.call(f.target, f.selector,f.callback)},checkChildNodesRecursively:function(c,f,g,b){for(var h=0,l;l=c[h];h++)g(l,f,b)&&b.push({callback:f.callback,elem:l}),0<l.childNodes.length&&e.checkChildNodesRecursively(l.childNodes,f,g,b)},mergeArrays:function(c,f){var g={},b;for(b in c)c.hasOwnProperty(b)&&(g[b]=c[b]);for(b in f)f.hasOwnProperty(b)&&(g[b]=f[b]);return g},toElementsArray:function(c){"undefined"===typeof c||"number"===typeof c.length&&c!==a||(c=[c]);return c}}}(),w=function(){var t=function(){this._eventsBucket= [];this._beforeRemoving=this._beforeAdding=null};t.prototype.addEvent=function(c,f,g,b){c={target:c,selector:f,options:g,callback:b,firedElems:[]};this._beforeAdding&&this._beforeAdding(c);this._eventsBucket.push(c);return c};t.prototype.removeEvent=function(c){for(var f=this._eventsBucket.length-1,g;g=this._eventsBucket[f];f--)c(g)&&(this._beforeRemoving&&this._beforeRemoving(g),(g=this._eventsBucket.splice(f,1))&&g.length&&(g[0].callback=null))};t.prototype.beforeAdding=function(c){this._beforeAdding= c};t.prototype.beforeRemoving=function(c){this._beforeRemoving=c};return t}(),n=function(t,c){var f=new w,g=this,b={fireOnAttributesModification:!1};f.beforeAdding(function(h){var l=h.target;if(l===a.document||l===a)l=document.getElementsByTagName("html")[0];var p=new MutationObserver(function(x){c.call(this,x,h)});var q=t(h.options);p.observe(l,q);h.observer=p;h.me=g});f.beforeRemoving(function(h){h.observer.disconnect()});this.bindEvent=function(h,l,p){l=e.mergeArrays(b,l);for(var q=e.toElementsArray(this), x=0;x<q.length;x++)f.addEvent(q[x],h,l,p)};this.unbindEvent=function(){var h=e.toElementsArray(this);f.removeEvent(function(l){for(var p=0;p<h.length;p++)if(this===m||l.target===h[p])return!0;return!1})};this.unbindEventWithSelectorOrCallback=function(h){var l=e.toElementsArray(this);f.removeEvent("function"===typeof h?function(p){for(var q=0;q<l.length;q++)if((this===m||p.target===l[q])&&p.callback===h)return!0;return!1}:function(p){for(var q=0;q<l.length;q++)if((this===m||p.target===l[q])&&p.selector=== h)return!0;return!1})};this.unbindEventWithSelectorAndCallback=function(h,l){var p=e.toElementsArray(this);f.removeEvent(function(q){for(var x=0;x<p.length;x++)if((this===m||q.target===p[x])&&q.selector===h&&q.callback===l)return!0;return!1})};return this},r=new function(){function t(g,b,h){return e.matchesSelector(g,b.selector)&&(g._id===m&&(g._id=y++),-1==b.firedElems.indexOf(g._id))?(b.firedElems.push(g._id),!0):!1}var c={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};r=new n(function(g){var b= {attributes:!1,childList:!0,subtree:!0};g.fireOnAttributesModification&&(b.attributes=!0);return b},function(g,b){g.forEach(function(h){var l=h.addedNodes,p=h.target,q=[];null!==l&&0<l.length?e.checkChildNodesRecursively(l,b,t,q):"attributes"===h.type&&t(p,b,q)&&q.push({callback:b.callback,elem:p});e.callCallbacks(q,b)})});var f=r.bindEvent;r.bindEvent=function(g,b,h){"undefined"===typeof h?(h=b,b=c):b=e.mergeArrays(c,b);var l=e.toElementsArray(this);if(b.existing){for(var p=[],q=0;q<l.length;q++)for(var x= l[q].querySelectorAll(g),z=0;z<x.length;z++)p.push({callback:h,elem:x[z]});if(b.onceOnly&&p.length)return h.call(p[0].elem,p[0].elem);setTimeout(e.callCallbacks,1,p)}f.call(this,g,b,h)};return r},v=new function(){function t(g,b){return e.matchesSelector(g,b.selector)}var c={};v=new n(function(){return{childList:!0,subtree:!0}},function(g,b){g.forEach(function(h){h=h.removedNodes;var l=[];null!==h&&0<h.length&&e.checkChildNodesRecursively(h,b,t,l);e.callCallbacks(l,b)})});var f=v.bindEvent;v.bindEvent= function(g,b,h){"undefined"===typeof h?(h=b,b=c):b=e.mergeArrays(c,b);f.call(this,g,b,h)};return v};d&&u(d.fn);u(HTMLElement.prototype);u(NodeList.prototype);u(HTMLCollection.prototype);u(HTMLDocument.prototype);u(Window.prototype);d={};k(r,d,"unbindAllArrive");k(v,d,"unbindAllLeave");return d}}(window,"undefined"===typeof jQuery?null:jQuery,void 0)};