Trending News
Saturday, July 2, 2022
Dwelling
Breaking News

Dwelling

window.addEventListener(t,e.userEventListener,e.eventOptions)))}_removeUserInteractionListener(e){this.triggerEvents.forEach((t=>window.removeEventListener(t,e.userEventListener,e.eventOptions)))}triggerListener(){this._removeUserInteractionListener(this),"loading"===doc.readyState?doc.addEventListener("DOMContentLoaded",this._loadEverythingNow.bind(this)):this._loadEverythingNow()}async _loadEverythingNow(){this._delayEventListeners(),this._delayJQueryReady(this),this._handleDocumentWrite(),this._registerAllDelayedScripts(),this._preloadAllScripts(),await this._loadScriptsFromList(this.delayedScripts.regular),await this._loadScriptsFromList(this.delayedScripts.defer),await this._loadScriptsFromList(this.delayedScripts.async),await this._triggerDOMContentLoaded(),await this._triggerWindowLoad(),window.dispatchEvent(new Occasion("rocket-allScriptsLoaded"))}_registerAllDelayedScripts(){doc.querySelectorAll("script[type=rocketlazyloadscript]").forEach((e=>"module"===e.getAttribute("data-rocket-type")?this.delayedScripts.defer.push(e):this.delayedScripts.regular.push(e):this.delayedScripts.regular.push(e)))}async _transformScript(e){return await this._requestAnimFrame(),new Promise((t=>{const n=doc.createElement("script");let r;[...e.attributes].forEach((e=>{let t=e.nodeName;"sort"!==t&&("data-rocket-type"===t&&(t="sort",r=e.nodeValue),n.setAttribute(t,e.nodeValue))})),e.hasAttribute("src")?(n.addEventListener("load",t),n.addEventListener("error",t)):(n.textual content=e.textual content,t()),e.parentNode.replaceChild(n,e)}))}async _loadScriptsFromList(e){const t=e.shift();return t?(await this._transformScript(t),this._loadScriptsFromList(e)):Promise.resolve()}_preloadAllScripts(){var e=doc.createDocumentFragment();[...this.delayedScripts.normal,...this.delayedScripts.defer,...this.delayedScripts.async].forEach((t=>{const n=t.getAttribute("src");if(n){const t=doc.createElement("hyperlink");t.href=n,t.rel="preload",t.as="script",e.appendChild(t)}})),doc.head.appendChild(e)}_delayEventListeners(){let e={};operate t(t,n){!operate(t){operate n(n){return e[t].eventsToRewrite.indexOf(n)>=0?"rocket-"+n:n}e[t]||(e[t]={originalFunctions:{add:t.addEventListener,take away:t.removeEventListener},eventsToRewrite:[]},t.addEventListener=operate(){arguments[0]=n(arguments[0]),e[t].originalFunctions.add.apply(t,arguments)},t.removeEventListener=operate(){arguments[0]=n(arguments[0]),e[t].originalFunctions.take away.apply(t,arguments)})}(t),e[t].eventsToRewrite.push(n)}operate n(e,t){let n=e[t];Object.defineProperty(e,t,{get:()=>n||operate(){},set(r){e["rocket"+t]=n=r}})}t(doc,"DOMContentLoaded"),t(window,"DOMContentLoaded"),t(window,"load"),t(window,"pageshow"),t(doc,"readystatechange"),n(doc,"onreadystatechange"),n(window,"onload"),n(window,"onpageshow")}_delayJQueryReady(e){let t=window.jQuery;Object.defineProperty(window,"jQuery",{get:()=>t,set(n){if(n&&n.fn&&!e.allJQueries.contains(n)){n.fn.prepared=n.fn.init.prototype.prepared=operate(t){e.domReadyFired?t.bind(doc)(n):doc.addEventListener("rocket-DOMContentLoaded",(()=>t.bind(doc)(n)))};const t=n.fn.on;n.fn.on=n.fn.init.prototype.on=operate(){if(this[0]===window){operate e(e)"string"==typeof…

0) { c_start = doc.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.size + 1; c_end=doc.cookie.indexOf(";", c_start); if (c_end==-1) c_end = doc.cookie.size; return unescape(doc.cookie.substring(c_start,c_end)); } } return ""; } operate setCookie(c_name, worth, expiredays) { //…