1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8377],{96874:function(e){e.exports=function(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}},41848:function(e){e.exports=function(e,r,t,n){for(var o=e.length,a=t+(n?1:-1);n?a--:++a<o;)if(r(e[a],a,e))return a;return -1}},42118:function(e,r,t){var n=t(41848),o=t(62722),a=t(42351);e.exports=function(e,r,t){return r==r?a(e,r,t):n(e,o,t)}},74221:function(e){e.exports=function(e,r,t,n){for(var o=t-1,a=e.length;++o<a;)if(n(e[o],r))return o;return -1}},62722:function(e){e.exports=function(e){return e!=e}},65464:function(e,r,t){var n=t(29932),o=t(42118),a=t(74221),c=t(7518),u=t(278),i=Array.prototype.splice;e.exports=function(e,r,t,s){var l=s?a:o,d=-1,f=r.length,h=e;for(e===r&&(r=u(r)),t&&(h=n(e,c(t)));++d<f;)for(var p=0,m=r[d],g=t?t(m):m;(p=l(h,g,p,s))>-1;)h!==e&&i.call(h,p,1),i.call(e,p,1);return e}},5976:function(e,r,t){var n=t(6557),o=t(45357),a=t(30061);e.exports=function(e,r){return a(o(e,r,n),e+"")}},56560:function(e,r,t){var n=t(75703),o=t(38777),a=t(6557),c=o?function(e,r){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(r),writable:!0})}:a;e.exports=c},278:function(e){e.exports=function(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}},38777:function(e,r,t){var n=t(10852),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},45357:function(e,r,t){var n=t(96874),o=Math.max;e.exports=function(e,r,t){return r=o(void 0===r?e.length-1:r,0),function(){for(var a=arguments,c=-1,u=o(a.length-r,0),i=Array(u);++c<u;)i[c]=a[r+c];c=-1;for(var s=Array(r+1);++c<r;)s[c]=a[c];return s[r]=t(i),n(e,this,s)}}},30061:function(e,r,t){var n=t(56560),o=t(21275)(n);e.exports=o},21275:function(e){var r=Date.now;e.exports=function(e){var t=0,n=0;return function(){var o=r(),a=16-(o-n);if(n=o,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},42351:function(e){e.exports=function(e,r,t){for(var n=t-1,o=e.length;++n<o;)if(e[n]===r)return n;return -1}},75703:function(e){e.exports=function(e){return function(){return e}}},97019:function(e,r,t){var n=t(5976)(t(45604));e.exports=n},45604:function(e,r,t){var n=t(65464);e.exports=function(e,r){return e&&e.length&&r&&r.length?n(e,r):e}},77714:function(e,r,t){"use strict";t.d(r,{Z:function(){return withWrappedPurchaserAdmin}});var n=t(85893),o=t(67294),a=t(9473),c=t(52638),u=t(96486),i=t.n(u),s=t(1937),l=t(80258),d=t(11163),f=t(7418);function withWrappedPurchaserAdmin(e){return(e=>{let r=f.Ip,t=(0,a.v9)(c.tH),[u,h]=(0,o.useState)(!0),p=(0,d.useRouter)(),needPayForTurnover=()=>i().get(t,"user.needPayForTurnover");return((0,o.useEffect)(()=>{if(i().has(t,"user")){if((0,s.tY)(null==t?void 0:t.user)){h(!1);return}if((0,s.Ge)(t.user)&&p.query.purchaserID){window.location.href=p.pathname;return}if((0,s.vV)(null==t?void 0:t.user)){window.location.href="/admin-producer/dashboard";return}if(!needPayForTurnover()){h(!1);return}window.location.href=r}},[t,p]),u)?(0,n.jsx)("div",{style:{minHeight:"80vh"},className:"justify-content-center align-items-center d-flex",children:(0,n.jsx)(l.Z,{})}):(0,n.jsx)(n.Fragment,{})})(),e}},15903:function(e,r,t){"use strict";var n=t(85893),o=t(76651),a=t(11163),c=t(80438),u=t(52638),i=t(9473),s=t(1937);r.Z=()=>{let e=(0,a.useRouter)(),r=e.query.purchaserID?"?purchaserID=".concat(e.query.purchaserID):"",{common:t,admin_purchaser:l}=c,d=(0,i.v9)(u.tH);return(0,s.Ge)(null==d?void 0:d.user)?(0,n.jsx)(o.Z,{menuItems:[{name:"".concat(t.my_side),href:"/admin-purchaser/dashboard".concat(r),icon:"grid_view"},{name:"".concat(t.my_products),href:"/admin-purchaser/mine-produkt".concat(r),icon:"restaurant_menu"},{name:"".concat(l.my_producers),href:"/admin-purchaser/my-producers".concat(r),icon:"group"},{name:"".concat(l.saved_search),href:"/admin-purchaser/saved-searches".concat(r),icon:"group"},{name:"".concat(t.settings),href:"/admin-purchaser/settings".concat(r),icon:"manage_accounts"}]}):null}},67175:function(e,r,t){"use strict";var n=t(85893),o=t(25675),a=t.n(o),c=t(91402),u=t(17982);r.Z=e=>{let{className:r,srcImage:t,altImage:o,style:i,width:s,height:l,...d}=e,f=o&&o.length>100?(0,u.Kt)(o,95):o;return(0,n.jsx)(a(),{className:r,style:i,src:t||"/assets/images/distributor/distributor-empty.jpg",alt:null!=f?f:"image",width:s||40,height:l||40,loader:c.Z,...d})}},54064:function(e,r,t){"use strict";var n=t(85893),o=t(27361),a=t.n(o),c=t(35161),u=t.n(c),i=t(67294),s=t(6763);r.Z=e=>{let{content:r,selectedCategories:t,handleSelectCategories:o}=e,[c,l]=(0,i.useState)([]),combineWithChildCategories=e=>[e,...u()(a()(r.filter(r=>r.id===e),"[0].attributes.sub_categories.data"),"id")],handleDropdownLabel=e=>{e&&(c.includes(e)?l(c.filter(r=>r!==e)):l([...c,e]))};return(0,n.jsxs)(s.Z,{className:"",autoClose:"outside",children:[(0,n.jsx)(s.Z.Toggle,{className:"btn btn-lg btn-secondary rounded-0 d-flex justify-content-between align-items-center w-100 dropdown-toggle ",children:0!==c.length?c.join(", "):"Kategorier"}),(0,n.jsx)(s.Z.Menu,{style:{width:"max-content"},className:"dropdown-menu w-100 border-0 shadow mt-1 search-dropdown-content",children:r&&r.filter(e=>1===e.attributes.level).map((e,r)=>(0,n.jsx)("li",{className:"search-dropdown-categories_category",children:(0,n.jsxs)("div",{className:"px-3 d-flex align-items-center w-100",children:[(0,n.jsx)("label",{className:"flex-grow-1 py-2",htmlFor:"cat-product-".concat(e.id),children:e.attributes.name}),(0,n.jsx)("input",{className:"search-dropdown-categories_category-input form-check-input",id:"cat-product-".concat(e.id),type:"checkbox",name:"cat-product-".concat(e.id),checked:t.includes(e.id),onChange:()=>{o(combineWithChildCategories(e.id)),handleDropdownLabel(e.attributes.name)},value:e.id})]})},r))})]})}},17982:function(e,r,t){"use strict";var n,o;t.d(r,{Bu:function(){return n},Iy:function(){return transV2},Kt:function(){return subString},dW:function(){return trans}});let trans=(e,r,t)=>{if(!(null==e?void 0:e.blocks))return t||r;let n=Object.keys(e.blocks).find(e=>e.toLowerCase()===r.toLowerCase());return n?e.blocks[n]:r},transV2=(e,r)=>{if(!e)return r;let t=Object.keys(e).find(e=>e.toLowerCase()===r.toLowerCase());return t?e[t]:r},subString=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120;return e.length<r?e:e.slice(0,r)+"..."};(o=n||(n={})).H2="h2",o.H3="h3"}}]);
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.