@lanaco/lnc-react-ui 4.0.220 → 4.0.222

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),a=require("react"),W=require("./Icon.cjs"),f=require("./IconButton.cjs"),d=require("./utils-CITgSxXe.cjs"),G=require("./index-DsINTjQk.cjs"),I=require("./style-DC05rdyx.cjs"),R=require("./emotion-styled.browser.esm-BtEseadx.cjs"),$=require("./breakpoints-CcVm-gVm.cjs"),n=require("./style-BAcV7F53.cjs"),T=R.styled.a`
1
+ "use strict";const e=require("react/jsx-runtime"),a=require("react"),W=require("./Icon.cjs"),f=require("./IconButton.cjs"),c=require("./utils-CITgSxXe.cjs"),G=require("./index-DsINTjQk.cjs"),I=require("./style-DC05rdyx.cjs"),R=require("./emotion-styled.browser.esm-BtEseadx.cjs"),$=require("./breakpoints-CcVm-gVm.cjs"),n=require("./style-BAcV7F53.cjs"),T=R.styled.a`
2
2
  text-decoration: none;
3
3
  color: var(--gray-950);
4
4
  display: flex;
@@ -67,7 +67,7 @@
67
67
  font-weight: 600;
68
68
  line-height: 1.5rem;
69
69
  letter-spacing: 0.1px;
70
- ${d.truncateTextInRows(3)}
70
+ ${c.truncateTextInRows(3)}
71
71
  }
72
72
 
73
73
  & .wrapper__tags {
@@ -168,7 +168,7 @@
168
168
  }
169
169
  }
170
170
  }
171
- `,z=a.forwardRef(({blogUuid:i,title:l,imageUrl:c,options:o,publishedAt:m,timeToReadText:k="{0} min read",timeToRead:_=0,numberOfLikes:b=0,numberOfComments:S=0,isBookmarked:p=!1,onSelectCard:y=()=>{},onBookmark:v=()=>{},onShare:g=()=>{},bookmarkComponent:u=e.jsx(e.Fragment,{}),metadata:s,titleSlug:j,LinkComponent:r,hasShare:w=!0,hasDelete:h=!1,onDelete:x=()=>{}},P)=>{const q=r||"a",C=()=>d.isDefined(u)?a.cloneElement(u,{key:`bookmark_blog__${i}__${p}`,isBookmarked:p,blogUuid:i,onBookmark:(L,B)=>v(L,B),ref:P,componentName:"ExploreBlogSectionCard"}):e.jsx(e.Fragment,{}),N=a.useRef();return e.jsxs(T,{ref:N,name:s==null?void 0:s.name,"data-accessor":s==null?void 0:s.accessor,onClick:t=>y(t,N),className:"blog-card-item",as:q,...r?{to:`/blog/${j}`}:{href:`/blog/${j}`},children:[e.jsxs("div",{className:"image-container",children:[h&&e.jsx("div",{className:"action mobile-only",onClick:t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()},children:e.jsx(f,{icon:" mng-lnc-close",borderRadius:"curved",type:"button",btnType:"filled",color:"neutral",size:"large",onClick:()=>{x()}})}),e.jsx(G.ProductImageWrapper,{src:c,className:"wrapper__image"})]}),e.jsxs("div",{className:"wrapper__content",children:[e.jsxs("div",{className:"wrapper__subcontent",children:[e.jsxs("div",{className:"wrapper__info",children:[e.jsx("div",{className:"wrapper__title",children:l}),h&&e.jsx("div",{className:"action desktop-only",onClick:t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()},children:e.jsx(f,{icon:" mng-lnc-close",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:()=>{x()}})})]}),e.jsxs("div",{className:"wrapper__tags-action",children:[e.jsx("div",{className:"wrapper__tags",children:o&&(o==null?void 0:o.map((t,L)=>e.jsx(I.BlogTag,{color:t==null?void 0:t.color,children:t==null?void 0:t.name},`blog-card-sponsored-option__${L+1}`)))}),e.jsxs("div",{className:"info__content mobile-only",onClick:t=>{t.stopPropagation(),t.preventDefault()},children:[e.jsx(C,{}),w&&e.jsx(f,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:()=>{g()}})]})]})]}),e.jsxs("div",{className:"wrapper__info",children:[e.jsxs("div",{className:"info__content",children:[e.jsx("div",{className:"info__text",children:`${d.formatLocaleDateString(m)} • ${d.formatString(k,_)}`}),e.jsxs("div",{className:"info__text",children:[e.jsxs("div",{children:[e.jsx(W,{icon:" mng-lnc-thumbs-up--filled",sizeInUnits:"1rem"}),d.getRoundedNumber(b)]}),e.jsxs("div",{children:[e.jsx(W,{icon:" mng-lnc-messages-filled",sizeInUnits:"1rem"}),d.getRoundedNumber(S)]})]})]}),e.jsxs("div",{className:"info__content desktop-only",onClick:t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()},children:[e.jsx(C,{}),w&&e.jsx(f,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:()=>{g()}})]})]})]})]})}),D=R.styled.div`
171
+ `,z=a.forwardRef(({blogUuid:i,title:l,imageUrl:m,options:o,publishedAt:h,timeToReadText:k="{0} min read",timeToRead:_=0,numberOfLikes:b=0,numberOfComments:S=0,isBookmarked:g=!1,onSelectCard:y=()=>{},onBookmark:v=()=>{},onShare:u=()=>{},bookmarkComponent:d=e.jsx(e.Fragment,{}),metadata:s,titleSlug:j,LinkComponent:r,hasShare:w=!0,hasDelete:p=!1,onDelete:x=()=>{}},P)=>{const q=r||"a",C=()=>c.isDefined(d)?a.cloneElement(d,{key:`bookmark_blog__${i}__${g}`,isBookmarked:g,blogUuid:i,onBookmark:(L,B)=>v(L,B),ref:P,componentName:"ExploreBlogSectionCard"}):e.jsx(e.Fragment,{}),N=a.useRef();return e.jsxs(T,{ref:N,name:s==null?void 0:s.name,"data-accessor":s==null?void 0:s.accessor,onClick:t=>y(t,N),className:"blog-card-item",as:q,...r?{to:`/blog/${j}`}:{href:`/blog/${j}`},children:[e.jsxs("div",{className:"image-container",children:[p&&e.jsx("div",{className:"action mobile-only",onClick:t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()},children:e.jsx(f,{icon:" mng-lnc-close",borderRadius:"curved",type:"button",btnType:"filled",color:"neutral",size:"medium",onClick:()=>{x()}})}),e.jsx(G.ProductImageWrapper,{src:m,className:"wrapper__image"})]}),e.jsxs("div",{className:"wrapper__content",children:[e.jsxs("div",{className:"wrapper__subcontent",children:[e.jsxs("div",{className:"wrapper__info",children:[e.jsx("div",{className:"wrapper__title",children:l}),p&&e.jsx("div",{className:"action desktop-only",onClick:t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()},children:e.jsx(f,{icon:" mng-lnc-close",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:()=>{x()}})})]}),e.jsxs("div",{className:"wrapper__tags-action",children:[e.jsx("div",{className:"wrapper__tags",children:o&&(o==null?void 0:o.map((t,L)=>e.jsx(I.BlogTag,{color:t==null?void 0:t.color,children:t==null?void 0:t.name},`blog-card-sponsored-option__${L+1}`)))}),e.jsxs("div",{className:"info__content mobile-only",onClick:t=>{t.stopPropagation(),t.preventDefault()},children:[e.jsx(C,{}),w&&e.jsx(f,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:()=>{u()}})]})]})]}),e.jsxs("div",{className:"wrapper__info",children:[e.jsxs("div",{className:"info__content",children:[e.jsx("div",{className:"info__text",children:`${c.formatLocaleDateString(h)} • ${c.formatString(k,_)}`}),e.jsxs("div",{className:"info__text",children:[e.jsxs("div",{children:[e.jsx(W,{icon:" mng-lnc-thumbs-up--filled",sizeInUnits:"1rem"}),c.getRoundedNumber(b)]}),e.jsxs("div",{children:[e.jsx(W,{icon:" mng-lnc-messages-filled",sizeInUnits:"1rem"}),c.getRoundedNumber(S)]})]})]}),e.jsxs("div",{className:"info__content desktop-only",onClick:t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()},children:[e.jsx(C,{}),w&&e.jsx(f,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:()=>{u()}})]})]})]})]})}),F=R.styled.div`
172
172
  display: flex;
