PageSourceSearch

https://khstores.com/_next/static/chunks/9660-38020ae3f363a581.js

js khstores.com collected 2026-10-04 01:50:43 UTC 12,626 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9660],{82485:function(e,t,n){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.InterceptAppRouterProvider=function(e){let{guardMapRef:t,children:n}=e,r=(0,u.useInterceptedAppRouter)({guardMapRef:t});return r?a.default.createElement(o.AppRouterContext.Provider,{value:r},n):a.default.createElement(a.default.Fragment,null,n)};let o=n(61956),a=(r=n(2265))&&r.__esModule?r:{default:r},u=n(74165)},34961:function(e,t,n){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.InterceptPagesRouterProvider=function(e){let{guardMapRef:t,children:n}=e,r=(0,u.useInterceptedPagesRouter)({guardMapRef:t});return r?a.default.createElement(o.RouterContext.Provider,{value:r},n):a.default.createElement(a.default.Fragment,null,n)};let o=n(25523),a=(r=n(2265))&&r.__esModule?r:{default:r},u=n(95653)},62358:function(e,t,n){var r=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationGuardProvider=function(e){let{children:t}=e,n=(0,a.useRef)(new Map);return(0,i.useInterceptPopState)({guardMapRef:n}),(0,u.useInterceptPageUnload)({guardMapRef:n}),(0,c.useInterceptLinkClicks)({guardMapRef:n}),a.default.createElement(s.NavigationGuardProviderContext.Provider,{value:n},a.default.createElement(l.InterceptAppRouterProvider,{guardMapRef:n},a.default.createElement(d.InterceptPagesRouterProvider,{guardMapRef:n},t)))};let a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t}(n(2265)),u=n(59585),i=n(52358),c=n(4926),l=n(82485),d=n(34961),s=n(74090)},74090:function(e,t,n){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationGuardProviderContext=void 0;let o=(r=n(2265))&&r.__esModule?r:{default:r};t.NavigationGuardProviderContext=o.default.createContext(void 0),t.NavigationGuardProviderContext.displayName="NavigationGuardProviderContext"},4926:function(e,t,n){let r;Object.defineProperty(t,"__esModule",{value:!0}),t.useInterceptLinkClicks=function({guardMapRef:e}){let t=(0,a.useRef)(!1),n=(0,a.useRef)(null),i=r?(0,a.useContext)(r):null;(0,o.useIsomorphicLayoutEffect)(()=>{if("undefined"==typeof window||t.current)return;if(t.current=!0,!r){(0,u.debug)("AppRouterContext not available, skipping link interceptor");return}if(!i){(0,u.debug)("Not in App Router context, skipping link interceptor");return}if(null===n.current&&(i&&"function"==typeof i.push&&(i._guardIntercepted=!0),setTimeout(()=>{n.current=!0,(0,u.debug)("Link click interceptor enabled for Next.js 15.3+ compatibility")},100)),!1===n.current){(0,u.debug)("Link click interceptor not needed");return}(0,u.debug)("Setting up link click interceptor");let o=async t=>{var n;let r=t.target.closest("a[href]");if(!r||"true"===r.dataset.guardProcessing)return;let o=r.getAttribute("href");if(!o||o.startsWith("http://")||o.startsWith("https://")||o.startsWith("//")||o.startsWith("#")||r.target&&"_self"!==r.target||r.hasAttribute("download")||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||0!==t.button)return;(0,u.debug)(`Intercepted link click to: ${o}`),r.dataset.guardProcessing="true";let a="true"===r.dataset.replace?"replace":"push",i=[...e.current.values()].filter(({enabled:e})=>e({to:o,type:a}));if(0===i.length){delete r.dataset.guardProcessing,(0,u.debug)("No guards enabled, allowing navigation");return}t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation();let c=!0;for(let{callback:e}of i){(0,u.debug)(`Calling guard callback for ${a} to ${o}`);try{let t=await e({to:o,type:a});if((0,u.debug)(`Guard callback returned: ${t}`),!t){c=!1;break}}catch(e){(0,u.debug)("Guard callback error:",e),c=!1;break}}if(delete r.dataset.guardProcessing,c){(0,u.debug)("All guards passed, navigating programmatically");let e=null===(n=window.next)||void 0===n?void 0:n.router;e?"replace"===a?e.replace(o):e.push(o):"replace"===a?location.replace(o):location.href=o}else(0,u.debug)("Navigation blocked by guard")};document.addEventListener("click",o,!0);let a=new MutationObserver(e=>
1{e.forEach(e=>{e.addedNodes.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&("A"===e.tagName||e.querySelector("a"))&&(0,u.debug)("New link(s) detected in DOM")})})});return a.observe(document.body,{childList:!0,subtree:!0}),()=>{(0,u.debug)("Cleaning up link click interceptor"),document.removeEventListener("click",o,!0),a.disconnect()}},[e])};let o=n(72282),a=n(2265),u=n(28167);try{r=n(61956).AppRouterContext}catch(e){r=null}},59585:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useInterceptPageUnload=function({guardMapRef:e}){(0,r.useIsomorphicLayoutEffect)(()=>{let t=t=>{for(let n of e.current.values())if(n.enabled({to:"",type:"beforeunload"})){t.preventDefault(),t.returnValue="";return}};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[])};let r=n(72282)},52358:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useInterceptPopState=function({guardMapRef:e}){let t=(0,o.useContext)(r.RouterContext);(0,i.useIsomorphicLayoutEffect)(()=>{let n;let{writeState:r}=(0,u.setupHistoryAugmentationOnce)({renderedStateRef:c}),o=t=>{let o=t.__next_navigation_guard_token,i=Number(t.__next_navigation_guard_stack_index)||0;if(!o||o!==c.current.token)return a.DEBUG&&console.log(`useInterceptPopState(): token mismatch, skip handling (current: ${c.current.token}, next: ${o})`),c.current.token=o||(0,u.newToken)(),c.current.index=o?i:0,r(),!0;let l=i-c.current.index;if(0===l)return a.DEBUG&&console.log("useInterceptPopState(): discard popstate event: delta is 0"),!1;a.DEBUG&&console.log(`useInterceptPopState(): __next_navigation_guard_stack_index is ${t.__next_navigation_guard_stack_index}`);let d=location.pathname+location.search,s=[...e.current.values()];return t===n||0===s.length?(a.DEBUG&&console.log(`useInterceptPopState(): Accept popstate event, index: ${i}`),n=null,c.current.index=i,!0):(a.DEBUG&&console.log(`useInterceptPopState(): Suspend popstate event, index: ${i}`),(async()=>{let e=-1;for(let t of s)if(e++,t.enabled({to:d,type:"popstate"})&&(a.DEBUG&&console.log(`useInterceptPopState(): confirmation for listener index ${e}`),!await t.callback({to:d,type:"popstate"}))){a.DEBUG&&console.log(`useInterceptPopState(): Cancel popstate event, go(): ${c.current.index} - ${i} = ${-l}`),0!==l&&window.history.go(-l);return}a.DEBUG&&console.log(`useInterceptPopState(): Accept popstate event, ${i}`),n=t,window.dispatchEvent(new PopStateEvent("popstate",{state:t}))})(),!1)};if(t)return t.beforePopState(()=>o(history.state)),()=>{t.beforePopState(()=>!0)};{let e=e=>{o(e.state)||e.stopImmediatePropagation()};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}}},[t])};let r=n(25523),o=n(2265),a=n(28167),u=n(3234),i=n(72282),c={current:{index:-1,token:""}}},74165:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useInterceptedAppRouter=function({guardMapRef:e}){let t=(0,o.useContext)(r.AppRouterContext);return(0,o.useMemo)(()=>{if(!t)return(0,a.debug)("No original router found"),null;(0,a.debug)("Creating intercepted router");let n=async(t,n,r)=>{for(let{enabled:r,callback:o}of((0,a.debug)(`Navigation attempt: ${t} to ${n}`),[...e.current.values()])){if(!r({to:n,type:t}))continue;(0,a.debug)(`Calling guard callback for ${t} to ${n}`);let e=await o({to:n,type:t});if((0,a.debug)(`Guard callback returned: ${e}`),!e){(0,a.debug)("Navigation blocked");return}}(0,a.debug)("All guards passed, proceeding with navigation"),r()};return{...t,push:(e,...r)=>{(0,a.debug)(`push called with href: ${e}`),n("push",e,()=>t.push(e,...r))},replace:(e,...r)=>{n("replace",e,()=>t.replace(e,...r))},refresh:(...e)=>{n("refresh",location.href,()=>t.refresh(...e))}}},[t])};let r=n(61956),o=n(2265),a=n(28167)},95653:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useInterceptedPagesRouter=function({guardMapRef:e}){let t=(0,o.useContext)(r.RouterContext);return(0,o.useMemo)(()=>{if(!t)return null;let n=async(t,n,r)=>{var o;let a="string"==typeof n?n:null!==(o=n.href)&&void 0!==o?o:"";for(let{enabled:n,callback:r}of[...e.current.values()])if(n({to:a,type:t})&&!await r({to:a,type:t}))return!1;return await r()};return{...t,push:(e,...r)=>n("push",e,()=>t.push(e,...r)),replace:(e,...r)=>n("replace",e,()=>t.replace(e,...r)),reload:(...e)=>{n("refresh",location.href,async()=>(t.reload(...e),!0))}}},[t])};let r=n(25523),o=n(2265)}
1,72282:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsomorphicLayoutEffect=void 0;let r=n(2265);t.useIsomorphicLayoutEffect="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},89206:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useNavigationGuard=function(e){let t=(0,r.useId)(),n=(0,r.useContext)(o.NavigationGuardProviderContext);if(!n)throw Error("useNavigationGuard must be used within a NavigationGuardProvider");let[i,c]=(0,r.useState)(null);return(0,a.useIsomorphicLayoutEffect)(()=>{let r=e.enabled;return n.current.set(t,{enabled:"function"==typeof r?r:()=>null==r||r,callback:t=>((0,u.debug)("Guard callback called with:",t),e.confirm)?((0,u.debug)("Using sync confirm function"),e.confirm(t)):((0,u.debug)("Using async confirm, setting pending state"),new Promise(e=>{setTimeout(()=>{c({resolve:e})},0)}))}),()=>{n.current.delete(t)}},[t,n,e.confirm,e.enabled]),{active:null!==i,accept:(0,r.useCallback)(()=>{i&&(i.resolve(!0),c(null))},[i]),reject:(0,r.useCallback)(()=>{i&&(i.resolve(!1),c(null))},[i])}};let r=n(2265),o=n(74090),a=n(72282),u=n(28167)},49660:function(e,t,n){t.AI=t.Ox=void 0;var r=n(89206);Object.defineProperty(t,"Ox",{enumerable:!0,get:function(){return r.useNavigationGuard}});var o=n(62358);Object.defineProperty(t,"AI",{enumerable:!0,get:function(){return o.NavigationGuardProvider}})},28167:function(e,t,n){var r=n(25566);Object.defineProperty(t,"__esModule",{value:!0}),t.debug=t.DEBUG=void 0,t.DEBUG=void 0!==r&&"true"===r.env.DEBUG_NAVIGATION_GUARD,t.debug=(...e)=>{t.DEBUG&&console.log("[next-navigation-guard]",...e)}},3234:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.newToken=u,t.setupHistoryAugmentationOnce=function(e){var t;let{renderedStateRef:n}=e;if(o)return{writeState:a};r.DEBUG&&console.log("setupHistoryAugmentationOnce: setup");let i=window.history.pushState,c=window.history.replaceState;return r.DEBUG&&(window.__next_navigation_guard_debug_history_aug={originalPushState:i,originalReplaceState:c}),n.current.index=parseInt(window.history.state.__next_navigation_guard_stack_index)||0,n.current.token=String(null!==(t=window.history.state.__next_navigation_guard_token)&&void 0!==t?t:"")||u(),r.DEBUG&&console.log("setupHistoryAugmentationOnce: initial currentIndex is ".concat(n.current.index,", token is ").concat(n.current.token)),a=()=>{r.DEBUG&&console.log("setupHistoryAugmentationOnce: write state by replaceState(): currentIndex is ".concat(n.current.index,", token is ").concat(n.current.token));let e={...window.history.state,__next_navigation_guard_token:n.current.token,__next_navigation_guard_stack_index:n.current.index};c.call(window.history,e,"",window.location.href)},(null==window.history.state.__next_navigation_guard_stack_index||null==window.history.state.__next_navigation_guard_token)&&a(),window.history.pushState=function(e,t,o){n.current.token||(n.current.token=u(),n.current.index=-1),++n.current.index,r.DEBUG&&console.log("setupHistoryAugmentationOnce: push: currentIndex is ".concat(n.current.index,", token is ").concat(n.current.token));let a={...e,__next_navigation_guard_token:n.current.token,__next_navigation_guard_stack_index:n.current.index};i.call(this,a,t,o)},window.history.replaceState=function(e,t,o){n.current.token||(n.current.token=u(),n.current.index=0),r.DEBUG&&console.log("setupHistoryAugmentationOnce: replace: currentIndex is ".concat(n.current.index,", token is ").concat(n.current.token));let a={...e,__next_navigation_guard_token:n.current.token,__next_navigation_guard_stack_index:n.current.index};c.call(this,a,t,o)},o=!0,{writeState:a}};let r=n(28167),o=!1,a=()=>{};function u(){return Math.random().toString(36).substring(2)}}}]);
2//# sourceMappingURL=9660-38020ae3f363a581.js.map

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.