1"use strict";(self.webpackChunkdomni=self.webpackChunkdomni||[]).push([[6190,7267],{7267:function(t,e,s){s.r(e);var a=s(8281),i=s.n(a),n=s(398),r=s(5591),l=s(5876),c=s(2119),o=s(446),p=s(6190),u=s(5207);class m extends i().Component{constructor(t){super(t),this.state={inputValue:(0,c.formatNumberToString)(t.Quantity),inputIntValue:(0,c.formatNumberToString)(t.QuantityInt),inputPiecesValue:(0,c.formatNumberToString)(t.QuantityPieces?t.QuantityInt*t.QuantityPieces:0)},this.srcset={type:"url",sizes:"100"},this.changeValueTimeout,this.changeValueIntTimeout,this.changeValuePiecesTimeout,this.change=this.change.bind(this),this.changeInt=this.changeInt.bind(this),this.changePieces=this.changePieces.bind(this),this.loadOverlaySlider=this.loadOverlaySlider.bind(this)}componentDidUpdate(t,e){let s={},a=!1;if(t.Quantity!==this.props.Quantity&&(s.inputValue=(0,c.formatNumberToString)(this.props.Quantity),a=!0),t.QuantityInt!==this.props.QuantityInt&&(s.inputIntValue=(0,c.formatNumberToString)(this.props.QuantityInt),a=!0),this.props.QuantityBox&&(t.QuantityInt!==this.props.QuantityInt||t.QuantityPieces!==this.props.QuantityPieces)){const t=this.props.QuantityPieces?this.props.QuantityInt*this.props.QuantityPieces:0;s.inputPiecesValue=(0,c.formatNumberToString)(t),a=!0}a&&this.setState(s)}change(t){let e=t.target.value;if(/^[\d]+,?[\d]*$/g.test(e)){this.setState({inputValue:e});let s=(0,p.calculatePacks)(e,this.props.AvailableQuantity,this.props.Multiplier);s.intVal>0&&(clearTimeout(this.changeValueTimeout),this.changeValueTimeout=setTimeout(()=>{if(this.setState({inputValue:(0,c.formatQuantity)(s.val,!0)}),this.props.QuantityPieces){const t=s.intVal*this.props.QuantityPieces;this.setState({inputPiecesValue:(0,c.formatNumberToString)(t)})}this.props.input(this.props.ProductId,s.intVal).then(t=>{t&&t.bemsg&&this.setState({inputValue:(0,c.formatQuantity)(this.props.Quantity,!0)})})},"blur"===t.type?0:2e3))}else 0===e.length&&this.setState({inputValue:e})}changeInt(t){let e=t.target.value;if(/^[\d]+$/g.test(e)){this.setState({inputIntValue:e});let s=(0,c.formatStringToNumber)(e);Number.isInteger(s)||(s=Math.floor(s)),s<1&&(s=1);let a=this.props.AvailableQuantityInt;s>a&&(s=a),s>0&&(clearTimeout(this.changeValueIntTimeout),this.changeValueIntTimeout=setTimeout(()=>{if(this.setState({inputIntValue:(0,c.formatNumberToString)(s)}),this.props.QuantityBox&&this.props.QuantityPieces){const t=s*this.props.QuantityPieces;this.setState({inputPiecesValue:(0,c.formatNumberToString)(t)})}this.props.input(this.props.ProductId,s).then(t=>{t&&t.bemsg&&this.setState({inputIntValue:(0,c.formatQuantity)(this.props.QuantityInt,!0)})})},"blur"===t.type?0:1e3))}}changePieces(t){if(!this.props.QuantityBox||!this.props.QuantityPieces)return;let e=t.target.value;if(/^[\d]+$/g.test(e)){this.setState({inputPiecesValue:e});let s=(0,c.formatStringToNumber)(e);Number.isInteger(s)||(s=Math.floor(s)),s<1&&(s=this.props.QuantityPieces);const a=this.props.AvailableQuantityInt*this.props.QuantityPieces;s>a&&(s=a),s>0&&(clearTimeout(this.changeValuePiecesTimeout),this.changeValuePiecesTimeout=setTimeout(()=>{let t=Math.ceil(s/this.props.QuantityPieces);t<1&&(t=1),t>this.props.AvailableQuantityInt&&(t=this.props.AvailableQuantityInt);const e=t*this.props.QuantityPieces;this.setState({inputPiecesValue:(0,c.formatNumberToString)(e)}),this.props.inputPieces(this.props.ProductId,e).then(t=>{if(t&&t.bemsg){const t=this.props.QuantityInt*this.props.QuantityPieces;this.setState({inputPiecesValue:(0,c.formatNumberToString)(t)})}})},"blur"===t.type?0:1e3))}else 0===e.length&&this.setState({inputPiecesValue:e})}loadOverlaySlider(){(0,o.showProductSlider)(this.props.WorthBuying.Products,this.props.WorthBuying.Header,this.props.refresh)}render(){let t=0===this.props.AvailableQuantityInt,e=this.props.AvailableQuantityInt<this.props.QuantityInt,s="c-product";t?s+=" c-product--notAvailable":e&&(s+=" c-product--lessAmount");let a={},o=this.state.inputValue.length;o>4&&(o>6?(a.fontSize=".7em",a.textAlign="left"):a.fontSize=".8em");let p={},m=(0,c.formatNumberToString)(this.props.QuantityInt).length;m>4&&(m>5?m>6?(p.fontSize=".6em",p.textAlign="left"):p.fontSize=".7em":p.fontSize=".8em");let h={};const d=this.props.QuantityPieces?this.props.QuantityInt*this.props.QuantityPieces:0;let _=(0,c.formatNumberToString)(d).length;_>4&&(_>5?_>
16?(h.fontSize=".6em",h.textAlign="left"):h.fontSize=".7em":h.fontSize=".8em");let b=!1;if(this.props.WorthBuying&&this.props.WorthBuying.Products){this.props.WorthBuying.Products.filter(t=>t.BuyAvailable).filter(t=>!this.props.cartdata.some(e=>e.ProductId===t.Id)).length&&(b=!0)}return i().createElement("div",{className:s},i().createElement("div",{className:"c-product__check-box"},i().createElement("input",{className:"form__check__in m-basket__input",type:"checkbox",id:"ch"+this.props.ProductId,checked:this.props.Selected,onChange:this.props.change,disabled:t||e}),i().createElement("label",{className:"form__check__lab form__check__lab--product",htmlFor:"ch"+this.props.ProductId})),i().createElement("div",{className:"c-product__description-box"},i().createElement("div",{className:"c-product__description"},i().createElement("div",{className:"c-product__img-box"},i().createElement(n.default,{path:this.props.Path,set:this.srcset,alt:this.props.Name})),i().createElement("div",null,this.props.Slug?i().createElement("a",{className:"c-product__name",href:(0,u.forwardUrlParams)(this.props.hrefroot+this.props.Slug)},this.props.Name):i().createElement("span",{className:"c-product__name"},this.props.Name),i().createElement("p",{className:"c-product__subname"},this.props.SubName)),i().createElement("p",{className:"c-product__mobvalue"},i().createElement("span",{className:"c-product__mobvalue__lab"},r.product.list.value,":"," "),i().createElement("span",{className:"c-product__mobvalue__val"},(0,c.formatPrice)(this.props.GrossPrice,r.product.currency)))),b&&i().createElement("button",{className:"c-product__more-btn tt-low",onClick:this.loadOverlaySlider},"+ ",r.product.worthBuying)),i().createElement("div",{className:"c-product__price"},i().createElement("p",{className:"c-product__subname c-product__subname--mob"},r.product.list.price,":"),i().createElement("p",{className:"c-product__pricevalue"},(0,c.formatPrice)(this.props.UnitGrossPrice,r.product.currency))),i().createElement("div",{className:"c-product__quantity"},i().createElement("div",{className:"pd-wrapper__counters"},this.props.QuantityBox&&i().createElement("div",{className:"pd-wrapper__items pw-items"},i().createElement("span",{className:"pw-items__mobunit"},(0,l.formatQUnit)(this.props.Unit)),i().createElement("button",{className:"pw-items__btn",onClick:this.props.less,disabled:this.props.QuantityInt<=1},"-"),i().createElement("input",{type:"text",className:"pw-items__current",onChange:this.change,value:this.state.inputValue,onFocus:l.selectText,onBlur:this.change,disabled:t,style:a}),i().createElement("button",{className:"pw-items__btn",onClick:this.props.more,disabled:this.props.QuantityInt>=this.props.AvailableQuantityInt},"+"),i().createElement("span",{className:"pw-items__unit"},(0,l.formatUnit)(this.props.Unit))),i().createElement("div",{className:"pd-wrapper__items pw-items"},i().createElement("span",{className:"pw-items__mobunit"},(0,l.formatQUnit)(this.props.CalculatedUnit)),i().createElement("button",{className:"pw-items__btn",onClick:this.props.less,disabled:this.props.QuantityInt<=1},"-"),i().createElement("input",{type:"text",className:"pw-items__current",onChange:this.changeInt,value:this.state.inputIntValue,onFocus:l.selectText,onBlur:this.changeInt,disabled:t,style:p}),i().createElement("button",{className:"pw-items__btn",onClick:this.props.more,disabled:this.props.QuantityInt>=this.props.AvailableQuantityInt},"+"),i().createElement("span",{className:"pw-items__unit"},(0,l.formatUnit)(this.props.CalculatedUnit))),this.props.QuantityBox&&this.props.QuantityPieces&&i().createElement("div",{className:"pd-wrapper__items pw-items"},i().createElement("span",{className:"pw-items__mobunit"},(0,l.formatQUnit)("szt")),i().createElement("button",{className:"pw-items__btn",onClick:this.props.lessPieces,disabled:this.props.QuantityInt<=1},"-"),i().createElement("input",{type:"text",className:"pw-items__current",onChange:this.changePieces,value:this.state.inputPiecesValue,onFocus:l.selectText,onBlur:this.changePieces,disabled:t,style:h}),i().createElement("button",{className:"pw-items__btn",onClick:this.props.morePieces,disabled:this.props.QuantityInt>=this.props.AvailableQuantityInt},"+"),i().createElement("span",{className:"pw-items__unit"},"szt")))),i().createElement("div",{className:"c-product__amount-box"},i().createElement("p",{className:"c-product__amount"},i().createElement("span",{className:"c-product__subname c-product__subname--mob"},r.product.list.value,":"," "),(0,c.formatPrice)(this.props.GrossPrice,r.product.currency)),i().createElement("button",{className:"c-product__delete",onClick:this.props.remove})),i().createElement("div",{className:"c-product__after-text"},i().createElement("div",{className:"c-product__after-text__txt"},i().createElement("p",null,r.product.list.price,":"," ",i().createElement("span",{className:"c-product__pricevalue bold"},(0,c.formatPrice)(this.props.UnitGrossPrice,r.product.currency))),i().createElement("p",null,r.product.availability,":"," ",i().createElement("span",{className:"m-productItem320__text--bold"},this.props.AvailableQuantity>0?i().createElement(i().Fragment,null,(0,c.formatNumberToString)(this.props.AvailableQuantity)," ",(0,l.formatUnit)(this.props.Unit)):i().createElement(i().Fragment,null,r.product.quantity0)))),i().createElement("button",{className:"c-product__after-text__btn c-product__delete",onClick:this.props.remove})))}}e.default=m},6190:function(t,e,s){s.r(e),s.d(e,{calculatePacks:function(){return i}});var a=s(2119);function i(t,e,s){let i={val:(0,a.formatStringToNumber)(t),intVal:0};if(i.val<s)i.val=s,i.intVal=1;else if(i.val%s!==0){let t=Math.floor(1e4*i.val/s)/1e4,e=Math.floor(i.val/s),a=t!==e?e+1:e;i.val=Math.floor(a*s*1e4)/1e4,i.intVal=a}else i.intVal=1===s?i.val:Math.floor(i.val/s);return i.val>e&&(i.val=Math.floor(e/s)*s,i.intVal=Math.floor(i.val/s)),i}},5876:function(t,e,s){s.r(e),s.d(e,{formatQUnit:function(){return l},formatUnit:function(){return r},renderItems:function(){return n},selectText:function(){return c}});var a=s(8281),i=s.n(a);function n(t){return t&&t.length?t:null}function r(t){return"m2"===t?i().createElement(i().Fragment,null,"m",i().createElement("sup",null,"2")):i().createElement(i().Fragment,null,t)}function l(t){return"m2"===t?i().createElement(i().Fragment,null,"iloÅÄ m",i().createElement("sup",null,"2")):"karton"===t||"kartony"===t?i().createElement(i().Fragment,null,"iloÅÄ kartonów"):i().createElement(i().Fragment,null,"iloÅÄ ",t)}function c(t){t&&t.target&&t.target.setSelectionRange(0,t.target.value.length)}},398:function(t,e,s){s.r(e),s.d(e,{default:function(){return p}});var a=s(8281),i=s.n(a);const n="domni.loc"===window.location.host||"localhost"===window.location.host||"localhost:3000"===window.location.host||"test.domni.pl"===window.location.host,r="synage.i-g.pl"===window.location.host,l="/Assets/images/default.png",c=r?"//static-synage.i-g.pl":n?"//test-media.domni.pl":"//media.domni.pl";
1function o(t,e){return t?c+"/thumbnail/"+e+"w"+t:l}function p(t){let e="",s="",a="",n="",r=t.className?t.className+" lazy-image":"lazy-image";if(!t.set||!t.set.type)return i().createElement("img",{src:t.path?o(e,670):o(),alt:t.alt,className:t.className});if(!t.path)return i().createElement("img",{src:o(),alt:t.alt,className:t.className});switch(t.set.type){case"x":e=t.set.val.map(e=>(""==a&&(a=o(t.path,e.size),n=a),o(t.path,e.size)+" "+e.desc+"x")).join(",");break;case"w":s=t.set.sizes,e=t.set.val.map(e=>(""==a&&(a=o(t.path,e.size),n=a),o(t.path,e.size)+" "+e.size+"w")).join(",");break;case"url":a=o(t.path,t.set.sizes),n=a}return s?i().createElement("img",{src:n,"data-src":a,"data-srcset":e,sizes:s,alt:t.alt,className:r}):e?i().createElement("img",{src:n,"data-src":a,"data-srcset":e,alt:t.alt,className:r}):i().createElement("img",{src:a,alt:t.alt,className:t.className})}}}]);
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.