officialblock 1.0.7 → 1.0.8

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.
Files changed (73) hide show
  1. package/dist/index-Ch_ldWmA.js +1 -0
  2. package/dist/index-DXm2cqxo.mjs +485 -0
  3. package/dist/official-block.cjs.js +74 -74
  4. package/dist/official-block.es.js +13576 -10831
  5. package/dist/official-block.umd.js +78 -78
  6. package/dist/style.css +1 -1
  7. package/dist/swiper-JiLDDxAF.js +1 -0
  8. package/dist/swiper-acbnDJoL.mjs +2035 -0
  9. package/dist/utils-DD-vVZej.mjs +316 -0
  10. package/dist/utils-DOLLD0-F.js +1 -0
  11. package/package.json +2 -1
  12. package/src/components/ArticleList/article.vue +3 -3
  13. package/src/components/ArticleList/contact.vue +9 -9
  14. package/src/components/ArticleList/index.ts +1 -1
  15. package/src/components/ArticleList/index.vue +22 -80
  16. package/src/components/ArticleList/setting.vue +61 -71
  17. package/src/components/ArticleList/type.ts +12 -18
  18. package/src/components/BannerImage/index.ts +11 -0
  19. package/src/components/BannerImage/index.vue +153 -0
  20. package/src/components/BannerImage/setting.vue +55 -0
  21. package/src/components/BannerImage/type.ts +10 -0
  22. package/src/components/BannerPage/index.ts +11 -0
  23. package/src/components/BannerPage/index.vue +283 -0
  24. package/src/components/BannerPage/setting.vue +55 -0
  25. package/src/components/BannerPage/type.ts +10 -0
  26. package/src/components/BtnList/index.ts +11 -0
  27. package/src/components/BtnList/index.vue +588 -0
  28. package/src/components/BtnList/setting.vue +255 -0
  29. package/src/components/BtnList/type.ts +10 -0
  30. package/src/components/Button/index.vue +45 -33
  31. package/src/components/CustomSpace/index.ts +11 -0
  32. package/src/components/CustomSpace/index.vue +82 -0
  33. package/src/components/CustomSpace/setting.vue +89 -0
  34. package/src/components/CustomSpace/type.ts +10 -0
  35. package/src/components/GalleryList/index.ts +12 -0
  36. package/src/components/GalleryList/index.vue +311 -0
  37. package/src/components/GalleryList/setting.vue +268 -0
  38. package/src/components/GalleryList/type.ts +10 -0
  39. package/src/components/HeroSlide/index.ts +1 -1
  40. package/src/components/HeroSlide/index.vue +85 -133
  41. package/src/components/HeroSlide/setting.vue +435 -0
  42. package/src/components/HeroSlide/type.ts +5 -14
  43. package/src/components/LinkLIst/index.ts +11 -0
  44. package/src/components/LinkLIst/index.vue +317 -0
  45. package/src/components/LinkLIst/setting.vue +264 -0
  46. package/src/components/LinkLIst/type.ts +10 -0
  47. package/src/components/Media/index.vue +18 -18
  48. package/src/components/Operate/index.vue +17 -7
  49. package/src/components/Profile/index.vue +999 -0
  50. package/src/components/Profile/modal.vue +56 -0
  51. package/src/components/Profile/setting.vue +330 -0
  52. package/src/components/QuickLinks/index.vue +166 -0
  53. package/src/components/QuoteText/index.ts +11 -0
  54. package/src/components/QuoteText/index.vue +133 -0
  55. package/src/components/QuoteText/setting.vue +81 -0
  56. package/src/components/QuoteText/type.ts +10 -0
  57. package/src/components/ScrollKeyInfo/index.vue +0 -0
  58. package/src/components/Swiper/index.vue +538 -0
  59. package/src/components/index.ts +23 -5
  60. package/src/index.ts +56 -12
  61. package/src/main.ts +6 -3
  62. package/src/router/index.ts +6 -0
  63. package/src/style.css +17 -0
  64. package/src/styles/component-isolation.scss +256 -0
  65. package/src/styles/editor.scss +1 -1
  66. package/src/styles/layers.scss +256 -0
  67. package/src/styles/main.scss +21687 -0
  68. package/src/styles/mixins/style-isolation.scss +262 -0
  69. package/src/styles/smart-reset.scss +287 -0
  70. package/src/styles/test.scss +1 -1
  71. package/src/types/button.ts +10 -0
  72. package/src/views/StyleIsolationTest.vue +292 -0
  73. package/src/views/components/ArticleListDemo.vue +49 -10
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./utils-DOLLD0-F.js");function H(A,e,D,p){return A.params.createElements&&Object.keys(p).forEach(d=>{if(!D[d]&&D.auto===!0){let o=c.elementChildren(A.el,`.${p[d]}`)[0];o||(o=c.createElement("div",p[d]),o.className=p[d],A.el.append(o)),D[d]=o,e[d]=o}}),D}function R(A){let{swiper:e,extendParams:D,on:p,emit:d}=A;D({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null};function o(n){let s;return n&&typeof n=="string"&&e.isElement&&(s=e.el.querySelector(n)||e.hostEl.querySelector(n),s)?s:(n&&(typeof n=="string"&&(s=[...document.querySelectorAll(n)]),e.params.uniqueNavElements&&typeof n=="string"&&s&&s.length>1&&e.el.querySelectorAll(n).length===1?s=e.el.querySelector(n):s&&s.length===1&&(s=s[0])),n&&!s?n:s)}function x(n,s){const u=e.params.navigation;n=c.makeElementsArray(n),n.forEach(r=>{r&&(r.classList[s?"add":"remove"](...u.disabledClass.split(" ")),r.tagName==="BUTTON"&&(r.disabled=s),e.params.watchOverflow&&e.enabled&&r.classList[e.isLocked?"add":"remove"](u.lockClass))})}function b(){const{nextEl:n,prevEl:s}=e.navigation;if(e.params.loop){x(s,!1),x(n,!1);return}x(s,e.isBeginning&&!e.params.rewind),x(n,e.isEnd&&!e.params.rewind)}function B(n){n.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),d("navigationPrev"))}function w(n){n.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),d("navigationNext"))}function C(){const n=e.params.navigation;if(e.params.navigation=H(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(n.nextEl||n.prevEl))return;let s=o(n.nextEl),u=o(n.prevEl);Object.assign(e.navigation,{nextEl:s,prevEl:u}),s=c.makeElementsArray(s),u=c.makeElementsArray(u);const r=(a,t)=>{a&&a.addEventListener("click",t==="next"?w:B),!e.enabled&&a&&a.classList.add(...n.lockClass.split(" "))};s.forEach(a=>r(a,"next")),u.forEach(a=>r(a,"prev"))}function T(){let{nextEl:n,prevEl:s}=e.navigation;n=c.makeElementsArray(n),s=c.makeElementsArray(s);const u=(r,a)=>{r.removeEventListener("click",a==="next"?w:B),r.classList.remove(...e.params.navigation.disabledClass.split(" "))};n.forEach(r=>u(r,"next")),s.forEach(r=>u(r,"prev"))}p("init",()=>{e.params.navigation.enabled===!1?$():(C(),b())}),p("toEdge fromEdge lock unlock",()=>{b()}),p("destroy",()=>{T()}),p("enable disable",()=>{let{nextEl:n,prevEl:s}=e.navigation;if(n=c.makeElementsArray(n),s=c.makeElementsArray(s),e.enabled){b();return}[...n,...s].filter(u=>!!u).forEach(u=>u.classList.add(e.params.navigation.lockClass))}),p("click",(n,s)=>{let{nextEl:u,prevEl:r}=e.navigation;u=c.makeElementsArray(u),r=c.makeElementsArray(r);const a=s.target;let t=r.includes(a)||u.includes(a);if(e.isElement&&!t){const i=s.path||s.composedPath&&s.composedPath();i&&(t=i.find(l=>u.includes(l)||r.includes(l)))}if(e.params.navigation.hideOnClick&&!t){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===a||e.pagination.el.contains(a)))return;let i;u.length?i=u[0].classList.contains(e.params.navigation.hiddenClass):r.length&&(i=r[0].classList.contains(e.params.navigation.hiddenClass)),d(i===!0?"navigationShow":"navigationHide"),[...u,...r].filter(l=>!!l).forEach(l=>l.classList.toggle(e.params.navigation.hiddenClass))}});const k=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),C(),b()},$=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),T()};Object.assign(e.navigation,{enable:k,disable:$,update:b,init:C,destroy:T})}function F(A){return A===void 0&&(A=""),`.${A.trim().replace(/([\.:!+\/()[\]])/g,"\\$1").replace(/ /g,".")}`}function j(A){let{swiper:e,extendParams:D,on:p,emit:d}=A;const o="swiper-pagination";D({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:a=>a,formatFractionTotal:a=>a,bulletClass:`${o}-bullet`,bulletActiveClass:`${o}-bullet-active`,modifierClass:`${o}-`,currentClass:`${o}-current`,totalClass:`${o}-total`,hiddenClass:`${o}-hidden`,progressbarFillClass:`${o}-progressbar-fill`,progressbarOppositeClass:`${o}-progressbar-opposite`,clickableClass:`${o}-clickable`,lockClass:`${o}-lock`,horizontalClass:`${o}-horizontal`,verticalClass:`${o}-vertical`,paginationDisabledClass:`${o}-disabled`}}),e.pagination={el:null,bullets:[]};let x,b=0;function B(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function w(a,t){const{bulletActiveClass:i}=e.params.pagination;a&&(a=a[`${t==="prev"?"previous":"next"}ElementSibling`],a&&(a.classList.add(`${i}-${t}`),a=a[`${t==="prev"?"previous":"next"}ElementSibling`],a&&a.classList.add(`${i}-${t}-${t}`)))}function C(a,t,i){if(a=a%i,t=t%i,t===a+1)return"next";if(t===a-1)return"previous"}function T(a){const t=a.target.closest(F(e.params.pagination.bulletClass));if(!t)return;a.preventDefault();const i=c.elementIndex(t)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===i)return;const l=C(e.realIndex,i,e.slides.length);l==="next"?e.slideNext():l==="previous"?e.slidePrev():e.slideToLoop(i)}else e.slideTo(i)}function k(){const a=e.rtl,t=e.params.pagination;if(B())return;let i=e.pagination.el;i=c.makeElementsArray(i);let l,y;const M=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,O=e.params.loop?Math.ceil(M/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(y=e.previousRealIndex||0,l=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(l=e.snapIndex,y=e.previousSnapIndex):(y=e.previousIndex||0,l=e.activeIndex||0),t.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const f=e.pagination.bullets;let v,E,I;if(t.dynamicBullets&&(x=c.elementOuterSize(f[0],e.isHorizontal()?"width":"height"),i.forEach(g=>{g.style[e.isHorizontal()?"width":"height"]=`${x*(t.dynamicMainBullets+4)}px`}),t.dynamicMainBullets>1&&y!==void 0&&(b+=l-(y||0),b>t.dynamicMainBullets-1?b=t.dynamicMainBullets-1:b<0&&(b=0)),v=Math.max(l-b,0),E=v+(Math.min(f.length,t.dynamicMainBullets)-1),I=(E+v)/2),f.forEach(g=>{const h=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(L=>`${t.bulletActiveClass}${L}`)].map(L=>typeof L=="string"&&L.includes(" ")?L.split(" "):L).flat();g.classList.remove(...h)}),i.length>1)f.forEach(g=>{const h=c.elementIndex(g);h===l?g.classList.add(...t.bulletActiveClass.split(" ")):e.isElement&&g.setAttribute("part","bullet"),t.dynamicBullets&&(h>=v&&h<=E&&g.classList.add(...`${t.bulletActiveClass}-main`.split(" ")),h===v&&w(g,"prev"),h===E&&w(g,"next"))});else{const g=f[l];if(g&&g.classList.add(...t.bulletActiveClass.split(" ")),e.isElement&&f.forEach((h,L)=>{h.setAttribute("part",L===l?"bullet-active":"bullet")}),t.dynamicBullets){const h=f[v],L=f[E];for(let z=v;z<=E;z+=1)f[z]&&f[z].classList.add(...`${t.bulletActiveClass}-main`.split(" "));w(h,"prev"),w(L,"next")}}if(t.dynamicBullets){const g=Math.min(f.length,t.dynamicMainBullets+4),h=(x*g-x)/2-I*x,L=a?"right":"left";f.forEach(z=>{z.style[e.isHorizontal()?L:"top"]=`${h}px`})}}i.forEach((f,v)=>{if(t.type==="fraction"&&(f.querySelectorAll(F(t.currentClass)).forEach(E=>{E.textContent=t.formatFractionCurrent(l+1)}),f.querySelectorAll(F(t.totalClass)).forEach(E=>{E.textContent=t.formatFractionTotal(O)})),t.type==="progressbar"){let E;t.progressbarOpposite?E=e.isHorizontal()?"vertical":"horizontal":E=e.isHorizontal()?"horizontal":"vertical";const I=(l+1)/O;let g=1,h=1;E==="horizontal"?g=I:h=I,f.querySelectorAll(F(t.progressbarFillClass)).forEach(L=>{L.style.transform=`translate3d(0,0,0) scaleX(${g}) scaleY(${h})`,L.style.transitionDuration=`${e.params.speed}ms`})}t.type==="custom"&&t.renderCustom?(c.setInnerHTML(f,t.renderCustom(e,l+1,O)),v===0&&d("paginationRender",f)):(v===0&&d("paginationRender",f),d("paginationUpdate",f)),e.params.watchOverflow&&e.enabled&&f.classList[e.isLocked?"add":"remove"](t.lockClass)})}function $(){const a=e.params.pagination;if(B())return;const t=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let i=e.pagination.el;i=c.makeElementsArray(i);let l="";if(a.type==="bullets"){let y=e.params.loop?Math.ceil(t/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&y>t&&(y=t);for(let M=0;M<y;M+=1)a.renderBullet?l+=a.renderBullet.call(e,M,a.bulletClass):l+=`<${a.bulletElement} ${e.isElement?'part="bullet"':""} class="${a.bulletClass}"></${a.bulletElement}>`}a.type==="fraction"&&(a.renderFraction?l=a.renderFraction.call(e,a.currentClass,a.totalClass):l=`<span class="${a.currentClass}"></span> / <span class="${a.totalClass}"></span>`),a.type==="progressbar"&&(a.renderProgressbar?l=a.renderProgressbar.call(e,a.progressbarFillClass):l=`<span class="${a.progressbarFillClass}"></span>`),e.pagination.bullets=[],i.forEach(y=>{a.type!=="custom"&&c.setInnerHTML(y,l||""),a.type==="bullets"&&e.pagination.bullets.push(...y.querySelectorAll(F(a.bulletClass)))}),a.type!=="custom"&&d("paginationRender",i[0])}function n(){e.params.pagination=H(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const a=e.params.pagination;if(!a.el)return;let t;typeof a.el=="string"&&e.isElement&&(t=e.el.querySelector(a.el)),!t&&typeof a.el=="string"&&(t=[...document.querySelectorAll(a.el)]),t||(t=a.el),!(!t||t.length===0)&&(e.params.uniqueNavElements&&typeof a.el=="string"&&Array.isArray(t)&&t.length>1&&(t=[...e.el.querySelectorAll(a.el)],t.length>1&&(t=t.find(i=>c.elementParents(i,".swiper")[0]===e.el))),Array.isArray(t)&&t.length===1&&(t=t[0]),Object.assign(e.pagination,{el:t}),t=c.makeElementsArray(t),t.forEach(i=>{a.type==="bullets"&&a.clickable&&i.classList.add(...(a.clickableClass||"").split(" ")),i.classList.add(a.modifierClass+a.type),i.classList.add(e.isHorizontal()?a.horizontalClass:a.verticalClass),a.type==="bullets"&&a.dynamicBullets&&(i.classList.add(`${a.modifierClass}${a.type}-dynamic`),b=0,a.dynamicMainBullets<1&&(a.dynamicMainBullets=1)),a.type==="progressbar"&&a.progressbarOpposite&&i.classList.add(a.progressbarOppositeClass),a.clickable&&i.addEventListener("click",T),e.enabled||i.classList.add(a.lockClass)}))}function s(){const a=e.params.pagination;if(B())return;let t=e.pagination.el;t&&(t=c.makeElementsArray(t),t.forEach(i=>{i.classList.remove(a.hiddenClass),i.classList.remove(a.modifierClass+a.type),i.classList.remove(e.isHorizontal()?a.horizontalClass:a.verticalClass),a.clickable&&(i.classList.remove(...(a.clickableClass||"").split(" ")),i.removeEventListener("click",T))})),e.pagination.bullets&&e.pagination.bullets.forEach(i=>i.classList.remove(...a.bulletActiveClass.split(" ")))}p("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const a=e.params.pagination;let{el:t}=e.pagination;t=c.makeElementsArray(t),t.forEach(i=>{i.classList.remove(a.horizontalClass,a.verticalClass),i.classList.add(e.isHorizontal()?a.horizontalClass:a.verticalClass)})}),p("init",()=>{e.params.pagination.enabled===!1?r():(n(),$(),k())}),p("activeIndexChange",()=>{typeof e.snapIndex>"u"&&k()}),p("snapIndexChange",()=>{k()}),p("snapGridLengthChange",()=>{$(),k()}),p("destroy",()=>{s()}),p("enable disable",()=>{let{el:a}=e.pagination;a&&(a=c.makeElementsArray(a),a.forEach(t=>t.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),p("lock unlock",()=>{k()}),p("click",(a,t)=>{const i=t.target,l=c.makeElementsArray(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&l&&l.length>0&&!i.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&i===e.navigation.nextEl||e.navigation.prevEl&&i===e.navigation.prevEl))return;const y=l[0].classList.contains(e.params.pagination.hiddenClass);d(y===!0?"paginationShow":"paginationHide"),l.forEach(M=>M.classList.toggle(e.params.pagination.hiddenClass))}});const u=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:a}=e.pagination;a&&(a=c.makeElementsArray(a),a.forEach(t=>t.classList.remove(e.params.pagination.paginationDisabledClass))),n(),$(),k()},r=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:a}=e.pagination;a&&(a=c.makeElementsArray(a),a.forEach(t=>t.classList.add(e.params.pagination.paginationDisabledClass))),s()};Object.assign(e.pagination,{enable:u,disable:r,render:$,update:k,init:n,destroy:s})}function _(A){let{swiper:e,extendParams:D,on:p,emit:d,params:o}=A;e.autoplay={running:!1,paused:!1,timeLeft:0},D({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let x,b,B=o&&o.autoplay?o.autoplay.delay:3e3,w=o&&o.autoplay?o.autoplay.delay:3e3,C,T=new Date().getTime(),k,$,n,s,u,r,a;function t(m){!e||e.destroyed||!e.wrapperEl||m.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",t),!(a||m.detail&&m.detail.bySwiperTouchMove)&&v())}const i=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?k=!0:k&&(w=C,k=!1);const m=e.autoplay.paused?C:T+w-new Date().getTime();e.autoplay.timeLeft=m,d("autoplayTimeLeft",m,m/B),b=requestAnimationFrame(()=>{i()})},l=()=>{let m;return e.virtual&&e.params.virtual.enabled?m=e.slides.find(S=>S.classList.contains("swiper-slide-active")):m=e.slides[e.activeIndex],m?parseInt(m.getAttribute("data-swiper-autoplay"),10):void 0},y=m=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(b),i();let P=typeof m>"u"?e.params.autoplay.delay:m;B=e.params.autoplay.delay,w=e.params.autoplay.delay;const S=l();!Number.isNaN(S)&&S>0&&typeof m>"u"&&(P=S,B=S,w=S),C=P;const q=e.params.speed,N=()=>{!e||e.destroyed||(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(q,!0,!0),d("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,q,!0,!0),d("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(q,!0,!0),d("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,q,!0,!0),d("autoplay")),e.params.cssMode&&(T=new Date().getTime(),requestAnimationFrame(()=>{y()})))};return P>0?(clearTimeout(x),x=setTimeout(()=>{N()},P)):requestAnimationFrame(()=>{N()}),P},M=()=>{T=new Date().getTime(),e.autoplay.running=!0,y(),d("autoplayStart")},O=()=>{e.autoplay.running=!1,clearTimeout(x),cancelAnimationFrame(b),d("autoplayStop")},f=(m,P)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(x),m||(r=!0);const S=()=>{d("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",t):v()};if(e.autoplay.paused=!0,P){u&&(C=e.params.autoplay.delay),u=!1,S();return}C=(C||e.params.autoplay.delay)-(new Date().getTime()-T),!(e.isEnd&&C<0&&!e.params.loop)&&(C<0&&(C=0),S())},v=()=>{e.isEnd&&C<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(T=new Date().getTime(),r?(r=!1,y(C)):y(),e.autoplay.paused=!1,d("autoplayResume"))},E=()=>{if(e.destroyed||!e.autoplay.running)return;const m=c.getDocument();m.visibilityState==="hidden"&&(r=!0,f(!0)),m.visibilityState==="visible"&&v()},I=m=>{m.pointerType==="mouse"&&(r=!0,a=!0,!(e.animating||e.autoplay.paused)&&f(!0))},g=m=>{m.pointerType==="mouse"&&(a=!1,e.autoplay.paused&&v())},h=()=>{e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",I),e.el.addEventListener("pointerleave",g))},L=()=>{e.el&&typeof e.el!="string"&&(e.el.removeEventListener("pointerenter",I),e.el.removeEventListener("pointerleave",g))},z=()=>{c.getDocument().addEventListener("visibilitychange",E)},G=()=>{c.getDocument().removeEventListener("visibilitychange",E)};p("init",()=>{e.params.autoplay.enabled&&(h(),z(),M())}),p("destroy",()=>{L(),G(),e.autoplay.running&&O()}),p("_freeModeStaticRelease",()=>{(n||r)&&v()}),p("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?O():f(!0,!0)}),p("beforeTransitionStart",(m,P,S)=>{e.destroyed||!e.autoplay.running||(S||!e.params.autoplay.disableOnInteraction?f(!0,!0):O())}),p("sliderFirstMove",()=>{if(!(e.destroyed||!e.autoplay.running)){if(e.params.autoplay.disableOnInteraction){O();return}$=!0,n=!1,r=!1,s=setTimeout(()=>{r=!0,n=!0,f(!0)},200)}}),p("touchEnd",()=>{if(!(e.destroyed||!e.autoplay.running||!$)){if(clearTimeout(s),clearTimeout(x),e.params.autoplay.disableOnInteraction){n=!1,$=!1;return}n&&e.params.cssMode&&v(),n=!1,$=!1}}),p("slideChange",()=>{e.destroyed||!e.autoplay.running||(u=!0)}),Object.assign(e.autoplay,{start:M,stop:O,pause:f,resume:v})}exports.Autoplay=_;exports.Navigation=R;exports.Pagination=j;
@@ -0,0 +1,485 @@
1
+ import { a as U, c as X, t as h, r as Y, u as G, o as V, b as R, g as N } from "./utils-DD-vVZej.mjs";
2
+ function j(w, e, k, p) {
3
+ return w.params.createElements && Object.keys(p).forEach((c) => {
4
+ if (!k[c] && k.auto === !0) {
5
+ let o = U(w.el, `.${p[c]}`)[0];
6
+ o || (o = X("div", p[c]), o.className = p[c], w.el.append(o)), k[c] = o, e[c] = o;
7
+ }
8
+ }), k;
9
+ }
10
+ function K(w) {
11
+ let {
12
+ swiper: e,
13
+ extendParams: k,
14
+ on: p,
15
+ emit: c
16
+ } = w;
17
+ k({
18
+ navigation: {
19
+ nextEl: null,
20
+ prevEl: null,
21
+ hideOnClick: !1,
22
+ disabledClass: "swiper-button-disabled",
23
+ hiddenClass: "swiper-button-hidden",
24
+ lockClass: "swiper-button-lock",
25
+ navigationDisabledClass: "swiper-navigation-disabled"
26
+ }
27
+ }), e.navigation = {
28
+ nextEl: null,
29
+ prevEl: null
30
+ };
31
+ function o(n) {
32
+ let s;
33
+ return n && typeof n == "string" && e.isElement && (s = e.el.querySelector(n) || e.hostEl.querySelector(n), s) ? s : (n && (typeof n == "string" && (s = [...document.querySelectorAll(n)]), e.params.uniqueNavElements && typeof n == "string" && s && s.length > 1 && e.el.querySelectorAll(n).length === 1 ? s = e.el.querySelector(n) : s && s.length === 1 && (s = s[0])), n && !s ? n : s);
34
+ }
35
+ function x(n, s) {
36
+ const d = e.params.navigation;
37
+ n = h(n), n.forEach((r) => {
38
+ r && (r.classList[s ? "add" : "remove"](...d.disabledClass.split(" ")), r.tagName === "BUTTON" && (r.disabled = s), e.params.watchOverflow && e.enabled && r.classList[e.isLocked ? "add" : "remove"](d.lockClass));
39
+ });
40
+ }
41
+ function b() {
42
+ const {
43
+ nextEl: n,
44
+ prevEl: s
45
+ } = e.navigation;
46
+ if (e.params.loop) {
47
+ x(s, !1), x(n, !1);
48
+ return;
49
+ }
50
+ x(s, e.isBeginning && !e.params.rewind), x(n, e.isEnd && !e.params.rewind);
51
+ }
52
+ function A(n) {
53
+ n.preventDefault(), !(e.isBeginning && !e.params.loop && !e.params.rewind) && (e.slidePrev(), c("navigationPrev"));
54
+ }
55
+ function T(n) {
56
+ n.preventDefault(), !(e.isEnd && !e.params.loop && !e.params.rewind) && (e.slideNext(), c("navigationNext"));
57
+ }
58
+ function C() {
59
+ const n = e.params.navigation;
60
+ if (e.params.navigation = j(e, e.originalParams.navigation, e.params.navigation, {
61
+ nextEl: "swiper-button-next",
62
+ prevEl: "swiper-button-prev"
63
+ }), !(n.nextEl || n.prevEl)) return;
64
+ let s = o(n.nextEl), d = o(n.prevEl);
65
+ Object.assign(e.navigation, {
66
+ nextEl: s,
67
+ prevEl: d
68
+ }), s = h(s), d = h(d);
69
+ const r = (a, t) => {
70
+ a && a.addEventListener("click", t === "next" ? T : A), !e.enabled && a && a.classList.add(...n.lockClass.split(" "));
71
+ };
72
+ s.forEach((a) => r(a, "next")), d.forEach((a) => r(a, "prev"));
73
+ }
74
+ function S() {
75
+ let {
76
+ nextEl: n,
77
+ prevEl: s
78
+ } = e.navigation;
79
+ n = h(n), s = h(s);
80
+ const d = (r, a) => {
81
+ r.removeEventListener("click", a === "next" ? T : A), r.classList.remove(...e.params.navigation.disabledClass.split(" "));
82
+ };
83
+ n.forEach((r) => d(r, "next")), s.forEach((r) => d(r, "prev"));
84
+ }
85
+ p("init", () => {
86
+ e.params.navigation.enabled === !1 ? D() : (C(), b());
87
+ }), p("toEdge fromEdge lock unlock", () => {
88
+ b();
89
+ }), p("destroy", () => {
90
+ S();
91
+ }), p("enable disable", () => {
92
+ let {
93
+ nextEl: n,
94
+ prevEl: s
95
+ } = e.navigation;
96
+ if (n = h(n), s = h(s), e.enabled) {
97
+ b();
98
+ return;
99
+ }
100
+ [...n, ...s].filter((d) => !!d).forEach((d) => d.classList.add(e.params.navigation.lockClass));
101
+ }), p("click", (n, s) => {
102
+ let {
103
+ nextEl: d,
104
+ prevEl: r
105
+ } = e.navigation;
106
+ d = h(d), r = h(r);
107
+ const a = s.target;
108
+ let t = r.includes(a) || d.includes(a);
109
+ if (e.isElement && !t) {
110
+ const i = s.path || s.composedPath && s.composedPath();
111
+ i && (t = i.find((l) => d.includes(l) || r.includes(l)));
112
+ }
113
+ if (e.params.navigation.hideOnClick && !t) {
114
+ if (e.pagination && e.params.pagination && e.params.pagination.clickable && (e.pagination.el === a || e.pagination.el.contains(a))) return;
115
+ let i;
116
+ d.length ? i = d[0].classList.contains(e.params.navigation.hiddenClass) : r.length && (i = r[0].classList.contains(e.params.navigation.hiddenClass)), c(i === !0 ? "navigationShow" : "navigationHide"), [...d, ...r].filter((l) => !!l).forEach((l) => l.classList.toggle(e.params.navigation.hiddenClass));
117
+ }
118
+ });
119
+ const $ = () => {
120
+ e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")), C(), b();
121
+ }, D = () => {
122
+ e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")), S();
123
+ };
124
+ Object.assign(e.navigation, {
125
+ enable: $,
126
+ disable: D,
127
+ update: b,
128
+ init: C,
129
+ destroy: S
130
+ });
131
+ }
132
+ function F(w) {
133
+ return w === void 0 && (w = ""), `.${w.trim().replace(/([\.:!+\/()[\]])/g, "\\$1").replace(/ /g, ".")}`;
134
+ }
135
+ function Q(w) {
136
+ let {
137
+ swiper: e,
138
+ extendParams: k,
139
+ on: p,
140
+ emit: c
141
+ } = w;
142
+ const o = "swiper-pagination";
143
+ k({
144
+ pagination: {
145
+ el: null,
146
+ bulletElement: "span",
147
+ clickable: !1,
148
+ hideOnClick: !1,
149
+ renderBullet: null,
150
+ renderProgressbar: null,
151
+ renderFraction: null,
152
+ renderCustom: null,
153
+ progressbarOpposite: !1,
154
+ type: "bullets",
155
+ // 'bullets' or 'progressbar' or 'fraction' or 'custom'
156
+ dynamicBullets: !1,
157
+ dynamicMainBullets: 1,
158
+ formatFractionCurrent: (a) => a,
159
+ formatFractionTotal: (a) => a,
160
+ bulletClass: `${o}-bullet`,
161
+ bulletActiveClass: `${o}-bullet-active`,
162
+ modifierClass: `${o}-`,
163
+ currentClass: `${o}-current`,
164
+ totalClass: `${o}-total`,
165
+ hiddenClass: `${o}-hidden`,
166
+ progressbarFillClass: `${o}-progressbar-fill`,
167
+ progressbarOppositeClass: `${o}-progressbar-opposite`,
168
+ clickableClass: `${o}-clickable`,
169
+ lockClass: `${o}-lock`,
170
+ horizontalClass: `${o}-horizontal`,
171
+ verticalClass: `${o}-vertical`,
172
+ paginationDisabledClass: `${o}-disabled`
173
+ }
174
+ }), e.pagination = {
175
+ el: null,
176
+ bullets: []
177
+ };
178
+ let x, b = 0;
179
+ function A() {
180
+ return !e.params.pagination.el || !e.pagination.el || Array.isArray(e.pagination.el) && e.pagination.el.length === 0;
181
+ }
182
+ function T(a, t) {
183
+ const {
184
+ bulletActiveClass: i
185
+ } = e.params.pagination;
186
+ a && (a = a[`${t === "prev" ? "previous" : "next"}ElementSibling`], a && (a.classList.add(`${i}-${t}`), a = a[`${t === "prev" ? "previous" : "next"}ElementSibling`], a && a.classList.add(`${i}-${t}-${t}`)));
187
+ }
188
+ function C(a, t, i) {
189
+ if (a = a % i, t = t % i, t === a + 1)
190
+ return "next";
191
+ if (t === a - 1)
192
+ return "previous";
193
+ }
194
+ function S(a) {
195
+ const t = a.target.closest(F(e.params.pagination.bulletClass));
196
+ if (!t)
197
+ return;
198
+ a.preventDefault();
199
+ const i = R(t) * e.params.slidesPerGroup;
200
+ if (e.params.loop) {
201
+ if (e.realIndex === i) return;
202
+ const l = C(e.realIndex, i, e.slides.length);
203
+ l === "next" ? e.slideNext() : l === "previous" ? e.slidePrev() : e.slideToLoop(i);
204
+ } else
205
+ e.slideTo(i);
206
+ }
207
+ function $() {
208
+ const a = e.rtl, t = e.params.pagination;
209
+ if (A()) return;
210
+ let i = e.pagination.el;
211
+ i = h(i);
212
+ let l, g;
213
+ const M = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, O = e.params.loop ? Math.ceil(M / e.params.slidesPerGroup) : e.snapGrid.length;
214
+ if (e.params.loop ? (g = e.previousRealIndex || 0, l = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (l = e.snapIndex, g = e.previousSnapIndex) : (g = e.previousIndex || 0, l = e.activeIndex || 0), t.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
215
+ const u = e.pagination.bullets;
216
+ let y, E, I;
217
+ if (t.dynamicBullets && (x = V(u[0], e.isHorizontal() ? "width" : "height"), i.forEach((m) => {
218
+ m.style[e.isHorizontal() ? "width" : "height"] = `${x * (t.dynamicMainBullets + 4)}px`;
219
+ }), t.dynamicMainBullets > 1 && g !== void 0 && (b += l - (g || 0), b > t.dynamicMainBullets - 1 ? b = t.dynamicMainBullets - 1 : b < 0 && (b = 0)), y = Math.max(l - b, 0), E = y + (Math.min(u.length, t.dynamicMainBullets) - 1), I = (E + y) / 2), u.forEach((m) => {
220
+ const v = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((L) => `${t.bulletActiveClass}${L}`)].map((L) => typeof L == "string" && L.includes(" ") ? L.split(" ") : L).flat();
221
+ m.classList.remove(...v);
222
+ }), i.length > 1)
223
+ u.forEach((m) => {
224
+ const v = R(m);
225
+ v === l ? m.classList.add(...t.bulletActiveClass.split(" ")) : e.isElement && m.setAttribute("part", "bullet"), t.dynamicBullets && (v >= y && v <= E && m.classList.add(...`${t.bulletActiveClass}-main`.split(" ")), v === y && T(m, "prev"), v === E && T(m, "next"));
226
+ });
227
+ else {
228
+ const m = u[l];
229
+ if (m && m.classList.add(...t.bulletActiveClass.split(" ")), e.isElement && u.forEach((v, L) => {
230
+ v.setAttribute("part", L === l ? "bullet-active" : "bullet");
231
+ }), t.dynamicBullets) {
232
+ const v = u[y], L = u[E];
233
+ for (let z = y; z <= E; z += 1)
234
+ u[z] && u[z].classList.add(...`${t.bulletActiveClass}-main`.split(" "));
235
+ T(v, "prev"), T(L, "next");
236
+ }
237
+ }
238
+ if (t.dynamicBullets) {
239
+ const m = Math.min(u.length, t.dynamicMainBullets + 4), v = (x * m - x) / 2 - I * x, L = a ? "right" : "left";
240
+ u.forEach((z) => {
241
+ z.style[e.isHorizontal() ? L : "top"] = `${v}px`;
242
+ });
243
+ }
244
+ }
245
+ i.forEach((u, y) => {
246
+ if (t.type === "fraction" && (u.querySelectorAll(F(t.currentClass)).forEach((E) => {
247
+ E.textContent = t.formatFractionCurrent(l + 1);
248
+ }), u.querySelectorAll(F(t.totalClass)).forEach((E) => {
249
+ E.textContent = t.formatFractionTotal(O);
250
+ })), t.type === "progressbar") {
251
+ let E;
252
+ t.progressbarOpposite ? E = e.isHorizontal() ? "vertical" : "horizontal" : E = e.isHorizontal() ? "horizontal" : "vertical";
253
+ const I = (l + 1) / O;
254
+ let m = 1, v = 1;
255
+ E === "horizontal" ? m = I : v = I, u.querySelectorAll(F(t.progressbarFillClass)).forEach((L) => {
256
+ L.style.transform = `translate3d(0,0,0) scaleX(${m}) scaleY(${v})`, L.style.transitionDuration = `${e.params.speed}ms`;
257
+ });
258
+ }
259
+ t.type === "custom" && t.renderCustom ? (G(u, t.renderCustom(e, l + 1, O)), y === 0 && c("paginationRender", u)) : (y === 0 && c("paginationRender", u), c("paginationUpdate", u)), e.params.watchOverflow && e.enabled && u.classList[e.isLocked ? "add" : "remove"](t.lockClass);
260
+ });
261
+ }
262
+ function D() {
263
+ const a = e.params.pagination;
264
+ if (A()) return;
265
+ const t = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
266
+ let i = e.pagination.el;
267
+ i = h(i);
268
+ let l = "";
269
+ if (a.type === "bullets") {
270
+ let g = e.params.loop ? Math.ceil(t / e.params.slidesPerGroup) : e.snapGrid.length;
271
+ e.params.freeMode && e.params.freeMode.enabled && g > t && (g = t);
272
+ for (let M = 0; M < g; M += 1)
273
+ a.renderBullet ? l += a.renderBullet.call(e, M, a.bulletClass) : l += `<${a.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${a.bulletClass}"></${a.bulletElement}>`;
274
+ }
275
+ a.type === "fraction" && (a.renderFraction ? l = a.renderFraction.call(e, a.currentClass, a.totalClass) : l = `<span class="${a.currentClass}"></span> / <span class="${a.totalClass}"></span>`), a.type === "progressbar" && (a.renderProgressbar ? l = a.renderProgressbar.call(e, a.progressbarFillClass) : l = `<span class="${a.progressbarFillClass}"></span>`), e.pagination.bullets = [], i.forEach((g) => {
276
+ a.type !== "custom" && G(g, l || ""), a.type === "bullets" && e.pagination.bullets.push(...g.querySelectorAll(F(a.bulletClass)));
277
+ }), a.type !== "custom" && c("paginationRender", i[0]);
278
+ }
279
+ function n() {
280
+ e.params.pagination = j(e, e.originalParams.pagination, e.params.pagination, {
281
+ el: "swiper-pagination"
282
+ });
283
+ const a = e.params.pagination;
284
+ if (!a.el) return;
285
+ let t;
286
+ typeof a.el == "string" && e.isElement && (t = e.el.querySelector(a.el)), !t && typeof a.el == "string" && (t = [...document.querySelectorAll(a.el)]), t || (t = a.el), !(!t || t.length === 0) && (e.params.uniqueNavElements && typeof a.el == "string" && Array.isArray(t) && t.length > 1 && (t = [...e.el.querySelectorAll(a.el)], t.length > 1 && (t = t.find((i) => Y(i, ".swiper")[0] === e.el))), Array.isArray(t) && t.length === 1 && (t = t[0]), Object.assign(e.pagination, {
287
+ el: t
288
+ }), t = h(t), t.forEach((i) => {
289
+ a.type === "bullets" && a.clickable && i.classList.add(...(a.clickableClass || "").split(" ")), i.classList.add(a.modifierClass + a.type), i.classList.add(e.isHorizontal() ? a.horizontalClass : a.verticalClass), a.type === "bullets" && a.dynamicBullets && (i.classList.add(`${a.modifierClass}${a.type}-dynamic`), b = 0, a.dynamicMainBullets < 1 && (a.dynamicMainBullets = 1)), a.type === "progressbar" && a.progressbarOpposite && i.classList.add(a.progressbarOppositeClass), a.clickable && i.addEventListener("click", S), e.enabled || i.classList.add(a.lockClass);
290
+ }));
291
+ }
292
+ function s() {
293
+ const a = e.params.pagination;
294
+ if (A()) return;
295
+ let t = e.pagination.el;
296
+ t && (t = h(t), t.forEach((i) => {
297
+ i.classList.remove(a.hiddenClass), i.classList.remove(a.modifierClass + a.type), i.classList.remove(e.isHorizontal() ? a.horizontalClass : a.verticalClass), a.clickable && (i.classList.remove(...(a.clickableClass || "").split(" ")), i.removeEventListener("click", S));
298
+ })), e.pagination.bullets && e.pagination.bullets.forEach((i) => i.classList.remove(...a.bulletActiveClass.split(" ")));
299
+ }
300
+ p("changeDirection", () => {
301
+ if (!e.pagination || !e.pagination.el) return;
302
+ const a = e.params.pagination;
303
+ let {
304
+ el: t
305
+ } = e.pagination;
306
+ t = h(t), t.forEach((i) => {
307
+ i.classList.remove(a.horizontalClass, a.verticalClass), i.classList.add(e.isHorizontal() ? a.horizontalClass : a.verticalClass);
308
+ });
309
+ }), p("init", () => {
310
+ e.params.pagination.enabled === !1 ? r() : (n(), D(), $());
311
+ }), p("activeIndexChange", () => {
312
+ typeof e.snapIndex > "u" && $();
313
+ }), p("snapIndexChange", () => {
314
+ $();
315
+ }), p("snapGridLengthChange", () => {
316
+ D(), $();
317
+ }), p("destroy", () => {
318
+ s();
319
+ }), p("enable disable", () => {
320
+ let {
321
+ el: a
322
+ } = e.pagination;
323
+ a && (a = h(a), a.forEach((t) => t.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
324
+ }), p("lock unlock", () => {
325
+ $();
326
+ }), p("click", (a, t) => {
327
+ const i = t.target, l = h(e.pagination.el);
328
+ if (e.params.pagination.el && e.params.pagination.hideOnClick && l && l.length > 0 && !i.classList.contains(e.params.pagination.bulletClass)) {
329
+ if (e.navigation && (e.navigation.nextEl && i === e.navigation.nextEl || e.navigation.prevEl && i === e.navigation.prevEl)) return;
330
+ const g = l[0].classList.contains(e.params.pagination.hiddenClass);
331
+ c(g === !0 ? "paginationShow" : "paginationHide"), l.forEach((M) => M.classList.toggle(e.params.pagination.hiddenClass));
332
+ }
333
+ });
334
+ const d = () => {
335
+ e.el.classList.remove(e.params.pagination.paginationDisabledClass);
336
+ let {
337
+ el: a
338
+ } = e.pagination;
339
+ a && (a = h(a), a.forEach((t) => t.classList.remove(e.params.pagination.paginationDisabledClass))), n(), D(), $();
340
+ }, r = () => {
341
+ e.el.classList.add(e.params.pagination.paginationDisabledClass);
342
+ let {
343
+ el: a
344
+ } = e.pagination;
345
+ a && (a = h(a), a.forEach((t) => t.classList.add(e.params.pagination.paginationDisabledClass))), s();
346
+ };
347
+ Object.assign(e.pagination, {
348
+ enable: d,
349
+ disable: r,
350
+ render: D,
351
+ update: $,
352
+ init: n,
353
+ destroy: s
354
+ });
355
+ }
356
+ function W(w) {
357
+ let {
358
+ swiper: e,
359
+ extendParams: k,
360
+ on: p,
361
+ emit: c,
362
+ params: o
363
+ } = w;
364
+ e.autoplay = {
365
+ running: !1,
366
+ paused: !1,
367
+ timeLeft: 0
368
+ }, k({
369
+ autoplay: {
370
+ enabled: !1,
371
+ delay: 3e3,
372
+ waitForTransition: !0,
373
+ disableOnInteraction: !1,
374
+ stopOnLastSlide: !1,
375
+ reverseDirection: !1,
376
+ pauseOnMouseEnter: !1
377
+ }
378
+ });
379
+ let x, b, A = o && o.autoplay ? o.autoplay.delay : 3e3, T = o && o.autoplay ? o.autoplay.delay : 3e3, C, S = (/* @__PURE__ */ new Date()).getTime(), $, D, n, s, d, r, a;
380
+ function t(f) {
381
+ !e || e.destroyed || !e.wrapperEl || f.target === e.wrapperEl && (e.wrapperEl.removeEventListener("transitionend", t), !(a || f.detail && f.detail.bySwiperTouchMove) && y());
382
+ }
383
+ const i = () => {
384
+ if (e.destroyed || !e.autoplay.running) return;
385
+ e.autoplay.paused ? $ = !0 : $ && (T = C, $ = !1);
386
+ const f = e.autoplay.paused ? C : S + T - (/* @__PURE__ */ new Date()).getTime();
387
+ e.autoplay.timeLeft = f, c("autoplayTimeLeft", f, f / A), b = requestAnimationFrame(() => {
388
+ i();
389
+ });
390
+ }, l = () => {
391
+ let f;
392
+ return e.virtual && e.params.virtual.enabled ? f = e.slides.find((B) => B.classList.contains("swiper-slide-active")) : f = e.slides[e.activeIndex], f ? parseInt(f.getAttribute("data-swiper-autoplay"), 10) : void 0;
393
+ }, g = (f) => {
394
+ if (e.destroyed || !e.autoplay.running) return;
395
+ cancelAnimationFrame(b), i();
396
+ let P = typeof f > "u" ? e.params.autoplay.delay : f;
397
+ A = e.params.autoplay.delay, T = e.params.autoplay.delay;
398
+ const B = l();
399
+ !Number.isNaN(B) && B > 0 && typeof f > "u" && (P = B, A = B, T = B), C = P;
400
+ const q = e.params.speed, H = () => {
401
+ !e || e.destroyed || (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(q, !0, !0), c("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1, q, !0, !0), c("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(q, !0, !0), c("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0, q, !0, !0), c("autoplay")), e.params.cssMode && (S = (/* @__PURE__ */ new Date()).getTime(), requestAnimationFrame(() => {
402
+ g();
403
+ })));
404
+ };
405
+ return P > 0 ? (clearTimeout(x), x = setTimeout(() => {
406
+ H();
407
+ }, P)) : requestAnimationFrame(() => {
408
+ H();
409
+ }), P;
410
+ }, M = () => {
411
+ S = (/* @__PURE__ */ new Date()).getTime(), e.autoplay.running = !0, g(), c("autoplayStart");
412
+ }, O = () => {
413
+ e.autoplay.running = !1, clearTimeout(x), cancelAnimationFrame(b), c("autoplayStop");
414
+ }, u = (f, P) => {
415
+ if (e.destroyed || !e.autoplay.running) return;
416
+ clearTimeout(x), f || (r = !0);
417
+ const B = () => {
418
+ c("autoplayPause"), e.params.autoplay.waitForTransition ? e.wrapperEl.addEventListener("transitionend", t) : y();
419
+ };
420
+ if (e.autoplay.paused = !0, P) {
421
+ d && (C = e.params.autoplay.delay), d = !1, B();
422
+ return;
423
+ }
424
+ C = (C || e.params.autoplay.delay) - ((/* @__PURE__ */ new Date()).getTime() - S), !(e.isEnd && C < 0 && !e.params.loop) && (C < 0 && (C = 0), B());
425
+ }, y = () => {
426
+ e.isEnd && C < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (S = (/* @__PURE__ */ new Date()).getTime(), r ? (r = !1, g(C)) : g(), e.autoplay.paused = !1, c("autoplayResume"));
427
+ }, E = () => {
428
+ if (e.destroyed || !e.autoplay.running) return;
429
+ const f = N();
430
+ f.visibilityState === "hidden" && (r = !0, u(!0)), f.visibilityState === "visible" && y();
431
+ }, I = (f) => {
432
+ f.pointerType === "mouse" && (r = !0, a = !0, !(e.animating || e.autoplay.paused) && u(!0));
433
+ }, m = (f) => {
434
+ f.pointerType === "mouse" && (a = !1, e.autoplay.paused && y());
435
+ }, v = () => {
436
+ e.params.autoplay.pauseOnMouseEnter && (e.el.addEventListener("pointerenter", I), e.el.addEventListener("pointerleave", m));
437
+ }, L = () => {
438
+ e.el && typeof e.el != "string" && (e.el.removeEventListener("pointerenter", I), e.el.removeEventListener("pointerleave", m));
439
+ }, z = () => {
440
+ N().addEventListener("visibilitychange", E);
441
+ }, _ = () => {
442
+ N().removeEventListener("visibilitychange", E);
443
+ };
444
+ p("init", () => {
445
+ e.params.autoplay.enabled && (v(), z(), M());
446
+ }), p("destroy", () => {
447
+ L(), _(), e.autoplay.running && O();
448
+ }), p("_freeModeStaticRelease", () => {
449
+ (n || r) && y();
450
+ }), p("_freeModeNoMomentumRelease", () => {
451
+ e.params.autoplay.disableOnInteraction ? O() : u(!0, !0);
452
+ }), p("beforeTransitionStart", (f, P, B) => {
453
+ e.destroyed || !e.autoplay.running || (B || !e.params.autoplay.disableOnInteraction ? u(!0, !0) : O());
454
+ }), p("sliderFirstMove", () => {
455
+ if (!(e.destroyed || !e.autoplay.running)) {
456
+ if (e.params.autoplay.disableOnInteraction) {
457
+ O();
458
+ return;
459
+ }
460
+ D = !0, n = !1, r = !1, s = setTimeout(() => {
461
+ r = !0, n = !0, u(!0);
462
+ }, 200);
463
+ }
464
+ }), p("touchEnd", () => {
465
+ if (!(e.destroyed || !e.autoplay.running || !D)) {
466
+ if (clearTimeout(s), clearTimeout(x), e.params.autoplay.disableOnInteraction) {
467
+ n = !1, D = !1;
468
+ return;
469
+ }
470
+ n && e.params.cssMode && y(), n = !1, D = !1;
471
+ }
472
+ }), p("slideChange", () => {
473
+ e.destroyed || !e.autoplay.running || (d = !0);
474
+ }), Object.assign(e.autoplay, {
475
+ start: M,
476
+ stop: O,
477
+ pause: u,
478
+ resume: y
479
+ });
480
+ }
481
+ export {
482
+ W as Autoplay,
483
+ K as Navigation,
484
+ Q as Pagination
485
+ };