PageSourceSearch

https://skillioz.com/_next/static/chunks/1643.ccf205fe365f6a36.js

js skillioz.com collected 2026-10-09 22:56:34 UTC 6,436 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1643],{11643:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var a=r(95155),n=r(86787),l=r(41641),s=r(21362),i=r(64467),c=r(12115);let u=c.memo(({children:e,onDownload:t,isGamified:u=!1,maxHeightVh:d=90})=>{let o=(0,c.useDeferredValue)(e),h=(0,c.useRef)(null),f=(0,c.useRef)(null),x=(0,c.useRef)(null),m=(0,c.useRef)(!1),b=(0,c.useRef)(0),p=(0,c.useRef)(0),g=(0,c.useRef)(0),w=(0,c.useRef)(null),y=(0,c.useRef)(null),j=(0,c.useRef)(null),v=(0,c.useRef)(null),[N,k]=(0,c.useState)(0),[R,C]=(0,c.useState)(1),[E,F]=(0,c.useState)(0),[S,_]=(0,c.useState)(!1),[A,P]=(0,c.useState)(!1),[W,$]=(0,c.useState)(!1),D=(0,c.useCallback)(async e=>{let t=++p.current;try{if(!h.current){let e=await r.e(2084).then(r.bind(r,62532));e.GlobalWorkerOptions.workerSrc=`https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${e.version}/pdf.worker.min.mjs`,h.current=e}let a=await e.arrayBuffer(),n=h.current.getDocument({data:a,useWorkerFetch:!0,isEvalSupported:!1}),l=await n.promise;if(t!==p.current)return void l.de
1stroy().catch(()=>{});f.current&&f.current.destroy().catch(()=>{}),f.current=l,k(l.numPages),C(e=>e>l.numPages?l.numPages||1:e),F(e=>e+1)}catch(e){n.A.error("PDF Load Error:",e)}},[]),z=(0,c.useCallback)(async e=>{if((w.current=e,!m.current)&&y.current!==e){for(m.current=!0,_(!0);w.current!==y.current;){let e=w.current,t=++b.current;try{let r=await (0,i.x8)(e).toBlob();if(t!==b.current)continue;y.current=e,await D(r)}catch(e){n.A.error("PDF Generation Error:",e);break}}m.current=!1,_(!1)}},[D]);(0,c.useEffect)(()=>{z(o)},[o,z]);let B=(0,c.useCallback)(async(e,t=f.current)=>{if(!t)return;if(x.current){let e=x.current;x.current=null;try{e.cancel()}catch(e){}await e.promise.catch(()=>{})}let r=++g.current;P(!0);try{let a=await t.getPage(e),n=a.getViewport({scale:2,rotation:a.rotate});v.current||(v.current=document.createElement("canvas"));let l=v.current,s=l.getContext("2d",{alpha:!1,willReadFrequently:!1});s.setTransform(1,0,0,1,0,0),(l.width!==n.width||l.height!==n.height)&&(l.width=n.width,l.height=n.height),s.fillStyle="#ffffff",s.fillRect(0,0,l.width,l.height);let i=a.render({canvasContext:s,viewport:n,enableWebGL:!1});if(x.current=i,await i.promise,r!==g.current)return;requestAnimationFrame(()=>{if(r!==g.current)return;let e=j.current;if(!e)return;(e.width!==l.width||e.height!==l.height)&&(e.width=l.width,e.height=l.height);let t=e.getContext("2d",{alpha:!1});t.setTransform(1,0,0,1,0,0),t.drawImage(l,0,0),P(!1),$(!0),x.current=null})}catch(e){if(e?.name==="RenderingCancelledException")return;n.A.error("Canvas Render Error:",e),r===g.current&&P(!1)}},[]);(0,c.useEffect)(()=>{f.current&&B(R)},[R,E,B]),(0,c.useEffect)(()=>()=>{if(x.current)try{x.current.cancel()}catch(e){}f.current&&f.current.destroy().catch(()=>{})},[]);let G=(0,c.useCallback)(()=>C(e=>Math.max(e-1,1)),[]),L=(0,c.useCallback)(()=>C(e=>Math.min(e+1,N)),[N]);return(0,a.jsxs)("div",{className:`relative h-full w-full flex flex-col items-center justify-center overflow-hidden ${u?"bg-transparent border-0":"bg-[#F9FAFB] rounded-tr-[32px] rounded-br-[32px] border border-gray-100/40"}`,children:[!u&&(S||A)&&(0,a.jsx)("div",{className:"absolute top-10 right-10 z-30 pointer-events-none",children:(0,a.jsxs)("div",{className:"bg-white/40 backdrop-blur-2xl px-4 py-2 rounded-2xl border border-white/20 shadow-sm flex items-center gap-3",children:[(0,a.jsx)("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:"Updating"}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)("span",{className:"w-1 h-1 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.3s]"}),(0,a.jsx)("span",{className:"w-1 h-1 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.15s]"}),(0,a.jsx)("span",{className:"w-1 h-1 bg-blue-500 rounded-full animate-bounce"})]})]})}),(0,a.jsx)("div",{className:`w-full flex flex-col items-center justify-center bg-transparent relative ${u?"p-0 h-full overflow-hidden":"flex-1 overflow-auto scrollbar-hide p-2 md:p-8"}`,children:(0,a.jsxs)("div",{className:`relative bg-white overflow-hidden flex items-center justify-center ${u?"h-full w-full max-h-full":"my-auto rounded-lg shadow-[0_48px_80px_-16px_rgba(0,0,0,0.1)]"}`,style:{width:u?"100%":W?"fit-content":"100%",maxWidth:u||W?"100%":"595px",as
1pectRatio:W?"auto":"595 / 842",minWidth:u?"auto":"150px"},children:[(0,a.jsx)("canvas",{ref:j,className:`shadow-sm ${u?"border border-gray-200 rounded-md":""}`,style:{display:W?"block":"none",maxWidth:"100%",maxHeight:u?"100%":`${d}vh`,height:u?"100%":"auto",width:u?"auto":"full",objectFit:u?"contain":"initial",willChange:"contents",backfaceVisibility:"hidden",imageRendering:"auto",opacity:+!!W,transition:"opacity 0.15s ease"}}),!W&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-white","aria-hidden":"true",children:(0,a.jsx)("div",{className:"w-8 h-8 border-2 border-gray-100 border-t-blue-500 rounded-full animate-spin"})})]})}),!u&&(0,a.jsx)("div",{className:"absolute bottom-2 flex items-center gap-1 bg-[#111111]/90 backdrop-blur-xl text-white p-1.5 rounded-xl shadow-2xl z-40 border border-white/10 opacity-60 hover:opacity-100 transition-all duration-300 scale-90 hover:scale-100",children:(0,a.jsxs)("div",{className:"flex items-center gap-1 px-1",children:[(0,a.jsx)("button",{type:"button",onClick:G,disabled:R<=1,className:"p-2 hover:bg-white/10 rounded-lg disabled:opacity-10 active:scale-90 transition-all",children:(0,a.jsx)(l.A,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{className:"px-3 flex items-center gap-1.5 min-w-[60px] justify-center",children:[(0,a.jsx)("span",{className:"text-xs font-bold tabular-nums",children:R}),(0,a.jsx)("span",{className:"text-[10px] font-medium text-white/30",children:"/"}),(0,a.jsx)("span",{className:"text-xs font-bold text-white/50 tabular-nums",children:N||1})]}),(0,a.jsx)("button",{type:"button",onClick:L,disabled:R>=N,className:"p-2 hover:bg-white/10 rounded-lg disabled:opacity-10 active:scale-90 transition-all",children:(0,a.jsx)(s.A,{className:"h-4 w-4"})})]})}),!W&&S&&(0,a.jsxs)("div",{className:"absolute inset-0 bg-white flex flex-col items-center justify-center gap-6 z-50",children:[(0,a.jsx)("div",{className:"w-12 h-12 border-4 border-gray-100 border-t-blue-600 rounded-full animate-spin"}),(0,a.jsx)("p",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest",children:"Loading"})]})]})})}}]);

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.