1"use strict";(self.webpackChunkvue_storefront=self.webpackChunkvue_storefront||[]).push([[1709],{355:function(et,G,r){r.d(G,{Ch:function(){return O},Kj:function(){return _},Lm:function(){return C},Mb:function(){return T},Ns:function(){return A},TU:function(){return S},WU:function(){return $},cm:function(){return u},dt:function(){return i},lV:function(){return y},uS:function(){return c},wr:function(){return l},xj:function(){return m},xu:function(){return h}});const o="category-ext",i=o+"/RELATED_CHILD_CATEGORIES",h=o+"/CATEGORIES_PRODUCTS_COUNT",m=o+"/CATEGORY_SET_CATEGORY_FILTERS",y=o+"/CATEGORY_SET_RESULT_CATEGORIES",O=o+"/SET_CURRENT_CATEGORY",_=o+"/SET_PRODUCT_AGGREGATION",l=o+"/SET_FILTER_PRICE",T=o+"/ADD_VARUS_NEW_PRODUCTS",S=o+"/SET_IS_BRAND_CATEGORY",A=o+"/SET_VARUS_NEW_PRODUCTS",u=o+"/VARUS_NEW_PRODUCTS_LOADING",c=o+"/VARUS_NEW_PRODUCTS_TOTAL",C=o+"/CLICK_LOAD_MORE",$=o+"/SET_PROMO_OFFERS_ATTRIBUTE"},941:function(et,G,r){r.d(G,{u:function(){return o}});const o={cityDetails:{},cityLocation:{latLng:{lat:0,lng:0},region:""},city:"",shippingMethod:"",shippingCarrier:"",shippingMethodType:"",shippingMethodTypes:[],streetAddress:"",deliveryAddressCoords:{lat:0,lng:0},shopId:null,shop:{},deliveryMethod:{},availablePaymentMethods:[],userFilledShippingInfo:!1,userLoadedShippingInfo:!1,currentShippingMethod:{}}},2405:function(et,G,r){r.d(G,{z:function(){return _}});var o=r(20112),i=r(95283);const h={isBlocked:!1,handler:null,result:null},m="DELIVERY_DEFAULTS_SYNC",y=async()=>new Promise(l=>o.A.$once(m,T=>l(T))),O=(l,T)=>{const S=async()=>{h.isBlocked=!0;try{h.result=await l("requestDefaultCityAndShipping",T),o.A.$emit(m,h.result)}catch(A){console.error(A)}finally{h.isBlocked=!1,h.handler=null}};h.handler=S()},_=async(l,T)=>{try{return i.S$?l("requestDefaultCityAndShipping",{storeCode:T}):h.result?h.result:(h.handler||h.isBlocked||O(l,{storeCode:T}),y())}catch(S){console.error(S)}}},3361:function(et,G,r){r.d(G,{_:function(){return _}});var o=r(86866),i=r(47301),h=r(30397),m=r(3312),y=r(95283);const O={Accept:"application/json, text/plain, */*","Content-Type":"application/json"},_={getCitiesList:async({query:l,excludeFields:T=null,includeFields:S=null,size:A=null,storeCode:u=null})=>{const c={query:l,storeCode:u,includeFields:S,excludeFields:T,entityType:"tms_city",excludeStoreCode:!0};return A&&(c.size=A),(0,o.l)(c)},getShopsList:async l=>(0,o.l)({...l,size:l?.size||m.$W.entities.tms_shop.queryMaxSize,entityType:"tms_shop"}),availableBonuses:async l=>{const T=(0,h.A)(m.$W.cart,"available_bonuses_endpoint"),S=(0,y.GG)(T);return i.P.execute({url:S,payload:{method:"POST",mode:"cors",headers:O,body:JSON.stringify({cart_id:l})}})},getGeoLocateShop:async(l,T,S=null)=>{let A=[(0,h.A)(m.$W.user_checkout.endpoint,"shopByLocation"),encodeURIComponent(l),encodeURIComponent(T)].join("/");return S&&(A=`${A}?city_id=${S}`),i.P.execute({url:A,payload:{method:"GET",mode:"cors",headers:O}})},getGeoLocateShopV2:async(l,T,S=null)=>{let A=[(0,h.A)(m.$W.user_checkout.endpoint,"shopByLocationV2"),encodeURIComponent(l),encodeURIComponent(T)].join("/");return S&&(A=`${A}?city_id=${S}`),i.P.execute({url:A,payload:{method:"GET",mode:"cors",headers:O}})},deliveryTypesByLocation:async(l,T,S=null)=>{let A=[(0,h.A)(m.$W.user_checkout.endpoint,"deliveryTypesByLocation"),encodeURIComponent(l),encodeURIComponent(T)].join("/");return S&&(A=`${A}?city_id=${S}`),i.P.execute({url:A,payload:{method:"GET",mode:"cors",headers:O}})},getShippingTimeSlots:async l=>i.P.execute({url:(0,y.GG)((0,h.A)(m.$W.user_checkout.endpoint,"shippingTimeSlots")),payload:{method:"POST",mode:"cors",body:JSON.stringify(l),headers:O,silent:!0}}),getShippingTimeSlotsV2:async l=>i.P.execute({url:(0,y.GG)((0,h.A)(m.$W.user_checkout.endpoint,"shippingTimeSlotsV2")),payload:{method:"POST",mode:"cors",body:JSON.stringify(l),headers:O,silent:!0}}),saveShippingDetails:async l=>i.P.execute({url:(0,y.GG)((0,h.A)(m.$W.user_checkout.endpoint,"setShippingDetails")),payload:{method:"POST",mode:"cors",body:JSON.stringify(l),headers:O},silent:!0}),postPaymentStatusToTheServer:async l=>i.P.execute({url:(0,h.A)(m.$W.ordersExt,"payment_status_endpoint"),payload:{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(l)}})}},4180:function(et,G,r){r.d(G,{f:function(){return _}});var o=r(13222),i=r.n(o),h=r(70528),m=r(66944),y=r(38367),O=r(83832);function _({aggregations:l,category:T,configVarusState:S,attributeState:A,promoOffersAttribute:u,moduleDefaultFilters:c,attributeMetadata:C,extraFilters:$={}}){const M={};if(!l)return M;let W={};C&&(W=[...C].reduce((I,a)=>
1{if(!a.uri_name)return I;I[a.attribute_code]={uri_name:a.uri_name,options:{}};for(const L of a.options)L.uri_name&&(I[a.attribute_code].options[L.value]=L.uri_name);return I},{}));const F=(0,y.k)(T,S);let d;F.length?d=[...F]:d=[...c];for(const I of d){if(I==="price"){const v="agg_"+I;l[v]&&(M[I]=l[v]);continue}if(I===O.T2&&u?.options?.length){const v=(0,O.Xw)(l,u);if(v){Object.assign(M,v);continue}}const a=[],L=new Set,K={},E={},X="agg_terms_"+I;if(l[X]){let v=[...l[X].buckets];l[X+"_options"]&&(v=v.concat(l[X+"_options"].buckets)),v.forEach(N=>{const q=i()(N.key);L.add(q),N.label&&!K[q]&&(K[q]=N.label),N.sort_order&&!E[q]&&(E[q]=N.sort_order)})}L.forEach(v=>{const N=(0,h.optionLabel)(A,{attributeKey:I,optionId:v}),q=N&&N!==v?N:K[v]||N;if(q&&q.trim()){const P=W[I],b=P?.options?.[v];if(P?.uri_name&&!b)return;const z=b?{groupUri:P?.uri_name,optionUri:b}:{};a.push({id:v,label:q,type:I,sort_order:E[v]||0,...z})}}),M[I]=a.sort((v,N)=>N.sort_order-v.sort_order||(0,m.Lr)(v,N))}for(const[I,a]of Object.entries($))M[I]=a;return M}},20717:function(et,G,r){r.d(G,{U:function(){return i}});var o=r(26598);const i=(m=null)=>{if((0,o.q1)()?.shop)return{key:"has_promotion_in_stores",value:{in:[0,m]},scope:"catalog"};const O=(0,o.kh)();return O?.id?{key:"has_promotion_in_region",value:{in:[O.id]},scope:"catalog"}:{key:"has_promotion_in_region",value:{eq:0},scope:"catalog"}};function h(m,y){return m.params.hasOwnProperty("has_promotion_in_stores")&&i(y)}},26598:function(et,G,r){r.d(G,{Bi:function(){return S},LD:function(){return y},SJ:function(){return F},U6:function(){return A},WZ:function(){return M},Ym:function(){return u},eO:function(){return d},es:function(){return l},kh:function(){return O},q1:function(){return W},zR:function(){return I},zk:function(){return _}});var o=r(65957),i=r(89615),h=r(37539),m=r(95283);const y=()=>{const a=O();return a?.shipping_shop_id?a?.shipping_shop_id:parseInt(o.A.getters["shipping-module/getDefaultShop"]?.id||0)},O=()=>o.A.getters["shipping-module/getCurrentRegion"]||null,_=()=>o.A.getters["shipping-module/getRegionList"]||null,l=({region:a,name:L})=>o.A.dispatch("shipping-module/setCurrentRegion",{region:a,name:L}),T=()=>
1o.A.state["shipping-module"].shopDeliveryPolygon,S=async()=>{let a=null;const L=y(),K=o.A.getters["shipping/getShippingDetails"];return L||(a=(await o.A.dispatch("shipping-module/loadDefaultCityAndShipping",{})).defaultShop?.id),parseInt(K?.shopId||a||L)},A=()=>h.Ts.includes(o.A.getters["shipping/getShippingDetails"]?.shippingMethod),u=()=>h.D1.includes(o.A.getters["shipping/getShippingDetails"]?.shippingMethod),c=()=>!!+store.state["shipping-module"]?.current?.shop?.is_darkstore,C=async(a,L=null,K=null)=>{const X=`sqpp_data_${L||await S()}`,v=K?`sqpp_data_${K}`:null,N=a||[],q=N.length?[...N,X]:[];return v&&q.push(v),{included:q,key:X,deliveryKey:v,isRegion:!1}},$=async(a,L)=>{const K=L?.id?`sqpp_data_region_${L.id}`:"sqpp_data_region_default",E=a||[];return{included:E.length?[...E,K]:[],key:K,deliveryKey:null,isRegion:!0}},M=()=>!!(m.S$&&o.A.state.__SSR_CACHE__),W=()=>o.A.getters["shipping-module/getCurrent"]||null,F=async(a,L=null,K=!1)=>{const E=W(),X=O();if(!E?.npShop&&!E?.shop)return $(a,X);const v=K?T():null;return C(a,L,v)},d=a=>a?.productminsalablequantity||a?.productquantityunitstep||0,I=(a,L,K=!1)=>E=>{if(E.sqpp)return E;const X=d(E),v=E[a];if(L){const N=v?.in_stock?1:0;E.sqpp={...v,qty:N,qty_original:N,sort_price:v?.price,in_stock:v?.in_stock,special_promo_type:v?.special_promo_type??E.special_promo_type??0}}else{const N=v?.qty>=X&&v?.qty>0;E.sqpp={...v,in_stock:N,special_promo_type:v?.special_promo_type??E.special_promo_type??0}}if(typeof K=="string"&&E?.[K]){const N=E?.[K]?.availability||{};E.sqpp.availability={...E.sqpp.availability||{},...N}}return E.stock=(0,i.wx)(E),E.price=(0,i.X_)(E),delete E[a],E}},38367:function(et,G,r){r.d(G,{k:function(){return m}});const o={nameBrand:"pim_brand_id",countryManufacturerForSite:"countrymanufacturerforsite"};function i(y){return y?y.includes("[")&&y.includes(";")?y.split(";").filter(Boolean).map(l=>{const T=l.match(/\[([^\]]+)\]/);return T?T[1]:""}).filter(Boolean):y.split(",").filter(Boolean):[]}function h(y){return y.map(O=>o[O]||O)}function m(y,O){const _=y?.filterattributes,T=(O||[]).find(c=>c.config_path==="default_filter_attributes")?.config_value,S=typeof T=="string"?T.split(",").filter(Boolean):[],A=typeof _=="string"?i(_):[],u=h(A);return u.length?u:S}},44920:function(et,G,r){r.d(G,{A:function(){return at}});var o=r(3312),i=r(355),h=r(90179),m=r.n(h),y=r(33199),O=r(66944),_=r(98350),l=r(54580),T=r(30650),S=r(88055),A=r.n(S),u=r(40046),c=r(37826),C=r(94103),$=r(27638),M=r(38367),W=r(83832),F=r(2248),d=r(79665),I=r(46393);let a=null;const L=e=>{const t=new SearchQuery;return e.length&&t.applyFilter({key:"category_ids",value:{in:e}}),t.applyFilter({key:"visibility",value:{in:[2,4]}}).applyFilter({key:"status",value:{in:[0,1]}}).addAvailableFilter({field:"category_ids",scope:"catalog",options:{size:1e4}}),t};var E={async specialCategoriesIds({dispatch:e}){const s=await e("config-varus/get",{path:["categories_map_perfect_category_id","categories_map_discount_category_id","categories_map_brand_category_id"]},{root:!0});return{varusPerfectCategoryId:parseInt(s.categories_map_perfect_category_id),specialOffersCategoryId:parseInt(s.categories_map_discount_category_id),productBrandId:parseInt(s.categories_map_brand_category_id)}},async loadCategoryFilters({dispatch:e,rootGetters:t},s){const n=s||t["category-next/getCurrentCategory"];try{await e("config-varus/get",{path:"default_filter_attributes"},{root:!0});const{aggregations:g,attributeMetadata:p}=await F.CategoryServiceBridge.loadFiltersOnly(n.id);await e("category-extension/loadAvailableFiltersFrom",{aggregations:g,attributeMetadata:p,category:n},{root:!0})}catch(g){d.V.warn("loadCategoryFilters failed, sidebar will show no filters","category-extension",g)()}},async loadRelatedChildCategories({commit:e},{category:t,relatedProducts:s=[]}){if(!t.children_data||!t.children_data.length||!s.length)return;const n=[];for(const g of t.children_data){const p=s.filter(R=>R.category_ids?.includes(g.id));n.push(Object.assign({},g,{products:p}))}e(i.dt,n)},async switchSearchFilters({dispatch:e},t=[]){const s=o.$W.products.sortByAttributes.Popularity;let n=c.QB.currentRoute[o.$W.products.routerFiltersSource];t.forEach(g=>{n.hasOwnProperty("price")&&g.attribute_code==="price"&&delete n.price,n.hasOwnProperty("cat")&&g.type==="cat"&&delete n.cat,g.type==="cat"?n=(0,_.z5)({currentQuery:{},filterVariant:g}):n.hasOwnProperty("has_promotion_in_stores")&&g.type==="has_promotion_in_stores"?n=(0,_.z5)({currentQuery:n,filterVariant:g}):n=(0,_.z5)({currentQuery:n,filterVariant:g})}),n.sort===s&&n.hasOwnProperty("sort")&&delete n.sort,await e("changeRouterFilterParameters",n)},async resetSearchFilters({dispatch:e,getters:t},{keepSort:s=!1}){if(s&&t.getCurrentSearchQuery.sort){if(Object.keys(t.getCurrentSearchQuery).length>0)return e("changeRouterFilterParameters",{sort:t.getCurrentSearchQuery.sort});await e("changeRouterFilterParameters",{})}await e("changeRouterFilterParameters",{})},async changeRouterFilterParameters(e,t){"page"in t&&delete t.page,await c.QB.push({[o.$W.products.routerFiltersSource]:t})},async loadCategoryBreadcrumbs({dispatch:e},{category:t,currentRouteName:s,omitCurrent:n=!1}){if(!t)return;if(parseInt(await e("config-varus/get",{path:"categories_map_discount_category_id"},{root:!0}))===t.id){await e("breadcrumbs/set",{current:T.Ay.t("Special offers VARUS"),routes:[]},{root:!0});return}const p=t.parent_ids?[...t.parent_ids,t.id]:(0,O.cx)(t),R=Object.assign({id:p},A()(o.$W.entities.category.breadcrumbFilterFields)),x=await e("category-next/loadCategories",{filters:R,reloadAll:Object.keys(o.$W.entities.category.breadcrumbFilterFields).length>0},{root:!0}),f=[];for(const Z of p){if(Z===o.$W.entities.category.categoriesRootCategoryId.toString())continue;const Q=x.findIndex(U=>U.id.toString()===Z);Q>
1=0&&(!n||x[Q].id!==t.id)&&f.push(x[Q])}return await e("breadcrumbs/set",{current:s,routes:(0,l.x)(f)},{root:!0}),f},async loadCategoriesProductsCount({commit:e},t){const s=t?.children_data;if(!Array.isArray(s)||s.length===0)return;const n={},g=p=>{for(const R of p){const x=R?.id;x!=null&&(n[x]=Number(R.product_count)||0),Array.isArray(R?.children_data)&&R.children_data.length&&g(R.children_data)}};g(s),e(i.xu,n)},async loadCharacteristicAttributes(e,{categoryId:t,attributes:s,options:n,attributeMetadata:g}={}){if(!t||!Array.isArray(s)||s.length===0||!Array.isArray(n)||n.length===0)return{};const p=Array.isArray(g)&&g.length?g:(await F.CategoryServiceBridge.loadFiltersOnly(t)).attributeMetadata,R=new Set(s),x={};for(const f of p||[]){if(!R.has(f.attribute_code)||!f.uri_name||!Array.isArray(f.options))continue;const Z=f.options.filter(Q=>Q.uri_name&&n.some(U=>f.uri_name===U.groupUri&&Q.uri_name===U.optionUri)).map(Q=>({id:Q.value,label:Q.label,type:f.attribute_code,groupUri:f.uri_name,optionUri:Q.uri_name}));Z.length&&(x[f.attribute_code]=Z)}return x},async prepareHumanFilters({dispatch:e,rootState:t},{category:s,filtersHuman:n,attributeMetadata:g}){const p=(0,M.k)(s,t["config-varus"]?.config);if(!p.length)return{};const R=n.getUriOptions();return!p.length||!R.length?{}:e("loadCharacteristicAttributes",{categoryId:s?.id,attributes:p,options:R,attributeMetadata:g})},async loadAvailableFiltersFrom({commit:e,rootGetters:t,dispatch:s},{aggregations:n,attributeMetadata:g,category:p,filters:R={}}){o.$W.entities.attribute.loadByAttributeMetadata&&await s("attribute/loadCategoryAttributes",{attributeMetadata:g},{root:!0});const x=t["category-extension/getAvailableFiltersFrom"](n,p,g),f=t["category-extension/getFiltersMap"][p.id];let Z=x;const Q=Object.keys(R);if(f&&Q.length){const U=m()(x,Q);for(const H of Object.keys(U)){const it=U[H],J=f[H],ct=Array.isArray(it)&&it.length===0;Array.isArray(J)&&J.length>0&&(ct||H===W.T2)&&delete U[H]}Z=Object.assign(A()(f),A()(U))}e(i.xj,{category:p,filters:Z}),e(`category-next/${y.xj}`,{category:p,filters:Z},{root:!0})},async getCategoriesByChunk({dispatch:e},{chunkSize:t=200,categoryIdsArray:s=[]}){if(!s||!s.length)return[];const n=Math.ceil(s.length/t),g=[];for(let x=0;x<n;x++){const f={id:s.slice(x*t,(x+1)*t)};g.push(e("category-next/loadCategories",{filters:f},{root:!0}))}return(await Promise.all(g)).reduce((x,f)=>x.concat(f),[])},async setCategory({commit:e},t){e(i.Ch,t)},async filterCategoryPrice({commit:e},t){e(i.wr,t)},async loadVarusNewProducts({dispatch:e,commit:t},{currentPage:s=1,pageSize:n=24,loadMore:g=!1}){const R=new u.SearchQuery().applyFilter({key:"is_new",value:{eq:!0},scope:"default"});R.applySort({field:"updated_at",options:{order:"desc"}}),R.applyFilter({key:"news_from_date",value:{lt:"now"}}),R.applyFilter({key:"news_to_date",value:{gt:"now-1d"}}),t(i.cm,!0);const{items:x,total:f}=await e("product/findProducts",{query:R,start:(s-1)*n,size:n,includeFields:[...$.A.smallProduct.includeFields,"newimage"],excludeFields:$.A.smallProduct.excludeFields,skipLoadOptions:!0},{root:!0});t(g?i.Mb:i.Ns,x),t(i.uS,f.value),t(i.cm,!1)},async clickLoadMore({commit:e},{enable:t}){e(i.Lm,t)},async loadCategoryPure(e,t){const s=await C.M$.getCategories(t);return s&&s.length?s[0]:null},async loadPromoOffersAttribute(){return null},async loadPromoOffersAttributeES({commit:e,state:t}){if(t.promoOffersAttribute)return t.promoOffersAttribute;if(a)return a;a=(async()=>{const s=new u.SearchQuery().applyFilter({key:"attribute_code",value:{eq:"promoOffers"}}),{items:n}=await(0,I.l)({query:s,entityType:"attribute",size:1,includeFields:["attribute_code","attribute_id","frontend_label","options","uri_name"]}),g=n?.[0]||null;return e(i.WU,g),g})();try{return await a}finally{a=null}}},X=r(85471),N={[i.dt](e,t){e.relatedChildCategories=t},[i.xu](e,t){e.categoriesProductsCount=t},[i.xj](e,{category:t,filters:s}){X.Ay.set(e.filtersMap,t.id,s)},[i.lV](e,t){e.categories=[...t]},[i.Ch](e,t){e.currentCategory=t},[i.Kj](e,t){e.aggregations=t},[i.wr](e,t){e.filterPrice=t},[i.Ns](e,t){e.varusNewProducts=t},[i.Mb](e,t){e.varusNewProducts.push(...t)},[i.TU](e,t){e.isBrandCategory=t},[i.cm](e,t){e.newProductsLoading=t},[i.uS](e,t){e.newProductsTotal=t},[i.Lm](e,t){e.clickLoadMore=t},[i.WU](e,t){e.promoOffersAttribute=t}},q=r(70528),P=r(60083),b=r(44826),z=r.n(b),ot=r(13222),k=r.n(ot),Y=r(58156),nt=r.n(Y),st=r(71676),tt=r(4180),w={getPromoOffersAttribute:e=>e.promoOffersAttribute,getDefaultFilterAttributes:(e,t,s)=>(s["config-varus"]?.config||[]).find(p=>p.config_path==="default_filter_attributes")?.config_value?.split(",").filter(
1Boolean)||[],getCategoryFilterAttributes:(e,t,s)=>n=>(0,M.k)(n,s["config-varus"]?.config),getRelatedChildCategories:e=>e.relatedChildCategories,getCategories:e=>e.categories,getCategoriesProductsCount:e=>e.categoriesProductsCount,getFiltersMap:e=>e.filtersMap,getAvailableFilters:(e,t)=>{const s=nt()(t.getCurrentCategory||{},"id",null);return t.getFiltersMap[s]||{}},getCurrentCategory:(e,t,s,n)=>{if(n["url/getCurrentRoute"].name==="varus-cafe"){const g=n["url/getCurrentRoute"].params.slug||"varuscafe";return n["category-next/getCategoryByParams"]({slug:g})}return n["category-next/getCategoryByParams"]({...n["url/getCurrentRoute"].params})},getVarusCafeCategory:(e,t,s,n)=>n["category-next/getCategoryByParams"]({slug:"varuscafe"}),getAvailableFiltersFrom:(e,t,s)=>(n,g=null,p)=>(0,tt.f)({aggregations:n,category:g,configVarusState:s["config-varus"]?.config,attributeState:s.attribute,promoOffersAttribute:e.promoOffersAttribute,moduleDefaultFilters:o.$W.products.defaultFilters,attributeMetadata:p,extraFilters:{sort:Object.keys(o.$W.products.sortByAttributes).map(R=>({label:R,id:o.$W.products.sortByAttributes[R],type:"sort"})),available_today:[{label:o.$W.attributes.filterAvailableToday.label,type:o.$W.attributes.filterAvailableToday.type}],markdown:[{label:o.$W.attributes.filterMarkdown.label,type:o.$W.attributes.filterMarkdown.type}]}}),getAvailableFiltersFromSearch:(e,t,s)=>(n,g)=>{const p={},R=g.length>
10?g:o.$W.products.defaultFilters;if(n){for(const f of R){const Z=[],Q=[];if(f!=="price"){if(n["agg_terms_"+f]){let U=n["agg_terms_"+f].buckets;n["agg_terms_"+f+"_options"]&&(U=U.concat(n["agg_terms_"+f+"_options"].buckets));for(const H of U)Q.push(H)}Q.forEach(U=>{const H=(0,q.optionLabel)(s.attribute,{attributeKey:f,optionId:k()(U.key)});z()(H)!==""&&Z.push({id:k()(U.key),label:H,type:f,doc_count:k()(U.doc_count)})}),p[f]=Z.sort(O.Lr)}else{const U=(0,P.m1)().i18n.currencySign;if(n["agg_range_"+f]){let H=0;const it=n["agg_range_"+f].buckets.length;for(const J of n["agg_range_"+f].buckets)Z.push({id:J.key,type:f,from:J.from,to:J.to,label:H===0||H===it-1?J.to?"< "+U+J.to:"> "+U+J.from:U+J.from+(J.to?" - "+J.to:""),single:!0}),H++;p[f]=Z}}}const x=[];Object.keys(o.$W.products.sortByAttributes).map(f=>{x.push({label:f,id:o.$W.products.sortByAttributes[f],type:"sort"})}),p.sort=x}return p},getCurrentFiltersFrom:(e,t,s)=>(n,g,p)=>{const R=n||s.route[o.$W.products.routerFiltersSource],x=g||t.getAvailableFilters;return(0,st.Wp)({availableFilters:x,filtersQuery:R,filtersHumanURI:p})},getCurrentPromotionFiltersFrom:(e,t,s)=>(n,g)=>{const p=n||s.route[o.$W.products.routerFiltersSource],R=g||t.getAvailableFilters;return(0,st.Wp)({availableFilters:R,filtersQuery:p})},getCurrentSearchQuery:(e,t,s)=>t.getCurrentFiltersFrom(s.route[o.$W.products.routerFiltersSource]),getCurrentFilters:(e,t)=>t.getCurrentSearchQuery.filters,getCurrentFiltersHF:(e,t,s)=>n=>t.getCurrentFiltersFrom(s.route[o.$W.products.routerFiltersSource],null,n),hasActiveFilters:(e,t)=>!!Object.keys(t.getCurrentFilters).length,getAggregations:e=>e.aggregations,getFilterPrice:e=>e.filterPrice,getVarusNewProducts:e=>e.varusNewProducts,getNewProductsLoading:e=>e.newProductsLoading,getIsBrandCategory:e=>e.isBrandCategory,getNewProductsTotal:e=>e.newProductsTotal,getClickLoadMore:e=>e.clickLoadMore};const V={namespaced:!0,state:{relatedChildCategories:[],categoriesProductsCount:{},filtersMap:{},categories:[],currentCategory:null,aggregations:{},activeFilters:[],activeSort:[],filterPrice:{},varusNewProducts:[],isBrandCategory:!1,newProductsLoading:!0,newProductsTotal:null,clickLoadMore:!1,promoOffersAttribute:null},actions:E,mutations:N,getters:w},at=async function({store:e},t){t?.["category-extension"]&&(V.state=t["category-extension"]),e.registerModule("category-extension",V)}},47170:function(et,G,r){r.d(G,{CR:function(){return S},I1:function(){return T},WK:function(){return l},_3:function(){return O},oc:function(){return _},pY:function(){return A}});var o=r(20112),i=r(97919),h=r(79665);const m="thank-you-snapshots",y=1440*60*1e3;function O(){const u=["shippingDetails","currentTimeSlot","paymentDetails","packagingDetails","payWithBonusesActive"];for(const c of u)sessionStorage.removeItem(c);o.A.$emit("shipping-has-dropped")}function _(u){try{const c=sessionStorage.getItem(u);return c?JSON.parse(c):null}catch{return null}}function l({order:u,confirmation:c,summary:C,shipping:$,shippingTimeSlots:M,paymentMethods:W,paymentDetails:F,personalDetails:d,tips:I,payWithBonuses:a,toCheckout:L}){sessionStorage.setItem("orderConfirmation",JSON.stringify(c)),sessionStorage.setItem("placedOrder",JSON.stringify(u)),sessionStorage.setItem("orderSummary",JSON.stringify(C)),sessionStorage.setItem("toCheckout",JSON.stringify(L||{})),sessionStorage.setItem("tips",JSON.stringify(I)),sessionStorage.setItem("payWithBonuses",JSON.stringify(a)),sessionStorage.setItem("placedOrderShippingInformation",JSON.stringify($)),sessionStorage.setItem("placedOrderShippingTimeSlots",JSON.stringify(M)),sessionStorage.setItem("placedOrderPaymentMethods",JSON.stringify(W)),sessionStorage.setItem("placedOrderPaymentDetails",JSON.stringify(F)),sessionStorage.setItem("placedOrderPersonalDetails",JSON.stringify(d))}async function T(u){if(u)try{const c={placedOrder:_("placedOrder"),orderConfirmation:_("orderConfirmation"),orderSummary:_("orderSummary"),tips:_("tips"),payWithBonuses:_("payWithBonuses"),toCheckout:_("toCheckout"),placedOrderShippingInformation:_("placedOrderShippingInformation"),placedOrderShippingTimeSlots:_("placedOrderShippingTimeSlots"),placedOrderPaymentMethods:_("placedOrderPaymentMethods"),placedOrderPaymentDetails:_("placedOrderPaymentDetails"),placedOrderPersonalDetails:_("placedOrderPersonalDetails"),savedAt:Date.now()},C=i.h.get("checkout"),$=await C.getItem(m)||{},M={},W=Date.now()-y;
1for(const[F,d]of Object.entries($))d&&typeof d.savedAt=="number"&&d.savedAt>=W&&(M[F]=d);M[u]=c,await C.setItem(m,M)}catch(c){h.V.error(c,"checkout")()}}async function S(u){if(!u)return null;try{return(await i.h.get("checkout").getItem(m)||{})[u]||null}catch(c){return h.V.error(c,"checkout")(),null}}async function A(u){if(u)try{const c=i.h.get("checkout"),C=await c.getItem(m)||{};if(!(u in C))return;delete C[u],await c.setItem(m,C)}catch(c){h.V.error(c,"checkout")()}}},48608:function(et,G,r){r.d(G,{L:function(){return c}});var o=r(24420),i=r(4195),h=r(57514),m=r(79665),y=r(74959),O=r(49264),_=r(28630),l=r(97919),T=r(74170),S=r(95283),A=r(20112),u=r(3312);const c=function({store:C},$){l.h.init(y.ID),$&&(h.f.state=$?.shippingModule||h.f.state,i.L.state=$.paymentModule||i.L.state,o.B.state=$?.checkoutModule||o.B.state),C.registerModule("shipping",h.f),C.registerModule("payment",i.L),C.registerModule("checkout",o.B),C.subscribe((M,W)=>{const F=M.type;F.endsWith(_.Fe)&&l.h.get(y.ID).setItem(y.He,W.shipping.geoLocateShop).catch(d=>{m.V.error(d)()}),(F.endsWith(_.yq)||F.endsWith(_.bd))&&l.h.get(y.ID).setItem(y.lf,W.shipping.shippingDetails).catch(d=>{m.V.error(d)()}),F.endsWith(O.BQ)&&l.h.get(y.ID).setItem(y.B,W.checkout.personalDetails).catch(d=>{m.V.error(d)()}),F.endsWith(O.N7)&&l.h.get(y.ID).setItem(y.FG,W.checkout.paymentDetails).catch(d=>{m.V.error(d)()})}),S.S$||(A.A.$on("user-after-logout",()=>{C.dispatch("checkout/clearCheckoutSession")}),A.A.$on("checkout-after-shippingMethodChanged",()=>{C.dispatch("checkout/clearCheckoutSession",!0)})),(0,T.I)().then(M=>{const W=(0,S.t)(u.$W.elasticsearch.host),F=u.$W.api.url_ssr_tms?`${u.$W.api.url_ssr_tms}${u.$W.elasticsearch.host}`:"";M.registerEntityType("tms_city",{url:W,url_ssr:F,queryProcessor:d=>d,resultProcessor:(d,I,a)=>M.handleResult(d,"tms_city",I,a)}),M.registerEntityType("tms_shop",{url:W,url_ssr:F,queryProcessor:d=>d,resultProcessor:(d,I,a)=>M.handleResult(d,"tms_shop",I,a)}),M.registerEntityType("tms_region",{url:W,url_ssr:F,queryProcessor:d=>d,resultProcessor:(d,I,a)=>M.handleResult(d,"tms_region",I,a)})})}},59953:function(et,G,r){r.d(G,{W:function(){return q}});var o=r(55364),i=r.n(o),h=r(90179),m=r.n(h),y=r(85471),O=r(33199),_=r(95283),l=r(2248),T=r(3996),S=r(79665),A=r(77307),u=r(60083),c=r(3312),C=r(80740),$=r(93859),M=r(40046),W=r(20717),F=r(26598),d=r(95082),I=r(355);let a=0;function L(P,b,z){const ot=P["category-next/getCategoryFrom"](b),k=Number(ot?.id);if(Number.isFinite(k)&&k>0)return k;const Y=(0,u.CC)(b).replace(/^\//,""),nt=P["category/getCategoriesMap"]||{},st=Object.values(nt).find(w=>w?.url_path===Y),tt=Number(st?.id);if(Number.isFinite(tt)&&tt>0)return tt;const rt=z?.params?.slug||Y.split("/").filter(Boolean).pop();if(rt){const w=P["category/getCategoryBySlug"](rt),V=Number(w?.id);if(Number.isFinite(V)&&V>0)return V}return null}const K=(P,b,z)=>{const ot=P["category/getCategoriesMap"]?.[b.id]||z&&P["category-next/getCategoryFrom"](z)||{};return{...m()(ot,["pimcore_id"]),...b}},E="CATEGORY_NEXT_SET_LAST_LOADED_PATH",X="CATEGORY_NEXT_SET_CATEGORY_NAVIGATION",v="CATEGORY_NEXT_SET_NOINDEX_FILTER_OPTIONS",N={namespaced:!0,state:{...A.h.state,lastLoadedPath:null,categoryNavigation:null,noindexFilterOptions:{}},getters:{...A.h.getters,getLastLoadedPath:P=>P.lastLoadedPath,getCategoryNavigation:P=>P.categoryNavigation??null},mutations:{...A.h.mutations,[E](P,b){P.lastLoadedPath=b},[X](P,b){P.categoryNavigation=b??null},[v](P,b){P.noindexFilterOptions=b??{}}},actions:i()(A.h.actions,{async loadCategory({commit:P,rootGetters:b},z){const ot=z?.filters||{},k=ot.id,Y=ot["url-key"]||ot.slug,nt=k!=null&&!Array.isArray(k),st=async tt=>{try{const rt=await l.CategoryServiceBridge.loadCategoryEntity(tt);if(!rt?.id)return;const V=K(b,rt);return y.Ay.prototype.$cacheTags&&y.Ay.prototype.$cacheTags.add(`C${V.id}`),P(O.c_,V),P(O.yU,V?.noindex_filters||[]),V}catch(rt){S.V.error("category-next/loadCategory: caught error","data-layer:category",{lookupId:tt,message:rt?.message})();return}};if(nt)return st(k);if(Y&&!Array.isArray(Y)){const tt=await st(Y);if(tt)return tt;let w=(b["category-next/getMenuCategories"]||[]).find(V=>V.url_key===Y||V.slug===Y);
1if(!w){const V=b["category/getCategoriesMap"]||{};w=Object.values(V).find(at=>at.url_key===Y||at.slug===Y),w&&(0,T.cY)("category-next:loadCategory","resolved slug via category.list (SSR fallback)",{urlKey:Y,id:w.id})}if(w?.id)return st(w.id)}},async loadCategoryFull({commit:P,dispatch:b,rootGetters:z,rootState:ot},{route:k,pageSize:Y=50,start:nt=0,sort:st}){const tt=++a;!_.S$&&!(0,F.U6)()&&P(`category/${d.j9}`,!0,{root:!0});try{const rt=(0,$.X6)(k.path),w=rt.split("~")[0].replace(/[-/]+$/,"")||"/",V=new C.Q(k.fullPath),at=V.getUri(),e=z["category-next/getCategoryFrom"](w)||{},t=z["category-extension/getFiltersMap"][e.id];let s={};!t&&!_.S$&&(s=await b("category-extension/prepareHumanFilters",{category:e,filtersHuman:V},{root:!0}));const g={...k[c.$W.products.routerFiltersSource]||{},...s},p=z["category-extension/getCurrentFiltersFrom"](g,t,at),R=st||p.sort||g.sort||`${c.$W.products.defaultSortBy.attribute}:${c.$W.products.defaultSortBy.order}`,x=await(0,F.Bi)(),f=await(0,F.SJ)([]),Z=k.query?.hasOwnProperty(c.$W.attributes.filterIsPromo.type)||!1,Q=z["category-extension/getFilterPrice"]||{};let U=new M.SearchQuery;if(g.hasOwnProperty("price")){const B=f.isRegion?`${f.key}.price`:`${f.key}.sort_price`;if(Object.keys(Q).length>0)U=U.applyFilter({key:B,value:{gte:Q.from,lte:Q.to},scope:"default"});else{const[j,gt]=String(g.price).split("-");U=U.applyFilter({key:B,value:{gte:j,lte:gt},scope:"default"})}}U=U.applyFilter({key:"markdown_id",value:{or:null},scope:"default"}),U=U.applyFilter({key:`${f.key}.in_stock`,value:{or:!0},scope:"default"}),Z&&(U=U.applyFilter((0,W.U)(x)));const H=(0,l.extractCategoryFiltersFromSearchQuery)(U,{isPromotionUrl:Z}),it=!!(k.query&&Object.prototype.hasOwnProperty.call(k.query,"available_today")),J=!!(k.query&&Object.prototype.hasOwnProperty.call(k.query,"markdown")),ct=new Set;for(const B of Object.keys(p.filters||{})){const j=p.filters[B];if(Array.isArray(j))for(const gt of j)gt?.groupUri&&ct.add(gt.groupUri)}const ut=!!at&&Object.keys(at).length>0&&Object.keys(at).some(B=>!ct.has(B)),yt=c.$W?.entities?.category?.byIdResolver!==!1&&!ut?L(z,w,k):null;let D,pt=!1,ft,dt;try{if(yt)try{const B=await l.CategoryServiceBridge.loadCategoryPageById({categoryId:yt,appliedFilters:p.filters,sort:R,start:nt,size:Y,availableToday:it,onlyMarkdown:J,systemFilters:H});B&&!B.notFound&&B.category?.id&&(D=B)}catch(B){S.V.warn("category-next/loadCategoryFull: by-id resolve failed; falling back to by-path","data-layer:category",{categoryId:yt,message:B?.message})()}if(!D&&ut){const B=(0,C.j)(w,at);if(B!==w)try{const j=await l.CategoryServiceBridge.loadCategoryPageByRouteDual({filteredPath:B,cleanPath:w,appliedFilters:p.filters,sort:R,start:nt,size:Y,availableToday:it,onlyMarkdown:J,systemFilters:H});j&&!j.notFound&&j.category?.id&&(D=j,pt=!0,ft=j.unfilteredAggregations,dt=j.unfilteredAttributeMetadata)}catch(j){S.V.warn("category-next/loadCategoryFull: friendly-filter dual resolve failed; falling back","data-layer:category",{friendlyPath:B,message:j?.message})()}}D||(D=await l.CategoryServiceBridge.loadCategoryPageByPath({path:w,appliedFilters:p.filters,sort:R,start:nt,size:Y,availableToday:it,onlyMarkdown:J,systemFilters:H}))}catch(B){S.V.error("category-next/loadCategoryFull: GraphQL adapter failed; degrading to not-found state","data-layer:category",{path:k.path,message:B?.message})();return}if(tt!==a)return;if(D?.redirect?.to&&!D.notFound)return D;if(!D||D.notFound||!D.category?.id){const B=w;if(k.path.indexOf("~")!==-1&&B){try{D=await l.CategoryServiceBridge.loadCategoryPageByPath({path:B,appliedFilters:{},sort:R,start:nt,size:Y,availableToday:it,onlyMarkdown:J,systemFilters:H})}catch(j){S.V.error("category-next/loadCategoryFull: human-filter notFound fallback failed","data-layer:category",{basePath:B,message:j?.message})()}if(tt!==a)return}if(!D||D.notFound||!D.category?.id)return}const ht=K(z,D.category,rt),lt=ht;if(ut&&!pt){const B=await b("category-extension/prepareHumanFilters",{category:lt,filtersHuman:V,attributeMetadata:D.attributeMetadata},{root:!0});if(B&&Object.keys(B).length>0)try{const j=await l.CategoryServiceBridge.loadCategoryPageByPath({path:w,appliedFilters:B,sort:R,start:nt,size:Y,availableToday:it,onlyMarkdown:J,systemFilters:H});if(tt!==a)return;j&&!j.notFound&&j.category?.id&&(await b("category-extension/loadAvailableFiltersFrom",{aggregations:D.aggregations,attributeMetadata:D.attributeMetadata,category:lt},{root:!0}),D=j,p.filters=B)}catch(j){S.V.error("category-next/loadCategoryFull: 2-step human-filter re-query failed","data-layer:category",{path:k.path,message:j?.message})()}}if(pt&&ft){const B=Array.isArray(dt)&&dt.length?dt:D.attributeMetadata,j=await b("category-extension/prepareHumanFilters",{category:lt,filtersHuman:V,attributeMetadata:B},{root:!0});j&&Object.keys(j).length>0&&(await b("category-extension/loadAvailableFiltersFrom",{aggregations:ft,attributeMetadata:B,category:lt},{root:!0}),p.filters={...p.filters||{},...j})}y.Ay.prototype.$cacheTags&&y.Ay.prototype.$cacheTags.add(`C${lt.id}`),P(O.c_,lt),P(O.yU,lt?.noindex_filters||[]),P(X,D.categoryNavigation??null),P(v,D.noindexFilterOptions||{}),await b("category/loadHumanFilterMeta",{fullPath:k.path,data:D.category?.humanFilterMeta??null},{root:!0});const _t=ot?.category?.isAdditionalLoading,mt=!_.S$&&(0,F.U6)()?Array.isArray(D.items)&&D.items.some(B=>!!B?.sqpp?.availability?.shipping):!0;return P(`category/${d.j9}`,mt,{root:!0}),P(`category/${_t?d.jB:d.c5}`,D.items,{root:!0}),P(`category/${d.D8}`,x??null,{root:!0}),P(`category-next/${O.AX}`,{perPage:D.perPage,start:D.start,total:D.total,totalPages:D.totalPages},{root:!0}),P(`category-extension/${I.Kj}`,D.aggregations,{root:!0}),P(`category/${d.Rj}`,D.promotionProductsTotal??0,{root:!0}),await b("category-extension/loadAvailableFiltersFrom",{aggregations:D.aggregations,attributeMetadata:D.attributeMetadata,category:lt,filters:p.filters},{root:!0}),b("ui/setPagingLoading",!1,{root:!0}),P(E,k.path),{...D,category:ht}}finally{tt===a&&!_.S$&&(b("category/setProductsLoading",!1,{root:!0}),b("ui/categoryLoader",!1,{root:!0}))}}})},q=function({store:P},b){b?.["category-next"]&&(N.state=b["category-next"]),P.registerModule("category-next",N)}},83832:function(et,G,r){r.d(G,{DE:function(){return _},Fv:function(){return S},N3:function(){return T},T2:function(){return i},Xw:function(){return A},gx:function(){return y},rB:function(){return m}});var o=r(26598);const i="promoOffers",h="promo-offers",m=[14779,2,470],y=470;function O(u){return u.filter(c=>!m.includes(c.id)&&c.parent_id!==y)}function _(){const u=(0,o.q1)();if(u?.shop?.id||u?.npShop?.id)return`promo_offers_${u?.shop?.id||u?.npShop?.id}`;const c=(0,o.kh)();if(c?.id)return`promo_offers_region_${c.id}`;const C=(0,o.LD)();return C?`promo_offers_${C}`:"promo_offers_region_default"}function l(u,c){return[{key:c??_(),value:{in:u},scope:"catalog"}]}function T(u,c,C,$){if(c!==i)return null;const W=(Array.isArray(C)?C:[C]).map(I=>I.id),F=l(W,$);let d=u;for(const I of F)d=d.applyFilter(I);return d}async function S(u,c,C,$,M,W){let F=M["category-extension/getPromoOffersAttribute"];if(F||(await $("category-extension/loadPromoOffersAttributeES",null,{root:!0}),F=M["category-extension/getPromoOffersAttribute"]),!F?.options?.length)return;const d=W??_();u.addAvailableFilter({field:d,scope:"catalog"})}function A(u,c){if(!c?.options?.length)return null;const C=[],$=Object.keys(u),M=c.uri_name||h,W=$.filter(a=>a.startsWith("agg_terms_promo_offers_")&&!a.includes("."));if(!W.length)return null;let F=null,d=[];for(const a of W){const K=u[a]?.buckets||[];if(K.length>0){F=a,d=K;break}}F||(F=W[0],d=u[F]?.buckets||[]);const I=c.options.reduce((a,L)=>(a[L.uri_name]=L,a),{});for(const a of d){const L=a.key,K=a.doc_count||0,E=I[L];E&&K!==0&&C.push({id:E.uri_name,label:E.label,type:i,sort_order:E.sort_order,groupUri:M,optionUri:E.uri_name})}return C.length?{[i]:C.sort((a,L)=>(a.sort_order||0)-(L.sort_order||0))}:null}}}]);
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.