1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,672724,e=>{"use strict";var t=e.i(843476),r=e.i(875557),a=e.i(271645),s=e.i(195085),l=e.i(300171),n=e.i(157660),i=e.i(619273),o=e.i(286491),d=e.i(540143),c=e.i(915823),u=class extends c.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let a=t.queryKey,s=t.queryHash??(0,i.hashQueryKeyByOptions)(a,t),l=this.get(s);return l||(l=new o.Query({client:e,queryKey:a,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){d.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,i.matchQuery)(e,t)):t}notify(e){d.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){d.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){d.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},h=e.i(114272),m=c,p=class extends m.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#r=new Map,this.#a=0}#t;#r;#a;build(e,t,r){let a=new h.Mutation({client:e,mutationCache:this,mutationId:++this.#a,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#t.add(e);let t=x(e);if("string"==typeof t){let r=this.#r.get(t);r?r.push(e):this.#r.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=x(e);if("string"==typeof t){let r=this.#r.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#r.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=x(e);if("string"!=typeof t)return!0;{let r=this.#r.get(t),a=r?.find(e=>"pending"===e.state.status);return!a||a===e}}runNext(e){let t=x(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#r.get(t)?.find(t=>
1t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){d.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#r.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,i.matchMutation)(e,t))}notify(e){d.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return d.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(i.noop))))}};function x(e){return e.options.scope?.id}var f=e.i(175555),y=e.i(814448);function g(e){return{onFetch:(t,r)=>{let a=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],n=t.state.data?.pageParams||[],o={pages:[],pageParams:[]},d=0,c=async()=>{let r=!1,c=(0,i.ensureQueryFn)(t.options,t.fetchOptions),u=async(e,a,s)=>{let l;if(r)return Promise.reject();if(null==a&&e.pages.length)return Promise.resolve(e);let n=(Object.defineProperty(l={client:t.client,queryKey:t.queryKey,pageParam:a,direction:s?"backward":"forward",meta:t.options.meta},"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)}),l),o=await c(n),{maxPages:d}=t.options,u=s?i.addToStart:i.addToEnd;return{pages:u(e.pages,o,d),pageParams:u(e.pageParams,a,d)}};if(s&&l.length){let e="backward"===s,t={pages:l,pageParams:n},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:b)(a,t);o=await u(t,r,e)}else{let t=e??l.length;do{let e=0===d?n[0]??a.initialPageParam:b(a,o);if(d>0&&null==e)break;o=await u(o,e),d++}while(d<t)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function b(e,{pages:t,pageParams:r}){let a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}var v=class{#s;#l;#n;#i;#o;#d;#c;#u;constructor(e={}){this.#s=e.queryCache||new u,this.#l=e.mutationCache||new p,this.#n=e.defaultOptions||{},this.#i=new Map,this.#o=new Map,this.#d=0}mount(){this.#d++,1===this.#d&&(this.#c=f.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#s.onFocus())}),this.#u=y.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#s.onOnline())}))}unmount(){this.#d--,0===this.#d&&(this.#c?.(),this.#c=void 0,this.#u?.(),this.#u=void 0)}isFetching(e){return this.#s.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#l.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#s.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#s.build(this,t),a=r.state.data;return void 0===a?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,i.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#s.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let a=this.defaultQueryOptions({queryKey:e}),s=this.#s.get(a.queryHash),l=s?.state.data,n=(0,i.functionalUpdate)(t,l);if(void 0!==n)return this.#s.build(this,a).setData(n,{...r,manual:!0})}setQueriesData(e,t,r){return d.notifyManager.batch(()=>this.#s.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#s.get(t.queryHash)?.state}removeQueries(e){let t=this.#s;d.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#s;return d.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(d.notifyManager.batch(()=>this.#s.findAll(e).map(e=>e.cancel(r)))).then(i.noop).catch(i.noop)}invalidateQueries(e,t={}){return d.notifyManager.batch(()=>(this.#s.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(d.notifyManager.batch(()=>this.#s.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(i.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}
1))).then(i.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#s.build(this,t);return r.isStaleByTime((0,i.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(i.noop).catch(i.noop)}fetchInfiniteQuery(e){return e.behavior=g(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(i.noop).catch(i.noop)}ensureInfiniteQueryData(e){return e.behavior=g(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return y.onlineManager.isOnline()?this.#l.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#s}getMutationCache(){return this.#l}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set((0,i.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#i.values()],r={};return t.forEach(t=>{(0,i.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#o.set((0,i.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#o.values()],r={};return t.forEach(t=>{(0,i.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,i.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===i.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#s.clear(),this.#l.clear()}},j=e.i(912598),k=e.i(706230),w=e.i(618566),N=e.i(989970),C=e.i(883495);let q=[],O=!1;N.default.registerPlugin(C.default);var A=e.i(215827),P=e.i(556843);e.s(["default",0,({children:e})=>{let i;i=(0,w.usePathname)(),(0,a.useEffect)(()=>{O=!1,C.default.getAll().forEach(e=>e.kill()),C.default.clearScrollMemory(),C.default.update(),window.scrollTo({top:0,left:0,behavior:"instant"}),requestAnimationFrame(()=>{C.default.refresh(!0),O=!0,q.forEach(e=>e()),q=[]})},[i]),(0,a.useEffect)(()=>{let e=null,t=new ResizeObserver(()=>{O&&null===e&&(e=requestAnimationFrame(()=>{e=null,C.ScrollTrigger.refresh()}))});return t.observe(document.body),()=>{t.disconnect(),null!==e&&cancelAnimationFrame(e)}},[]);let[o]=(0,a.useState)(()=>new v);return(0,t.jsx)(j.QueryClientProvider,{client:o,children:(0,t.jsx)(k.default,{children:(0,t.jsxs)(l.default,{children:[(0,t.jsx)(s.AppToaster,{}),(0,t.jsx)(n.default,{children:(0,t.jsx)(A.CategoriesCheckProvider,{children:(0,t.jsx)(r.default,{children:(0,t.jsx)(P.HeaderUIProvider,{children:e})})})})]})})})}],672724)},175696,e=>{"use strict";var t=e.i(861745),r=e.i(843476);function a({locale:e,...a}){if(!e)throw Error(void 0);return(0,r.jsx)(t.IntlProvider,{locale:e,...a})}e.s(["default",()=>a])},457043,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(966887);function s(){let[e,s]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>{s(window.scrollY>window.innerHeight)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,t.jsx)("button",{"aria-label":"back-to-top",onClick:()=>window.scroll({top:0,behavior:"smooth"}),className:`hidden lg:flex w-8 h-8 left-6 lg:left-10 fixed transition-all duration-500 backdrop-blur-2xl ${e?"bottom-[57px]":"-bottom-[57px]"} z-80 lg:hover:bg-primary-850 lg:dark:hover:bg-secondary-900 border border-secondary-50 dark:border-secondary-750 lg:dark:hover:border-secondary-900 text-secondary-750 dark:text-secondary-50 lg:hover:text-primary-150 lg:dark:hover:text-primary-250 rounded-lg flex items-center justify-center cursor-pointer transition-all`,children:(0,t.jsx)(a.ArrowUpwardIcon,{style:{width:"20px",height:"20px"}})})}e.s(["default",()=>s])},338189,e=>{"use strict";var t=e.i(843476);e.i(637261);var r=e.i(544708),a=e.i(512003),a=a,s=e.i(494388),l=e.i(520133);e.s(["default",0,({children:e})=>{let n=(0,s.default)(),i=(0,l.usePathname)();return(0,t.jsx)("body",{className:`min-h-screen ${"/suppliers"===i?"bg-[#262920]":"bg-background"} text-foreground ${"ltr"===n?a.default.variable:r.danaFaFont.variable} font-danaFa`,children:e})}],338189)},497800,e=>{"use strict";var t=e.i(843476),r=e.i(875557),a=e.i(271645),s=e.i(449730),l=e.i(586819);e.s(["default",0,()=>{let[e,n]=(0,a.useState)(!1),{productsToCompare:i}=(0,r.useComparingProducts)(),o=i.length>0;return((0,a.useEffect)(()=>{n(!0)},[]),e)?(0,t.jsxs)(l.default,{href:"/compare","aria-label":"compare-products",className:`w-8 h-8 p-1 fixed transition-all duration-500 backdrop-blur-2xl group ${o?"bottom-[
1120px]":"-bottom-[120px]"} left-6 lg:left-10 z-80 bg-white dark:bg-secondary-850 lg:hover:bg-primary-900 lg:dark:hover:bg-secondary-900 border border-secondary-50 dark:border-secondary-750 lg:hover:border-primary-900 lg:dark:hover:border-primary-400 text-secondary-750 dark:text-secondary-50 lg:hover:text-primary-200 lg:dark:hover:text-secondary-50 rounded-lg flex items-center justify-center cursor-pointer transition-all`,children:[(0,t.jsx)(s.Icon,{iconPath:(0,t.jsx)("path",{fill:"currentColor",d:"M9.175 16H3q-.425 0-.712-.288T2 15t.288-.712T3 14h6.175L7.3 12.125q-.275-.275-.275-.687t.275-.713q.3-.3.713-.3t.712.3L12.3 14.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-3.6 3.6q-.3.3-.7.288t-.7-.313q-.275-.3-.287-.7t.287-.7zm5.65-6l1.875 1.875q.275.275.275.688t-.275.712q-.3.3-.712.3t-.713-.3L11.7 9.7q-.15-.15-.212-.325T11.425 9t.063-.375t.212-.325l3.6-3.6q.3-.3.7-.287t.7.312q.275.3.288.7t-.288.7L14.825 8H21q.425 0 .713.288T22 9t-.288.713T21 10z"})}),(0,t.jsx)("span",{className:"absolute -top-2.5 -right-2.5 bg-secondary-50 dark:bg-black text-xs text-secondary-750 dark:text-secondary-50 w-5 h-5 rounded-md flex items-center justify-center",children:i.length})]}):null}])},355074,e=>{"use strict";var t=e.i(843476),r=e.i(520133),a=e.i(271645);let s=[{titleKey:"quickAccess.title",key:"quickAccess",links:[{id:1,labelKey:"quickAccess.home",href:"/"},{id:3,labelKey:"quickAccess.aboutUs",href:"/about-us"},{id:4,labelKey:"quickAccess.articles",href:"/blogs"},{id:5,labelKey:"quickAccess.directForm",href:"/direct-request"},{id:6,labelKey:"quickAccess.faq",href:"/faq"},{id:7,labelKey:"quickAccess.brands",href:"/brands"},{id:8,labelKey:"quickAccess.auth",href:"#",action:"auth"},{id:9,labelKey:"quickAccess.compare",href:"/compare"},{id:10,labelKey:"quickAccess.contactUs",href:"/contact-us"},{id:11,labelKey:"quickAccess.becomeSupplier",href:"/suppliers"}]},{titleKey:"categories.title",key:"categories",links:[{id:1,labelKey:"categories.fireAlarm",href:"#"},{id:2,labelKey:"categories.safetyDoor",href:"#"},{id:3,labelKey:"categories.fgSystem",href:"#"},{id:4,labelKey:"categories.fireCable",href:"#"},{id:5,labelKey:"categories.personalSafety",href:"#"},{id:6,labelKey:"categories.fireCoating",href:"#"},{id:7,labelKey:"categories.extinguishing",href:"#"},{id:8,labelKey:"categories.fireRobot",href:"#"}]}],l=[{icon:"/images/telegram - light.svg",href:"https://telegram.me/qpket"},{icon:"/images/whatsapp - light.svg",href:"https://api.whatsapp.com/send?phone=09361255000&text="},{icon:"/images/facebook - light.svg",href:"https://facebook.com/qpket"},{icon:"/images/instagram - light.svg",href:"https://instagram.com/qpket"},{icon:"/images/virgool - light.svg",href:"https://virgool.io/@eqpket"}],n=[{id:2,logo:"/images/footer-partners-2.png"},{id:3,logo:"/images/footer-partners-3.png"},{id:4,logo:"/images/footer-partners-4.png"},{id:5,logo:"/images/footer-partners-5.png"}],i=[{label:"bottom.policyLinks.terms",href:"/terms"},{label:"bottom.policyLinks.privacy",href:"/privacy-policy"}];var o=e.i(706230),d=e.i(861745),c=e.i(948148),u=e.i(121836),h=e.i(88653),m=e.i(846932),p=e.i(940513),x=e.i(966887),f=e.i(586819),y=e.i(300171);e.s(["default",0,({categoriesData:e})=>{let[g,b]=(0,a.useState)(null),[v,j]=(0,a.useState)(!1),k=(0,c.useTranslations)("Footer"),w=(0,r.usePathname)(),{isDarkMode:N}=(0,o.useDarkMode)(),C=(0,d.useLocale)(),{handleOpenAuth:q}=(0,y.useAuth)(),O="/suppliers"===w;return(0,a.useEffect)(()=>{j(!0)},[]),(0,t.jsxs)("footer",{className:`${O?"bg-[#262920]":"bg-background"} py-8 lg:px-5 space-y-[30px] relative overflow-hidden z-40`,children:[(0,t.jsx)("span",{className:"absolute top-0 block w-full h-px bg-linear-to-r from-transparent via-secondary-50 dark:via-secondary-750 to-transparent"}),(0,t.jsxs)("div",{className:"customContainer flex flex-col lg:flex-row lg:items-center justify-center lg:justify-between gap-y-2.5",children:[(0,t.jsx)("p",{className:"font-semibold text-secondary-750 dark:text-secondary-50",children:k("followUs")}),(0,t.jsx)("div",{className:"flex flex-row-reverse justify-end lg:justify-start items-center gap-x-2.5",children:l.map(({href:e,icon:r},a)=>(0,t.jsx)(f.default,{href:e,"aria-label":`social-link-${a}`,target:"_blank",children:(0,t.jsx)(u.default,{src:r,alt:r.split("/")[1],width:20,height:20,className:"dark:brightness-125 shrink-0"})},a))})]}),(0,t.jsx)("span",{className:"block w-full h-px bg-linear-to-r from-transparent via-secondary-50 dark:via-secondary-750 to-transparent"}),(0,t.jsx)("div",{className:"customContainer flex flex-col lg:flex-row items-start justify-between gap-y-6 xl:gap-x-10",children:s.map(({titleKey:r,links:a,key:s},l)=>{let n=!v||g===s;return(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-y-5 gap-x-6 lg:gap-x-0 flex-1 w-full lg:w-auto",children:[(0,t.jsxs)("div",{onClick:()=>v&&b(e=>e===s?null:s),className:"lg:col-span-2 font-semibold text-secondary-750 dark:text-secondary-50 flex items-center justify-between cursor-pointer",children:[(0,t.jsx)("p",{children:k(r)}),(0,t.jsx)(x.ExpandMoreIcon,{className:`lg:hidden! transition-all! duration-300 ${n?"rotate-180":""}`})]}),"categories"===s?e?.map(({id:e,names:r,slugs:a})=>(0,t.jsx)(f.default,{href:`/product-category/${a.en}`,"aria-label":`footer-link-${e}
1`,scroll:!0,className:`hidden lg:block text-sm transition-all ${w===`/product-category/${a.en}`?"text-primary-750 dark:text-primary-450 font-semibold":"text-secondary-650 dark:text-secondary-250 lg:hover:scale-[1.01] lg:hover:text-primary-750 lg:dark:hover:text-primary-450 font-normal"}`,children:(0,p.getLocalizedValue)(r,C)},e)):a.map(({id:e,labelKey:r,href:a,action:s})=>"auth"===s?(0,t.jsx)("button",{onClick:()=>q(),className:"hidden lg:block text-start text-sm transition-all text-secondary-650 dark:text-secondary-250 lg:hover:scale-[1.01] lg:hover:text-primary-750 lg:dark:hover:text-primary-450 font-normal",children:k(r)},e):(0,t.jsx)(f.default,{href:a,"aria-label":`footer-link-${e}`,className:`hidden lg:block text-sm transition-all ${w===a?"text-primary-750 dark:text-primary-450 font-semibold":"text-secondary-650 dark:text-secondary-250 lg:hover:scale-[1.01] lg:hover:text-primary-750 lg:dark:hover:text-primary-450 font-normal"}`,children:k(r)},e)),v?(0,t.jsx)(h.AnimatePresence,{children:n&&(0,t.jsx)(m.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},className:"lg:hidden",children:(0,t.jsx)(m.motion.div,{initial:{opacity:0}
1,animate:{opacity:1,transition:{delay:.2}},exit:{opacity:0},children:"categories"===g?e?.map(({id:e,names:r,slugs:a})=>(0,t.jsx)(f.default,{href:`/product-category/${a?.en}`,"aria-label":`footer-link-${e}`,className:`block py-2.5 text-sm transition-all ${w===`/product-category/${a?.en}`?"text-primary-750 dark:text-primary-450 font-semibold":"text-secondary-650 dark:text-secondary-250 lg:hover:scale-[1.01] lg:hover:text-primary-750 lg:dark:hover:text-primary-450 font-normal"}`,children:(0,p.getLocalizedValue)(r,C)},e)):a.map(({id:e,labelKey:r,href:a})=>(0,t.jsx)(f.default,{href:a,"aria-label":`footer-link-${e}`,className:`block py-2.5 text-sm transition-all ${w===a?"text-primary-750 dark:text-primary-450 font-semibold":"text-secondary-650 dark:text-secondary-250 lg:hover:scale-[1.01] lg:hover:text-primary-750 lg:dark:hover:text-primary-450 font-normal"}`,children:k(r)},e))})})}):n&&(0,t.jsx)("div",{className:"lg:hidden",children:"categories"===g?e?.map(({id:e,names:r,slugs:a})=>(0,t.jsx)(f.default,{href:`/product-category/${a?.en}`,"aria-label":`footer-link-${e}`,className:`block py-2.5 text-sm transition-all ${w===`/product-category/${a?.en}`?"text-primary-750 dark:text-primary-450 font-semibold":"text-secondary-650 dark:text-secondary-250 lg:hover:scale-[1.01] lg:hover:text-primary-750 lg:dark:hover:text-primary-450 font-normal"}`,children:(0,p.getLocalizedValue)(r,C)},e)):a.map(({id:e,labelKey:r,href:a})=>(0,t.jsx)(f.default,{href:a,"aria-label":`footer-link-${e}`,className:`block py-2.5 text-sm transition-all ${w===a?"text-primary-750 dark:text-primary-450 font-semibold":"text-secondary-650 dark:text-secondary-250 lg:hover:scale-[1.01] lg:hover:text-primary-750 lg:dark:hover:text-primary-450 font-normal"}`,children:k(r)},e))})]},l)})}),(0,t.jsxs)("div",{className:`${O?"bg-[#1F211A]":"bg-[#f8f9fa] dark:bg-secondary-800"} lg:bg-transparent! space-y-[30px] py-6 lg:py-0 w-[90%] lg:w-full mx-auto rounded-lg`,children:[(0,t.jsxs)("div",{className:"customContainer flex flex-col xl:flex-row items-end justify-between gap-y-6",children:[(0,t.jsxs)("div",{className:"w-full xl:w-3/5 flex flex-col lg:flex-row lg:items-center justify-center xl:justify-normal gap-6",children:[(0,t.jsx)(f.default,{href:"/","aria-label":"logo",children:(0,t.jsx)(u.default,{src:v&&N?"/images/logo_dark-mode.svg":"/images/logo.svg",alt:"logo",width:92,height:43})}),(0,t.jsxs)("div",{className:"flex items-center gap-x-2.5",children:[(0,t.jsx)(x.PhoneInTalkIcon,{className:"text-primary-650 dark:text-primary-450",style:{width:"20px",height:"20px"}}),(0,t.jsxs)("div",{className:"flex items-center gap-x-2.5 font-bold text-secondary-750 dark:text-secondary-50 text-sm",children:[(0,t.jsx)(f.default,{href:"tel:09361255000","aria-label":"phone-number-1",children:"09361255000"}),(0,t.jsx)("span",{className:"text-secondary-50! dark:text-secondary-750! font-normal!",children:"|"}),(0,t.jsx)(f.default,{href:"tel:06 - 88222805 - 021","aria-label":"phone-number-2",children:"88222805-06 - 021"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-x-2.5",children:[(0,t.jsx)(x.InboxIcon,{className:"text-primary-650 dark:text-primary-450",style:{width:"20px",height:"20px"}}),(0,t.jsx)(f.default,{href:"mailto:[email protected]","aria-label":"email",className:"font-semibold text-secondary-750 dark:text-secondary-50",children:"[email protected]"})]})]}),(0,t.jsx)("span",{className:"block lg:hidden w-full h-px bg-linear-to-r from-transparent via-secondary-50 dark:via-secondary-750 to-transparent"}),(0,t.jsxs)("div",{className:"w-full xl:w-2/5 flex flex-col lg:flex-row lg:items-end justify-center xl:justify-between gap-6",children:[(0,t.jsxs)("div",{className:"lg:w-full flex flex-col gap-y-[18px]",children:[(0,t.jsx)("p",{className:"font-semibold text-secondary-750 dark:text-secondary-50",children:k("qpketPartners")}),(0,t.jsx)("div",{className:"flex items-center justify-evenly gap-x-2.5",children:n.map(({id:e,logo:r})=>(0,t.jsx)(f.default,{href:"#","aria-label":`partner-${e}`,className:`block w-[55px] h-[55px] p-2.5 ${O?"border border-secondary-750":"bg-[#f8f9fa] dark:bg-secondary-800 border border-secondary-50 dark:border-secondary-750 lg:border-0!"} rounded-lg`,children:(0,t.jsx)(u.default,{src:r,alt:r.split("/")[1],width:50,height:50,className:"w-full h-full object-contain shrink-0"})},e))})]}),(0,t.jsx)(f.default,{href:"#","aria-label":"footer-enemad",className:`block w-[120px] h-[120px] shrink-0 ${O?"border border-secondary-750":"bg-[#f8f9fa] dark:bg-secondary-800 border border-secondary-50 dark:border-secondary-750 lg:border-0!"} rounded-lg p-2.5`,children:(0,t.jsx)(u.default,{src:"/images/footer-enemad.png",alt:"enemad",width:120,height:120,className:"w-full h-full object-contain shrink-0"})})]})]}),(0,t.jsx)("div",{className:`${O?"bg-[#1F211A]":"bg-[#f8f9fa] dark:bg-secondary-800"} h-28 lg:h-20 lg:rounded-lg flex items-center relative`,children:(0,t.jsxs)("div",{className:"customContainer flex flex-col lg:flex-row lg:items-center justify-between gap-y-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-x-5",children:i.map(({href:e,label:r},a)=>(0,t.jsx)(f.default,{href:e,"aria-label":`footer-link-${a}`,className:"text-sm text-secondary-750 dark:text-secondary-50",children:k(r)},a))}),(0,t.jsx)("div",{className:"flex flex-col lg:flex-row lg:items-center gap-y-1 gap-x-2.5 text-sm text-secondary-750 dark:text-secondary-50",children:(0,t.jsx)("p",{children:k.rich("bottom.rights",{strong:e=>(0,t.jsx)("strong",{className:"text-primary-650 dark:text-primary-450",children:e})})})})]})})]})]})}],355074)},199578,e=>{"use strict";var t=e.i(843476),r=e.i(169207),a=e.i(482639),s=e.i(678781),l=e.i(300171),n=e.i(556814);let i=()=>{let{handleOpenAuth:e}=(0,l.useAuth)();return(0,t.jsxs)("button",{"aria-label":"login",onClick:e,className:"flex items-center gap-x-2.5 whitespace-nowrap font-medium text-sm text-primary-850 dar
1k:text-primary-150 lg:hover:text-primary-100 lg:dark:hover:text-secondary-50 bg-secondary-0 dark:bg-secondary-950 lg:hover:bg-primary-800 lg:dark:hover:bg-secondary-900 p-3 rounded-lg cursor-pointer transition-all",children:[(0,t.jsx)(n.default,{className:"w-6 h-6"}),(0,t.jsx)(s.default,{mainKey:"Header",textKey:"loginOrSignup"})]})};var o=e.i(520133),d=e.i(271645),c=e.i(121836),u=e.i(88653),h=e.i(846932),m=e.i(779724),p=e.i(706230),x=e.i(112740),f=e.i(327652);let y=()=>{let{toggleDarkMode:e,isDarkMode:r}=(0,p.useDarkMode)();return(0,t.jsx)("div",{children:(0,t.jsx)("button",{onClick:e,"aria-label":"dark-mode-toggle",className:"flex items-center justify-center cursor-pointer text-secondary-450 dark:text-secondary-250",children:r?(0,t.jsx)(x.default,{className:"size-5!"}):(0,t.jsx)(f.default,{className:"size-5!"})})})};var g=e.i(948148),b=e.i(845049),v=e.i(85029),j=e.i(449730),k=e.i(966887),w=e.i(604388),N=e.i(454624);let C=(0,N.default)((0,t.jsx)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4zM20 4v13.17L18.83 16H4V4zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}),"CommentOutlined"),q=[{icon:(0,t.jsx)(k.DashboardOutlinedIcon,{}),labelKey:"dashboard",href:"/dashboard",role:["normal","supplier"],userType:["legal","natural"],isMain:!0},{icon:(0,t.jsx)(k.AssignmentIndOutlinedIcon,{}),labelKey:"userInfo",href:"/dashboard/user-info",role:["normal","supplier"],userType:["legal","natural"],isMain:!0},{icon:(0,t.jsx)(j.Icon,{iconPath:(0,t.jsx)("path",{fill:"currentColor",d:"M19 17v-5.2c-.5.1-1 .2-1.5.2H17v6H7v-7c0-2.8 2.2-5 5-5c.1-1.3.7-2.4 1.5-3.3c-.3-.4-.9-.7-1.5-.7c-1.1 0-2 .9-2 2v.3C7 5.2 5 7.9 5 11v6l-2 2v1h18v-1zm-9 4c0 1.1.9 2 2 2s2-.9 2-2zM21 6.5c0 1.9-1.6 3.5-3.5 3.5S14 8.4 14 6.5S15.6 3 17.5 3S21 4.6 21 6.5"})}),labelKey:"notifications",href:"/dashboard/notifications",role:["normal","supplier"],userType:["legal","natural"],isMain:!0},{icon:(0,t.jsx)(k.ShoppingCartCheckoutOutlinedIcon,{}),labelKey:"submittedInquiries",href:"/dashboard/inquiries",role:["normal","supplier"],userType:["legal","natural"],isMain:!0,children:[{type:"filter",labelKey:"pendingSupplierConfirmation",value:"pending-supplier-confirmation",target:"inquiries"},{type:"filter",labelKey:"pendingApproval",value:"pending-approval",target:"inquiries"},{type:"filter",labelKey:"approved",value:"approved",target:"inquiries"},{type:"filter",labelKey:"requestWithdrawn",value:"request-withdrawn",target:"inquiries"},{type:"filter",labelKey:"amendmentRequested",value:"amendment-requested",target:"inquiries"},{type:"filter",labelKey:"rejected",value:"rejected",target:"inquiries"}]},{icon:(0,t.jsx)(w.default,{}),labelKey:"directRequests",href:"/dashboard/direct-requests",role:["normal","supplier"],userType:["legal","natural"]},{icon:(0,t.jsx)(j.Icon,{iconPath:(0,t.jsx)("path",{fill:"currentColor",d:"m18 21l-1.4-1.4l1.575-1.6H14v-2h4.175L16.6 14.4L18 13l4 4zM3 21V6q0-.825.588-1.412T5 4h12q.825 0 1.413.588T19 6v5.075q-.25-.05-.5-.062T18 11t-.5.013t-.5.062V6H5v10h7.075q-.05.25-.062.5T12 17t.013.5t.062.5H6zm4-11h8V8H7zm0 4h5v-2H7zm-2 2V6z"})}),labelKey:"tickets",href:"/dashboard/tickets",role:["normal","supplier"],userType:["legal","natural"],isMain:!0},{icon:(0,t.jsx)(C,{}),labelKey:"comments",href:"/dashboard/comments",role:["normal","supplier"],userType:["legal","natural"]},{icon:(0,t.jsx)(k.FavoriteBorderOutlinedIcon,{}),labelKey:"favorites",href:"/dashboard/favorites",role:["normal","supplier"],userType:["legal","natural"],isMain:!0},{icon:(0,t.jsx)(k.RemoveRedEyeOutlinedIcon,{}),labelKey:"recentViews",href:"/dashboard/recent-views",role:["normal","supplier"],userType:["legal","natural"],children:[{type:"link",labelKey:"recentViewsRoutes.products",href:"/dashboard/recent-views"},{type:"link",labelKey:"recentViewsRoutes.blogs",href:"/dashboard/recent-views/blogs"}]},{icon:(0,t.jsx)(k.ForkliftIcon,{}),labelKey:"becomeSupplier",href:"/dashboard/suppliers",role:["normal"],userType:["legal","natural"]},{icon:(0,t.jsx)(k.ShoppingCartCheckoutOutlinedIcon,{}),labelKey:"receivedInquiries",href:"/dashboard/inquiries",role:["supplier"],userType:["legal","natural"]},{icon:(0,t.jsx)(k.AssignmentIndOutlinedIcon,{}),labelKey:"supplierInfo",href:"/dashboard/natural-info",role:["supplier"],userType:["natural"],children:[{type:"link",labelKey:"naturalInfo",href:"/dashboard/natural-info"},{type:"link",labelKey:"supplierCategories",href:"/dashboard/natural-info/supplier-categories"}]},{icon:(0,t.jsx)(k.CorporateFareOutlinedIcon,{}),labelKey:"companies",href:"/dashboard/companies",role:["supplier"],userType:["legal"],children:[{type:"filter",labelKey:"companiesList",value:"",target:"companies"},{type:"filter",labelKey:"addNewCompany",value:"/add-company",target:"companies"}]},{icon:(0,t.jsx)(k.LogoutOutlinedIcon,{}),labelKey:"logout",href:"/logout",role:["normal","supplier"],userType:["legal","natural"],isMain:!0}];var O=e.i(534987);let A=({userData:e})=>
1{if(!e)return;let r=e=>!!(e&&e.trim().length>0),a=r(e.full_name)&&r(e.username);return a&&r(e.email)&&r(e.national_identity_number)?null:(0,t.jsxs)("div",{className:`flex items-start gap-x-2 px-2.5 py-2 rounded-lg animate-pulse bg-blue-200/50 dark:bg-blue-950 text-blue-700 dark:text-blue-200 ${a?"opacity-50":"opacity-100"}`,children:[(0,t.jsx)(k.InfoOutlineIcon,{className:"size-5 shrink-0 text-blue-500 dark:text-blue-400 mt-0.5",fontSize:"small"}),(0,t.jsx)("p",{className:"text-xs font-medium text-blue-700 dark:text-blue-200 leading-5",children:"Ø¨Ø±Ø§Û Ø¯Ø³ØªØ±Ø³Û Ú©Ø§Ù
٠ب٠اÙ
Ú©Ø§ÙØ§Øª Ø³Ø§ÛØªØ ÙØ·ÙØ§Ù Ø§Ø·ÙØ§Ø¹Ø§Øª Ú©Ø§Ø±Ø¨Ø±Û Ø®ÙØ¯ را تکÙ
ÛÙ Ú©ÙÛØ¯."})]})};var P=e.i(3774),I=e.i(975157),S=e.i(586819);let M=({onOpenLogoutModal:e})=>{let[r,a]=(0,d.useState)(!1),{data:s,isLoading:l}=(0,v.useGetUser)();return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"shrink-0 hidden lg:flex flex-1 items-center justify-end gap-4 text-secondary-750 dark:text-secondary-50",children:(0,t.jsxs)("div",{className:"relative ",children:[l?(0,t.jsx)(b.default,{className:"h-10 w-40"}):(0,t.jsxs)("button",{"aria-label":"open-user-profile",onClick:()=>{s&&a(!0)},className:"flex items-center gap-x-2.5 whitespace-nowrap font-medium text-sm text-primary-850 dark:text-primary-150 lg:hover:text-primary-100 lg:dark:hover:text-secondary-50 bg-secondary-0 dark:bg-secondary-950 lg:hover:bg-primary-800 lg:dark:hover:bg-secondary-900 p-2.5 px-4 rounded-lg cursor-pointer transition-all",children:[(0,t.jsx)(P.default,{className:"w-6 h-6"}),(0,t.jsx)("span",{children:s?.first_name?s?.full_name:"کاربر Ú©ÛÙÙ¾Ûکت"})]}),(0,t.jsx)(T,{userData:s,isProfileOpen:r,setIsProfileOpen:a,onOpenLogoutModal:e})]})})})},$=()=>{let{data:e,isLoading:r}=(0,v.useGetUser)(),a=(0,g.useTranslations)("BurgerMenu"),{handleOpenAuth:s}=(0,l.useAuth)();return e||r?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"shrink-0 flex lg:hidden flex-1 items-center justify-end gap-4 text-secondary-750 dark:text-secondary-50",children:(0,t.jsx)("div",{className:"relative",children:r?(0,t.jsx)(b.default,{className:"h-6 w-30 my-2"}):(0,t.jsxs)(S.default,{href:"/dashboard","aria-label":"open-user-profile",className:"flex items-center gap-x-2.5 whitespace-nowrap font-medium py-2.5 rounded-lg cursor-pointer transition-all",children:[(0,t.jsx)(P.default,{className:"w-5! h-5!"}),(0,t.jsx)("span",{className:"text-sm",children:e?.first_name?e?.full_name:"کاربر Ú©ÛÙÙ¾Ûکت"})]})})})}):(0,t.jsxs)("div",{onClick:()=>{s()},className:"lg:hidden flex items-center justify-center gap-x-1.5 rounded-lg py-2.5",children:[(0,t.jsx)(n.default,{fontSize:"small"}),(0,t.jsx)("span",{className:"text-sm",children:a("loginBtn")})]})},T=({userData:e,onOpenLogoutModal:r,isProfileOpen:a,setIsProfileOpen:s})=>{let l=(0,m.default)(()=>s(!1)),n=(0,o.usePathname)(),i=(0,g.useTranslations)("Header.userPanelTabs"),{userRole:d,userType:p}=(0,O.default)();return(0,t.jsx)(u.AnimatePresence,{children:a&&(0,t.jsxs)(h.motion.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},ref:l,className:"absolute top-[165%] right-1/2 translate-x-1/2 w-[280px]",children:[(0,t.jsxs)("div",{className:"bg-white dark:bg-secondary-850 rounded-lg border border-secondary-50 dark:border-secondary-750 shadow-userProfile dark:shadow-userProfile-dark z-10 overflow-hidden",children:[(0,t.jsxs)("div",{className:"px-5 py-2.5 backdrop-blur-[10px] flex items-center gap-3 relative overflow-hidden",children:[(0,t.jsx)(c.default,{src:e.avatar||"/images/profile-picture-placeholder.webp",alt:"user avatar",width:70,height:70,priority:!0,fetchPriority:"high",className:"rounded-full object-cover shrink-0 w-[70px] h-[70px] aspect-square border border-secondary-150 dark:border-secondary-750",fallbackComponent:(0,t.jsx)(c.default,{src:"/images/profile-picture-placeholder.webp",alt:"user",width:70,height:70,priority:!0,fetchPriority:"high",className:"rounded-full object-cover shrink-0 w-[70px] h-[70px] aspect-square border border-secondary-150 dark:border-secondary-750"})}),(0,t.jsxs)("div",{className:"flex flex-col flex-1 gap-y-1.5",children:[(0,t.jsx)("span",{className:"whitespace-nowrap font-bold text-base text-secondary-900 dark:text-secondary-50",children:e.first_name?e?.full_name:"کاربر Ú©ÛÙÙ¾Ûکت"}),(0,t.jsx)("span",{className:"font-medium text-sm text-secondary-750 dark:text-secondary-250",children:"normal"===d?"کاربر عادÛ":"legal"===p?"تاÙ
ÛÙ Ú©ÙÙØ¯Ù ØÙÙÙÛ":"تاÙ
ÛÙ Ú©ÙÙØ¯Ù ØÙÛÙÛ"})]}),(0,t.jsx)(y,{}),(0,t.jsx)(c.default,{src:"/images/not-found-bg.webp",alt:"bg",width:250,height:100,priority:!0,fetchPriority:"high",className:"absolute inset-0 -z-10 blur-[30px] opacity-40 dark:opacity-10 mt-12 dark:mt-10 mr-8"})]}),(0,t.jsxs)("div",{className:"flex flex-col w-full gap-y-2.5 p-2.5",children:[q.map((e,a)=>{let l=n===e.href,o=e.role.includes(d),c="/logout"===e.href;if(o&&e.isMain)return(0,t.jsxs)(S.default,{href:e.href,onClick:e=>{s(!1),c&&(e.preventDefault(),r())},className:`px-2.5 py-1.5 flex items-center gap-x-2.5 rounded-lg group ${l?"bg-secondary-0 dark:bg-secondary-900 text-primary-600 dark:text-primary-400":""} ${(0,I.cn)(c&&"hover:bg-red-100 dark:hover:bg-red-950/70")} transition-all duration-300`,children:[(0,t.jsx)("span",{className:`size-7 ${l?"text-primary-600 dark:text-primary-400":"text-secondary-450"} ${c?"group-hover:text-red-700 group-hover:dark:text-red-200":"group-hover:text-primary-600 dark:group-hover:text-primary-400"} transition-all duration-300`,children:e.icon}),(0,t.jsx)("span",{className:`font-medium text-base ${l?"text-primary-600 dark:text-primary-400":"text-secondary-750 dark:text-secondary-50"} ${c?"group-hover:text-red-700 group-hover:dark:text-red-200":"group-hover:text-primary-600 dark:group-hover:text-primary-400"} transition-all duration-300`,children:i(e.labelKey)})]},a)}),(0,t.jsx)(A,{userData:e})]})]}),(0,t.jsx)("span",{className:"w-3.5 h-3.5 block rounded-xs bg-white dark:bg-secondary-850 border-t border-l border-secondary-50 dark:border-secondary-750 absolute -top-1.5 right-1/2 translate-x-1/2 rotate-45"})]},"user-profile")})};var E=e.i(556843);let F=()=>{let{data:e,isLoading:r}=(0,v.useGetUser)(),{openLogoutModal:a}=(0,E.useHeaderUI)();return r?(0,t.jsx)(b.default,{className:"h-11 w-35"}):r||e?(0,t.jsx)(M,{onOpenLogoutModal:a}):(0,t.jsx)(i,{})};var K=e.i(39839),L=e.i(157660),D=e.i(741905);let z=()=>{let{inquiryList:e,itemCount:r=0}=(0,L.useInquiryBasket)(),{openInquiryBasket:a}=(0,E.useHeaderUI)(),s=(0,K.useIsMounted)();return(0,t.jsxs)("button",{"aria-label":"open-inquiry-list",onClick:a,className:"relative hidden lg:block",children:[(0,t.jsx)(D.default,{className:"w-6 h-6 lg:hover:text-primary-600 lg:dark:hover:text-primary-400 transition-all!"}),(0,t.jsx)(u.AnimatePresence,{mode:"wait",children:s()&&(0,t.jsx)(h.motion.span,{initial:{transform:"translateY(-10px)"},animate:{transform:"translateY(0)"},exit:{transform:"translateY(-10px)"},transition:{duration:.1,ease:"easeInOut"},className:"absolute -top-3 -right-2.5 aspect-square rounded-md flex items-center justify-center text-xs text-primary-100 dark:text-primary-300 bg-primary-800 dark:bg-secondary-900 w-[22px] h-[22px]",children:r},e?.length)})]})};var R=e.i(973999),Q=e.i(417357),H=e.i(653145),_=function(e){return"object"==typeof e&&null!==e},B=function(e){var t=e.value,r=void 0===t?"":t,a=e.numInputs,s=void 0===a?4:a,l=e.onChange,n=e.onPaste,i=e.renderInput,o=e.shouldAutoFocus,c=void 0!==o&&o,u=e.inputType,h=void 0===u?"text":u,m=e.renderSeparator,p=e.placeholder,x=e.containerStyle,f=e.inputStyle,y=e.ski
1pDefaultStyles,g=void 0!==y&&y,b=d.default.useState(0),v=b[0],j=b[1],k=d.default.useRef([]),w=function(){return r?r.toString().split(""):[]},N="number"===h||"tel"===h;d.default.useEffect(function(){k.current=k.current.slice(0,s)},[s]),d.default.useEffect(function(){var e;c&&(null==(e=k.current[0])||e.focus())},[c]);var C=function(){if("string"==typeof p){if(p.length===s)return p;p.length>0&&console.error("Length of the placeholder should be equal to the number of inputs.")}},q=function(e){return(N?!isNaN(Number(e)):"string"==typeof e)&&1===e.trim().length},O=function(e){var t=e.target.value;q(t)&&(M(t),S(v+1))},A=function(e){var t=e.nativeEvent,r=e.target.value;q(r)||(r.length===s&&(r.split("").some(function(e){return!q(e)})||($(r.split("")),S(s-1))),null===t.data&&"deleteContentBackward"===t.inputType&&(e.preventDefault(),M(""),S(v-1)),e.target.value="")},P=function(){j(v-1)},I=function(e){var t=w();[e.code,e.key].includes("Backspace")?(e.preventDefault(),M(""),S(v-1)):"Delete"===e.code?(e.preventDefault(),M("")):"ArrowLeft"===e.code?(e.preventDefault(),S(v-1)):"ArrowRight"===e.code||e.key===t[v]?(e.preventDefault(),S(v+1)):("Spacebar"===e.code||"Space"===e.code||"ArrowUp"===e.code||"ArrowDown"===e.code)&&e.preventDefault()},S=function(e){var t,r,a=Math.max(Math.min(s-1,e),0);k.current[a]&&(null==(t=k.current[a])||t.focus(),null==(r=k.current[a])||r.select(),j(a))},M=function(e){var t=w();t[v]=e[0],$(t)},$=function(e){l(e.join(""))},T=function(e){e.preventDefault();var t,r=w(),a=v,l=e.clipboardData.getData("text/plain").slice(0,s-v).split("");if(!(N&&l.some(function(e){return isNaN(Number(e))}))){for(var n=0;n<s;++n)n>=v&&l.length>0&&(r[n]=null!=(t=l.shift())?t:"",a++);S(a),$(r)}};return d.default.createElement("div",{style:Object.assign({display:"flex",alignItems:"center"},_(x)&&x),className:"string"==typeof x?x:void 0,onPaste:n},Array.from({length:s},function(e,t){return t}).map(function(e){var t,r,a;return d.default.createElement(d.default.Fragment,{key:e},i({value:null!=(t=w()[e])?t:"",placeholder:null!=(a=null==(r=C())?void 0:r[e])?a:void 0,ref:function(t){return k.current[e]=t},onChange:O,onFocus:function(t){return function(e){j(e),t.target.select()}(e)},onBlur:P,onKeyDown:I,onPaste:T,autoComplete:"off","aria-label":"Please enter OTP character ".concat(e+1),style:Object.assign(g?{}:{width:"1em",textAlign:"center"},_(f)?f:{}),className:"string"==typeof f?f:void 0,type:h,inputMode:N?"numeric":"text",onInput:A},e),e<s-1&&("function"==typeof m?m(e):m))}))},U=e.i(195085),V=e.i(494388),G=e.i(39894),Y=e.i(618566),W=e.i(912598),Z=e.i(912069);let J=({onChangeForm:e,onClose:r})=>{let a=(0,Y.useSearchParams)().get("redirect"),s=(0,Y.useRouter)(),n=(0,W.useQueryClient)(),[i,o]=(0,d.useState)(!0),[c,u]=(0,d.useState)(1),[h,m]=(0,d.useState)(""),[p,x]=(0,d.useState)(!1),[f,y]=(0,d.useState)(!1),[b,j]=(0,d.useState)(null),{mutateAsync:w,isPending:N}=(0,v.useCheckUser)(),{mutateAsync:C,isPending:q,isSuccess:O}=(0,v.useGetOTP)(),{mutateAsync:A}=(0,v.useLoginService)(),{mutateAsync:P}=(0,v.useUpdateUserInfo)({userId:b?String(b):""}),{register:I,handleSubmit:S,formState:{errors:M},getValues:$,setValue:T}=(0,H.useForm)({mode:"onSubmit"}),{handleAuthSuccess:E}=(0,l.useAuth)(),F=(0,V.default)(),K=(0,g.useTranslations)("Auth.signUp"),L=async e=>{let t=i?{mobile_number:e.phoneNumber}:{email:e.email};if(1===c)return void D({email:e.email,mobile_number:e.phoneNumber});if(2===c)try{if(x(!0),!(await A({body:{...t,code:e.otp}})).ok)throw Error;if(f)return void u(3);await z()}catch(e){(0,U.showToast)({title:"کد Ù
عتبر ÙÙ
ÛâØ¨Ø§Ø´Ø¯",variant:"error"})}finally{x(!1)}if(3===c)try{if(x(!0),!b)throw Error("Missing userId for profile update");let t=$("phoneNumber")||$("email")||"";await P({first_name:e.first_name,last_name:e.last_name,username:e.username?.trim()||t}),await z()}catch(e){(0,U.showToast)({title:"خطا در Ø¨Ø±ÙØ²Ø±Ø³Ø§ÙÛ Ø§Ø·ÙØ§Ø¹Ø§Øª",variant:"error"})}finally{x(!1)}},D=async({mobile_number:e,email:t})=>{try{let r=i?{mobile_number:e}:{email:t},a=await w({body:r});"first_name"in a?(j(a.id),y(!a.first_name||!a.last_name),await C({body:r,userId:a.id}
1)):(j(a.user_id),y(!0)),u(2)}catch(e){(0,U.showToast)({title:"خطا در ارسا٠کد",variant:"error"})}},z=async()=>{(0,U.showToast)({title:"با Ù
ÙÙÙÛØª ÙØ§Ø±Ø¯ Ø´Ø¯ÛØ¯.",variant:"success",icon:(0,t.jsx)(k.CelebrationOutlinedIcon,{})}),a&&s.push(a),s.refresh(),await n.invalidateQueries({queryKey:["user"]}),E()},R=async()=>{await z()};return(0,d.useEffect)(()=>{T("otp",h)},[h,T]),(0,d.useEffect)(()=>{T("otp",h),4!==h.length||2!==c||p||S(L)()},[h]),(0,t.jsxs)("form",{onSubmit:S(L),className:"h-full w-full flex flex-col justify-between",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-y-6 lg:gap-y-2.5 flex-1",children:[(0,t.jsxs)("div",{className:"font-semibold text-2xl text-secondary-750 dark:text-secondary-50 flex items-center gap-x-2.5",children:[2===c&&(0,t.jsx)("button",{type:"button","aria-label":"go-back",onClick:()=>{u(1),m("")},children:(0,t.jsx)(k.EastRoundedIcon,{className:`w-[22px]! h-[22px]! ${"ltr"===F?"rotate-180":""}`})}),(0,t.jsx)("h3",{children:"ثبت ÙØ§Ù
/ ÙØ±Ùد در Ú©ÛÙÙ¾Ûکت"})]}),1===c?(0,t.jsx)(X,{isInCountry:i,toggleIsInCountry:()=>o(e=>!e),errors:M,register:I}):2===c?(0,t.jsx)(ee,{isInCountry:i,phoneNumber:$("phoneNumber"),email:$("email"),otp:h,setOtp:m,register:I,errors:M,handleResendOtp:D,isNewUser:!O}):(0,t.jsx)(et,{register:I,errors:M,setValue:T})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-y-2.5",children:[(0,t.jsx)("button",{type:"submit",disabled:p||q||N,"aria-label":1===c?"get-otp":2===c?i?"sign-up-with-phone":"sign-up-with-email":"complete-profile",className:"whitespace-nowrap w-full font-medium text-sm text-primary-100 dark:text-primary-150 lg:hover:text-primary-900 lg:dark:hover:text-secondary-50 bg-primary-800 dark:bg-secondary-950 lg:hover:bg-secondary-0 lg:dark:hover:bg-secondary-900 dark:border dark:border-secondary-950 lg:dark:hover:border-secondary-900 p-3 rounded-lg cursor-pointer transition-all duration-300",children:p||q||N?(0,t.jsx)(G.default,{size:12}):1===c?K("getOtpCodeBtn"):2===c?K(i?"submitOtpCodeWithPhoneNumber":"submitOtpCodeWithEmail"):"تکÙ
ÛÙ Ø§Ø·ÙØ§Ø¹Ø§Øª"}),3===c&&(0,t.jsx)(Z.Button,{type:"button",variants:{light:"gray",dark:"outline"},onClick:R,children:"بعدا پر Ù
ÛÚ©ÙÙ
"})]})]})},X=({isInCountry:e,toggleIsInCountry:r,errors:a,register:s})=>{let l=(0,g.useTranslations)("ValidationErrors"),n=(0,g.useTranslations)("InputPlaceholders"),i=(0,g.useTranslations)("Auth.signUp.firstStep");return(0,t.jsxs)(u.AnimatePresence,{mode:"wait",children:[e?(0,t.jsx)(h.motion.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},children:(0,t.jsx)(Q.default,{register:s,name:"phoneNumber",autoFocus:!0,placeholder:n("phoneNumber"),errors:a,validationSchema:{required:l("required"),pattern:{value:/^(?:\+98|0)?9\d{9}$/,message:l("phoneNumber")}}})},"phone"):(0,t.jsx)(h.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},children:(0,t.jsx)(Q.default,{register:s,name:"email",autoFocus:!0,placeholder:n("email"),errors:a,validationSchema:{required:l("required"),pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:l("email")}}})},"email"),(0,t.jsxs)(h.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},className:"flex items-center justify-center gap-x-1 text-sm mt-2 mb-3 lg:m-0",children:[(0,t.jsx)("span",{className:"font-medium text-secondary-750 dark:text-secondary-250",children:i("locationQuestion",{location:i(e?"outside":"inside")})}),(0,t.jsxs)("button",{type:"button","aria-label":"toggle-country",onClick:e=>{e.stopPropagation(),r()},className:"font-bold text-[#169CC9] dark:text-[#6FD2FF] flex items-start gap-x-1",children:[(0,t.jsx)("span",{children:i("signupWith",{method:i(e?"email":"phone")})}),e?(0,t.jsx)(k.MailOutlineIcon,{className:"w-4! h-4!"}):(0,t.jsx)(k.SmartphoneOutlinedIcon,{className:"w-4! h-4!"})]})]},"trigger")]})},ee=({isInCountry:e,phoneNumber:r,email:a,otp:s,setOtp:l,register:n,errors:i,handleResendOtp:o,isNewUser:m})=>{let x,{isDarkMode:f}=(0,p.useDarkMode)(),[y,b]=(0,d.useState)(90),v=(0,g.useTranslations)("Common"),j=(0,g.useTranslations)("ValidationErrors"),w=(0,g.useTranslations)("Auth.signUp.secondStep");return(0,d.useEffect)(()=>{let e=y>0&&setInterval(()=>b(e=>e-1),1e3);return()=>{e&&clearInterval(e)}},[y]),(0,t.jsx)(u.AnimatePresence,{mode:"wait",children:(0,t.jsxs)(h.motion.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},className:"flex flex-col gap-y-2.5 flex-1",children:[(0,t.jsx)("span",{className:"font-medium text-base text-secondary-450",children:w.rich("enterCode",{destination:e?r:w("yourEmail"),highlight:r=>(0,t.jsx)("span",{className:`${e?"text-secondary-750 dark:text-secondary-50":""}`,children:r})})}),(0,t.jsxs)("div",{dir:"ltr",className:"mt-2.5",children:[(0,t.jsx)(B,{shouldAutoFocus:!0,value:s,onChange:l,numInputs:4,containerStyle:"w-full flex items-center gap-6",renderInput:e=>{let r=e.value&&""!==e.value.trim();return(0,t.jsx)("input",{...e,type:"number",className:`aspect-square w-full! h-1/3 lg:h-20 border rounded-lg font-semibold text-[28px] text-secondary-750 dark:text-secondary-50 focus:outline-0! transition-all duration-300 ${r?"border-primary-650 dark:border-primary-400":"border-secondary-100 dark:border-secondary-750 focus:border-primary-650 dark:focus:border-primary-400"}`})}}),(0,t.jsx)("input",{type:"hidden",...n("otp",{required:j("required"),validate:e=>4===e.length||j("required")})}),i.otp&&(0,t.jsxs)("span",{dir:"rtl",className:"text-[#BA1A1A] dark:text-[#FFDAD6] text-xs font-medium mt-2 flex items-start gap-x-1",children:[(0,t.jsx)(c.default,{src:f?"/images/pink-asterisk.svg":"/images/red-asterisk.svg",alt:"asterisk",width:18,height:18}),String(i.otp?.message)]})]}),(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row items-start lg:items-center justify-between gap-y-2.5",children:[y>0&&(0,t.jsx)("div",{className:"px-2.5 py-1.5 bg-secondary-0 dark:bg-secondary-900 rounded-full",children:(0,t.jsx)("span",{className:"font-medium text-base text-secondary-750 dark:text-secondary-50",children:(x=Math.floor(y/60),`${String(x).padStart(2,"0")}:${String(y%60).padStart(2,"0")}`)})}),(0,t.jsxs)("div",{className:"flex items-center gap-x-1 font-medium text-sm",children:[(0,t.jsx)("span",{className:"text-secondary-450 dark:text-secondary-250",children:w("resendText")}),(0,t.jsx)("button",{"aria-label":"resend-otp",type:"button",onClick:()=>{y<=0&&(b(90),o({mobile_number:r,email:a}))},className:"text-secondary-750 dark:text-secondary-50",children:w("resendBtn")})]})]}),m&&(0,t.jsxs)("div",{className:"mb-2 flex flex-col gap-y-0.5",children:[(0,t.jsxs)("label",{className:"flex items-end gap-2.5 cursor-pointer mt-7 flex-1",children:[(0,t.jsx)("input",{id:"hr",type:"checkbox",className:"peer hidden",...n("policiesAgreement",{required:j("required")})}),(0,t.jsx)("div",{className:"h-[18px] w-[18px] flex items-center justify-center rounded-xs border border-secondary-100 dark:border-secondary-750 lg:hover:border-secondary-750 lg:dark:hover:border-secondary-50 peer-checked:hover:border-secondary-0 peer-checked:border-secondary-0 dark:peer-checked:border-secondary-800! peer-checked:bg-secondary-0 dark:peer-checked:bg-secondary-800 transition-all duration-300 [&>svg]:opacity-0 peer-checked:[&>svg]:opacity-100",children:(0,t.jsx)(k.CheckRoundedIcon,{className:"w-4! h-4! mr-px text-secondary-750 dark:text-secondary-50 transition-all"})}),(0,t.jsx)("span",{className:"font-semibold text-sm text-secondary-450 dark:text-secondary-250 select-none",children:v.rich("privacyAgreement",{highlight:e=>(0,t.jsx)(S.default,{href:"/privacy-policy",className:"font-bold underline text-secondary-750 dark:text-secondary-50",children:e})})})]}),i.policiesAgreement&&(0,t.jsxs)("span",{dir:"rtl",className:"text-[#BA1A1A] dark:text-[#FFDAD6] text-xs font-medium mt-2 flex items-start gap-x-1",children:[(0,t.jsx)(c.default,{src:f?"/images/pink-asterisk.svg":"/images/red-asterisk.svg",alt:"asterisk",width:18,height:18}),String(i.policiesAgreement?.message)]})]})]},"otp")})},et=({register:e,errors:r,setValue:a})=>{let s=(0,g.useTranslations)("ValidationErrors"),{data:l,isSuccess:n}=(0,v.useGetUser)();return(0,d.useEffect)(()=>{n&&l&&(l.first_name&&a("first_name",l.first_name),l.last_name&&a("last_name",l.last_name),l.username&&a("username",l.username))},[n,l,a]),(0,t.jsxs)("div",{className:"flex flex-col gap-y-2.5 flex-1",children:[(0,t.jsx)("p",{className:"font-medium text-sm text-secondary-450 dark:text-secondary-250 mb-1",children:"Ø¨Ø±Ø§Û ØªÚ©Ù
Û٠ثبتâÙØ§Ù
Ø Ø§Ø·ÙØ§Ø¹Ø§Øª Ø²ÛØ± را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯ ÛØ§ اÛÙ Ù
رØÙ٠را رد Ú©ÙÛØ¯."}),(0,t.jsx)(Q.default,{register:e,name:"first_name",autoFocus:!0,placeholder:"ÙØ§Ù
",errors:r,validationSchema:{required:s("required")},className:"py-3!"}),(0,t.jsx)(Q.default,{register:e,name:"last_name",placeholder:"ÙØ§Ù
خاÙÙØ¯Ø§Ú¯Û",errors:r,className:"py-3!"}),(0,t.jsx)(Q.default,{register:e,name:"username",placeholder:"ÙØ§Ù
کاربرÛ",errors:r,className:"py-3!",validationSchema:{validate:e=>!e?.trim()||(e.length<3?"ÙØ§Ù
Ú©Ø§Ø±Ø¨Ø±Û Ø¨Ø§ÛØ¯ ØØ¯Ø§ÙÙ Û³ کاراکتر باشد":e.length>30?"ÙØ§Ù
Ú©Ø§Ø±Ø¨Ø±Û ÙÙ
ÛâØªÙØ§Ùد Ø¨ÛØ´ØªØ± از Û³Û° کاراکتر باشد":!!/^[a-zA-Z0-9_]+$/.test(e)||"ÙØ§Ù
Ú©Ø§Ø±Ø¨Ø±Û ÙÙØ· Ù
ÛâØªÙØ§Ùد شاÙ
Ù ØØ±Ù٠اÙÚ¯ÙÛØ³ÛØ Ø§Ø¹Ø¯Ø§Ø¯ Ù _ باشد")}})]})},er=({onChangeForm:e,onClose:r})=>{let{register:a,handleSubmit:s,formState:{errors:l}}=(0,H.useForm)(),n=(0,g.useTranslations)("ValidationErrors"),i=(0,g.useTranslations)("InputPlaceholders"),o=(0,g.useTranslations)("Auth.signIn");return(0,t.jsxs)("form",{onSubmit:s(()=>{r(),(0,U.showToast)({title:o("toastMessage",{name:"Ù
ÙØ³Ø§ اØÙ
دÛ"}),variant:"success",icon:(0,t.jsx)(k.Face3OutlinedIcon,{})})}),className:"flex flex-col justify-between",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-y-2.5 flex-1 relative ",children:[(0,t.jsx)("h3",{className:"font-semibold text-2xl text-secondary-750 dark:text-secondary-50",children:o("heading")}),(0,t.jsx)("p",{className:"font-medium text-base text-secondary-450 dark:text-secondary-250",children:o("description")}),(0,t.jsx)(Q.default,{register:a,name:"email",placeholder:i("email"),errors:l,validationSchema:{required:n("required"),pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:n("email")}}}),(0,t.jsx)(Q.default,{register:a,name:"password",type:"password",placeholder:i("password"),errors:l,validationSchema:{required:n("required")}}),(0,t.jsxs)("label",{className:"flex items-end gap-2.5 cursor-pointer mt-7 mb-2 flex-1",children:[(0,t.jsx)("input",{id:"hr",type:"checkbox",className:"peer hidden",...a("rememberMe")}),(0,t.jsx)("div",{className:"h-[18px] w-[18px] flex items-center justify-center rounded-xs border border-secondary-100 dark:border-secondary-550 lg:hover:border-secondary-750 lg:dark:hover:border-secondary-50 peer-checked:hover:border-secondary-0 peer-checked:border-secondary-0 dark:peer-checked:border-secondary-800! peer-checked:bg-secondary-0 dark:peer-checked:bg-secondary-800 transition-all duration-300 [&>svg]:opacity-0 peer-checked:[&>svg]:opacity-100",children:(0,t.jsx)(k.CheckRoundedIcon,{className:"w-4! h-4! mr-px text-secondary-750 dark:text-secondary-50 transition-all"})}),(0,t.jsx)("span",{className:"font-semibold text-sm text-secondary-450 dark:text-secondary-250 select-none",children:o("rememberMe")})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-y-2.5",children:[(0,t.jsx)("button",{"aria-label":"login-with-email",type:"submit",className:"whitespace-nowrap w-full font-medium text-sm text-primary-100 dark:text-primary-150 lg:hover:text-primary-900 lg:dark:hover:text-secondary-50 bg-primary-800 dark:bg-secondary-950 lg:hover:bg-secondary-0 lg:dark:hover:bg-secondary-900 dark:border dark:border-secondary-950 lg:dark:hover:border-secondary-900 p-3 rounded-lg cursor-pointer transition-all duration-300",children:o("submitBtn")}),(0,t.jsxs)("div",{className:"flex items-center justify-center",children:[(0,t.jsx)("span",{className:"block h-px w-full bg-linear-to-r from-transparent via-secondary-50 dark:via-secondary-750 to-transparent transition-all"}),(0,t.jsx)("span",{className:"font-medium text-base text-secondary-450",children:o("or")}),(0,t.jsx)("span",{className:"block h-px w-full bg-linear-to-r from-transparent via-secondary-50 dark:via-secondary-750 to-transparent transition-all"})]}),(0,t.jsxs)("button",{"aria-label":"login-with-google",type:"button",className:"flex items-center justify-center gap-x-2.5 w-full py-2.5 rounded-lg bg-transparent lg:hover:bg-[#f8f9fa] lg:dark:hover:bg-secondary-950 border border-secondary-50 dark:border-secondary-750 lg:hover:border-secondary-750 lg:dark:hover:border-secondary-950 transition-all duration-300 group",children:[(0,t.jsx)(c.default,{src:"/images/google.svg",alt:"google",width:20,height:20}),(0,t.jsx)("span",{className:"font-semibold text-sm text-secondary-400 dark:text-secondary-550 lg:group-hover:text-secondary-750 dark:lg:group-hover:text-secondary-50 transition-all duration-300",children:o("sign
1InWithGoogleBtn")})]}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-x-1 text-[#169CC9] dark:text-[#6FD2FF] text-sm mt-5",children:[(0,t.jsx)(k.LoginIcon,{className:"w-5! h-5!"}),(0,t.jsx)("span",{className:"font-medium text-secondary-750 dark:text-secondary-450",children:o("newMemberText")}),(0,t.jsx)("button",{type:"button","aria-label":"sign-up",onClick:e,className:"font-bold",children:o("newMemberBtn")})]})]})]})};var ea=e.i(870888);let es=()=>{let[e,r]=(0,d.useState)("sign-up"),a=(0,V.default)(),{isAuthOpen:s,handleCloseAuth:n}=(0,l.useAuth)(),i=(0,g.useTranslations)("Auth");return(0,t.jsxs)(R.default,{onClose:n,isOpen:s,containerStyles:"w-full lg:min-w-[940px] flex items-center justify-center lg:rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"w-full lg:w-1/2 h-full bg-background flex flex-col p-[30px] relative",children:["sign-up"===e?(0,t.jsx)(J,{onChangeForm:()=>r("sign-in"),onClose:n}):(0,t.jsx)(er,{onChangeForm:()=>r("sign-up"),onClose:n}),(0,t.jsx)(ea.default,{onClose:n,className:`lg:hidden absolute top-7 ${"ltr"===a?"right-5":"left-5"} bg-secondary-0/20 text-secondary-50 w-9 h-9`})]}),(0,t.jsxs)("div",{className:"hidden lg:flex flex-col items-center justify-end w-1/2 h-full relative",children:[(0,t.jsx)("video",{autoPlay:!0,muted:!0,loop:!0,playsInline:!0,preload:"auto",className:"absolute top-0 left-0 w-full h-full object-cover -z-1",children:(0,t.jsx)("source",{src:"/videos/login-background.webm",type:"video/webm"})}),(0,t.jsx)(ea.default,{onClose:n,className:`absolute top-5 ${"ltr"===a?"right-5":"left-5"} bg-secondary-0/20 text-secondary-50 w-9 h-9`}),(0,t.jsxs)("div",{className:"font-bold flex flex-col items-center text-center relative top-[92px]",children:[(0,t.jsx)("span",{className:"text-[32px] text-white",children:i("titlePartOne")}),(0,t.jsx)("span",{className:"text-[52px] bg-linear-to-t from-white from-40% to-transparent to-90% text-transparent bg-clip-text",children:i("titlePartTwo")})]}),(0,t.jsx)(c.default,{src:"/images/login-earth.webp",alt:"earth",width:400,height:400,className:"relative top-16 filter drop-shadow-[3px_-10px_50px_rgba(42,118,213,0.8)]",priority:!0,fetchPriority:"high"})]})]})};var el=e.i(870014),en=e.i(900220),ei=e.i(785307),eo=e.i(861745),ed=e.i(940513),ec=e.i(225121),eu=e.i(215827),eh=e.i(355897),em=e.i(275384);let ep=()=>{let{isInquiryBasketOpen:e,closeInquiryBasket:r}=(0,E.useHeaderUI)(),a=(0,m.default)(r,"mousedown"),{itemCount:s,removeAllFromInquiryList:n,inquiryList:i}=(0,L.useInquiryBasket)(),c=(0,V.default)(),p=(0,g.useTranslations)("Layout.inquirySheet"),x=(0,el.useAnimation)(),f=(0,o.useRouter)(),{checkCategories:y}=(0,eu.useCategoriesCheck)(),{handleOpenAuth:b,addRedirect:w,handleOpenAuthWithAction:N}=(0,l.useAuth)(),{data:C}=(0,v.useGetUser)(),[q,O]=(0,d.useState)(!!C),{handleGenerateTechnicalOffer:A}=(0,eh.useTechnicalOfferGeneration)(i||[],()=>{x.start({opacity:[.3,.25,1,.25,1],transition:{duration:.8,ease:"easeInOut"}})});return(0,d.useEffect)(()=>{e?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[e]),(0,t.jsx)(u.AnimatePresence,{children:e&&(0,t.jsx)(h.motion.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.6,ease:"easeInOut"},className:"fixed inset-0 w-full h-full bg-black/50 z-100",children:(0,t.jsx)(h.motion.div,{initial:{x:"ltr"===c?"100%":"-100%"},animate:{x:0},exit:{x:"ltr"===c?"100%":"-100%"},transition:{duration:.6,ease:"easeInOut"},ref:a,className:"fixed end-0 top-0 w-full lg:max-w-[470px] h-full bg-white dark:bg-secondary-850",children:(0,t.jsxs)("div",{className:"flex flex-col gap-y-6 h-full relative p-6 lg:p-8",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h3",{className:"font-semibold text-2xl text-secondary-750 dark:text-secondary-50",children:p("heading")}),(0,t.jsx)(ea.default,{onClose:r,className:"bg-secondary-750/10 dark:bg-secondary-50/20 rounded-full p-1.5"})]}),s>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between text-sm text-secondary-750 dark:text-secondary-250 font-medium z-10 relative",children:[(0,t.jsx)("p",{className:"flex gap-x-1.5",children:p.rich("resultMessage",{value:s,count:e=>(0,t.jsx)("span",{className:"font-bold dark:text-secondary-50",children:e})})}),(0,t.jsx)("button",{onClick:()=>n(),"aria-label":"remove-all-from-inquiry-list",children:p("removeAllBtn")})]}),(0,t.jsx)("div",{className:`flex flex-col relative overflow-y-auto no-scrollbar pt-6 ${q?" pb-[170px]":" pb-[270px]"}`,children:i?.map(e=>(0,t.jsx)(ex,{item:e,closeInquiryBasket:r},e.product.id))}),(0,t.jsx)("span",{className:"absolute top-[128px] lg:top-[136px] left-0 w-full h-6 bg-linear-to-b from-white dark:from-secondary-850 to-transparent"}),(0,t.jsx)("span",{className:"absolute bottom-[150px] left-0 w-full h-12 bg-linear-to-t from-white dark:from-secondary-850 to-transparent"}),(0,t.jsxs)("div",{className:"absolute bottom-0 left-0 w-full p-6 bg-secondary-50/90 dark:bg-secondary-900/80 backdrop-blur-md grid grid-cols-2 gap-2.5",children:[!C&&!q&&(0,t.jsxs)(h.motion.div,{animate:x,onClick:()=>N(A),className:"relative col-span-full flex flex-col gap-y-2.5 opacity-30 bg-[#E6F4FF] dark:bg-[#111A2C] border border-[#91CAFF] dark:border-[#153450] rounded-lg p-4 text-start cursor-pointer transition-all lg:hover:bg-[#D6EAFF] lg:dark:hover:bg-[#16233A] active:scale-[0.98]","aria-label":"login-required-for-technical-offer",children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),e.preventDefault(),O(!0)},"aria-label":"dismiss-login-required-box",className:"absolute top-2 end-2 p-1 rounded-full text-[#1677FF]/70 dark:text-[#69B1FF]/70 lg:hover:text-[#1677FF] lg:dark:hover:text-[#69B1FF] lg:hover:bg-white/40 dark:lg:hover:bg-white/10 transition-all",children:(0,t.jsx)(j.Icon,{iconPath:(0,t.jsx)("path",{fill:"currentColor",d:"M6.4 19L5 17.6l5.6-5.6L5 6.4L6.4 5l5.6 5.6L17.6 5L19 6.4L13.4 12l5.6 5.6l-1.4 1.4l-5.6-5.6z"}),className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"flex items-center gap-x-3",children:[(0,t.jsx)(j.Icon,{iconPath:(0,t.jsx)("path",{fill:"currentColor",d:"M11 7h2v2h-2zm0 4h2v6h-2zm.99-9C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8"}),className:"w-6 h-6 shrink-0 text-[#1677FF] dark:text-[#69B1FF]"}),(0,t.jsxs)("div",{className:"flex flex-col gap-y-0.5 flex-1",children:[(0,t.jsx)("p",{className:"font-bold text-sm text-[#003A8C] dark:text-[#69B1FF]",children:p("loginRequired.heading")}),(0,t.jsx)("p",{className:"font-medium text-xs text-[#0958D9] dark:text-[#91CAFF]",children:p("loginRequired.description")})]})]}),(0,t.jsxs)("span",{className:"flex items-center justify-end gap-x-1 shrink-0 font-semibold text-xs text-[#1677FF] dark:text-[#69B1FF]",children:[p("loginRequired.action"),(0,t.jsx)(j.Icon,{iconPath:(0,t.jsx)("path",{fill:"currentColor",d:"ltr"===c?"M8.59 16.59L13.17 12L8.59 7.41L10 6l6 6l-6 6z":"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6l6 6z"}),className:"w-4 h-4"})]})]}),(0,t.jsxs)(S.default,{href:"/inquiry?step=1",onClick:r,className:"flex items-center justify-center gap-x-1.5 col-span-2 bg-white dark:bg-secondary-750 rounded-lg py-3 text-secondary-750 dark:text-secondary-450 group",children:[(0,t.jsx)(j.Icon,{iconPath:(0,t.jsx)("path",{fill:"currentColor",d:"M6 22q-1.25 0-2.125-.875T3 19v-3h3V2h15v17q0 1.25-.875 2.125T18 22zm12-2q.425 0 .713-.288T19 19V4H8v12h9v3q0 .425.288.713T18 20M9 9V7h9v2zm0 3v-2h9v2zm-3 8h9v-2H5v1q0 .425.288.713T6 20m0 0H5h10z"})}),(0,t.jsx)("span",{className:"font-medium text-[15px] dark:text-secondary-50 lg:group-hover:text-primary-600 dark:lg:group-hover:text-primary-400 transition-all duration-300",children:p("inquiryPageLink")})]}),(0,t.jsx)("button",{onClick:()=>
1{if(!C)return w("/inquiry?step=2"),b();y(()=>{r(),f.push("/inquiry?step=2"),console.log("proceed")})},className:"whitespace-nowrap w-full font-medium text-center text-sm text-primary-100 dark:text-primary-150 lg:hover:text-primary-900 lg:dark:hover:text-secondary-50 bg-primary-800 dark:bg-secondary-950 lg:hover:bg-secondary-0 lg:dark:hover:bg-secondary-900 dark:border dark:border-secondary-950 lg:dark:hover:border-secondary-900 p-3 rounded-lg cursor-pointer transition-all",children:p(C?"submitInquiryPageLink":"loginAndSubmitInquiryPageLink")}),(0,t.jsx)("button",{onClick:A,className:"whitespace-nowrap w-full font-medium text-sm text-primary-850 dark:text-secondary-50 lg:hover:text-primary-100 lg:dark:hover:text-primary-250 bg-secondary-0 dark:bg-transparent lg:hover:bg-primary-800 lg:dark:hover:bg-secondary-900 border border-secondary-750 lg:dark:hover:border-secondary-900 p-2.5 rounded-lg cursor-pointer transition-all","aria-label":"get-technical-offer",children:p("technicalOfferBtn")})]})]}):(0,t.jsxs)(ei.default,{icon:(0,t.jsx)(k.ProductionQuantityLimitsOutlinedIcon,{className:"w-full! h-full! text-[#540003] dark:text-[#FF897D]"}),children:[(0,t.jsx)("p",{className:"font-bold text-base text-secondary-750 dark:text-secondary-50",children:p("emptyState.heading")}),(0,t.jsx)("p",{className:"font-medium text-sm text-secondary-450 dark:text-secondary-250",children:p.rich("emptyState.description",{strong:e=>(0,t.jsx)("strong",{className:"text-secondary-750 dark:text-secondary-50",children:e})})})]})]})})})})},ex=({closeInquiryBasket:e,item:r})=>{let{addToInquiryList:a,removeFromInquiryList:s,setInquiryItemQuantity:l}=(0,L.useInquiryBasket)(),[n,i]=(0,d.useState)(!1),o=(0,d.useRef)(null),[u,h]=(0,d.useState)(String(r.quantity)),m=(0,V.default)(),p=(0,eo.useLocale)();return(0,d.useEffect)(()=>{h(String(r.quantity))},[r.quantity]),(0,t.jsxs)(S.default,{href:`/products/${r.product.public_id}/${r.product.slugs.en}`,prefetch:!1,onClick:e,onMouseEnter:()=>i(!0),onMouseLeave:()=>{i(!1),o.current?.resetPosition()},className:"flex items-center gap-5 group cursor-pointer py-5 first:pt-0 last:pb-0 border-b last:border-b-0 border-secondary-50 dark:border-secondary-750",children:[(0,t.jsx)(c.default,{src:r.product.image,alt:r.product.image_alt||"",width:80,height:80,className:"object-cover bg-transparent dark:bg-secondary-750 rounded-lg border border-secondary-50 dark:border-secondary-750 lg:group-hover:border-primary-600 dark:lg:group-hover:border-primary-400 p-1 transition-all duration-300",fallbackComponent:(0,t.jsx)(ec.default,{width:80,height:80,className:"w-20 h-20 object-contain bg-transparent dark:bg-secondary-750 rounded-lg border border-secondary-50 dark:border-secondary-750 lg:group-hover:border-primary-600 dark:lg:group-hover:border-primary-400 p-1 transition-all duration-300"})}),(0,t.jsxs)("div",{className:"overflow-hidden flex flex-col gap-y-2 items-end relative",children:[(0,t.jsx)(en.default,{ref:o,baseVelocity:n?"ltr"===m?70:-70:0,className:"hidden lg:block font-semibold text-base text-secondary-750 dark:text-secondary-250 lg:group-hover:text-primary-600 dark:lg:group-hover:text-primary-400 leading-6",children:(0,ed.getLocalizedValue)(r.product.names,p)}),(0,t.jsx)(en.default,{ref:o,baseVelocity:"ltr"===m?40:-40,className:"lg:hidden font-semibold text-base text-secondary-750 dark:text-secondary-250 lg:group-hover:text-primary-600 dark:lg:group-hover:text-primary-400 leading-6",children:(0,ed.getLocalizedValue)(r.product.names,p)}),(0,t.jsx)(em.default,{quantity:r.quantity,onIncrement:()=>a(r),onDecrement:()=>s(r),onChangeQuantity:e=>l(r,e),decrementIcon:e=>e>1?(0,t.jsx)(k.RemoveIcon,{}):(0,t.jsx)(k.DeleteOutlineOutlinedIcon,{})}),(0,t.jsx)("span",{className:"absolute top-0 left-0 w-1/3 h-10 bg-linear-to-r from-white dark:from-secondary-850 to-transparent"})]})]})};var ef=e.i(845282),ey=e.i(609470),eg=e.i(84013);function eb(){let[e,r]=(0,d.useState)(!1),a=(0,m.default)(()=>r(!1)),{selectedLanguage:s,supportedLanguages:l,isLoading:n,changeLanguage:i}=function(){let e=(0,eo.useLocale)(),t=(0,Y.useRouter)(),r=(0,Y.usePathname)(),{data:a,isLoading:s}=(0,eg.useGetLanguages)(),[l,n]=(0,d.useState)(null);return(0,d.useEffect)(()=>{let t=a?.find(t=>t.locate===e);t&&n(t)},[e,a]),{selectedLanguage:l,supportedLanguages:a,isLoading:s,changeLanguage:e=>{n(e);let s=a?.map(e=>e.locate)??["fa","en","ar"],l=RegExp(`^/(${s.join("|")})(?=/|$)`),i=r.replace(l,"")||"/",o="fa"===e.locate?i:`/${e.locate}${"/"===i?"":i}`;t.push(o)}}}();return!n&&l?.length&&s?(0,t.jsxs)("div",{ref:a,className:"w-full border border-secondary-150 rounded-lg",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),"aria-expanded":e,className:"w-full flex items-center gap-x-2.5 p-2.5",children:[(0,t.jsx)(c.default,{src:s.flag,alt:s.name,width:20,height:20}),(0,t.jsx)("span",{className:"flex-1 text-sm text-start",children:s.name}),(0,t.jsx)(k.ExpandMoreIcon,{className:`transition-all! duration-300 ${e?"rotate-180":""}`})]}),(0,t.jsx)(u.AnimatePresence,{children:e&&(0,t.jsx)(h.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.5,ease:"easeInOut"},children:(0,t.jsx)(h.motion.ul,{initial:{opacity:0}
1,animate:{opacity:1,transition:{delay:.3}},exit:{opacity:0},children:l.filter(e=>e.id!==s.id).map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",onClick:()=>{"en"!==e.locate&&(i(e),r(!1))},disabled:"en"===e.locate,className:"w-full flex items-center gap-x-2.5 p-2.5 disabled:opacity-50",children:[(0,t.jsx)(c.default,{src:e.flag,alt:e.name,width:20,height:20,className:"rounded-full"}),(0,t.jsx)("span",{className:"text-sm",children:e.name})]})},e.id))})})})]}):(0,t.jsx)(b.default,{className:"h-12 flex-1"})}let ev=()=>(0,t.jsx)("span",{className:"inline-block w-1 h-1 rounded-full bg-primary-600 dark:bg-primary-400 mb-0.5 shrink-0"}),ej="text-primary-650 dark:text-primary-450 font-semibold";function ek({category:e,onClose:r,depth:a=0,parentPath:s}){let l=(0,eo.useLocale)(),n=(0,o.usePathname)(),i=(0,d.useRef)(null),c=(0,ed.getLocalizedValue)(e.names??e.name,l),m=e.slugs?.en??e.slug?.en,p=s?`${s}/${m}`:m,x=`/product-category/${p}`,f=!!e.children?.length,y=n===x,g=f&&n.includes(`/${p}`),[b,v]=(0,d.useState)(()=>g);(0,d.useEffect)(()=>{if(!y)return;let e=setTimeout(()=>{i.current?.scrollIntoView({block:"nearest",behavior:"smooth"})},350);return()=>clearTimeout(e)},[y]);let j=a>0?{paddingInlineStart:14*a}:void 0;return f?(0,t.jsxs)("li",{ref:i,children:[(0,t.jsxs)("div",{className:"flex items-center py-2 min-w-0",style:j,children:[(0,t.jsxs)(S.default,{href:x,onClick:()=>{r(),v(!0)},className:`flex items-center flex-1 min-w-0 ${y?ej:""}`,children:[(0,t.jsx)(ev,{}),(0,t.jsx)("span",{className:"mx-2 truncate",children:c})]}),(0,t.jsx)("button",{type:"button",onClick:()=>v(e=>!e),"aria-expanded":b,"aria-label":c,className:"shrink-0 p-1 -m-1",children:(0,t.jsx)(k.ExpandMoreIcon,{className:`transition-all! duration-300 ${b?"rotate-180":""}`})})]}),(0,t.jsx)(u.AnimatePresence,{children:b&&(0,t.jsx)(h.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.3,ease:"easeInOut"},className:"overflow-hidden",children:(0,t.jsx)("ul",{children:e.children.map(e=>(0,t.jsx)(ek,{category:e,onClose:r,depth:a+1,parentPath:p},e.id))})})})]}):(0,t.jsx)("li",{ref:i,children:(0,t.jsxs)(S.default,{href:x,onClick:r,className:`flex items-center py-2 min-w-0 ${y?ej:""}`,style:j,children:[(0,t.jsx)(ev,{}),(0,t.jsx)("span",{className:"mx-2 truncate",children:c})]})})}let ew="text-primary-650 dark:text-primary-450 font-semibold";function eN({item:e,onClose:r}){var a;let s=(0,g.useTranslations)("BurgerMenu.userPanel"),l=(0,o.usePathname)(),n=(0,Y.useSearchParams)(),i=(0,d.useRef)(null),c=(a=e.children,a.some(e=>"link"===e.type?l===e.href:eA(e,l,n))),m=l===e.href,p=c||m,[x,f]=(0,d.useState)(()=>p),[y,b]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{if(!m)return;let e=setTimeout(()=>{i.current?.scrollIntoView({block:"nearest",behavior:"smooth"})},500);return()=>clearTimeout(e)},[m]),(0,t.jsxs)("li",{ref:i,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(S.default,{href:e.href,onClick:r,className:`flex items-center py-2 mx-2 ${p?ew:""}`,children:[(0,t.jsx)("span",{className:"inline-block w-1 h-1 rounded-full bg-primary-600 dark:bg-primary-400 mb-0.5 me-2"}),s(e.labelKey)]}),(0,t.jsx)("button",{type:"button","aria-expanded":x,onClick:()=>f(e=>!e),className:"p-1.5",children:(0,t.jsx)(k.ExpandMoreIcon,{className:`transition-all! duration-300 ${x?"rotate-180":""}`})})]}),(0,t.jsx)(u.AnimatePresence,{children:x&&(0,t.jsx)(h.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.4,ease:"easeInOut"},onAnimationStart:()=>b(!0),onAnimationComplete:()=>b(!1),className:`overflow-x-hidden ${y?"overflow-y-hidden":"overflow-y-auto"}`,children:(0,t.jsx)("ul",{className:"ps-4",children:e.children.map((e,a)=>(0,t.jsx)(eO,{item:e,dropdownType:"userPanel",onClose:r},a))})})})]})}let eC=()=>(0,t.jsx)("span",{className:"inline-block w-1 h-1 rounded-full bg-primary-600 dark:bg-primary-400 mb-0.5"});function eq(e,t){(0,d.useEffect)(()=>{if(!t)return;let r=setTimeout(()=>{e.current?.scrollIntoView({block:"nearest",behavior:"smooth"})},500);return()=>clearTimeout(r)},[t,e])}function eO({item:e,dropdownType:r,onClose:a,onOpenLogout:s}
1){let l=(0,g.useTranslations)(`BurgerMenu.${r}`);switch(e.type){case"category":return(0,t.jsx)(ek,{category:e.category,onClose:a});case"link":return(0,t.jsx)(eP,{item:e,t:l,onClose:a});case"logout":return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",className:"py-2 flex items-center text-red-700 dark:text-red-400",onClick:s,children:[(0,t.jsx)(eC,{}),(0,t.jsx)("span",{className:"mx-2",children:l(e.labelKey)})]})});case"filter":return(0,t.jsx)(eI,{item:e,onClose:a});case"dropdown":return(0,t.jsx)(eN,{item:e,onClose:a})}}function eA(e,t,r){return"companies"===e.target?t===`/dashboard/companies${e.value}`:"/dashboard/inquiries"===t&&r.get("filter")===e.value}function eP({item:e,t:r,onClose:a}){let s=(0,o.usePathname)(),l=(0,d.useRef)(null),n=s===e.href;return eq(l,n),(0,t.jsx)("li",{ref:l,children:(0,t.jsxs)(S.default,{href:e.href,onClick:a,className:`block py-2 ${n?ew:""}`,children:[(0,t.jsx)(eC,{}),(0,t.jsx)("span",{className:"mx-2",children:r(e.labelKey)})]})})}function eI({item:e,onClose:r}){let a=(0,g.useTranslations)(`BurgerMenu.${e.target}`),s=(0,o.usePathname)(),l=(0,Y.useSearchParams)(),n=(0,d.useRef)(null),i="inquiries"===e.target?`${s}?filter=${e.value}`:`/dashboard/companies${e.value}`,c=eA(e,s,l);return eq(n,c),(0,t.jsx)("li",{ref:n,children:(0,t.jsx)(S.default,{href:i,onClick:r,className:`block py-2 ${c?ew:""}`,children:a(e.labelKey)})})}function eS({title:e,isOpen:r,onToggle:a,items:s,dropdownType:l,onClose:n,onOpenLogout:i,icon:o}){let[c,m]=(0,d.useState)(!1);return(0,t.jsxs)("div",{className:"border border-secondary-150 dark:border-secondary-350 rounded-lg p-2.5",children:[(0,t.jsxs)("button",{type:"button",onClick:a,"aria-expanded":r,className:`w-full flex items-center gap-x-2.5 text-secondary-900 dark:text-secondary-50 transition-all ${r?"pb-4":""}`,children:[o,(0,t.jsx)("span",{className:"flex-1 font-medium text-base text-start",children:e}),(0,t.jsx)(k.ExpandMoreIcon,{className:`transition-all! duration-300 ${r?"rotate-180":""}`})]}),(0,t.jsx)(u.AnimatePresence,{children:r&&(0,t.jsx)(h.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.5,ease:"easeInOut"},onAnimationStart:()=>m(!0),onAnimationComplete:()=>m(!1),className:`mr-2 max-h-[155px] vertical-scrollbar overflow-x-hidden ${c?"overflow-y-hidden":"overflow-y-auto"}`,children:(0,t.jsx)(h.motion.ul,{initial:{opacity:0}
1,animate:{opacity:1,transition:{delay:.3}},exit:{opacity:0},className:"text-secondary-900 dark:text-secondary-50",children:s.map((e,r)=>(0,t.jsx)(eO,{item:e,dropdownType:l,onClose:n,onOpenLogout:i},"category"===e.type?e.category.id:r))})})})]})}let eM=[{type:"link",labelKey:"home",href:"/"},{type:"link",labelKey:"aboutUs",href:"/about-us"},{type:"link",labelKey:"blogs",href:"/blogs"},{type:"link",labelKey:"directRequest",href:"/direct-request"},{type:"link",labelKey:"faq",href:"/faq"},{type:"link",labelKey:"brands",href:"/brands"},{type:"link",labelKey:"compare",href:"/compare"},{type:"link",labelKey:"contactUs",href:"/contact-us"}],e$=()=>{let{closeBurgerMenu:e,openLogoutModal:r,openInquiryBasket:a,isBurgerMenuOpen:s}=(0,E.useHeaderUI)(),n=(0,o.usePathname)(),i=(0,m.default)(e),x=(0,V.default)(),{isDarkMode:f}=(0,p.useDarkMode)(),{handleOpenAuth:j}=(0,l.useAuth)(),{itemCount:w}=(0,L.useInquiryBasket)(),{userRole:N,userType:C}=(0,O.default)(),P=(0,g.useTranslations)("BurgerMenu"),{openedItem:I,toggle:M}=function(e){let[t,r]=(0,d.useState)("categories"),a=(0,d.useRef)(!1);return(0,d.useEffect)(()=>{!a.current&&(e.includes("inquiries")?(r("inquiries"),a.current=!0):e.includes("companies")&&(r("companies"),a.current=!0))},[e]),{openedItem:t,toggle:e=>r(t=>t===e?null:e)}}(n);(0,d.useEffect)(()=>{if(s){let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[s]);let{data:$,isLoading:T}=(0,v.useGetUser)(),{data:F,isLoading:K}=(0,ey.useGetCategories)(),D=F?.map(e=>({type:"category",category:e}))??[],z=q.filter(e=>e.role.includes(N)&&e.userType.includes(C)).map(e=>e.href?.includes("logout")?{type:"logout",labelKey:e.labelKey}:e.children?.length?{type:"dropdown",labelKey:e.labelKey,href:e.href,children:e.children}:{type:"link",labelKey:e.labelKey,href:e.href});return(0,t.jsx)(u.AnimatePresence,{children:s&&(0,t.jsx)(h.motion.div,{ref:i,initial:{x:"ltr"===x?"-100%":"100%"},animate:{x:0},exit:{x:"ltr"===x?"-100%":"100%"},transition:{duration:.5,ease:"easeInOut"},className:"fixed inset-0 right-0 bg-secondary-50 dark:bg-secondary-750 w-full z-200",children:(0,t.jsxs)("div",{className:"p-6 flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex justify-between mb-10",children:[(0,t.jsx)(S.default,{"aria-label":"logo",href:"/",onClick:e,className:"shrink-0",children:(0,t.jsx)(c.default,{src:f?"/images/logo_dark-mode.svg":"/images/logo.svg",alt:"logo",width:110,height:50,className:"w-[80px] h-[50px]",priority:!0,fetchPriority:"high"})}),(0,t.jsx)(ea.default,{onClose:e,className:"bg-secondary-150/60 dark:bg-secondary-550/50 w-9 h-9 mt-[5px]"})]}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-2.5 w-full",children:[(0,t.jsx)(eb,{}),(0,t.jsx)("div",{className:"border border-secondary-150 rounded-lg w-11.5 h-11.5 shrink-0 flex items-center justify-center",children:(0,t.jsx)(y,{})})]}),T?(0,t.jsx)(b.default,{className:"h-12 flex-1"}):$&&(0,t.jsx)(eS,{title:P("userPanelTitle"),isOpen:"userPanel"===I,onToggle:()=>M("userPanel"),items:z,dropdownType:"userPanel",onClose:e,onOpenLogout:()=>{r(),e()},icon:(0,t.jsx)(c.default,{src:$.avatar||"/images/profile-picture-placeholder.webp",alt:"user",width:28,height:28,priority:!0,fetchPriority:"high",className:"rounded-full border border-secondary-450 w-7 h-7 shrink-0",fallbackComponent:(0,t.jsx)(c.default,{src:"/images/profile-picture-placeholder.webp",alt:"user",width:28,height:28,priority:!0,fetchPriority:"high",className:"rounded-full border border-secondary-450 w-7 h-7 shrink-0"})})}),(0,t.jsx)(eS,{title:P("quickAccessTitle"),isOpen:"quickAccess"===I,onToggle:()=>M("quickAccess"),items:eM,dropdownType:"quickAccess",onClose:e}),!F||K?(0,t.jsx)(b.default,{className:"h-12"}):(0,t.jsx)(eS,{title:P("categoriesTitle"),isOpen:"categories"===I,onToggle:()=>M("categories"),items:D,dropdownType:"categories",onClose:e})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col justify-end gap-2.5",children:[(0,t.jsx)(A,{userData:$||null}),(0,t.jsxs)("button",{type:"button",onClick:()=>{a(),e()},className:"w-full flex items-center justify-between border border-secondary-150 dark:border-secondary-350 rounded-lg p-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsx)(k.ShoppingCartOutlinedIcon,{className:"w-5! h-5!"}),(0,t.jsx)("span",{className:"text-base",children:P("inquiryBasket")})]}),(0,t.jsx)("span",{className:`bg-primary-800 dark:bg-secondary-900 text-primary-50 dark:text-primary-400 w-5 h-5 rounded-md flex items-center justify-center ${"ltr"===x?"":"pt-[3px]"} font-medium text-[13px]`,children:w})]}),!$&&(0,t.jsxs)("button",{type:"button",onClick:()=>{e(),j()},className:"w-full flex items-center justify-center gap-x-1.5 border border-secondary-150 dark:border-secondary-350 rounded-lg p-2.5",children:[(0,t.jsx)(k.LoginIcon,{}),(0,t.jsx)("span",{children:P("loginBtn")})]}),(0,t.jsx)("span",{className:"block w-full h-px bg-gradient-to-r from-secondary-transparent via-secondary-150 dark:via-secondary-650 to-secondary-transparent my-2"}),(0,t.jsxs)("div",{className:"font-normal text-center text-xs text-secondary-450 leading-5",children:[(0,t.jsx)("p",{children:P.rich("developedBy",{brand:e=>(0,t.jsx)("span",{className:"text-primary-650 dark:text-primary-450 font-bold",children:e})})}),(0,t.jsx)("p",{children:P("rights")})]})]})]})},"burger-menu")})};var eT=d;function eE(){return(eE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function eF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function eK(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?eF(Object(r),!0).forEach(function(t){var a,s,l;a=e,s=t,l=r[t],s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eF(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}class eL extends eT.default.Component{constructor(e){let t;super(e),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),t=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:t}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){window&&window.requestAnimationFrame?(window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame(()=>{this.reCalculateColumnCount()})):this.reCalculateColumnCount()}reCalculateColumnCount(){let e=window&&window.innerWidth||1/0,t=this.props.breakpointCols;"object"!=typeof t&&(t={default:parseInt(t)||2});let r=1/0,a=t.default||2;for(let s in t){let l=parseInt(s);l>0&&e<=l&&l<r&&(r=l,a=t[s])}a=Math.max(1,parseInt(a)||1),this.state.columnCount!==a&&this.setState({columnCount:a})}itemsInColumns(){let e=this.state.columnCount,t=Array(e),r=eT.default.Children.toArray(this.props.children);for(let a=0;a<r.length;a++){let s=a%e;t[s]||(t[s]=[]),t[s].push(r[a])}return t}renderColumns(){let{column:e,columnAttrs:t={},columnClassName:r}=this.props,a=this.itemsInColumns(),s=`${100/a.length}%`,l=r;l&&"string"!=typeof l&&(this.logDeprecated('The property "columnClassName" requires a string'),void 0===l&&(l="my-masonry-grid_column"));let n=eK(eK(eK({},e),t),{},{style:eK(eK({},t.style),{},{width:s}),className:l});return a.map((e,t)=>eT.default.createElement("div",eE({},n,{key:t}),e))}logDeprecated(e){console.error("[Masonry]",e)}render(){let e=this.props,{children:t,breakpointCols:r,columnClassName:a,columnAttrs:s,column:l,className:n}=e,i=function(e,t){if(null==e)return{};var r,a,s=function(e,t){if(null==e)return{};var r,a,s={},l=Object.keys(e);for(a=0;a<l.length;a++)r=l[a],t.indexOf(r)>=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)r=l[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}(e,["children","breakpointCols","columnClassName","columnAttrs","column","className"]),o=n;return"string"!=typeof n&&(this.logDeprecated('The property "className" requires a string'),void 0===n&&(o="my-masonry-grid")),eT.default.createElement("div",eE({},i,{className:o}),this.renderColumns())}}eL.defaultProps={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0};var eD=e.i(422233);let ez=[{logo:"/images/banner1-logo.webp",darkModeLogo:"/images/banner1-logo_dark-mode.webp",img:"/images/banner1-img.webp",label:"banners.detronicsFlameDetectors",href:"/brands/10"},{logo:"/images/banner2-logo.webp",img:"/images/banner2-img.webp",label:"banners.siemensFireAlarmSystems",href:"/brands/10"}];(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)(),(0,eD.v4)();var eR=e.i(664511);let eQ={default:3,1280:2},eH=()=>
1{let{isCategoriesOpen:e,closeCategories:r,handleCategoriesMouseEnter:a,handleCategoriesMouseLeave:s}=(0,E.useHeaderUI)(),{data:l}=(0,ey.useGetCategories)(),[n,i]=(0,d.useState)(null),o=(0,g.useTranslations)("Header.categoriesList"),{isDarkMode:m}=(0,p.useDarkMode)();return(0,d.useEffect)(()=>{l&&i(l[0])},[l]),(0,t.jsx)(u.AnimatePresence,{children:e&&(0,t.jsx)(h.motion.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.5}},exit:{opacity:0,transition:{duration:.15}},className:"fixed top-30 left-1/2 -translate-x-1/2 w-full z-50 customContainer",children:(0,t.jsx)("div",{onMouseEnter:a,onMouseLeave:s,className:"py-2",children:(0,t.jsxs)("div",{className:"flex flex-col gap-y-5 bg-background shadow-categoriesList dark:shadow-categoriesList-dark p-6 rounded-lg border border-secondary-50 dark:border-secondary-750",children:[(0,t.jsxs)("div",{className:"flex gap-x-6",children:[(0,t.jsx)(e_,{handleCloseList:r,handleChangeActiveTabs:e=>{i(e)},activeCat:n||null}),(0,t.jsx)(eB,{handleCloseList:r,activeCat:n})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-x-6",children:ez.map(({label:e,img:r,logo:a,href:s,darkModeLogo:l},n)=>(0,t.jsxs)("div",{dir:"ltr",className:"flex items-center justify-between flex-1 rounded-lg border border-secondary-50 dark:border-secondary-750 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-y-2 text-secondary-750 dark:text-secondary-50 py-3 px-2.5",children:[(0,t.jsx)(c.default,{src:m&&l?l:a,alt:a.split("/").at(-1),width:0===n?130:100,height:0===n?130:100,className:"pb-2 object-contain dark:brightness-125"}),(0,t.jsx)("p",{className:"font-bold",children:o(e)})]}),(0,t.jsx)("div",{className:`w-1/2 h-full flex justify-end items-center bg-linear-to-l ${0===n?"from-violet-100 dark:from-violet-400/20":" from-cyan-200/70 dark:from-cyan-300/20"} to-transparent py-3 px-2.5`,children:(0,t.jsx)(c.default,{src:r,alt:r.split("/").at(-1),width:150,height:100,className:"max-w-[150px] max-h-[100px] object-cover"})})]},n))})]})})},"categories")})},e_=({handleCloseList:e,handleChangeActiveTabs:r,activeCat:a})=>{let s=(0,eo.useLocale)(),{data:l}=(0,ey.useGetCategories)();return(0,t.jsx)("ul",{className:"flex flex-col w-1/4",children:l?l.map(l=>(0,t.jsx)("li",{onMouseOver:()=>r(l),className:"font-medium text-sm text-secondary-750 dark:text-secondary-50 group border-b last:border-b-0 border-secondary-50 dark:border-b-secondary-750",children:(0,t.jsx)(S.default,{href:`/product-category/${l.slugs[s]}`,onClick:e,"aria-label":`category-${l.id}`,className:"py-4 flex items-center justify-between",children:(0,t.jsx)("span",{className:`${a?.id===l.id?"text-primary-600 dark:text-primary-450":"lg:group-hover:text-primary-600 dark:lg:group-hover:text-primary-450"} transition-all`,children:(0,ed.getLocalizedValue)(l.names,s)})})},l.id)):(0,t.jsx)(b.default,{length:8,className:"h-20 flex-1 my-2"})})},eB=({handleCloseList:e,activeCat:r})=>{let a=(0,V.default)(),s=(0,eo.useLocale)(),l=r?.children||null;return l?(0,t.jsx)("div",{className:"w-3/4 h-[465px] bg-secondary-0 dark:bg-secondary-900 py-2.5 px-2.5 rounded-lg",children:(0,t.jsx)(eL,{breakpointCols:eQ,className:"flex h-full px-5 py-2.5 overflow-y-auto vertical-scrollbar",columnClassName:"space-y-6",children:l.map(({names:l,children:n,slugs:i},o)=>(0,t.jsxs)("div",{className:"text-sm text-secondary-750 dark:text-secondary-50 max-w-[270px] xl:max-w-[240px]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-1.5 mb-4 shrink-0",children:[(0,t.jsx)("span",{className:"block w-1.5 h-1.5 rounded-full bg-primary-450"}),(0,t.jsx)(S.default,{href:`/product-category/${r?.slugs[s]}/${i[s]}`,className:"w-full font-bold",onClick:e,children:(0,t.jsx)("span",{children:(0,ed.getLocalizedValue)(l,s)})})]}),(0,t.jsx)("div",{className:"space-y-4",children:n?.map(({names:l,slugs:n},o)=>(0,t.jsxs)(eR.default,{href:`/product-category/${r?.slugs[s]}/${i[s]}/${n[s]}`,onClick:e,className:"flex items-center gap-x-1.5 group",children:[(0,t.jsx)(S.default,{"aria-label":`subcategory-${o}`,href:`/product-category/${r?.slugs[s]}/${i[s]}/${n[s]}`,className:"lg:hover:scale-[1.01] transition-all",children:(0,t.jsx)("span",{className:"dark:text-secondary-400 lg:dark:hover:text-secondary-50 truncate transition-all",children:(0,ed.getLocalizedValue)(l,s)})}),(0,t.jsx)(k.KeyboardBackspaceIcon,{className:`w-4 h-4 text-primary-600 ${"ltr"===a?"rotate-180 lg:group-hover:rotate-135":"lg:group-hover:rotate-45"} transition-all!`,style:{width:"16px",height:"16px"}})]},o))})]},o))})}):(0,t.jsx)(b.default,{className:"h-[465px] flex-1"})},eU=(0,N.default)((0,t.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),eV=()=>
1{let{isCategoriesOpen:e,handleCategoriesMouseEnter:r,handleCategoriesMouseLeave:a}=(0,E.useHeaderUI)();return(0,t.jsxs)("div",{"aria-label":"categories",onMouseEnter:r,onMouseLeave:a,className:`hidden lg:block font-medium text-[0.925rem] cursor-default whitespace-nowrap ${e?"text-primary-650 dark:text-primary-450":"text-secondary-750 dark:text-secondary-50 "} transition-all`,children:[(0,t.jsx)(eU,{className:"me-1 size-5.5!"}),(0,t.jsx)("span",{children:"Ø¯Ø³ØªÙ Ø¨ÙØ¯Û Ù
ØØµÙÙØ§Øª"}),e&&(0,t.jsx)("span",{className:"block absolute w-5/6 max-w-6xl right-1/2 translate-x-1/2 -bottom-8 start-0 h-10 z-10"})]})};var eG=e.i(174080);let eY=(0,N.default)((0,t.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z"}),"Language");var eW=e.i(650028);let eZ=()=>{let e=(0,eo.useLocale)(),r=(0,Y.useRouter)(),a=(0,Y.usePathname)(),[s,l]=(0,d.useState)(null),[n,i]=(0,d.useState)(!1),[o,c]=(0,d.useState)(null),[u,h]=(0,d.useState)(!1),m=(0,d.useRef)(null),p=(0,d.useRef)(null);(0,K.useOnClickOutside)(p,e=>{m.current?.contains(e.target)||i(!1)});let{data:x}=(0,eg.useGetLanguages)();(0,d.useEffect)(()=>{h(!0)},[]),(0,d.useEffect)(()=>{if(x){let t=x.find(t=>t.locate===e);t&&l(t)}},[e,x]);let f=()=>{let e=m.current?.getBoundingClientRect();e&&c({top:e.bottom+20,left:e.left})};return(0,d.useLayoutEffect)(()=>{if(n)return window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[n]),(0,d.useEffect)(()=>{if(!n||!m.current)return;let e=new IntersectionObserver(([e])=>{e.isIntersecting||i(!1)},{threshold:0});return e.observe(m.current),()=>e.disconnect()},[n]),(0,d.useEffect)(()=>{n||c(null)},[n]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{ref:m,type:"button",onClick:()=>{n||f(),i(e=>!e)},"aria-haspopup":"listbox","aria-expanded":n,className:"flex items-center justify-center",children:(0,t.jsx)(eY,{className:"text-secondary-450 dark:text-secondary-250 size-5!"})}),u&&n&&o&&(0,eG.createPortal)((0,t.jsx)("div",{ref:p,role:"listbox",style:{top:o.top,left:o.left},className:"fixed z-60 w-max min-w-[8rem] border border-secondary-50 dark:border-secondary-750 rounded-lg bg-background shadow-lg",children:x?.map(({id:e,name:n,flag:o,locate:d})=>(0,t.jsx)(eJ,{name:n,flag:o,locate:d,handleChangeLanguage:()=>{var t;let s,c,u,h;return l(t={id:e,name:n,flag:o,locate:d}),i(!1),s=x?.map(e=>e.locate)||["fa","en","ar"],c=RegExp(`^/(${s.join("|")})(?=/|$)`),u=a.replace(c,"")||"/",h="",void(h="fa"===t.locate?"/"===u?"/":u:`/${t.locate}${"/"===u?"":u}`,r.push(h))},isSelected:s?.id===e},e))}),document.body)]})},eJ=({flag:e,name:r,locate:a,isSelected:s,handleChangeLanguage:l=()=>{}})=>(0,t.jsxs)("div",{onClick:()=>"en"!==a&&l(),className:`flex items-center text-secondary-750 gap-x-1 w-full p-2.5 ${"en"===a?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:[(0,t.jsx)(c.default,{src:e,alt:r,width:20,height:20,fetchPriority:"high",className:"mx-2 rounded-full w-4.5 h-4.5 lg:w-5 lg:h-5"}),(0,t.jsx)("p",{className:"font-medium text-xs lg:text-sm text-secondary-750 dark:text-secondary-50",children:r}),s&&(0,t.jsx)(eW.default,{className:"size-4! ms-2 mb-0.5 text-secondary-450 dark:text-secondary-250"})]});function eX(){let[e,r]=(0,d.useState)(!0),[a,s]=(0,d.useState)(0),[l,n]=(0,d.useState)(!1),i=(0,d.useRef)(null),o=(0,d.useRef)(0),c=(0,d.useRef)(!1);return(0,d.useLayoutEffect)(()=>
1{if(!i.current)return;let e=i.current,t=new ResizeObserver(([e])=>{s(e.target.scrollHeight),n(!0)});return s(e.scrollHeight),n(!0),t.observe(e),()=>t.disconnect()},[]),(0,d.useEffect)(()=>{document.documentElement.style.setProperty("--nav-h",e?`${a}px`:"0px")},[e,a]),(0,d.useEffect)(()=>{o.current=window.scrollY;let e=()=>{c.current||(c.current=!0,requestAnimationFrame(()=>{let e=window.scrollY,t=e-o.current;e<50?r(!0):Math.abs(t)>4&&r(t<0),o.current=e,c.current=!1}))};return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]),(0,t.jsx)(h.motion.div,{initial:!1,animate:l?{height:e?a:0,opacity:+!!e}:void 0,style:l?void 0:{height:"auto",opacity:1},transition:{duration:.3,ease:"easeInOut"},className:"hidden lg:block customContainer overflow-hidden",children:(0,t.jsxs)("nav",{ref:i,className:"flex items-center justify-between pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-6",children:[(0,t.jsx)(eV,{}),(0,t.jsx)(S.default,{href:"/suppliers",className:"font-medium text-xs text-secondary-450 dark:text-secondary-300 hover:text-primary-650 dark:hover:text-primary-450 transition-all",children:"تاÙ
ÛÙ Ú©ÙÙØ¯Ù Ø´ÙÛØ¯"}),(0,t.jsx)(S.default,{href:"#",className:"font-medium text-xs text-secondary-450 dark:text-secondary-300 hover:text-primary-650 dark:hover:text-primary-450 transition-all",children:"ÙØÙ٠ثبت Ø§Ø³ØªØ¹ÙØ§Ù
"}),(0,t.jsx)(S.default,{href:"/direct-request",className:"font-medium text-xs text-secondary-450 dark:text-secondary-300 hover:text-primary-650 dark:hover:text-primary-450 transition-all",children:"ÙØ±Ù
Ø¯Ø±Ø®ÙØ§Ø³Øª Ù
ستÙÛÙ
"}),(0,t.jsx)(S.default,{href:"/blogs",className:"font-medium text-xs text-secondary-450 dark:text-secondary-300 hover:text-primary-650 dark:hover:text-primary-450 transition-all",children:"اخبار Ù Ù
ÙØ§Ùات"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,t.jsx)(y,{}),(0,t.jsx)(eZ,{})]})]})})}function e0(){let[e,r]=(0,d.useState)(!0),[a,s]=(0,d.useState)(0),[l,n]=(0,d.useState)(!1),i=(0,d.useRef)(null),o=(0,d.useRef)(0),c=(0,d.useRef)(!1);return(0,d.useLayoutEffect)(()=>{if(!i.current)return;let e=i.current,t=new ResizeObserver(([e])=>{s(e.target.scrollHeight),n(!0)});return s(e.scrollHeight),n(!0),t.observe(e),()=>t.disconnect()},[]),(0,d.useEffect)(()=>{document.documentElement.style.setProperty("--mobile-topbar-h",e?`${a}px`:"0px")},[e,a]),(0,d.useEffect)(()=>{o.current=window.scrollY;let e=()=>{c.current||(c.current=!0,requestAnimationFrame(()=>{let e=window.scrollY,t=e-o.current;e<80?r(!0):Math.abs(t)>4&&r(t<0),o.current=e,c.current=!1}))};return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]),(0,t.jsx)(h.motion.div,{initial:!1,animate:l?{height:e?a:0,opacity:+!!e}:void 0,style:l?void 0:{height:"auto",opacity:1},transition:{duration:.3,ease:"easeInOut"},className:"lg:hidden overflow-hidden",children:(0,t.jsxs)("div",{ref:i,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4",children:[(0,t.jsx)(S.default,{"aria-label":"direct-request",href:"/direct-request",className:"font-medium text-xs text-secondary-850 dark:text-secondary-50 hover:text-primary-650 dark:hover:text-primary-450 py-1.5 px-2 rounded-lg cursor-pointer transition-all",children:"ÙØ±Ù
Ø¯Ø±Ø®ÙØ§Ø³Øª Ù
ستÙÛÙ
"}),(0,t.jsx)($,{})]}),(0,t.jsx)("span",{className:"block w-full h-px bg-gradient-to-l from-transparent via-secondary-50 dark:via-secondary-750 to-transparent my-1"})]})})}var e5=e.i(90342);let e1=()=>{let{openBurgerMenu:e}=(0,E.useHeaderUI)();return(0,t.jsx)("button",{"aria-label":"burger-menu",onClick:e,className:"lg:hidden!",children:(0,t.jsx)(e5.default,{className:"text-secondary-750 dark:text-secondary-50"})})};e.s(["default",0,()=>{let e="/suppliers"===(0,o.usePathname)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("header",{style:{overflowAnchor:"none"},className:`w-full fixed top-0 left-0 py-1.5 lg:py-3 lg:px-6 ${e?"bg-[#262920]":"bg-background"} border-b border-b-secondary-50 dark:border-b-secondary-750 shadow-xl z-50`,children:[(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between customContainer max-lg:px-0! relative",children:[!e&&(0,t.jsx)(e0,{}),(0,t.jsxs)("div",{className:"w-full flex items-center max-lg:justify-between gap-x-4 lg:gap-x-6 max-lg:px-4",children:[(0,t.jsx)(r.default,{}),!e&&(0,t.jsx)("div",{className:"w-full lg:w-[60%]",children:(0,t.jsx)(a.default,{placeholder:"Ù
ØØµÙÙ Ù
ÙØ±Ø¯ ÙØ¸Ø± Ø®ÙØ¯ را جستâÙâØ¬Ù Ú©ÙÛØ¯.",isHeaderSearchBar:!0})}),(0,t.jsx)(e1,{})]}),(0,t.jsxs)("div",{className:"hidden lg:flex items-center gap-x-6",children:[(0,t.jsx)(F,{}),(0,t.jsx)("span",{className:"h-8 w-px bg-secondary-50 dark:bg-secondary-750"}),(0,t.jsx)(z,{})]})]}),!e&&(0,t.jsx)(eX,{})]}),(0,t.jsx)("span",{className:`block ${e?"pt-[75px]":"pt-[108px] lg:pt-[123px]"}`}),(0,t.jsx)(es,{}),(0,t.jsx)(ep,{}),(0,t.jsx)(ef.default,{}),(0,t.jsx)(e$,{}),(0,t.jsx)(eH,{})]})}],199578)}]);
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.