PageSourceSearch

https://www.dnb.com/etc.clientlibs/dnb-marketing-website/clientlib…/resources/static/js/2493.3ff4503c.chunk.js

js dnb.com collected 2026-09-24 09:05:58 UTC 10,098 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdnb_marketing_website=self.webpackChunkdnb_marketing_website||[]).push([[2493],{2493:function(t,e,a){a.r(e),a.d(e,{default:function(){return U}});var o=a(67357),l=a(15298),c=a(46804),n=a(83072),r=a(65043),i="cart-collector_cartSection__LkSL6",s="cart-collector_cartCollector__ETfxk",d="cart-collector_cartHeader__I2pCu",u="cart-collector_cartTitle__DUWv2",p="cart-collector_cartCount__NIlyJ",v="cart-collector_cartItems__tVVoH",m="cart-collector_cartItem__k3vrH",b="cart-collector_cartItemInfo__PqEpR",_="cart-collector_cartItemName__oxuM2",y="cart-collector_cartItemSku__S2mG3",h="cart-collector_cartItemActions__Zhl4c",x="cart-collector_cartItemPrice__OrQs6",C="cart-collector_quantityControl__dapsG",j="cart-collector_qtyButton__QQfPU",q="cart-collector_qtyValue__qumbw",g="cart-collector_qtySelect__J+ODq",N="cart-collector_removeButton__dI83X",f="cart-collector_cartFooter__zIDiE",k="cart-collector_cartTotal__J9-5h",I="cart-collector_cartTotalLabel__7botR",T="cart-collector_cartTotalAmount__D88GO",L="cart-collector_cartTotalVat__ju4Lx",S="cart-collector_violations__X8qIM",B="cart-collector_violationItem__Q4OQ6",w="cart-collector_coupons__UtL5k",P="cart-collector_couponBar__42yJX",R="cart-collector_couponLabel__hSn7Z",O="cart-collector_couponCopyButton__13Ksq",A="cart-collector_couponCopied__Q4th2",F=a(94767),Q=a(70579);const $=t=>{let{item:e,max:a}=t;const{updateQuantity:o}=(0,n.qT)();return(0,Q.jsxs)("div",{className:C,"data-cy":"bundle-cart-qty-picker",children:[(0,Q.jsx)("button",{className:j,onClick:()=>o(e.uniqueId,e.qty-1),disabled:e.qty<=1,"aria-label":"Decrease quantity","data-cy":"bundle-cart-qty-decrease",children:"\u2212"}),(0,Q.jsx)("span",{className:q,"data-cy":"bundle-cart-qty-value",children:e.qty}),(0,Q.jsx)("button",{className:j,onClick:()=>o(e.uniqueId,e.qty+1),disabled:e.qty>=a,"aria-label":"Increase quantity","data-cy":"bundle-cart-qty-increase",children:"+"})]})},z=t=>{let{item:e,max:a}=t;const{updateQuantity:o}=(0,n.qT)(),l=Array.from({length:a},((t,e)=>e+1));return(0,Q.jsx)("select",{className:g,value:e.qty,onChange:t=>o(e.uniqueId,Number(t.target.value)),"aria-label":`Quantity for ${e.displayName}`,"data-cy":"bundle-cart-qty-select",children:l.map((t=>(0,Q.jsx)("option",{value:t,children:t},t)))})},D=t=>{let{item:e}=t;const{selectPack:a}=(0,n.qT)();return(0,Q.jsx)("select",{className:g,value:e.sku,onChange:t=>a(e.uniqueId,t.target.value),"aria-label":`Pack size for ${e.displayName}`,"data-cy":"bundle-cart-pack-select",children:e.packOptions.map((t=>(0,Q.jsx)("option",{value:t.value,children:t.label},t.value)))})},E=t=>{var e,a;let{item:o}=t;const{removeItem:l}=(0,n.qT)(),c=o.packOptions&&o.packOptions.length>0,r=null!==(e=o.maxQuantity)&&void 0!==e?e:99,i=null!==(a=o.quantitySelectorType)&&void 0!==a?a:"picker",s=null!=o.maxQuantity&&o.maxQuantity>1;return(0,Q.jsxs)("div",{className:m,"data-cy":"bundle-cart-item",children:[(0,Q.jsxs)("div",{className:b,children:[(0,Q.jsx)("span",{className:_,"data-cy":"bundle-cart-item-name",children:o.displayName}),(0,Q.jsx)("span",{className:y,"data-cy":"bundle-cart-item-sku",children:o.skuName})]}),(0,Q.jsxs)("div",{className:h,children:[c?(0,Q.jsx)(D,{item:o}):s?"dropdown"===i?(0,Q.jsx)(z,{item:o,max:r}):(0,Q.jsx)($,{item:o,max:r}):null,(0,Q.jsxs)("span",{className:x,"data-cy":"bundle-cart-item-price",children:["GBP"===o.currency?"\xa3":o.currency,(o.price*o.qty).toFixed(2)]}),(0,Q.jsx)("button",{className:N,onClick:()=>l(o.uniqueId),"aria-label":`Remove ${o.displayName}`,"data-cy":"bundle-cart-item-remove",children:"\u2715"})]})]})};var G=t=>{var e;let{onContinue:a,isSubmitting:o=!1}=t;const{items:l,totalPrice:c,totalItems:m,violations:b,activeCoupons:_,config:y}=(0,n.qT)(),h=y.labels,[x,C]=(0,r.useState)(new Set);if(0===l.size)return null;const j=null===(e=Array.from(l.values())[0])||void 0===e?void 0:e.currency,q="GBP"===j?"\xa3":j||"",g=b.length>0;return(0,Q.jsx)("section",{className:i,"data-bundle-cart-scroll-target":!0,"data-cy":"bundle-cart-collector",children:(0,Q.jsx)("div",{className:"defaultLayoutOuter",children:(0,Q.jsxs)("div",{className:s,children:[(0,Q.jsxs)("div",{className:d,children:[(0,Q.jsx)("h3",{className:u,"data-cy":"bundle-cart-title",children:h.cartTitle}),(0,Q.jsxs)("span",{className:p,"data-cy":"bundle-cart-count",children:[m," ",1===m?h.itemLabel:h.itemsLabel]})]}),(0,Q.jsx)("div",{className:v,children:Array.from(l.values()).map((t=>(0,Q.jsx)(E,{item:t},t.uniqueId)))}),g&&(0,Q.jsx)("div",{className:S,"data-cy":"bundle-cart-violations",children:b.map(((t,e)=>(0,Q.jsx)("div",{className:B,"data-cy":"bundle-cart-violation-item",children:t.message},e)))}),_.length>0&&(0,Q.jsx)("div",{className:w,"data-cy":"bundle-cart-coupons",children:_.map((t=>{const e=x.has(t.couponCode);return(0,Q.jsxs)("div",{className:P,"data-cy":"bundle-cart-coupon-bar",children:[(0,Q.jsx)("span",{className:R,children:t.label}),(0,Q.jsx)("button",{className:`${O} ${e?A:""}`,onClick:()=>(async t=>{try{await navigator.clipboard.writeText(t),C((e=>new Set(e).add(t)))}catch(e){console.error("Failed to copy coupon code:",e)}})(t.couponCode),"data-cy":"bundle-cart-coupon-copy-btn",children:e?h.copiedCouponLabel:h.copyCouponLabel})]},t.couponCode)}))}),(0,Q.jsxs)("div",{className:f,children:[(0,Q.jsxs)("div",{className:k,children:[(0,Q.jsx)("span",{className:I,children:h.totalLabel}),(0,Q.jsxs)("span",{className:T,"data-cy":"bundle-cart-total-amount",children:[q,c.toFixed(2)]}),(0,Q.jsx)("span",{className:L,children:h.vatLabel})]}),(0,Q.jsx)(F.$,{as:"button",variant:"primary",size:"medium",theme:"light",icon:"arrowRight",onClick:a,disabled:g||o,"data-cy":"bundle-cart-checkout-button",children:o?h.processingButtonLabel:h.continueButtonLabel})]})]})})})},J=a(10714);var V=a(14227);var H=t=>{let{cqPath:e,storeId:a,...o}=t;const[l,c]=(0,r.useState)(!1),[i,s]=(0,r.useState)(!1),{items:d,violations:u}=(0,n.qT)(),p=(0,r.useCallback)((()=>{u.length>0||c(!0)}),[u]),v=(0,r.useCallback)((async t=>{if(c(!1),!t||0===t.length||!t[0].organization)return;const o=t[0].organization.duns,l=function(t,e,a,o){return{basics:{additional_data:"",email:o,store_id:a},items:Array.from(t.values()).map((t=>({duns_number:e,qty:t.qty,sku:t.sku,subscription_label:t.subscriptionModel})))}}(d,o,null!==a&&void 0!==a?a:-1,"");try{s(!0);const t=await async function(t,e){const a=`${t}.cartlink.json`;return J.A.post(a,{body:JSON.stringify(e)}).json()}(e||"",l);1===(n=t).status&&n.url&&(window.location.href=n.url)}catch(r){console.error("Failed to generate cart link:",r)}finally{s(!1)}var n}),[d,e,a]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(G,{onContinue:p,isSubmitting:i}),l&&(0,Q.jsx)(V.A,{onSubmit:v,onClose:()=>c(!1),...o})]})};const M={cartTitle:"Your cart",continueButtonLabel:"Continue",processingButtonLabel:"Processing...",addedToCartLabel:"Added to cart",totalLabel:"Total",vatLabel:"+ VAT/yearly",itemLabel:"item",itemsLabel:"items",copyCouponLabel:"Copy Code",copiedCouponLabel:"Copied"};var U=t=>{var e;const{data:a}=t,r=(()=>{try{if(a&&a.itemCollection){return a.itemCollection.map((t=>({title:{__html:t.title},descriptionHTML:{__html:t.description},price:{__html:t.price}
1,ctaOne:t.ctaOne,ctaTwo:t.ctaTwo,subtitle:t.subtitle,subtitleTwo:t.subtitleTwo,labelText:t.labelText,isFeatured:t.isFeatured,isSecondryButton:t.isSecondryButton,featureText:{__html:t.featureText},testId:t.testId})))}return[]}catch(t){console.error("Error mapping card data",t)}})()||[],i=r.some((t=>{var e,a,o,l,c,n;return"magentoCart"===(null===(e=t.ctaOne)||void 0===e?void 0:e.type)&&(null===(a=t.ctaOne)||void 0===a||null===(o=a.magentoCart)||void 0===o?void 0:o.isBundle)||"magentoCart"===(null===(l=t.ctaTwo)||void 0===l?void 0:l.type)&&(null===(c=t.ctaTwo)||void 0===c||null===(n=c.magentoCart)||void 0===n?void 0:n.isBundle)})),s={popupBeforeInput:null===a||void 0===a?void 0:a.popupBeforeInput,popupBeforeInputSearch:null===a||void 0===a?void 0:a.popupBeforeInputSearch,popupCancelButtonLabel:null===a||void 0===a?void 0:a.popupCancelButtonLabel,popupInputPlaceholder:null===a||void 0===a?void 0:a.popupInputPlaceholder,popupNextButtonLabel:null===a||void 0===a?void 0:a.popupNextButtonLabel,popupOptionNoResultsWereFound:null===a||void 0===a?void 0:a.popupOptionNoResultsWereFound,afterInputText:null===a||void 0===a?void 0:a.afterInputText,localeCountry:null===a||void 0===a?void 0:a.localeCountry},d={cards:r,featuresCollection:null===a||void 0===a?void 0:a.featureCollection,patternId:null===a||void 0===a?void 0:a.patternId,itemCollection:null===a||void 0===a?void 0:a.itemCollection,isCompareTable:null===a||void 0===a?void 0:a.isCompareTable,reduceTopSpacing:null===a||void 0===a?void 0:a.reduceTopSpacing,reduceBottomSpacing:null===a||void 0===a?void 0:a.reduceBottomSpacing,backgroundColor:null===a||void 0===a?void 0:a.backgroundColor,storeId:null===a||void 0===a?void 0:a.storeId,validationRules:null!==(e=null===a||void 0===a?void 0:a.validationRules)&&void 0!==e?e:[],bundleCartLabels:null===a||void 0===a?void 0:a.bundleCartLabels,dialogProps:{cqPath:t.cqPath,...s}},u=(0,Q.jsxs)("div",{id:(0,o.A)(t.cqPath),children:[i&&(0,Q.jsx)(H,{cqPath:t.cqPath,storeId:null===a||void 0===a?void 0:a.storeId,...s}),(0,Q.jsx)(c.A,{children:(0,Q.jsx)(l.x,{data:d})})]});if(i){var p,v,m;const t={cartType:"magentoCart",validationRules:null!==(p=null===a||void 0===a?void 0:a.validationRules)&&void 0!==p?p:[],cartRules:null!==(v=null===a||void 0===a?void 0:a.cartRules)&&void 0!==v?v:{},couponRules:null!==(m=null===a||void 0===a?void 0:a.couponRules)&&void 0!==m?m:[],storeId:null===a||void 0===a?void 0:a.storeId,labels:{...M,...null===a||void 0===a?void 0:a.bundleCartLabels}};return(0,Q.jsx)(n.q3,{config:t,children:u})}return u}},10714:function(t,e,a){var o=a(79096);const l=o.Ay.extend({hooks:{beforeRequest:[async t=>{if("POST"===t.method)try{var e;const a=await o.Ay.get("/libs/granite/csrf/token.json").json(),l=null!==(e=null===a||void 0===a?void 0:a.token)&&void 0!==e?e:"";l?t.headers.set("CSRF-Token",l):console.error("CSRF token not found or invalid.")}catch(a){console.error("Error fetching CSRF token:",a)}}]}});e.A=l}}]);

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.