PageSourceSearch

https://www.codechef.com/build/react2/assets/LazyFileUploadButton-DKQwvrlJ.js

js codechef.com collected 2026-09-24 08:55:12 UTC 1,249 bytes, 1 lines download raw bytes

1import{Z as u,a2 as w}from"./vendor-mui-D5pLRgDb.js";import{S as h}from"./vendor-sweetalert2-CokzRhbv.js";import{J as b}from"./jszip.min-DObjSqR4.js";import{a as i,as as y}from"./index-BSFWpFMK.js";import"./__commonjsHelpers__-BosuxZz1.js";const z=({extensions:c,handleChange:s,fileType:n,maxSize:l,defaultStyles:d={},required:p=!1,disabled:g=!1})=>(l||(l=4e6),u(w,{children:u("input",{type:"file",required:p,style:d,onChange:async t=>{const e=t.target.files[0];if(!e)return;const f=e.name;if(e.size>l){t.target.value=null,i(`File size has to be less than ${y(l)}`);return}const m=e.name.split(".").pop();if(c.filter(a=>a===m).length){const a=new FileReader;if(n.toLowerCase()==="image")a.onload=async o=>{const r=o.target.result;s(f,e,r)},a.readAsDataURL(e);else if(["csv","code","text"].includes(n.toLowerCase()))try{a.onload=async o=>{const r=o.target.result;s(r,f,e)},a.readAsText(e)}catch{t.target.value=null,i("Something went wrong")}else if(n.toLowerCase()==="zip")try{const r=await new b().loadAsync(e);s(r)}catch{t.target.value=null,i("Something went wrong")}}else t.target.value=null,h.fire({icon:"error",html:`<b>Allowed file extensions are</b><br>${c.join(",  ")}`})},onClick:t=>{t.target.value=""},disabled:g})}));export{z 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.