PageSourceSearch

https://www.popchill.com/_next/static/chunks/4418-a329ec9632ef2159.js

js popchill.com collected 2026-09-24 10:05:44 UTC 11,432 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4418],{45163:function(e,t,r){r.d(t,{h:function(){return n.Z}});var n=r(44300);r(86662)},53481:function(e,t,r){r.d(t,{FM:function(){return n},gl:function(){return useCreateProduct},s6:function(){return useGetEditProduct},gr:function(){return useGetProductConditions},XK:function(){return useGetProductSizes},UL:function(){return useGetSellerEarnings},vO:function(){return useUpdateProduct},e5:function(){return useUploadProductImg}});var n={forgeGetProductConditionsQueryKey:e=>["getProductConditions",e],forgeGetProductSizesQueryKey:()=>["getProductSizes"],forgeGetEditProduct:e=>["getEditProduct",e],forgeGetSellerEarningsQueryKey:()=>["getSellerEarnings"],forgeGetBrandsQueryKey:()=>["getBrands"],forgeGetAvailabilityRegionQueryKey:()=>["forgeGetAvailabilityRegionQueryKey"]},i=r(98029),o=r(18117);let createProduct=async(e,t)=>{let{images:r,title:n,desc:i,category_id:a,condition_id:s,price:c,original_price:l,size_id:u,brand_id:d,custom_brand:g,style_ids:h,shipping_covered_by:m,session_id:p,is_charity:y,isSecret:f,bargain_active:P,accessories:x,custom_accessory:C,price_reduction_floor_price:w,price_reduction_enable:b,video:k,recommend_price:v,custom_sku:_}=e,j={images:r,title:n,desc:i,category_id:a,condition_id:s,price:c,original_price:l,shipping_covered_by:m,session_id:p,is_charity:y,status:f?"secret":"selling",bargain_active:P,accessories:x,custom_accessory:C,price_reduction_floor_price:w,price_reduction_enable:b,video:k,recommend_price:v,custom_sku:_||null};u&&(j.size_id=u),d&&!g&&(j.brand_id=d),!d&&g&&(j.custom_brand=g),h&&h.length&&(j.style_ids=h);let E=e.isForce?1:0;try{let e=await (0,o.ZP)({options:{method:"post",url:"/v2/createProduct?is_force=".concat(E),data:j,headers:{"X-POP-ID":t}}});return"number"==typeof e?null:e.data}catch(e){return Promise.reject(e)}},useCreateProduct=(e,t)=>(0,i.D)({mutationFn:t=>createProduct(t,e),...t});var a=r(78551);let getProductConditions=async e=>{try{let t=await (0,o.ZP)({queryKey:n.forgeGetProductConditionsQueryKey(e),options:{method:"get",url:"/getProductConditions?type=".concat(e)}});return"number"==typeof t?null:t.data}catch(e){return Promise.reject(e)}},useGetProductConditions=(e,t)=>(0,a.a)({queryKey:n.forgeGetProductConditionsQueryKey(e),queryFn:()=>getProductConditions(e),...t,staleTime:3e5,gcTime:6e5}),getProductSizes=async e=>{try{let t=await (0,o.ZP)({queryKey:n.forgeGetProductSizesQueryKey(),options:{method:"get",url:"/getProductSizes?category_id=".concat(e)}});return"number"==typeof t?null:t.data}catch(e){return Promise.reject(e)}},useGetProductSizes=(e,t)=>(0,a.a)({queryKey:[n.forgeGetProductSizesQueryKey(),e],queryFn:()=>getProductSizes(e),...t,staleTime:3e5,gcTime:6e5}),uploadProductImg=async(e,t)=>{let r=new FormData;r.append("image",t);try{let t=await (0,o.ZP)({options:{method:"post",url:"/uploadProductImg",headers:{"X-POP-ID":e,"Content-Type":"multipart/form-data"},data:r}});return"number"==typeof t?null:t.data}catch(e){return Promise.reject(e)}},useUploadProductImg=(e,t)=>(0,i.D)({mutationFn:t=>uploadProductImg(e,t),...t}),getEditProduct=async(e,t)=>{try{let r=await (0,o.ZP)({options:{method:"get",url:"/editProducts/".concat(t),headers:{"X-POP-ID":e}}});return"number"==typeof r?null:r.data}catch(e){return Promise.reject(e)}},useGetEditProduct=(e,t,r)=>(0,a.a)({queryKey:n.forgeGetEditProduct(t),queryFn:()=>getEditProduct(e,t),...r}),updateProduct=async(e,t)=>{let{no:r,images:n,title:i,desc:a,category_id:s,condition_id:c,price:l,original_price:u,size_id:d,brand_id:g,custom_brand:h,style_ids:m,shipping_covered_by:p,session_id:y,status:f,is_charity:P,bargain_active:x,accessories:C,custom_accessory:w,price_reduction_enable:b,price_reduction_floor_price:k,video:v,recommend_price:_,custom_sku:j}=e,E={no:r,images:n,title:i,desc:a,category_id:s,condition_id:c,price:l,original_price:u,shipping_covered_by:p,session_id:y,status:f,is_charity:P,bargain_active:x,accessories:C,custom_accessory:w,price_reduction_enable:b,price_reduction_floor_price:k,video:v,recommend_price:_,custom_sku:j||null};E.images=E.images.map(e=>"string"==typeof e?{id:e,block_id:13,new:!0}:e),d&&(E.size_id=d),g&&!h&&(E.brand_id=g),!g&&h&&(E.custom_brand=h),m&&m.length&&(E.style_ids=m);try{let e=await (0,o.ZP)({options:{method:"post",url:"/v2/updateProduct",data:E,headers:{"X-POP-ID":t}}});return"number"==typeof e?null:e.data}catch(e){return Promise.reject(e)}},useUpdateProduct=(e,t)=>
1(0,i.D)({mutationFn:t=>updateProduct(t,e),...t}),getSellerEarnings=async(e,t,r,i,a)=>{let s=["price=".concat(t||0),"shipping_covered_by=".concat(r),"is_charity=".concat(a)];i&&s.push("commission=".concat(i));let c="/getSellerEarnings?".concat(s.join("&"));try{let t=await (0,o.ZP)({queryKey:n.forgeGetSellerEarningsQueryKey(),options:{method:"get",url:c,headers:{"X-POP-ID":e}}});return"number"==typeof t?null:t.data}catch(e){return Promise.reject(e)}},useGetSellerEarnings=(e,t,r,i,o,s)=>(0,a.a)({queryKey:n.forgeGetSellerEarningsQueryKey(),queryFn:()=>getSellerEarnings(e,t,r,i,o),...s})},57871:function(e,t,r){var n=r(85893),i=r(41664),o=r.n(i);r(67294);var a=r(24836),s=r(63736),c=r(2804),l=r(4728),u=r(11163),d=r(75689);t.Z=e=>{let{className:t="fixed bottom-6 right-3"}=e,r=(0,u.useRouter)(),i=(0,c.sJ)(l.K);return(0,n.jsxs)(o(),{href:"https://popchill.onelink.me/TEC1/uxlqydil",className:"".concat(t," bg-primary text-white text-sm rounded-full  z-20  py-1.5 px-3 flex w-[72px] items-center justify-center"),style:{boxShadow:"0px 3px 10px 0px rgba(0, 0, 0, 0.15)"},onClick:()=>{let e={click_source:"floating_button",user_status:"login"===i.status?"registered":"unregistered",page_path:"/"+r.locale+r.asPath};s.sendGA4Event("upload_item_clicked",e),d.rr("trackCustom","upload_item_clicked",e)},children:[(0,n.jsx)(a.Z,{width:"14",height:"14"}),(0,n.jsx)("span",{className:"ml-1.5",children:"上架"})]})}},52289:function(e,t,r){r.d(t,{Z:function(){return CreateProductMenuMweb}});var n=r(85893),i=r(67294),o=r(41664),a=r.n(o),s=r(24836),c=r(63736),l=r(75689),u=r(2804),d=r(4728),g=r(11163);function CreateProductMenuMweb(e){let{className:t=""}=e,[r,o]=(0,i.useState)(!1),h=(0,i.useRef)(null),m=(0,g.useRouter)(),p=(0,u.sJ)(d.K);(0,i.useEffect)(()=>{let handleClickOutside=e=>{h.current&&!h.current.contains(e.target)&&o(!1)};return document.addEventListener("mousedown",handleClickOutside),document.addEventListener("touchstart",handleClickOutside),()=>{document.removeEventListener("mousedown",handleClickOutside),document.removeEventListener("touchstart",handleClickOutside)}},[]);let trackClick=e=>{if("selflisting"===e){let e={click_source:"product_create",type:"product_create",user_status:"login"===p.status?"registered":"unregistered",page_path:"/"+m.locale+m.asPath};c.sendGA4Event("click",e),l.rr("trackCustom","product_create",e)}else c.sendGA4Event("click",{click_source:"product_create",type:"consignment"})};return(0,n.jsxs)("div",{ref:h,className:"".concat(t," fixed bottom-6 right-3 z-30"),children:[(0,n.jsxs)("div",{className:"absolute bottom-12 right-0 flex flex-col items-end gap-2 transition-all duration-200 ".concat(r?"opacity-100 translate-y-0":"opacity-0 translate-y-2 pointer-events-none"),children:[(0,n.jsx)(a(),{href:"https://popchill-short.onelink.me/gc8z/tvuoqahg",onClick:()=>trackClick("consignment"),className:"w-[24vw] block bg-white text-primary text-sm font-semibold rounded-full py-2 box-shadow-10 text-center",children:"寄賣/賣斷"}),(0,n.jsx)(a(),{href:"https://popchill.onelink.me/TEC1/uxlqydil",onClick:()=>trackClick("selflisting"),className:"w-[21.333vw] block bg-white text-primary text-sm font-semibold rounded-full  py-2 box-shadow-10 text-center",children:"自助上架"})]}),(0,n.jsxs)("button",{onClick:()=>o(e=>!e),className:"bg-primary text-white text-sm rounded-full py-2 px-3 flex w-[72px] items-center justify-center shadow-10 active:scale-95 transition-transform",children:[(0,n.jsx)(s.Z,{width:"14",height:"14"}),(0,n.jsx)("span",{className:"ml-1.5",children:"上架"})]})]})}},24836:function(e,t,r){var n=r(85893);r(67294),t.Z=e=>{let{width:t="100%",height:r="100%",...i}=e;return(0,n.jsx)("svg",{style:{width:t,height:r},...i,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{id:"Path 203",d:"M13.2227 6.2223H7.77695V0.778057C7.77695 0.571898 7.69506 0.374183 7.54928 0.228406C7.4035 0.0826299 7.20579 0.000732422 6.99963 0.000732422C6.79347 0.000732422 6.59576 0.0826299 6.44998 0.228406C6.3042 0.374183 6.2223 0.571898 6.2223 0.778057V6.2223H0.778067C0.675925 6.2222 0.574765 6.24223 0.48037 6.28125C0.385975 6.32027 0.300196 6.37752 0.227936 6.44971C0.155676 6.5219 0.0983524 6.60762 0.0592418 6.70198C0.0201313 6.79634 3.07742e-07 6.89748 3.54242e-07 6.99962C-9.72158e-05 7.10182 0.0199616 7.20304 0.0590286 7.29749C0.0980955 7.39193 0.155404 7.47774 0.227673 7.55001C0.299943 7.62228 0.385755 7.67959 0.480198 7.71866C0.574642 7.75773 0.675862 7.77778 0.778067 7.77769H6.2223V13.2219C6.2223 13.4281 6.3042 13.6258 6.44998 13.7716C6.59576 13.9174 6.79347 13.9992 6.99963 13.9992C7.20579 13.9992 7.4035 13.9174 7.54928 13.7716C7.69506 13.6258 7.77695 13.4281 7.77695 13.2219V7.77769H13.2227C13.3248 7.77769 13.426 7.75756 13.5203 7.71844C13.6147 7.67933 13.7004 7.62201 13.7726 7.54975C13.8448 7.47749 13.902 7.39171 13.941 7.29732C13.9801 7.20292 14.0001 7.10176 14 6.99962C14 6.79346 13.9181 6.59574 13.7723 6.44997C13.6265 6.30419 13.4288 6.2223 13.2227 6.2223Z",fill:"white"})})}},51959:function(e,t,r){r.d(t,{Z:function(){return layout_MainLayout}});var n=r(85893),i=r(67294),o=r(21179),a=r(11163),s=r(96465);r(44300);var c=r(58727),l=r(43971),u=r(45163),d=r(41795),g=r(31955),h=r(5152),m=r.n(
1h),p=r(52289),y=r(57871),f=r(2804),P=r(47872);let x=m()(()=>r.e(797).then(r.bind(r,797)),{loadableGenerated:{webpack:()=>[797]},ssr:!1});var layout_MainLayout=e=>{var t;let{children:r,headerHidden:h=!1,footerHidden:m=!1,subheaderHidden:C=!1,isAppWebview:w=!1,className:b="",showDownloadAppButton:k=!1,showCreateProductButton:v=!1}=e;(0,f.sJ)(P.KL);let _=(0,a.useRouter)(),{isLg:j}=(0,o.Z)(),{isWebview:E}=(0,d.Z)(),G=g.Z.get("in_popchill_app"),Z=w||_.query&&"1"===_.query.inapp||E&&G,[K,S]=(0,i.useState)(!1),[q,N]=(0,i.useState)(!1),z=null!==(t=g.Z.get("downloadAppTipHide"))&&void 0!==t?t:null;return(0,i.useEffect)(()=>{let e,t;if(!k||K||z||Z||j){N(!1);return}let schedulePanel=()=>{e=window.setTimeout(()=>{N(!0)},1200)};return"requestIdleCallback"in window?t=window.requestIdleCallback(schedulePanel,{timeout:2e3}):schedulePanel(),()=>{e&&window.clearTimeout(e),t&&"cancelIdleCallback"in window&&window.cancelIdleCallback(t)}},[z,K,Z,j,k]),(0,n.jsx)("div",{className:"".concat(b," relative"),children:Z?(0,n.jsx)("main",{className:"min-h-screen",children:r}):(0,n.jsxs)(n.Fragment,{children:[!h&&(0,n.jsx)("div",{className:"hidden lg:block",children:(0,n.jsx)(u.h,{})}),!h&&(0,n.jsx)("div",{className:"block lg:hidden",children:(0,n.jsx)(c.Z,{})}),!C&&(0,n.jsx)("div",{className:"hidden lg:block",children:(0,n.jsx)(l.f,{})}),(0,n.jsx)("main",{className:"min-h-[812px] bg-gray-lighter lg:bg-inherit pb-[50px] lg:pb-0",children:r}),!m&&(0,n.jsx)(s.Z,{}),(0,n.jsxs)("div",{className:"block lg:hidden",children:[k&&q&&!K&&!z&&(0,n.jsx)(x,{handle:()=>{let e=new Date;e.setDate(e.getDate()+1),g.Z.set("downloadAppTipHide","1",{expires:e}),S(!0)}}),v&&(0,n.jsx)(n.Fragment,{children:"zh-TW"!==_.locale?(0,n.jsx)(y.Z,{}):(0,n.jsx)(p.Z,{})})]})]})})}}}]);

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.