PageSourceSearch

https://gok-tool.vercel.app/_next/static/chunks/7708.87710f4af3225a40.js

js gok-tool.vercel.app collected 2026-10-03 07:04:13 UTC 3,849 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7708],{67708:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(95155),o=r(12115),a=r(47650),c=r(54210),i=r(86985),s=r.n(i);let l="gok-activities-v1";function u(e){let t=(0,o.useRef)(e);t.current=e;let r=(0,o.useRef)(null),i=(0,o.useRef)(null),[u]=(0,o.useState)(()=>crypto.randomUUID()),d=(0,o.useRef)(void 0),p=(0,o.useRef)(!1),f=(0,o.useRef)(!1),b=(0,o.useRef)(!1),g=(0,o.useRef)(!1),[v,h]=(0,o.useState)(!1),[m,y]=(0,o.useState)(!1),[k,C]=(0,o.useState)(),_=(0,c.T)(e.language),w=(0,o.useCallback)(e=>{i.current?.contentWindow?.postMessage({channel:l,roundId:u,...e},location.origin)},[u]),x=(0,o.useCallback)((e=!1)=>{let r=t.current;e&&(g.current=!1),w({type:e?"configure":"update",...e?{presentation:r.presentation}:{},language:r.language,characterName:r.characterName,destination:r.destinationLabel,clock:r.clock,evCount:r.evCount,blocked:r.blocked,error:r.error})},[w]),j=(0,o.useCallback)(async()=>{if(d.current)return void w({type:"saved",outcome:d.current});let e=t.current;if(!p.current&&!e.busy&&"view"!==e.presentation.action){if(!f.current&&e.blocked)return void w({type:"failed",error:e.blocked});if("collect"!==e.presentation.action||!e.presentation.crop||!(e.clock.hours<e.presentation.crop.dueHour)){f.current=!0,p.current=!0,h(!0);try{let r=await e.onComplete();if(!b.current)return;r?.receipt.type===e.presentation.action?(d.current=r,C(r),g.current&&w({type:"saved",outcome:r})):w({type:"failed",error:t.current.error})}catch{b.current&&w({type:"failed",error:t.current.error})}finally{p.current=!1,b.current&&h(!1)}}}},[w]);(0,o.useEffect)(()=>{b.current=!0;let e=r.current,n=document.activeElement;e?.showModal();let o=e=>{if(e.origin===location.origin&&e.source===i.current?.contentWindow&&e.data?.channel===l){if("ready"===e.data.type)return void x(!0);if(e.data.roundId===u){if("unavailable"===e.data.type)return void y(!0);"configured"===e.data.type&&(g.current=!0,d.current&&w({type:"saved",outcome:d.current})),"complete"===e.data.type&&j(),"close"!==e.data.type||p.current||t.current.busy||t.current.onClose()}}};return window.addEventListener("message",o),()=>{b.current=!1,window.removeEventListener("message",o),e?.close(),n?.focus?.()}},[x,w,u,j]),(0,o.useEffect)(()=>{x()},[x,e.language,e.evCount,e.clock.hours,e.clock.months,e.error,e.blocked,e.destinationLabel]);let R=()=>{p.current||t.current.busy||t.current.onClose()},E=e.presentation.crop&&e.clock.hours<e.presentation.crop.dueHour;return(0,a.createPortal)((0,n.jsxs)("dialog",{ref:r,className:s().dialog,"aria-label":e.presentation.title,onCancel:e=>{e.preventDefault(),e.stopPropagation(),R()},onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,n.jsxs)("header",{className:s().header,children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("small",{children:e.characterName}),(0,n.jsx)("h2",{children:e.presentation.title})]}),(0,n.jsx)("button",{type:"button","aria-label":_.close,disabled:v||e.busy,onClick:R,children:"\xd7"})]}),m?(0,n.jsxs)("div",{className:s().error,role:"status",children:[(0,n.jsx)("p",{children:k?_.saved:e.error||_.failed}),(0,n.jsx)("button",{type:"button",disabled:v||e.busy,onClick:()=>y(!1),children:_.retry}),!k&&"view"!==e.presentation.action&&(0,n.jsx)("button",{type:"button",disabled:v||e.busy||!!E||!f.current&&!!e.blocked,onClick:()=>void j(),children:v?_.saving:_.finish}),(0,n.jsx)("button",{type:"button",disabled:v||e.busy,onClick:R,children:_.back})]}):(0,n.jsx)("iframe",{ref:i,className:s().frame,title:e.presentation.title,src:"/minigames/activities-preview/vtt.html",onLoad:()=>x(!0),onError:()=>y(!0)})]}),document.body)}},86985:e=>{e.exports={dialog:"KingdomCraftingModal_dialog__oPveU",header:"KingdomCraftingModal_header__uvvRf",error:"KingdomCraftingModal_error__Bu4Ec",frame:"KingdomCraftingModal_frame__lDMtR"}}}]);

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.