PageSourceSearch

https://s3.zeelool.com/zeelool-next/_next/static/chunks/97315.5bad00b4aa143fdf.js

js zeelool.com collected 2026-10-01 14:02:02 UTC 28,070 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6444,97315],{6444:(e,t,r)=>{r.d(t,{Et:()=>p,Qr:()=>l,Re:()=>n,Ro:()=>c,WQ:()=>a,Zy:()=>d,tn:()=>o});var i=r(97578);let s=e=>{if(e instanceof i.A)return e;if("string"==typeof e&&!/^-?\d+(\.\d+)?$/.test(e))throw Error(`无效数值格式: ${e}`);return new i.A(e)},a=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?new i.A(0):t.reduce((e,t)=>e.plus(s(t)),new i.A(0))},n=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(0===t.length)return new i.A(0);if(1===t.length)return s(t[0]).times(-1);let a=s(t[0]);return t.slice(1).reduce((e,t)=>e.minus(s(t)),a)},l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(0===t.length)return new i.A(1);if(1===t.length)return new i.A(1).div(s(t[0]));let a=s(t[0]);return t.slice(1).reduce((e,t)=>{let r=s(t);if(r.eq(0))throw Error("除数不能为0");return e.div(r)},a)},o=e=>s(e).abs(),c=e=>e.toNumber(),p=e=>!("number"!=typeof e||isNaN(e))||"string"==typeof e&&!isNaN(Number(e));function d(e){let t=Number(e);if(Number.isNaN(t)||t<0)return 0;if(t<1e3)return t;if(1e3===t)return"1K";if(t>1e3){let e="",r=0,i=String((t/1e3).toFixed(1)).split("."),s=i[0];for(let t=s.length-1;t>=0;t--)e=r%3==0&&0!==r?`${s.charAt(t)},${e}`:s.charAt(t)+e,r++;return`${e}${"0"===i[1]?"":`.${i[1]}`}K`}}},9867:(e,t,r)=>{r.d(t,{$L:()=>f,AH:()=>p,BN:()=>u,F8:()=>g,Hj:()=>x,PJ:()=>a,c9:()=>d,ch:()=>h,fc:()=>n});var i=r(2810),s=r(90542);function a(e){return e?.dialogType==="tier-flow"?!!e.dialogActivities?.length:e?.dialogType==="single-gift"&&!!e.singleDialogGift}function n(e){let t;return e?.forEach(e=>{let{code_discounts_total_current_price:r}=e,i="string"==typeof r?Number(r.replace(/,/g,"").trim()):Number(r);Number.isFinite(i)&&!(i<=0)&&(void 0===t||i>t)&&(t=i)}),t}let l=e=>(e||[]).filter(Boolean),o=e=>("string"==typeof e?e.trim():"")||void 0,c=e=>1===e||"1"===e;function p(e,t){return t&&Object.keys(t).length>0?t.send_gifts||[]:e?.send_gifts||[]}function d(e){let t=e||[],r=t.map(e=>e.gift_product_info?.image||"").filter(Boolean);if(0!==r.length)return{images:r,giftCount:t.reduce((e,t)=>e+Number(t.gift_product_qty||0),0)||t.length}}function u(e){return c(e?.gift_product_info?.is_glass)}let m=e=>{let[t,r]=[e.start_time,e.end_time].map(e=>String(e||"").trim()).filter(Boolean);if(t&&r)return`${t} - ${r}`};function f(e){if(!e?.show)return;let t=o(e.gift_summary),r=l((e.preview_gifts||[]).map(e=>e.thumbnail_image||"")).slice(0,2),n=r.length>0?r:l([e.gift_image||""]);if(0===n.length)return;let p=e.detail_popup?.activities||[],d=p.map(e=>((e,t)=>{let r=e.activity_id??e.id??"",s=[e.extend,e.description,e.intro].flatMap(e=>(e||"").split(/\n+/).map(e=>e.trim()).filter(Boolean)),a=t?.activityId===void 0||null===t.activityId||String(t.activityId)===String(r),n=a?t?.currentTierId:void 0,p=e.tiers?.map(e=>{let t,r;return{id:(t=e).tier_id??t.id??t.stair_index??"",name:e.gift_name||e.name||"",thresholdText:e.threshold_text||String(e.threshold_amount||""),thumbnail:e.gift_thumbnail_image||e.thumbnail||"",largeImage:e.gift_large_image||e.large_image,soldOut:void 0!==(r=e).remaining_qty&&null!==r.remaining_qty&&""!==r.remaining_qty?0>=Number(r.remaining_qty):r.sold_out??r.is_sold_out,reached:e.reached,current:e.current??e.is_current,thresholdAmount:e.threshold_amount,pdpRuleOperator:e.pdp_rule_operator,pdpRuleAmount:e.pdp_rule_amount,disclaimer:e.disclaimer,disclaimerContentType:e.disclaimer_content_type,skuPoolCount:e.sku_pool_count}}),d=p?.length===0?e.purchase_gift:void 0,u=o(d?.name),f=o(d?.thumbnail_image)||o(d?.image),x=l(d?.images),g=l(e.images),h=x.length>0?x:g.length>
10?g:f?[f]:[],_=u&&f?{id:d?.id??d?.product_id??`${r}-gift`,name:u,image:f,isGlass:c(d?.is_glass),thresholdText:o(d?.threshold_text),detail:{id:d?.id??d?.product_id??`${r}-gift`,name:u,images:h,isGlass:c(d?.is_glass),color:o(d?.color),sellPrice:d?.sell_price,oldPrice:d?.old_price,stockText:o(d?.stock_text),comeWithText:o(d?.come_with_text),eventPeriod:o(d?.event_period)||m(e),rules:d?.rules,descriptionLines:s}}:void 0;return{id:r,title:e.title||"",activityType:(0,i.u)(e),currentTierId:n,progressPercent:a?t?.progressPercent??void 0:void 0,ruleLabel:e.rule_label,terms:(e=>{let t=e.terms_entry?.content||e.disclaimer_content;if(!e.terms_entry&&!t)return;let r=e.terms_entry?.label||e.rule_label;return{show:e.terms_entry?.show??!!t,label:r,...r?{title:r}:{},content:t,contentType:e.terms_entry?.content_type||e.disclaimer_content_type}})(e),eventPeriod:m(e),descriptionLines:s,tiers:p,..._?{displayStyle:"single-tier",singleGift:_}:{}}})(e,{activityId:e.activity_id??("number"==typeof e.id?e.id:null),currentTierId:e.tier_id,progressPercent:(0,s.F)(e.current_amount,e.need_amount,(e.tiers||[]).map(e=>e.threshold_amount))??null})),u=1===p.length?((e,t)=>{if(e?.tiers?.length||t?.displayStyle!=="single-tier")return;let r=t.singleGift?.detail;if(r)return{...r,...t.terms?{rule:{ruleLabel:t.ruleLabel,terms:t.terms}}:{}}})(p[0],d[0]):void 0,f=u?"single-gift":p.length>0?"tier-flow":void 0,x="tier-flow"===f?d:void 0,g=a({dialogType:f,dialogActivities:x,singleDialogGift:u});return{images:n,...c(e.is_glass)?{isGlass:!0}:{},text:t,clickable:g&&!0===e.arrow_visible,showArrow:!0===e.arrow_visible,dialogType:f,dialogTitle:e.dialog_title||e.detail_popup?.title,dialogActivities:x,...u?{singleDialogGift:u}:{},mode:e.gift_count&&e.gift_count>1?"multiple-full-gift":"single-full-gift",tracking:(e=>{let t={},r=(e,r)=>{void 0!==r&&(t[e]=r)};return r("show_gift_id",e.id),r("stair",e.stair),r("is_satisfied",e.is_satisfied),r("price_differences",e.price_differences),r("activity_id",e.activity_id),r("activity_type_key",e.activity_type_key),r("threshold_distribution_rules",e.threshold_distribution_rules),r("distribution_rule_key",e.distribution_rule_key),r("tier_id",e.tier_id),r("threshold_amount",e.threshold_amount),r("current_amount",e.current_amount),r("need_amount",e.need_amount),r("gift_count",e.gift_count),r("can_expand",e.can_expand),r("arrow_visible",e.arrow_visible),r("arrow_clickable",e.arrow_clickable),{...e.track_payload,...e.tracking,...t}})(e)}}function x(e){let{summaryGift:t,cartDisplayModules:r,couponText:i,couponHtml:s=!1}=e,a=t?{type:"gift",gift:t}:void 0,n=i?{type:"coupon",text:i,html:s}:void 0;if(r?.length){let e=r.map((e,t)=>({module:e,index:t})).sort((e,t)=>(e.module.sort??e.index)-(t.module.sort??t.index)),t=[];if(e.forEach(e=>{let{module:r}=e;"show_gift"===r.display_source&&a&&t.push({...a,fromDisplayModule:!0}),"applied_offer"===r.display_source&&n&&t.push({...n,fromDisplayModule:!0})}),t.length>0)return t}return[a,n].filter(e=>!!e)}function g(e){return[...e].sort((e,t)=>e.type===t.type?0:"coupon"===e.type?-1:1)}function h(e){let{maxSaving:t}=e;if(t)return{text:t,html:!0}}},29876:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var i=r(63109),s=r(65665),a=r(75750),n=r(10401),l=r(40143),o=r(62272),c=r(80552),p=r(58436),d=r(53494),u=r(92632),m=r(9867),f=r(24950),x=r(4944),g=r(40898),h=r(4447),_=r(84363),b=r(38214),y=r(18708),w=r(71823),v=r(5614),N=r(28943),j=r(55462),k=r(67577),S=r(55879),C=r(94514),$=r(63696);function P(){let{onGiftSummaryClick:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,a.useRouter)(),[r,P]=(0,n.useState)(!1),A=(0,g.P)(e=>e.canBuyCartsList),I=(0,g.P)(e=>e.subTotal),F=(0,g.P)(e=>e.currency),T=(0,g.P)(e=>e.currencyList),D=(0,g.P)(e=>e.userInfo),E=(0,g.P)(e=>e.publicResourceData),{trackEvent:G}=(0,f.c)(),{cnName:O}=(0,x.Se)(),q=(0,g.P)(e=>e.setCannotCheckoutData),M=(0,g.P)(e=>e.setCannotSubmitData),B=(0,g.P)(e=>e.setSelectedCartIds),z=(0,S.c)("layout.cartPopover"),R=(0,S.c)("coupons"),L=(0,v.Ur)(T)||F,W=(0,_.Ms)(I,R,L),H=Math.abs((0,_.oS)(I.code_discount)),Q=Math.abs((0,_.oS)(I.point_discount)),U=(0,_.oS)(I.applied_offer?.point?.expendPoint),J=(0,$.D)({selectedItems:A.flatMap(e=>e.carts||[]),pricingItems:I.tmp?.carts,showGift:I.show_gift}),K=I.price_display?.item_discount||"0.00",Y=(0,_.oS)(K)>0,Z=I.price_display?.total_saving||"0.00",V=(0,_.oS)(Z)>0,X=(0,n.useMemo)(()=>(0,m.$L)(I.show_gift),[I.show_gift]),ee=(0,C.Hd)({showGift:I.show_gift,baseSubtotal:I.base_subtotal,currency:F?.name||"",open:!1}),et=async e=>{if("0.00"===I.subtotal){let r=!0;for(let t=0;t<e.length;t++)if(4!=+e[t].type&&5!=+e[t].type){r=!1;break}if(!r){d.o.error(z("sorryWeAreUnableToProcessYourRequest")),t.push("/cart");return}}let r=[];
1e.forEach(e=>{r.push(...e.carts.map(e=>e.cart_id))});try{P(!0);let e=(0,u.S)(await (0,l.Mw)({cart_ids:r}));"restricted"===e.status?(sessionStorage.setItem("zl-has-checkout-cart-popup","1"),er(e.data)):"allowed"===e.status?(B(r.map(Number)),sessionStorage.setItem("zl-sensors-entrance-payment-scene","导航位购物车弹窗"),(0,b.wF)(I.applied_offer?(()=>{let e=I.applied_offer,t=e?.coupon,r=t?.type==="code",i=t?.detail?.id;return{code:r&&t?.code||"",point:+!!e?.point?.applied,appliedCouponDetailId:i,appliedCouponType:t?.type||"",show_best_offer_text:e?.show_best_offer_text}})():{}),t.push("/payment")):(y.Ay.error("Invalid checkout validation response"),d.o.error(z("sorryWeAreUnableToProcessYourRequest")))}catch(e){y.Ay.log("checkout error",e)}finally{P(!1)}},er=e=>{if(400880===Number(e.code)){let r={title:e.title,list:[{content:e.content,products:e.products}]};r.list.length>0&&q({...r,show:!0,onClose:()=>{t.push("/cart")}})}else M({...e,show:!0,onClose:()=>{t.push("/cart")}})},ei=e=>{let{product:{is_glass:t},option:{prescription_type:r}}=e;return 1===t?"Frame Only"===r?"":(0,j.Sg)(e.option):""},es=e=>{let{btn_name:t}=e;G({eventName:"CartPopUpBtn_Click",properties:{page_name:O,url_path:window.location.href,btn_name:t}},[h.cp.SENSORS])},ea=(0,n.useCallback)(e=>{let t="";try{let{tmp:{carts:r=[]}={}}=I;if(Array.isArray(r)){let i=r.find(t=>t.id===e.cart_id);i&&(t=(0,_.PQ)(i).toFixed(2))}}catch(e){y.Ay.log("priceInfo error",e)}return t},[I]);return A.length>0?(0,i.jsxs)("div",{className:"font-br overflow-hidden rounded-lg bg-white shadow-[0px_0px_6px_rgba(0,0,0,0.12)]",children:[(0,i.jsx)("div",{className:"cart-and-price",children:A.length>0&&(0,i.jsx)("ul",{className:"max-h-[18.75vw] overflow-y-auto px-[1.3vw] w-full",children:A.map((e,r)=>(0,i.jsx)("div",{className:"border-b border-[#dce0e8] last:border-b-0",children:e.carts.map(r=>{let a,n=Array.isArray(I?.tmp?.carts)?I.tmp.carts.find(e=>String(e.id)===String(r.cart_id)):void 0,l=(0,m.c9)((0,m.AH)(r,n));return(0,i.jsxs)("li",{className:"flex justify-between items-center w-full pt-[0.57vw] pb-[0.67vw] cursor-pointer",onClick:()=>t.push(`/goods-detail/${r.product.shop_sku}`),children:[(0,i.jsx)("div",{className:"h-[6.25vw] w-[6.25vw] relative overflow-hidden",children:(0,i.jsx)(p.A,{product:r.product,lens:r.lens,boxClassName:"absolute top-[50%] left-[50%] -translate-x-1/2 -translate-y-1/2"})}),(0,i.jsxs)("div",{className:"w-[13.28125vw] text-[#333333] text-[0.97vw]",children:[3===e.type&&(0,i.jsx)("span",{className:"w-fit px-[4px] h-[16px] border border-primary-purple rounded-[3px] flex items-center justify-center text-[12px] text-[#ff6900] mb-[0.52vw]",children:z("packageSet")}),5===e.type&&(0,i.jsx)("span",{className:"w-fit px-[4px] h-[16px] border border-primary-purple rounded-[3px] flex items-center justify-center text-[12px] text-primary-purple mb-[0.52vw]",children:z("redeemedItem")}),4===e.type&&(0,i.jsx)("span",{className:"w-fit px-[4px] h-[16px] border border-primary-purple rounded-[3px] flex items-center justify-center text-[12px] text-primary-purple mb-[0.52vw]",children:z("gift")}),((e=>{try{if(I?.tmp?.carts?.length){for(let t of I.tmp.carts)if(t.id===e.cart_id)return 1===t.products_promotions_show&&t.products_promotions_qty>0&&4===Number(t.products_promotions_type)||2===t.products_promotions_show&&4===Number(t.products_promotions_type)}}catch(e){y.Ay.log("getIsPromotion error",e)}return!1})(r)||(e=>{try{if(I?.tmp?.carts?.length){for(let t of I.tmp.carts)if(t.id===e.cart_id)return 1===t.products_promotions_show&&t.products_promotions_qty>0&&3===Number(t.products_promotions_type)||2===t.products_promotions_show&&3===Number(t.products_promotions_type)}}catch(e){y.Ay.log("getIsSeckill error",e)}return!1})(r))&&(0,i.jsx)("span",{className:"w-fit px-[4px] h-[16px] border border-primary-purple rounded-[3px] flex items-center justify-center text-[12px] text-primary-purple mb-[0.52vw]",children:(e=>{let{product:{activity_style:{product_item_rules_text:t=""}={}}={}}=e;return t||"Seckill"})(r)}),(a=r.product.product_group,(0,k.Wm)({userInfo:D,landingPage:{},productGroup:a})&&(0,i.jsx)(s.default,{className:"static h-[16px] w-[86px] block mb-[0.52vw] transform-none left-0",src:"/layout/member_only.png",alt:"",width:172,height:32})),(0,i.jsx)("p",{className:"text-[#333333] mt-0 flex items-center text-[clamp(12px,0.73vw,18px)]",children:(0,i.jsx)("span",{className:"font-bs truncate",children:r.product.short_name})}),(0,i.jsxs)("p",{className:"mt-[0.33vw] text-[clamp(12px,0.73vw,18px)]",children:[z("color"),": ",r.product.color]}),ei(r)&&(0,i.jsx)("p",{className:"mt-[0.33vw] text-[clamp(12px,0.73vw,18px)]",children:ei(r)}),(0,i.jsxs)("p",{className:"flex justify-between items-center mt-[0.33vw]",children:[(0,i.jsxs)("span",{className:"text-[clamp(12px,0.73vw,18px)]",children:[z("qty"),": ",(0,i.jsx)("span",{className:"notranslate",children:r.qty})]}),ea(r)&&(0,i.jsx)("span",{className:"ml-auto self-end text-[#333333] font-bs text-[clamp(12px,0.73vw,18px)]",children:(0,N.IO)(ea(r),F)})]}),l&&(0,i.jsx)(c.N7,{images:l.images,giftCount:l.giftCount,stopPropagation:!0,className:"mt-[0.52vw]"})]})]},r.cart_id)})},r))})}),(0,i.jsxs)("div",{className:"shadow-[0px_-4px_12px_0px_rgba(137,144,154,0.1)] px-[1.45vw] py-[0.98vw]",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-[12px] border-b border-[#d1d9e0] pb-[12px] text-[14px] leading-[18px] text-[#333333]",children:[(0,i.jsxs)("p",{className:"flex w-full items-start justify-between gap-[12px]",children:[(0,i.jsxs)("span",{children:[z("total")," (",(0,i.jsx)("span",{className:"notranslate",children:J})," ",J>1?z("items"):z("item"),")"]}),(0,i.jsx)("span",{className:"flex-shrink-0 notranslate",children:(0,N.IO)(I.price_display?.total||"0.00",F)})]}),Y&&(0,i.jsxs)("p",{className:"flex w-full items-start justify-between gap-[12px]",children:[(0,i.jsx)("span",{children:z("itemDiscount")}
1),(0,i.jsxs)("span",{className:"flex-shrink-0 notranslate",children:["-",(0,N.IO)(K,F)]})]}),(0,i.jsxs)(i.Fragment,{children:[I.discount&&"0.00"!==I.discount&&(0,i.jsxs)("p",{className:"flex w-full items-start justify-between gap-[12px]",children:[(0,i.jsxs)("span",{className:"text-[#333333]",children:[E?.config_names?.product_content_half_price_member.rule.discount_text,"\xa0",E?.config_names?.product_content_half_price_member.rule.discount_rate,"% ",z("off")]}),(0,i.jsxs)("span",{className:"flex-shrink-0 text-[#333333] notranslate",children:["-",(0,N.IO)(I.discount,F)]})]}),w.ku&&H>0&&(0,i.jsxs)("p",{className:"flex w-full items-start justify-between gap-[12px]",children:[(0,i.jsxs)("span",{className:"min-w-0 break-words text-[#333333]",children:["Code / Coupon",W&&(0,i.jsxs)(i.Fragment,{children:[": ",(0,i.jsx)("span",{className:"text-[#676e75]",children:W})]})]}),(0,i.jsxs)("span",{className:"flex-shrink-0 text-[#333333] notranslate",children:["-",(0,N.IO)(String(H),F)]})]}),w.ku&&Q>0&&(0,i.jsxs)("p",{className:"flex w-full items-start justify-between gap-[12px]",children:[(0,i.jsxs)("span",{className:"text-[#333333]",children:["Points",U>0&&(0,i.jsxs)("span",{className:"text-[#676e75]",children:[": ",U,"Points"]})]}),(0,i.jsxs)("span",{className:"flex-shrink-0 text-[#333333] notranslate",children:["-",(0,N.IO)(String(Q),F)]})]})]})]}),(0,i.jsxs)("div",{className:"mb-[16px] flex flex-col gap-[4px] pt-[12px]",children:[(0,i.jsxs)("p",{className:"flex w-full items-center justify-between gap-[12px] text-[18px] leading-[22px] font-bb text-[#333333]",children:[(0,i.jsx)("span",{children:z("subtotal")}),(0,i.jsx)("span",{className:"flex-shrink-0 notranslate",children:(0,N.IO)(I.subtotal,F)})]}),V&&(0,i.jsxs)("p",{className:"flex w-full items-center justify-between gap-[12px] text-[14px] leading-[18px]",children:[(0,i.jsx)("span",{className:"text-[#676e75]",children:z("totalSaving")}),(0,i.jsx)("span",{className:"flex-shrink-0 text-[#333333] notranslate",children:(0,N.IO)(Z,F)})]})]}),X&&(0,i.jsx)("div",{ref:ee.giftEntryRef,children:(0,i.jsx)(c.xe,{images:X.images,imageIsGlass:X.isGlass,text:X.text,clickable:X.clickable,showArrow:X.showArrow,onClick:()=>{X&&(ee.onGiftLayerClick(),X.clickable&&e?.(X,I.show_gift,I.base_subtotal))},stopPropagation:!0,className:"mb-[0.83vw]"})}),(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsx)(o.A,{className:`w-[10.1vw] h-[2.08vw] !font-bs  ${r?"opacity-50 cursor-not-allowed":""}`,onClick:e=>{e.stopPropagation(),et(A),es({btn_name:"Proceed to Checkout"})},variant:"contained",disabled:r,sx:{"&":{padding:0,fontSize:"12px"}},children:r?z("loading"):z("proceedToCheckout")}),(0,i.jsx)(o.A,{className:"w-[10.1vw] h-[2.08vw] ml-[10px] !font-bs",onClick:e=>{e.stopPropagation(),"/cart"!==window.location.pathname&&(sessionStorage.setItem("zl-sensors-entrance-cart-scene","导航位购物车弹窗"),t.push("/cart")),es({btn_name:"View My Cart"})},variant:"outlined",sx:{"&":{padding:0,fontSize:"12px"}},children:z("viewMyCart")})]})]})]}):null}},38214:(e,t,r)=>{r.d(t,{Zb:()=>a,wF:()=>n});let i="zl-paymentOfferSession",s=()=>void 0===globalThis.sessionStorage?null:globalThis.sessionStorage,a=()=>{let e=s();if(!e)return{};let t=e.getItem(i);return t?JSON.parse(t):{}},n=e=>{let t=s();t&&(e.coupon||e.code||1===e.point||e.appliedCouponDetailId||e.appliedCouponType||e.show_best_offer_text?t.setItem(i,JSON.stringify(e)):t.removeItem(i))}},55462:(e,t,r)=>{r.d(t,{Po:()=>n,Sg:()=>i,T_:()=>s,_0:()=>a});let i=e=>e?.prescription_type_name?.trim()||e?.prescription_type?.trim()||"",s=e=>{let t={...e},r={},{prescription:i}=e;if(i){let e=["coating_id","lens_id","od_axis","os_axis","name"];for(let t of Object.keys(i))isNaN(parseFloat(i[t]))||e.includes(t)?r[t]=`${i[t]}`:r[t]=`${parseFloat(i[t]).toFixed(2)}`;t.prescription=r}return t},a=e=>!!(e.od_pv&&"0.00"!==e.od_pv||e.os_pv&&"0.00"!==e.os_pv||e.od_pv_r&&"0.00"!==e.od_pv_r||e.os_pv_r&&"0.00"!==e.os_pv_r),n=e=>!!((e.pd_l||e.pd_r)&&!e.pd)},58436:(e,t,r)=>{r.d(t,{A:()=>x});var i=r(63109);let s=(e,t)=>{if(!/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(e))return;let r=e.toLowerCase().replace(/#/g,""),i=r.length;if(3===i){let e="";for(let t=0;t<i;t++)e+=r.slice(t,t+1).concat(r.slice(t,t+1));r=e}let s=[];for(let e=0;e<6;e+=2){let t=r.slice(e,e+2);s.push(parseInt(`0x${t}`,16))}return`rgba(${s.join(",")},${t})`};var a=r(10401),n=r(23991),l=r(80970);let o=(0,l.default)("div")({position:"relative",width:"100%",height:"auto"}),c=(0,l.default)("img")({position:"absolute",left:0,top:0,display:"block",width:"100%",height:"auto",zIndex:10}),p=(0,l.default)("img")({position:"absolute",left:0,top:0,display:"block",width:"100%",height:"auto",zIndex:8}),d=(0,l.default)("div")({aspectRatio:"2/1",position:"relative",zIndex:9,width:"100%",height:"auto",transform:"scale(0.9)"}),u=(0,l.default)(d)({"@keyframes animation-bg":{"0%":{opacity:.1},"100%":{opacity:.8}},animationName:"animation-bg",animationDuration:"2s",animationTimingFunction:"ease-in-out",animationIterationCount:"infinite",animationDirection:"alternate"}),m=(0,l.default)("img")({width:"100%",display:"block"});function f(e){let{showFrameBg:t=!1,legBg:r="",frameBg:s="",frameBgColor:l="",originGlassImg:f="",isGradient:x=!0,isGlass:g=!0,isGrayImage:h=!1,boxClassName:_=""}=e,b=(0,a.useRef)(null);return(0,a.useEffect)(()=>
1{if(b.current&&x){let e=b.current,t=()=>{let t=`${Math.random()}s`;e.style.animationDelay=t};return e.addEventListener("animationstart",t),()=>{e.removeEventListener("animationstart",t)}}},[x]),(0,i.jsxs)(n.default,{className:`${g?"w-4/5":"w-full"} ${!h||t?"mix-blend-multiply":""} h-auto ${_}`,children:[t&&(0,i.jsxs)(o,{sx:{"--bg-color":l},children:[(0,i.jsx)(p,{src:r,className:"leg_bg",alt:"zeelool glasses"}),x?(0,i.jsx)(u,{ref:b,className:"lens_bg_color transiton-bg",sx:{background:"var(--bg-color)"}}):(0,i.jsx)(d,{ref:b,className:"lens_bg_color",sx:{background:"var(--bg-color)"}}),(0,i.jsx)(c,{src:s,className:"frame_bg",alt:"zeelool glasses"})]}),!t&&f&&(0,i.jsx)(m,{className:"glass-img",src:f,alt:"zeelool glasses"})]})}function x(e){let{product:t={},lens:r={},imageUrl:n="",isGlass:l=!0,onlyShowImage:o=!1,boxClassName:c="",forceAccessoryDisplay:p=!1}=e,[d,u]=(0,a.useState)(!1),[m,x]=(0,a.useState)(""),[g,h]=(0,a.useState)(""),[_,b]=(0,a.useState)(""),[y,w]=(0,a.useState)(""),[v,N]=(0,a.useState)(!1),[j,k]=(0,a.useState)(!1),S=(0,a.useCallback)(()=>{let e="transparent",t=r||{},{color_no:i}=t,{transparency:a}=t,{polarized_light_transparency:n}=t,{polarized_light_color_no:l}=t,o=l||"",c=n||0;return i&&a&&(e=""!==o&&0!=+c?`linear-gradient(${s(i,a)}, ${s(o,c)})`:s(i,a)),e},[r]),C=(0,a.useCallback)(()=>{o?w(n):w(t?.image_gray||t?.img||t?.image||n),x(t?.background_image_of_mirror_leg||""),h(t?.frame_background_image||""),N(r?.is_transparency_change===1),b(S()),u(!!t?.background_image_of_mirror_leg&&!!t?.frame_background_image)},[t,r,n,S]);return(0,a.useEffect)(()=>{C()},[C]),(0,a.useEffect)(()=>{if(d)return void k(!1);k(t?.image?.product_gray&&t.image.product_gray.length>0||!!t?.image_gray)},[d]),(0,i.jsx)(f,{showFrameBg:!p&&d,legBg:m,frameBg:g,frameBgColor:_,originGlassImg:y,isGradient:v,isGlass:!p&&l,isGrayImage:j,boxClassName:c})}},63696:(e,t,r)=>{r.d(t,{D:()=>s});let i=e=>{let t=Number(e);return Number.isFinite(t)&&t>0?t:0};function s(e){let{selectedItems:t,pricingItems:r,showGift:s}=e,a=new Map;return r?.forEach(e=>{void 0!==e.id&&null!==e.id&&a.set(String(e.id),e)}),(t||[]).reduce((e,t)=>{let r=void 0===t.cart_id||null===t.cart_id?void 0:a.get(String(t.cart_id)),s=r?.send_gifts!==void 0?r.send_gifts:t.send_gifts;return e+i(t.qty)+(s||[]).reduce((e,t)=>e+i(t.gift_product_qty),0)},0)+(s?.show!==!1&&s?.is_satisfied===1&&i(s.gift_count)>0?i(s.gift_count):0)}},80552:(e,t,r)=>{r.d(t,{N7:()=>u,xe:()=>m});var i=r(63109),s=r(65665),a=r(55879),n=r(20218),l=r(20422);let o=e=>e.filter(Boolean);function c(e){let{images:t,variant:r,imageIsGlass:a=!1}=e,n=o(t),l="summary-bar"===r,c=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"product-inline"===e?{boxClassName:"h-[48px] w-[48px]",imageClassName:"absolute left-1/2 top-1/2 h-auto w-full -translate-x-1/2 -translate-y-1/2",imageWidth:48,imageHeight:48}:{boxClassName:"h-[40px] w-[40px]",imageClassName:`h-auto object-contain ${t?"w-4/5 mix-blend-multiply":"w-[30px]"}`,imageWidth:30,imageHeight:30}}(r,a);return(0,i.jsx)("span",{className:l?"flex h-[40px] min-w-[40px] items-center gap-[4px]":"flex h-[48px] max-w-[390px] min-w-0 flex-1 items-center gap-[6px] overflow-hidden whitespace-nowrap",children:n.map((e,t)=>(0,i.jsx)("span",{className:`flex shrink-0 items-center justify-center overflow-hidden rounded-[4px] ${l?"bg-[#eeeeee] p-[5px]":"relative bg-white"} ${c.boxClassName}`,children:(0,i.jsx)(s.default,{src:e,alt:"",width:c.imageWidth,height:c.imageHeight,className:c.imageClassName})},`${e}-${t}`))})}function p(e){let{text:t}=e,r=t.match(/^(.*?x)\s*(\d+)$/i);return r?(0,i.jsxs)("span",{className:"whitespace-nowrap text-[#282828]",children:[(0,i.jsx)("span",{className:"font-br text-[12px] leading-[16px]",children:r[1]}),(0,i.jsx)("span",{className:"font-br text-[14px] leading-[20px]",children:" "}),(0,i.jsx)("span",{className:"font-bb text-[12px] leading-[16px]",children:r[2]})]}):(0,i.jsx)("span",{className:"font-br text-[12px] leading-[16px] text-[#282828]",children:t})}function d(e){let{variant:t,images:r,imageIsGlass:s=!1,text:a,clickable:d=!1,showArrow:u=!1,arrowDirection:m="right",tone:f="dark",rounded:x=!0,transparent:g=!1,className:h="",onClick:_,stopPropagation:b=!1}=e,y="summary-bar"===t,w=y&&"light"===f,v=o(r);if(0===v.length||!y&&!a)return null;let N=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c,{images:v,variant:t,imageIsGlass:s}),(0,i.jsx)("span",{className:y?`min-w-0 flex-1 break-words ${w?"text-[#282828]":"text-white"}`:"shrink-0",children:y?a&&(0,i.jsx)("span",{className:"block font-br text-[12px] leading-[14px]",children:a}):(0,i.jsx)(p,{text:a||""})}),u&&(0,i.jsx)(i.Fragment,{children:"up"===m?(0,i.jsx)(n.A,{"aria-hidden":!0,
1className:`shrink-0 text-[16px] ${w?"text-[#282828]":"text-white"}`}):(0,i.jsx)(l.A,{"aria-hidden":!0,className:y?`shrink-0 text-[16px] ${w?"text-[#282828]":"text-white"}`:"shrink-0 text-[16px]"})})]}),j=y?`flex h-[52px] w-full items-center gap-[10px] ${x?"rounded-[4px]":""} p-[6px] text-left ${w?"border border-[#eeeeee] bg-white":g?"":"bg-[rgba(0,0,0,0.5)] backdrop-blur-[6px]"} ${h}`:`flex h-[56px] w-full cursor-default items-center rounded-[4px] bg-[#f8f9fa] py-[4px] pl-[4px] pr-[12px] ${h}`,k=e=>{b&&(e.preventDefault(),e.stopPropagation()),_?.()};return d&&_?(0,i.jsx)("button",{type:"button",onClick:k,className:`cursor-pointer ${j}`,children:N}):(0,i.jsx)("div",{className:j,onClick:_||b?e=>{k(e)}:void 0,children:N})}function u(e){let{images:t,giftCount:r,className:s="",stopPropagation:n=!1}=e,d=(0,a.c)("goodsDetail"),u=o(t),m=d("freeGift.quantity",{count:r});return 0!==u.length&&m?(0,i.jsxs)("div",{className:`flex h-[56px] w-full cursor-default items-center rounded-[4px] bg-[#f8f9fa] py-[4px] pl-[4px] pr-[12px] ${s}`,onClick:n?e=>{n&&(e.preventDefault(),e.stopPropagation())}:void 0,children:[(0,i.jsx)(c,{images:u,variant:"product-inline"}),(0,i.jsx)(l.A,{className:"ml-[6px] shrink-0 text-[14px] text-[#a9a9a9]"}),(0,i.jsx)("div",{className:"ml-auto text-[14px] text-[#282828]",children:(0,i.jsx)(p,{text:m})})]}):null}function m(e){return(0,i.jsx)(d,{variant:"summary-bar",...e})}},84363:(e,t,r)=>{r.d(t,{BP:()=>p,Ms:()=>o,PQ:()=>n,Qc:()=>l,bm:()=>d,oS:()=>c});var i=r(84756),s=r(71823);let a={codeCoupon:"Code / Coupon",discount:"Discount",off:"Off",point:"Point",points:"Points"},n=e=>s.ku&&e?.product_payable_no_half?Number(e.product_payable_no_half||0):Number(e?.product_payable||0)+Number(e?.product_rule_discounts_price||0),l=e=>e.split(";")[0]?.replace(/<br\s*\/?>/gi," ").trim()||"",o=function(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=(e=>{let t=e.applied_offer?.coupon?.detail;return t?.coupon?.discount_code||t?.discount_code||t})(e);return(a&&"object"==typeof a&&void 0!==a.way?l((0,i.nr)(a,t,r)):"")||l(s)||e.applied_offer?.coupon?.code||""},c=e=>{if(null==e||""===e)return 0;let t=Number(String(e).replace(/,/g,""));return Number.isFinite(t)?t:0},p=function(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=r?e.applied_offer?.point:void 0,s=c(i?.availablePoint),a=c(i?.expendPoint),n=c(i?.maxExpendPoint),l=c(i?.maxDiscount);return{availablePoint:s,canUsePoints:n>0||a>0,discountAmount:r?Math.abs(c(e.point_discount)):0,expendPoint:a,hasAppliedPoint:a>0,isChecked:!!(t&&a>0),maxPoint:n,redeemPoint:a||n,maxDiscount:l}},d=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.couponText||"",s=[],n=e.applied_offer?.point,l=e.applied_offer?.coupon,o=!!(e.applied_offer?.applied&&l?.source&&"none"!==l.source),p=String(e.discount||"0.00");if(c(p)>0&&s.push({key:"discount",label:(e=>{let t=e?.rule?.discount_text||a.discount,r=e?.rule?.discount_rate?` ${e.rule.discount_rate}% ${a.off}`:"";return`${t}${r}`})(t),value:p}),r.couponEnabled&&s.push({key:"code_discount",label:a.codeCoupon,description:o?i:"",value:o?String(e.code_discount||"0.00"):""}),r.couponEnabled){let t=r.token?n?.expendPoint:void 0,i=1===t?a.point:a.points;s.push({key:"point_discount",label:a.points,description:"number"==typeof t&&Number.isFinite(t)&&t>0?`${t} ${i}`:"",value:r.token?String(e.point_discount||"0.00"):"0.00"})}return s}},92632:(e,t,r)=>{r.d(t,{S:()=>s});let i=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),s=e=>{if(!i(e)||200!==e.code||!i(e.data))return{status:"invalid"};let t=e.data.code;return void 0===t?{status:"allowed"}:"number"==typeof t&&Number.isFinite(t)?0===t?{status:"allowed"}:{status:"restricted",data:e.data}:{status:"invalid"}}}}]);

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.