PageSourceSearch

https://lablab.ai/_next/static/chunks/61332.86970e4b2bba6973.js

js lablab.ai collected 2026-09-24 09:18:44 UTC 5,256 bytes, 3 lines download raw bytes

1"use strict";
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="cb76f3f2-81a2-5838-8abb-22cc3e4d74cc")}catch(e){}}();(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[61332],{38951:(e,t,a)=>{a.r(t),a.d(t,{CropperModule:()=>p,default:()=>m});var s=a(95442),l=a(54842),r=a(28871);a(84117);var i=a(12602),n=a(63379),o=a(46206),c=a(68078);let d={isOpen:!1,fileUrl:null,uploading:!1};function u(e,t){switch(t.type){case"toggleOpen":return{...e,isOpen:!e.isOpen};case"setFileUrl":return{...e,fileUrl:t.payload};case"setUploading":return{...e,uploading:t.payload};default:throw Error("Unsupported action type: ".concat(t.type))}}let p=e=>{let{updateResult:t,aspectRatio:a,open:p,setOpen:m,setObjectURL:y,minWidth:g,minHeight:f,uploadType:h,uploadParams:x}=e,v=(0,l.useRef)(null),[b,j]=(0,l.useState)(null),{uploadPhoto:w,cropperRef:N,uploading:k}=(e=>{let{setOpen:t,updateResult:a,setObjectURL:s,uploadType:r,uploadParams:i={}}=e,[n,p]=(0,l.useReducer)(u,d),m=(0,l.useRef)(null),y=e=>p({type:"setUploading",payload:e});return{uploadPhoto:async()=>{var e;y(!0);let l=null==(e=m.current)?void 0:e.getCanvas(),n=async e=>{if(a){let t=await a(e);if((null==t?void 0:t.status)&&200!==t.status)throw Error("Updating profile failed")}};l&&l.toBlob(async e=>{try{if(!e)throw Error("No blob found");let a=new FormData;a.append("file",e);let l=await (0,c.F8)({body:a,type:r,params:i});if(!l)return void(0,o.A)({title:{key:"toasts.upload.imageFailed"},message:{key:"toasts.generic.retry"},duration:300});let{fileUrl:d}=l;(0,o.A)({title:{key:"toasts.upload.imageSucceeded"},duration:300}),await n(d),s(d),t(!1),p({type:"setFileUrl",payload:d}),y(!1)}catch(e){y(!1),(0,o.A)({title:{key:"toasts.upload.imageFailed"},message:{key:"toasts.generic.retryOrContact"},duration:500})}},"image/jpeg")},cropperRef:m,uploading:n.uploading}})({setOpen:m,updateResult:t,setObjectURL:y,uploadType:h,uploadParams:x});return(0,l.useEffect)(()=>()=>{b&&b.src&&URL.revokeObjectURL(b.src)},[b]),(0,s.jsx)(n.a,{open:p,setOpen:m,children:(0,s.jsxs)("div",{className:"m-4 flex flex-col gap-4",children:[(0,s.jsx)("div",{className:"relative flex h-3/5 min-h-[300px] w-full items-center justify-center overflow-hidden rounded-lg border bg-gray-50",children:b?(0,s.jsx)(r.IOb,{ref:N,src:b.src,className:"size-full",stencilProps:{aspectRatio:a,grid:!0},minWidth:g,minHeight:f}):(0,s.jsx)("div",{className:"flex flex-col items-center justify-center text-center text-sm text-gray-500",children:(0,s.jsx)("p",{children:"No image selected"})})}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-between gap-3",children:[(0,s.jsx)(i.Button,{className:"rounded-lg border px-4 py-2",onClick:()=>{v.current&&v.current.click()},disabled:k,children:b?"Change image":"Upload image"}),(0,s.jsx)("input",{ref:v,type:"file",accept:"image/*",onChange:e=>{let{files:t}=e.target;t&&t[0]&&j({src:URL.createObjectURL(t[0]),type:t[0].type}),e.target.value=""},className:"hidden"}),b&&(0,s.jsx)(i.Button,{className:"rounded-lg border px-4 py-2",onClick:w,color:"twitch",disabled:k,children:k?"Saving...":"Save"})]})]})})},m=p},63379:(e,t,a)=>{a.d(t,{a:()=>u});var s=a(95442),l=a(54842),r=a(68781),i=a(57661),n=a(23565),o=a(26214),c=a.n(o),d=a(15392);function u(e){let{open:t,setOpen:a,children:o,handleClosing:u=()=>a(!1),classOverride:p=""}=e;return(0,s.jsx)(r.e.Root,{show:t,as:l.Fragment,children:(0,s.jsx)(i.l,{as:"div",className:(0,d.QP)("fixed inset-0 z-[9999] overflow-y-auto",c().className),onClose:()=>{u(),a(!1)},children:(0,s.jsxs)("div",{className:"flex min-h-screen items-center justify-center px-4 pb-20 pt-4 text-center sm:block sm:p-0",children:[(0,s.jsx)(r.e.Child,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(i.l.Overlay,{className:"fixed inset-0 bg-black/70 backdrop-blur-sm  transition-opacity"})}),(0,s.jsx)("span",{className:"hidden sm:inline-block sm:h-screen sm:align-middle","aria-hidden":"true",children:"​"}),(0,s.jsx)(r.e.Child,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",afterLeave:u,children:(0,s.jsxs)("div",{className:(0,d.QP)("inline-block transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left align-bottom shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-3xl sm:p-6 sm:align-middle",p),children:[o,(0,s.jsx)("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:(0,s.jsxs)("button",{type:"button",className:"rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2",onClick:()=>{a(!1),u()},children:[(0,s.jsx)("span",{className:"sr-only",children:"Close"}),(0,s.jsx)(n.A,{className:"size-6","aria-hidden":"true"})]})})]})})]})})})}}}]);
3//# chunkId=cb76f3f2-81a2-5838-8abb-22cc3e4d74cc

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.