Your IP : 3.145.65.133


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/webpacker/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/webpacker/ui.webpacker.min.js

(function(){"use strict";if(typeof webPacker==="undefined"){return}var e=[];function t(t){this.name=t;e.push(this)}t.prototype={language:null,languages:[],messages:{},properties:{},setProperties:function(e){this.properties=e||{}},loadResources:function(e){return(e||[]).forEach(function(e){webPacker.resource.load(e,this)},this)},message:function(e){var t=this.messages;if(e in t){return t[e]}var n=this.language||"en";if(t[n]&&t[n][e]){return t[n][e]}n="en";if(t[n]&&t[n][e]){return t[n][e]}return""},getMessages:function(e){var t=e||this.language||"en";var n=this.messages;if(n[t]){return n[t]}t=this.language||"en";if(n[t]){return n[t]}if(n.en){return n.en}return n}};webPacker.getModule=function(e){return this.getModules().filter(function(t){return t.name===e})[0]};webPacker.getModules=function(){return e};webPacker.module=t;webPacker.getAddress=function(){return this.address};webPacker.resource={load:function(e,t){switch(e.type){case"css":this.loadCss(e.content);break;case"js":this.loadJs(e.content||e.src,!e.content);break;case"html":case"layout":if(t){var n=t.messages[t.language]?t.messages[t.language]:t.messages;for(var r in n){if(!n.hasOwnProperty(r)){continue}e.content=e.content.replace(new RegExp("%"+r+"%","g"),n[r])}}this.loadLayout(e.content);break}},loadLayout:function(e){if(!e){return}var t=document.createElement("DIV");t.innerHTML=e;document.body.insertBefore(t,document.body.firstChild)},loadJs:function(e,t,n){if(!e){return}var r=document.createElement("SCRIPT");r.setAttribute("type","text/javascript");r.setAttribute("async","");if(t){r.setAttribute("src",src)}else{if(webPacker.browser.isIE()){r.text=text}else{r.appendChild(document.createTextNode(e))}}this.appendToHead(r,!t&&n)},appendToHead:function(e,t){(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(e);if(t){document.head.removeChild(e)}},loadCss:function(e){if(!e){return}var t=document.createElement("STYLE");t.setAttribute("type","text/css");if(t.styleSheet){t.styleSheet.cssText=e}else{t.appendChild(document.createTextNode(e))}this.appendToHead(t)}};webPacker.type={isArray:function(e){return e&&Object.prototype.toString.call(e)==="[object Array]"},isString:function(e){return e===""?true:e?typeof e==="string"||e instanceof String:false},toArray:function(e){return Array.prototype.slice.call(e)}};webPacker.classes={change:function(e,t,n){e?n?this.add(e,t):this.remove(e,t):null},remove:function(e,t){e?e.classList.remove(t):null},add:function(e,t){e?e.classList.add(t):null},has:function(e,t){return e&&e.classList.contains(t)}};webPacker.url={};webPacker.url.parameter={list:null,get:function(e){var t=this.getObject();return t.hasOwnProperty(e)?decodeURIComponent(t[e]):null},has:function(e){var t=this.getObject();return t.hasOwnProperty(e)},getList:function(){if(this.list){return this.list}var e=window.location.search.substr(1);if(e.length<=1){return[]}this.list=e.split("&").map(function(e){var t=e.split("=");return{name:t[0],value:t[1]||""}},this);return this.list},getObject:function(){return this.getList().reduce(function(e,t){e[t.name]=t.value;return e},{})}};webPacker.ready=function(e){document.readyState==="complete"||document.readyState==="loaded"?e():this.addEventListener(window,"DOMContentLoaded",e)};webPacker.addEventListener=function(e,t,n){e=e||window;if(window.addEventListener){e.addEventListener(t,n,false)}else{e.attachEvent("on"+t,n)}};webPacker.event={listeners:[],on:function(e,t,n){this.listeners.filter(function(n){return n[0]===e&&n[1]===t}).forEach(function(e){e[2].apply(this,n)})},listen:function(e,t,n){this.listeners.push([e,t,n])}};webPacker.cookie={setItem:function(e,t,n){try{this.set(e,JSON.stringify(t),n)}catch(e){}},getItem:function(e){try{return JSON.parse(this.get(e))||null}catch(e){return null}},set:function(e,t,n){n=n||3600*24*365*10;var r=new Date((new Date).getTime()+1e3*n);document.cookie=e+"="+t+"; path=/; expires="+r.toUTCString()},get:function(e){var t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}};webPacker.ls={supported:null,removeItem:function(e){if(!this.isSupported())return;window.localStorage.removeItem(e)},setItem:function(e,t,n){if(!this.isSupported())return;try{if(n&&t&&typeof t==="object"){n=parseInt(n);t.cacheData={time:parseInt(Date.now()/1e3),ttl:isNaN(n)?3600:n}}window.localStorage.setItem(e,JSON.stringify(t))}catch(e){}},getItem:function(e,t){if(!this.isSupported())return null;try{var n=JSON.parse(window.localStorage.getItem(e))||null;if(t&&n&&typeof n==="object"&&n.cacheData){t=parseInt(t);t=t&&!isNaN(t)?t:n.cacheData.ttl;if(parseInt(Date.now()/1e3)>n.cacheData.time+t){n=null;this.removeItem(e)}}if(n&&typeof n==="object"){delete n.cacheData}return n}catch(e){return null}},isSupported:function(){if(this.supported===null){this.supported=false;try{var e="b24crm-x-test";window.localStorage.setItem(e,"x");window.localStorage.removeItem(e);this.supported=true}catch(e){}}return this.supported}};webPacker.browser={isIOS:function(){return/(iPad;)|(iPhone;)/i.test(navigator.userAgent)},isOpera:function(){return navigator.userAgent.toLowerCase().indexOf("opera")!==-1},isIE:function(){return document.attachEvent&&!this.isOpera()},isMobile:function(){return/(ipad|iphone|android|mobile|touch)/i.test(navigator.userAgent)}};webPacker.analytics={trackGa:function(e,t,n){if(window.gtag){if(e==="pageview"){if(window.dataLayer){var r=window.dataLayer.filter(function(e){return e[0]==="config"}).map(function(e){return e[1]});if(r.length>0){window.gtag("config",r[0],{page_path:t})}}}else if(e==="event"){window.gtag("event",n,{event_category:t})}}else if(window.dataLayer){if(e==="pageview"){window.dataLayer.push({event:"VirtualPageview",virtualPageURL:t})}else if(e==="event"){window.dataLayer.push({event:"crm-form",eventCategory:t,eventAction:n})}}else if(typeof window.ga==="function"){if(n){window.ga("send",e,t,n)}else{window.ga("send",e,t)}}},trackYa:function(e){if(!window["Ya"]){return}var t;if(Ya.Metrika&&Ya.Metrika.counters()[0]){t=Ya.Metrika.counters()[0].id}else if(Ya.Metrika2&&Ya.Metrika2.counters()[0]){t=Ya.Metrika2.counters()[0].id}if(t&&window["yaCounter"+t]){window["yaCounter"+t].reachGoal(e)}}}})();
//# sourceMappingURL=ui.webpacker.map.js