Files

1 line
14 KiB
JavaScript

import{Hn as e,In as t,Mn as n,Un as r,Xn as i,_n as a,fr as o,gn as s,hn as c,hr as l,i as u,lt as d,mn as f,mr as p,n as m,pn as h,qn as g,r as _,rr as v,sn as y,t as b,ur as x,vn as S,xn as C,yn as w,zn as T}from"./D6Ym2dQP.js";import{pt as E}from"#entry";import{i as D,n as O,t as k,u as A}from"./Dd1GE-gU.js";import{n as j,r as M,t as N}from"./BHOIQrRl.js";var P=d(`ui`,{state:()=>({ready:!1,menuOpen:!1}),actions:{setReady(){this.ready=!0},openMenu(){this.menuOpen=!0},closeMenu(){this.menuOpen=!1}}});function F(e){let r=v(!1),i=()=>r.value=window.scrollY>e;return t(()=>{i(),window.addEventListener(`scroll`,i,{passive:!0})}),n(()=>window.removeEventListener(`scroll`,i)),r}var I=Object.assign(C({__name:`BackToTop`,setup(e){let t=F(700);return(e,n)=>(T(),c(x(M),null,{default:i(()=>[x(t)?(T(),c(x(D).a,{key:0,href:`#home`,"aria-label":`بازگشت به بالا`,initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24},class:`fixed bottom-6 left-6 z-[70] flex size-12 items-center justify-center rounded-full border border-line bg-panel/90 text-ink shadow-[0_10px_40px_rgba(0,0,0,0.5)] backdrop-blur transition-colors hover:border-accent hover:text-accent`},{default:i(()=>[w(b,{name:`arrow-up`,class:`size-5`})]),_:1})):s(``,!0)]),_:1}))}}),{__name:`LayoutBackToTop`}),ee={class:`pointer-events-none fixed inset-0 z-[120] hidden [@media(pointer:fine)]:block`},te=Object.assign(C({__name:`Cursor`,setup(e){let r=A(-100),s=A(-100),c=j(r,{stiffness:550,damping:45,mass:.4}),l=j(s,{stiffness:550,damping:45,mass:.4}),u=v(!1),d=v(!1),m=e=>{r.set(e.clientX),s.set(e.clientY),d.value=!0},h=e=>{let t=e.target;u.value=!!t?.closest?.(`a, button, input, textarea, select, label, [data-hover]`)};return t(()=>{window.addEventListener(`mousemove`,m,{passive:!0}),window.addEventListener(`mouseover`,h,{passive:!0})}),n(()=>{window.removeEventListener(`mousemove`,m),window.removeEventListener(`mouseover`,h)}),(e,t)=>(T(),a(`div`,ee,[w(x(D).div,{style:p({x:x(c),y:x(l)}),class:`absolute -left-4 -top-4 size-8`},{default:i(()=>[w(x(D).div,{animate:{scale:x(u)?1.9:1,opacity:+!!x(d),rotate:x(u)?45:0},transition:{type:`spring`,stiffness:320,damping:24},class:`size-8 rounded-md border-2 border-accent/80`},null,8,[`animate`]),f(`div`,{class:o(`absolute inset-0 m-auto size-1 rounded-full bg-accent transition-opacity duration-300 ${x(d)?`opacity-100`:`opacity-0`}`)},null,2)]),_:1},8,[`style`])]))}}),{__name:`LayoutCursor`}),L=E(`/images/logo.png`),R={};function z(e,t){let n=u;return T(),c(n,{to:`/`,class:`flex items-center gap-3`,"aria-label":`ایمن پیشگامان`},{default:i(()=>[...t[0]||=[f(`span`,{class:`flex size-10 items-center justify-center rounded-xl bg-white shadow-[0_0_28px_rgba(10,30,92,0.45)]`},[f(`img`,{src:L,alt:`ایمن پیشگامان`,width:`28`,height:`28`,class:`size-7 object-contain`})],-1),f(`span`,{class:`leading-tight`},[f(`span`,{class:`block text-lg font-black`},`ایمن پیشگامان`),f(`span`,{class:`block font-mono text-[9px] tracking-[0.32em] text-muted`},` IMEN PISHGAMAN CO. `)],-1)]]),_:1})}var B=Object.assign(m(R,[[`render`,z]]),{__name:`UiLogo`}),V={class:`relative overflow-hidden border-t border-line`},H={class:`mx-auto max-w-[1480px] px-5 md:px-8`},U={class:`grid gap-12 py-16 md:grid-cols-12 md:py-20`},W={class:`md:col-span-5`},G={class:`mt-6 max-w-sm text-sm leading-8 text-muted`},K={class:`mt-7 flex gap-3`},q=[`href`,`aria-label`,`target`,`rel`],J={class:`md:col-span-2`},Y={class:`mt-5 space-y-3`},X=[`href`],Z={class:`md:col-span-2`},Q={class:`mt-5 space-y-3`},ne={class:`md:col-span-3`},re={class:`mt-5 space-y-3 text-sm text-muted not-italic`},ie={class:`leading-7`},ae={class:`font-mono tracking-wider`,dir:`ltr`},oe=[`href`],se={class:`font-mono tracking-wider`,dir:`ltr`},ce=[`href`],le={class:`pt-2 text-xs leading-6`},ue={"aria-hidden":`true`,class:`pointer-events-none select-none pb-6`},de={class:`text-outline text-center text-[17vw] font-black leading-[0.85] md:text-[11vw]`},fe={class:`flex flex-wrap items-center justify-between gap-4 border-t border-line py-6 text-xs text-muted`},pe={key:0,class:`font-mono text-[10px] tracking-[0.25em]`},me=Object.assign(C({__name:`Footer`,setup(t){let n=[{href:`/#home`,label:`خانه`,section:`hero`},{href:`/#products`,label:`محصولات`,section:`productsIntro`},{href:`/#about`,label:`درباره ما`,section:`about`},{href:`/#services`,label:`خدمات`,section:`services`},{href:`/#standards`,label:`استانداردها`,section:`standards`},{href:`/#industries`,label:`صنایع`,section:`industries`}],r={website:{icon:`global`,label:`وب‌سایت`},telegram:{icon:`send-2`,label:`تلگرام`},instagram:{icon:`instagram`,label:`اینستاگرام`},linkedin:{icon:`link`,label:`لینکدین`},whatsapp:{icon:`messages-2`,label:`واتساپ`},bale:{icon:`messages-2`,label:`بله`},eitaa:{icon:`messages-2`,label:`ایتا`},aparat:{icon:`video-play`,label:`آپارات`},youtube:{icon:`video-play`,label:`یوتیوب`},email:{icon:`sms`,label:`ایمیل`},phone:{icon:`call`,label:`تماس`}},o=_(),c=h(()=>o.sections.footer),d=h(()=>o.settings),p=h(()=>n.filter(e=>o.sections?.[e.section]?.enabled!==!1)),m=h(()=>o.categories.map(e=>({label:e.name,href:`/categories/${e.slug}`}))),g=h(()=>d.value.socials.map(e=>({...r[e.type],href:e.url,external:/^https?:\/\//.test(e.url)})));return(t,n)=>{let r=u;return T(),a(`footer`,V,[n[4]||=f(`div`,{class:`hazard h-2.5`},null,-1),f(`div`,H,[f(`div`,U,[f(`div`,W,[w(B),f(`p`,G,l(x(c).about),1),f(`div`,K,[(T(!0),a(y,null,e(x(g),e=>(T(),a(`a`,{key:e.href,href:e.href,"aria-label":e.label,target:e.external?`_blank`:void 0,rel:e.external?`noopener`:void 0,class:`flex size-10 items-center justify-center rounded-lg border border-line text-muted transition-all duration-300 hover:border-accent hover:bg-accent hover:text-bg`},[w(b,{name:e.icon,class:`size-4`},null,8,[`name`])],8,q))),128))])]),f(`div`,J,[n[0]||=f(`div`,{class:`font-mono text-xs tracking-[0.25em] text-accent`},`// دسترسی`,-1),f(`ul`,Y,[(T(!0),a(y,null,e(x(p),e=>(T(),a(`li`,{key:e.href},[f(`a`,{href:e.href,class:`text-sm text-muted transition-colors hover:text-ink`},l(e.label),9,X)]))),128))])]),f(`div`,Z,[n[1]||=f(`div`,{class:`font-mono text-xs tracking-[0.25em] text-accent`},`// محصولات`,-1),f(`ul`,Q,[(T(!0),a(y,null,e(x(m),e=>(T(),a(`li`,{key:e.href},[w(r,{to:e.href,class:`text-sm text-muted transition-colors hover:text-ink`},{default:i(()=>[S(l(e.label),1)]),_:2},1032,[`to`])]))),128))])]),f(`div`,ne,[n[3]||=f(`div`,{class:`font-mono text-xs tracking-[0.25em] text-accent`},`// ارتباط`,-1),f(`address`,re,[f(`p`,ie,l(x(d).address.locality)+`، `+l(x(d).address.street),1),f(`p`,ae,[f(`a`,{href:`tel:${x(d).phone}`,class:`transition-colors hover:text-ink`},l(x(d).phoneDisplay),9,oe)]),f(`p`,se,[f(`a`,{href:`mailto:${x(d).email}`,class:`transition-colors hover:text-ink`},l(x(d).email),9,ce)]),f(`p`,le,[S(l(x(d).workingHours)+` `,1),x(c).emergencyNote?(T(),a(y,{key:0},[n[2]||=f(`br`,null,null,-1),S(` `+l(x(c).emergencyNote),1)],64)):s(``,!0)])])])]),f(`div`,ue,[f(`div`,de,l(x(d).name),1)]),f(`div`,fe,[f(`div`,null,l(x(c).copyright),1),x(c).certLine?(T(),a(`div`,pe,l(x(c).certLine),1)):s(``,!0)])])])}}}),{__name:`LayoutFooter`});function he(){let e=v(null),r;return t(()=>{e.value=new Date,r=N(()=>e.value=new Date,15e3)}),n(()=>clearInterval(r)),{time:h(()=>e.value?new Intl.DateTimeFormat(`fa-IR`,{hour:`2-digit`,minute:`2-digit`,timeZone:`Asia/Tehran`}).format(e.value):`--:--`),shift:h(()=>{if(!e.value)return``;let t=Number(new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,hour12:!1,timeZone:`Asia/Tehran`}).format(e.value));return t>=6&&t<14?`صبح`:t>=14&&t<22?`عصر`:`شب`})}}var ge={class:`mx-auto flex max-w-[1480px] items-center justify-between px-5 md:px-8`},_e={class:`hidden items-center gap-7 lg:flex`},ve=[`href`],ye={class:`flex items-center gap-3`},be={class:`hidden items-center gap-2.5 rounded-full border border-line px-4 py-2 text-[11px] text-muted xl:flex`},xe={class:`font-mono`},Se={href:`/#contact`,class:`hidden items-center gap-2 rounded-full bg-accent px-5 py-2.5 text-sm font-bold text-bg transition-all duration-300 hover:bg-accent-soft hover:shadow-[0_0_30px_rgba(255,90,0,0.4)] md:flex`},Ce={class:`flex items-center justify-between border-b border-line px-5 py-4 md:px-8`},we={class:`flex flex-1 flex-col justify-center gap-1 overflow-y-auto px-8`},Te={class:`font-mono text-xs text-accent`},Ee={class:`text-3xl font-black transition-colors group-hover:text-accent`},De={class:`flex items-center justify-between border-t border-line p-8 text-sm`},$={class:`flex items-center gap-3 text-muted`},Oe=[`href`],ke={class:`text-xs text-muted`},Ae=Object.assign(C({__name:`Header`,setup(t){let r=[{href:`/#home`,label:`خانه`,section:`hero`},{href:`/#products`,label:`محصولات`,section:`productsIntro`},{href:`/#about`,label:`درباره ما`,section:`about`},{href:`/#services`,label:`خدمات`,section:`services`},{href:`/#standards`,label:`استانداردها`,section:`standards`},{href:`/#industries`,label:`صنایع`,section:`industries`},{href:`/#contact`,label:`تماس`,section:`contact`}],u=P(),d=_(),p=h(()=>d.settings),m=h(()=>d.sections),v=h(()=>r.filter(e=>m.value?.[e.section]?.enabled!==!1)),C=F(40),{time:E,shift:A}=he();return g(()=>u.menuOpen,e=>{document.body.style.overflow=e?`hidden`:``}),n(()=>{document.body.style.overflow=``}),(t,n)=>(T(),a(y,null,[w(x(D).header,{initial:{y:-90,opacity:0},animate:x(u).ready?{y:0,opacity:1}:{},transition:{duration:.9,delay:.15,ease:`EASE`in t?t.EASE:x(k)},class:o(`fixed inset-x-0 top-0 z-[80] transition-all duration-500 ${x(C)?`border-b border-line bg-bg/85 py-3 backdrop-blur-xl`:`py-5`}`)},{default:i(()=>[f(`div`,ge,[w(B),f(`nav`,_e,[(T(!0),a(y,null,e(x(v),e=>(T(),a(`a`,{key:e.href,href:e.href,class:`group relative py-2 text-sm text-ink/75 transition-colors hover:text-ink`},[S(l(e.label)+` `,1),n[2]||=f(`span`,{class:`absolute bottom-0 start-0 h-0.5 w-full origin-right scale-x-0 bg-accent transition-transform duration-300 group-hover:scale-x-100`},null,-1)],8,ve))),128))]),f(`div`,ye,[f(`div`,be,[n[3]||=f(`span`,{class:`size-1.5 animate-pulse rounded-full bg-emerald-400`},null,-1),f(`span`,xe,l(x(E)),1),n[4]||=f(`span`,{class:`text-muted/50`},`|`,-1),f(`span`,null,`تهران — شیفت `+l(x(A)),1)]),f(`a`,Se,[w(b,{name:`call`,class:`size-4`}),n[5]||=S(` درخواست مشاوره `,-1)]),f(`button`,{"aria-label":`باز کردن منو`,class:`flex size-11 items-center justify-center rounded-lg border border-line text-ink transition-colors hover:border-accent hover:text-accent lg:hidden`,onClick:n[0]||=(...e)=>x(u).openMenu&&x(u).openMenu(...e)},[w(b,{name:`menu`,class:`size-5`})])])])]),_:1},8,[`animate`,`transition`,`class`]),w(x(M),null,{default:i(()=>[x(u).menuOpen?(T(),c(x(D).div,{key:0,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.35},class:`fixed inset-0 z-[110] flex flex-col bg-bg/95 backdrop-blur-2xl`},{default:i(()=>[f(`div`,Ce,[w(B),f(`button`,{"aria-label":`بستن منو`,class:`flex size-11 items-center justify-center rounded-lg border border-line transition-colors hover:border-accent hover:text-accent`,onClick:n[1]||=(...e)=>x(u).closeMenu&&x(u).closeMenu(...e)},[w(b,{name:`close-circle`,class:`size-5`})])]),f(`nav`,we,[(T(!0),a(y,null,e(x(v),(e,n)=>(T(),c(x(D).a,{key:e.href,href:e.href,initial:{opacity:0,x:44},animate:{opacity:1,x:0},transition:{delay:.08+n*.055,duration:.55,ease:`EASE`in t?t.EASE:x(k)},class:`group flex items-baseline gap-5 border-b border-line/60 py-4`,onClick:x(u).closeMenu},{default:i(()=>[f(`span`,Te,l((`faNum`in t?t.faNum:x(O))(String(n+1).padStart(2,`0`))),1),f(`span`,Ee,l(e.label),1)]),_:2},1032,[`href`,`transition`,`onClick`]))),128))]),f(`div`,De,[f(`div`,$,[w(b,{name:`call`,class:`size-4 text-accent`}),f(`a`,{href:`tel:${x(p).phone}`,class:`font-mono`,dir:`ltr`},l(x(p).phoneDisplay),9,Oe)]),f(`div`,ke,`تهران — شیفت `+l(x(A))+`، `+l(x(E)),1)])]),_:1})):s(``,!0)]),_:1})],64))}}),{__name:`LayoutHeader`}),je={class:`mt-12 font-mono text-7xl font-semibold tabular-nums md:text-8xl`},Me={class:`mt-8 h-[3px] w-64 overflow-hidden rounded-full bg-line md:w-80`},Ne={class:`mt-6 flex items-center gap-3 text-xs text-muted`},Pe=Object.assign(C({__name:`Preloader`,emits:[`complete`],setup(e,{emit:r}){let a=[`بررسی سیستم‌های ایمنی`,`تأیید استانداردهای بین‌المللی`,`بارگذاری تجهیزات حفاظت فردی`,`محیط کاری آماده است`],o=r,s=v(0),u=!1,d;t(()=>{let e=0;d=N(()=>{e+=Math.floor(Math.random()*11)+7,e>=100&&(e=100,clearInterval(d),u||(u=!0,setTimeout(()=>o(`complete`),450))),s.value=e},140)}),n(()=>clearInterval(d));let m=h(()=>a[Math.min(a.length-1,Math.floor(s.value/100*a.length))]);return(e,t)=>(T(),c(x(D).div,{exit:{y:`-100%`},transition:{duration:.85,ease:[.76,0,.24,1]},class:`fixed inset-0 z-[200] flex flex-col items-center justify-center bg-bg`},{default:i(()=>[t[3]||=f(`div`,{class:`hazard absolute inset-x-0 top-0 h-3`},null,-1),t[4]||=f(`div`,{class:`hazard absolute inset-x-0 bottom-0 h-3`},null,-1),t[5]||=f(`div`,{class:`flex items-center gap-4`},[f(`span`,{class:`flex size-12 items-center justify-center rounded-xl bg-white shadow-[0_0_28px_rgba(255,90,0,0.3)] ring-1 ring-white/10`},[f(`img`,{src:L,alt:`ایمن پیشگامان`,width:`32`,height:`32`,class:`size-8 object-contain`})]),f(`span`,{class:`font-mono text-xs tracking-[0.35em] text-muted`},` IMEN PISHGAMAN CO. `)],-1),f(`div`,je,[S(l(x(s).toLocaleString(`fa-IR`)),1),t[0]||=f(`span`,{class:`text-accent`},`٪`,-1)]),f(`div`,Me,[f(`div`,{class:`h-full bg-accent transition-all duration-200`,style:p({width:`${x(s)}%`})},null,4)]),f(`div`,Ne,[t[1]||=f(`span`,{class:`size-1.5 animate-pulse rounded-full bg-accent`},null,-1),S(` `+l(x(m))+` `,1),t[2]||=f(`span`,{class:`animate-blink text-accent`},`▍`,-1)])]),_:1}))}}),{__name:`LayoutPreloader`}),Fe=C({__name:`default`,setup(e){let t=P(),n=_();return(e,o)=>(T(),a(`div`,null,[w(x(M),null,{default:i(()=>[x(t).ready?s(``,!0):(T(),c(Pe,{key:0,onComplete:x(t).setReady},null,8,[`onComplete`]))]),_:1}),w(te),o[0]||=f(`div`,{class:`noise`,"aria-hidden":`true`},null,-1),w(Ae),r(e.$slots,`default`),x(n).sections?.footer?.enabled===!1?s(``,!0):(T(),c(me,{key:0})),w(I)]))}});export{Fe as default};