403Webshell
Server IP : 217.154.3.148  /  Your IP : 216.73.216.90
Web Server : Apache
System : Linux blissful-wright.217-154-3-148.plesk.page 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : gracious-boyd_hfhh1h8vo9n ( 10000)
PHP Version : 8.3.31
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/gracious-boyd.217-154-3-148.plesk.page/nextjs/.next/server/chunks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/gracious-boyd.217-154-3-148.plesk.page/nextjs/.next/server/chunks/249.js
"use strict";exports.id=249,exports.ids=[249],exports.modules={4249:(a,b,c)=>{c.r(b),c.d(b,{inferTileSegmentation:()=>D,renderTileMask:()=>C});var d=c(51455),e=c(76760),f=c.n(e),g=c(9288),h=c.n(g);let i=process.cwd(),j=f().join(i,"models","unet_latest"),k=f().join(j,"unet_tiles.onnx"),l=f().join(j,"class_names.json"),m=f().join(j,"color_map.json"),n=Math.max(0,Number.parseInt(process.env.TILE_UNET_MAX_DIMENSION??"1600",10)||0),o=[{id:0,name:"background",color:[0,0,0]},{id:1,name:"tiles",color:[46,204,113]}],p=[{id:0,name:"background",color:[0,0,0]},{id:1,name:"grout",color:[52,152,219]},{id:2,name:"tiles",color:[46,204,113]}],q=null;function r(){return q||(q=c(90884)),q}let s=null,t=null;async function u(){let a=r();return s||(s=(async()=>{await (0,d.access)(k);try{let a=await (0,d.stat)(k);console.info("[tile-unet] initializing ONNX session",{path:k,sizeBytes:a.size,mtimeMs:a.mtimeMs})}catch{console.info("[tile-unet] initializing ONNX session",{path:k})}try{let b=await a.InferenceSession.create(k,{graphOptimizationLevel:"all"});return console.info("[tile-unet] ONNX session ready"),b}catch(b){return console.warn("[tile-unet] session init failed, retrying with default settings",b),a.InferenceSession.create(k,{graphOptimizationLevel:"all"})}})().catch(a=>{throw s=null,Error(`[tile-unet] failed to load ONNX model at ${k}: ${a instanceof Error?a.message:a}`)})),s}async function v(){return t||(t=(async()=>{try{let[a,b]=await Promise.all([(0,d.access)(l).then(()=>w(l)).catch(()=>null),(0,d.access)(m).then(()=>w(m)).catch(()=>null)]),c=Array.isArray(a)&&a.length?a.map((a,b)=>String(a??`class_${b}`)):p.map(a=>a.name),e=b??Object.fromEntries(p.map(a=>[String(a.id),a.color])),f=c.map((a,b)=>{let c=b<p.length?p[b].color:p[0].color,d=e[String(b)]??c;return{id:b,name:a,color:[d[0],d[1],d[2]]}});if(!f.length)return p;return f}catch(a){return console.warn("[tile-unet] falling back to default classes",a),p}})()),t}async function w(a){return JSON.parse(await (0,d.readFile)(a,"utf8"))}function x(a,b,c){if(a<=b)return[0];let d=Math.max(0,a-b),e=[];for(let a=0;a<d;a+=c)e.push(a);return e.push(d),Array.from(new Set(e))}function y(a,b,c){return a<b?b:a>c?c:a}async function z(a,b,c,d,e){return b===d&&c===e?a:new Uint8Array(await h()(Buffer.from(a),{raw:{width:b,height:c,channels:1}}).resize(d,e,{kernel:h().kernel.nearest}).toColorspace("b-w").raw().toBuffer())}function A(a,b,c,d){let e=[];for(let f=0;f<b;f++){let g=1/0,h=-1/0,i=0;for(let e=0;e<c;e++){let j="nhwc"===d?a[e*b+f]:a[f*c+e];j<g&&(g=j),j>h&&(h=j),i+=j}e.push({min:Number(g.toFixed(4)),max:Number(h.toFixed(4)),mean:Number((i/Math.max(1,c)).toFixed(6))})}return e}function B(a,b,c,d){let e=new Float32Array(a.length);for(let f=0;f<c;f++){let g=-1/0;for(let e=0;e<b;e++){let h="nhwc"===d?a[f*b+e]:a[e*c+f];h>g&&(g=h)}let h=0;for(let i=0;i<b;i++){let j=Math.exp(("nhwc"===d?a[f*b+i]:a[i*c+f])-g);e[i*c+f]=j,h+=j}let i=h>0?1/h:1;for(let a=0;a<b;a++)e[a*c+f]*=i}return e}async function C(a,b,c,d){let e=new Map;d.forEach(a=>e.set(a.id,a.color));let f=Buffer.alloc(b*c*4);for(let b=0;b<a.length;b++){let c=e.get(a[b])??[0,0,0],d=4*b;f[d]=c[0],f[d+1]=c[1],f[d+2]=c[2],f[d+3]=255}let g=await h()(f,{raw:{width:b,height:c,channels:4}}).png().toBuffer();return`data:image/png;base64,${g.toString("base64")}`}async function D(a,b={}){let c,e=!!(b.debug||"1"===process.env.TILE_UNET_DEBUG),f=h()(a,{failOnError:!1}),g=await f.metadata(),i=g.width??0,j=g.height??0;if(!(i>0&&j>0))throw Error("[tile-unet] failed to decode image dimensions");let{width:l,height:m,scale:q}=function(a,b){if(!(a>0&&b>0)||n<=0)return{width:a,height:b,scale:1};let c=Math.max(a,b);if(c<=n)return{width:a,height:b,scale:1};let d=n/c;return{width:Math.max(32,Math.round(a*d)),height:Math.max(32,Math.round(b*d)),scale:d}}(i,j),s=f.clone().ensureAlpha().removeAlpha();(1!==q||l!==i||m!==j)&&(s=s.resize(l,m,{kernel:h().kernel.lanczos3}));let{data:t,info:w}=await s.raw().toBuffer({resolveWithObject:!0}),E=w.width??l,F=w.height??m,G=await u(),H=await v(),I=Math.max(64,b.tile??512),J=Math.max(16,b.stride??256),K=b.mean??[.485,.456,.406],L=b.std??[.229,.224,.225],M=Array.isArray(G.inputNames)?G.inputNames:[],N=G.inputMetadata??{},O=M[0]??Object.keys(N)[0];if(!O)throw Error("[tile-unet] model does not expose any input tensor");let{inputName:P,tile:Q,inputChannels:R}=function(a,b,c,d){let e=d[c],f=Array.isArray(e?.dimensions)?e.dimensions:null,g=b,h=3;if(Array.isArray(f)&&f.length>=4){let a=f[f.length-2],b=f[f.length-1];"number"==typeof a&&a>0&&(g=a),"number"==typeof b&&b>0&&(g=Math.min(g,b));let c=f[1];"number"==typeof c&&c>0&&(h=c)}return{inputName:c,tile:g=Math.max(32,g),inputChannels:h}}(0,I,O,N),S=x(F,Q,J),T=x(E,Q,J),U=e?{input:{width:i,height:j,processedWidth:E,processedHeight:F,tile:Q,stride:J,scale:q}}:void 0,V=function(a,b,c,d,e){let f=b*c,g=new Float32Array(3*f);for(let b=0;b<f;b++){let c=3*b,h=a[c]/255,i=a[c+1]/255,j=a[c+2]/255;g[b]=(h-d[0])/e[0],g[f+b]=(i-d[1])/e[1],g[2*f+b]=(j-d[2])/e[2]}return g}(t,E,F,K,L),W=E*F,X=Q*Q,Y="unknown",Z=Q,$=Q,_=0;if("1"===process.env.TILE_SEG_TRACE&&console.info("[tile-unet] session info",{inputs:G.inputNames,outputs:G.outputNames,inputName:P,tile:Q,classCount}),U){let a=function(a){if(!a.length)return{min:0,max:0,mean:0};let b=1/0,c=-1/0,d=0;for(let e=0;e<a.length;e++){let f=a[e];f<b&&(b=f),f>c&&(c=f),d+=f}return{min:Number(b.toFixed(6)),max:Number(c.toFixed(6)),mean:Number((d/Math.max(1,a.length)).toFixed(6))}}(V);U.inputStats={normalizedMin:a.min,normalizedMax:a.max,normalizedMean:a.mean,channelStats:A(V,3,W,"nchw"),samplePixels:function(a,b,c){let d=b*c,e=(c,e)=>{let f=Math.max(0,Math.min(d-1,e*b+c)),g=a[f],h=a[d+f],i=a[2*d+f];return[Number(g.toFixed(4)),Number(h.toFixed(4)),Number(i.toFixed(4))]};return{topLeft:e(0,0),center:e(Math.floor(b/2),Math.floor(c/2))}}(V,E,F)},U.model={path:k,sizeBytes:0,mtimeMs:0,inputs:G.inputNames,outputs:G.outputNames,inputMetadata:N};try{let a=await (0,d.stat)(k);U.model.sizeBytes=a.size,U.model.mtimeMs=a.mtimeMs}catch{}}let{Tensor:aa}=r(),ab=async(a,b)=>{let c;if(3!==R)throw Error(`[tile-unet] unexpected inputChannels=${R} (expected 3 RGB channels)`);let d=new Float32Array(R*X);!function(a,b,c,d,e,f,g,h){let i=c*d,j=e*e;for(let k=0;k<h;k++){let h=k*i,l=k*j,m=0;for(let i=0;i<e;i++){let j=y(g+i,0,d-1)*c;for(let d=0;d<e;d++,m++){let e=y(f+d,0,c-1);b[l+m]=a[h+j+e]}}}}(V,d,E,F,Q,a,b,R);let e={[P]:new aa("float32",d,[1,R,Q,Q])};try{c=await G.run(e)}catch(c){throw console.error("[tile-unet] session.run failed",{inputName:P,tile:Q,inputChannels:R,startX:a,startY:b},c),c}let f=G.outputNames[0]??Object.keys(c)[0];if(!f||!c[f])throw Error("[tile-unet] model response missing output tensor");let g=c[f],h=g.data;return{outputName:f,outputTensor:g,logits:h}},ac=S[0]??0,ad=T[0]??0,ae=await ab(ad,ac);{let a=Array.isArray(ae.outputTensor.dims)?ae.outputTensor.dims.map(a=>Number(a)):[],b=a.length>=4?a.slice(a.length-4):a;if(4===b.length){let a=b[1],c=b[2],d=b[3];"number"==typeof a&&a>0&&c===Q&&d===Q?(Y="nchw",_=a,$=c,Z=d):"number"==typeof d&&d>0&&a===Q&&c===Q?(Y="nhwc",_=d,$=a,Z=c):Y="unknown"}if("unknown"===Y||!(_>0))throw Error(`[tile-unet] unable to determine output layout/classes from dims=${JSON.stringify(a)}`);if(Z*$!==X)throw Error(`[tile-unet] unexpected output spatial size ${Z}x${$} (expected ${Q}x${Q})`);U&&(U.output={name:ae.outputName,dims:a,layout:Y,width:Z,height:$,classes:_,logitsStats:A(ae.logits,_,X,Y)})}let af=new Float32Array(_*W),ag=new Uint32Array(W),ah=(a,b,c)=>{for(let d=0;d<Q;d++){let e=y(c+d,0,F-1)*E;for(let c=0;c<Q;c++){let f=e+y(b+c,0,E-1),g=d*Q+c;for(let b=0;b<_;b++)af[b*W+f]+=a[b*X+g];ag[f]+=1}}},ai=B(ae.logits,_,X,Y);for(let a of(U?.output&&!U.output.probsStats&&(U.output.probsStats=A(ai,_,X,"nchw")),ah(ai,ad,ac),S))for(let b of T)(b!==ad||a!==ac)&&ah(B((await ab(b,a)).logits,_,X,Y),b,a);let aj=new Uint8Array(W);for(let a=0;a<W;a++){let b=ag[a]>0?ag[a]:1,c=0,d=-1/0;for(let e=0;e<_;e++){let f=af[e*W+a]/b;f>d&&(d=f,c=e)}aj[a]=c}let ak=aj,al=E,am=F;if((al!==i||am!==j)&&(ak=await z(aj,E,F,i,j),al=i,am=j),U){let a={};for(let b=0;b<_;b++)a[String(b)]=0;for(let b=0;b<ak.length;b++){let c=ak[b];c<_&&(a[String(c)]=(a[String(c)]??0)+1)}U.argmaxCounts=a}let an=H.slice(0,_),ao=function(a,b,c,d){let e=Array(b.length).fill(0);for(let b=0;b<a.length;b++){let c=a[b];c<e.length&&(e[c]+=1)}let f=Math.max(1,c*d),g={};return b.forEach((a,b)=>{g[a.name]=Number((e[b]/f).toFixed(6))}),g}(ak,c=an.length===_?an:2===_?o:3===_?p:Array.from({length:_},(a,b)=>({id:b,name:0===b?"background":`class_${b}`,color:0===b?[0,0,0]:[255,255,255]})),al,am),ap=await C(ak,al,am,c);if(U?.output){U.output.classNames=c.map(a=>a.name);let a=c.find(a=>"tiles"===String(a.name).toLowerCase());U.output.tileClassId=a?a.id:void 0}return{ids:ak,width:al,height:am,dataUrl:ap,classes:c,coverage:ao,meta:{processedWidth:E,processedHeight:F,originalWidth:i,originalHeight:j,scale:q},...U?{debug:U}:{}}}}};

Youez - 2016 - github.com/yon3zu
LinuXploit