���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
.output.2
/
public
/
_nuxt
/
Viewing: BLIV2uyx.js
import{_ as X}from"./Cwch0ha2.js";import{_ as Z}from"./Ch02pi7V.js";import{_ as ee}from"./B1nRRrFI.js";import{q as te,g as se,O as ne,h as le,W as N,r as k,P as B,R as oe,Q as ae,Y as ie,j as re,u as ue,k as t,o as d,c,b as h,a as s,I as D,J as M,t as u,G as U,w as O,a0 as de,n as ce,S as _e,p as me,f as fe,U as he,_ as pe}from"./CN8H5RCu.js";import{_ as ge}from"./CYo8lBmY.js";import{u as we}from"./BFF_7S7Q.js";import{u as P}from"./Hd6gNmEX.js";import{u as ye}from"./9gVSszSs.js";import"./DYEZnc8p.js";import"./DV-TEbnC.js";const b=x=>(me("data-v-003d23e2"),x=x(),fe(),x),be={key:0,class:"flex items-center justify-center"},xe={key:1,class:"mb-2 pt-3 px-2 mt-1"},ve=["dir"],ke={class:"flex justify-between items-start"},Ue={class:"w-full flex justify-between items-start mb-3"},Ve={key:0,class:"w-5/12"},Ie={class:"block w-5/12 text-gray-500 bg-white text-sm"},Ce={key:0,class:"w-7/12"},Se={key:1,class:"w-7/12"},Ae={class:"w-8/11 flex justify-between text-gray-500 bg-white text-sm"},je={class:"flex justify-between"},Ke=b(()=>s("span",null,"عرض ورق:",-1)),qe={class:"flex justify-between"},Re=b(()=>s("span",null,"طول ورق:",-1)),Ee={class:"h-32 w-[13rem] mb-3"},Le=["src","alt"],ze=["textContent"],Ne={class:"mb-2"},Be={key:0},De=["dir"],Me={class:"bg-gray-300"},Oe=b(()=>s("th",null,null,-1)),Pe=b(()=>s("th",null,null,-1)),$e=b(()=>s("td",null," = ",-1)),Te=["dir"],Fe={class:"px-1 w-3/12"},He={class:"block text-gray-500 bg-white text-base"},Je={class:"px-1 w-4/12"},Ge={class:"px-1 w-4/12"},Qe={class:"block px-2 text-base truncate"},We=te({__name:"[id]",async setup(x){let C,S;const{t:i,locale:g}=se(),f=ne(),$=le(),T=de(),A=ye(),{id:j}=N().params,p=k(!0),F=we("sheets");let w=B([{sheet_full_name:"",name_sheet:"",name:"",length:"",rotation:0,value:0,width:0}]);const l=B({x:0,y:0,z:0,c:0,count:0}),v=k(null),H=N(),_=k({id:null,key:null,title:null,title_en:null,variables:[{address:"",key:"",label:"",label_en:"",type:0,options:[]}],image_2_d:{address:""}}),m=k({length:0,name:"",name_en:"",name_sheet:"",rotation:0,sheet_full_name:"",value:0,width:0});oe(async()=>{let e=await F.getItem("new");e=JSON.parse(e);for(let n in e)w[n]=e[n],w[n].sheet_full_name=e[n].name+"("+e[n].name_sheet+")";m.value=w.find(n=>n.value==l.c)});async function J(){var n,o;const{data:e}=await P("/analyze/unit",{query:{unit_id:j},immediate:!0,server:!0,onRequestError({error:r}){f.add({title:i(r.message),color:"red"}),f.add({title:i("if your are using vpn, disable it and try again"),color:"red"})},onResponseError({response:r}){f.add({title:i(r.status),color:"red"}),f.add({title:i("if your are using vpn, disable it and try again"),color:"red"})}});_.value=e.value?e.value.unit:[],l.count=1,(o=(n=_.value)==null?void 0:n.variables)==null||o.forEach(r=>{l[r.key]=r.default})}[C,S]=ae(()=>J()),await C,S();function G(){let e=!0,n=m.value.rotation==1;const o=[];return n?l.x>m.value.length-1?(e=!1,f.add({title:"عرض تکه ای که وارد کرده اید نباید از طول ورق بیشتر باشد",color:"red"})):l.z>m.value.width-1&&(e=!1,f.add({title:"طول تکه ای که وارد کرده اید نباید از عرض ورق بیشتر باشد",color:"red"})):l.x>m.value.width-1?(e=!1,f.add({title:"عرض تکه ای که وارد کرده اید نباید از عرض ورق بیشتر باشد",color:"red"})):l.z>m.value.length-1&&(e=!1,f.add({title:"طول تکه ای که وارد کرده اید نباید از طول ورق بیشتر باشد",color:"red"})),l.x<=0&&(e=!1,o.push(i("width_is_required"))),l.y<=0&&(e=!1,o.push(i("length_is_required"))),l.z<=0&&(e=!1,o.push(i("height_is_required"))),l.c<=0&&(e=!1,o.push(i("color_is_required"))),l.count<=0&&(e=!1,o.push(i("count_is_required"))),o.length>0&&(console.log("messages",o),o.forEach(r=>{f.add({title:r,color:"red"})})),p.value=!1,e}async function K(e,n,o){if(p.value=!0,!G())return;l.unit_id=j,l.type=e,l.unit_title=n;const{data:r}=await P("/analyze/computing-unit",{method:"POST",immediate:!0,server:!0,body:l});v.value=r.value.result,o&&r.value&&ce($(o)),p.value=!1}ie(l,e=>{m.value=w.find(n=>n.value==e.c),console.log("selected material",m.value)});let q=e=>["ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e);const y=e=>{if(e.target.tagName=="SELECT"&&q(e.code)&&e.preventDefault(),q(e.code)){let n=parseInt(e.target.id),o;switch(e.code){case"ArrowUp":case"ArrowRight":if(n>1)o=n-1;else return;break;case"ArrowDown":case"ArrowLeft":if(n<7)o=n+1;else return;break}document.getElementById(o).focus()}};return re(()=>{var e,n;H.meta.title=(e=_.value)==null?void 0:e.title,ue({title:(n=_.value)==null?void 0:n.title}),p.value=!1}),(e,n)=>{var E,L,z;const o=X,r=Z,Q=ee,R=_e,W=ge,Y=he;return t(p)?(d(),c("div",be,[h(o)])):(d(),c("div",xe,[s("section",{dir:t(g)=="en"?"ltr":"rtl"},[s("div",ke,[s("div",Ue,[0<((E=t(_).variables)==null?void 0:E.length)?(d(),c("div",Ve,[(d(!0),c(D,null,M((L=t(_))==null?void 0:L.variables,(a,V)=>(d(),c("div",{class:"flex justify-between items-center w-full mb-3",key:V},[s("label",Ie,u(t(g)=="en"?a.label_en:a.label),1),a.type==1?(d(),c("div",Ce,[h(r,{loading:!1,variant:"outline",onKeydown:y,inputClass:" w-10/12 sm:w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 py-0 text-xs",onKeypress:t(A).NumbersOnly,modelValue:t(l)[a.key],"onUpdate:modelValue":I=>t(l)[a.key]=I},null,8,["onKeypress","modelValue","onUpdate:modelValue"])])):(d(),c("div",Se,[h(Q,{options:t(w),"option-attribute":"sheet_full_name","value-attribute":"value",onKeydown:y,class:"w-full",selectClass:" w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 pl-2 py-0 text-xs",modelValue:t(l)[a.key],"onUpdate:modelValue":I=>t(l)[a.key]=I},null,8,["options","modelValue","onUpdate:modelValue"])]))]))),128)),s("div",Ae,[s("div",je,[Ke,s("span",null,u(t(m).width),1)]),s("div",qe,[Re,s("span",null,u(t(m).length),1)])])])):U("",!0),s("div",Ee,[t(_).image_2_d?(d(),c("img",{key:0,src:t(T).public.FILE_URL+((z=t(_).image_2_d)==null?void 0:z.address),class:"w-full h-full",alt:t(i)("Add Unit")},null,8,Le)):U("",!0),h(R,{loading:!1,square:"",onKeydown:y,id:"5",onClick:n[0]||(n[0]=a=>K("computing",t(_).title,null)),class:"w-full flex text-main-700 rounded-sm border border-red-600 h-7 bg-white items-center justify-center"},{default:O(()=>{var a;return[s("span",{textContent:u((a=t(v))!=null&&a.length?t(i)("Recalculate"):t(i)("Computing")),class:"block px-2 text-sm truncate"},null,8,ze)]}),_:1})])])])],8,ve),s("section",Ne,[t(p)?(d(),c("div",Be,[h(W)])):U("",!0),t(v)?(d(),c("table",{key:1,class:"w-full p-0",dir:t(g)=="en"?"ltr":"rtl"},[s("thead",null,[s("tr",Me,[s("th",null,u(t(i)("length")),1),Oe,s("th",null,u(t(i)("width")),1),Pe,s("th",null,u(t(i)("count")),1),s("th",null,u(t(i)("unit_title")),1)])]),s("tbody",null,[(d(!0),c(D,null,M(t(v),(a,V)=>(d(),c("tr",{key:V,class:"even:bg-gray-100"},[s("td",null,u(a.length),1),s("td",null,[h(Y,{name:"i-heroicons-x-mark",class:"text-[11px]"})]),s("td",null,u(a.width),1),$e,s("td",null,u(a.count),1),s("td",null,u(t(g)=="en"?a.label_en:a.label),1)]))),128))])],8,De)):U("",!0)]),s("footer",{dir:t(g)=="en"?"ltr":"rtl",class:"px-3 bg-white flex justify-between items-center pb-2 pt-2 sm:border-r sm:border-l w-full sm:w-9/12 md:w-7/12 lg:w-6/12 2xl:w-5/12 mx-auto fixed bottom-0 right-0 left-0 border-t"},[s("div",Fe,[s("label",He,u(t(i)("Number_Units"))+" : ",1)]),s("div",Je,[h(r,{loading:!1,variant:"outline",inputClass:"w-full text-center text-main-700 rounded-sm ring-gray-400 !shadow-none focus:ring-1 focus:ring-orange-600 h-7 text-base ",modelValue:t(l).count,"onUpdate:modelValue":n[1]||(n[1]=a=>t(l).count=a),onKeypress:t(A).NumbersOnly,onKeydown:y,id:"6"},null,8,["modelValue","onKeypress"])]),s("div",Ge,[h(R,{loading:!1,square:"",onKeydown:y,id:"7",onClick:n[2]||(n[2]=a=>K("set",t(_).title,"/analyze/list")),class:"w-full flex text-main-700 border-red-700 rounded-sm border h-7 bg-white items-center justify-center"},{default:O(()=>[s("span",Qe,u(t(i)("payment_5")),1)]),_:1})])],8,Te)]))}}}),it=pe(We,[["__scopeId","data-v-003d23e2"]]);export{it as default};
Coded With 💗 by
0x6ick Mod By V1rus_Alfa