PageSourceSearch

https://emindyoga.com/_/fo-shopping/assets/notification-surface-eCZ0M6EI.js

js emindyoga.com collected 2026-10-02 01:30:12 UTC 17,936 bytes, 1 lines download raw bytes

1import{j as ee,c as d,b as a,r as p,F as ce}from"./client-BLZHgAOY.js";import{u as ue}from"./useQuery-B3Y4B9Bb.js";import{u as _e}from"./useSuspenseQuery-V2ZPrIEt.js";import{b as Se,S as Te,D as R,L as O,r as Ee,v as K,w as ve,P as de,C as me,x as te,y as Re,m as Ie,i as Ae,g as we,f as Le,e as Pe,j as Oe,a as Me,u as De,l as ae}from"./product-summary-BIcte1uF.js";import{e as qe}from"./index-nNWNo2Hg.js";import{a as ke,i as $e}from"./index-B2rxisVD.js";import{t as r}from"./index-DphZSdzt.js";import{u as pe}from"./QueryClientProvider-bRoAus1h.js";import{u as fe}from"./useMutation-Bdjs2STF.js";import{I as je}from"./icon-base-CFPnSwGa.js";import{o as ie,s as le}from"./schemas-DdR0qwqg.js";import{h as Ue,H as Fe}from"./index-DfGuOWRF.js";import{q as ne}from"./queryOptions-Cb5y-593.js";import{b as Be}from"./cart-error-boundary-Bw-qyKzC.js";import"./modal-app-CZlFCYlb.js";import"./preload-helper-0WjokmmD.js";import"./index-Cy3ZE_Wn.js";import"./magnet-node-webcomponent-LRwfbqOh.js";import"./accent-palette-Cem6D2nc.js";import"./format-currency-vS79YReB.js";function Ge({ref:e,...t}){return ee.jsx(je,{ref:e,...t,children:ee.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 1.3999C11.4437 1.3999 10.8976 1.54693 10.4145 1.82572C9.93154 2.10443 9.52854 2.50499 9.24308 2.98739L1.8331 15.6677L1.82844 15.676C1.54894 16.1722 1.4016 16.7336 1.40004 17.3046C1.39848 17.8756 1.54275 18.4378 1.81952 18.9356C2.09633 19.4334 2.49652 19.85 2.9817 20.1427C3.46696 20.4354 4.01976 20.5935 4.58501 20.5998L19.3987 20.5999L19.4151 20.5998C19.9803 20.5934 20.5331 20.4354 21.0183 20.1427C21.5035 19.85 21.9037 19.4334 22.1805 18.9356C22.4573 18.4378 22.6016 17.8756 22.6 17.3046C22.5985 16.7337 22.4513 16.1722 22.1718 15.6759L14.7586 2.99023L14.757 2.9874C14.4715 2.50501 14.0685 2.10444 13.5856 1.82572C13.1025 1.54693 12.5564 1.3999 12 1.3999ZM12.6 8C12.6 7.66863 12.3314 7.4 12 7.4C11.6686 7.4 11.4 7.66863 11.4 8V13C11.4 13.3314 11.6686 13.6 12 13.6C12.3314 13.6 12.6 13.3314 12.6 13V8ZM12.6 16C12.6 15.6686 12.3314 15.4 12 15.4C11.6686 15.4 11.4 15.6686 11.4 16V16.1C11.4 16.4314 11.6686 16.7 12 16.7C12.3314 16.7 12.6 16.4314 12.6 16.1V16Z",fill:"currentColor"})})}const Ke=new qe({getAccessTokenMaximumRetryCount:1}),Qe=globalThis.TEST_SERVER?"https://gateway-brand.dev.imwebapis.com":"https://gateway-brand.imwebapis.com";class ye extends Error{statusCode;code;constructor({statusCode:t,code:i,message:l}){super(l),this.name="GatewayError",this.statusCode=t,this.code=i}}const Ve=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&"statusCode"in e&&"data"in e;function He(e){if(!$e(e))return e;const t=e.response?.data,i=typeof t?.code=="number"?t.code:null,l=typeof t?.message=="string"?t.message:Array.isArray(t?.message)?t.message.filter(n=>typeof n=="string").join(" "):"";return new ye({statusCode:e.response?.status??0,code:i,message:l||e.message})}const M=ke.create({baseURL:Qe,timeout:1e4});M.interceptors.request.use(async e=>(e.headers.Authorization=`Bearer ${await Ke.getAccessToken()}`,e));M.interceptors.response.use(e=>Ve(e.data)?e.data.data:e.data,e=>Promise.reject(He(e)));const se={get:(e,t)=>M.get(e,t),post:(e,t,i)=>M.post(e,t,i)},g={CONTACT_MISSING:11119,CONTACT_INVALID:11120,LIMIT:11121,DUPLICATE:11122},C={RESTOCK:{title:"타이틀_재입고알림신청",description:"설명_상품재입고시마이페이지에등록된연락처로안내드려요",contactDescription:"설명_상품재입고시마이페이지에등록된연락처로안내마이페이지정보수정",limitTitle:"설명_재입고알림은최대n개까지신청할수있어요",limitDescription:"설명_마이페이지에서기존재입고알림신청목록을삭제하고다시신청해주세요",manageButton:"버튼_재입고알림관리",limitExceeded:"설명_재입고알림신청은최대n개까지가능해요",duplicate:"설명_이미재입고알림신청이등록된상품이에요",unavailable:"설명_재입고알림을신청할수없는상품이에요",failed:"설명_재입고알림신청에실패했어요"},OPEN:{title:"타이틀_오픈알림신청",description:"설명_상품오픈시마이페이지에등록된연락처로안내드려요",contactDescription:"설명_상품오픈시마이페이지에등록된연락처로안내마이페이지정보수정",limitTitle:"설명_오픈알림은최대n개까지신청할수있어요",limitDescription:"설명_마이페이지에서기존오픈알림신청목록을삭제하고다시신청해주세요",manageButton:"버튼_오픈알림관리",limitExceeded:"설명_오픈알림신청은최대n개까지가능해요",duplicate:"설명_이미오픈알림신청이등록된상품이에요",unavailable:"설명_오픈알림을신청할수없는상품이에요",failed:"설명_오픈알림신청에실패했어요"}};function D(e){return e===g.CONTACT_MISSING||e===g.CONTACT_INVALID}function be(e){return e instanceof ye?e.code:null}function q(e,t,i){const l=C[e];
1switch(t){case g.LIMIT:return r(l.limitExceeded,String(i));case g.DUPLICATE:return r(l.duplicate);case 11125:return r("설명_재고가있어구매할수있는옵션이에요");case 11101:case 11124:case 11123:case 11106:return r(l.unavailable)}return r(l.failed)}const ze=["sale","wait"];function Ye(e,t){const i=e.notificationProducts?.find(l=>l.notificationType===t);return i?.restockNotifyProdCode==null||t==="OPEN"&&!(e.preSaleInfo?.isUpcoming===!0&&ze.includes(e.prod_status))?null:{code:i.restockNotifyProdCode,label:i.buttonLabel}}const I=Se;function $({variant:e="form",onCancel:t,primary:i,children:l}){return d("div",{className:"relative flex flex-col gap-clay-150",children:[l,d("div",{className:"flex w-full items-center gap-clay-100",children:[a("button",{type:"button",onClick:t,className:`${i?Te:I} ${e==="alert"?"flex-1":""}`,children:i?r("버튼_취소"):r("버튼_확인")}),i]})]})}function j({variant:e,title:t,description:i,compact:l=!1,tightBottom:n=!1}){return e==="alert"?d("div",{className:"flex flex-col gap-clay-100 px-clay-300 pb-clay-100 pt-clay-300",children:[a("h2",{className:"m-0 text-[20px] font-bold leading-[28px] text-clay-text-default",children:t}),a("p",{className:"m-0 text-[14px] leading-[20px] text-clay-text-sub",dangerouslySetInnerHTML:{__html:i}})]}):d("div",{className:`flex flex-col gap-clay-050 px-clay-250 ${l?"pb-clay-100 pt-0":n?"pb-clay-100 pt-clay-250":"py-clay-250"}`,children:[a("h2",{className:"m-0 text-[20px] font-bold leading-[1.6] text-clay-text-default",children:t}),a("p",{className:"m-0 text-[14px] leading-[1.6] text-clay-text-sub",dangerouslySetInnerHTML:{__html:i}})]})}function Ze(e){const t=globalThis,{pathname:i,search:l}=globalThis.location,n=`${i}${l}`,o=t.base64Encode??(s=>btoa(unescape(encodeURIComponent(s))));if(e(),typeof t.SITE_MEMBER?.editProfile=="function"){t.SITE_MEMBER.editProfile(o(n));return}globalThis.location.href="/shop_mypage"}function Q({type:e,onCancel:t}){return a(R,{compact:!1,footer:a($,{variant:"alert",onCancel:t,primary:a("button",{type:"button",onClick:()=>Ze(t),className:I,children:r("버튼_연락처등록")})}),children:a(j,{variant:"alert",title:r("설명_연락처를등록해주세요"),description:r(C[e].contactDescription)})})}const Je="/shop_mypage/?m2=restock_notification";function V({type:e,limit:t,onCancel:i}){const l=C[e];return a(R,{compact:!1,footer:a($,{variant:"alert",onCancel:i,primary:a("a",{href:Je,className:I,children:r(l.manageButton)})}),children:a(j,{variant:"alert",title:r(l.limitTitle,String(t)),description:r(l.limitDescription)})})}function he(e){return e instanceof O?e.message:`${r("설명_일시적인오류가발생했어요")} ${r("설명_잠시후다시시도해주세요")}`}function ge({message:e,onClose:t}){const i=p.useRef(!1);return p.useEffect(()=>{i.current||(i.current=!0,globalThis.alert(e),t())},[e,t]),null}function We({compact:e}){return d("div",{"aria-hidden":"true",className:"animate-pulse",children:[d("div",{className:`flex flex-col gap-clay-100 px-clay-250 ${e?"pb-clay-100 pt-0":"py-clay-250"}`,children:[a("div",{className:"h-[32px] w-[160px] rounded-clay-small bg-clay-surface-sub"}),a("div",{className:"h-[22px] w-[280px] max-w-full rounded-clay-small bg-clay-surface-sub"})]}),d("div",{className:`flex items-center gap-clay-125 pb-clay-200 pt-clay-100 ${e?"px-clay-250":"px-clay-300"}`,children:[a("div",{className:"size-[64px] shrink-0 rounded-clay-base bg-clay-surface-sub"}),d("div",{className:"flex flex-col gap-clay-050",children:[a("div",{className:"h-[20px] w-[200px] rounded-clay-small bg-clay-surface-sub"}),a("div",{className:"h-[16px] w-[120px] rounded-clay-small bg-clay-surface-sub"})]})]}),a("div",{className:"h-px w-full bg-clay-divide-rest"}),d("div",{className:`flex flex-col gap-clay-100 pb-clay-150 pt-clay-250 ${e?"px-clay-250":"px-clay-300"}`,children:[a("div",{className:"h-[22px] w-[56px] rounded-clay-small bg-clay-surface-sub"}),a("div",{className:"h-[40px] w-full rounded-clay-small bg-clay-surface-sub"}),a("div",{className:"h-[40px] w-full rounded-clay-small bg-clay-surface-sub"})]})]})}function xe({compact:e,message:t}){return a("div",{className:`${e?"px-clay-250":"px-clay-300"} pt-clay-200 pb-clay-100`,children:d("div",{role:"alert",className:"flex items-center gap-clay-200 rounded-clay-medium bg-clay-surface-warning-secondary px-clay-250 py-clay-200 text-[14px] leading-[22px] text-clay-text-default",children:[a(Ge,{size:20,color:"var(--clay-icon-warning, #e28100)"}),t]})})}
1const Xe=ie({msg:le().catch(""),data:ie({callnum:le().nullish()}).nullish()}).transform(e=>{if(Ee(e.msg),!e.data)throw new O(K());return{hasCallNum:!!e.data.callnum}}),oe="/domain/product/fo/product-notification-requests",k={getEligibility({restockNotifyProdCode:e,optionDetailCodes:t}){return se.get(`${oe}/eligibility`,{params:{restockNotifyProdCode:e,...t?.length?{optionDetailCodes:t}:{}}})},async requestNotification({restockNotifyProdCode:e,optionDetailCodes:t}){await se.post(oe,{restockNotifyProdCode:e,optionDetailCodes:t?.length?t:void 0})},async hasMemberCallNum(){let e;try{e=await fetch("/ajax/oms/OMS_get_site_member.cm",{credentials:"same-origin",signal:AbortSignal.timeout(ve)})}catch{throw new O(K())}if(!e.ok)throw new O(K());return Xe.parse(await e.json()).hasCallNum}};Ue.post("*/_/api/auth/access-token",()=>Fe.json({accessToken:`${btoa(JSON.stringify({alg:"none"}))}.${btoa(JSON.stringify({exp:9999999999}))}.x`}));const h={all:()=>["product-notification"],eligibilityAll:()=>[...h.all(),"eligibility"],eligibility:(e,t)=>[...h.eligibilityAll(),e,t],memberCallNum:()=>[...h.all(),"member-callnum"]},U={eligibility:e=>ne({queryKey:h.eligibility(e.restockNotifyProdCode,e.optionDetailCodes),queryFn:()=>k.getEligibility(e)}),hasMemberCallNum:()=>ne({queryKey:h.memberCallNum(),queryFn:()=>k.hasMemberCallNum()})};function et({info:e,prodCode:t,title:i,restockNotifyProdCode:l,eligibility:n,compact:o,onCancel:s,onRequested:c}){const m=pe(),[u,x]=p.useState(null),[A,w]=p.useState(null),S=A??n.reasonCode,v=A===null&&n.canRequest,T=S===g.DUPLICATE,y=fe({mutationFn:()=>k.requestNotification({restockNotifyProdCode:l}),onSuccess:()=>{m.invalidateQueries({queryKey:h.eligibilityAll()}),c({prodCode:t,optionDetailCodes:[],thumbnail:e.thumb_url})},onError:N=>{const b=be(N);if(D(b)){m.setQueryData(h.memberCallNum(),!1);return}b!==null&&w(b),x(q("OPEN",b,n.requestLimitPerType))}});return S===g.LIMIT?a(V,{type:"OPEN",limit:n.requestLimitPerType,onCancel:s}):d(R,{compact:o,header:a(j,{variant:"form",compact:o,title:i,description:r(C.OPEN.description)}),footer:a($,{onCancel:s,primary:a("button",{type:"button",disabled:!v||y.isPending,"aria-busy":y.isPending,onClick:()=>y.mutate(),className:I,children:T?r("버튼_신청완료"):r("버튼_신청")}),children:u!==null&&a(me,{message:u,onDismiss:()=>x(null)})}),children:[a("div",{className:`${o?"px-clay-250":"px-clay-300"} pt-clay-100 ${v||T?"pb-clay-100":"pb-0"}`,children:a(de,{info:e})}),!v&&!T&&a(xe,{compact:o,message:q("OPEN",S,n.requestLimitPerType)})]})}function tt(e,t,i){const l=e.options_detail.find(o=>o.code===i);if(!l)return null;const n=t.map(o=>{const s=l.option_code_list.indexOf(o.code);return s===-1?"":l.value_code_list[s]??""});return n.some(o=>o!=="")?n:null}function at(e,t,i){if(t.length===0)return[];const l=t.map((s,c)=>({optionCode:s.code,valueCode:i[c]??""}));if(l.some(s=>s.valueCode===""))return[];const n=e.options_detail.filter(s=>s.status!=="HIDDEN");if(e.option_mix_type==="MIX"){const s=n.find(c=>c.value_code_list.length===l.length&&te(c,l));return s?[s.code]:[]}const o=l.map(s=>n.find(c=>te(c,[s]))?.code??"");return o.every(s=>s!=="")?o:[]}function it(e,t,i){return e.prod_status==="soldout"?!1:t.length===0?!(e.stock_use&&!e.stock_unlimit&&e.stock_no_option<=0):i.length===0?!1:i.every(l=>{const n=e.options_detail.find(o=>o.code===l);return n!==void 0&&Re(e,n)})}const re={soldOutLabel:!1};function lt({info:e,product:t,restockNotifyProdCode:i,requestLimit:l,compact:n,optionDetailCode:o,onCancel:s,onRequested:c}){const m=pe(),u=Ie(t),[x,A]=p.useState(()=>o!==null&&tt(t,u,o)||u.map(()=>"")),[w,S]=p.useState(null),[v,T]=p.useState(null),y=at(t,u,x),N=u.length===0||y.length>0,b=it(t,u,y),F=ue({...U.eligibility({restockNotifyProdCode:i,optionDetailCodes:y}),enabled:N&&!b}),E=v??(N?F.data?.reasonCode??null:null),H=E===g.DUPLICATE,z=N&&!b&&F.isError,Ce=b||z||E!==null,L=b?r("설명_재고가있어구매할수있는옵션이에요"):z?he(F.error):N&&E!==null&&!H?q("RESTOCK",E,l):null,Y=n?"px-clay-250":"px-clay-300",Z="pb-clay-100",P=fe({mutationFn:()=>k.requestNotification({restockNotifyProdCode:i,optionDetailCodes:y}),onSuccess:()=>
1{m.invalidateQueries({queryKey:h.eligibilityAll()}),c({prodCode:t.code,optionDetailCodes:y,thumbnail:e.thumb_url})},onError:_=>{const f=be(_);if(D(f)){m.setQueryData(h.memberCallNum(),!1);return}f!==null&&T(f),S(q("RESTOCK",f,l))}}),Ne=(_,f)=>{T(null),A(Oe(t,u.length,x,_,f))};return D(E)?a(Q,{type:"RESTOCK",onCancel:s}):E===g.LIMIT?a(V,{type:"RESTOCK",limit:l,onCancel:s}):d(R,{compact:n,header:a(j,{variant:"form",compact:n,tightBottom:u.length>0,title:r(C.RESTOCK.title),description:r(C.RESTOCK.description)}),footer:a($,{onCancel:s,primary:a("button",{type:"button",disabled:!N||Ce||P.isPending,"aria-busy":P.isPending,onClick:()=>P.mutate(),className:I,children:H?r("버튼_신청완료"):r("버튼_신청")}),children:w!==null&&a(me,{message:w,onDismiss:()=>S(null)})}),children:[a("div",{className:`${Y} pt-clay-100 ${u.length===0?L===null?Z:"pb-0":"pb-clay-200"}`,children:a(de,{info:e})}),u.length>0&&d(ce,{children:[a("div",{className:"h-px w-full bg-clay-divide-rest"}),d("div",{className:`flex flex-col gap-clay-100 pt-clay-250 ${Y} ${L===null?Z:""}`,children:[a("span",{className:"text-[14px] font-medium leading-[22px] text-clay-text-default",children:r("버튼_필수옵션")}),u.map((_,f)=>{const J=Ae(t,x,f),W=we(t,u,x,f),B=x[f]??"",X=W.find(G=>G.valueCode===B);return a(Pe,{label:_.name,choices:W,selectedLabel:X?Le(X,re):null,selectedValueCode:B===""?null:B,placeholder:J?_.name:r("설명_n옵션을선택해주세요",u[f-1].name),disabled:!J||P.isPending,display:re,disableSoldOut:!1,onSelect:G=>Ne(f,G)},_.code)})]})]}),L!==null&&a(xe,{compact:n,message:L})]})}function nt({type:e,prodIdx:t,compact:i,optionDetailCode:l,onClose:n,onRequested:o}){const s=ue(U.hasMemberCallNum());if(s.isPending)return null;const c=i&&s.data!==!1;return a(Me,{open:!0,onClose:n,title:r(C[e].title),compact:c,size:"sm",children:a(Be,{fallback:m=>a(ge,{message:he(m),onClose:n}),children:a(p.Suspense,{fallback:a(R,{compact:c,children:a(We,{compact:c})}),children:a(st,{type:e,prodIdx:t,compact:c,optionDetailCode:l,onClose:n,onRequested:o})})})})}function st({type:e,prodIdx:t,compact:i,optionDetailCode:l,onClose:n,onRequested:o}){const[{data:s},{data:c},{data:m}]=De({queries:[ae.info(t),ae.product(t),U.hasMemberCallNum()]}),u=Ye(c,e);return u===null?a(ge,{message:r(C[e].unavailable),onClose:n}):m?a(ot,{type:e,info:s,product:c,registration:u,compact:i,optionDetailCode:l,onClose:n,onRequested:o}):a(Q,{type:e,onCancel:n})}function ot({type:e,info:t,product:i,registration:l,compact:n,optionDetailCode:o,onClose:s,onRequested:c}){const{data:m}=_e(U.eligibility({restockNotifyProdCode:l.code,optionDetailCodes:[]}));return D(m.reasonCode)?a(Q,{type:e,onCancel:s}):m.reasonCode===g.LIMIT?a(V,{type:e,limit:m.requestLimitPerType,onCancel:s}):e==="OPEN"?a(et,{info:t,prodCode:i.code,title:l.label,restockNotifyProdCode:l.code,eligibility:m,compact:n,onCancel:s,onRequested:c}):a(lt,{info:t,product:i,restockNotifyProdCode:l.code,requestLimit:m.requestLimitPerType,compact:n,optionDetailCode:o,onCancel:s,onRequested:c})}const rt=2e3;function ct({thumbnail:e,onDismiss:t}){const[i,l]=p.useState(!1),n=p.useRef(t);return n.current=t,p.useEffect(()=>{const o=setTimeout(()=>l(!0),rt);return()=>clearTimeout(o)},[]),p.useEffect(()=>{if(!i)return;const o=setTimeout(()=>n.current(),400);return()=>clearTimeout(o)},[i]),d("div",{role:"status",onAnimationEnd:()=>{i&&t()},className:`fixed inset-x-0 bottom-[24px] z-[9999] mx-auto flex w-[335px] max-w-[calc(100vw-32px)] items-center gap-[10px] rounded-[12px] bg-[var(--clay-color-surface-toast,rgba(0,0,0,0.85))] p-[12px] ${i?"animate-toast-down":"animate-toast-up"}`,children:[a("img",{src:e,alt:"",className:"size-[40px] shrink-0 rounded-[6px] object-cover"}),a("p",{className:"m-0 truncate text-[14px] leading-[20px] text-white",children:r("설명_알림신청이완료됐어요")})]})}function wt({target:e,compact:t,onClose:i}){const[l,n]=p.useState(null);return d(ce,{children:[e!==null&&a(nt,{type:e.type,prodIdx:e.prodIdx,compact:t,optionDetailCode:e.optionDetailCode,onClose:i,onRequested:o=>{i(),globalThis.dispatchEvent(new CustomEvent("imweb:productNotification:requested",{cancelable:!0,detail:{type:e.type,prodIdx:e.prodIdx,...o}}))&&n({key:Date.now(),thumbnail:o.thumbnail})}},`${e.type}-${e.prodIdx}-${e.optionDetailCode??""}`),l!==null&&a(ct,{thumbnail:l.thumbnail,onDismiss:()=>n(null)},l.key)]})}export{wt as default};

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.