173
173
  flex-direction: column;
174
174
  align-items: flex-start;
@@ -192,10 +192,10 @@
192
192
  bottom: -1.25rem;
193
193
  }
194
194
  }
195
- `,F=R.styled(n.SkeletonColumnWrapper)`
195
+ `,O=R.styled(n.SkeletonColumnWrapper)`
196
196
  @media ${$.down("S")} {
197
197
  & > div {
198
198
  flex-direction: column;
199
199
  }
200
200
  }
201
- `,O=({keyPrefix:i})=>e.jsxs(F,{children:[e.jsxs(n.SkeletonRowWrapper,{children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(n.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-1`),e.jsxs(n.SkeletonRowWrapper,{children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(n.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-2`),e.jsxs(n.SkeletonRowWrapper,{children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(n.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-3`),e.jsxs(n.SkeletonRowWrapper,{children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(n.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-4`),e.jsxs(n.SkeletonRowWrapper,{children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(n.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-5`)]}),U=({keyPrefix:i,isLoading:l=!1,fallbackComponent:c=e.jsx(e.Fragment,{}),children:o})=>e.jsx(a.Suspense,{fallbackComponent:c,children:l===!0?e.jsx(O,{keyPrefix:i}):o}),A=a.memo(z),E=a.forwardRef(({timeToReadText:i="{0} min read",items:l,isLoading:c=!1,onSelectCard:o=()=>{},onShare:m=()=>{},onBookmark:k=()=>{},getImage:_=()=>{},isSeparated:b=!0,bookmarkComponent:S=e.jsx(e.Fragment,{}),componentName:p,LinkComponent:y,hasShare:v=!0,hasDelete:g=!1,onDelete:u=()=>{}},s)=>{const j=a.useMemo(()=>l==null?void 0:l.map((r,w)=>{var h;return e.jsx(A,{blogUuid:r==null?void 0:r.uuid,title:r==null?void 0:r.title,titleSlug:r==null?void 0:r.titleSlug,options:r==null?void 0:r.options,publishedAt:r==null?void 0:r.publishedAt,timeToReadText:i,timeToRead:r==null?void 0:r.timeToRead,numberOfLikes:r==null?void 0:r.numberOfLikes,numberOfComments:r==null?void 0:r.numberOfComments,isSponsored:r==null?void 0:r.isSponsored,isBookmarked:r==null?void 0:r.isBookmarked,onSelectCard:(x,P)=>o==null?void 0:o(r,P),hasShare:v,hasDelete:g,onDelete:u,onShare:()=>m==null?void 0:m(r),onBookmark:k,imageUrl:_(r==null?void 0:r.imageUrl,r==null?void 0:r.uuid)||null,bookmarkComponent:S,metadata:{name:p,accessor:r==null?void 0:r.accessor},LinkComponent:y},`blog-card-item__${w+1}__${(h=r==null?void 0:r.isBookmarked)==null?void 0:h.toString()}`)}),[l]);return e.jsx(U,{isLoading:c,keyPrefix:"blog-list-skeleton",children:e.jsx(D,{ref:s,className:b?"separated":"",children:j})})});module.exports=E;
201
+ `,U=({keyPrefix:i})=>e.jsxs(O,{children:[e.jsxs(n.SkeletonRowWrapper,{children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(n.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-1`),e.jsxs(n.SkeletonRowWrapper,{children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(n.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-2`),e.jsxs(n.SkeletonRowWrapper,{children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(n.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-3`),e.jsxs(n.SkeletonRowWrapper,{children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(n.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-4`),e.jsxs(n.SkeletonRowWrapper,{children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(n.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(n.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-5`)]}),A=({keyPrefix:i,isLoading:l=!1,fallbackComponent:m=e.jsx(e.Fragment,{}),children:o})=>e.jsx(a.Suspense,{fallbackComponent:m,children:l===!0?e.jsx(U,{keyPrefix:i}):o}),E=a.memo(z),M=a.forwardRef(({timeToReadText:i="{0} min read",items:l,isLoading:m=!1,onSelectCard:o=()=>{},onShare:h=()=>{},onBookmark:k=()=>{},getImage:_=()=>{},isSeparated:b=!0,bookmarkComponent:S=e.jsx(e.Fragment,{}),componentName:g,LinkComponent:y,hasShare:v=!0,hasDelete:u=!1,onDelete:d=()=>{}},s)=>{const j=a.useMemo(()=>l==null?void 0:l.map((r,w)=>{var p;return e.jsx(E,{blogUuid:r==null?void 0:r.uuid,title:r==null?void 0:r.title,titleSlug:r==null?void 0:r.titleSlug,options:r==null?void 0:r.options,publishedAt:r==null?void 0:r.publishedAt,timeToReadText:i,timeToRead:r==null?void 0:r.timeToRead,numberOfLikes:r==null?void 0:r.numberOfLikes,numberOfComments:r==null?void 0:r.numberOfComments,isSponsored:r==null?void 0:r.isSponsored,isBookmarked:r==null?void 0:r.isBookmarked,onSelectCard:(x,P)=>o==null?void 0:o(r,P),hasShare:v,hasDelete:u,onDelete:()=>d==null?void 0:d(r),onShare:()=>h==null?void 0:h(r),onBookmark:k,imageUrl:_(r==null?void 0:r.imageUrl,r==null?void 0:r.uuid)||null,bookmarkComponent:S,metadata:{name:g,accessor:r==null?void 0:r.accessor},LinkComponent:y},`blog-card-item__${w+1}__${(p=r==null?void 0:r.isBookmarked)==null?void 0:p.toString()}`)}),[l]);return e.jsx(A,{isLoading:m,keyPrefix:"blog-list-skeleton",children:e.jsx(F,{ref:s,className:b?"separated":"",children:j})})});module.exports=M;
@@ -1,13 +1,13 @@
1
1
  import { jsxs as t, jsx as e, Fragment as y } from "react/jsx-runtime";
2
- import { forwardRef as W, useRef as q, cloneElement as A, Suspense as E, memo as M, useMemo as F } from "react";
2
+ import { forwardRef as W, useRef as A, cloneElement as E, Suspense as M, memo as D, useMemo as F } from "react";
3
3
  import L from "./Icon.js";
4
4
  import v from "./IconButton.js";
5
5
  import { n as H, q as J, s as K, v as P, m as Q } from "./utils-B2fsQ6PS.js";
6
6
  import { P as V } from "./index-BvMY2TbK.js";
7
7
  import { B as X } from "./style-BUyFad_y.js";
8
8
  import { s as T } from "./emotion-styled.browser.esm-BNN1dTl3.js";
9
- import { d as D } from "./breakpoints-ff0SIcV3.js";
10
- import { b as m, S as l, c as g, a as n } from "./style-BwQ4djFC.js";
9
+ import { d as O } from "./breakpoints-ff0SIcV3.js";
10
+ import { b as c, S as l, c as f, a as n } from "./style-BwQ4djFC.js";
11
11
  const Y = T.a`
12
12
  text-decoration: none;
13
13
  color: var(--gray-950);
@@ -127,7 +127,7 @@ const Y = T.a`
127
127
  }
128
128
  }
129
129
 
