1 2; /* Start:"a:4:{s:4:"full";s:113:"/local/templates/decoflora/components/bitrix/catalog.section/section_block_main_page/script.min.js?17832697436331";s:6:"source";s:94:"/local/templates/decoflora/components/bitrix/catalog.section/section_block_main_page/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3(function(){"use strict";if(!!window.JCCatalogSectionComponent)return;window.JCCatalogSectionComponent=function(params){this.formPosting=false;this.siteId=params.siteId||"";this.ajaxId=params.ajaxId||"";this.template=params.template||"";this.componentPath=params.componentPath||"";this.parameters=params.parameters||"";if(params.navParams){this.navParams={NavNum:params.navParams.NavNum||1,NavPageNomer:parseInt(params.navParams.NavPageNomer)||1,NavPageCount:parseInt(params.navParams.NavPageCount)||1}}this.bigData=params.bigData||{enabled:false};this.container=document.querySelector('[data-entity="'+params.container+'"]');this.showMoreButton=null;this.showMoreButtonMessage=null;if(this.bigData.enabled&&BX.util.object_keys(this.bigData.rows).length>0){BX.cookie_prefix=this.bigData.js.cookiePrefix||"";BX.cookie_domain=this.bigData.js.cookieDomain||"";BX.current_server_time=this.bigData.js.serverTime;BX.ready(BX.delegate(this.bigDataLoad,this))}if(params.initiallyShowHeader){BX.ready(BX.delegate(this.showHeader,this))}if(params.deferredLoad){BX.ready(BX.delegate(this.deferredLoad,this))}if(params.lazyLoad){this.showMoreButton=document.querySelector('[data-use="show-more-'+this.navParams.NavNum+'"]');this.showMoreButtonMessage=this.showMoreButton.innerHTML;BX.bind(this.showMoreButton,"click",BX.proxy(this.showMore,this))}if(params.loadOnScroll){BX.bind(window,"scroll",BX.proxy(this.loadOnScroll,this))}};window.JCCatalogSectionComponent.prototype={checkButton:function(){if(this.showMoreButton){if(this.navParams.NavPageNomer==this.navParams.NavPageCount){BX.remove(this.showMoreButton)}else{this.container.appendChild(this.showMoreButton)}}},enableButton:function(){if(this.showMoreButton){BX.removeClass(this.showMoreButton,"disabled");this.showMoreButton.innerHTML=this.showMoreButtonMessage}},disableButton:function(){if(this.showMoreButton){BX.addClass(this.showMoreButton,"disabled");this.showMoreButton.innerHTML=BX.message("BTN_MESSAGE_LAZY_LOAD_WAITER")}},loadOnScroll:function(){var scrollTop=BX.GetWindowScrollPos().scrollTop,containerBottom=BX.pos(this.container).bottom;if(scrollTop+window.innerHeight>containerBottom){this.showMore()}},showMore:function(){if(this.navParams.NavPageNomer<this.navParams.NavPageCount){var data={};data["action"]="showMore";data["PAGEN_"+this.navParams.NavNum]=this.navParams.NavPageNomer+1;if(!this.formPosting){this.formPosting=true;this.disableButton();this.sendRequest(data)}}},bigDataLoad:function(){var url="https://analytics.bitrix.info/crecoms/v1_0/recoms.php",data=BX.ajax.prepareData(this.bigData.params);if(data){url+=(url.indexOf("?")!==-1?"&":"?")+data}var onReady=BX.delegate(function(result){this.sendRequest({action:"deferredLoad",bigData:"Y",items:result&&result.items||[],rid:result&&result.id,count:this.bigData.count,rowsRange:this.bigData.rowsRange,shownIds:this.bigData.shownIds})},this);BX.ajax({method:"GET",dataType:"json",url:url,timeout:3,onsuccess:onReady,onfailure:onReady})},deferredLoad:function(){this.sendRequest({action:"deferredLoad"})},sendRequest:function(data){var defaultData={siteId:this.siteId,template:this.template,parameters:this.parameters};if(this.ajaxId){defaultData.AJAX_ID=this.ajaxId}BX.ajax({url:this.componentPath+"/ajax.php"+(document.location.href.indexOf("clear_cache=Y")!==-1?"?clear_cache=Y":""),method:"POST",dataType:"json",timeout:60,data:BX.merge(defaultData,data),onsuccess:BX.delegate(function(result){if(!result||!result.JS)return;BX.ajax.processScripts(BX.processHTML(result.JS).SCRIPT,false,BX.delegate(function(){this.showAction(result,data)},this))},this)})},showAction:function(result,data){if(!data)return;switch(data.action){case"showMore":this.processShowMoreAction(result);break;case"deferredLoad":this.processDeferredLoadAction(result,data.bigData==="Y");break}},processShowMoreAction:function(result){this.formPosting=false;this.enableButton();if(result){this.navParams.NavPageNomer++;this.processItems(result.items);this.processPagination(result.pagination);this.processEpilogue(result.epilogue);this.checkButton()}},processDeferredLoadAction:function(result,bigData){if(!result)return;var position=bigData?this.bigData.rows:{};this.processItems(result.items,BX.util.array_keys(position))},processItems:function(itemsHtml,position){if(!itemsHtml)return;var processed=BX.processHTML(itemsHtml,false),temporaryNode=BX.create("DIV");var items,k,origRows;temporaryNode.innerHTML=processed.HTML;items=temporaryNode.querySelectorAll('[data-entity="items-row"]');if(items.length){this.showHeader(true);for(k in items){if(items.hasOwnProperty(k)){origRows=position?this.container.querySelectorAll('[data-entity="items-row"]'):false;items[k].style.opacity=0;if(origRows&&BX.type.isDomNode(origRows[position[k]])){origRows[position[k]].parentNode.insertBefore(items[k],origRows[position[k]])}else{this.container.appendChild(items[k])}}}
3new BX.easing({duration:2e3,start:{opacity:0},finish:{opacity:100},transition:BX.easing.makeEaseOut(BX.easing.transitions.quad),step:function(state){for(var k in items){if(items.hasOwnProperty(k)){items[k].style.opacity=state.opacity/100}}},complete:function(){for(var k in items){if(items.hasOwnProperty(k)){items[k].removeAttribute("style")}}}}).animate()}BX.ajax.processScripts(processed.SCRIPT)},processPagination:function(paginationHtml){if(!paginationHtml)return;var pagination=document.querySelectorAll('[data-pagination-num="'+this.navParams.NavNum+'"]');for(var k in pagination){if(pagination.hasOwnProperty(k)){pagination[k].innerHTML=paginationHtml}}},processEpilogue:function(epilogueHtml){if(!epilogueHtml)return;var processed=BX.processHTML(epilogueHtml,false);BX.ajax.processScripts(processed.SCRIPT)},showHeader:function(animate){var parentNode=BX.findParent(this.container,{attr:{"data-entity":"parent-container"}}),header;if(parentNode&&BX.type.isDomNode(parentNode)){header=parentNode.querySelector('[data-entity="header"]');if(header&&header.getAttribute("data-showed")!="true"){header.style.display="";if(animate){new BX.easing({duration:2e3,start:{opacity:0}
3,finish:{opacity:100},transition:BX.easing.makeEaseOut(BX.easing.transitions.quad),step:function(state){header.style.opacity=state.opacity/100},complete:function(){header.removeAttribute("style");header.setAttribute("data-showed","true")}}).animate()}else{header.style.opacity=100}}}}}})(); 4/* End */ 5; 6; /* Start:"a:4:{s:4:"full";s:93:"/local/templates/decoflora/components/bitrix/catalog.item/card_block/script.js?17887860864901";s:6:"source";s:78:"/local/templates/decoflora/components/bitrix/catalog.item/card_block/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 7document.addEventListener("DOMContentLoaded", function () { 8 document.addEventListener("click", function (event) { 9 // ÐÑовеÑÑем клик 10 const button = event.target.closest(".js-add-to-cart"); 11 if (!button) return; 12 13 event.preventDefault(); 14 15 if (button.classList.contains("is-loading")) return; 16 button.classList.add("is-loading"); 17 18 const productId = button.dataset.productId; 19 20 // 1. ÐÑем ÑамÑй веÑÑ Ð½Ð¸Ð¹ обÑий конÑÐµÐ¹Ð½ÐµÑ ÐСÐРкаÑÑоÑки ÑоваÑа 21 const cardContainer = button.closest(".card-base"); 22 23 // 2. ÐÑем инпÑÑ Ð¢ÐÐЬÐРвнÑÑÑи ÑÑой конкÑеÑной каÑÑоÑки 24 const input = cardContainer 25 ? cardContainer.querySelector(".js-quantity") 26 : null; 27 28 // 3. СÑиÑÑваем знаÑение. ÐÑли инпÑÑ Ð½Ð°Ð¹Ð´ÐµÐ½, пÑинÑдиÑелÑно беÑем его ÑекÑÑее value 29 const quantity = input ? input.value : 1; 30 31 // ÐÐÐÐÐТРРÐÐШÐРСÐÐ ÐÐТРСТРÐÐУ ÐÐÐСÐÐÐ Ð ÐÐÐÐÐЬТРÐТÐТ ÐÐÐ ÐÐЯ ÐÐ ÐÐÐÐ ÐÐ: 32 console.log("ÐобавлÑем ÑÐ¾Ð²Ð°Ñ ID:", productId, "ÐолиÑеÑÑво:", quantity); 33 34 // --- ÐÐÐÐÐÐÐÐЯ ÐÐÐСЬ --- 35 36 // ÐÑ Ð¾ÑпÑавлÑем запÑÐ¾Ñ Ð½Ð° ÑекÑÑÑÑ ÑÑÑаниÑÑ (window.location.href), 37 // а не на оÑделÑнÑй Ñайл. 38 BX.ajax({ 39 method: "POST", 40 dataType: "json", // СÑандаÑÑнÑй ÑкÑен обÑÑно возвÑаÑÐ°ÐµÑ JSON, еÑли пеÑедан ajax_basket=Y 41 url: window.location.href, 42 data: { 43 action: "ADD2BASKET", // ÐагиÑеÑкое Ñлово Ð´Ð»Ñ ÐиÑÑикÑа 44 id: productId, // ID ÑоваÑа 45 quantity: quantity, // ÐолиÑеÑÑво 46 ajax_basket: "Y", // ÐовоÑим биÑÑикÑÑ Ð²ÐµÑнÑÑÑ JSON, а не HTML ÑÑÑаниÑÑ 47 sessid: BX.bitrix_sessid(), 48 via_ajax: "Y", 49 custom_action: "Y", 50 }, 51 onsuccess: function (response) { 52 button.classList.remove("is-loading"); 53 54 // СÑандаÑÑнÑй оÑÐ²ÐµÑ ÐиÑÑикÑа вÑглÑÐ´Ð¸Ñ Ð¿ÑимеÑно Ñак: 55 // { STATUS: "OK", MESSAGE: "Ð¢Ð¾Ð²Ð°Ñ ÑÑпеÑно добавлен...", ... } 56 57 if (response.STATUS === "OK") { 58 // 1. Уведомление 59 if (BX.UI && BX.UI.Notification) { 60 BX.UI.Notification.Center.notify({ 61 content: response.MESSAGE, // СообÑение беÑем из оÑвеÑа биÑÑикÑа 62 position: "top-center", 63 autoHideDelay: 1500, 64 closeButton: true, 65 }); 66 } else { 67 // ÐÑли ÑообÑение пÑиÑло HTML-ем, вÑÑезаем Ñеги Ð´Ð»Ñ alert 68 var msg = response.MESSAGE.replace(/<[^>]*>?/gm, ""); 69 alert(msg); 70 } 71 72 // 2. СиÑÑемное ÑобÑÑие 73 // Т.к. запÑÐ¾Ñ Ð¾Ð±ÑабоÑал ÑÑандаÑÑнÑй компоненÑ, он Ñам ÑбÑоÑил кÑÑ. 74 // ТепеÑÑ ÑÑо ÑобÑÑие гаÑанÑиÑованно Ð¾Ð±Ð½Ð¾Ð²Ð¸Ñ Ð¼Ð°Ð»ÑÑ ÐºÐ¾ÑзинÑ. 75 BX.onCustomEvent(window, "OnBasketChange"); 76 } else { 77 // ÐбÑабоÑка оÑибки 78 console.error(response); 79 var errorMsg = response.MESSAGE 80 ? response.MESSAGE 81 : "ÐÑибка добавлениÑ"; 82 // alert(errorMsg); 83 if (BX.UI && BX.UI.Notification) { 84 BX.UI.Notification.Center.notify({ 85 content: errorMsg, // СообÑение беÑем из оÑвеÑа биÑÑикÑа 86 position: "top-center", 87 autoHideDelay: 1500, 88 closeButton: true, 89 }); 90 } else { 91 // ÐÑли ÑообÑение пÑиÑло HTML-ем, вÑÑезаем Ñеги Ð´Ð»Ñ alert 92 var msg = errorMsg.replace(/<[^>]*>?/gm, ""); 93 alert(msg); 94 } 95 } 96 }, 97 onfailure: function () { 98 // ÐÑли ÑеÑÐ²ÐµÑ Ð²ÐµÑнÑл HTML вмеÑÑо JSON (бÑÐ²Ð°ÐµÑ Ð¿Ñи оÑÐ¸Ð±ÐºÐ°Ñ PHP), 99 // JS Ð¼Ð¾Ð¶ÐµÑ Ð¿Ð¾Ð¿Ð°ÑÑÑ ÑÑда или в success Ñ ÐºÑивÑм ÑоÑмаÑом. 100 button.classList.remove("is-loading"); 101 console.error("ÐÑибка запÑоÑа"); 102 // Ðногда ÐиÑÑÐ¸ÐºÑ Ð¿Ñи ajax_basket=Y возвÑаÑÐ°ÐµÑ Ð½ÐµÐ²Ð°Ð»Ð¸Ð´Ð½Ñй JSON еÑли еÑÑÑ Ð²Ð°ÑниÐ
102½Ð³Ð¸, 103 // поÑÑÐ¾Ð¼Ñ Ð¿ÑоÑÑо пеÑезагÑÑзим ÑÑÑаниÑÑ Ð² кÑайнем ÑлÑÑае, или покажем алеÑÑ. 104 alert("Ð¢Ð¾Ð²Ð°Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½ (пÑовеÑÑÑе коÑзинÑ)"); 105 BX.onCustomEvent(window, "OnBasketChange"); 106 }, 107 }); 108 }); 109}); 110 111/* End */ 112; 113; /* Start:"a:4:{s:4:"full";s:93:"/local/templates/decoflora/components/bitrix/news.list/block_reviews/script.js?17832697431190";s:6:"source";s:78:"/local/templates/decoflora/components/bitrix/news.list/block_reviews/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 114document.addEventListener('DOMContentLoaded', function() { 115 const initReviewExpander = () => { 116 const reviewItems = document.querySelectorAll('.js-review-item'); 117 reviewItems.forEach(item => { 118 if (item.dataset.expanderInit) return; 119 item.dataset.expanderInit = 'true'; 120 121 item.addEventListener('click', function() { 122 this.classList.toggle('is-expanded'); 123 const toggleBtn = this.querySelector('.js-review-toggle'); 124 if (toggleBtn) { 125 if (this.classList.contains('is-expanded')) { 126 toggleBtn.textContent = 'СвеÑнÑÑÑ'; 127 } else { 128 toggleBtn.textContent = 'ЧиÑаÑÑ Ð²ÐµÑÑ Ð¾ÑзÑв'; 129 } 130 } 131 132 const swiperContainer = this.closest('.swiper'); 133 if (swiperContainer && swiperContainer.swiper) { 134 swiperContainer.swiper.update(); 135 } 136 }); 137 }); 138 }; 139 140 initReviewExpander(); 141 142 if (typeof BX !== 'undefined') { 143 BX.addCustomEvent('onAjaxSuccess', initReviewExpander); 144 } 145}); 146/* End */ 147;; /* /local/templates/decoflora/components/bitrix/catalog.section/section_block_main_page/script.min.js?17832697436331*/ 148; /* /local/templates/decoflora/components/bitrix/catalog.item/card_block/script.js?17887860864901*/ 149; /* /local/templates/decoflora/components/bitrix/news.list/block_reviews/script.js?17832697431190*/
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.