PageSourceSearch

https://maxgid.ru/assets/js/forushopcart-defer.js?

js maxgid.ru collected 2026-10-07 06:01:31 UTC 30,734 bytes, 1 lines download raw bytes

1angular.module("YepCom").directive("forushopcartDefer",function($timeout,$interval,toaster,$rootScope,$localStorage,$templateCache,$compile,ngDialog,Shoporders,$state,$ocLazyLoad,$window,Digiseller,md5,Usergroups,RandomString,Shopsite,ForuPolicy,$injector,$q,Templatesloader,$translate){return{restrict:"E",template:'<span class="b-shop-cart" id="forushop-cart" ng-click="openCartModal()" ng-class="shopsite_.shop_cart_position" ng-show="showCart"><img class="b-shop-cart__image" src="assets/images/shop/put-to-cart-w.svg" loading="lazy"> <span class="b-shop-cart__count">{{itemscount + vkItemscount+ digisellerItemscount}}</span></span>',scope:{forusiteid:"=",forupageid:"=",shoppage:"="},link:function(scope,element,attrs){$translate.onReady(function(){scope.rub=$translate.instant("rub"),scope.grn=$translate.instant("grn"),scope.tng=$translate.instant("tng"),scope.som=$translate.instant("som"),scope.sum=$translate.instant("sum"),scope.nalichnye=$translate.instant("nalichnye"),scope.oshibka=$translate.instant("oshibka"),scope.vvediteKorrektnyyEmail=$translate.instant("vvedite_korrektnyy_email"),scope.vvediteNomerTelefona=$translate.instant("vvedite_nomer_telefona"),scope.vvediteVasheImya=$translate.instant("vvedite_vashe_imya"),scope.takoyEmailUzheEst=$translate.instant("takoy_email_uzhe_est"),scope.esliVyUzheZaregistrirovanyVoyditeV=$translate.instant("esli_vy_uzhe_zaregistrirovany_voydite_v__"),scope.oformlenieZakazaProshloNeudachno=$translate.instant("oformlenie_zakaza_proshlo_neudachno"),scope.orderSuccessPayment=$translate.instant("order_success_payment"),scope.init()}),scope.$on("maskchange",function(evt,mask){scope.$apply(function(){scope.newMask=mask})}),scope.updateVkCart=function(){var item,_i,_len,_ref,_ref1,_results;for(scope.totalVkCartprice=0,_results=[],_i=scope.vkItemscount=0,_len=(_ref=scope.vkCartItems).length;_i<_len;_i++)item=_ref[_i],scope.totalVkCartprice+=(null!=item?item.amount:void 0)*(null!=item&&null!=(_ref1=item.product)?_ref1.price:void 0),_results.push(scope.vkItemscount+=null!=item?item.amount:void 0);return _results},scope.updateDigisellerCart=function(){var item,_i,_len,_ref,_ref1,_results;for(scope.totalDigisellerCartprice=0,_results=[],_i=scope.digisellerItemscount=0,_len=(_ref=scope.digisellerCartItems).length;_i<_len;_i++)item=_ref[_i],scope.totalDigisellerCartprice+=(null!=item?item.amount:void 0)*(null!=item&&null!=(_ref1=item.product)?_ref1.price:void 0),_results.push(scope.digisellerItemscount+=null!=item?item.amount:void 0);return _results},scope.openCartModal=function(){var _ref;scope.updateVkCart(),scope.updateDigisellerCart(),$ocLazyLoad.load({cache:!0},{name:"foru-quantity-input.js",files:["/assets/js/foru-quantity-input.js?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))]}).then(function(){return ngDialog.open({template:"/assets/templates-public/preview/shopcart-modal/shopcart-modal.html?"+(window.yepbuildversion||Math.floor(1e8*Math.random())),className:"t-modal t-modal--shop-cart",showClose:!0,closeByEscape:!0,closeByDocument:!0,scope:scope}),scope.showaddrfield=null!=(_ref=scope.$parent)&&null!=(_ref=_ref.site)&&null!=(_ref=_ref.shopsite)?_ref.showaddrfield:void 0})},scope.alreadycartitem=function(prodid,color){for(var item,i=0;i<$localStorage.cartItems.length;){if((item=$localStorage.cartItems[i]).id===prodid&&item.color===color)return!0;i++}},scope.alreadycartitem___=function(prodid,color){var i,item,index=-1;for(i in scope.cartItems)(item=scope.cartItems[i]).id===prodid&&item.color===color&&(index=i);return index},scope.alreadycartitem_=function(prodid,color){var item,i=0;if(i<$localStorage.cartItems.length)return(item=$localStorage.cartItems[i]).id===prodid&&item.color===color||(i++,!1)},scope.getTotalCart=function(){if(scope.forusiteid){for(var cartItems=$localStorage.cartItems,orderItems=[],_i=scope.itemscount=0;cartItems.length>_i;_i++){var itm=cartItems[_i],newitem={id:itm.id,order_quantity:itm.cartquantity,color:itm.color};scope.itemscount+=parseFloat(itm.cartquantity),orderItems.push(newitem)}return Shoporders.calculateOrder(scope.forusiteid,null,null,null,orderItems,null,null,null,null,null).then(function(res){scope.totalcartprice=res.orderprice,scope.showCart=!0}),0}},scope.getCartItemTotalPrice=function(itmid,price,quantity){for(var itm,_ref=$localStorage.cartItems,_i=0,_len=_ref.length;_i<_len;_i++)(itm=_ref[_i]).id===itmid&&(itm.cartitemtotal=parseFloat(price)*parseFloat(quantity));return scope.getTotalCart()},scope.getCartItemTotalPriceAlt=function(){for(var itm,_ref=$localStorage.cartItems,_i=0,_len=_ref.length;_i<_len;_i++)(itm=_ref[_i]).cartquantity||(itm.cartquantity=0),itm.cartquantity=parseInt(itm.cartquantity,10),itm.cartquantity||(itm.cartquantity=0),itm.cartitemtotal=parseFloat(itm.price)*parseFloat(itm.cartquantity);return scope.getTotalCart()},scope.removeCartItem=function(itmid){var removingitm=$localStorage.cartItems.filter(function(obj){return obj.id===itmid}),removingitm=$localStorage.cartItems.indexOf(removingitm[0]);return $localStorage.cartItems.splice(removingitm,1),scope.getTotalCart()},scope.removeCartItemDigiseller=function(itmid){var removingitm=$localStorage.digisellerCartItems.filter(function(obj){return obj.id===itmid}),removingitm=$localStorage.digisellerCartItems.indexOf(removingitm[0]);return $localStorage.digisellerCartItems.splice(removingitm,1),scope.updateDigisellerCart()},scope.removeCartItemVk=function(itmid){var removingitm=$localStorage.vkCartItems.filter(function(obj){return obj.id===itmid}),removingitm=$localStorage.vkCartItems.indexOf(removingitm[0]);$localStorage.vkCartItems.splice(removingitm,1),scope.updateVkCart()},scope.addToCartSilent=function(product){if(product.cartquantity=product.order_quantity,product.color&&product.colors&&0<product.colors.length){for(var colorText=null,i=0;i<product.colors.length;i++){var splt=product.colors[i].split(";");1<splt.length&&splt[0]==product.color&&(colorText=splt[1])}colorText&&(product.colorText=colorText)}if(0<$localStorage.cartItems.length)if(scope.alreadycartitem(product.id,product.color))for(var cartItems=$localStorage.cartItems,i=0;i<cartItems.length;i++){var itm=cartItems[i];itm.id===product.id&&itm.color===product.color&&(itm.cartquantity=itm.cartquantity+product.cartquantity)}else $localStorage.cartItems.push(angular.copy(product));else $localStorage.cartItems.push(angular.copy(product))},scope.addToCart=function(product,quantity){var itm,_i,_len,_ref;if(product.cartquantity=quantity=quantity||1,0<$localStorage.cartItems.length)if(scope.alreadycartitem(product.id,product.color))for(_i=0,_len=(_ref=$localStorage.cartItems).length;_i<_len;_i++)(itm=_ref[_i]).id===product.id&&itm.color===product.color&&(itm.cartquantity=itm.cartquantity+quantity,scope.getCartItemTotalPriceAlt());else $localStorage.cartItems.push(angular.copy(product)),scope.getCartItemTotalPriceAlt();else $localStorage.cartItems.push(angular.copy(product)),scope.getCartItemTotalPriceAlt();return scope.openCartModal(),scope.cartItems=$localStorage.cartItems},scope.addToCart__=function(product,quantity){var indexColor;return null==quantity&&(quantity=1),-1<(indexColor=_.findIndex(scope.cartItems,function(o){return o.color===product.color&&o.id===product.id}))?scope.cartItems[indexColor].cartquantity+=quantity:(product.cartquantity=quantity,scope.cartItems.push(angular.copy(product)),scope.getCartItemTotalPrice(product.id,product.price,quantity)),$localStorage.cartItems=scope.cartItems,scope.openCartModal()},scope.addToCart__=function(product,quantity){var indexColor;return product.cartquantity=quantity=quantity||1,0<$localStorage.cartItems.length?(scope.cartItems=$localStorage.cartItems,-1<(indexColor=scope.alreadycartitem(product.id,product.color))&&(scope.cartItems[indexColor].cartquantity+=quantity,$localStorage.cartItems=scope.cartItems)):($localStorage.cartItems.push(product),scope.getCartItemTotalPrice(product.id,product.price,quantity)),scope.openCartModal(),scope.cartItems=$localStorage.cartItems},scope.$on("showCartEvent",function(event){return scope.openCartModal()}),$rootScope.$on("showCartEvent",function(event){return scope.vkCartItems=$localStorage.vkCartItems,scope.digisellerCartItems=$localStorage.digisellerCartItems,scope.openCartModal()}),scope.$on("addToCartEvent",function(event,product){return scope.addToCart(product,1)}
1),$rootScope.$on("addToCartAlltEvent",function(event,items){for(var i=0;i<items.length;i++)scope.addToCartSilent(items[i]);scope.getCartItemTotalPriceAlt(),scope.cartItems=$localStorage.cartItems,scope.openCartModal()}),scope.$on("$destroy",function(event){return scope.listener()}),scope.listener=$rootScope.$on("addToCartEvent",function(event,product,quantity){return scope.addToCart(product,quantity)}),scope.getShopPaymentMethods=function(){$ocLazyLoad.load({cache:!0},{name:"shoppaymentsystems.js",files:["/assets/js/services/shoppaymentsystems.js?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))]}).then(function(){$injector.get("Shoppaymentsystems").previewGetAllPaymentMethods(scope.forusiteid).then(function(res){var cashMethod;0==res.length?(cashMethod={paymentgw:{name:"cash",prname:scope.nalichnye}},scope.paymentmethods=[],scope.paymentmethods.push(cashMethod),scope.checkedmethod=cashMethod.paymentgw.name):(scope.paymentmethods=res,scope.checkedmethod=res[0].paymentgw.name)})})},scope.setNewCheckedmethod=function(val){return scope.checkedmethod=val},scope.loadPlaces=function(){return $timeout(function(){return $ocLazyLoad.load({name:"places.js",files:["/assets/js/places.js?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))]}).then(function(res){try{return places({appId:"plWKPLNSGBZF",apiKey:"1ffd235eb236e2ba321f9dc67019ee83",container:document.querySelector("#deliveryaddressAutocomplete")}
1).on("change",function(e){})}catch(_error){0}})},1200)},scope.openLoginWindow=function(){var checkinterval,mywindow=$window.open("/sitespace/memberslogin","_blank","width=700,height=600");return checkinterval=$interval(function(){if("/sitespace/memberspages"===mywindow.location.pathname)return mywindow.close(),checkinterval&&$interval.cancel(checkinterval),scope.$emit("refreshCheckUser",!0)},3e3)},scope.refreshUserData=function(){var _ref;return scope.$parent&&scope.$parent.hasOwnProperty("userData")&&(scope.userData=scope.$parent.userData),scope.$parent&&scope.$parent.$parent&&scope.$parent.$parent.$parent&&scope.$parent.$parent.$parent.hasOwnProperty("userData")&&(scope.userData=scope.$parent.$parent.$parent.userData),scope.newEmailShowMsg=!1,scope.userData?(scope.registerMe=!1,scope.userData.name&&(scope.customername=scope.userData.name),scope.userData.email&&(scope.customeremail=scope.userData.email),scope.userData.avatar_url?scope.currentAuthorAvatar=null!=(_ref=scope.userData)?_ref.avatar_url:void 0:scope.currentAuthorAvatar="https://gravatar.com/avatar/"+md5.createHash(null!=(_ref=scope.userData)?_ref.email:void 0)+"?d=https://fo.ru/img/userimage.png"):scope.hasuserspace?scope.registerMe=!0:void 0},scope.$on("refreshUserData",function(){return scope.refreshUserData()}),scope.addNewOrder=function(){ngDialog.closeAll(),scope.getShopSiteInPreview(),scope.getShopPaymentMethods(),scope.$parent&&scope.$parent.site&&scope.$parent.site.hasOwnProperty("hasuserspace")&&(scope.hasuserspace=scope.$parent.site.hasuserspace),scope.$parent&&scope.$parent.$parent&&scope.$parent.$parent.$parent&&scope.$parent.$parent.$parent.site&&scope.$parent.$parent.$parent.site.hasuserspace&&(scope.hasuserspace=scope.$parent.$parent.$parent.site.hasuserspace),scope.$emit("refreshCheckUser",!0),$ocLazyLoad.load({cache:!0},{name:"intltelinput.js",files:["/assets/js/intltelinput.js?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))]}).then(function(){if(ngDialog.open({template:"/assets/templates-public/preview/createorder-modal/createorder-modal.html?"+(window.yepbuildversion||Math.floor(1e8*Math.random())),className:"t-modal t-modal--shop-create-order",showClose:!0,closeByEscape:!0,closeByDocument:!0,scope:scope}),scope.showaddrfield)return scope.loadPlaces()})},scope.closeDialog=function(){ngDialog.closeAll()},scope.loadStyles=function(){$ocLazyLoad.load({files:["/assets/stylesheets/c-radio-button-shop-preview.css?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))]})},scope.calculateOrder=function(){for(var orderItems=[],_i=0;scope.cartItems.length>_i;_i++){var itm=scope.cartItems[_i],itm={id:itm.id,order_quantity:itm.cartquantity,color:itm.color};orderItems.push(itm)}Shoporders.calculateOrder(scope.forusiteid,null,null,null,orderItems,null,null,null,scope.selectedDeliveryMethod._id.$oid,null).then(function(res){scope.totalcartprice=res.price})},scope.getDeliveryMethodsInPreview=function(){scope.selectedDeliveryMethod=void 0,Shopsite.getDeliveryMethodsInPreview().then(function(res){if(0<res.length){scope.loadStyles(),scope.orderDeliverymethods=res||[];for(var i=0;i<scope.orderDeliverymethods.length;i++)scope.orderDeliverymethods[i]&&scope.orderDeliverymethods[i].defaultmethod&&1==scope.orderDeliverymethods[i].defaultmethod?(scope.orderDeliverymethods[i].checked=!0,scope.selectedDeliveryMethod=scope.orderDeliverymethods[i]):scope.orderDeliverymethods[i].checked=!1;!scope.selectedDeliveryMethod&&0<scope.orderDeliverymethods.length&&(scope.orderDeliverymethods[0].checked=!0,scope.selectedDeliveryMethod=scope.orderDeliverymethods[0]),scope.calculateOrder()}})},scope.getShopSiteInPreview=function(){scope.checkPolicy(),Shopsite.getShopSiteInPreview().then(function(res){scope.getDeliveryMethodsInPreview(),res.orderform&&0<res.orderform.length&&(scope.orderFormFields=res.orderform||[],0!=scope.orderFormFields.filter(function(obj){return obj.required}).length)||(scope.pol3=!0)})},scope.changeSelectedDeliveryMethod=function(delivery_method){scope.selectedDeliveryMethod.checked=!1,delivery_method.checked=!0,scope.selectedDeliveryMethod=delivery_method,scope.calculateOrder()},scope.afterOrder=function(){return $localStorage.cartItems=[],$localStorage.vkCartItems=[],scope.cartItems=[],scope.vkCartItems=[],scope.itemscount=0,scope.vkItemscount=0,scope.totalcartprice=0,ngDialog.closeAll(),ngDialog.open({template:"/assets/templates-public/preview/ordernumber-modal/ordernumber-modal.html?"+(window.yepbuildversion||Math.floor(1e8*Math.random())),className:"t-modal t-modal--shop-order-number",showClose:!0,closeByEscape:!0,closeByDocument:!0,scope:scope})}
1,scope.afterForuOrder=function(order,checkedmethod){order.yepstore_order_id,scope.ordernumber=order.yepstore_order_id,scope.orderprice=order.price,scope.url=window.location.protocol+"//"+window.location.host+"/",scope.successurl=scope.url+"/api/v1/shoppayments/successpayment",scope.failurl=scope.url+"/api/v1/shoppayments/failpayment",scope.notifyurl=scope.url+"/api/v1/shoppayments/paymaster",checkedmethod&&"paymaster"===checkedmethod&&Templatesloader.load("/assets/templates-public/preview/paymasterform/paymasterform.html?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))).then(function(res_){200==res_.status&&$compile(res_.data.toString())(scope,function(newelem){var form;return $(scope.pmwindow.document.body).html(newelem),form=$(scope.pmwindow.document.body).find("#paymasterform"),$timeout(function(){return form.submit()},0)})})},scope.createOrder=function(customername,customeremail,customernumber,cartItems,checkedmethod,deliveryaddress,comments,countryData,registerMe,delivery_variant,order_form){null==checkedmethod&&(checkedmethod=null);var delivery_methods=[];if(delivery_variant&&delivery_methods.push(delivery_variant),customeremail)if(customernumber){if(customername)return $localStorage.cartCustomerData={customername:customername,customeremail:customeremail,customernumber:customernumber},registerMe?Usergroups.checkMember(customeremail).then(function(res){return res.res?(toaster.pop("warning",scope.takoyEmailUzheEst,scope.esliVyUzheZaregistrirovanyVoyditeV),scope.newEmailShowMsg=!0):Usergroups.registerMember(customeremail,RandomString.generateRandomString(12)).then(function(res){return scope.$emit("refreshCheckUser",!0),customeremail=res.email,scope.createOrder_(customername,customeremail,customernumber,cartItems,checkedmethod,deliveryaddress,comments,delivery_methods,order_form)})}):scope.createOrder_(customername,customeremail,customernumber,cartItems,checkedmethod,deliveryaddress,comments,delivery_methods,order_form);$timeout(function(){return toaster.pop("error",scope.oshibka+"!",scope.vvediteVasheImya+"!")},0)}else $timeout(function(){return toaster.pop("error",scope.oshibka+"!",scope.vvediteNomerTelefona+"!")},0);else $timeout(function(){return toaster.pop("error",scope.oshibka+"!",scope.vvediteKorrektnyyEmail+"!")},0)},scope.vkPromise=function(customernumber,customeremail,customername,vkOrderItems,comments){var defer=$q.defer();return $ocLazyLoad.load({cache:!0},{name:"vkinfo.js",files:["/assets/js/services/vkinfo.js?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))]}).then(function(){var VkInfo=$injector.get("VkInfo");defer.resolve(VkInfo.createOrder(customernumber,customeremail,customername,vkOrderItems,comments))}),defer.promise},scope.setSmfData=function(rate){scope.foruOrderPromise.then(function(data){scope.smf_orderid=data.yepstore_order_id;var orderamount=Math.round(data.price/rate*100)/100;orderamount=(orderamount=orderamount.toString()).replace(".",","),scope.smf_orderamount=orderamount,scope.smf_userwmpurse=scope.currentpm.ident,scope.smf_resulturl=$window.location.origin+"/api/v1/shoppayments/webmoney",scope.smf_id=data._id.$oid}),scope.failpayment="",scope.$parent&&scope.$parent.domain&&(scope.failpayment="https://"+scope.$parent.domain+"/failpayment"),scope.$parent&&scope.$parent.$parent&&scope.$parent.$parent.domain&&(scope.failpayment="https://"+scope.$parent.$parent.domain+"/failpayment"),scope.$parent&&scope.$parent.$parent&&scope.$parent.$parent.$parent&&scope.$parent.$parent.$parent.domain&&(scope.failpayment="https://"+scope.$parent.$parent.$parent.domain+"/failpayment"),Templatesloader.load("/assets/templates-public/preview/shopmerchantform/shopmerchantform.html?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))).then(function(res_){200==res_.status&&$compile(res_.data.toString())(scope,function(shopmerchantform){$(scope.pmwindow.document.body).html(shopmerchantform);var form=$(scope.pmwindow.document.body).find("#shopmerchantform");$timeout(function(){return form.submit()},1e3)})}),$interval(function(){return Shoporders.checkOrderMerchantPayment(scope.smf_id).then(function(res){if(res.state)return scope.waitingforpayment=!1,scope.afterOrder()})},1e4)},scope.afterPyment=function(){},scope.payYookassa=function(orderuuid,oid){try{$injector.get("Shoppaymentsystems").payYookassa(orderuuid).then(function(payData){scope.pmwindow.location=payData.redirect_url,scope.paymYooInt=$interval(function(){Shoporders.checkOrderMerchantPayment(oid).then(function(res){res.state&&($interval.cancel(scope.paymYooInt),scope.waitingforpayment=!1,scope.pmwindow.close(),ngDialog.closeAll(),toaster.pop("success","",scope.orderSuccessPayment))})},1e4)})}catch(e){toaster.pop("error",scope.oshibka+"!",scope.oformlenieZakazaProshloNeudachno)}},scope.createOrder_=function(customername,customeremail,customernumber,cartItems,checkedmethod,deliveryaddress,comments,delivery_methods,order_form){null==checkedmethod&&(checkedmethod=null),scope.__checkedmethod=checkedmethod,scope.shoppingcartitems=[];for(var digisellerOrderItems,methodrusname,paymInt,vkOrderItems,_j,_k,_len1,_len2,_ref,_ref1,checkPmWindowInterval,waitmsgTempl,orderItems=[],_i=0,_len=cartItems.length;_i<_len;_i++){var itm=cartItems[_i],newitem={id:itm.id,order_quantity:itm.cartquantity,color:itm.color};orderItems.push(newitem),scope.shoppingcartitems.push({index:_i,name:itm.name,qty:itm.cartquantity,price:itm.price,tax:"no_vat"})}for(checkedmethod&&(scope.currentpm=scope.paymentmethods.filter(function(obj){return obj.paymentgw.name===checkedmethod})[0],methodrusname=scope.currentpm.paymentgw.name,"cash"!==checkedmethod
1)&&(scope.sitename=window.location.hostname,scope.pmwindow=window.open("","_blank","width=900,height=800"),waitmsgTempl=$templateCache.get("preview/waitmsg/waitmsg.html"),$compile(waitmsgTempl.toString())(scope,function(waitMsg){$(scope.pmwindow.document.body).html(waitMsg)}),checkPmWindowInterval=$interval(function(){scope.pmwindow.closed&&(scope.smf_orderid=null,scope.smf_orderamount=null,scope.smf_userwmpurse=null,scope.smf_id=null,scope.waitingforpayment=!1,$interval.cancel(checkPmWindowInterval))},3e3)),0<orderItems.length&&(waitmsgTempl=null,scope.selectedDeliveryMethod&&scope.selectedDeliveryMethod._id&&scope.selectedDeliveryMethod._id.$oid&&(waitmsgTempl=scope.selectedDeliveryMethod._id.$oid),scope.foruOrderPromise=Shoporders.createWithDelivery(scope.forusiteid,customername,customeremail,customernumber,orderItems,methodrusname,deliveryaddress,comments,waitmsgTempl,order_form),"merchant"===checkedmethod&&(scope.waitingforpayment=!0,"rub"==scope.currentCurrencyVal&&(0==scope.shopsite_.sourceratecurrency&&Shoporders.getRateCurrentCurrency("USD").then(function(rate){0!==rate&&scope.setSmfData(rate)}),1==scope.shopsite_.sourceratecurrency)&&scope.shopsite_.customratevalue?scope.setSmfData(scope.shopsite_.customratevalue):scope.setSmfData(1)),"robokassa"===checkedmethod&&(scope.waitingforpayment=!0,scope.foruOrderPromise.then(function(data){return scope.srf_orderid=data.yepstore_order_id,scope.srf_orderamount=data.price,scope.srf_userlogin=scope.currentpm.ident,scope.srf_userpass=scope.currentpm.key,scope.srf_id=data._id.$oid,scope.srf_md5hash=md5.createHash(scope.srf_userlogin+":"+scope.srf_orderamount+":"+scope.srf_orderid+":"+scope.srf_userpass)}),Templatesloader.load("/assets/templates-public/preview/shoprobokassaform/shoprobokassaform.html?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))).then(function(res_){200==res_.status&&($compile(res_.data.toString())(scope,function(shoprobokassaform){$(scope.pmwindow.document.body).html(shoprobokassaform);var form=$(scope.pmwindow.document.body).find("#shoprobokassaform");$timeout(function(){return form.submit()},1e3)}),paymInt=$interval(function(){return Shoporders.checkOrderMerchantPayment(scope.srf_id
1).then(function(res){if(res.state)return $interval.cancel(paymInt),scope.waitingforpayment=!1,scope.afterOrder()})},1e4))})),"yookassa"===checkedmethod)&&scope.foruOrderPromise.then(function(data){scope.payYookassa(data.orderuuid,data._id.$oid)}),vkOrderItems=[],_j=0,_len1=(_ref=scope.vkCartItems).length;_j<_len1;_j++)item=_ref[_j],vkOrderItems.push({id:item.id,order_quantity:item.amount,price:item.product.price});for(0<vkOrderItems.length&&(scope.vkOrderPromise=scope.vkPromise(customernumber,customeremail,customername,vkOrderItems,comments)),digisellerOrderItems=[],_k=0,_len2=(_ref1=scope.digisellerCartItems).length;_k<_len2;_k++){var item=_ref1[_k];digisellerOrderItems.push({id:item.id,cnt:item.amount,curr:"RUR"})}if(0<digisellerOrderItems.length&&(scope.digisellerPaymentWindow=$window.open("","_blank","width=900,height=800"),Digiseller.createOrder(customeremail,digisellerOrderItems).then(function(res){res='<form id="digiselller_form" action="https://www.oplata.info/asp2/pay.asp" method="post">\x3c!--<input type="hidden" name="id_d" value="261240" />--\x3e'+"<input type='hidden' name='cart_uid' value='"+res.cart_id+"' /><input type=\"hidden\" name=\"typecurr\" value=\"WMR\" /><input type='hidden' name='email' value='"+customeremail+'\' /><input type="hidden" name="lang" value="ru-RU" /><input type="hidden" name="failpage" value="http://plati.ru/itm/world-of-warcraft-legion-euro-multilang-podarok/2038820" /><input type="hidden" name="agent" value="1" /><input type="hidden" name="promocode" value="" /><input type="hidden" name="unit_cnt" value="" /></form>';return scope.digisellerPaymentWindow.document.open().write(res),$timeout(function(){return scope.digisellerPaymentWindow.document.forms.digiselller_form.submit()},2e3)}
1).catch(function(error){scope.digisellerPaymentWindow.close(),toaster.pop("error",scope.oshibka+"!",scope.oformlenieZakazaProshloNeudachno)})),0<orderItems.length&&0<vkOrderItems.length&&Promise.all([scope.foruOrderPromise,scope.vkOrderPromise,scope.digisellerOrderPromise]).then(function(arrayOfResults){return scope.afterForuOrder(arrayOfResults[0],scope.__checkedmethod),scope.afterOrder()}),0<orderItems.length&&0===vkOrderItems.length&&scope.foruOrderPromise.then(function(data){return scope.afterForuOrder(data,scope.__checkedmethod),scope.afterOrder()}),0===orderItems.length&&0<vkOrderItems.length)return scope.vkOrderPromise.then(function(data){if(data.vk_order_id&&(scope.ordernumber=data.vk_order_id),"merchant"!==checkedmethod)return"robokassa"===checkedmethod&&(scope.waitingforpayment=!0,scope.srf_orderid=scope.ordernumber,scope.srf_orderamount=data.price,scope.srf_userlogin=scope.currentpm.ident,scope.srf_userpass=scope.currentpm.key,scope.srf_id=data._id.$oid,scope.srf_md5hash=md5.createHash(scope.srf_userlogin+":"+scope.srf_orderamount+":"+scope.srf_orderid+":"+scope.srf_userpass),Templatesloader.load("/assets/templates-public/preview/shoprobokassaform/shoprobokassaform.html?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))).then(function(res_){200==res_.status&&($compile(res_.data.toString())(scope,function(shoprobokassaform){var form;return $(scope.pmwindow.document.body).html(shoprobokassaform),form=$(scope.pmwindow.document.body).find("#shoprobokassaform"),$timeout(function(){return form.submit()},1e3)}),paymInt=$interval(function(){return Shoporders.checkOrderMerchantPayment(scope.srf_id
1).then(function(res){if(res.state)return $interval.cancel(paymInt),scope.waitingforpayment=!1,scope.afterOrder()})},1e4))})),"yookassa"===checkedmethod&&scope.foruOrderPromise.then(function(data){scope.payYookassa(data.orderuuid,data._id.$oid)}),"robokassa"!==checkedmethod&&"merchant"!==checkedmethod&&"yookassa"!==checkedmethod?scope.afterOrder():void 0;scope.waitingforpayment=!0,scope.smf_orderid=scope.ordernumber,scope.smf_orderamount=data.price,scope.smf_userwmpurse=scope.currentpm.ident,scope.smf_resulturl=$window.location.origin+"/api/v1/shoppayments/webmoney",scope.smf_id=data._id.$oid,scope.failpayment="https://"+scope.$parent.domain+"/failpayment",Templatesloader.load("/assets/templates-public/preview/shopmerchantform/shopmerchantform.html?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))).then(function(res_){200==res_.status&&$compile(res_.data.toString())(scope,function(shopmerchantform){var form;return $(scope.pmwindow.document.body).html(shopmerchantform),form=$(scope.pmwindow.document.body).find("#shopmerchantform"),$timeout(function(){return form.submit()},1e3)})}),$interval(function(){return Shoporders.checkOrderMerchantPayment(scope.smf_id).then(function(res){if(res.state)return scope.waitingforpayment=!1,scope.afterOrder()})},1e4)})},scope.checkRequiredFields=function(){var isRequired=scope.orderFormFields.filter(function(obj){return obj.required}),isChecked=scope.orderFormFields.filter(function(obj){return obj.value&&obj.required});!(0<isRequired.length)||isChecked.length==isRequired.length?scope.pol3=!0:scope.pol3=!1,scope.customerCheckedFields=scope.orderFormFields.filter(function(obj){return obj.value})},scope.checkPolicy=function(){ForuPolicy.checkPolicy().then(function(res){res&&(scope.privacyUrl="/foru-privacy/privacy")})},scope.init=function(){scope.shoppage&&$ocLazyLoad.load({files:["/assets/utils.js","/assets/intlTelInput.js?min"]}),$localStorage.vkCartItems||($localStorage.vkCartItems=[]),$localStorage.digisellerCartItems||($localStorage.digisellerCartItems=[]),scope.$storage=$localStorage,scope.cartItems=$localStorage.cartItems,scope.vkCartItems=$localStorage.vkCartItems,scope.digisellerCartItems=$localStorage.digisellerCartItems,scope.totalVkCartprice=0,scope.totalDigisellerCartprice=0,scope.currentstate=$state.current.name,scope.prodquantity=1,scope.totalcartprice=0,scope.itemscount=0,scope.vkItemscount=0,scope.digisellerItemscount=0,scope.checkedmethod=void 0,scope.newMask="(999) 999-99-99",scope.foruOrderPromise={},scope.vkOrderPromise={},scope.digisellerOrderPromise={},scope.waitingforpayment=!1,scope.currentCurrencyName=scope.rub,scope.currentCurrencyVal="rub",scope.currencyList=[{val:"rub",name:scope.rub},{val:"usd",name:"usd"},{val:"eur",name:"eur"},{val:"UAH",name:scope.grn},{val:"KZT",name:scope.tng},{val:"KGS",name:scope.som},{val:"UZ",name:scope.sum}],scope.pol1=!1,scope.privacyUrl="https://fo.ru/blog/politika-konfidentsialnosti/",scope.showaddrfield=!1,scope.deliveryaddress="",scope.comments="",scope.registerMe=!1,scope.orderDeliverymethods=[],scope.orderFormFields=[],scope.selectedDeliveryMethod=void 0,scope.pol3=!1,scope.customerCheckedFields=[],scope.showCart=!1,$localStorage.cartCustomerData&&(scope.customername=$localStorage.cartCustomerData.customername,scope.customeremail=$localStorage.cartCustomerData.customeremail,scope.customernumber=$localStorage.cartCustomerData.customernumber),$localStorage.cartItems||($localStorage.cartItems=[]),$localStorage.vkCartItems||($localStorage.vkCartItems=[]),$localStorage.digisellerCartItems||($localStorage.digisellerCartItems=[]),scope.checkInterval=$interval(function(){var index,currency="rub";scope.$parent&&scope.$parent.$parent&&scope.$parent.$parent.shopsite&&(scope.shopsite_=scope.$parent.$parent.shopsite),scope.$parent&&scope.$parent.$parent&&scope.$parent.$parent.$parent&&scope.$parent.$parent.$parent.site&&scope.$parent.$parent.$parent.site.shopsite&&(scope.shopsite_=scope.$parent.$parent.$parent.site.shopsite),scope.$parent&&scope.$parent.$parent&&scope.$parent.$parent.shopsite&&scope.$parent.$parent.shopsite.currency&&(currency=scope.$parent.$parent.shopsite.currency),(currency=scope.$parent&&scope.$parent.$parent&&scope.$parent.$parent.$parent&&scope.$parent.$parent.$parent.site&&scope.$parent.$parent.$parent.site.shopsite&&scope.$parent.$parent.$parent.site.shopsite.currency?scope.$parent.$parent.$parent.site.shopsite.currency:currency)&&-1<(index=_.findIndex(scope.currencyList,function(o){return o.val===currency}
1))&&(scope.currentCurrencyName=scope.currencyList[index].name,scope.currentCurrencyVal=scope.currencyList[index].val),scope.shopsite_&&currency&&$interval.cancel(scope.checkInterval)},100),$timeout(function(){scope.checkInterval&&$interval.cancel(scope.checkInterval)},3e3),scope.updateVkCart(),scope.updateDigisellerCart(),$timeout(function(){scope.getTotalCart()},3e3);var checkJivoTimes=0,checkJivo=$interval(function(){checkJivoTimes++;var jivo=document.getElementById("jvlabelWrap");if((jivo||20===checkJivoTimes)&&($interval.cancel(checkJivo),jivo))return jivo.classList.add("forushop-page-with-jivo"),document.getElementById("jcont").classList.add("forushop-page-with-jivo")},1e3)}}}});

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.