Files
nademitex_user/dist/assets/HomeView-Bj5q4Ray.js
T

1 line
10 KiB
JavaScript
Raw Normal View History

import{A as e,At as t,F as n,G as r,M as i,Nt as a,Pt as o,R as ee,_ as s,c,d as l,f as u,g as d,i as f,k as te,l as p,nt as m,t as ne,u as h,ut as g,v as _}from"./_plugin-vue_export-helper-1xMDlcEE.js";import{r as re,u as ie}from"./BasicIcon-Bzeb0Iwd.js";import{o as ae}from"./format-C72AoJ2H.js";import{n as v}from"./http-CU_N-R2R.js";import{M as oe,c as se,i as ce,l as le,o as ue,r as de,s as fe}from"./index-BK4-SNil.js";import{t as pe}from"./IconChevronBack-CDeN0Cbu.js";import{t as me}from"./PageSkeleton-DYdjm4l9.js";import{n as he,r as ge,t as _e}from"./crm-Bj4T2PId.js";import{t as ve}from"./useGoBack-BjVI8c38.js";import{t as y}from"./quick-catalog-request-Di7-t6Ua.js";import{t as ye}from"./IconHeart-CvzbNH_T.js";async function be(){return v(`/suggestions/me`)}var xe=`/assets/level-medal-Avpe4Lqa.webp`,b=`/assets/quick-categories-grid-BcZY1Wu0.webp`,x=`/assets/latest-order-status-D65E3uoz.webp`,S=`/assets/quick-new-products-DBGxsuVa.webp`,Se={class:`page home-page`},C={class:`home-header mobile-only`},w={class:`home-header__user`},T={class:`home-header__hello`},E={class:`home-header__actions`},D={class:`home-desk-head desktop-only`},O={class:`home-desk-head__sub`},k={class:`page__scroll page__scroll--with-nav home-scroll`},A={key:0,class:`home-error`},j=[`aria-label`],Ce={class:`hero-banner__content`},we={key:0,class:`hero-banner__title`},Te={key:0},Ee={key:1,class:`hero-banner__title`},De={key:0,class:`hero-banner__dots`,role:`tablist`,"aria-label":`بنرها`},Oe=[`aria-label`,`aria-selected`,`onClick`],ke={class:`quick-grid`,"aria-label":`دسترسی سریع`},Ae=[`onClick`],je={class:`quick-card__icon`,"aria-hidden":`true`},Me=[`src`],Ne={class:`quick-card__label`},Pe={key:0,class:`level-card`,"aria-label":`سطح عضویت`},Fe={class:`level-card__top`},Ie={class:`level-card__identity`},Le=[`src`],M={class:`level-card__text`},Re={class:`level-card__name`},ze={class:`level-card__next`},Be={class:`level-card__progress`},Ve=[`aria-valuenow`],He={class:`level-card__points`},Ue={key:1,class:`suggest-card`,"aria-label":`پیشنهاد اختصاصی`},We={class:`suggest-card__head`},Ge={key:0,class:`suggest-card__empty`},Ke={key:0,class:`suggest-card__row scroll-x`},qe=[`onClick`],Je={key:0,class:`suggest-card__badge`},Ye={class:`suggest-card__body`},Xe={class:`suggest-card__name`},Ze={class:`suggest-card__sub`},Qe={key:0,class:`suggest-card__note`},$e={class:`section`},et={class:`section__head`},tt={class:`product-row scroll-x`},nt=[`onClick`],rt={key:0,class:`product-card__badge`},it={class:`product-card__body`},at={class:`product-card__name`},ot={class:`product-card__sub`},st=[`aria-label`,`aria-pressed`,`onClick`],N=ne(_({__name:`HomeView`,setup(ne){let _=oe(),{goBack:v}=ve(`/`),N=se(),ct=_e(),P=le(),F=m(!0),I=m(null),L=m([]),R=m([]),z=m(null),B=m(null),lt=[{id:`qa-new`,label:`محصولات جدید`,to:`/products`,image:S},{id:`qa-cat`,label:`دسته بندی`,to:`/categories`,image:b},{id:`qa-club`,label:`آخرین وضعیت سفارش`,to:`/orders/latest-status`,image:x},{id:`qa-swatch`,label:`آخرین درخواست کالیته`,to:`/catalog-requests/latest-status`,image:y}],ut=[{id:`qa-new`,label:`محصولات جدید`,to:`/products`,image:S},{id:`qa-cat`,label:`دسته بندی`,to:`/categories`,image:b},{id:`qa-customers`,label:`آخرین وضعیت سفارش`,to:`/orders/latest-status`,image:x},{id:`qa-swatch`,label:`آخرین درخواست کالیته`,to:`/catalog-requests/latest-status`,image:y}],dt=c(()=>N.isAgent?ut:lt),V={id:`fallback`,slot:`home_hero`,title:`کالکشن پاییز و زمستان`,subtitle:`جدیدترین پارچه‌ها`,ctaLabel:`مشاهده کالکشن`,ctaLink:`/categories`,imageUrl:``,showTitle:!0,showSubtitle:!0,showCta:!0},H=m([V]),U=m(0),W=m(`hero-next`),G,K=c(()=>H.value[U.value]??V),ft=c(()=>{let e=K.value;return e.showTitle!==!1&&e.title||e.showSubtitle!==!1&&e.subtitle||e.showCta!==!1&&e.ctaLabel});function pt(e){if(e.imageUrl)return{"--hero-image":`url("${e.imageUrl}")`}}function q(e,t){let n=H.value.length;if(!n)return;let r=(e%n+n)%n;r!==U.v