PageSourceSearch

https://www.subhub.ai/_next/static/chunks/app/layout-ee033d62895d4f74.js

js subhub.ai collected 2026-10-05 12:41:21 UTC 17,045 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{80282:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,69998,23)),Promise.resolve().then(n.bind(n,30490)),Promise.resolve().then(n.bind(n,3022)),Promise.resolve().then(n.bind(n,6145)),Promise.resolve().then(n.bind(n,53240)),Promise.resolve().then(n.bind(n,5561)),Promise.resolve().then(n.bind(n,8245)),Promise.resolve().then(n.bind(n,34705)),Promise.resolve().then(n.bind(n,4525)),Promise.resolve().then(n.bind(n,89125)),Promise.resolve().then(n.bind(n,36086)),Promise.resolve().then(n.bind(n,50360))},3022:(e,t,n)=>{"use strict";n.d(t,{default:()=>d});var a=n(12115),r=n(72355),o=n(3057),l=n(95155);let s=e=>{let{content:t,type:n,position:s,onClose:i,onCloseNoShow:d,width:u,height:c,zIndex:h=50,backgroundColor:p,persistOnNavigation:v}=e,g=(0,a.useRef)(null),m=(e=>{let t={};return e.centered?{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}:(void 0!==e.top&&(t.top=e.top),void 0!==e.left&&(t.left=e.left),void 0!==e.right&&(t.right=e.right),void 0!==e.bottom&&(t.bottom=e.bottom),t)})(s),f=(e=>{let t={mobile:"rounded-lg shadow-lg p-4 max-w-[95vw] border border-gray-400 border-2 border-solid",pc:"rounded-xl shadow-xl p-6 border border-gray-400 border-2 border-solid"};return e in t?t[e]:""})(n),w={position:"fixed",zIndex:h,backgroundColor:p||"rgb(243 244 246)",...m};return void 0!==u&&(w.width=u),void 0!==c&&(w.height=c),(0,l.jsxs)("div",{ref:g,className:(0,o.cn)("popup",f),style:w,children:[(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)("div",{className:"flex items-center gap-2",onClick:d,children:(0,l.jsx)("span",{className:"text-sm text-gray-500 hover:text-gray-700 cursor-pointer",children:"오늘 하루 보지 않기"})}),(0,l.jsx)("button",{onClick:i,className:"rounded-full p-1 text-gray-500 hover:bg-gray-100 hover:text-gray-700 transition-colors","aria-label":"Close popup",children:(0,l.jsx)(r.A,{className:"h-5 w-5"})})]}),(0,l.jsx)("div",{className:"popup-content mt-2",children:t})]})};var i=n(89125);let d=()=>{let{state:e,closePopup:t}=(0,i.t)(),{popups:n}=e;return 0===n.length?null:(0,l.jsx)(l.Fragment,{children:n.map(e=>(0,l.jsx)(s,{content:e.content,type:e.type,position:e.position,width:e.width,height:e.height,zIndex:e.zIndex,onClose:()=>{var n;null===(n=e.onClose)||void 0===n||n.call(e),t(e.id)},onCloseNoShow:()=>{var n;null===(n=e.onCloseNoShow)||void 0===n||n.call(e),t(e.id)},backgroundColor:e.backgroundColor,persistOnNavigation:e.persistOnNavigation},e.id))})}},30490:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var a=n(53240),r=n(12115),o=n(14844);class l{loadScript(){return new Promise((e,t)=>{try{(()=>{let n=window;if(n.ChannelIO){e();return}let a=function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];null===(e=a.c)||void 0===e||e.call(a,...n)};function r(){if(n.ChannelIOInitialized)return;n.ChannelIOInitialized=!0;let a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://cdn.channel.io/plugin/ch-plugin-web.js",a.onload=()=>{e()},a.onerror=()=>{n.ChannelIOInitialized=!1,t(Error("Failed to load Channel Talk script"))};let r=document.getElementsByTagName("script")[0];r&&r.parentNode?r.parentNode.insertBefore(a,r):document.head.appendChild(a)}a.q=[],a.c=function(e){var t;null===(t=a.q)||void 0===t||t.push(e)},n.ChannelIO=a,"complete"===document.readyState?r():(n.addEventListener("DOMContentLoaded",r),n.addEventListener("load",r))})()}catch(e){t(e)}})}boot(e,t){return new Promise((n,a)=>{try{(async()=>{if(!this.isScriptLoaded())try{await this.loadScript()}catch(e){t&&t(e instanceof Error?e:Error(String(e)),null),a(e);return}if(await new Promise(e=>setTimeout(e,200)),window.ChannelIO)window.ChannelIO("boot",e,(e,r)=>{t&&t(e,r),e?a(e):n(r)});else{let e=Error("Channel Talk is not available after script load");t&&t(e,null),a(e)}})()}catch(e){t&&t(e instanceof Error?e:Error(String(e)),null),a(e)}})}shutdown(){var e,t;null===(e=(t=window).ChannelIO)||void 0===e||e.call(t,"shutdown")}showMessenger(){var e,t;null===(e=(t=window).ChannelIO)||void 0===e||e.call(t,"showMessenger")}hideMessenger(){var e,t;null===(e=(t=window).ChannelIO)||void 0===e||e.call(t,"hideMessenger")}openChat(e,t){var n,a;null===(n=(a=window).ChannelIO)||void 0===n||n.call(a,"openChat",e,t)}track(e,t){var n,a;null===(n=(a=window).ChannelIO)||void 0===n||n.call(a,"track",e,t)}onShowMessenger(e){var t,n;null===(t=(n=window).ChannelIO)||void 0===t||t.call(n,"onShowMessenger",e)}
1onHideMessenger(e){var t,n;null===(t=(n=window).ChannelIO)||void 0===t||t.call(n,"onHideMessenger",e)}onBadgeChanged(e){var t,n;null===(t=(n=window).ChannelIO)||void 0===t||t.call(n,"onBadgeChanged",e)}onChatCreated(e){var t,n;null===(t=(n=window).ChannelIO)||void 0===t||t.call(n,"onChatCreated",e)}onFollowUpChanged(e){var t,n;null===(t=(n=window).ChannelIO)||void 0===t||t.call(n,"onFollowUpChanged",e)}onUrlClicked(e){var t,n;null===(t=(n=window).ChannelIO)||void 0===t||t.call(n,"onUrlClicked",e)}clearCallbacks(){var e,t;null===(e=(t=window).ChannelIO)||void 0===e||e.call(t,"clearCallbacks")}updateUser(e,t){var n,a;null===(n=(a=window).ChannelIO)||void 0===n||n.call(a,"updateUser",e,t)}addTags(e,t){var n,a;null===(n=(a=window).ChannelIO)||void 0===n||n.call(a,"addTags",e,t)}removeTags(e,t){var n,a;null===(n=(a=window).ChannelIO)||void 0===n||n.call(a,"removeTags",e,t)}setPage(e){var t,n;null===(t=(n=window).ChannelIO)||void 0===t||t.call(n,"setPage",e)}resetPage(){var e,t;null===(e=(t=window).ChannelIO)||void 0===e||e.call(t,"resetPage")}showChannelButton(){var e,t;null===(e=(t=window).ChannelIO)||void 0===e||e.call(t,"showChannelButton")}hideChannelButton(){var e,t;null===(e=(t=window).ChannelIO)||void 0===e||e.call(t,"hideChannelButton")}setAppearance(e){var t,n;null===(t=(n=window).ChannelIO)||void 0===t||t.call(n,"setAppearance",e)}isScriptLoaded(){let e=!!window.ChannelIOInitialized,t=!!window.ChannelIO;return e&&t}}let s=new l;var i=n(39411),d=n(50376),u=n(8245),c=n(13541),h=n(95155);let p=e=>{let{children:t}=e,{appData:n,setAppData:l}=(0,a.U)(),[p,v]=(0,r.useState)(!1),[g,m]=(0,r.useState)(!1),[f,w]=(0,r.useState)(56),b=(0,d.usePathname)(),{isMobile:C}=(0,u.Y)();return(0,r.useEffect)(()=>{(async()=>{try{let e=await o.SP.get("".concat("https://api.subhub.ai/api","/languages"));200===e.status&&l({...n,languages:e.data.data.languages,startLanguages:e.data.data.startLanguages})}catch(e){console.error("Error fetching languages:",e)}})()},[]),(0,r.useEffect)(()=>{let e="1bbaabf4-497e-496a-b472-31002c7b19f9";if(!e){console.warn("Channel Talk plugin key is not provided in environment variables");return}return(async()=>{console.log("Channel Talk 초기화 시작",e);try{await s.boot({pluginKey:e,hideChannelButtonOnBoot:!0,customLauncherSelector:"#ch-button"},(e,t)=>{e?console.error("Channel Talk 초기화 실패:",e):console.debug("Channel Talk 초기화 성공",t)})}catch(e){console.error("Channel Talk 초기화 중 에러 발생:",e)}})(),()=>{s.shutdown()}},[]),(0,r.useEffect)(()=>{let e=!["/mypage/callback"].some(e=>null==b?void 0:b.startsWith(e))&&(["/","/subtitle/result/creator","/subtitle/result/viewer","/subscribe"].includes(null!=b?b:"")||["/event","/price","/mypage"].some(e=>null==b?void 0:b.startsWith(e))),t=!["/mypage/callback"].some(e=>null==b?void 0:b.startsWith(e))&&(["/","/subtitle/result/creator","/subtitle/result/viewer"].includes(null!=b?b:"")||["/event","/price","/mypage"].some(e=>null==b?void 0:b.startsWith(e)));v(e),m(t)},[b]),(0,r.useEffect)(()=>{C?w(44):w(56)},[C]),(0,h.jsxs)(h.Fragment,{children:[t,p&&(0,h.jsx)("div",{className:"fixed right-6 z-[20000] ".concat(C?"bottom-[80px]":"".concat(g?"bottom-[108px]":"bottom-6")),children:(0,h.jsx)("button",{id:"ch-button",children:(0,h.jsx)(i.default,{src:"/icons/channel_talk.svg",alt:"채널톡",width:f,height:f})})}),g&&(0,h.jsx)("div",{className:"fixed bottom-6 right-6 z-[20000]",children:(0,h.jsx)("button",{id:"open-chat-button",onClick:()=>{window.open("https://open.kakao.com/o/gReyrzzh","_blank")},children:(0,h.jsx)(i.default,{src:"/icons/open-chat.svg",alt:"채널톡",width:f,height:f})})}),(0,h.jsx)(c.default,{id:"beusable-script",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:'\n            (function(w, d, a){\n                w.__beusablerumclient__ = {\n                    load : function(src){\n                        var b = d.createElement("script");\n                        b.src = src; b.async=true; b.type = "text/javascript";\n                        d.getElementsByTagName("head")[0].appendChild(b);\n                    }\n                };w.__beusablerumclient__.load(a + "?url=" + encodeURIComponent(d.URL));\n            })(window, document, "//rum.beusable.net/load/b240405e181031u052");\n          '}})]})}},6145:(e,t,n)=>{"use strict";n.d(t,{AlertProvider:()=>s,Z:()=>i});var a=n(12115),r=n(17474),o=n(95155);let l=(0,a.createContext)(void 0),s=e=>{let{children:t}=e,n=(0,r.M)();return(0,o.jsxs)(l.Provider,{value:n,children:[t,n.Alert]})},i=()=>{let e=(0,a.useContext)(l);if(!e)throw Error("AlertProvider 내부에서만 useAlertContext를 사용할 수 있습니다.");return e}},53240:(e,t,n)=>{"use strict";n.d(t,{AppProvider:()=>l,U:()=>s});var a=n(12115),r=n(95155);let o=(0,a.createContext)(void 0);function l(e){let{children:t,initialData:n}=e,[l,s]=(0,a.useState)(n);return(0,r.jsx)(o.Provider,{value:{appData:l,setAppData:s},children:t})}function s(){let e=(0,a.useContext)(o);if(void 0===e)throw Error("useApp must be used within a AppProvider");return e}},5561:(e,t,n)=>{"use strict";n.d(t,{CartProvider:()=>l,_:()=>s});var a=n(12115),r=n(95155);let o=(0,a.createContext)(void 0);function l(e){let{children:t,initialCart:n=[]}=e,[l,s]=(0,a.useState)(n);return(0,r.jsx)(o.Provider,{value:{cart:l,setCart:s},children:t})}function s(){let e=(0,a.useContext)(o);if(void 0===e)throw Error("useCart must be used within a CartProvider");return e}},8245:(e,t,n)=>{"use strict";n.d(t,{DeviceProvider:()=>l,Y:()=>s});var a=n(12115),r=n(95155);let o=(0,a.createContext)({isMobile:!1}),l=e=>{let{children:t,isMobile:n}=e;return(0,r.jsx)(o.Provider,{value:{isMobile:n},children:t})},s=()=>(0,a.useContext)(o)},34705:(e,t,n)=>{"use strict";n.d(t,{DialogProvider:()=>C,h:()=>x});var a=n(12115),r=n(79298),o=n(22555),l=n(72355),s=n(3057),i=n(95155);let d=o.bL,u=o.l9,c=o.ZL,h=o.bm,p=a.forwardRef((e,t)=>
1{let{className:n,...a}=e;return(0,i.jsx)(o.hJ,{ref:t,className:(0,s.cn)("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...a})});p.displayName=o.hJ.displayName;let v=a.forwardRef((e,t)=>{let{className:n,children:a,close:r=!1,...d}=e;return(0,i.jsxs)(c,{children:[(0,i.jsx)(p,{}),(0,i.jsxs)(o.UC,{ref:t,className:(0,s.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n),...d,children:[a,r&&(0,i.jsxs)(o.bm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,i.jsx)(l.A,{className:"h-4 w-4"}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});v.displayName=o.UC.displayName;let g=e=>{let{className:t,...n}=e;return(0,i.jsx)("div",{className:(0,s.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...n})};g.displayName="DialogFooter";let m=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,i.jsx)(o.hE,{ref:t,className:(0,s.cn)("text-lg font-semibold leading-none tracking-tight",n),...a})});m.displayName=o.hE.displayName,a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,i.jsx)(o.VY,{ref:t,className:(0,s.cn)("text-sm text-muted-foreground",n),...a})}).displayName=o.VY.displayName;let f=e=>{let{isOpen:t,onOpenChange:n,trigger:a,children:o,title:l="정보",actionLabel:s="확인",cancelLabel:c="취소",onAction:p=()=>{},onCancel:f=()=>{},close:w=!1,scrollbar:b=!1}=e;return(0,i.jsxs)(d,{open:t,onOpenChange:n,children:[a&&(0,i.jsx)(u,{asChild:!0,children:a}),(0,i.jsxs)(v,{close:w,className:"max-h-[80vh] sm:max-w-[80%] w-auto mx-auto my-auto mt-4 flex flex-col ring-offset-0 overflow-y-auto py-0 px-0 rounded-2xl ".concat(b?"":"scrollbar-hide"),children:[(0,i.jsx)(m,{className:"sr-only",children:l}),o,s||c?(0,i.jsxs)(g,{className:"sm:justify-center sm:items-center mt-4 border-t pt-4 sticky bottom-0 bg-white ring-offset-0",children:[c&&(0,i.jsx)(h,{asChild:!0,children:(0,i.jsx)(r.$,{type:"button",variant:"outline",onClick:f,children:c})}),s&&(0,i.jsx)(r.$,{type:"button",variant:"default",onClick:p,children:s})]}):null]})]})},w=()=>{let[e,t]=(0,a.useState)(!1),[n,r]=(0,a.useState)(null),o={};n&&Object.keys(n).forEach(e=>{"onOpenChange"!==e&&(o[e]=n[e])});let l=n?(0,i.jsx)(f,{isOpen:e,onOpenChange:e=>{(null==n?void 0:n.onOpenChange)&&n.onOpenChange(e),t(e)},...o,children:n.children}):null;return{isOpen:e,open:e=>{r(e),t(!0)},close:()=>{t(!1),r(null)},Dialog:l}},b=(0,a.createContext)(void 0),C=e=>{let{children:t}=e,n=w();return(0,i.jsxs)(b.Provider,{value:n,children:[t,n.Dialog]})},x=()=>{let e=(0,a.useContext)(b);if(!e)throw Error("DialogProvider 내부에서만 useDialogContext를 사용할 수 있습니다.");return e}},4525:(e,t,n)=>{"use strict";n.d(t,{NavigationProvider:()=>l,t:()=>s});var a=n(12115),r=n(95155);let o=(0,a.createContext)({resetNavigationPage:()=>{},setResetNavigationPage:()=>{}}),l=e=>{let{children:t}=e,[n,l]=(0,a.useState)(()=>()=>{});return(0,r.jsx)(o.Provider,{value:{resetNavigationPage:n,setResetNavigationPage:e=>{l(()=>e)}},children:t})},s=()=>(0,a.useContext)(o)},89125:(e,t,n)=>{"use strict";n.d(t,{PopupProvider:()=>d,t:()=>u});var a=n(12115),r=n(50376),o=n(95155);let l={popups:[]},s=(e,t)=>{switch(t.type){case"OPEN_POPUP":let n=e.popups.findIndex(e=>e.id===t.payload.id);if(n>=0){let a=[...e.popups];return a[n]=t.payload,{...e,popups:a}}return{...e,popups:[...e.popups,t.payload]};case"CLOSE_POPUP":return{...e,popups:e.popups.filter(e=>e.id!==t.payload.id)};case"CLOSE_ALL_POPUPS":return{...e,popups:[]};default:return e}},i=(0,a.createContext)(void 0),d=e=>{let{children:t}=e,[n,d]=(0,a.useReducer)(s,l),u=(0,r.usePathname)(),c=(0,r.useSearchParams)(),h=e=>{d({type:"CLOSE_POPUP",payload:{id:e}})};return(0,a.useEffect)(()=>{let e=()=>
1{n.popups.forEach(e=>{e.persistOnNavigation||h(e.id)})};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},[n.popups,h]),(0,a.useEffect)(()=>{n.popups.forEach(e=>{e.persistOnNavigation||h(e.id)})},[u,c]),(0,o.jsx)(i.Provider,{value:{state:n,openPopup:e=>{d({type:"OPEN_POPUP",payload:e})},closePopup:h,closeAllPopups:()=>{d({type:"CLOSE_ALL_POPUPS"})}},children:t})},u=()=>{let e=(0,a.useContext)(i);if(void 0===e)throw Error("usePopupContext must be used within a PopupProvider");return e}},36086:(e,t,n)=>{"use strict";n.d(t,{K:()=>s,SubtitleResultProvider:()=>l});var a=n(12115),r=n(95155);let o=(0,a.createContext)(void 0);function l(e){let{children:t,initialData:n}=e,[l,s]=(0,a.useState)(n),[i,d]=(0,a.useState)({creator_list:{totalCount:0,subtitleRequests:[],subtitleState:{}},viewer_list:{totalCount:0,subtitleRequests:[],subtitleState:{}}});return(0,r.jsx)(o.Provider,{value:{subtitleResultData:l,setSubtitleResultData:s,mainSubtitleResultList:i,setMainSubtitleResultList:d},children:t})}function s(){let e=(0,a.useContext)(o);if(void 0===e)throw Error("useSubtitleResult must be used within a SubtitleResultProvider");return e}},50360:(e,t,n)=>{"use strict";n.d(t,{UserProvider:()=>s,u:()=>i});var a=n(12115),r=n(14844),o=n(95155);let l=(0,a.createContext)(void 0);function s(e){let{children:t,initialData:n}=e,[s,i]=(0,a.useState)(n),[d,u]=(0,a.useState)(!1),c=async()=>{try{if(s)return;let e=await r.SP.get("/check-user");i(e.data)}catch(e){console.error("사용자 데이터 로드 중 오류 발생:",e)}finally{u(!0)}},h=async e=>{try{if(s)return;let t=await r.f.get("/check-user");if(!t||(i(t.data),!t.data.id||null==e||!e.unauthOnly))return;window.location.href="/subtitle/result/creator"}catch(e){console.error("공통 사용자 데이터 로드 중 오류 발생:",e)}finally{u(!0)}};return(0,o.jsx)(l.Provider,{value:{userData:s,setUserData:i,isLoaded:d,loadUserData:c,loadCommonUserData:h},children:t})}function i(){let e=(0,a.useContext)(l);if(void 0===e)throw Error("useUser must be used within a UserProvider");return e}},69998:()=>{}},e=>{var t=t=>e(e.s=t);e.O(0,[748,2615,9725,3584,2984,9323,7349,107,8441,1075,7358],()=>t(80282)),_N_E=e.O()}]);

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.