130
- @media ${D("S")} {
130
+ @media ${O("S")} {
131
131
  flex-direction: column;
132
132
  padding: 0;
133
133
  background: transparent;
@@ -181,38 +181,38 @@ const Y = T.a`
181
181
  `, Z = W(
182
182
  ({
183
183
  blogUuid: o,
184
- title: s,
185
- imageUrl: c,
184
+ title: m,
185
+ imageUrl: h,
186
186
  options: a,
187
- publishedAt: h,
187
+ publishedAt: p,
188
188
  timeToReadText: k = "{0} min read",
189
189
  timeToRead: N = 0,
190
190
  numberOfLikes: $ = 0,
191
191
  numberOfComments: C = 0,
192
- isBookmarked: f = !1,
192
+ isBookmarked: u = !1,
193
193
  onSelectCard: B = () => {
194
194
  },
195
195
  onBookmark: R = () => {
196
196
  },
197
- onShare: u = () => {
197
+ onShare: w = () => {
198
198
  },
199
- bookmarkComponent: w = /* @__PURE__ */ e(y, {}),
199
+ bookmarkComponent: s = /* @__PURE__ */ e(y, {}),
200
200
  metadata: d,
201
201
  titleSlug: _,
202
202
  LinkComponent: r,
203
203
  hasShare: b = !0,
204
- hasDelete: p = !1,
204
+ hasDelete: g = !1,
205
205
  onDelete: S = () => {
206
206
  }
207
207
  }, G) => {
208
- const O = r || "a", z = () => Q(w) ? A(w, {
209
- key: `bookmark_blog__${o}__${f}`,
210
- isBookmarked: f,
208
+ const U = r || "a", z = () => Q(s) ? E(s, {
209
+ key: `bookmark_blog__${o}__${u}`,
210
+ isBookmarked: u,
211
211
  blogUuid: o,
212
- onBookmark: (j, U) => R(j, U),
212
+ onBookmark: (j, q) => R(j, q),
213
213
  ref: G,
214
214
  componentName: "ExploreBlogSectionCard"
215
- }) : /* @__PURE__ */ e(y, {}), I = q();
215
+ }) : /* @__PURE__ */ e(y, {}), I = A();
216
216
  return /* @__PURE__ */ t(
217
217
  Y,
218
218
  {
@@ -221,11 +221,11 @@ const Y = T.a`
221
221
  "data-accessor": d == null ? void 0 : d.accessor,
222
222
  onClick: (i) => B(i, I),
223
223
  className: "blog-card-item",
224
- as: O,
224
+ as: U,
225
225
  ...r ? { to: `/blog/${_}` } : { href: `/blog/${_}` },
226
226
  children: [
227
227
  /* @__PURE__ */ t("div", { className: "image-container", children: [
228
- p && /* @__PURE__ */ e(
228
+ g && /* @__PURE__ */ e(
229
229
  "div",
230
230
  {
231
231
  className: "action mobile-only",
@@ -240,7 +240,7 @@ const Y = T.a`
240
240
  type: "button",
241
241
  btnType: "filled",
242
242
  color: "neutral",
243
- size: "large",
243
+ size: "medium",
244
244
  onClick: () => {
245
245
  S();
246
246
  }
@@ -248,13 +248,13 @@ const Y = T.a`
248
248
  )
249
249
  }
250
250
  ),
251
- /* @__PURE__ */ e(V, { src: c, className: "wrapper__image" })
251
+ /* @__PURE__ */ e(V, { src: h, className: "wrapper__image" })
252
252
  ] }),
253
253
  /* @__PURE__ */ t("div", { className: "wrapper__content", children: [
254
254
  /* @__PURE__ */ t("div", { className: "wrapper__subcontent", children: [
255
255
  /* @__PURE__ */ t("div", { className: "wrapper__info", children: [
256
- /* @__PURE__ */ e("div", { className: "wrapper__title", children: s }),
257
- p && /* @__PURE__ */ e(
256
+ /* @__PURE__ */ e("div", { className: "wrapper__title", children: m }),
257
+ g && /* @__PURE__ */ e(
258
258
  "div",
259
259
  {
260
260
  className: "action desktop-only",
@@ -302,7 +302,7 @@ const Y = T.a`
302
302
  btnType: "basic",
303
303
  color: "neutral",
304
304
  onClick: () => {
305
- u();
305
+ w();
306
306
  }
307
307
  }
308
308
  )
@@ -314,7 +314,7 @@ const Y = T.a`
314
314
  /* @__PURE__ */ t("div", { className: "wrapper__info", children: [
315
315
  /* @__PURE__ */ t("div", { className: "info__content", children: [
316
316
  /* @__PURE__ */ e("div", { className: "info__text", children: `${J(
317
- h
317
+ p
318
318
  )} • ${K(k, N)}` }),
319
319
  /* @__PURE__ */ t("div", { className: "info__text", children: [
320
320
  /* @__PURE__ */ t("div", { children: [
@@ -344,7 +344,7 @@ const Y = T.a`
344
344
  btnType: "basic",
345
345
  color: "neutral",
346
346
  onClick: () => {
347
- u();
347
+ w();
348
348
  }
349
349
  }
350
350
  )
@@ -381,16 +381,16 @@ const Y = T.a`
381
381
  bottom: -1.25rem;
382
382
  }
383
383
  }
384
- `, ee = T(m)`
385
- @media ${D("S")} {
384
+ `, ee = T(c)`
385
+ @media ${O("S")} {
386
386
  & > div {
387
387
  flex-direction: column;
388
388
  }
389
389
  }
390
390
  `, re = ({ keyPrefix: o }) => /* @__PURE__ */ t(ee, { children: [
391
391
  /* @__PURE__ */ t(l, { children: [
392
- /* @__PURE__ */ e(g, { height: "9.5rem", width: "17.75rem" }),
393
- /* @__PURE__ */ t(m, { noGradient: !0, children: [
392
+ /* @__PURE__ */ e(f, { height: "9.5rem", width: "17.75rem" }),
393
+ /* @__PURE__ */ t(c, { noGradient: !0, children: [
394
394
  /* @__PURE__ */ e(n, { height: "1.5rem" }),
395
395
  /* @__PURE__ */ t(l, { noGradient: !0, children: [
396
396
  /* @__PURE__ */ e(n, { width: "5rem", height: "1.25rem" }),
@@ -401,8 +401,8 @@ const Y = T.a`
401
401
  ] })
402
402
  ] }, `${o}-1`),
403
403
  /* @__PURE__ */ t(l, { children: [
404
- /* @__PURE__ */ e(g, { height: "9.5rem", width: "17.75rem" }),
405
- /* @__PURE__ */ t(m, { noGradient: !0, children: [
404
+ /* @__PURE__ */ e(f, { height: "9.5rem", width: "17.75rem" }),
405
+ /* @__PURE__ */ t(c, { noGradient: !0, children: [
406
406
  /* @__PURE__ */ e(n, { height: "1.5rem" }),
407
407
  /* @__PURE__ */ t(l, { noGradient: !0, children: [
408
408
  /* @__PURE__ */ e(n, { width: "5rem", height: "1.25rem" }),
@@ -413,8 +413,8 @@ const Y = T.a`
413
413
  ] })
414
414
  ] }, `${o}-2`),
415
415
  /* @__PURE__ */ t(l, { children: [
416
- /* @__PURE__ */ e(g, { height: "9.5rem", width: "17.75rem" }),
417
- /* @__PURE__ */ t(m, { noGradient: !0, children: [
416
+ /* @__PURE__ */ e(f, { height: "9.5rem", width: "17.75rem" }),
417
+ /* @__PURE__ */ t(c, { noGradient: !0, children: [
418
418
  /* @__PURE__ */ e(n, { height: "1.5rem" }),
419
419
  /* @__PURE__ */ t(l, { noGradient: !0, children: [
420
420
  /* @__PURE__ */ e(n, { width: "5rem", height: "1.25rem" }),
@@ -425,8 +425,8 @@ const Y = T.a`
425
425
  ] })
426
426
  ] }, `${o}-3`),
427
427
  /* @__PURE__ */ t(l, { children: [
428
- /* @__PURE__ */ e(g, { height: "9.5rem", width: "17.75rem" }),
429
- /* @__PURE__ */ t(m, { noGradient: !0, children: [
428
+ /* @__PURE__ */ e(f, { height: "9.5rem", width: "17.75rem" }),
429
+ /* @__PURE__ */ t(c, { noGradient: !0, children: [
430
430
  /* @__PURE__ */ e(n, { height: "1.5rem" }),
431
431
  /* @__PURE__ */ t(l, { noGradient: !0, children: [
432
432
  /* @__PURE__ */ e(n, { width: "5rem", height: "1.25rem" }),
@@ -437,8 +437,8 @@ const Y = T.a`
437
437
  ] })
438
438
  ] }, `${o}-4`),
439
439
  /* @__PURE__ */ t(l, { children: [
440
- /* @__PURE__ */ e(g, { height: "9.5rem", width: "17.75rem" }),
441
- /* @__PURE__ */ t(m, { noGradient: !0, children: [
440
+ /* @__PURE__ */ e(f, { height: "9.5rem", width: "17.75rem" }),
441
+ /* @__PURE__ */ t(c, { noGradient: !0, children: [
442
442
  /* @__PURE__ */ e(n, { height: "1.5rem" }),
443
443
  /* @__PURE__ */ t(l, { noGradient: !0, children: [
444
444
  /* @__PURE__ */ e(n, { width: "5rem", height: "1.25rem" }),
@@ -450,17 +450,17 @@ const Y = T.a`
450
450
  ] }, `${o}-5`)
451
451
  ] }), ie = ({
452
452
  keyPrefix: o,
453
- isLoading: s = !1,
454
- fallbackComponent: c = /* @__PURE__ */ e(y, {}),
453
+ isLoading: m = !1,
454
+ fallbackComponent: h = /* @__PURE__ */ e(y, {}),
455
455
  children: a
456
- }) => /* @__PURE__ */ e(E, { fallbackComponent: c, children: s === !0 ? /* @__PURE__ */ e(re, { keyPrefix: o }) : a }), te = M(Z), ge = W(
456
+ }) => /* @__PURE__ */ e(M, { fallbackComponent: h, children: m === !0 ? /* @__PURE__ */ e(re, { keyPrefix: o }) : a }), te = D(Z), ge = W(
457
457
  ({
458
458
  timeToReadText: o = "{0} min read",
459
- items: s,
460
- isLoading: c = !1,
459
+ items: m,
460
+ isLoading: h = !1,
461
461
  onSelectCard: a = () => {
462
462
  },
463
- onShare: h = () => {
463
+ onShare: p = () => {
464
464
  },
465
465
  onBookmark: k = () => {
466
466
  },
@@ -468,15 +468,15 @@ const Y = T.a`
468
468
  },
469
469
  isSeparated: $ = !0,
470
470
  bookmarkComponent: C = /* @__PURE__ */ e(y, {}),
471
- componentName: f,
471
+ componentName: u,
472
472
  LinkComponent: B,
473
473
  hasShare: R = !0,
474
- hasDelete: u = !1,
475
- onDelete: w = () => {
474
+ hasDelete: w = !1,
475
+ onDelete: s = () => {
476
476
  }
477
477
  }, d) => {
478
- const _ = F(() => s == null ? void 0 : s.map((r, b) => {
479
- var p;
478
+ const _ = F(() => m == null ? void 0 : m.map((r, b) => {
479
+ var g;
480
480
  return /* @__PURE__ */ e(
481
481
  te,
482
482
  {
@@ -493,19 +493,19 @@ const Y = T.a`
493
493
  isBookmarked: r == null ? void 0 : r.isBookmarked,
494
494
  onSelectCard: (S, G) => a == null ? void 0 : a(r, G),
495
495
  hasShare: R,
496
- hasDelete: u,
497
- onDelete: w,
498
- onShare: () => h == null ? void 0 : h(r),
496
+ hasDelete: w,
497
+ onDelete: () => s == null ? void 0 : s(r),
498
+ onShare: () => p == null ? void 0 : p(r),
499
499
  onBookmark: k,
500
500
  imageUrl: N(r == null ? void 0 : r.imageUrl, r == null ? void 0 : r.uuid) || null,
501
501
  bookmarkComponent: C,
502
- metadata: { name: f, accessor: r == null ? void 0 : r.accessor },
502
+ metadata: { name: u, accessor: r == null ? void 0 : r.accessor },
503
503
  LinkComponent: B
504
504
  },
505
- `blog-card-item__${b + 1}__${(p = r == null ? void 0 : r.isBookmarked) == null ? void 0 : p.toString()}`
505
+ `blog-card-item__${b + 1}__${(g = r == null ? void 0 : r.isBookmarked) == null ? void 0 : g.toString()}`
506
506
  );
507
- }), [s]);
508
- return /* @__PURE__ */ e(ie, { isLoading: c, keyPrefix: "blog-list-skeleton", children: /* @__PURE__ */ e(x, { ref: d, className: $ ? "separated" : "", children: _ }) });
507
+ }), [m]);
508
+ return /* @__PURE__ */ e(ie, { isLoading: h, keyPrefix: "blog-list-skeleton", children: /* @__PURE__ */ e(x, { ref: d, className: $ ? "separated" : "", children: _ }) });
509
509
  }
510
510
  );
511
511
  export {
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),l=require("react"),y=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./utils-CITgSxXe.cjs"),N=require("./breakpoints-CcVm-gVm.cjs"),ue=require("./Icon.cjs"),ce=require("./ShopAvatar-CV3lj34D.cjs"),$e=require("./Badge.cjs"),me=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),de=require("./IconButton.cjs"),pe=require("./useDetectMobile-DYV6V1yw.cjs"),ke=require("./index-CX2A-q39.cjs"),_e=require("./motion-B_VPZaJq.cjs"),a=require("./style-BAcV7F53.cjs"),Ce=y.styled.a`
1
+ "use strict";const r=require("react/jsx-runtime"),i=require("react"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),b=require("./utils-CITgSxXe.cjs"),N=require("./breakpoints-CcVm-gVm.cjs"),me=require("./Icon.cjs"),ce=require("./ShopAvatar-CV3lj34D.cjs"),$e=require("./Badge.cjs"),ue=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),de=require("./IconButton.cjs"),pe=require("./useDetectMobile-DYV6V1yw.cjs"),_e=require("./index-CX2A-q39.cjs"),ke=require("./motion-B_VPZaJq.cjs"),s=require("./style-BAcV7F53.cjs"),Ce=j.styled.a`
2
2
  text-decoration: none;
3
3
  color: var(--gray-950);
4
4
  cursor: pointer;
@@ -19,12 +19,30 @@
19
19
  background: #ffffff;
20
20
  `}
21
21
 
22
+ &.horizontal-campaign-item {
23
+ flex-direction: row;
24
+
25
+ & img {
26
+ max-width: 13.75rem;
27
+ max-height: 13.75rem;
28
+ }
29
+ }
30
+
22
31
  @media ${N.down("S")} {
23
32
  width: 100%;
24
33
  gap: 0;
34
+
35
+ &.horizontal-campaign-item {
36
+ flex-direction: column;
37
+
38
+ & img {
39
+ max-width: 100%;
40
+ max-height: 100%;
41
+ }
42
+ }
25
43
  }
26
- `,Ie=y.styled.div`
27
- border-radius: ${n=>f.getBorderRadiusValueWithUnits(n.theme,"edged")};
44
+ `,Ie=j.styled.div`
45
+ border-radius: ${n=>b.getBorderRadiusValueWithUnits(n.theme,"edged")};
28
46
  cursor: pointer;
29
47
 
30
48
  position: relative;
@@ -47,7 +65,7 @@
47
65
  @media ${N.down("S")} {
48
66
  width: 14.5rem;
49
67
  }
50
- `,De=y.styled.div`
68
+ `,Ne=j.styled.div`
51
69
  flex: 1;
52
70
  display: flex;
53
71
  flex-direction: column;
@@ -155,13 +173,13 @@
155
173
  gap: 0.25rem;
156
174
  }
157
175
  }
158
- `,ge=(n=!1,t=!1,s=!1)=>`
176
+ `,ge=(n=!1,t=!1,a=!1)=>`
159
177
  display: flex;
160
178
  ${t?"flex-wrap: wrap;":""}
161
179
  ${t?"":"flex-wrap: nowrap;"}
162
180
  ${n?"align-items: center;":""}
163
- ${s?"justify-content: center;":""}
164
- `,Ne=y.styled.a`
181
+ ${a?"justify-content: center;":""}
182
+ `,De=j.styled.a`
165
183
  text-decoration: none;
166
184
  color: var(--gray-950);
167
185
  ${n=>n.hasPermission===!0&&"cursor: pointer"};
@@ -185,7 +203,7 @@
185
203
  font-weight: 500;
186
204
  font-size: 1rem;
187
205
  line-height: 1.5rem;
188
- border-radius: ${n=>f.getBorderRadiusValueWithUnits(n.theme,"slight")};
206
+ border-radius: ${n=>b.getBorderRadiusValueWithUnits(n.theme,"slight")};
189
207
  transition: all 0.25s ease;
190
208
  & .description {
191
209
  font-size: 0.85rem;
@@ -237,14 +255,14 @@
237
255
  padding: 0;
238
256
  font-size: 0.875rem;
239
257
  }
240
- `,Pe=y.styled.div`
258
+ `,Pe=j.styled.div`
241
259
  position: absolute;
242
260
  top: 0.5rem;
243
261
  ${n=>n.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
244
262
  display: flex;
245
263
  gap: 0.25rem;
246
- `,Te=y.styled.div`
247
- border-radius: ${n=>f.getBorderRadiusValueWithUnits(n.theme,n.borderRadius||"slight")};
264
+ `,ze=j.styled.div`
265
+ border-radius: ${n=>b.getBorderRadiusValueWithUnits(n.theme,n.borderRadius||"slight")};
248
266
  background-color: ${n=>n==null?void 0:n.color};
249
267
  color: white;
250
268
  height: 1.5rem;
@@ -259,7 +277,7 @@
259
277
  & i {
260
278
  font-size: 0.813rem;
261
279
  }
262
- `,Le=l.forwardRef(({src:n,...t},s)=>{const o=l.useRef();return l.useEffect(()=>{var h;const d=g=>{g.target.src=ce.DefaultShopImage,g.onerror=null};return(h=o==null?void 0:o.current)==null||h.addEventListener("error",d),()=>{var g;(g=o==null?void 0:o.current)==null||g.removeEventListener("error",d)}},[]),r.jsx(l.Fragment,{ref:s,children:f.isDefinedNotEmptyString(n)?r.jsx("img",{ref:o,src:n,...t}):r.jsx("img",{src:ce.DefaultShopImage,...t})})}),ze=n=>{const{uuid:t,hasPermission:s=!0,isUser:o,image:d,imageComponent:h,name:g,notifications:u=0,color:w="primary",size:i="large",style:v,disabled:m,onClick:$=()=>{},isActive:S,className:j,shopCategory:P,themeData:k,LinkComponent:C}=n,c=C||"a",I={theme:me.useTheme(),color:w,size:i,style:v,disabled:m};return l.createElement(Ne,{onClick:p=>{p==null||p.preventDefault(),p.stopPropagation(),s===!0&&($==null||$())},...I,key:g,className:`profile-item ${j}`,hasPermission:s,isActive:S,themeColor:(k==null?void 0:k.code)||"transparent",as:c,...C?{to:`/${o?"user":"shop"}/${t}`}:{href:`/${o?"user":"shop"}/${t}`}},r.jsx("div",{className:"logo-wrapper",children:f.isDefined(h)?h:d}),r.jsxs("div",{children:[r.jsx("div",{className:"name",children:g}),!o&&r.jsx("div",{className:"description",children:P}),u>0&&r.jsx("div",{className:"notifications-number",children:r.jsx($e,{className:"badge",color:"danger",size:"small",children:u>99?"99+":u})})]}))},he=n=>{if(n!==void 0){const t=new Date(n),s=t.getFullYear(),o=t.getMonth()+1;return`${String(t.getDate()).padStart(2)}. ${o}. ${s}.`}},Re=l.forwardRef((n,t)=>{var le;const s=me.useTheme(),{uuid:o,shopUuid:d,title:h="",coverPhoto:g,onSelect:u,startDate:w,endDate:i,salesPackages:v,shopName:m,shopCategory:$,shopImage:S,shopImageComponent:j,className:P,onSelectCard:k=()=>{},onSelectShop:C=()=>{},upcoming:c=!1,upcomingCampaignText:x,campaignSingleText:I,salesCampaignTypes:p=[],startsInPrefixTextPlural:B,startsinSuffixTextPlural:V,startsInPrefixTextSingular:G,startsinSuffixTextSingular:re,endsInPrefixTextPlural:F,endsinSuffixTextPlural:A,endsInPrefixTextSingular:U,endsinSuffixTextSingular:H,endedText:Y,themeData:ne,numberOfListings:L,numberOfListingsTextSingular:Z,numberOfListingsTextPlural:q,metadata:e,LinkComponent:W,sponsored:te,...J}=n,fe=W||"a",oe=l.useRef(),E=f.getDayNumberPrecise(w,i),K=E!==-1&&(E==null?void 0:E.isEnded)===!0,Q=E!==-1&&!K,X=f.calcDaysUntil(w),z=f.calcDaysRemaining(i),xe=z!==null&&z<=2&&z>0,se=f.normalizeDate(i),ae=se?new Date(se):null,be=new Date,ee=ae?ae.getTime()-be.getTime():null,M=ee!==null&&ee>0&&ee<24*60*60*1e3,ie=(b,R,D,_,T)=>D===1?`${b} ${D} ${_}`:`${R} ${D} ${T}`,we=()=>{if(!i)return null;const b=f.normalizeDate(i),R=b?new Date(b):null;if(!R)return null;const D=ve,_=R.getTime()-D.getTime();if(_<=0)return null;const T=Math.floor(_/(1e3*60*60)),je=Math.floor(_%(1e3*60*60)/(1e3*60)),ye=Math.floor(_%(1e3*60)/1e3);return{hours:T,minutes:je,seconds:ye}},[ve,Se]=l.useState(new Date);l.useEffect(()=>{if(!M)return;const b=setInterval(()=>{Se(new Date)},1e3);return()=>clearInterval(b)},[M]);const O=M?we():null;return r.jsxs(Ce,{ref:oe,theme:s,className:P,name:e==null?void 0:e.name,"data-accessor":e==null?void 0:e.accessor,onClick:b=>k(b,oe),as:fe,...W?{to:`/shop/${d}/campaign/${o}`}:{href:`/shop/${d}/campaign/${o}`},sponsored:te,...J,children:[r.jsxs(Ie,{theme:s,children:[r.jsx("img",{src:g}),r.jsx(Pe,{children:v==null?void 0:v.map((b,R)=>{var D,_;return r.jsx(Te,{color:(D=p==null?void 0:p.find(T=>T.value===b))==null?void 0:D.color,theme:s,children:r.jsx(ue,{icon:(_=p==null?void 0:p.find(T=>T.value===b))==null?void 0:_.icon})},`package__${R}`)})})]}),r.jsxs(De,{theme:s,children:[r.jsx("div",{className:"text-block-wrapper",children:r.jsxs("div",{className:"title-block-wrapper",children:[r.jsx("div",{className:"campaign-title",children:(le=c?x:I)==null?void 0:le.toUpperCase()}),r.jsx("div",{className:"campaign-title-text",children:h}),i&&w&&r.jsxs("div",{className:"campaign-date",children:[he(w)," - ",he(i)]}),r.jsxs("div",{className:"timestamp-text",children:[L>0&&r.jsxs("span",{className:"listings-text",children:[L," ",L===1?Z:q," ","∙"," "]}),r.jsx("span",{className:`duration-text ${xe?"urgent":""} ${Q?"":"starts-in"}`,children:M&&O?r.jsxs("div",{className:"countdown-timer",children:[U," ",O.hours.toString().padStart(2,"0"),":",O.minutes.toString().padStart(2,"0"),":",O.seconds.toString().padStart(2,"0")]}):Q&&!K&&z!==null&&z>0?ie(U,F,z,H,A):K?Y||"Završena":!Q&&X!==null&&X>0?ie(G,B,X,re,V):null})]})]})}),r.jsx(ze,{hasPermission:!0,image:r.jsx(Le,{src:S}),imageComponent:j,themeData:ne,isActive:!0,isUser:!1,name:m,shopCategory:$,uuid:d,onClick:()=>C(d)})]})]})}),Ee=y.styled.div`
280
+ `,Te=i.forwardRef(({src:n,...t},a)=>{const o=i.useRef();return i.useEffect(()=>{var u;const l=p=>{p.target.src=ce.DefaultShopImage,p.onerror=null};return(u=o==null?void 0:o.current)==null||u.addEventListener("error",l),()=>{var p;(p=o==null?void 0:o.current)==null||p.removeEventListener("error",l)}},[]),r.jsx(i.Fragment,{ref:a,children:b.isDefinedNotEmptyString(n)?r.jsx("img",{ref:o,src:n,...t}):r.jsx("img",{src:ce.DefaultShopImage,...t})})}),Le=n=>{const{uuid:t,hasPermission:a=!0,isUser:o,image:l,imageComponent:u,name:p,notifications:y=0,color:c="primary",size:f="large",style:d,disabled:k,onClick:m=()=>{},isActive:D,className:v,shopCategory:S,themeData:$,LinkComponent:C}=n,P=C||"a",x={theme:ue.useTheme(),color:c,size:f,style:d,disabled:k};return i.createElement(De,{onClick:h=>{h==null||h.preventDefault(),h.stopPropagation(),a===!0&&(m==null||m())},...x,key:p,className:`profile-item ${v}`,hasPermission:a,isActive:D,themeColor:($==null?void 0:$.code)||"transparent",as:P,...C?{to:`/${o?"user":"shop"}/${t}`}:{href:`/${o?"user":"shop"}/${t}`}},r.jsx("div",{className:"logo-wrapper",children:b.isDefined(u)?u:l}),r.jsxs("div",{children:[r.jsx("div",{className:"name",children:p}),!o&&r.jsx("div",{className:"description",children:S}),y>0&&r.jsx("div",{className:"notifications-number",children:r.jsx($e,{className:"badge",color:"danger",size:"small",children:y>99?"99+":y})})]}))},he=n=>{if(n!==void 0){const t=new Date(n),a=t.getFullYear(),o=t.getMonth()+1;return`${String(t.getDate()).padStart(2)}. ${o}. ${a}.`}},Re=i.forwardRef((n,t)=>{var le;const a=ue.useTheme(),{uuid:o,shopUuid:l,title:u="",coverPhoto:p,onSelect:y,startDate:c,endDate:f,salesPackages:d,shopName:k,shopCategory:m,shopImage:D,shopImageComponent:v,className:S,onSelectCard:$=()=>{},onSelectShop:C=()=>{},upcoming:P=!1,upcomingCampaignText:g,campaignSingleText:x,salesCampaignTypes:h=[],startsInPrefixTextPlural:B,startsinSuffixTextPlural:V,startsInPrefixTextSingular:G,startsinSuffixTextSingular:F,endsInPrefixTextPlural:A,endsinSuffixTextPlural:H,endsInPrefixTextSingular:U,endsinSuffixTextSingular:Y,endedText:Z,themeData:ne,numberOfListings:z,numberOfListingsTextSingular:J,numberOfListingsTextPlural:q,metadata:e,LinkComponent:W,sponsored:te,...K}=n,fe=W||"a",oe=i.useRef(),E=b.getDayNumberPrecise(c,f),Q=E!==-1&&(E==null?void 0:E.isEnded)===!0,X=E!==-1&&!Q,ee=b.calcDaysUntil(c),L=b.calcDaysRemaining(f),xe=L!==null&&L<=2&&L>0,ae=b.normalizeDate(f),se=ae?new Date(ae):null,be=new Date,re=se?se.getTime()-be.getTime():null,M=re!==null&&re>0&&re<24*60*60*1e3,ie=(w,R,I,_,T)=>I===1?`${w} ${I} ${_}`:`${R} ${I} ${T}`,we=()=>{if(!f)return null;const w=b.normalizeDate(f),R=w?new Date(w):null;if(!R)return null;const I=ve,_=R.getTime()-I.getTime();if(_<=0)return null;const T=Math.floor(_/(1e3*60*60)),je=Math.floor(_%(1e3*60*60)/(1e3*60)),ye=Math.floor(_%(1e3*60)/1e3);return{hours:T,minutes:je,seconds:ye}},[ve,Se]=i.useState(new Date);i.useEffect(()=>{if(!M)return;const w=setInterval(()=>{Se(new Date)},1e3);return()=>clearInterval(w)},[M]);const O=M?we():null;return r.jsxs(Ce,{ref:oe,theme:a,className:S,name:e==null?void 0:e.name,"data-accessor":e==null?void 0:e.accessor,onClick:w=>$(w,oe),as:fe,...W?{to:`/shop/${l}/campaign/${o}`}:{href:`/shop/${l}/campaign/${o}`},sponsored:te,...K,children:[r.jsxs(Ie,{theme:a,children:[r.jsx("img",{src:p}),r.jsx(Pe,{children:d==null?void 0:d.map((w,R)=>{var I,_;return r.jsx(ze,{color:(I=h==null?void 0:h.find(T=>T.value===w))==null?void 0:I.color,theme:a,children:r.jsx(me,{icon:(_=h==null?void 0:h.find(T=>T.value===w))==null?void 0:_.icon})},`package__${R}`)})})]}),r.jsxs(Ne,{theme:a,children:[r.jsx("div",{className:"text-block-wrapper",children:r.jsxs("div",{className:"title-block-wrapper",children:[r.jsx("div",{className:"campaign-title",children:(le=P?g:x)==null?void 0:le.toUpperCase()}),r.jsx("div",{className:"campaign-title-text",children:u}),f&&c&&r.jsxs("div",{className:"campaign-date",children:[he(c)," - ",he(f)]}),r.jsxs("div",{className:"timestamp-text",children:[z>0&&r.jsxs("span",{className:"listings-text",children:[z," ",z===1?J:q," ","∙"," "]}),r.jsx("span",{className:`duration-text ${xe?"urgent":""} ${X?"":"starts-in"}`,children:M&&O?r.jsxs("div",{className:"countdown-timer",children:[U," ",O.hours.toString().padStart(2,"0"),":",O.minutes.toString().padStart(2,"0"),":",O.seconds.toString().padStart(2,"0")]}):X&&!Q&&L!==null&&L>0?ie(U,A,L,Y,H):Q?Z||"Završena":!X&&ee!==null&&ee>0?ie(G,B,ee,F,V):null})]})]})}),r.jsx(Le,{hasPermission:!0,image:r.jsx(Te,{src:D}),imageComponent:v,themeData:ne,isActive:!0,isUser:!1,name:k,shopCategory:m,uuid:l,onClick:()=>C(l)})]})]})}),Ee=j.styled.div`
263
281
  margin: 0 auto;
264
282
  display: flex;
265
283
  flex-direction: column;
@@ -298,6 +316,18 @@
298
316
  right: 0;
299
317
  }
300
318
 
319
+ &.itemless {
320
+ & .scrollable-section__content {
321
+ &:has(.campaign-item:nth-child(3):last-child) {
322
+ & .campaign-item {
323
+ &:last-child {
324
+ grid-column: span 2;
325
+ }
326
+ }
327
+ }
328
+ }
329
+ }
330
+
301
331
  @media ${N.down("S")} {
302
332
  gap: 1.25rem;
303
333
 
@@ -310,7 +340,7 @@
310
340
  }
311
341
  }
312
342
  }
313
- `,Ue=y.styled(_e.motion.div)`
343
+ `,Ue=j.styled(ke.motion.div)`
314
344
  display: grid;
315
345
  grid-template-columns: repeat(${n=>n==null?void 0:n.numOfColumns}, 1fr);
316
346
  gap: 1.5rem;
@@ -342,7 +372,7 @@
342
372
  /* Safari and Chrome */
343
373
  }
344
374
  }
345
- `,qe=l.forwardRef(({icon:n,title:t,numOfSlides:s=4,tabletNumOfSlides:o,showNavigation:d=!0,hasNextPage:h=!1,handleFetchNextPage:g=()=>{},children:u},w)=>{const[i,v]=l.useState(0),[m,$]=l.useState(1),S=pe.useDetectMobile(),j=(u==null?void 0:u.length)??1;l.useEffect(()=>{const c=()=>{$(s)};return window.addEventListener("resize",c),c(),()=>window.removeEventListener("resize",c)},[]);const P=S?u:u==null?void 0:u.slice(i,i+m),k=c=>{var I;(I=c==null?void 0:c.target)==null||I.blur();const x=i+m;x<j&&v(x),x+m>=j&&h&&g()},C=c=>{var x;(x=c==null?void 0:c.target)==null||x.blur(),i-m>=0&&v(i-m)};return r.jsxs(Ee,{ref:w,children:[r.jsx("div",{className:"scrollable-section__header",children:r.jsxs("div",{className:"scrollable-section__title",children:[f.isDefinedNotEmptyString(n)&&r.jsx(ue,{icon:n,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),f.isDefinedNotEmptyString(t)&&r.jsxs("div",{className:"title__text",children:[" ",t]})]})}),r.jsxs(Ue,{numOfColumns:s,tabletNumOfColumns:o,...!S&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},children:[P,S&&h&&r.jsx(ke.InfiniteScrollEndElement,{onIsVisible:g})]},`scrollable-section__content-${i}`),d&&j>m&&!S&&r.jsxs("div",{className:"scrollable-section__navigation",children:[r.jsx(de,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:i===0,onClick:C}),r.jsx(de,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:i+m>=j,onClick:k})]})]})}),We=y.styled.div`
375
+ `,qe=i.forwardRef(({icon:n,title:t,numOfSlides:a=4,tabletNumOfSlides:o,showNavigation:l=!0,hasNextPage:u=!1,className:p="",handleFetchNextPage:y=()=>{},children:c},f)=>{const[d,k]=i.useState(0),[m,D]=i.useState(1),v=pe.useDetectMobile(),S=(c==null?void 0:c.length)??1;i.useEffect(()=>{const g=()=>{D(a)};return window.addEventListener("resize",g),g(),()=>window.removeEventListener("resize",g)},[]);const $=v?c:c==null?void 0:c.slice(d,d+m),C=g=>{var h;(h=g==null?void 0:g.target)==null||h.blur();const x=d+m;x<S&&k(x),x+m>=S&&u&&y()},P=g=>{var x;(x=g==null?void 0:g.target)==null||x.blur(),d-m>=0&&k(d-m)};return r.jsxs(Ee,{ref:f,className:p,children:[r.jsx("div",{className:"scrollable-section__header",children:r.jsxs("div",{className:"scrollable-section__title",children:[b.isDefinedNotEmptyString(n)&&r.jsx(me,{icon:n,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),b.isDefinedNotEmptyString(t)&&r.jsxs("div",{className:"title__text",children:[" ",t]})]})}),r.jsxs(Ue,{numOfColumns:a,tabletNumOfColumns:o,...!v&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},className:"scrollable-section__content",children:[$,v&&u&&r.jsx(_e.InfiniteScrollEndElement,{onIsVisible:y})]},`scrollable-section__content-${d}`),l&&S>m&&!v&&r.jsxs("div",{className:"scrollable-section__navigation",children:[r.jsx(de,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:d===0,onClick:P}),r.jsx(de,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:d+m>=S,onClick:C})]})]})}),We=j.styled.div`
346
376
  display: flex;
347
377
  flex: 1;
348
378
  width: 100%;
@@ -359,7 +389,7 @@
359
389
  border-radius: 1.25rem;
360
390
  object-fit: cover;
361
391
  }
362
- `,Me=l.forwardRef(({sectionName:n,imageUrl:t,maxHeight:s="16.25rem",className:o="",handleClick:d=()=>{}},h)=>r.jsx(We,{ref:h,maxHeight:s,onClick:d,className:`itemless-banner ${o}`,children:r.jsx("img",{src:t,alt:`itemless-banner__${n}`})})),Oe=y.styled(a.SkeletonRowWrapper)`
392
+ `,Me=i.forwardRef(({sectionName:n,imageUrl:t,maxHeight:a="16.25rem",className:o="",handleClick:l=()=>{}},u)=>r.jsx(We,{ref:u,maxHeight:a,onClick:l,className:`itemless-banner ${o}`,children:r.jsx("img",{src:t,alt:`itemless-banner__${n}`})})),Oe=j.styled(s.SkeletonRowWrapper)`
363
393
  @media ${N.down("S")} {
364
394
  flex-direction: column;
365
395
 
@@ -374,4 +404,4 @@
374
404
  }
375
405
  }
376
406
  }
377
- `,Be=({keyPrefix:n})=>r.jsxs(Oe,{children:[r.jsxs(a.SkeletonRowWrapper,{children:[r.jsx(a.SkeletonSquarePlaceholder,{width:"13.75rem",height:"13.75rem",className:"skeleton__image"},`${n}-1`),r.jsxs(a.SkeletonColumnWrapper,{noGradient:!0,children:[r.jsx(a.SkeletonLinePlaceholder,{height:"1rem"}),r.jsx(a.SkeletonLinePlaceholder,{height:"1.75rem"}),r.jsx(a.SkeletonLinePlaceholder,{height:"1.25rem"}),r.jsx(a.SkeletonLinePlaceholder,{height:"2rem"}),r.jsxs(a.SkeletonRowWrapper,{alignItems:"center",noGradient:!0,children:[r.jsx(a.SkeletonCirclePlaceholder,{width:"2.5rem",height:"2.5rem"}),r.jsx(a.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]}),r.jsxs(a.SkeletonRowWrapper,{noGradient:!0,children:[r.jsx(a.SkeletonSquarePlaceholder,{width:"13.75rem",height:"13.75rem",className:"skeleton__image"},`${n}-2`),r.jsxs(a.SkeletonColumnWrapper,{noGradient:!0,children:[r.jsx(a.SkeletonLinePlaceholder,{height:"1rem"}),r.jsx(a.SkeletonLinePlaceholder,{height:"1.75rem"}),r.jsx(a.SkeletonLinePlaceholder,{height:"1.25rem"}),r.jsx(a.SkeletonLinePlaceholder,{height:"2rem"}),r.jsxs(a.SkeletonRowWrapper,{alignItems:"center",noGradient:!0,children:[r.jsx(a.SkeletonCirclePlaceholder,{width:"2.5rem",height:"2.5rem"}),r.jsx(a.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]})]}),Ve=({keyPrefix:n,isLoading:t=!1,fallbackComponent:s=r.jsx(r.Fragment,{}),children:o})=>r.jsx(l.Suspense,{fallbackComponent:s,children:t===!0?r.jsx(Be,{keyPrefix:n}):o}),Ge=l.memo(Re),Fe=l.forwardRef(({sellerType:n="Shop",items:t=[],title:s,icon:o,isLoading:d,onSelectCard:h=()=>{},onSelectShop:g=()=>{},getImage:u=()=>{},campaignSingleText:w,upcomingCampaignText:i,salesCampaignTypes:v=[],startsInPrefixTextPlural:m,startsinSuffixTextPlural:$,startsInPrefixTextSingular:S,startsinSuffixTextSingular:j,endsInPrefixTextPlural:P,endsinSuffixTextPlural:k,endsInPrefixTextSingular:C,endsinSuffixTextSingular:c,endedText:x,numOfSlides:I=4,showNavigation:p=!0,numberOfListingsTextSingular:B,numberOfListingsTextPlural:V,itemlessImageUrl:G,itemlessLink:re,handleItemlessLink:F=()=>{},componentName:A,hasNextPage:U=!1,handleFetchNextPage:H=()=>{},LinkComponent:Y},ne)=>{const L=pe.useDetectMobile(),Z=l.useMemo(()=>{let q=t==null?void 0:t.map((e,W)=>r.jsx(Ge,{className:"campaign-item",coverPhoto:u(e==null?void 0:e.coverPhoto,(e==null?void 0:e.uuid)||(e==null?void 0:e.campaignUuid)),description:e==null?void 0:e.description,endDate:e==null?void 0:e.endDate,salesPackages:e==null?void 0:e.salesPackages,sellerType:n,shopImage:e==null?void 0:e.profileImage,shopImageComponent:e==null?void 0:e.profileImageComponent,shopName:e==null?void 0:e.shopName,shopUuid:e==null?void 0:e.shopUuid,shopCategory:e==null?void 0:e.shopCategory,startDate:e==null?void 0:e.startDate,title:e==null?void 0:e.name,uuid:e==null?void 0:e.campaignUuid,onSelectCard:(te,J)=>h(e==null?void 0:e.campaignUuid,e==null?void 0:e.shopUuid,J),onSelectShop:()=>g(e==null?void 0:e.shopUuid),campaignSingleText:w,upcomingCampaignText:i,upcoming:e==null?void 0:e.upcoming,salesCampaignTypes:v,startsInPrefixTextPlural:m,startsinSuffixTextPlural:$,startsInPrefixTextSingular:S,startsinSuffixTextSingular:j,endsInPrefixTextPlural:P,endsinSuffixTextPlural:k,endsInPrefixTextSingular:C,endsinSuffixTextSingular:c,endedText:x,themeData:e==null?void 0:e.themeData,numberOfListings:e==null?void 0:e.numberOfListings,numberOfListingsTextSingular:B,numberOfListingsTextPlural:V,metadata:{name:A,accessor:e==null?void 0:e.accessor},LinkComponent:Y,sponsored:e==null?void 0:e.sponsored},`campaign__item__${W}__${e==null?void 0:e.startDate}___${e==null?void 0:e.endDate}`));return(t==null?void 0:t.length)<4&&!L?[...q,r.jsx(Me,{imageUrl:G,className:"campaign-item",handleClick:F},"itemless-campaign-section-banner")]:q},[t]);return r.jsx(Ve,{isLoading:d,keyPrefix:"sales-campaign-skeleton",children:r.jsx(qe,{icon:o,title:s,numOfSlides:I,tabletNumOfSlides:2,showNavigation:p,hasNextPage:U,handleFetchNextPage:H,children:Z},`sales-campaign-section__${L}`)})});module.exports=Fe;
407
+ `,Be=({keyPrefix:n})=>r.jsxs(Oe,{children:[r.jsxs(s.SkeletonRowWrapper,{children:[r.jsx(s.SkeletonSquarePlaceholder,{width:"13.75rem",height:"13.75rem",className:"skeleton__image"},`${n}-1`),r.jsxs(s.SkeletonColumnWrapper,{noGradient:!0,children:[r.jsx(s.SkeletonLinePlaceholder,{height:"1rem"}),r.jsx(s.SkeletonLinePlaceholder,{height:"1.75rem"}),r.jsx(s.SkeletonLinePlaceholder,{height:"1.25rem"}),r.jsx(s.SkeletonLinePlaceholder,{height:"2rem"}),r.jsxs(s.SkeletonRowWrapper,{alignItems:"center",noGradient:!0,children:[r.jsx(s.SkeletonCirclePlaceholder,{width:"2.5rem",height:"2.5rem"}),r.jsx(s.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]}),r.jsxs(s.SkeletonRowWrapper,{noGradient:!0,children:[r.jsx(s.SkeletonSquarePlaceholder,{width:"13.75rem",height:"13.75rem",className:"skeleton__image"},`${n}-2`),r.jsxs(s.SkeletonColumnWrapper,{noGradient:!0,children:[r.jsx(s.SkeletonLinePlaceholder,{height:"1rem"}),r.jsx(s.SkeletonLinePlaceholder,{height:"1.75rem"}),r.jsx(s.SkeletonLinePlaceholder,{height:"1.25rem"}),r.jsx(s.SkeletonLinePlaceholder,{height:"2rem"}),r.jsxs(s.SkeletonRowWrapper,{alignItems:"center",noGradient:!0,children:[r.jsx(s.SkeletonCirclePlaceholder,{width:"2.5rem",height:"2.5rem"}),r.jsx(s.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]})]}),Ve=({keyPrefix:n,isLoading:t=!1,fallbackComponent:a=r.jsx(r.Fragment,{}),children:o})=>r.jsx(i.Suspense,{fallbackComponent:a,children:t===!0?r.jsx(Be,{keyPrefix:n}):o}),Ge=i.memo(Re),Fe=i.forwardRef(({sellerType:n="Shop",items:t=[],title:a,icon:o,isLoading:l,onSelectCard:u=()=>{},onSelectShop:p=()=>{},getImage:y=()=>{},campaignSingleText:c,upcomingCampaignText:f,salesCampaignTypes:d=[],startsInPrefixTextPlural:k,startsinSuffixTextPlural:m,startsInPrefixTextSingular:D,startsinSuffixTextSingular:v,endsInPrefixTextPlural:S,endsinSuffixTextPlural:$,endsInPrefixTextSingular:C,endsinSuffixTextSingular:P,endedText:g,numOfSlides:x=4,showNavigation:h=!0,numberOfListingsTextSingular:B,numberOfListingsTextPlural:V,itemlessImageUrl:G,itemlessMaxHeight:F,handleItemlessLink:A=()=>{},componentName:H,hasNextPage:U=!1,handleFetchNextPage:Y=()=>{},LinkComponent:Z},ne)=>{const z=pe.useDetectMobile(),J=i.useMemo(()=>{let q=t==null?void 0:t.map((e,W)=>r.jsx(Ge,{className:`campaign-item ${(t==null?void 0:t.length)===1?"horizontal-campaign-item":""}`,coverPhoto:y(e==null?void 0:e.coverPhoto,(e==null?void 0:e.uuid)||(e==null?void 0:e.campaignUuid)),description:e==null?void 0:e.description,endDate:e==null?void 0:e.endDate,salesPackages:e==null?void 0:e.salesPackages,sellerType:n,shopImage:e==null?void 0:e.profileImage,shopImageComponent:e==null?void 0:e.profileImageComponent,shopName:e==null?void 0:e.shopName,shopUuid:e==null?void 0:e.shopUuid,shopCategory:e==null?void 0:e.shopCategory,startDate:e==null?void 0:e.startDate,title:e==null?void 0:e.name,uuid:e==null?void 0:e.campaignUuid,onSelectCard:(te,K)=>u(e==null?void 0:e.campaignUuid,e==null?void 0:e.shopUuid,K),onSelectShop:()=>p(e==null?void 0:e.shopUuid),campaignSingleText:c,upcomingCampaignText:f,upcoming:e==null?void 0:e.upcoming,salesCampaignTypes:d,startsInPrefixTextPlural:k,startsinSuffixTextPlural:m,startsInPrefixTextSingular:D,startsinSuffixTextSingular:v,endsInPrefixTextPlural:S,endsinSuffixTextPlural:$,endsInPrefixTextSingular:C,endsinSuffixTextSingular:P,endedText:g,themeData:e==null?void 0:e.themeData,numberOfListings:e==null?void 0:e.numberOfListings,numberOfListingsTextSingular:B,numberOfListingsTextPlural:V,metadata:{name:H,accessor:e==null?void 0:e.accessor},LinkComponent:Z,sponsored:e==null?void 0:e.sponsored},`campaign__item__${W}__${e==null?void 0:e.startDate}___${e==null?void 0:e.endDate}`));return(t==null?void 0:t.length)<4&&!z?[...q,r.jsx(Me,{imageUrl:G,className:"campaign-item",maxHeight:F,handleClick:A},"itemless-campaign-section-banner")]:q},[t]);return r.jsx(Ve,{isLoading:l,keyPrefix:"sales-campaign-skeleton",children:r.jsx(qe,{icon:o,title:a,numOfSlides:x,tabletNumOfSlides:2,showNavigation:h,hasNextPage:U,handleFetchNextPage:Y,className:(t==null?void 0:t.length)<4&&!z?"itemless":"",children:J},`sales-campaign-section__${z}`)})});module.exports=Fe;