PageSourceSearch

https://shop.bonfiglioli.com/chunk-CY3QLCGV.js

js bonfiglioli.com collected 2026-09-25 18:40:51 UTC 3,592 bytes, 1 lines download raw bytes

1import{Ua as U}from"./chunk-JCOTUPE5.js";import{B as x,Bc as F,Ja as j,Wd as Q,Xd as R,kd as C,l as D,m as B,oe as w,s as E,sc as O}from"./chunk-TXT3R3MF.js";import{Ea as I,Ec as P,Fa as f,Fc as r,Gc as c,Ia as M,Lc as _,Mc as S,Md as u,Nb as o,Nd as d,Yc as b,_b as y,fc as T,gc as g,kc as v,ld as a,md as s,p as k,ua as m}from"./chunk-PWAHSUDZ.js";import"./chunk-2BAXZMGZ.js";C.BULK_PRICES="bulkPrices";var N=(()=>{class e{constructor(t){this.productService=t,this.PRODUCT_SCOPE=C.BULK_PRICES}getBulkPrices(t){return this.productService.get(t,this.PRODUCT_SCOPE).pipe(m(i=>k(this.convert(i))))}convert(t){let i=[];if(t){let n=t.price?.value;i=t.volumePrices?.map(l=>this.parsePrice(l,n))}return i}parsePrice(t,i){let n={currencyIso:t.currencyIso,formattedValue:t.formattedValue,maxQuantity:t.maxQuantity,minQuantity:t.minQuantity,priceType:t.priceType,value:t.value,formattedDiscount:"",discount:0};return this.calculateDiscount(n,i)}calculateDiscount(t,i){let n=Object.assign({},t),h=t.value;if(h&&i){let l=Math.round(100-h/i*100),$=l===0?`${l}%`:`-${l}%`;n.formattedDiscount=$,n.discount=l}return n}static{this.\u0275fac=function(i){return new(i||e)(M(w))}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function A(e,p){if(e&1&&(r(0,"tr")(1,"td"),a(2),c(),r(3,"td"),a(4),c(),r(5,"td"),a(6),c()()),e&2){let t=p.$implicit,i=b(3);o(2),s(i.formatQuantity(t)),o(2),s(t.formattedValue),o(2),s(t.formattedDiscount)}}function Y(e,p){if(e&1&&(r(0,"div",2)(1,"table",3)(2,"thead",4)(3,"tr")(4,"th",5),a(5),u(6,"cxTranslate"),c(),r(7,"th",5),a(8),u(9,"cxTranslate"),c(),r(10,"th",5),a(11),u(12,"cxTranslate"),c()()(),r(13,"tbody"),v(14,A,7,3,"tr",6),c()()()),e&2){let t=b().ngIf;o(5),s(d(6,4,"bulkPricingTable.quantity")),o(3),s(d(9,6,"bulkPricingTable.price")),o(3),s(d(12,8,"bulkPricingTable.discount")),o(3),P("ngForOf",t)}}function q(e,p){if(e&1&&(_(0),v(1,Y,15,10,"div",1),S()),e&2){let t=p.ngIf;o(),P("ngIf",t.length>0)}}var z=(()=>{class e{constructor(t,i){this.routingService=t,this.bulkPricingService=i,this.PRODUCT_KEY="productCode"}ngOnInit(){this.priceTiers$=this.getPrices()}formatQuantity(t){let i="";return t.maxQuantity?i=t.minQuantity+" - "+t.maxQuantity:i=t.minQuantity+"+",i}getPrices(){return this.routingService.getRouterState().pipe(m(t=>{let i=t.state.params[this.PRODUCT_KEY];return this.bulkPricingService.getBulkPrices(i)}))}static{this.\u0275fac=function(i){return new(i||e)(y(F),y(N))}}static{this.\u0275cmp=T({type:e,selectors:[["cx-bulk-pricing-table"]],decls:2,vars:3,consts:[[4,"ngIf"],["class","cx-bulk-pricing-table-container",4,"ngIf"],[1,"cx-bulk-pricing-table-container"],[1,"table"],[1,"thead-light"],["scope","col"],[4,"ngFor","ngForOf"]],template:function(i,n){i&1&&(v(0,q,2,1,"ng-container",0),u(1,"async")),i&2&&P("ngIf",d(1,1,n.priceTiers$))},dependencies:[B,D,E,Q],encapsulation:2})}}return e})(),G=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=g({type:e})}static{this.\u0275inj=f({imports:[x,R,U,O.withConfig({cmsComponents:{BulkPricingTableComponent:{component:z}}})]})}}return e})(),H={backend:{occ:{endpoints:{product:{bulkPrices:"orgProducts/${productCode}?fields=price(DEFAULT),volumePrices(FULL)"}}}}},J=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=g({type:e})}static{this.\u0275inj=f({providers:[j(H)],imports:[x]})}}return e})(),ot=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=g({type:e})}static{this.\u0275inj=f({imports:[J,G]})}}return e})();export{ot as BulkPricingModule};

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.