PageSourceSearch

https://www.consul.com.br/_next/static/chunks/CartItem.9da00be8d2f5985a.js

js consul.com.br collected 2026-10-02 07:16:32 UTC 4,545 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[549],{83969:function(e,t,r){var a=r(27378),i=r(87296),n=r(29935),c=r(55861),m=r(21398);let u=(0,a.forwardRef)(function({testId:e="fs-cart-item",price:t,quantity:r,unavailable:u,onQuantityChange:l,unitMultiplier:f,useUnitMultiplier:s,children:d,removeBtnProps:o,...v},p){return a.createElement("article",{ref:p,"data-fs-cart-item":u?"unavailable":"true","data-testid":e,...v},a.createElement("div",{"data-fs-cart-item-content":!0},d),a.createElement(i.Z,{"data-fs-cart-item-remove-button":!0,icon:a.createElement(n.Z,{name:"XCircle"}),"aria-label":"Remove",...o}),a.createElement("div",{"data-fs-cart-item-actions":!0},a.createElement(c.Z,{min:1,initial:r,unitMultiplier:f,useUnitMultiplier:s,onChange:l}),a.createElement(m.Z,{"data-fs-cart-item-prices":!0,listPrice:t?.listPrice?t.listPrice:0,value:t?.value?t.value:0,formatter:t?.formatter})))});t.Z=u},6551:function(e,t,r){var a=r(27378);let i=(0,a.forwardRef)(function({testId:e="fs-cart-item-summary",title:t,activeVariations:r=[],children:i,...n},c){return a.createElement("div",{ref:c,"data-fs-cart-item-summary":!0,"data-testid":e,...n},a.createElement("div",{"data-fs-cart-item-title":!0},t),r.length>0&&a.createElement("div",{"data-fs-cart-item-skus":!0},r.map(({label:e,option:t})=>a.createElement("p",{key:e},e,": ",a.createElement("span",null,t)))),i)});t.Z=i},21398:function(e,t,r){var a=r(27378),i=r(86194);let n=(0,a.forwardRef)(function({testId:e="fs-product-price",value:t,listPrice:r,formatter:n,...c},m){let u=r??0,l=t??0;return a.createElement("div",{ref:m,"data-fs-product-price":!0,"data-testid":e,...c},l!==u&&0!==u?a.createElement(a.Fragment,null,a.createElement(i.Z,{value:u,formatter:n,testId:"list-price","data-value":u,variant:"listing",SRText:"Original price:"}),a.createElement(i.Z,{value:l,formatter:n,testId:"price","data-value":l,variant:"spot",SRText:"Price:"})):a.createElement(i.Z,{value:l,formatter:n,testId:"price","data-value":l,variant:"spot",SRText:"Price:"}))});t.Z=n},55554:function(e,t,r){r.r(t),r.d(t,{default:function(){return cart_CartItem_CartItem}});var a=r(83969),i=r(79897),n=r(6551),c=r(27378),m=r(92818),u=r(96957),l=r(90194),useRemoveButton=e=>{var{currency:{code:t}}=(0,l.kP)();return{onClick:(0,c.useCallback)(a=>{a.preventDefault(),e&&(r.e(1504).then(r.bind(r,29590)).then(r=>{var{sendAnalyticsEvent:a}=r;a({name:"remove_from_cart",params:{currency:t,value:e.price*e.quantity,items:[{item_id:e.itemOffered.isVariantOf.productGroupID,item_name:e.itemOffered.isVariantOf.name,item_brand:e.itemOffered.brand.name,item_variant:e.itemOffered.sku,quantity:e.quantity,price:e.price,discount:e.listPrice-e.price,currency:t,item_variant_name:e.itemOffered.name,product_reference_id:e.itemOffered.gtin}]}})}),u.cartStore.removeItem(e.id))},[t,e]),"data-testid":"remove-from-cart-button","data-sku":null==e?void 0:e.itemOffered.sku}},f=r(16801),s=r(24246),cart_CartItem_CartItem=function(e){var t,{item:d,useUnitMultiplier:o=!1,taxesConfiguration:v}=e,p=useRemoveButton(d),{sendCartItemEvent:_}=function(){var{currency:{code:e}}=(0,l.kP)(),t=(0,c.useCallback)((t,a)=>{var i=a-t.quantity;r.e(1504).then(r.bind(r,29590)).then(r=>{var{sendAnalyticsEvent:a}=r;return a({name:i>0?"add_to_cart":"remove_from_cart",params:{currency:e,value:t.price*Math.abs(i),items:[{item_id:t.itemOffered.isVariantOf.productGroupID,item_name:t.itemOffered.isVariantOf.name,item_brand:t.itemOffered.brand.name,item_variant:t.itemOffered.sku,quantity:Math.abs(i),price:t.price,discount:t.listPrice-t.price,currency:e,item_variant_name:t.itemOffered.name,product_reference_id:t.itemOffered.gtin}]}})})},[e]);return(0,c.useMemo)(()=>({sendCartItemEvent:t}),[t])}(),O=(0,c.useCallback)(e=>{_(d,e),u.cartStore.updateItemQuantity(d.id,e)},[d,_]),h=d.itemOffered.isVariantOf.skuVariants.activeVariations,k=Object.keys(h).map(e=>({label:e,option:h[e]})),b=null!=v&&v.usePriceWithTaxes?d.priceWithTaxes:d.price,y=null!=v&&v.usePriceWithTaxes?d.listPriceWithTaxes:d.listPrice,E=null!==(t=d.itemOffered.unitMultiplier)&&void 0!==t?t:1;return(0,s.jsxs)(a.Z,{price:{value:b,listPrice:o?y*E:y,formatter:f.P},quantity:d.quantity,onQuantityChange:O,removeBtnProps:p,"data-sku":d.itemOffered.sku,"data-seller":d.seller.identifier,unitMultiplier:d.itemOffered.unitMultiplier,useUnitMultiplier:o,children:[(0,s.jsx)(i.Z,{children:(0,s.jsx)(m.Z,{src:d.itemOffered.image[0].url,alt:d.itemOffered.image[0].alternateName,width:56,height:56})}),(0,s.jsx)(n.Z,{title:d.itemOffered.isVariantOf.name,activeVariations:k})]})}}}]);

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.