1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1464],{44470:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>D});var s=a(37876),l=a(14232),n=a(92538),i=a(90556),r=a(60319),o=a.n(r);let c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null!=e&&Number.isFinite(Number(e))?Number(Number(e).toFixed(t)).toLocaleString("fa-IR"):"â"},d=e=>!Number.isFinite(e)||e<=0?"â":e>=1e9?"".concat(c(e/1e9,1)," Ù
ÛÙÛØ§Ø±Ø¯ تÙÙ
اÙ"):e>=1e6?"".concat(c(Math.round(e/1e6))," Ù
ÛÙÛÙ٠تÙÙ
اÙ"):"".concat(c(1e3*Math.round(e/1e3))," تÙÙ
اÙ"),u=e=>"Ú©ÛÙÙگرÙ
"===e?"Ú©ÛÙÙ":e||"",m=e=>String(null==e?"":e).replace(/\d/g,e=>"Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹"[e]).replace(".","Ù«"),_=e=>(e||"").replace(/[Û°-Û¹]/g,e=>"Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹".indexOf(e)).replace(/[Ù -Ù©]/g,e=>"٠١٢٣٤٥٦٧٨٩".indexOf(e)).replace(/\D/g,""),p=e=>{let t=Number(e);return Number.isFinite(t)?String(t):String(null==e?"":e)},h=["Ù
ÛÙگرد","ØªÛØ±Ø¢ÙÙ","ÙØ¨Ø´Û","ÙØ§ÙداÙÛ","پرÙÙÛÙ","ÙÙÙÙ","تسÙ
Ù","سپرÛ","ÙØ±Ù Ø³ÛØ§Ù","ÙØ±Ù گاÙÙØ§ÙÛØ²Ù","ÙØ±Ù رÙÚ¯Û","ÙØ±Ù آجدار","ÙØ±Ù Ø±ÙØºÙÛ"],x=(e,t)=>{let a=new Map;for(let s of e)s.t!==t||a.has(s.s)||a.set(s.s,s.z||s.s);return[...a.entries()].map(e=>{let[t,a]=e;return{key:t,label:a}}).sort((e,t)=>{let a=parseFloat(String(e.key)),s=parseFloat(String(t.key));return Number.isFinite(a)&&Number.isFinite(s)&&a!==s?a-s:String(e.label).localeCompare(String(t.label),"fa")})},f=(e,t,a)=>(x(e,t).find(e=>e.key===a)||{}).label||a||"",j=(e,t,a)=>e.filter(e=>e.t===t&&e.s===a).sort((e,t)=>e.p-t.p),g="Ø³Ø§ÛØ±",N=(e,t)=>{let a;return t===g?["Ú©ÛÙÙگرÙ
","تÙ","شاخÙ","عدد","برگ"]:"شاخÙ"===((a=e.find(e=>e.t===t))?a.u:"Ú©ÛÙÙگرÙ
")?["شاخÙ"]:"Ù
ÛÙگرد"===t?["Ú©ÛÙÙگرÙ
","تÙ","شاخÙ"]:(t||"").startsWith("ÙØ±Ù")?["Ú©ÛÙÙگرÙ
","تÙ","برگ"]:["Ú©ÛÙÙگرÙ
","تÙ"]},y={14:154.8,16:189.6,18:225.6,20:268.8,22:314.4,24:368.4,27:433.2};function Q(e){let t=Number(e.qty);if(!(t>0))return null;if("Ú©ÛÙÙگرÙ
"===e.unit)return t;if("تÙ"===e.unit)return 1e3*t;if("شاخÙ"===e.unit){let a,s,l=(a=e.type,s=e.size,"Ù
ÛÙگرد"===a?Number(s)*Number(s)/162*12:"ØªÛØ±Ø¢ÙÙ"===a&&y[Number(s)]||null);return l?t*l:null}return null}function b(e,t){if(e.type===g)return{state:"expert"};if(!e.type||!e.size)return{state:"incomplete"};let a=j(t,e.type,e.size);if(!a.length)return{state:"expert"};let s=a[0].u,l=a[0];if(e.factory){let t=a.find(t=>t.f===e.factory);t&&(l=t)}let n=null,i=Number(e.qty);i>0&&(n="شاخÙ"===s?"شاخÙ"===e.unit?i:null:Q(e));let r=null!=n?Math.round(n*l.p):null;return{state:"ok",unit:s,price:l.p,brandLabel:l.f||"",isCheapest:!e.factory&&a.length>1,line:r}}let v=e=>{let{size:t=16}=e;return(0,s.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,s.jsx)("path",{d:"M12 2c.45 4.2 2.3 6.05 6.5 6.5-4.2.45-6.05 2.3-6.5 6.5-.45-4.2-2.3-6.05-6.5-6.5 4.2-.45 6.05-2.3 6.5-6.5z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M19 3c.16 1.5.82 2.16 2.3 2.3-1.48.16-2.14.82-2.3 2.3-.16-1.48-.82-2.14-2.3-2.3C18.18 5.16 18.84 4.5 19 3z",fill:"currentColor",opacity:"0.6"})]})},w=()=>(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.42 0-8 2.69-8 6v1h16v-1c0-3.31-3.58-6-8-6Z"})}),T=()=>(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M6.6 10.8a15.5 15.5 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.24c1.15.38 2.36.58 3.6.58a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.24.2 2.45.58 3.6a1 1 0 0 1-.24 1l-2.24 2.2Z"})}),C=()=>(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M20 6 9 17l-5-5",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})}),k=()=>(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M13 2 4.5 13.5H11l-1 8.5 8.5-11.5H12l1-8.5Z"})}),L=()=>(0,s.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M6 2h8l4 4v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm7 1.5V7h3.5L13 3.5ZM8 12h8v1.5H8V12Zm0 3.3h8v1.5H8v-1.5ZM8 8.7h4v1.5H8V8.7Z"})}),S={image:{icon:"\uD83D\uDDBCï¸",label:"عکس"},pdf:{icon:"\uD83D\uDCC4",label:"PDF"},excel:{icon:"\uD83D\uDCCA",label:"اکسÙ"},word:{icon:"\uD83D\uDCDD",label:"ÙØ±Ø¯"}};function B(e){let{mode:t}=e;return(0,s.jsxs)("div",{className:o().thinking,children:[(0,s.jsxs)("div",{className:o().thinkingHead,children:[(0,s.jsx)("span",{className:o().thinkingSparkle,children:(0,s.jsx)(v,{size:18})}),"image"===t?"ÙÙØ´ Ù
صÙÙØ¹Û ÙÙÙØ§Ø¯ Ø§ÛØ±Ø§ÙÛØ§Ù در ØØ§Ù Ø¨Ø±Ø±Ø³Û Ø¹Ú©Ø³ Ø´Ù
اâ¦":"file"===t?"ÙÙØ´ Ù
صÙÙØ¹Û ÙÙÙØ§Ø¯ Ø§ÛØ±Ø§ÙÛØ§Ù در ØØ§Ù Ø¨Ø±Ø±Ø³Û ÙØ§ÛÙ Ø´Ù
اâ¦":"ÙÙØ´ Ù
صÙÙØ¹Û ÙÙÙØ§Ø¯ Ø§ÛØ±Ø§ÙÛØ§Ù در ØØ§Ù Ø¨Ø±Ø±Ø³Û Ø¯Ø±Ø®ÙØ§Ø³Øª Ø´Ù
اâ¦"]}),(0,s.jsxs)("div",{className:o().shimmerLines,children:[(0,s.jsx)("span",{className:o().shimmer,style:{width:"82%"}}),(0,s.jsx)("span",{className:o().shimmer,style:{width:"64%"}}),(0,s.jsx)("span",{className:o().shimmer,style:{width:"73%"}})]})]})}function F(e){let{rows:t,catalog:a,engine:i,rawText:r,totals:u}=e,[m,p]=(0,l.useState)(""),[h,x]=(0,l.useState)(""),[j,N]=(0,l.useState)(""),[y,Q]=(0,l.useState)(!1),[S,B]=(0,l.useState)(!1),[F,I]=(0,l.useState)("form"),[M,z]=(0,l.useState)(""),[D,E]=(0,l.useState)(""),[R,A]=(0,l.useState)(0);(0,l.useEffect)(()=>{if("code"!==F||R<=0)return;let e=setInterval(()=>A(e=>e>0?e-1:0),1e3);return()=>clearInterval(e)},[F,R]);let O=e=>{let s,l,o;Q(!0),fetch("/api/quote-lead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:m.trim(),phone:h,code:e||void 0,note:(s=t.map(e=>{let t=b(e,a),s=Number(e.qty)>0?"".concat(e.qty," ").concat(e.unit):"Ù
ÙØ¯Ø§Ø± ÙØ§Ù
شخص",l=f(a,e.type,e.size);if("ok"===t.state){let a=e.factory||t.brandLabel||"ارزاÙâØªØ±ÛÙ Ø¨Ø±ÙØ¯",n=t.line?" â ".concat(d(t.line)):"";return"⢠".concat(e.type," ").concat(l," â ").concat(a," â ").concat(s).concat(n)}let n=e.type===g&&e.customName||e.raw||"".concat(e.type," ").concat(l).trim()||"ÙÙÙ
ÙØ§Ùص";return"⢠".concat(n," â ").concat(s," (Ø¨Ø±Ø±Ø³Û Ú©Ø§Ø±Ø´ÙØ§Ø³)")}),l=u&&u.money?"\nجÙ
ع ØªÙØ±ÛبÛ: ".concat(d(u.money)):"",o=u&&u.kg?"\nÙØ²Ù ØªÙØ±ÛØ¨Û Ø³ÙØ§Ø±Ø´: ".concat(c(u.kg)," Ú©ÛÙÙگرÙ
"):"","Ø¯Ø±Ø®ÙØ§Ø³Øª Ù¾ÛØ´âÙØ§Ú©ØªÙر از ÙÛØ³Øª (تØÙÛÙ ".concat("rule"===i?"Ø®ÙØ¯Ú©Ø§Ø±":"ÙÙØ´ Ù
صÙÙØ¹Û","Ø ØªØ£ÛÛØ¯Ø´Ø¯Ù ØªÙØ³Ø· Ù
شترÛ):\n").concat(s.join("\n")).concat(l).concat(o,"\n\nâ Ù
ت٠اصÙÛ Ù
Ø´ØªØ±Û â\n").concat((r||"").trim())),items:t.map(e=>{let t=b(e,a);return{type:e.type===g?e.customName||"Ú©Ø§ÙØ§Û Ø³ÙØ§Ø±Ø´Û":e.type||"",size:e.type===g?"":f(a,e.type,e.size)||e.size||"",factory:e.factory||("ok"===t.state?t.brandLabel:"")||"",quantity:Number(e.qty)||0,unit:e.unit||"",unitPrice:"ok"===t.state?t.price:null,amount:"ok"===t.state?t.line:null,needsExpert:"ok"!==t.state}}),total:u.money||null,weightKg:u.kg||null})}).then(e=>e.json()).then(e=>{e&&e.ok?(B(!0),n.toast.success("ثبت Ø´Ø¯Ø Ú©Ø§Ø±Ø´ÙØ§Ø³Ø§Ù ÙØ±ÙØ´ بÙâØ²ÙØ¯Û Ù¾ÛØ´âÙØ§Ú©ØªÙر رسÙ
Û Ø±Ø§ Ø¨Ø±Ø§ÛØªØ§Ù Ù
ÛâÙØ±Ø³ØªÙد."),window.dataLayer&&window.dataLayer.push({event:"quote_ai_lead"})):e&&"otp_wrong"===e.error?E(e.left>0?"کد Ø§Ø´ØªØ¨Ø§Ù Ø§Ø³ØªØ ".concat(c(e.left)," ØªÙØ§Ø´ دÛگر Ù
ÛâØªÙØ§ÙÛØ¯"):"کد Ø§Ø´ØªØ¨Ø§Ù Ø¨ÙØ¯ Ù Ø¨Ø§Ø·Ù Ø´Ø¯Ø Ú©Ø¯Ù Ø¬Ø¯ÛØ¯ Ø¨Ú¯ÛØ±Ûد"):e&&"otp_expired"===e.error?E("کد Ù
ÙÙØ¶Û Ø´Ø¯ÙØ رÙÛ \xabارسا٠Ù
جدد کد\xbb بزÙÛØ¯"):n.toast.error("ثبت ÙØ´Ø¯Ø ÙØ·ÙØ§Ù Ø¯ÙØ¨Ø§Ø±Ù ØªÙØ§Ø´ Ú©ÙÛØ¯.")}).catch(()=>n.toast.error("خطا در Ø«Ø¨ØªØ ÙØ·ÙØ§Ù Ø¯ÙØ¨Ø§Ø±Ù ØªÙØ§Ø´ Ú©ÙÛØ¯.")).finally(()=>Q(!1))},P=()=>{if(!y){if(m.trim().length<2)return void N("ÙØ§Ù
Ù ÙØ§Ù
خاÙÙØ§Ø¯Ú¯Û را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯");if(!/^09\d{9}$/.test(h))return void N("Ø´Ù
ارÙÙ Ù
ÙØ¨Ø§ÛÙ Ø¨Ø§ÛØ¯ Û±Û± رÙÙ
٠با Û°Û¹ Ø´Ø±ÙØ¹ Ø´ÙØ¯");N(""),Q(!0),fetch("/api/quote-otp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:h})}).then(e=>e.json()).then(e=>{if(e&&e.disabled)return void O();if(e&&e.ok){I("code"),z(""),E(""),A(e.resendAfter||90),Q(!1);return}if(e&&"cooldown"===e.error){I("code"),E(""),A(Number(e.wait)||30),Q(!1);return}Q(!1),e&&"daily"===e.error?N("سÙÙ٠ارساÙ٠کد Ø¨Ø±Ø§Û Ø§ÛÙ Ø´Ù
ار٠اÙ
Ø±ÙØ² پر Ø´Ø¯ÙØ ÙØ·ÙØ§Ù ÙØ±Ø¯Ø§ ØªÙØ§Ø´ Ú©ÙÛØ¯ ÛØ§ با Û°Û²Û±Û´Û²Û²Û±Û´ تÙ
اس بگÛ
1Ø±ÛØ¯"):e&&"rate"===e.error?N(e.message||"تعداد Ø¯Ø±Ø®ÙØ§Ø³ØªâÙØ§ Ø²ÛØ§Ø¯ Ø§Ø³ØªØ Ú©Ù
Û Ø¨Ø¹Ø¯ ØªÙØ§Ø´ Ú©ÙÛØ¯"):N("Ø§Ø±Ø³Ø§Ù Ù¾ÛØ§Ù
Ú© ÙØ§Ù
ÙÙÙ Ø¨ÙØ¯Ø ÙØ·ÙØ§Ù Ø¯ÙØ¨Ø§Ø±Ù ØªÙØ§Ø´ Ú©ÙÛØ¯")}).catch(()=>{Q(!1),N("خطا در Ø§Ø±Ø³Ø§Ù Ú©Ø¯Ø ÙØ·ÙØ§Ù Ø¯ÙØ¨Ø§Ø±Ù ØªÙØ§Ø´ Ú©ÙÛØ¯")})}},W=e=>{if(y)return;let t=null!=e?e:M;/^\d{5}$/.test(t)?(E(""),O(t)):E("کد Ûµ رÙÙ
ÛÙ Ù¾ÛØ§Ù
Ú©âØ´Ø¯Ù Ø±Ø§ ÙØ§Ø±Ø¯ Ú©ÙÛØ¯")},q=(0,l.useRef)(null);return(q.current=W,(0,l.useEffect)(()=>{if("code"!==F||!("OTPCredential"in window))return;let e=new AbortController;return navigator.credentials.get({otp:{transport:["sms"]},signal:e.signal}).then(e=>{let t=_(e&&e.code||"").slice(0,5);5===t.length&&(z(t),q.current&&q.current(t))}).catch(()=>{}),()=>e.abort()},[F]),S)?(0,s.jsx)("section",{className:"".concat(o().lead," ").concat(o().leadDone),children:(0,s.jsxs)("div",{className:o().leadDoneText,children:[(0,s.jsx)("span",{className:o().leadDoneBadge,children:(0,s.jsx)(C,{})}),(0,s.jsxs)("div",{className:o().leadDoneTitle,children:["ثبت Ø´Ø¯Ø ",m.trim()," Ø¹Ø²ÛØ²"]}),(0,s.jsxs)("p",{className:o().leadDesc,children:["ÙÛØ³ØªÙ Ø´Ù
ا Ø¨Ø±Ø§Û Ú©Ø§Ø±Ø´ÙØ§Ø³Ø§ÙÙ ÙØ±ÙØ´ ارسا٠شد. بÙâØ²ÙØ¯Û با Ø´Ù
ارÙÙ"," ",(0,s.jsx)("b",{dir:"ltr",children:h})," تÙ
اس Ù
ÛâÚ¯ÛØ±Ùد Ù Ù¾ÛØ´âÙØ§Ú©ØªÙر٠رسÙ
Û Ø±Ø§ Ø¨Ø±Ø§ÛØªØ§Ù Ù
ÛâÙØ±Ø³ØªÙد."]})]})}):"code"===F?(0,s.jsx)("section",{className:"".concat(o().lead," ").concat(o().leadDone),children:(0,s.jsxs)("div",{className:o().otpBox,children:[(0,s.jsxs)("div",{className:o().leadTitle,children:[(0,s.jsx)("span",{className:o().leadTitleIcon,children:(0,s.jsx)(T,{})}),"کد تأÛÛØ¯ را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯"]}),(0,s.jsxs)("p",{className:o().leadDesc,children:["کد Ûµ رÙÙ
Û Ø¨Ù Ø´Ù
ارÙÙ ",(0,s.jsx)("b",{dir:"ltr",children:h})," Ù¾ÛØ§Ù
Ú© شد."]}),(0,s.jsx)("input",{className:o().otpInput,type:"tel",inputMode:"numeric",autoComplete:"one-time-code",dir:"ltr",maxLength:5,placeholder:"â¢â¢â¢â¢â¢",value:M,onChange:e=>{let t=_(e.target.value).slice(0,5);z(t),5===t.length&&W(t)},"aria-label":"کد تأÛÛØ¯ Ù¾ÛØ§Ù
Ú©âØ´Ø¯Ù"}),D&&(0,s.jsx)("div",{className:o().err,children:D}),(0,s.jsx)("button",{type:"button",className:o().leadCta,onClick:()=>W(),disabled:y,children:y?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:o().leadSpin,"aria-hidden":"true"})," در ØØ§Ù بررسÛâ¦"]}):(0,s.jsx)(s.Fragment,{children:"تأÛÛØ¯ ٠ثبت Ø¯Ø±Ø®ÙØ§Ø³Øª"})}),(0,s.jsxs)("div",{className:o().otpMeta,children:[(0,s.jsx)("button",{type:"button",className:o().otpLink,onClick:P,disabled:R>0||y,children:R>0?"ارسا٠Ù
جدد کد (".concat(c(R),")"):"ارسا٠Ù
جدد کد"}),(0,s.jsx)("button",{type:"button",className:o().otpLink,onClick:()=>{I("form"),z(""),E("")},disabled:y,children:"ÙÛØ±Ø§ÛØ´ Ø´Ù
ارÙ"})]})]})}):(0,s.jsxs)("section",{className:o().lead,children:[(0,s.jsxs)("div",{className:o().leadText,children:[(0,s.jsxs)("div",{className:o().leadTitle,children:[(0,s.jsx)("span",{className:o().leadTitleIcon,children:(0,s.jsx)(v,{size:17})}),"ÙÙØ· ÛÚ© ÙØ¯Ù
تا ÙÛÙ
ت ÙÙØ§ÛÛ Ø³ÙØ§Ø±Ø´ Ø´Ù
ا"]}),(0,s.jsx)("p",{className:o().leadDesc,children:"Ú©Ø§Ø±Ø´ÙØ§Ø³Ù ÙØ±ÙØ´ ÙÛØ³ØªØªØ§Ù را Ø¨Ø±Ø±Ø³Û Ù
ÛâÚ©ÙØ¯ Ù Ù¾ÛØ´âÙØ§Ú©ØªÙر٠رسÙ
Û Ø±Ø§ Ø¨Ø±Ø§ÛØªØ§Ù Ù
ÛâÙØ±Ø³ØªØ¯."}),(0,s.jsxs)("ul",{className:o().leadTrust,children:[(0,s.jsxs)("li",{children:[(0,s.jsx)("span",{className:o().tiBolt,children:(0,s.jsx)(k,{})}),"پاسخâÚ¯ÙÛÛ Ø³Ø±ÛØ¹"]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("span",{className:o().tiChk,children:(0,s.jsx)(C,{})}),"ÙÛÙ
تâÚ¯Ø°Ø§Ø±Û Ø´ÙØ§Ù"]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("span",{className:o().tiLock,children:(0,s.jsx)(L,{})}),"Ù¾ÛØ´âÙØ§Ú©ØªÙر رسÙ
Û"]})]})]}),(0,s.jsxs)("div",{className:o().leadForm,children:[(0,s.jsxs)("div",{className:o().leadField,children:[(0,s.jsx)("span",{className:o().leadFieldIcon,children:(0,s.jsx)(w,{})}),(0,s.jsx)("input",{className:o().input,type:"text",placeholder:"ÙØ§Ù
Ù ÙØ§Ù
خاÙÙØ§Ø¯Ú¯Û",value:m,onChange:e=>p(e.target.value),"aria-label":"ÙØ§Ù
Ù ÙØ§Ù
خاÙÙØ§Ø¯Ú¯Û"})]}),(0,s.jsxs)("div",{className:o().leadField,children:[(0,s.jsx)("span",{className:o().leadFieldIcon,children:(0,s.jsx)(T,{})}),(0,s.jsx)("input",{className:o().input,type:"tel",inputMode:"tel",dir:"ltr",maxLength:11,placeholder:"Û°Û¹Û±Û²ÙÙÙÙÙÙÙÙ",value:h,onChange:e=>x(_(e.target.value)),"aria-label":"Ø´Ù
ارÙÙ Ù
ÙØ¨Ø§ÛÙ"})]}),j&&(0,s.jsx)("div",{className:o().err,children:j}),(0,s.jsx)("button",{type:"button",className:o().leadCta,onClick:P,disabled:y,children:y?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:o().leadSpin,"aria-hidden":"true"})," در ØØ§Ù ثبتâ¦"]}):(0,s.jsxs)(s.Fragment,{children:["Ø¯Ø±ÛØ§Ùت Ù¾ÛØ´âÙØ§Ú©ØªÙر",(0,s.jsx)("span",{className:o().leadCtaArrow,"aria-hidden":"true",children:"â"})]})}),(0,s.jsxs)("div",{className:o().leadReassure,children:[(0,s.jsx)("span",{className:o().tiBolt,children:(0,s.jsx)(k,{})}),"Ú©Ø§Ø±Ø´ÙØ§Ø³Ù ÙØ±ÙØ´ در Ø³Ø±ÛØ¹âترÛ٠زÙ
اÙÙ Ú©Ø§Ø±Û ØªÙ
اس Ù
ÛâÚ¯ÛØ±Ø¯"]})]})]})}function I(e){let t,a,{row:l,catalog:n,onChange:i,onRemove:r}=e,_=b(l,n),p=e=>{let t={...l,...e};if(void 0!==e.type){t.size="",t.factory="",t.type!==g&&(t.customName="");let e=N(n,t.type);t.unit=e.includes(t.unit)?t.unit:e[0]||""}else void 0!==e.size&&(t.factory="");i(t)},y=l.type?x(n,l.type):[],Q=l.type&&l.size?j(n,l.type,l.size):[],v=l.type?N(n,l.type):[];return(0,s.jsxs)("div",{className:o().rowCard,children:[(0,s.jsxs)("div",{className:o().rowTop,children:[(0,s.jsx)("span",{className:o().rowTitle,children:l.type===g?l.customName||"Ú©Ø§ÙØ§Û Ø¯ÙØ®ÙاÙ":l.type?"".concat(l.type," ").concat(m(f(n,l.type,l.size))||"â"):"ÙÙÙ
Ø¬Ø¯ÛØ¯"}),l.raw?(0,s.jsx)("span",{className:o().rowRaw,children:l.raw}):null,(0,s.jsx)("button",{type:"button",className:o().rowRemove,onClick:r,"aria-label":"ØØ°Ù ÙÙÙ
",children:"\xd7"})]}),(0,s.jsxs)("div",{className:o().rowGrid,children:[(0,s.jsxs)("label",{className:o().rf,children:[(0,s.jsx)("span",{className:o().rfLabel,children:"ÙÙØ¹"}
1),(0,s.jsxs)("select",{className:o().input,value:l.type,onChange:e=>p({type:e.target.value}),children:[(0,s.jsx)("option",{value:"",children:"Ø§ÙØªØ®Ø§Ø¨â¦"}),(t=[...new Set(n.map(e=>e.t))],[...h.filter(e=>t.includes(e)),...t.filter(e=>!h.includes(e)).sort((e,t)=>e.localeCompare(t,"fa"))]).map(e=>(0,s.jsx)("option",{value:e,children:e},e)),(0,s.jsx)("option",{value:g,children:"Ø³Ø§ÛØ± â Ú©Ø§ÙØ§Û Ø¯ÙØ®ÙاÙ"})]})]}),l.type===g?(0,s.jsxs)("label",{className:"".concat(o().rf," ").concat(o().rfWide),children:[(0,s.jsx)("span",{className:o().rfLabel,children:"Ø´Ø±Ø Ú©Ø§ÙØ§"}),(0,s.jsx)("input",{className:o().input,type:"text",placeholder:"ÙØ§Ù
Ú©Ø§ÙØ§ را بÙÙÛØ³Ûد â Ù
Ø«ÙØ§Ù: Ø´Ù
Ø´ Ø¢ÙÙÙ
ÛÙÛÙÙ
Û¹Û¹.Û·",value:l.customName||"",onChange:e=>p({customName:e.target.value})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{className:o().rf,children:[(0,s.jsx)("span",{className:o().rfLabel,children:"Ø³Ø§ÛØ²"}),(0,s.jsxs)("select",{className:o().input,value:l.size,onChange:e=>p({size:e.target.value}),disabled:!l.type,children:[(0,s.jsx)("option",{value:"",children:"Ø§ÙØªØ®Ø§Ø¨â¦"}),y.map(e=>(0,s.jsx)("option",{value:e.key,children:m(e.label)},e.key))]})]}),(0,s.jsxs)("label",{className:o().rf,children:[(0,s.jsx)("span",{className:o().rfLabel,children:"Ø¨Ø±ÙØ¯"}),(0,s.jsxs)("select",{className:o().input,value:l.factory,onChange:e=>p({factory:e.target.value}),disabled:!Q.length,children:[(0,s.jsx)("option",{value:"",children:"ارزاÙâØªØ±ÛÙ Ø¨Ø±ÙØ¯"}),Q.filter(e=>e.f).map((e,t)=>(0,s.jsxs)("option",{value:e.f,children:[e.f," â ",c(e.p)]},"".concat(e.f,"-").concat(t)))]})]})]}),(0,s.jsxs)("label",{className:o().rf,children:[(0,s.jsx)("span",{className:o().rfLabel,children:"Ù
ÙØ¯Ø§Ø±"}),(0,s.jsx)("input",{className:o().input,type:"number",min:"0",inputMode:"decimal",placeholder:"Ù
Ø«ÙØ§Ù Û±Û°",value:l.qty,onChange:e=>p({qty:e.target.value})})]}),(0,s.jsxs)("label",{className:o().rf,children:[(0,s.jsx)("span",{className:o().rfLabel,children:"ÙØ§ØØ¯"}),(0,s.jsx)("select",{className:o().input,value:l.unit,onChange:e=>p({unit:e.target.value}),disabled:!v.length,children:v.map(e=>(0,s.jsx)("option",{value:e,children:e},e))})]})]}),(0,s.jsxs)("label",{className:o().customToggle,children:[(0,s.jsx)("input",{type:"checkbox",checked:l.type===g,onChange:e=>{if(e.target.checked){let e=l.type&&l.type!==g?"".concat(l.type," ").concat(f(n,l.type,l.size)||"").trim():"",t=N(n,g);i({...l,prevSel:{type:l.type,size:l.size,factory:l.factory,unit:l.unit},type:g,size:"",factory:"",customName:l.customName||e||l.raw||"",unit:t.includes(l.unit)?l.unit:"Ú©ÛÙÙگرÙ
"})}else{let e=l.prevSel||{};i({...l,type:e.type||"",size:e.size||"",factory:e.factory||"",unit:e.unit||"",customName:"",prevSel:void 0})}}}),"Ù
ØØµÙÙ Ù
ÙØ±Ø¯ÙظرÙ
را Ù¾ÛØ¯Ø§ ÙکردÙ
"]}),(0,s.jsx)("div",{className:o().rowFoot,children:"incomplete"===_.state?(0,s.jsx)("span",{className:o().expertChip,children:"ÙÙØ¹ Ù Ø³Ø§ÛØ² را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯ تا ÙÛÙ
ت Ø¨Ø®ÙØ±Ø¯"}):"expert"===_.state?(0,s.jsx)("span",{className:o().expertChip,children:"ÙÛÙ
ت ÙØ§Ù
شخص â Ú©Ø§Ø±Ø´ÙØ§Ø³ Ù
شخص Ù
ÛâÚ©ÙØ¯"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:o().rowUnitPrice,children:[(a=_.price,"".concat(c(a)," تÙÙ
اÙ"))," / ",u(_.unit),_.brandLabel?" â ".concat(_.brandLabel):"",_.isCheapest?" (ارزاÙâØªØ±ÛÙ)":""]}),(0,s.jsx)("span",{className:o().rowTotal,children:_.line?"â ".concat(d(_.line)):"Ù
ÙØ¯Ø§Ø± را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯"})]})})]})}function M(e){let{rows:t,catalog:a}=e;return(0,s.jsx)("ol",{className:o().pfList,children:t.map((e,t)=>{let l=b(e,a),n=f(a,e.type,e.size),i=e.type===g?e.customName||e.raw||"Ú©Ø§ÙØ§Û Ø³ÙØ§Ø±Ø´Û":e.type&&"ÙØ§Ù
شخص"!==e.type?"".concat(e.type," ").concat(m(n)||"").trim():e.raw||e.type||"ÙÙÙ
",r=e.factory||("ok"===l.state?l.brandLabel:""),_=Number(e.qty)>0?"".concat(c(Number(e.qty))," ").concat(u(e.unit)):"";return(0,s.jsxs)("li",{className:o().pfItem,children:[(0,s.jsx)("span",{className:o().pfNum,children:m(t+1)}),(0,s.jsxs)("div",{className:o().pfMain,children:[(0,s.jsx)("span",{className:o().pfName,children:i}),(r||_)&&(0,s.jsxs)("span",{className:o().pfMeta,children:[r?(0,s.jsx)("span",{className:o().pfMetaBrand,children:r}):null,r&&_?" \xb7 ":"",_]})]}),(0,s.jsx)("div",{className:o().pfPrice,children:"ok"===l.state?null!=l.line?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:o().pfAmt,children:["â ",d(l.line)]}),l.price?(0,s.jsxs)("span",{className:o().pfUnitPrice,children:[c(l.price)," /",u(l.unit)]}):null]}):(0,s.jsxs)("span",{className:o().pfAmt,children:[c(l.price)," /",u(l.unit)]}):(0,s.jsx)("span",{className:o().pfExpert,children:"ÙÛÙ
ت ÙØ§Ù
شخص"})})]},e.id)})})}function z(e){let{file:t,text:a,onEdit:n,loading:i}=e,[r,c]=(0,l.useState)(!1),d=!!(a&&a.trim()),u=!!t||d,m=t&&S[t.kind]||{};return(0,s.jsxs)("div",{className:o().inputSummary,children:[(0,s.jsxs)("div",{className:o().isBar,children:[(0,s.jsx)("span",{className:o().isIcon,children:t?m.icon||"\uD83D\uDCCE":"\uD83D\uDCDD"}),(0,s.jsx)("span",{className:o().isTitle,children:t?t.name:"ÙÛØ³ØªÙ Ø´Ù
ا"}),u&&(0,s.jsx)("button",{type:"button",className:o().isToggle,onClick:()=>c(e=>!e),children:r?"بستÙ":"ÙÙ
Ø§ÛØ´"}),(0,s.jsx)("button",{type:"button",className:o().isEdit,onClick:n,disabled:i,children:"â ØªØºÛÛØ± ÙÛØ³Øª"})]}),r&&u&&(0,s.jsx)("div",{className:o().isBody,children:t?"image"===t.kind?(0,s.jsx)("img",{className:o().isImg,src:t.data,alt:"ÙØ±ÙØ¯Û Ø´Ù
ا"}):(0,s.jsxs)("div",{className:o().isFile,children:[(0,s.jsx)("span",{children:m.icon}),(0,s.jsxs)("span",{children:[m.label," â ",t.name]})]}):(0,s.jsx)("pre",{className:o().isText,children:a})})]})}let D=(0,i.ff)(()=>{let[e,t]=(0,l.useState)(""),[a,r]=(0,l.useState)(!1),[u,_]=(0,l.useState)(null),[h,f]=(0,l.useState)(""),[j,y]=(0,l.useState)(null),[w,T]=(0,l.useState)(!1),[C,k]=(0,l.useState)("text"),[L,D]=(0,l.useState)([]),[E,R]=(0,l.useState)(!1),[A,O]=(0,l.useState)(null),[P,W]=(0,l.useState)(!0),q=(0,l.useRef)(null),U=(0,l.useRef)(null);(0,l.useEffect)(()=>
1{if(u&&"error"!==u.engine){let e;D((e=u.catalog||[],(u.items||[]).filter(e=>"unrelated"!==e.status).map((t,a)=>{let s=t.parsed||{},l=t.type||s.product_type||"",n=("ÙØ§Ù
شخص"===l||!l)&&s.raw||"";n&&(l=g);let i=l===g?"":((e,t)=>{let a=e||"",s=String(null==t?"":t).replace(/[Û°-Û¹]/g,e=>"Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹".indexOf(e)).replace(/[Ù -Ù©]/g,e=>"٠١٢٣٤٥٦٧٨٩".indexOf(e));if(a.startsWith("ÙØ±Ù")){let e=s.match(/([\d.]+)/);return e?p(e[1]):""}if(/^(پرÙÙÛÙ|ÙÙÙÙ)/.test(a)){let e=s.match(/^\s*(\d+)?\s*[,Ø]?\s*(\d+)\s*\/\s*(\d+)\s*$/);if(e)return p((e[1]?Number(e[1]):0)+Number(e[2])/Number(e[3]));let t=s.match(/(\d+(?:\.\d+)?)\s*[*ÃxX]\s*(\d+(?:\.\d+)?)/);if(t)return[Number(t[1]),Number(t[2])].sort((e,t)=>e-t).join("x");let a=s.match(/[\d.]+/g)||[];return 1===a.length?p(a[0]):a.length>=2?a.map(e=>Number(p(e))).sort((e,t)=>e-t).join("x"):""}return s.replace(/[^\d.]/g,"")})(l,s.size),r=i&&x(e,l).some(e=>e.key===i)?i:"",o="matched"===t.status&&t.factoryMatched?t.cheapest.factory:"",c=l?N(e,l):[],d=s.unit;"عدد"===d&&c.includes("شاخÙ")&&(d="شاخÙ"),"عدد"===d&&c.includes("برگ")&&(d="برگ");let u=c.includes(d)?d:c[0]||"";return{id:a+1,raw:s.raw||"",type:l,size:r,factory:o,customName:n,qty:s.quantity>0?String(s.quantity):"",unit:u}}))),R(!1)}else D([]),R(!1),u&&"error"===u.engine&&W(!0)},[u]),(0,l.useEffect)(()=>{let e=q.current;e&&(e.style.height="auto",e.style.height=Math.min(e.scrollHeight,320)+"px")},[e]),(0,l.useEffect)(()=>{a&&window.scrollTo({top:0,behavior:"smooth"})},[a]);let Z=u&&u.catalog||[],H=!!(u&&!1===u.pricesToday),G=(u&&u.items||[]).filter(e=>"unrelated"===e.status),J=(0,l.useMemo)(()=>{let e=0,t=!1,a=0,s=!1,l=0;for(let n of L){let i=b(n,Z);"ok"===i.state&&null!=i.line&&(e+=i.line,t=!0),"ok"!==i.state&&(l+=1);let r=Q(n);null!=r&&(a+=r,s=!0)}return{money:t?e:null,kg:s?Math.round(a):null,expert:l}},[L,Z]),K=async e=>{let t,a;if(!e)return;let s=(t=(e.name||"").toLowerCase(),(a=e.type||"").startsWith("image/")?"image":"application/pdf"===a||t.endsWith(".pdf")?"pdf":t.endsWith(".xlsx")||t.endsWith(".xls")||a.includes("spreadsheet")||a.includes("ms-excel")?"excel":t.endsWith(".docx")||a.includes("wordprocessingml")?"word":null);if(!s)return void n.toast.error("ÙÙØ· Ø¹Ú©Ø³Ø PDFØ Ø§Ú©Ø³Ù ÛØ§ ÙØ±Ø¯ Ù¾Ø´ØªÛØ¨Ø§ÙÛ Ù
ÛâØ´ÙØ¯");if(e.size>0xa00000)return void n.toast.error("ØØ¬Ù
ÙØ§ÛÙ ÙØ¨Ø§Ûد Ø¨ÛØ´ØªØ± از ".concat(10," Ù
Ú¯Ø§Ø¨Ø§ÛØª Ø¨Ø§Ø´Ø¯Ø ÙØ§ÛÙ Ú©ÙÚÚ©âØªØ±Û Ø¨ÙØ±Ø³ØªÛد"));try{let t="image"===s?await function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.85;return new Promise((s,l)=>{let n=new Image,i=URL.createObjectURL(e);n.onload=()=>{URL.revokeObjectURL(i);let e=Math.min(1,t/Math.max(n.width,n.height)),l=Math.round(n.width*e),r=Math.round(n.height*e),o=document.createElement("canvas");o.width=l,o.height=r,o.getContext("2d").drawImage(n,0,0,l,r),s(o.toDataURL("image/jpeg",a))},n.onerror=()=>{URL.revokeObjectURL(i),l(Error("image load failed"))},n.src=i})}(e):await new Promise((t,a)=>{let s=new FileReader;s.onload=()=>t(s.result),s.onerror=()=>a(Error("read failed")),s.readAsDataURL(e)});y({data:t,name:e.name||"ÙØ§ÛÙ",kind:s})}catch(e){n.toast.error("ÙØ§ÛÙ Ø®ÙØ§ÙØ¯Ù ÙØ´Ø¯Ø Ø¯ÙØ¨Ø§Ø±Ù ØªÙØ§Ø´ Ú©ÙÛØ¯")}},V=async()=>{if(a)return;let t=!!j,s=e.trim();if(!t&&!s)return void n.toast.error("ÙÛØ³Øª را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯ ÛØ§ ÙØ§ÛÙ Ø¨ÙØ±Ø³ØªÛد");k(t?"image"===j.kind?"image":"file":"text"),r(!0),_(null),W(!1);try{let e=await fetch("/api/parse-quote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t?{file:j.data,filename:j.name,kind:j.kind}:{text:s})}),a=await e.json();_(a),f(t?"(از ÙØ§ÛÙ: ".concat(j.name,")"):s),O(t?j:null),window.dataLayer&&window.dataLayer.push({event:"quote_ai_parse",engine:a.engine,source:t?j.kind:"text",items:(a.items||[]).length})}catch(e){n.toast.error("خطا در Ø®ÙØ§ÙØ¯ÙØ ÚÙØ¯ ÙØØ¸Ù Ø¨Ø¹Ø¯ Ø¯ÙØ¨Ø§Ø±Ù ØªÙØ§Ø´ Ú©ÙÛØ¯"),W(!0)}finally{r(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.G$,{title:"Ù¾ÛØ´ ÙØ§Ú©ØªÙر Ø¢ÙÙØ§Û٠آÙ٠با ÙÙØ´ Ù
صÙÙØ¹Û",description:"Ø¯Ø±Ø®ÙØ§Ø³Øª Ø³ÙØ§Ø±Ø´ Ø¢ÙÙ Ø®ÙØ¯ØªÙ٠آپÙÙØ¯ Ú©ÙÛØ¯ ٠با ÙÙØ´ Ù
صÙÙØ¹Û Ù
ا Ù¾ÛØ´ ÙØ§Ú©ØªÙر Ø®ÙØ¯ØªÙ٠در Ø³Ø±ÛØ¹ ترÛ٠زÙ
Ø§Ù Ø¯Ø±ÛØ§Ùت Ú©ÙÛØ¯",canonical:"https://www.fooladiranian.com/tools/Ù¾ÛØ´-ÙØ§Ú©ØªÙر-Ø¢ÙÙØ§ÛÙ-Ø¢ÙÙ/"}),(0,s.jsxs)("main",{className:o().page,children:[(0,s.jsxs)("div",{className:o().hero,children:[(0,s.jsxs)("h1",{className:o().aiBadge,children:[(0,s.jsx)(v,{size:18})," Ø§Ø³ØªØ¹ÙØ§Ù
Ø¢ÙÙØ§Û٠آÙÙâØ¢ÙØ§Øª با ÙÙØ´ Ù
صÙÙØ¹Û"]}),(0,s.jsx)("h2",{className:o().h1,children:"ÙØ¨Ù از Ø®Ø±ÛØ¯ Ø¢ÙÙØ ÙÛÙ
تش ر٠بدÙÙ!"}),(0,s.jsx)("p",{className:o().intro,children:"ÙÛØ³Øª Ø®Ø±ÛØ¯ Ø¢ÙÙâØ¢ÙØ§ØªØª ر٠ÙÙ
ÛÙâØ¬Ø§ Ø¨ÙØ±Ø³ØªØ Ù
ا اÙÙØ§Ù
Ù
ÙØ±Ø¯ÙÛØ§Ø²Øª Ø±Ù Ø¨Ø±Ø±Ø³Û Ù
ÛâÚ©ÙÛÙ
٠بر اساس ÙÛÙ
ت Ø±ÙØ²Ø Ø¨Ø±Ø¢ÙØ±Ø¯ Ø®Ø±ÛØ¯Øª ر٠آÙ
اد٠Ù
ÛâÚ©ÙÛÙ
."})]}),(0,s.jsx)("div",{ref:U,children:P?(0,s.jsxs)("div",{className:o().card,children:[(0,s.jsxs)("div",{className:o().fieldTop,children:[(0,s.jsx)("label",{className:o().label,htmlFor:"quoteText",children:"ÙÛØ³Øª Ø®Ø±ÛØ¯ Ø´Ù
ا"}),(0,s.jsx)("button",{type:"button",className:o().sampleLink,onClick:()=>t("Û²Û°Û° شاخ٠Ù
ÛÙگرد Û±Û¶ Ø°ÙØ¨ Ø¢ÙÙ\nÙ
ÛÙگرد Û±Û´ ÙÛØ´Ø§Ø¨Ùر Ûµ تÙ\nØªÛØ±Ø¢ÙÙ Û±Û¸ â Û³Û° شاخÙ\nÙØ±Ù Ø³ÛØ§Ù Û¶ Ù
ÛÙ Û² تÙ"),children:"ÛÚ© ÙÙ
ÙÙ٠ببÛÙÙ
"})]}),(0,s.jsx)("textarea",{id:"quoteText",className:o().textarea,dir:"rtl",rows:3,ref:q,maxLength:4e3,placeholder:"Ù
Ø«ÙØ§Ù:\nÛ²Û°Û° شاخ٠Ù
ÛÙگرد Û±Û¶ Ø°ÙØ¨ Ø¢ÙÙ\nØªÛØ±Ø¢ÙÙ Û±Û¸ â Û³Û° شاخÙ",value:e,onCh
1ange:e=>t(e.target.value),onPaste:e=>{for(let t of e.clipboardData&&e.clipboardData.items||[])if(t.type&&t.type.startsWith("image/")){let a=t.getAsFile();if(a){K(a),e.preventDefault();return}}}}),e.length>0&&(0,s.jsxs)("div",{className:o().charCount,"data-warn":e.length>3600?"1":void 0,children:[m(e.length),"/",m(4e3)]}),(0,s.jsx)("div",{className:"".concat(o().upload," ").concat(w?o().uploadOver:""," ").concat(j?o().uploadSelected:""),onDragOver:e=>{e.preventDefault(),T(!0)},onDragLeave:()=>T(!1),onDrop:e=>{e.preventDefault(),T(!1);let t=e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files[0];t&&K(t)},children:j?(0,s.jsxs)("div",{className:o().thumb,children:["image"===j.kind?(0,s.jsx)("img",{className:o().thumbImg,src:j.data,alt:"ÙØ§ÛÙ Ø§ÙØªØ®Ø§Ø¨âشدÙ"}):(0,s.jsx)("span",{className:o().thumbIcon,children:(S[j.kind]||{}).icon}),(0,s.jsxs)("div",{className:o().thumbMeta,children:[(0,s.jsx)("span",{className:o().thumbName,children:j.name}),(0,s.jsxs)("span",{className:o().thumbHint,children:["â ",(S[j.kind]||{}).label," Ø§ÙØªØ®Ø§Ø¨ Ø´Ø¯Ø ØØ§Ùا دکÙ
Ù٠پاÛÛ٠را بزÙÛØ¯ â¦"]})]}),(0,s.jsx)("button",{type:"button",className:o().thumbRemove,onClick:()=>y(null),"aria-label":"ØØ°Ù ÙØ§ÛÙ",children:"\xd7"})]}):(0,s.jsxs)("label",{className:o().uploadLabel,children:[(0,s.jsx)("span",{className:o().uploadIcon,children:"\uD83D\uDCCE"}),(0,s.jsxs)("span",{className:o().uploadText,children:[(0,s.jsx)("span",{className:o().uploadTitle,children:"ÙÛØ³ØªØª ر٠اÛÙØ¬Ø§ بÙÙÛØ³ ÛØ§ ÙØ§ÛÙØ´ ر٠آپÙÙØ¯ Ú©Ù:"}),(0,s.jsxs)("span",{className:o().uploadFormats,children:[(0,s.jsx)("span",{className:o().fmtChip,children:"عکس"}),(0,s.jsx)("span",{className:o().fmtChip,children:"PDF"}),(0,s.jsx)("span",{className:o().fmtChip,children:"Word"}),(0,s.jsx)("span",{className:o().fmtChip,children:"Excel"})]})]}),(0,s.jsx)("input",{type:"file",accept:"image/*,application/pdf,.pdf,.xlsx,.xls,.docx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel",className:o().uploadInput,onChange:e=>K(e.target.files&&e.target.files[0])})]})}),(0,s.jsxs)("div",{className:o().analyzeWrap,children:[(0,s.jsxs)("button",{type:"button",className:o().analyzeBtn,onClick:V,disabled:a,children:[a?(0,s.jsx)("span",{className:o().spin,"aria-hidden":"true"}):null,a?"در ØØ§Ù Ø®ÙØ§ÙدÙâ¦":"ÙÛÙ
تâÚ¯Ø°Ø§Ø±Û ÙÛØ³Øª Ù
Ù â¨"]}),(0,s.jsx)("span",{className:o().privacy,children:"Ø§Ø·ÙØ§Ø¹Ø§Øª Ù ÙØ§ÛÙâÙØ§Û ارساÙÛ ÙÙ
ÙÙØ· Ø¨Ø±Ø§Û ÙÙ
ÛÙ Ù
ØØ§Ø³Ø¨Ù Ø§Ø³ØªÙØ§Ø¯Ù Ø®ÙØ§ÙÙØ¯ شد."})]})]}):(0,s.jsx)(z,{file:j,text:e,loading:a,onEdit:()=>W(!0)})}),a&&(0,s.jsx)(B,{mode:C}),u&&!a&&(0,s.jsxs)("div",{className:o().result,children:["error"!==u.engine&&(0,s.jsxs)("div",{className:o().engineRow,children:["ai"===u.engine?(0,s.jsxs)("span",{className:o().aiTag,children:[(0,s.jsx)(v,{size:14})," با ÙÙØ´ Ù
صÙÙØ¹Û ÙÙÙØ§Ø¯ Ø§ÛØ±Ø§ÙÛØ§Ù Ø¨Ø±Ø±Ø³Û Ø´Ø¯"]}):"ai-vision"===u.engine?(0,s.jsxs)("span",{className:o().aiTag,children:[(0,s.jsx)(v,{size:14})," از رÙÛ ÙØ§ÛÙ Ø´Ù
Ø§Ø Ø¨Ø§ ÙÙØ´ Ù
صÙÙØ¹Û"]}):(0,s.jsx)("span",{className:o().ruleTag,children:"Ø®ÙØ§ÙØ¯Ù Ø®ÙØ¯Ú©Ø§Ø±"}),L.length>0&&(0,s.jsxs)("span",{className:o().itemsCount,children:[c(L.length)," ÙÙÙ
"]})]}),H&&(0,s.jsx)("p",{className:o().hint,style:{color:"#b45309",fontWeight:600},children:"â ï¸ ÙÛÙ
ت اÙ
Ø±ÙØ² ÙÙÙØ² ÙÙØ§ÛÛ ÙØ´Ø¯Ù ٠بر اساس آخرÛÙ ÙÛÙ
ØªÙ Ø§Ø¹ÙØ§Ù
âØ´Ø¯Ù Ø§Ø³Øª."}),G.length>0&&(0,s.jsxs)("p",{className:o().hint,style:{color:"#8a3d00",fontWeight:600},children:["اÛÙ ÙÙÙ
âÙØ§ ب٠آÙÙâØ¢ÙØ§Øª Ù
Ø±Ø¨ÙØ· ÙÛØ³ØªÙد ٠در Ù
ØØ§Ø³Ø¨Ù ÙÛØ§Ù
Ø¯ÙØ¯:"," ",G.map(e=>e.parsed&&(e.parsed.raw||e.parsed.product_type)||"").filter(Boolean).join("Ø ")]}),u.message&&(0,s.jsx)("p",{className:o().hint,children:u.message}),L.length>0&&(E?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:o().items,children:L.map(e=>(0,s.jsx)(I,{row:e,catalog:Z,onChange:t=>D(a=>a.map(a=>a.id===e.id?t:a)),onRemove:()=>D(t=>t.filter(t=>t.id!==e.id))},e.id))}),(0,s.jsxs)("div",{className:o().editActions,children:[(0,s.jsx)("button",{type:"button",className:o().addBtn,onClick:()=>D(e=>[...e,{id:Date.now(),raw:"",type:"",size:"",factory:"",customName:"",qty:"",unit:""}]),children:"+ Ø§ÙØ²Ùد٠ÙÙÙ
"}),(0,s.jsx)("button",{type:"button",className:o().doneAllBtn,onClick:()=>R(!1),children:"â ØªØ£ÛÛØ¯ Ù Ù
Ø´Ø§ÙØ¯ÙÙ Ù¾ÛØ´âÙØ§Ú©ØªÙر"})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:o().pfHead,children:[(0,s.jsx)("span",{className:o().pfHeadTitle,children:"Ù¾ÛØ´âÙØ§Ú©ØªÙر Ø´Ù
ا"}),(0,s.jsx)("button",{type:"button",className:o().editAllBtn,onClick:()=>R(!0),children:"â ÙÛØ±Ø§ÛØ´ ÙÛØ³Øª"})]}),(0,s.jsx)(M,{rows:L,catalog:Z})]})),J.money&&(0,s.jsxs)("div",{className:o().summary,children:[(0,s.jsxs)("div",{className:o().summaryTotal,children:[(0,s.jsx)("span",{className:o().summaryLabel,children:"جÙ
ع Ú©Ù ØªÙØ±ÛبÛ"}),(0,s.jsxs)("span",{className:o().summaryAmount,children:["â ",d(J.money)]})]}),J.kg?(0,s.jsxs)("div",{className:o().summaryRow,children:[(0,s.jsx)("span",{children:"ÙØ²Ù Ø³ÙØ§Ø±Ø´"}),(0,s.jsxs)("span",{children:[c(J.kg)," Ú©ÛÙÙگرÙ
(â ",c(J.kg/1e3,1)," تÙ)"]})]}):null,(0,s.jsxs)("div",{className:o().summaryNote,children:[H?"با آخرÛÙ Ù
1ÛÙ
ت Ø§Ø¹ÙØ§Ù
âØ´Ø¯Ù":"با ÙØ±Ø® اÙ
Ø±ÙØ²"," \xb7 شاÙ
Ù Û±Û°Ùª ارزش Ø§ÙØ²Ùد٠\xb7 Ù
Ø¨ÙØº Ø³ÙØ§Ø±Ø´ ØªÙØ±ÛØ¨Û Ø§Ø³ØªØ Ø¨Ø±Ø§Û Ø¯Ø±ÛØ§Ùت ÙÛÙ
ت دÙÛÙØ Ø¯Ø±Ø®ÙØ§Ø³Øª Ø®ÙØ¯ را ÙÙØ§ÛÛ Ú©ÙÛØ¯"]})]}),J.expert>0&&L.length>0&&(0,s.jsxs)("p",{className:o().hint,children:[c(J.expert)," ÙÙÙ
\xabÙÛÙ
ت ÙØ§Ù
شخص\xbb دارد (در ÙÛØ³ØªÙ Ø¢ÙÙØ§ÛÙ Ù¾ÛØ¯Ø§ ÙØ´Ø¯)Ø Ú©Ø§Ø±Ø´ÙØ§Ø³ ÙØ±ÙØ´ ÙÛÙ
تش را در Ù¾ÛØ´âÙØ§Ú©ØªÙر رسÙ
Û Ù
شخص Ù
ÛâÚ©ÙØ¯."]}),L.length>0&&(0,s.jsx)(F,{rows:L,catalog:Z,engine:u.engine,rawText:h,totals:J})]}),(0,s.jsx)("p",{className:o().disclaimer,children:"اÛÙ Ø¨Ø±Ø¢ÙØ±Ø¯Ø Ù¾ÛØ´âÙØ§Ú©ØªÙر رسÙ
Û ÙÛØ³Øª. ÙÛÙ
ت ÙÙØ§ÛÛ Ø¨Ø§ ØªÙØ¬Ù ب٠Ù
ÙØ¬ÙØ¯ÛØ Ø¨Ø±ÙØ¯Ø Ù
ØÙ Ø¨Ø§Ø±Ú¯ÛØ±Û ٠کراÛÙÙ ØÙ
ÙØ ØªÙØ³Ø· Ú©Ø§Ø±Ø´ÙØ§Ø³ ÙØ±ÙØ´ ÙÙÙØ§Ø¯ Ø§ÛØ±Ø§ÙÛØ§Ù تأÛÛØ¯ Ù
ÛâØ´ÙØ¯."})]})]})})},58635:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/tools/quote",function(){return a(44470)}])},60319:e=>{e.exports={page:"Quote_page__xNEgT",hero:"Quote_hero__ApfN_",aiBadge:"Quote_aiBadge__9tPS4",h1:"Quote_h1__7J508",intro:"Quote_intro__mxxso",card:"Quote_card__aegTZ",cardCollapsed:"Quote_cardCollapsed__gNejO",collapsedIcon:"Quote_collapsedIcon__42sKV",collapsedText:"Quote_collapsedText__NhuT1",reopenBtn:"Quote_reopenBtn__Qp7_W",fieldTop:"Quote_fieldTop__laie3",label:"Quote_label___YCls",sampleLink:"Quote_sampleLink__E4vTW",textarea:"Quote_textarea__sPbQO",charCount:"Quote_charCount__GJzr0",analyzeWrap:"Quote_analyzeWrap__jb_Z2",analyzeBtn:"Quote_analyzeBtn__ww3IF",spin:"Quote_spin__mr7v6",privacy:"Quote_privacy__6lxRW",upload:"Quote_upload__rCJoI",uploadOver:"Quote_uploadOver__4xuZR",uploadSelected:"Quote_uploadSelected__kDMuK",thumbIcon:"Quote_thumbIcon__6ssTG",uploadLabel:"Quote_uploadLabel__cNOZL",uploadIcon:"Quote_uploadIcon__sNAqd",uploadText:"Quote_uploadText__6F6_4",uploadTitle:"Quote_uploadTitle__PMzIo",uploadFormats:"Quote_uploadFormats__Eaobi",fmtChip:"Quote_fmtChip__nY7ZG",inputSummary:"Quote_inputSummary__on4nW",isBar:"Quote_isBar__qFBfO",isIcon:"Quote_isIcon__x7iUa",isTitle:"Quote_isTitle__NLeEk",isToggle:"Quote_isToggle__tz6fO",isEdit:"Quote_isEdit__R2_sg",isBody:"Quote_isBody__BDc95",isText:"Quote_isText__OHRIH",isImg:"Quote_isImg__7HWo8",isFile:"Quote_isFile__hDEiq",uploadInput:"Quote_uploadInput__AmOdz",thumb:"Quote_thumb__c6nN3",thumbImg:"Quote_thumbImg__CY1Hw",thumbMeta:"Quote_thumbMeta__gedZ6",thumbName:"Quote_thumbName__E_UK0",thumbHint:"Quote_thumbHint__QcZFN",thumbRemove:"Quote_thumbRemove__bgcJt",thinking:"Quote_thinking__oxWYa",thinkingHead:"Quote_thinkingHead__I_zHE",thinkingSparkle:"Quote_thinkingSparkle__vEx8F",pulse:"Quote_pulse__PN6lX",shimmerLines:"Quote_shimmerLines__RgjG3",shimmer:"Quote_shimmer__ih58_",result:"Quote_result__8Wj54",engineRow:"Quote_engineRow__RDzU7",aiTag:"Quote_aiTag__Uo7Iv",ruleTag:"Quote_ruleTag__4hrlZ",itemsCount:"Quote_itemsCount__Xt5h5",sourceBox:"Quote_sourceBox__mLs83",sourceSummary:"Quote_sourceSummary__399UV",sourceIcon:"Quote_sourceIcon__r6UUQ",sourceSummaryText:"Quote_sourceSummaryText__y4Wax",sourceToggle:"Quote_sourceToggle__UcM1i",sourceBody:"Quote_sourceBody__kZXXe",sourceImg:"Quote_sourceImg__AoKCJ",sourceFile:"Quote_sourceFile__ZQpW3",sourceFileIcon:"Quote_sourceFileIcon__2fC1B",sourceText:"Quote_sourceText__5x1BG",items:"Quote_items__sLOV_",item:"Quote_item__rScgT",itemExpert:"Quote_itemExpert__U_1Wv",itemMain:"Quote_itemMain__g_sGc",itemName:"Quote_itemName__2Z4wp",itemFactory:"Quote_itemFactory__PlON_",itemQty:"Quote_itemQty__eSsKW",itemRaw:"Quote_itemRaw__Dg2L3",expertChip:"Quote_expertChip__IpQ6K",itemPrice:"Quote_itemPrice__LF3XP",itemUnit:"Quote_itemUnit__ATZqV",itemTotal:"Quote_itemTotal__EGziU",rowCard:"Quote_rowCard__jQBa6",rowTop:"Quote_rowTop__Bgeuu",rowTitle:"Quote_rowTitle__uXqZg",rowRaw:"Quote_rowRaw__vLIOn",rowEditBtn:"Quote_rowEditBtn__4P3LL",rowDoneBtn:"Quote_rowDoneBtn__wM8TC",customToggle:"Quote_customToggle__5uwEn",rowRemove:"Quote_rowRemove__JVn6q",rowGrid:"Quote_rowGrid__DLQ_4",rf:"Quote_rf__KdSQR",rfWide:"Quote_rfWi
1de__bYmEh",rfLabel:"Quote_rfLabel__WBkSD",input:"Quote_input__sUg81",rowFoot:"Quote_rowFoot__qNah5",rowUnitPrice:"Quote_rowUnitPrice__rO1GZ",rowTotal:"Quote_rowTotal__287mK",addBtn:"Quote_addBtn__jCy8o",grandWeight:"Quote_grandWeight__CA6ml",pfHead:"Quote_pfHead__TwnMr",pfHeadTitle:"Quote_pfHeadTitle__GDtWI",editAllBtn:"Quote_editAllBtn__aims0",editActions:"Quote_editActions__MRnAt",doneAllBtn:"Quote_doneAllBtn__bD9ke",pfList:"Quote_pfList__ZAev7",pfItem:"Quote_pfItem__AJsi0",pfNum:"Quote_pfNum__1PC3g",pfMain:"Quote_pfMain__PCNCC",pfName:"Quote_pfName___iMJY",pfMeta:"Quote_pfMeta__30hqj",pfMetaBrand:"Quote_pfMetaBrand__i9BqP",pfPrice:"Quote_pfPrice__VBjBm",pfAmt:"Quote_pfAmt__YoKIg",pfUnitPrice:"Quote_pfUnitPrice__y_M0s",pfExpert:"Quote_pfExpert__SKNQy",hideSm:"Quote_hideSm__b1ET5",summary:"Quote_summary__H8LpF",summaryTotal:"Quote_summaryTotal__8J3Os",summaryLabel:"Quote_summaryLabel__ZMrt_",summaryAmount:"Quote_summaryAmount__1aJTp",summaryRow:"Quote_summaryRow__kwyby",summaryNote:"Quote_summaryNote__tU0UW",grand:"Quote_grand__v_BUF",grandNote:"Quote_grandNote__8eov8",hint:"Quote_hint__8EBmC",lead:"Quote_lead__a__4a",leadText:"Quote_leadText__QHbfy",leadTitle:"Quote_leadTitle__MTizb",leadTitleIcon:"Quote_leadTitleIcon__ooNOZ",leadDesc:"Quote_leadDesc__GOE6I",leadTrust:"Quote_leadTrust__goHqy",tiChk:"Quote_tiChk__EFzxI",tiBolt:"Quote_tiBolt___glXX",tiLock:"Quote_tiLock__DuKmT",leadReassure:"Quote_leadReassure__bTeuO",leadForm:"Quote_leadForm__vZ4_Z",leadField:"Quote_leadField__tLfnW",leadFieldIcon:"Quote_leadFieldIcon__86tUI",leadCta:"Quote_leadCta__oPyn0",leadCtaArrow:"Quote_leadCtaArrow__mPnud",leadSpin:"Quote_leadSpin__JANjs",leadDone:"Quote_leadDone__Jg7rz",leadDoneText:"Quote_leadDoneText__LEwvS",leadDoneBadge:"Quote_leadDoneBadge__GM1x2",leadDoneTitle:"Quote_leadDoneTitle__qA5Y0",otpBox:"Quote_otpBox__voVhN",otpInput:"Quote_otpInput__oSIf2",otpMeta:"Quote_otpMeta__CFeCA",otpLink:"Quote_otpLink__ySxwd",err:"Quote_err__QrMFT",disclaimer:"Quote_disclaimer__qOo7Q",pf:"Quote_pf__LM_v9"}}},e=>{e.O(0,[4987,847,1891,2538,6420,9725,9288,556,636,6593,8792],()=>e(e.s=58635)),_N_E=e.O()}]);
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.