PageSourceSearch

https://www.anker.com/_next/static/chunks/65984.45a0cb71980a343b.js

js anker.com collected 2026-10-01 08:40:04 UTC 14,089 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="74a1799f-642a-4c2a-8b42-f11ec1b616e3",e._sentryDebugIdIdentifier="sentry-dbid-74a1799f-642a-4c2a-8b42-f11ec1b616e3")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[65984],{65984:function(e,t,n){"use strict";var l=n(52676),a=n(75271),i=n(34064),o=n(13164),u=n(80527),r=n(82187),s=n.n(r),v=n(63440),d=n(86763),c=n.n(d),m=n(16026),p=n(40611),_=n(22317),x=n(36792),g=n(12453),b=n.n(g),f=n(17046),y=n(98662),C=n(96496),h=n(38459),w=n(18659),N=n(8239),j=n(92749),k=n(43434),E=n.n(k);t.Z=e=>{var t,n,r,d,g,k,P,A,q,D,L;let{className:B,value:M,increase:Z,decrease:S,detete:F,handleChange:T,availableForSale:Q,variant:I={},max:U,min:V=1,step:K=1,settings:z={},pId:J,s:O={},cns:W={},skipDebounce:X,pageSource:$,infos:G,product:H={},shopCommon:Y={},corporateData:ee,metafields:et={}}=e,{locale:en}=(0,i.useRouter)(),el={...E(),...O},ea=(0,a.useRef)();null==z||null===(t=z.infos)||void 0===t||t.stock;let{couponInListing:ei,setLstingCouponData:eo,inViewDom:eu,setInViewData:er}=(0,C.l8)(),{profile:es}=(0,f.Un)(),{corporateEasyBuyDiscount:ev,corporateEasyBuyPop:ed}=et||{},ec=null==ed?void 0:ed.program,[em,ep]=(0,a.useState)(!1),[e_,ex]=(0,a.useState)(null);U=Q?U<=0?(null==Y?void 0:Y.quantityMax)||9999:U:0;let{shop:eg}=(0,m.aF)(),eb=null==eg?void 0:eg.orderLimits,ef=null!==(D=null==eb?void 0:null===(n=eb.limits)||void 0===n?void 0:n["".concat(null==H?void 0:H.handle,",").concat(J)])&&void 0!==D?D:null==eb?void 0:null===(r=eb.limits)||void 0===r?void 0:r[J];V=(null==ef?void 0:ef.min)!==void 0&&(null==ef?void 0:ef.min)>=V?null==ef?void 0:ef.min:V>=(null==ef?void 0:ef.max)?null==ef?void 0:ef.max:V,U=(null==ef?void 0:ef.max)!==void 0&&(null==ef?void 0:ef.max)<=U?null==ef?void 0:ef.max:U;let[ey,eC]=(0,a.useState)(M<=V?V:M||1),eh=e=>{let t="string"==typeof e&&(null==e?void 0:e.replace(/\D/g,""));return Number((t>U?U:1*t)||V)},ew=(null==z?void 0:z.minBubbleText)||(null==eb?void 0:null===(d=eb.tips)||void 0===d?void 0:d.minBubbleText),eN=(null==z?void 0:z.maxBubbleText)||(null==eb?void 0:null===(g=eb.tips)||void 0===g?void 0:g.maxBubbleText),ej=(0,a.useCallback)(c()((e,t)=>{(0,N.RC)({event:"change_quantity",page_group:"Product Detail Page_"+J,action:e}),"Plus"===e?Z&&Z(t):S&&S(t)},500,{leading:!1}),[J,S,Z]);(0,a.useEffect)(()=>{ea.current.value=ey},[ey]),(0,a.useEffect)(()=>{eC(M<=V?V:M>=U?U:M)},[M]);let ek=(0,a.useMemo)(()=>{var e,t;return null==H?void 0:null===(t=H.product)||void 0===t?void 0:null===(e=t.tags)||void 0===e?void 0:e.includes("hideChangeQuantity")},[H]),[eE,eR]=(0,a.useState)(null),eP=(0,a.useMemo)(()=>{let e=null==ee?void 0:ee.stages.length,t=null==ee?void 0:ee.stages.findIndex(e=>{var t;return M>=e.minNum&&M<=(null!==(t=e.maxNum)&&void 0!==t?t:1/0)});if(-1===t)return 0;{var n;let l=null==ee?void 0:ee.stages[t],a=(null==l?void 0:l.minNum)||50,i=null!==(n=null==l?void 0:l.maxNum)&&void 0!==n?n:a+1-(null==l?void 0:l.minNum);return(t+(M-(null==l?void 0:l.minNum))/i+.5)/e*100}},[null==ee?void 0:ee.stages,M]),eA=(0,y.kO)((null==H?void 0:H.handle)||"");(null==ee?void 0:ee.minQuantityNumber)||null==ee||null===(k=ee.stages[0])||void 0===k||k.minNum;let eq=(0,a.useMemo)(()=>{var e,t,n,l,a,i,o,u;if((null==ev?void 0:null===(e=ev.sku_list)||void 0===e?void 0:e.length)>0&&J){let e=null==ev?void 0:ev.sku_list.find(e=>e.sku===J),r=null==H?void 0:H.corporateDiscount,s=(null==r?void 0:r.length)>0&&null!==(a=null===(t=r.reduce((e,t)=>t.discount<e.discount?t:e))||void 0===t?void 0:t.discount)&&void 0!==a?a:0,d=new v.Z(null!==(i=null==I?void 0:I.price)&&void 0!==i?i:null==H?void 0:null===(n=H.price)||void 0===n?void 0:n.value).minus(new v.Z(s)).toNumber();return(0,p.T4)({amount:Number(null!==(u=null!==(o=null==e?void 0:e.pcs500_plus_price)&&void 0!==o?o:d)&&void 0!==u?u:0),currencyCode:(null==H?void 0:null===(l=H.price)||void 0===l?void 0:l.currencyCode)||(null==H?void 0:H.currencyCode)||"USD",locale:en})}return 0},[null==ev?void 0:ev.sku_list,en,J,H]);return(0,l.jsxs)("div",{className:s()({invisible:null==H?void 0:null===(A=H.product)||void 0===A?void 0:null===(P=A.tags)||void 0===P?void 0:P.includes("worry_free_purchase")}),children:[(0,l.jsxs)("div",{className:s()(B,{[el.root]:!B},"flex flex-col items-start gap-[20px] l:gap-[8px]",{"gap-4 md:items-start min-md:!flex-row":"small_b"===$}),children:[(null==G?void 0:G.quantity_txt)&&(0,l.jsx)(h.Z,{className:"text-[20px] font-[700] text-[#1d1d1f] l:text-[18px]",html:null==G?void 0:G.quantity_txt}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:s()(el.quantityBox,null==W?void 0:W.quantityBox),children:[(0,l.jsx)("button",{type:"button",disabled:ek,"aria-label":"decrease quantity",onClick:e=>{e.stopPropagation();let t=Number(ey)-K,n=t-Number(M);if(F&&0===t)return F();0!==n&&t>=V?(eC(t),eR(null),X?T(t,"Minus"):ej("Minus",n)):t<V&&eR(null==ew?void 0:e
1w.replace("{min}",V)),(0,N.RC)({event:"uaEvent",eventCategory:"bundle_color_engine",eventAction:J,eventLabel:"less",eventValue:t}),(0,N.RC)({event_parameters:null}),(0,N.RC)({event:"ga4Event",event_name:"bundle",event_parameters:{page_group:"Product Detail Page_"+J,position:"bundle_pla+filament",action:"color",SKU_variant:t}})},className:s()(el.actions,el.leftActions,{[el.buttonDisabled]:ey<=V}),children:(0,l.jsx)(o.Z,{width:16,height:16,stroke:"#1d1d1f"})}),(0,l.jsx)("label",{className:el.inputBox,"aria-label":"Product quantity",children:(0,l.jsx)("input",{tag:"Auto-10000423",ref:ea,className:s()(el.input,W.input),disabled:K>1||ek,onKeyUp:e=>{""!==e.target.value&&(e.target.value=eh(e.target.value))},onBlur:e=>{let t=e.target.value,n=""===t||""!==t&&t<=V?V:t;e.target.value=n,eC(eh(n)),T(eh(n),"Change"),""!==t&&t<V?eR(null==ew?void 0:ew.replace("{min}",V)):t>U?eR(null==eN?void 0:eN.replace("{max}",U)):eR(null)},type:"number",max:U,min:V,"aria-label":"Quantity"})}),(0,l.jsx)("button",{type:"button",disabled:ek,"aria-label":"increase quantity",onClick:e=>{e.stopPropagation();let t=Number(ey)+K,n=t-Number(M);0!==n&&t>=V&&t<=U?(eC(t),eR(null),X?T(t,"Plus"):ej("Plus",n)):t>U&&eR(null==eN?void 0:eN.replace("{max}",U)),(0,N.RC)({event:"uaEvent",eventCategory:"bundle_color_engine",eventAction:J,eventLabel:"add",eventValue:t}),(0,N.RC)({event_parameters:null}),(0,N.RC)({event:"ga4Event",event_name:"bundle",event_parameters:{page_group:"Product Detail Page_"+J,position:"bundle_pla+filament",action:"color",SKU_variant:t}})},className:s()(el.actions,el.rightActions,{[el.buttonDisabled]:ey>=U}),style:{marginLeft:"-1px"},children:(0,l.jsx)(u.Z,{stroke:ey>=U?"#ccc":"#1d1d1f",width:16,height:16})})]}),eE&&Q&&(0,l.jsx)(R,{text:eE,s:el})]}),ee&&(null==es?void 0:es.memberType)!==_.d.PLUS&&!eA&&Q&&(0,l.jsxs)(l.Fragment,{children:[ed&&eq&&(0,l.jsx)("div",{className:"w-full bg-[#EBF8FF] p-[16px] text-[14px] font-[700] leading-[20px] text-[#1D1D1F] md:p-[12px]",children:(0,l.jsxs)("div",{className:"flex flex-row justify-start gap-[4px]",children:[(0,l.jsx)(w.Z,{source:null==ed?void 0:ed.icon,className:"w-[20px] -translate-y-[1px]"}),(0,l.jsxs)("div",{className:"flex flex-1 flex-col gap-[6px] l:gap-[2px]",children:[(0,l.jsx)(h.Z,{html:null==ed?void 0:null===(q=ed.bulkPricingMessage)||void 0===q?void 0:q.replace("$price",eq),className:"text-[14px] font-[700]"}),(0,l.jsxs)("button",{type:"button","aria-label":"Contact sales for bulk pricing",onClick:()=>{ep(!0),(0,N.RC)({event_parameters:null}),(0,N.RC)({event:"ga4Event",event_name:"lp_button",member_active_status:"not active",event_parameters:{page_group:"Product Detail Page_"+J,position:"pop",button_name:null==ed?void 0:ed.contactSalesCta}})},className:"flex w-fit cursor-pointer items-center border-none bg-transparent p-0 text-[#6D6D6F]",children:[(0,l.jsx)(h.Z,{html:null==ed?void 0:ed.contactSalesCta}),(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:"-translate-y-[0.5px]",children:(0,l.jsx)("path",{d:"M6.91083 4.41083C7.23626 4.08539 7.76377 4.08539 8.08921 4.41083L13.0892 9.41083C13.4146 9.73626 13.4146 10.2638 13.0892 10.5892L8.08921 15.5892C7.76377 15.9146 7.23626 15.9146 6.91083 15.5892C6.58539 15.2638 6.58539 14.7363 6.91083 14.4108L11.3216 10L6.91083 5.58921C6.58539 5.26377 6.58539 4.73626 6.91083 4.41083Z",fill:"#6D6D6F"})})]})]})]})}),!ed&&(0,l.jsxs)("div",{className:"mt-[20px] min-h-[92px] w-full overflow-scroll bg-[#fffbf3] p-4 md:w-full md-l:w-fit",children:[(0,l.jsx)("div",{className:"relative h-[12px] w-full rounded-[20px] bg-[#fff0d4]",style:{minWidth:"".concat((null==ee?void 0:ee.stages.length)*90,"px")},children:(0,l.jsx)("div",{className:s()("absolute left-0 top-0 h-full max-w-full rounded-[20px] bg-[#FF9900]"),style:{width:"".concat(eP,"%")}})}),(0,l.jsx)("div",{className:"relative -mt-[12px] flex flex-row justify-between gap-[16px]",children:(0,l.jsx)("div",{className:"flex w-full flex-row text-center text-[14px] font-semibold",children:null==ee?void 0:null===(L=ee.stages)||void 0===L?void 0:L.map((e,t)=>{var n;let a=M>=(null==e?void 0:e.minNum)&&M<=(null!==(n=null==e?void 0:e.maxNum)&&void 0!==n?n:1/0);return(0,l.jsxs)("div",{className:"flex flex-1 flex-col items-center gap-2.5 pt-[2px] text-[#86868C]",children:[(0,l.jsx)("span",{className:s()("size-[8px] rounded-full bg-[#ffe3b1]",a&&"!bg
1-white")}),(0,l.jsx)(h.Z,{html:null==e?void 0:e.text,className:s()("px-[4px] text-center text-[12px] font-[600] text-[#86868C] l:text-[12px]",a&&"!text-[#FF9900]")})]},e.text+t)})})})]})]})]}),em&&(0,l.jsx)(x.Mb,{sku:J,s:b(),data:ec,setModal:ex,trace:j.Z.program,onClose:()=>ep(!1)}),e_&&(0,l.jsx)(x.u_,{data:ec,modal:e_,onClose:()=>{(null==e_?void 0:e_.type)==="success"&&ep(!1),ex(null)}})]})};let R=e=>{let{text:t,s:n}=e;return(0,l.jsx)(h.Z,{html:t,className:n.speechBubble,variant:"paragraph"})}},92749:function(e,t,n){"use strict";var l=n(8239);let a="Activity Page_corporate-purchase";t.Z={banner:{jump:()=>{(0,l.RC)({event:"uaEvent",eventCategory:a,eventAction:"switch",eventLabel:"masterbanner",nonInteraction:!0}),(0,l.RC)({event:"ga4Event",event_name:"switch",event_parameters:{page_group:a,position:"Activity Page_masterbanner",navigation:"Buy Now"}})}},purchase:{ref:"Corporate",toListing:e=>{let{collectionName:t,product:n,variant:a,index:i,page_group:o}=e;(0,l.RC)({event:"uaEvent",eventCategory:o,eventAction:"image_"+t,eventLabel:a.sku}),(0,l.RC)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:o,action:"",position:"image_"+t,currency:n.price.currencyCode,items:[{item_id:a.sku,item_name:n.name,item_category:null==n?void 0:n.productType,item_brand:n.vendor,item_variant:a.name,price:a.price,index:i}]}})},view:e=>{var t;let{collectionName:n,product:a,variant:i,index:o,page_group:u}=e;(0,l.RC)({event:"ga4Event",event_name:"view_item_list",event_parameters:{page_group:u,position:"image_"+n,currency:null==a?void 0:null===(t=a.price)||void 0===t?void 0:t.currencyCode,items:[{item_id:i.sku,item_name:a.name,item_brand:a.vendor,item_variant:i.name,price:i.price,index:o}]}})},buyNow:e=>{let{collectionName:t,product:n,variant:a,index:i,page_group:o}=e;(0,l.RC)({event:"uaEvent",eventCategory:o,eventAction:"buynow_"+t,eventLabel:a.sku}),(0,l.RC)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:o,action:"",position:"buynow_"+t,currency:n.price.currencyCode,items:[{item_id:a.sku,item_name:n.name,item_category:null==n?void 0:n.productType,item_brand:n.vendor,item_variant:a.name,price:a.price,index:i}]}})},viewMore:e=>{let{collectionName:t,page_group:n}=e;(0,l.RC)({event:"uaEvent",eventCategory:n,eventAction:t,eventLabel:"View More"}),(0,l.RC)({event:"ga4Event",event_name:"lp_button",event_parameters:{page_group:n,button_name:"View More",position:t}})},addToCart:e=>{let{product:t,variant:n,quantity:a,page_group:i}=e;(0,l.RC)({event:"uaEvent",eventCategory:i,eventAction:"Coporate buy now Pop",eventLabel:n.sku}),(0,l.RC)({event:"eeEvent",eventCategory:"EnhancedEcommerce",eventAction:"Added Product",eventLabel:n.sku,ecommerce:{currencyCode:t.price.currencyCode,add:{products:[{name:t.name,id:n.sku,category:t.productType,categoryName:"",brand:t.vendor,variant:n.name,price:n.price,quantity:a}]}}}),(0,l.RC)({event:"ga4Event",event_name:"add_to_cart",event_parameters:{page_group:i,position:"Coporate buy now Pop",currency:t.price.currencyCode,value:"",items:[{item_id:n.sku,item_name:t.name,item_brand:t.vendor,item_category:t.productType,item_variant:n.name,price:n.price,quantity:a}]}})}},program:{start:()=>{(0,l.RC)({event:"uaEvent",eventCategory:a,eventAction:"other exist",eventLabel:"click here"}),(0,l.RC)({event:"ga4Event",event_name:"lp_button",event_parameters:{page_group:a,button_name:"click here",position:"other exist"}})},submit:()=>{(0,l.RC)({event:"uaEvent",eventCategory:a,eventAction:"Apply for Corporate",eventLabel:"Submit"}),(0,l.RC)({event:"ga4Event",event_name:"lp_button",event_parameters:{page_group:a,button_name:"Submit",position:"Apply for Corporate"}})}},collections:{ref:"Corporate",jump:e=>{let{collectionName:t}=e;(0,l.RC)({event:"uaEvent",eventCategory:a,eventAction:"popular_categories",eventLabel:t}),(0,l.RC)({event:"ga4Event",event_name:"lp_button",event_parameters:{page_group:a,button_name:t,position:"popular_categories"}})}},faqs:{open:e=>{(0,l.RC)({event:"uaEvent",eventCategory:a,eventAction:"faq",eventLabel:e}),(0,l.RC)({event:"ga4Event",event_name:"faq_expand",event_parameters:{page_group:a,question:e}})},close:e=>{(0,l.RC)({event:"uaEvent",eventCategory:a,eventAction:"faq",eventLabel:e}),(0,l.RC)({event:"ga4Event",event_name:"faq_close",event_parameters:{page_group:a,question:e}})}}}},43434:function(e){e.exports={quantityBox:"ProductQuantity_quantityBox__LK71r",actions:"ProductQuantity_actions__mXSVJ",buttonDisabled:"ProductQuantity_buttonDisabled__6MtBM",inputBox:"ProductQuantity_inputBox__TrmUt",input:"ProductQuantity_input__6_j2l",speechBubble:"ProductQuantity_speechBubble__6tDSp",quickActions:"ProductQuantity_quickActions__ZEMNb",quickItem:"ProductQuantity_quickItem__k_qbB"}}}]);

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.