@cntrl-site/components 1.0.7-alpha.8 → 1.0.7-alpha.9

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 (3) hide show
  1. package/dist/index.js +34 -31
  2. package/dist/index.mjs +672 -669
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),A=require("react"),ue=require("classnames"),_=require("./useScopedStyles-DpVdqfXj.js"),br=require("react-dom");function xr(e){return e.type==="object"&&e.version===1}const Sr="ControlSlider-module__wrapper___sHEkd",Cr="ControlSlider-module__hoverArrow___A-dOH",wr="ControlSlider-module__sliderItem___QQSkR",Tr="ControlSlider-module__sliderImage___9hRl-",_r="ControlSlider-module__arrow___05ghY",$r="ControlSlider-module__arrowVertical___tBfVN",Ar="ControlSlider-module__nextArrow___-30Yc",Ir="ControlSlider-module__arrowInner___aEra3",Er="ControlSlider-module__arrowIcon___S4ztF",Lr="ControlSlider-module__arrowImg___2dwJW",Fr="ControlSlider-module__mirror___brd6U",kr="ControlSlider-module__pagination___bicLF",Rr="ControlSlider-module__paginationInner___bT-P-",Mr="ControlSlider-module__paginationVertical___zYqKw",Wr="ControlSlider-module__paginationItem___nTRbk",Pr="ControlSlider-module__dot___p1Qun",zr="ControlSlider-module__activeDot___LHFaj",Hr="ControlSlider-module__paginationInsideBottom___R3FWn",Vr="ControlSlider-module__paginationInsideTop___V-qb-",Nr="ControlSlider-module__paginationOutsideBottom___14w8D",Or="ControlSlider-module__paginationOutsideTop___SCLqB",jr="ControlSlider-module__paginationInsideLeft___yOBRZ",Br="ControlSlider-module__paginationInsideRight___Rtt3o",Dr="ControlSlider-module__paginationOutsideLeft___lahaw",Ur="ControlSlider-module__paginationOutsideRight___EtuQa",qr="ControlSlider-module__imgWrapper___UjEgB",Gr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Xr="ControlSlider-module__captionText___uGBVc",Kr="ControlSlider-module__active___WZK4G",Jr="ControlSlider-module__withPointerEvents___t-18M",Zr="ControlSlider-module__topLeftAlignment___zjnGM",Qr="ControlSlider-module__topCenterAlignment___gD1xW",ei="ControlSlider-module__topRightAlignment___NMapS",ti="ControlSlider-module__middleLeftAlignment___OnUrY",ni="ControlSlider-module__middleCenterAlignment___Tdkl0",oi="ControlSlider-module__middleRightAlignment___wEbfX",ri="ControlSlider-module__bottomLeftAlignment___cTP2-",ii="ControlSlider-module__bottomCenterAlignment___c54fB",ai="ControlSlider-module__bottomRightAlignment___kEwrz",li="ControlSlider-module__clickOverlay___DZA28",si="ControlSlider-module__contain___pLyq7",ci="ControlSlider-module__cover___KdDat",Z={wrapper:Sr,hoverArrow:Cr,sliderItem:wr,sliderImage:Tr,arrow:_r,arrowVertical:$r,nextArrow:Ar,arrowInner:Ir,arrowIcon:Er,arrowImg:Lr,mirror:Fr,pagination:kr,paginationInner:Rr,paginationVertical:Mr,paginationItem:Wr,dot:Pr,activeDot:zr,paginationInsideBottom:Hr,paginationInsideTop:Vr,paginationOutsideBottom:Nr,paginationOutsideTop:Or,paginationInsideLeft:jr,paginationInsideRight:Br,paginationOutsideLeft:Dr,paginationOutsideRight:Ur,imgWrapper:qr,captionBlock:Gr,captionTextWrapper:Yr,captionText:Xr,active:Kr,withPointerEvents:Jr,topLeftAlignment:Zr,topCenterAlignment:Qr,topRightAlignment:ei,middleLeftAlignment:ti,middleCenterAlignment:ni,middleRightAlignment:oi,bottomLeftAlignment:ri,bottomCenterAlignment:ii,bottomRightAlignment:ai,clickOverlay:li,contain:si,cover:ci};function pi(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ui(e,t,n){return t&&pi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var io="(prefers-reduced-motion: reduce)",mt=1,di=2,vt=3,St=4,zt=5,Zt=6,nn=7,gi={CREATED:mt,MOUNTED:di,IDLE:vt,MOVING:St,SCROLLING:zt,DRAGGING:Zt,DESTROYED:nn};function Ye(e){e.length=0}function tt(e,t,n){return Array.prototype.slice.call(e,t,n)}function ye(e){return e.bind.apply(e,[null].concat(tt(arguments,1)))}var Eo=setTimeout,An=function(){};function ao(e){return requestAnimationFrame(e)}function sn(e,t){return typeof t===e}function Et(e){return!zn(e)&&sn("object",e)}var Pn=Array.isArray,Lo=ye(sn,"function"),Qe=ye(sn,"string"),Ht=ye(sn,"undefined");function zn(e){return e===null}function Fo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Vt(e){return Pn(e)?e:[e]}function Fe(e,t){Vt(e).forEach(t)}function Hn(e,t){return e.indexOf(t)>-1}function Qt(e,t){return e.push.apply(e,Vt(t)),e}function Ue(e,t,n){e&&Fe(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function ze(e,t){Ue(e,Qe(t)?t.split(" "):t,!0)}function Nt(e,t){Fe(t,e.appendChild.bind(e))}function Vn(e,t){Fe(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Lt(e,t){return Fo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ko(e,t){var n=e?tt(e.children):[];return t?n.filter(function(o){return Lt(o,t)}):n}function Ot(e,t){return t?ko(e,t)[0]:e.firstElementChild}var Ft=Object.keys;function at(e,t,n){return e&&(n?Ft(e).reverse():Ft(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function kt(e){return tt(arguments,1).forEach(function(t){at(t,function(n,o){e[o]=t[o]})}),e}function Ke(e){return tt(arguments,1).forEach(function(t){at(t,function(n,o){Pn(n)?e[o]=n.slice():Et(n)?e[o]=Ke({},Et(e[o])?e[o]:{},n):e[o]=n})}),e}function lo(e,t){Fe(t||Ft(e),function(n){delete e[n]})}function He(e,t){Fe(e,function(n){Fe(t,function(o){n&&n.removeAttribute(o)})})}function re(e,t,n){Et(t)?at(t,function(o,r){re(e,r,o)}):Fe(e,function(o){zn(n)||n===""?He(o,t):o.setAttribute(t,String(n))})}function ft(e,t,n){var o=document.createElement(e);return t&&(Qe(t)?ze(o,t):re(o,t)),n&&Nt(n,o),o}function Re(e,t,n){if(Ht(n))return getComputedStyle(e)[t];zn(n)||(e.style[t]=""+n)}function Rt(e,t){Re(e,"display",t)}function Ro(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Me(e,t){return e.getAttribute(t)}function so(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function lt(e){Fe(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Mo(e){return Ot(new DOMParser().parseFromString(e,"text/html").body)}function De(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wo(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?tt(e.querySelectorAll(t)):[]}function qe(e,t){Ue(e,t,!1)}function In(e){return e.timeStamp}function it(e){return Qe(e)?e:e?e+"px":""}var jt="splide",On="data-"+jt;function At(e,t){if(!e)throw new Error("["+jt+"] "+(t||""))}var et=Math.min,on=Math.max,rn=Math.floor,Mt=Math.ceil,Ae=Math.abs;function Po(e,t,n){return Ae(e-t)<n}function en(e,t,n,o){var r=et(t,n),s=on(t,n);return o?r<e&&e<s:r<=e&&e<=s}function dt(e,t,n){var o=et(t,n),r=on(t,n);return et(on(o,e),r)}function En(e){return+(e>0)-+(e<0)}function Ln(e,t){return Fe(t,function(n){e=e.replace("%s",""+n)}),e}function jn(e){return e<10?"0"+e:""+e}var co={};function mi(e){return""+e+jn(co[e]=(co[e]||0)+1)}function zo(){var e=[];function t(i,c,p,g){r(i,c,function(u,F,S){var y="addEventListener"in u,d=y?u.removeEventListener.bind(u,F,p,g):u.removeListener.bind(u,p);y?u.addEventListener(F,p,g):u.addListener(p),e.push([u,F,S,p,d])})}function n(i,c,p){r(i,c,function(g,u,F){e=e.filter(function(S){return S[0]===g&&S[1]===u&&S[2]===F&&(!p||S[3]===p)?(S[4](),!1):!0})})}function o(i,c,p){var g,u=!0;return typeof CustomEvent=="function"?g=new CustomEvent(c,{bubbles:u,detail:p}):(g=document.createEvent("CustomEvent"),g.initCustomEvent(c,u,!1,p)),i.dispatchEvent(g),g}function r(i,c,p){Fe(i,function(g){g&&Fe(c,function(u){u.split(" ").forEach(function(F){var S=F.split(".");p(g,S[0],S[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ye(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var nt="mounted",Fn="ready",Xe="move",Ct="moved",Bn="click",Ho="active",Vo="inactive",No="visible",Oo="hidden",Ce="refresh",$e="updated",bt="resize",cn="resized",jo="drag",Bo="dragging",Do="dragged",pn="scroll",ct="scrolled",fi="overflow",Dn="destroy",Uo="arrows:mounted",qo="arrows:updated",Go="pagination:mounted",Yo="pagination:updated",Un="navigation:mounted",qn="autoplay:play",Xo="autoplay:playing",Gn="autoplay:pause",Yn="lazyload:loaded",Ko="sk",Jo="sh",an="ei";function ve(e){var t=e?e.event.bus:document.createDocumentFragment(),n=zo();function o(s,i){n.bind(t,Vt(s).join(" "),function(c){i.apply(i,Pn(c.detail)?c.detail:[])})}function r(s){n.dispatch(t,s,tt(arguments,1))}return e&&e.event.on(Dn,n.destroy),kt(n,{bus:t,on:o,off:ye(n.unbind,t),emit:r})}function un(e,t,n,o){var r=Date.now,s,i=0,c,p=!0,g=0;function u(){if(!p){if(i=e?et((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++g>=o))return S();c=ao(u)}}function F(v){v||d(),s=r()-(v?i*e:0),p=!1,c=ao(u)}function S(){p=!0}function y(){s=r(),i=0,n&&n(i)}function d(){c&&cancelAnimationFrame(c),i=0,c=0,p=!0}function m(v){e=v}function w(){return p}return{start:F,rewind:y,pause:S,cancel:d,set:m,isPaused:w}}function yi(e){var t=e;function n(r){t=r}function o(r){return Hn(Vt(r),t)}return{set:n,is:o}}function hi(e,t){var n=un(0,e,null,1);return function(){n.isPaused()&&n.start()}}function vi(e,t,n){var o=e.state,r=n.breakpoints||{},s=n.reducedMotion||{},i=zo(),c=[];function p(){var d=n.mediaQuery==="min";Ft(r).sort(function(m,w){return d?+m-+w:+w-+m}).forEach(function(m){u(r[m],"("+(d?"min":"max")+"-width:"+m+"px)")}),u(s,io),F()}function g(d){d&&i.destroy()}function u(d,m){var w=matchMedia(m);i.bind(w,"change",F),c.push([d,w])}function F(){var d=o.is(nn),m=n.direction,w=c.reduce(function(v,b){return Ke(v,b[1].matches?b[0]:{})},{});lo(n),y(w),n.destroy?e.destroy(n.destroy==="completely"):d?(g(!0),e.mount()):m!==n.direction&&e.refresh()}function S(d){matchMedia(io).matches&&(d?Ke(n,s):lo(n,Ft(s)))}function y(d,m,w){Ke(n,d),m&&Ke(Object.getPrototypeOf(n),d),(w||!o.is(mt))&&e.emit($e,n)}return{setup:p,destroy:g,reduce:S,set:y}}var dn="Arrow",gn=dn+"Left",mn=dn+"Right",Zo=dn+"Up",Qo=dn+"Down",po="rtl",fn="ttb",Sn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Zo,mn],ArrowRight:[Qo,gn]};function bi(e,t,n){function o(s,i,c){c=c||n.direction;var p=c===po&&!i?1:c===fn?0:-1;return Sn[s]&&Sn[s][p]||s.replace(/width|left|right/i,function(g,u){var F=Sn[g.toLowerCase()][p]||g;return u>0?F.charAt(0).toUpperCase()+F.slice(1):F})}function r(s){return s*(n.direction===po?1:-1)}return{resolve:o,orient:r}}var Ge="role",yt="tabindex",xi="disabled",We="aria-",Bt=We+"controls",er=We+"current",uo=We+"selected",Le=We+"label",Xn=We+"labelledby",tr=We+"hidden",Kn=We+"orientation",Wt=We+"roledescription",go=We+"live",mo=We+"busy",fo=We+"atomic",Jn=[Ge,yt,xi,Bt,er,Le,Xn,tr,Kn,Wt],Ve=jt+"__",ot="is-",Cn=jt,yo=Ve+"track",Si=Ve+"list",yn=Ve+"slide",nr=yn+"--clone",Ci=yn+"__container",Zn=Ve+"arrows",hn=Ve+"arrow",or=hn+"--prev",rr=hn+"--next",vn=Ve+"pagination",ir=vn+"__page",wi=Ve+"progress",Ti=wi+"__bar",_i=Ve+"toggle",$i=Ve+"spinner",Ai=Ve+"sr",Ii=ot+"initialized",st=ot+"active",ar=ot+"prev",lr=ot+"next",kn=ot+"visible",Rn=ot+"loading",sr=ot+"focus-in",cr=ot+"overflow",Ei=[st,kn,ar,lr,Rn,sr,cr],Li={slide:yn,clone:nr,arrows:Zn,arrow:hn,prev:or,next:rr,pagination:vn,page:ir,spinner:$i};function Fi(e,t){if(Lo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Lt(n,t);)n=n.parentElement;return n}var ki=5,ho=200,pr="touchstart mousedown",wn="touchmove mousemove",Tn="touchend touchcancel mouseup click";function Ri(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=e.root,c=n.i18n,p={},g=[],u=[],F=[],S,y,d;function m(){L(),G(),b()}function w(){r(Ce,v),r(Ce,m),r($e,b),s(document,pr+" keydown",function(x){d=x.type==="keydown"},{capture:!0}),s(i,"focusin",function(){Ue(i,sr,!!d)})}function v(x){var R=Jn.concat("style");Ye(g),qe(i,u),qe(S,F),He([S,y],R),He(i,x?R:["style",Wt])}function b(){qe(i,u),qe(S,F),u=T(Cn),F=T(yo),ze(i,u),ze(S,F),re(i,Le,n.label),re(i,Xn,n.labelledby)}function L(){S=N("."+yo),y=Ot(S,"."+Si),At(S&&y,"A track/list element is missing."),Qt(g,ko(y,"."+yn+":not(."+nr+")")),at({arrows:Zn,pagination:vn,prev:or,next:rr,bar:Ti,toggle:_i},function(x,R){p[R]=N("."+x)}),kt(p,{root:i,track:S,list:y,slides:g})}function G(){var x=i.id||mi(jt),R=n.role;i.id=x,S.id=S.id||x+"-track",y.id=y.id||x+"-list",!Me(i,Ge)&&i.tagName!=="SECTION"&&R&&re(i,Ge,R),re(i,Wt,c.carousel),re(y,Ge,"presentation")}function N(x){var R=Wo(i,x);return R&&Fi(R,"."+Cn)===i?R:void 0}function T(x){return[x+"--"+n.type,x+"--"+n.direction,n.drag&&x+"--draggable",n.isNavigation&&x+"--nav",x===Cn&&st]}return kt(p,{setup:m,mount:w,destroy:v})}var xt="slide",wt="loop",Dt="fade";function Mi(e,t,n,o){var r=ve(e),s=r.on,i=r.emit,c=r.bind,p=e.Components,g=e.root,u=e.options,F=u.isNavigation,S=u.updateOnMove,y=u.i18n,d=u.pagination,m=u.slideFocus,w=p.Direction.resolve,v=Me(o,"style"),b=Me(o,Le),L=n>-1,G=Ot(o,"."+Ci),N;function T(){L||(o.id=g.id+"-slide"+jn(t+1),re(o,Ge,d?"tabpanel":"group"),re(o,Wt,y.slide),re(o,Le,b||Ln(y.slideLabel,[t+1,e.length]))),x()}function x(){c(o,"click",ye(i,Bn,E)),c(o,"keydown",ye(i,Ko,E)),s([Ct,Jo,ct],W),s(Un,C),S&&s(Xe,O)}function R(){N=!0,r.destroy(),qe(o,Ei),He(o,Jn),re(o,"style",v),re(o,Le,b||"")}function C(){var I=e.splides.map(function($){var k=$.splide.Components.Slides.getAt(t);return k?k.slide.id:""}).join(" ");re(o,Le,Ln(y.slideX,(L?n:t)+1)),re(o,Bt,I),re(o,Ge,m?"button":""),m&&He(o,Wt)}function O(){N||W()}function W(){if(!N){var I=e.index;V(),H(),Ue(o,ar,t===I-1),Ue(o,lr,t===I+1)}}function V(){var I=D();I!==so(o,st)&&(Ue(o,st,I),re(o,er,F&&I||""),i(I?Ho:Vo,E))}function H(){var I=f(),$=!I&&(!D()||L);if(e.state.is([St,zt])||re(o,tr,$||""),re(Nn(o,u.focusableNodes||""),yt,$?-1:""),m&&re(o,yt,$?-1:0),I!==so(o,kn)&&(Ue(o,kn,I),i(I?No:Oo,E)),!I&&document.activeElement===o){var k=p.Slides.getAt(e.index);k&&Ro(k.slide)}}function Y(I,$,k){Re(k&&G||o,I,$)}function D(){var I=e.index;return I===t||u.cloneStatus&&I===n}function f(){if(e.is(Dt))return D();var I=Ee(p.Elements.track),$=Ee(o),k=w("left",!0),J=w("right",!0);return rn(I[k])<=Mt($[k])&&rn($[J])<=Mt(I[J])}function M(I,$){var k=Ae(I-t);return!L&&(u.rewind||e.is(wt))&&(k=et(k,e.length-k)),k<=$}var E={index:t,slideIndex:n,slide:o,container:G,isClone:L,mount:T,destroy:R,update:W,style:Y,isWithin:M};return E}function Wi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=o.bind,c=t.Elements,p=c.slides,g=c.list,u=[];function F(){S(),r(Ce,y),r(Ce,S)}function S(){p.forEach(function(W,V){m(W,V,-1)})}function y(){N(function(W){W.destroy()}),Ye(u)}function d(){N(function(W){W.update()})}function m(W,V,H){var Y=Mi(e,V,H,W);Y.mount(),u.push(Y),u.sort(function(D,f){return D.index-f.index})}function w(W){return W?T(function(V){return!V.isClone}):u}function v(W){var V=t.Controller,H=V.toIndex(W),Y=V.hasFocus()?1:n.perPage;return T(function(D){return en(D.index,H,H+Y-1)})}function b(W){return T(W)[0]}function L(W,V){Fe(W,function(H){if(Qe(H)&&(H=Mo(H)),Fo(H)){var Y=p[V];Y?Vn(H,Y):Nt(g,H),ze(H,n.classes.slide),R(H,ye(s,bt))}}),s(Ce)}function G(W){lt(T(W).map(function(V){return V.slide})),s(Ce)}function N(W,V){w(V).forEach(W)}function T(W){return u.filter(Lo(W)?W:function(V){return Qe(W)?Lt(V.slide,W):Hn(Vt(W),V.index)})}function x(W,V,H){N(function(Y){Y.style(W,V,H)})}function R(W,V){var H=Nn(W,"img"),Y=H.length;Y?H.forEach(function(D){i(D,"load error",function(){--Y||V()})}):V()}function C(W){return W?p.length:u.length}function O(){return u.length>n.perPage}return{mount:F,destroy:y,update:d,register:m,get:w,getIn:v,getAt:b,add:L,remove:G,forEach:N,filter:T,style:x,getLength:C,isEnough:O}}function Pi(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.emit,c=t.Slides,p=t.Direction.resolve,g=t.Elements,u=g.root,F=g.track,S=g.list,y=c.getAt,d=c.style,m,w,v;function b(){L(),s(window,"resize load",hi(ye(i,bt))),r([$e,Ce],L),r(bt,G)}function L(){m=n.direction===fn,Re(u,"maxWidth",it(n.width)),Re(F,p("paddingLeft"),N(!1)),Re(F,p("paddingRight"),N(!0)),G(!0)}function G(E){var I=Ee(u);(E||w.width!==I.width||w.height!==I.height)&&(Re(F,"height",T()),d(p("marginRight"),it(n.gap)),d("width",R()),d("height",C(),!0),w=I,i(cn),v!==(v=M())&&(Ue(u,cr,v),i(fi,v)))}function N(E){var I=n.padding,$=p(E?"right":"left");return I&&it(I[$]||(Et(I)?0:I))||"0px"}function T(){var E="";return m&&(E=x(),At(E,"height or heightRatio is missing."),E="calc("+E+" - "+N(!1)+" - "+N(!0)+")"),E}function x(){return it(n.height||Ee(S).width*n.heightRatio)}function R(){return n.autoWidth?null:it(n.fixedWidth)||(m?"":O())}function C(){return it(n.fixedHeight)||(m?n.autoHeight?null:O():x())}function O(){var E=it(n.gap);return"calc((100%"+(E&&" + "+E)+")/"+(n.perPage||1)+(E&&" - "+E)+")"}function W(){return Ee(S)[p("width")]}function V(E,I){var $=y(E||0);return $?Ee($.slide)[p("width")]+(I?0:D()):0}function H(E,I){var $=y(E);if($){var k=Ee($.slide)[p("right")],J=Ee(S)[p("left")];return Ae(k-J)+(I?0:D())}return 0}function Y(E){return H(e.length-1)-H(0)+V(0,E)}function D(){var E=y(0);return E&&parseFloat(Re(E.slide,p("marginRight")))||0}function f(E){return parseFloat(Re(F,p("padding"+(E?"Right":"Left"))))||0}function M(){return e.is(Dt)||Y(!0)>W()}return{mount:b,resize:G,listSize:W,slideSize:V,sliderSize:Y,totalSize:H,getPadding:f,isOverflow:M}}var zi=2;function Hi(e,t,n){var o=ve(e),r=o.on,s=t.Elements,i=t.Slides,c=t.Direction.resolve,p=[],g;function u(){r(Ce,F),r([$e,bt],y),(g=w())&&(d(g),t.Layout.resize(!0))}function F(){S(),u()}function S(){lt(p),Ye(p),o.destroy()}function y(){var v=w();g!==v&&(g<v||!v)&&o.emit(Ce)}function d(v){var b=i.get().slice(),L=b.length;if(L){for(;b.length<v;)Qt(b,b);Qt(b.slice(-v),b.slice(0,v)).forEach(function(G,N){var T=N<v,x=m(G.slide,N);T?Vn(x,b[0].slide):Nt(s.list,x),Qt(p,x),i.register(x,N-v+(T?0:L),G.index)})}}function m(v,b){var L=v.cloneNode(!0);return ze(L,n.classes.clone),L.id=e.root.id+"-clone"+jn(b+1),L}function w(){var v=n.clones;if(!e.is(wt))v=0;else if(Ht(v)){var b=n[c("fixedWidth")]&&t.Layout.slideSize(0),L=b&&Mt(Ee(s.track)[c("width")]/b);v=L||n[c("autoWidth")]&&e.length||n.perPage*zi}return v}return{mount:u,destroy:S}}function Vi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=e.state.set,c=t.Layout,p=c.slideSize,g=c.getPadding,u=c.totalSize,F=c.listSize,S=c.sliderSize,y=t.Direction,d=y.resolve,m=y.orient,w=t.Elements,v=w.list,b=w.track,L;function G(){L=t.Transition,r([nt,cn,$e,Ce],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),x(e.index),t.Slides.update())}function T($,k,J,ae){$!==k&&E($>J)&&(W(),R(O(Y(),$>J),!0)),i(St),s(Xe,k,J,$),L.start(k,function(){i(vt),s(Ct,k,J,$),ae&&ae()})}function x($){R(H($,!0))}function R($,k){if(!e.is(Dt)){var J=k?$:C($);Re(v,"transform","translate"+d("X")+"("+J+"px)"),$!==J&&s(Jo)}}function C($){if(e.is(wt)){var k=V($),J=k>t.Controller.getEnd(),ae=k<0;(ae||J)&&($=O($,J))}return $}function O($,k){var J=$-M(k),ae=S();return $-=m(ae*(Mt(Ae(J)/ae)||1))*(k?1:-1),$}function W(){R(Y(),!0),L.cancel()}function V($){for(var k=t.Slides.get(),J=0,ae=1/0,te=0;te<k.length;te++){var ie=k[te].index,P=Ae(H(ie,!0)-$);if(P<=ae)ae=P,J=ie;else break}return J}function H($,k){var J=m(u($-1)-f($));return k?D(J):J}function Y(){var $=d("left");return Ee(v)[$]-Ee(b)[$]+m(g(!1))}function D($){return n.trimSpace&&e.is(xt)&&($=dt($,0,m(S(!0)-F()))),$}function f($){var k=n.focus;return k==="center"?(F()-p($,!0))/2:+k*p($)||0}function M($){return H($?t.Controller.getEnd():0,!!n.trimSpace)}function E($){var k=m(O(Y(),$));return $?k>=0:k<=v[d("scrollWidth")]-Ee(b)[d("width")]}function I($,k){k=Ht(k)?Y():k;var J=$!==!0&&m(k)<m(M(!1)),ae=$!==!1&&m(k)>m(M(!0));return J||ae}return{mount:G,move:T,jump:x,translate:R,shift:O,cancel:W,toIndex:V,toPosition:H,getPosition:Y,getLimit:M,exceededLimit:I,reposition:N}}function Ni(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=t.Move,c=i.getPosition,p=i.getLimit,g=i.toPosition,u=t.Slides,F=u.isEnough,S=u.getLength,y=n.omitEnd,d=e.is(wt),m=e.is(xt),w=ye(Y,!1),v=ye(Y,!0),b=n.start||0,L,G=b,N,T,x;function R(){C(),r([$e,Ce,an],C),r(cn,O)}function C(){N=S(!0),T=n.perMove,x=n.perPage,L=E();var P=dt(b,0,y?L:N-1);P!==b&&(b=P,i.reposition())}function O(){L!==E()&&s(an)}function W(P,Q,de){if(!ie()){var ce=H(P),ge=M(ce);ge>-1&&(Q||ge!==b)&&(J(ge),i.move(ce,ge,G,de))}}function V(P,Q,de,ce){t.Scroll.scroll(P,Q,de,function(){var ge=M(i.toIndex(c()));J(y?et(ge,L):ge),ce&&ce()})}function H(P){var Q=b;if(Qe(P)){var de=P.match(/([+\-<>])(\d+)?/)||[],ce=de[1],ge=de[2];ce==="+"||ce==="-"?Q=D(b+ +(""+ce+(+ge||1)),b):ce===">"?Q=ge?I(+ge):w(!0):ce==="<"&&(Q=v(!0))}else Q=d?P:dt(P,0,L);return Q}function Y(P,Q){var de=T||(te()?1:x),ce=D(b+de*(P?-1:1),b,!(T||te()));return ce===-1&&m&&!Po(c(),p(!P),1)?P?0:L:Q?ce:M(ce)}function D(P,Q,de){if(F()||te()){var ce=f(P);ce!==P&&(Q=P,P=ce,de=!1),P<0||P>L?!T&&(en(0,P,Q,!0)||en(L,Q,P,!0))?P=I($(P)):d?P=de?P<0?-(N%x||x):N:P:n.rewind?P=P<0?L:0:P=-1:de&&P!==Q&&(P=I($(Q)+(P<Q?-1:1)))}else P=-1;return P}function f(P){if(m&&n.trimSpace==="move"&&P!==b)for(var Q=c();Q===g(P,!0)&&en(P,0,e.length-1,!n.rewind);)P<b?--P:++P;return P}function M(P){return d?(P+N)%N||0:P}function E(){for(var P=N-(te()||d&&T?1:x);y&&P-- >0;)if(g(N-1,!0)!==g(P,!0)){P++;break}return dt(P,0,N-1)}function I(P){return dt(te()?P:x*P,0,L)}function $(P){return te()?et(P,L):rn((P>=L?N-1:P)/x)}function k(P){var Q=i.toIndex(P);return m?dt(Q,0,L):Q}function J(P){P!==b&&(G=b,b=P)}function ae(P){return P?G:b}function te(){return!Ht(n.focus)||n.isNavigation}function ie(){return e.state.is([St,zt])&&!!n.waitForTransition}return{mount:R,go:W,scroll:V,getNext:w,getPrev:v,getAdjacent:Y,getEnd:E,setIndex:J,getIndex:ae,toIndex:I,toPage:$,toDest:k,hasFocus:te,isBusy:ie}}var Oi="http://www.w3.org/2000/svg",ji="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Gt=40;function Bi(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.emit,c=n.classes,p=n.i18n,g=t.Elements,u=t.Controller,F=g.arrows,S=g.track,y=F,d=g.prev,m=g.next,w,v,b={};function L(){N(),r($e,G)}function G(){T(),L()}function N(){var V=n.arrows;V&&!(d&&m)&&C(),d&&m&&(kt(b,{prev:d,next:m}),Rt(y,V?"":"none"),ze(y,v=Zn+"--"+n.direction),V&&(x(),W(),re([d,m],Bt,S.id),i(Uo,d,m)))}function T(){o.destroy(),qe(y,v),w?(lt(F?[d,m]:y),d=m=null):He([d,m],Jn)}function x(){r([nt,Ct,Ce,ct,an],W),s(m,"click",ye(R,">")),s(d,"click",ye(R,"<"))}function R(V){u.go(V,!0)}function C(){y=F||ft("div",c.arrows),d=O(!0),m=O(!1),w=!0,Nt(y,[d,m]),!F&&Vn(y,S)}function O(V){var H='<button class="'+c.arrow+" "+(V?c.prev:c.next)+'" type="button"><svg xmlns="'+Oi+'" viewBox="0 0 '+Gt+" "+Gt+'" width="'+Gt+'" height="'+Gt+'" focusable="false"><path d="'+(n.arrowPath||ji)+'" />';return Mo(H)}function W(){if(d&&m){var V=e.index,H=u.getPrev(),Y=u.getNext(),D=H>-1&&V<H?p.last:p.prev,f=Y>-1&&V>Y?p.first:p.next;d.disabled=H<0,m.disabled=Y<0,re(d,Le,D),re(m,Le,f),i(qo,d,m,H,Y)}}return{arrows:b,mount:L,destroy:T,update:W}}var Di=On+"-interval";function Ui(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.emit,c=un(n.interval,e.go.bind(e,">"),x),p=c.isPaused,g=t.Elements,u=t.Elements,F=u.root,S=u.toggle,y=n.autoplay,d,m,w=y==="pause";function v(){y&&(b(),S&&re(S,Bt,g.track.id),w||L(),T())}function b(){n.pauseOnHover&&s(F,"mouseenter mouseleave",function(C){d=C.type==="mouseenter",N()}),n.pauseOnFocus&&s(F,"focusin focusout",function(C){m=C.type==="focusin",N()}),S&&s(S,"click",function(){w?L():G(!0)}),r([Xe,pn,Ce],c.rewind),r(Xe,R)}function L(){p()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),m=d=w=!1,T(),i(qn))}function G(C){C===void 0&&(C=!0),w=!!C,T(),p()||(c.pause(),i(Gn))}function N(){w||(d||m?G(!1):L())}function T(){S&&(Ue(S,st,!w),re(S,Le,n.i18n[w?"play":"pause"]))}function x(C){var O=g.bar;O&&Re(O,"width",C*100+"%"),i(Xo,C)}function R(C){var O=t.Slides.getAt(C);c.set(O&&+Me(O.slide,Di)||n.interval)}return{mount:v,destroy:c.cancel,play:L,pause:G,isPaused:p}}function qi(e,t,n){var o=ve(e),r=o.on;function s(){n.cover&&(r(Yn,ye(c,!0)),r([nt,$e,Ce],ye(i,!0)))}function i(p){t.Slides.forEach(function(g){var u=Ot(g.container||g.slide,"img");u&&u.src&&c(p,u,g)})}function c(p,g,u){u.style("background",p?'center/cover no-repeat url("'+g.src+'")':"",!0),Rt(g,p?"none":"")}return{mount:s,destroy:ye(i,!1)}}var Gi=10,Yi=600,Xi=.6,Ki=1.5,Ji=800;function Zi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=e.state.set,c=t.Move,p=c.getPosition,g=c.getLimit,u=c.exceededLimit,F=c.translate,S=e.is(xt),y,d,m=1;function w(){r(Xe,G),r([$e,Ce],N)}function v(x,R,C,O,W){var V=p();if(G(),C&&(!S||!u())){var H=t.Layout.sliderSize(),Y=En(x)*H*rn(Ae(x)/H)||0;x=c.toPosition(t.Controller.toDest(x%H))+Y}var D=Po(V,x,1);m=1,R=D?0:R||on(Ae(x-V)/Ki,Ji),d=O,y=un(R,b,ye(L,V,x,W),1),i(zt),s(pn),y.start()}function b(){i(vt),d&&d(),s(ct)}function L(x,R,C,O){var W=p(),V=x+(R-x)*T(O),H=(V-W)*m;F(W+H),S&&!C&&u()&&(m*=Xi,Ae(H)<Gi&&v(g(u(!0)),Yi,!1,d,!0))}function G(){y&&y.cancel()}function N(){y&&!y.isPaused()&&(G(),b())}function T(x){var R=n.easingFunc;return R?R(x):1-Math.pow(1-x,4)}return{mount:w,destroy:G,scroll:v,cancel:N}}var gt={passive:!1,capture:!0};function Qi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=o.bind,c=o.unbind,p=e.state,g=t.Move,u=t.Scroll,F=t.Controller,S=t.Elements.track,y=t.Media.reduce,d=t.Direction,m=d.resolve,w=d.orient,v=g.getPosition,b=g.exceededLimit,L,G,N,T,x,R=!1,C,O,W;function V(){i(S,wn,An,gt),i(S,Tn,An,gt),i(S,pr,Y,gt),i(S,"click",M,{capture:!0}),i(S,"dragstart",De),r([nt,$e],H)}function H(){var U=n.drag;_e(!U),T=U==="free"}function Y(U){if(C=!1,!O){var a=ge(U);ce(U.target)&&(a||!U.button)&&(F.isBusy()?De(U,!0):(W=a?S:window,x=p.is([St,zt]),N=null,i(W,wn,D,gt),i(W,Tn,f,gt),g.cancel(),u.cancel(),E(U)))}}function D(U){if(p.is(Zt)||(p.set(Zt),s(jo)),U.cancelable)if(x){g.translate(L+de(te(U)));var a=ie(U)>ho,h=R!==(R=b());(a||h)&&E(U),C=!0,s(Bo),De(U)}else k(U)&&(x=$(U),De(U))}function f(U){p.is(Zt)&&(p.set(vt),s(Do)),x&&(I(U),De(U)),c(W,wn,D),c(W,Tn,f),x=!1}function M(U){!O&&C&&De(U,!0)}function E(U){N=G,G=U,L=v()}function I(U){var a=J(U),h=ae(a),z=n.rewind&&n.rewindByDrag;y(!1),T?F.scroll(h,0,n.snap):e.is(Dt)?F.go(w(En(a))<0?z?"<":"-":z?">":"+"):e.is(xt)&&R&&z?F.go(b(!0)?">":"<"):F.go(F.toDest(h),!0),y(!0)}function $(U){var a=n.dragMinThreshold,h=Et(a),z=h&&a.mouse||0,j=(h?a.touch:+a)||10;return Ae(te(U))>(ge(U)?j:z)}function k(U){return Ae(te(U))>Ae(te(U,!0))}function J(U){if(e.is(wt)||!R){var a=ie(U);if(a&&a<ho)return te(U)/a}return 0}function ae(U){return v()+En(U)*et(Ae(U)*(n.flickPower||600),T?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(U,a){return Q(U,a)-Q(P(U),a)}function ie(U){return In(U)-In(P(U))}function P(U){return G===U&&N||G}function Q(U,a){return(ge(U)?U.changedTouches[0]:U)["page"+m(a?"Y":"X")]}function de(U){return U/(R&&e.is(xt)?ki:1)}function ce(U){var a=n.noDrag;return!Lt(U,"."+ir+", ."+hn)&&(!a||!Lt(U,a))}function ge(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function he(){return x}function _e(U){O=U}return{mount:V,disable:_e,isDragging:he}}var ea={Spacebar:" ",Right:mn,Left:gn,Up:Zo,Down:Qo};function Qn(e){return e=Qe(e)?e:e.key,ea[e]||e}var vo="keydown";function ta(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.unbind,c=e.root,p=t.Direction.resolve,g,u;function F(){S(),r($e,y),r($e,S),r(Xe,m)}function S(){var v=n.keyboard;v&&(g=v==="global"?window:c,s(g,vo,w))}function y(){i(g,vo)}function d(v){u=v}function m(){var v=u;u=!0,Eo(function(){u=v})}function w(v){if(!u){var b=Qn(v);b===p(gn)?e.go("<"):b===p(mn)&&e.go(">")}}return{mount:F,destroy:y,disable:d}}var It=On+"-lazy",tn=It+"-srcset",na="["+It+"], ["+tn+"]";function oa(e,t,n){var o=ve(e),r=o.on,s=o.off,i=o.bind,c=o.emit,p=n.lazyLoad==="sequential",g=[Ct,ct],u=[];function F(){n.lazyLoad&&(S(),r(Ce,S))}function S(){Ye(u),y(),p?v():(s(g),r(g,d),d())}function y(){t.Slides.forEach(function(b){Nn(b.slide,na).forEach(function(L){var G=Me(L,It),N=Me(L,tn);if(G!==L.src||N!==L.srcset){var T=n.classes.spinner,x=L.parentElement,R=Ot(x,"."+T)||ft("span",T,x);u.push([L,b,R]),L.src||Rt(L,"none")}})})}function d(){u=u.filter(function(b){var L=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(e.index,L)?m(b):!0}),u.length||s(g)}function m(b){var L=b[0];ze(b[1].slide,Rn),i(L,"load error",ye(w,b)),re(L,"src",Me(L,It)),re(L,"srcset",Me(L,tn)),He(L,It),He(L,tn)}function w(b,L){var G=b[0],N=b[1];qe(N.slide,Rn),L.type!=="error"&&(lt(b[2]),Rt(G,""),c(Yn,G,N),c(bt)),p&&v()}function v(){u.length&&m(u.shift())}return{mount:F,destroy:ye(Ye,u),check:d}}function ra(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=o.bind,c=t.Slides,p=t.Elements,g=t.Controller,u=g.hasFocus,F=g.getIndex,S=g.go,y=t.Direction.resolve,d=p.pagination,m=[],w,v;function b(){L(),r([$e,Ce,an],b);var O=n.pagination;d&&Rt(d,O?"":"none"),O&&(r([Xe,pn,ct],C),G(),C(),s(Go,{list:w,items:m},R(e.index)))}function L(){w&&(lt(d?tt(w.children):w),qe(w,v),Ye(m),w=null),o.destroy()}function G(){var O=e.length,W=n.classes,V=n.i18n,H=n.perPage,Y=u()?g.getEnd()+1:Mt(O/H);w=d||ft("ul",W.pagination,p.track.parentElement),ze(w,v=vn+"--"+x()),re(w,Ge,"tablist"),re(w,Le,V.select),re(w,Kn,x()===fn?"vertical":"");for(var D=0;D<Y;D++){var f=ft("li",null,w),M=ft("button",{class:W.page,type:"button"},f),E=c.getIn(D).map(function($){return $.slide.id}),I=!u()&&H>1?V.pageX:V.slideX;i(M,"click",ye(N,D)),n.paginationKeyboard&&i(M,"keydown",ye(T,D)),re(f,Ge,"presentation"),re(M,Ge,"tab"),re(M,Bt,E.join(" ")),re(M,Le,Ln(I,D+1)),re(M,yt,-1),m.push({li:f,button:M,page:D})}}function N(O){S(">"+O,!0)}function T(O,W){var V=m.length,H=Qn(W),Y=x(),D=-1;H===y(mn,!1,Y)?D=++O%V:H===y(gn,!1,Y)?D=(--O+V)%V:H==="Home"?D=0:H==="End"&&(D=V-1);var f=m[D];f&&(Ro(f.button),S(">"+D),De(W,!0))}function x(){return n.paginationDirection||n.direction}function R(O){return m[g.toPage(O)]}function C(){var O=R(F(!0)),W=R(F());if(O){var V=O.button;qe(V,st),He(V,uo),re(V,yt,-1)}if(W){var H=W.button;ze(H,st),re(H,uo,!0),re(H,yt,"")}s(Yo,{list:w,items:m},O,W)}return{items:m,mount:b,destroy:L,getAt:R,update:C}}var ia=[" ","Enter"];function aa(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(d){d.isParent||(g(e,d.splide),g(d.splide,e))}),o&&u()}function c(){s.forEach(function(d){d.destroy()}),Ye(s)}function p(){c(),i()}function g(d,m){var w=ve(d);w.on(Xe,function(v,b,L){m.go(m.is(wt)?L:v)}),s.push(w)}function u(){var d=ve(e),m=d.on;m(Bn,S),m(Ko,y),m([nt,$e],F),s.push(d),d.emit(Un,e.splides)}function F(){re(t.Elements.list,Kn,n.direction===fn?"vertical":"")}function S(d){e.go(d.index)}function y(d,m){Hn(ia,Qn(m))&&(S(d),De(m))}return{setup:ye(t.Media.set,{slideFocus:Ht(r)?o:r},!0),mount:i,destroy:c,remount:p}}function la(e,t,n){var o=ve(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",c,gt)}function c(g){if(g.cancelable){var u=g.deltaY,F=u<0,S=In(g),y=n.wheelMinThreshold||0,d=n.wheelSleep||0;Ae(u)>y&&S-s>d&&(e.go(F?"<":">"),s=S),p(F)&&De(g)}}function p(g){return!n.releaseWheel||e.state.is(St)||t.Controller.getAdjacent(g)!==-1}return{mount:i}}var sa=90;function ca(e,t,n){var o=ve(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,c=ft("span",Ai),p=un(sa,ye(u,!1));function g(){i&&(S(!t.Autoplay.isPaused()),re(s,fo,!0),c.textContent="…",r(qn,ye(S,!0)),r(Gn,ye(S,!1)),r([Ct,ct],ye(u,!0)))}function u(y){re(s,mo,y),y?(Nt(s,c),p.start()):(lt(c),p.cancel())}function F(){He(s,[go,fo,mo]),lt(c)}function S(y){i&&re(s,go,y?"off":"polite")}return{mount:g,disable:S,destroy:F}}var pa=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Ri,Slides:Wi,Layout:Pi,Clones:Hi,Move:Vi,Controller:Ni,Arrows:Bi,Autoplay:Ui,Cover:qi,Scroll:Zi,Drag:Qi,Keyboard:ta,LazyLoad:oa,Pagination:ra,Sync:aa,Wheel:la,Live:ca}),ua={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},da={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Li,i18n:ua,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(e,t,n){var o=t.Slides;function r(){ve(e).on([nt,Ce],s)}function s(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,p){o.style("transition","opacity "+n.speed+"ms "+n.easing),Eo(p)}return{mount:r,start:i,cancel:An}}function ma(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,c=ye(Re,i,"transition"),p;function g(){ve(e).bind(i,"transitionend",function(y){y.target===i&&p&&(F(),p())})}function u(y,d){var m=o.toPosition(y,!0),w=o.getPosition(),v=S(y);Ae(m-w)>=1&&v>=1?n.useScroll?s.scroll(m,v,!1,d):(c("transform "+v+"ms "+n.easing),o.translate(m,!0),p=d):(o.jump(y),d())}function F(){c(""),s.cancel()}function S(y){var d=n.rewindSpeed;if(e.is(xt)&&d){var m=r.getIndex(!0),w=r.getEnd();if(m===0&&y>=w||m>=w&&y===0)return d}return n.speed}return{mount:g,start:u,cancel:F}}var fa=(function(){function e(n,o){this.event=ve(),this.Components={},this.state=yi(mt),this.splides=[],this._o={},this._E={};var r=Qe(n)?Wo(document,n):n;At(r,r+" is invalid."),this.root=r,o=Ke({label:Me(r,Le)||"",labelledby:Me(r,Xn)||""},da,e.defaults,o||{});try{Ke(o,JSON.parse(Me(r,On)))}catch{At(!1,"Invalid JSON")}this._o=Object.create(Ke({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,c=this.Components;At(i.is([mt,nn]),"Already mounted!"),i.set(mt),this._C=c,this._T=r||this._T||(this.is(Dt)?ga:ma),this._E=o||this._E;var p=kt({},pa,this._E,{Transition:this._T});return at(p,function(g,u){var F=g(s,c,s._o);c[u]=F,F.setup&&F.setup()}),at(c,function(g){g.mount&&g.mount()}),this.emit(nt),ze(this.root,Ii),i.set(vt),this.emit(Fn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(vt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(tt(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(Ce),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(mt)?ve(this).on(Fn,this.destroy.bind(this,o)):(at(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Dn),r.destroy(),o&&Ye(this.splides),s.set(nn)),this},ui(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),eo=fa;eo.defaults={};eo.STATES=gi;var bo=[[nt,"onMounted"],[Fn,"onReady"],[Xe,"onMove"],[Ct,"onMoved"],[Bn,"onClick"],[Ho,"onActive"],[Vo,"onInactive"],[No,"onVisible"],[Oo,"onHidden"],[Ce,"onRefresh"],[$e,"onUpdated"],[bt,"onResize"],[cn,"onResized"],[jo,"onDrag"],[Bo,"onDragging"],[Do,"onDragged"],[pn,"onScroll"],[ct,"onScrolled"],[Dn,"onDestroy"],[Uo,"onArrowsMounted"],[qo,"onArrowsUpdated"],[Go,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[Un,"onNavigationMounted"],[qn,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[Gn,"onAutoplayPause"],[Yn,"onLazyLoadLoaded"]];function to(...e){return e.filter(Boolean).join(" ")}function ln(e){return e!==null&&typeof e=="object"}function Mn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Mn(n,t[o]));if(ln(e)&&ln(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Mn(e[r],t[r]))}return e===t}function ya(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ha(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function Wn(e,t){const n=e;return ha(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():ln(o)?n[r]=Wn(ln(n[r])?n[r]:{},o):n[r]=o}),n}var va=({children:e,className:t,...n})=>A.createElement("div",{className:to("splide__track",t),...n},A.createElement("ul",{className:"splide__list"},e)),ur=class extends A.Component{constructor(){super(...arguments),this.splideRef=A.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new eo(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Wn({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Mn(this.options,e)&&(this.splide.options=e,this.options=Wn({},e));const t=this.getSlides();ya(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){bo.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:o,...r}=this.props;return A.createElement(t,{className:to("splide",e),ref:this.splideRef,...this.omit(r,["options",...bo.map(s=>s[1])])},n?A.createElement(va,null,o):o)}},dr=({children:e,className:t,...n})=>A.createElement("li",{className:to("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),A=require("react"),ue=require("classnames"),_=require("./useScopedStyles-DpVdqfXj.js"),br=require("react-dom");function xr(e){return e.type==="object"&&e.version===1}const Sr="ControlSlider-module__wrapper___sHEkd",Cr="ControlSlider-module__hoverArrow___A-dOH",wr="ControlSlider-module__sliderItem___QQSkR",Tr="ControlSlider-module__sliderImage___9hRl-",_r="ControlSlider-module__arrow___05ghY",$r="ControlSlider-module__arrowVertical___tBfVN",Ar="ControlSlider-module__nextArrow___-30Yc",Ir="ControlSlider-module__arrowInner___aEra3",Er="ControlSlider-module__arrowIcon___S4ztF",Lr="ControlSlider-module__arrowImg___2dwJW",Fr="ControlSlider-module__mirror___brd6U",kr="ControlSlider-module__pagination___bicLF",Rr="ControlSlider-module__paginationInner___bT-P-",Mr="ControlSlider-module__paginationVertical___zYqKw",Wr="ControlSlider-module__paginationItem___nTRbk",Pr="ControlSlider-module__dot___p1Qun",zr="ControlSlider-module__activeDot___LHFaj",Hr="ControlSlider-module__paginationInsideBottom___R3FWn",Vr="ControlSlider-module__paginationInsideTop___V-qb-",Nr="ControlSlider-module__paginationOutsideBottom___14w8D",Or="ControlSlider-module__paginationOutsideTop___SCLqB",jr="ControlSlider-module__paginationInsideLeft___yOBRZ",Br="ControlSlider-module__paginationInsideRight___Rtt3o",Dr="ControlSlider-module__paginationOutsideLeft___lahaw",Ur="ControlSlider-module__paginationOutsideRight___EtuQa",qr="ControlSlider-module__imgWrapper___UjEgB",Gr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Xr="ControlSlider-module__captionText___uGBVc",Kr="ControlSlider-module__active___WZK4G",Jr="ControlSlider-module__withPointerEvents___t-18M",Zr="ControlSlider-module__topLeftAlignment___zjnGM",Qr="ControlSlider-module__topCenterAlignment___gD1xW",ei="ControlSlider-module__topRightAlignment___NMapS",ti="ControlSlider-module__middleLeftAlignment___OnUrY",ni="ControlSlider-module__middleCenterAlignment___Tdkl0",oi="ControlSlider-module__middleRightAlignment___wEbfX",ri="ControlSlider-module__bottomLeftAlignment___cTP2-",ii="ControlSlider-module__bottomCenterAlignment___c54fB",ai="ControlSlider-module__bottomRightAlignment___kEwrz",li="ControlSlider-module__clickOverlay___DZA28",si="ControlSlider-module__contain___pLyq7",ci="ControlSlider-module__cover___KdDat",Z={wrapper:Sr,hoverArrow:Cr,sliderItem:wr,sliderImage:Tr,arrow:_r,arrowVertical:$r,nextArrow:Ar,arrowInner:Ir,arrowIcon:Er,arrowImg:Lr,mirror:Fr,pagination:kr,paginationInner:Rr,paginationVertical:Mr,paginationItem:Wr,dot:Pr,activeDot:zr,paginationInsideBottom:Hr,paginationInsideTop:Vr,paginationOutsideBottom:Nr,paginationOutsideTop:Or,paginationInsideLeft:jr,paginationInsideRight:Br,paginationOutsideLeft:Dr,paginationOutsideRight:Ur,imgWrapper:qr,captionBlock:Gr,captionTextWrapper:Yr,captionText:Xr,active:Kr,withPointerEvents:Jr,topLeftAlignment:Zr,topCenterAlignment:Qr,topRightAlignment:ei,middleLeftAlignment:ti,middleCenterAlignment:ni,middleRightAlignment:oi,bottomLeftAlignment:ri,bottomCenterAlignment:ii,bottomRightAlignment:ai,clickOverlay:li,contain:si,cover:ci};function pi(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ui(e,t,n){return t&&pi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var io="(prefers-reduced-motion: reduce)",yt=1,di=2,xt=3,wt=4,Ht=5,Qt=6,on=7,gi={CREATED:yt,MOUNTED:di,IDLE:xt,MOVING:wt,SCROLLING:Ht,DRAGGING:Qt,DESTROYED:on};function Ke(e){e.length=0}function ot(e,t,n){return Array.prototype.slice.call(e,t,n)}function fe(e){return e.bind.apply(e,[null].concat(ot(arguments,1)))}var Eo=setTimeout,An=function(){};function ao(e){return requestAnimationFrame(e)}function cn(e,t){return typeof t===e}function Lt(e){return!zn(e)&&cn("object",e)}var Pn=Array.isArray,Lo=fe(cn,"function"),tt=fe(cn,"string"),Vt=fe(cn,"undefined");function zn(e){return e===null}function Fo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Nt(e){return Pn(e)?e:[e]}function Fe(e,t){Nt(e).forEach(t)}function Hn(e,t){return e.indexOf(t)>-1}function en(e,t){return e.push.apply(e,Nt(t)),e}function Ge(e,t,n){e&&Fe(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function He(e,t){Ge(e,tt(t)?t.split(" "):t,!0)}function Ot(e,t){Fe(t,e.appendChild.bind(e))}function Vn(e,t){Fe(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Ft(e,t){return Fo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ko(e,t){var n=e?ot(e.children):[];return t?n.filter(function(o){return Ft(o,t)}):n}function jt(e,t){return t?ko(e,t)[0]:e.firstElementChild}var kt=Object.keys;function st(e,t,n){return e&&(n?kt(e).reverse():kt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Rt(e){return ot(arguments,1).forEach(function(t){st(t,function(n,o){e[o]=t[o]})}),e}function Ze(e){return ot(arguments,1).forEach(function(t){st(t,function(n,o){Pn(n)?e[o]=n.slice():Lt(n)?e[o]=Ze({},Lt(e[o])?e[o]:{},n):e[o]=n})}),e}function lo(e,t){Fe(t||kt(e),function(n){delete e[n]})}function Ve(e,t){Fe(e,function(n){Fe(t,function(o){n&&n.removeAttribute(o)})})}function re(e,t,n){Lt(t)?st(t,function(o,r){re(e,r,o)}):Fe(e,function(o){zn(n)||n===""?Ve(o,t):o.setAttribute(t,String(n))})}function ht(e,t,n){var o=document.createElement(e);return t&&(tt(t)?He(o,t):re(o,t)),n&&Ot(n,o),o}function Me(e,t,n){if(Vt(n))return getComputedStyle(e)[t];zn(n)||(e.style[t]=""+n)}function Mt(e,t){Me(e,"display",t)}function Ro(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function We(e,t){return e.getAttribute(t)}function so(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function ct(e){Fe(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Mo(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function qe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wo(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?ot(e.querySelectorAll(t)):[]}function Ye(e,t){Ge(e,t,!1)}function In(e){return e.timeStamp}function lt(e){return tt(e)?e:e?e+"px":""}var Bt="splide",On="data-"+Bt;function It(e,t){if(!e)throw new Error("["+Bt+"] "+(t||""))}var nt=Math.min,rn=Math.max,an=Math.floor,Wt=Math.ceil,Ie=Math.abs;function Po(e,t,n){return Ie(e-t)<n}function tn(e,t,n,o){var r=nt(t,n),s=rn(t,n);return o?r<e&&e<s:r<=e&&e<=s}function mt(e,t,n){var o=nt(t,n),r=rn(t,n);return nt(rn(o,e),r)}function En(e){return+(e>0)-+(e<0)}function Ln(e,t){return Fe(t,function(n){e=e.replace("%s",""+n)}),e}function jn(e){return e<10?"0"+e:""+e}var co={};function mi(e){return""+e+jn(co[e]=(co[e]||0)+1)}function zo(){var e=[];function t(i,c,p,g){r(i,c,function(u,F,S){var y="addEventListener"in u,d=y?u.removeEventListener.bind(u,F,p,g):u.removeListener.bind(u,p);y?u.addEventListener(F,p,g):u.addListener(p),e.push([u,F,S,p,d])})}function n(i,c,p){r(i,c,function(g,u,F){e=e.filter(function(S){return S[0]===g&&S[1]===u&&S[2]===F&&(!p||S[3]===p)?(S[4](),!1):!0})})}function o(i,c,p){var g,u=!0;return typeof CustomEvent=="function"?g=new CustomEvent(c,{bubbles:u,detail:p}):(g=document.createEvent("CustomEvent"),g.initCustomEvent(c,u,!1,p)),i.dispatchEvent(g),g}function r(i,c,p){Fe(i,function(g){g&&Fe(c,function(u){u.split(" ").forEach(function(F){var S=F.split(".");p(g,S[0],S[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ke(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var rt="mounted",Fn="ready",Je="move",Tt="moved",Bn="click",Ho="active",Vo="inactive",No="visible",Oo="hidden",Ce="refresh",$e="updated",St="resize",pn="resized",jo="drag",Bo="dragging",Do="dragged",un="scroll",ut="scrolled",fi="overflow",Dn="destroy",Uo="arrows:mounted",qo="arrows:updated",Go="pagination:mounted",Yo="pagination:updated",Un="navigation:mounted",qn="autoplay:play",Xo="autoplay:playing",Gn="autoplay:pause",Yn="lazyload:loaded",Ko="sk",Jo="sh",ln="ei";function ve(e){var t=e?e.event.bus:document.createDocumentFragment(),n=zo();function o(s,i){n.bind(t,Nt(s).join(" "),function(c){i.apply(i,Pn(c.detail)?c.detail:[])})}function r(s){n.dispatch(t,s,ot(arguments,1))}return e&&e.event.on(Dn,n.destroy),Rt(n,{bus:t,on:o,off:fe(n.unbind,t),emit:r})}function dn(e,t,n,o){var r=Date.now,s,i=0,c,p=!0,g=0;function u(){if(!p){if(i=e?nt((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++g>=o))return S();c=ao(u)}}function F(v){v||d(),s=r()-(v?i*e:0),p=!1,c=ao(u)}function S(){p=!0}function y(){s=r(),i=0,n&&n(i)}function d(){c&&cancelAnimationFrame(c),i=0,c=0,p=!0}function m(v){e=v}function w(){return p}return{start:F,rewind:y,pause:S,cancel:d,set:m,isPaused:w}}function yi(e){var t=e;function n(r){t=r}function o(r){return Hn(Nt(r),t)}return{set:n,is:o}}function hi(e,t){var n=dn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function vi(e,t,n){var o=e.state,r=n.breakpoints||{},s=n.reducedMotion||{},i=zo(),c=[];function p(){var d=n.mediaQuery==="min";kt(r).sort(function(m,w){return d?+m-+w:+w-+m}).forEach(function(m){u(r[m],"("+(d?"min":"max")+"-width:"+m+"px)")}),u(s,io),F()}function g(d){d&&i.destroy()}function u(d,m){var w=matchMedia(m);i.bind(w,"change",F),c.push([d,w])}function F(){var d=o.is(on),m=n.direction,w=c.reduce(function(v,b){return Ze(v,b[1].matches?b[0]:{})},{});lo(n),y(w),n.destroy?e.destroy(n.destroy==="completely"):d?(g(!0),e.mount()):m!==n.direction&&e.refresh()}function S(d){matchMedia(io).matches&&(d?Ze(n,s):lo(n,kt(s)))}function y(d,m,w){Ze(n,d),m&&Ze(Object.getPrototypeOf(n),d),(w||!o.is(yt))&&e.emit($e,n)}return{setup:p,destroy:g,reduce:S,set:y}}var gn="Arrow",mn=gn+"Left",fn=gn+"Right",Zo=gn+"Up",Qo=gn+"Down",po="rtl",yn="ttb",Sn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Zo,fn],ArrowRight:[Qo,mn]};function bi(e,t,n){function o(s,i,c){c=c||n.direction;var p=c===po&&!i?1:c===yn?0:-1;return Sn[s]&&Sn[s][p]||s.replace(/width|left|right/i,function(g,u){var F=Sn[g.toLowerCase()][p]||g;return u>0?F.charAt(0).toUpperCase()+F.slice(1):F})}function r(s){return s*(n.direction===po?1:-1)}return{resolve:o,orient:r}}var Xe="role",vt="tabindex",xi="disabled",Pe="aria-",Dt=Pe+"controls",er=Pe+"current",uo=Pe+"selected",Le=Pe+"label",Xn=Pe+"labelledby",tr=Pe+"hidden",Kn=Pe+"orientation",Pt=Pe+"roledescription",go=Pe+"live",mo=Pe+"busy",fo=Pe+"atomic",Jn=[Xe,vt,xi,Dt,er,Le,Xn,tr,Kn,Pt],Ne=Bt+"__",it="is-",Cn=Bt,yo=Ne+"track",Si=Ne+"list",hn=Ne+"slide",nr=hn+"--clone",Ci=hn+"__container",Zn=Ne+"arrows",vn=Ne+"arrow",or=vn+"--prev",rr=vn+"--next",bn=Ne+"pagination",ir=bn+"__page",wi=Ne+"progress",Ti=wi+"__bar",_i=Ne+"toggle",$i=Ne+"spinner",Ai=Ne+"sr",Ii=it+"initialized",pt=it+"active",ar=it+"prev",lr=it+"next",kn=it+"visible",Rn=it+"loading",sr=it+"focus-in",cr=it+"overflow",Ei=[pt,kn,ar,lr,Rn,sr,cr],Li={slide:hn,clone:nr,arrows:Zn,arrow:vn,prev:or,next:rr,pagination:bn,page:ir,spinner:$i};function Fi(e,t){if(Lo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ft(n,t);)n=n.parentElement;return n}var ki=5,ho=200,pr="touchstart mousedown",wn="touchmove mousemove",Tn="touchend touchcancel mouseup click";function Ri(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=e.root,c=n.i18n,p={},g=[],u=[],F=[],S,y,d;function m(){L(),G(),b()}function w(){r(Ce,v),r(Ce,m),r($e,b),s(document,pr+" keydown",function(x){d=x.type==="keydown"},{capture:!0}),s(i,"focusin",function(){Ge(i,sr,!!d)})}function v(x){var R=Jn.concat("style");Ke(g),Ye(i,u),Ye(S,F),Ve([S,y],R),Ve(i,x?R:["style",Pt])}function b(){Ye(i,u),Ye(S,F),u=T(Cn),F=T(yo),He(i,u),He(S,F),re(i,Le,n.label),re(i,Xn,n.labelledby)}function L(){S=N("."+yo),y=jt(S,"."+Si),It(S&&y,"A track/list element is missing."),en(g,ko(y,"."+hn+":not(."+nr+")")),st({arrows:Zn,pagination:bn,prev:or,next:rr,bar:Ti,toggle:_i},function(x,R){p[R]=N("."+x)}),Rt(p,{root:i,track:S,list:y,slides:g})}function G(){var x=i.id||mi(Bt),R=n.role;i.id=x,S.id=S.id||x+"-track",y.id=y.id||x+"-list",!We(i,Xe)&&i.tagName!=="SECTION"&&R&&re(i,Xe,R),re(i,Pt,c.carousel),re(y,Xe,"presentation")}function N(x){var R=Wo(i,x);return R&&Fi(R,"."+Cn)===i?R:void 0}function T(x){return[x+"--"+n.type,x+"--"+n.direction,n.drag&&x+"--draggable",n.isNavigation&&x+"--nav",x===Cn&&pt]}return Rt(p,{setup:m,mount:w,destroy:v})}var Ct="slide",_t="loop",Ut="fade";function Mi(e,t,n,o){var r=ve(e),s=r.on,i=r.emit,c=r.bind,p=e.Components,g=e.root,u=e.options,F=u.isNavigation,S=u.updateOnMove,y=u.i18n,d=u.pagination,m=u.slideFocus,w=p.Direction.resolve,v=We(o,"style"),b=We(o,Le),L=n>-1,G=jt(o,"."+Ci),N;function T(){L||(o.id=g.id+"-slide"+jn(t+1),re(o,Xe,d?"tabpanel":"group"),re(o,Pt,y.slide),re(o,Le,b||Ln(y.slideLabel,[t+1,e.length]))),x()}function x(){c(o,"click",fe(i,Bn,E)),c(o,"keydown",fe(i,Ko,E)),s([Tt,Jo,ut],W),s(Un,C),S&&s(Je,O)}function R(){N=!0,r.destroy(),Ye(o,Ei),Ve(o,Jn),re(o,"style",v),re(o,Le,b||"")}function C(){var I=e.splides.map(function($){var k=$.splide.Components.Slides.getAt(t);return k?k.slide.id:""}).join(" ");re(o,Le,Ln(y.slideX,(L?n:t)+1)),re(o,Dt,I),re(o,Xe,m?"button":""),m&&Ve(o,Pt)}function O(){N||W()}function W(){if(!N){var I=e.index;V(),H(),Ge(o,ar,t===I-1),Ge(o,lr,t===I+1)}}function V(){var I=D();I!==so(o,pt)&&(Ge(o,pt,I),re(o,er,F&&I||""),i(I?Ho:Vo,E))}function H(){var I=f(),$=!I&&(!D()||L);if(e.state.is([wt,Ht])||re(o,tr,$||""),re(Nn(o,u.focusableNodes||""),vt,$?-1:""),m&&re(o,vt,$?-1:0),I!==so(o,kn)&&(Ge(o,kn,I),i(I?No:Oo,E)),!I&&document.activeElement===o){var k=p.Slides.getAt(e.index);k&&Ro(k.slide)}}function Y(I,$,k){Me(k&&G||o,I,$)}function D(){var I=e.index;return I===t||u.cloneStatus&&I===n}function f(){if(e.is(Ut))return D();var I=Ee(p.Elements.track),$=Ee(o),k=w("left",!0),J=w("right",!0);return an(I[k])<=Wt($[k])&&an($[J])<=Wt(I[J])}function M(I,$){var k=Ie(I-t);return!L&&(u.rewind||e.is(_t))&&(k=nt(k,e.length-k)),k<=$}var E={index:t,slideIndex:n,slide:o,container:G,isClone:L,mount:T,destroy:R,update:W,style:Y,isWithin:M};return E}function Wi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=o.bind,c=t.Elements,p=c.slides,g=c.list,u=[];function F(){S(),r(Ce,y),r(Ce,S)}function S(){p.forEach(function(W,V){m(W,V,-1)})}function y(){N(function(W){W.destroy()}),Ke(u)}function d(){N(function(W){W.update()})}function m(W,V,H){var Y=Mi(e,V,H,W);Y.mount(),u.push(Y),u.sort(function(D,f){return D.index-f.index})}function w(W){return W?T(function(V){return!V.isClone}):u}function v(W){var V=t.Controller,H=V.toIndex(W),Y=V.hasFocus()?1:n.perPage;return T(function(D){return tn(D.index,H,H+Y-1)})}function b(W){return T(W)[0]}function L(W,V){Fe(W,function(H){if(tt(H)&&(H=Mo(H)),Fo(H)){var Y=p[V];Y?Vn(H,Y):Ot(g,H),He(H,n.classes.slide),R(H,fe(s,St))}}),s(Ce)}function G(W){ct(T(W).map(function(V){return V.slide})),s(Ce)}function N(W,V){w(V).forEach(W)}function T(W){return u.filter(Lo(W)?W:function(V){return tt(W)?Ft(V.slide,W):Hn(Nt(W),V.index)})}function x(W,V,H){N(function(Y){Y.style(W,V,H)})}function R(W,V){var H=Nn(W,"img"),Y=H.length;Y?H.forEach(function(D){i(D,"load error",function(){--Y||V()})}):V()}function C(W){return W?p.length:u.length}function O(){return u.length>n.perPage}return{mount:F,destroy:y,update:d,register:m,get:w,getIn:v,getAt:b,add:L,remove:G,forEach:N,filter:T,style:x,getLength:C,isEnough:O}}function Pi(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.emit,c=t.Slides,p=t.Direction.resolve,g=t.Elements,u=g.root,F=g.track,S=g.list,y=c.getAt,d=c.style,m,w,v;function b(){L(),s(window,"resize load",hi(fe(i,St))),r([$e,Ce],L),r(St,G)}function L(){m=n.direction===yn,Me(u,"maxWidth",lt(n.width)),Me(F,p("paddingLeft"),N(!1)),Me(F,p("paddingRight"),N(!0)),G(!0)}function G(E){var I=Ee(u);(E||w.width!==I.width||w.height!==I.height)&&(Me(F,"height",T()),d(p("marginRight"),lt(n.gap)),d("width",R()),d("height",C(),!0),w=I,i(pn),v!==(v=M())&&(Ge(u,cr,v),i(fi,v)))}function N(E){var I=n.padding,$=p(E?"right":"left");return I&&lt(I[$]||(Lt(I)?0:I))||"0px"}function T(){var E="";return m&&(E=x(),It(E,"height or heightRatio is missing."),E="calc("+E+" - "+N(!1)+" - "+N(!0)+")"),E}function x(){return lt(n.height||Ee(S).width*n.heightRatio)}function R(){return n.autoWidth?null:lt(n.fixedWidth)||(m?"":O())}function C(){return lt(n.fixedHeight)||(m?n.autoHeight?null:O():x())}function O(){var E=lt(n.gap);return"calc((100%"+(E&&" + "+E)+")/"+(n.perPage||1)+(E&&" - "+E)+")"}function W(){return Ee(S)[p("width")]}function V(E,I){var $=y(E||0);return $?Ee($.slide)[p("width")]+(I?0:D()):0}function H(E,I){var $=y(E);if($){var k=Ee($.slide)[p("right")],J=Ee(S)[p("left")];return Ie(k-J)+(I?0:D())}return 0}function Y(E){return H(e.length-1)-H(0)+V(0,E)}function D(){var E=y(0);return E&&parseFloat(Me(E.slide,p("marginRight")))||0}function f(E){return parseFloat(Me(F,p("padding"+(E?"Right":"Left"))))||0}function M(){return e.is(Ut)||Y(!0)>W()}return{mount:b,resize:G,listSize:W,slideSize:V,sliderSize:Y,totalSize:H,getPadding:f,isOverflow:M}}var zi=2;function Hi(e,t,n){var o=ve(e),r=o.on,s=t.Elements,i=t.Slides,c=t.Direction.resolve,p=[],g;function u(){r(Ce,F),r([$e,St],y),(g=w())&&(d(g),t.Layout.resize(!0))}function F(){S(),u()}function S(){ct(p),Ke(p),o.destroy()}function y(){var v=w();g!==v&&(g<v||!v)&&o.emit(Ce)}function d(v){var b=i.get().slice(),L=b.length;if(L){for(;b.length<v;)en(b,b);en(b.slice(-v),b.slice(0,v)).forEach(function(G,N){var T=N<v,x=m(G.slide,N);T?Vn(x,b[0].slide):Ot(s.list,x),en(p,x),i.register(x,N-v+(T?0:L),G.index)})}}function m(v,b){var L=v.cloneNode(!0);return He(L,n.classes.clone),L.id=e.root.id+"-clone"+jn(b+1),L}function w(){var v=n.clones;if(!e.is(_t))v=0;else if(Vt(v)){var b=n[c("fixedWidth")]&&t.Layout.slideSize(0),L=b&&Wt(Ee(s.track)[c("width")]/b);v=L||n[c("autoWidth")]&&e.length||n.perPage*zi}return v}return{mount:u,destroy:S}}function Vi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=e.state.set,c=t.Layout,p=c.slideSize,g=c.getPadding,u=c.totalSize,F=c.listSize,S=c.sliderSize,y=t.Direction,d=y.resolve,m=y.orient,w=t.Elements,v=w.list,b=w.track,L;function G(){L=t.Transition,r([rt,pn,$e,Ce],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),x(e.index),t.Slides.update())}function T($,k,J,ae){$!==k&&E($>J)&&(W(),R(O(Y(),$>J),!0)),i(wt),s(Je,k,J,$),L.start(k,function(){i(xt),s(Tt,k,J,$),ae&&ae()})}function x($){R(H($,!0))}function R($,k){if(!e.is(Ut)){var J=k?$:C($);Me(v,"transform","translate"+d("X")+"("+J+"px)"),$!==J&&s(Jo)}}function C($){if(e.is(_t)){var k=V($),J=k>t.Controller.getEnd(),ae=k<0;(ae||J)&&($=O($,J))}return $}function O($,k){var J=$-M(k),ae=S();return $-=m(ae*(Wt(Ie(J)/ae)||1))*(k?1:-1),$}function W(){R(Y(),!0),L.cancel()}function V($){for(var k=t.Slides.get(),J=0,ae=1/0,ne=0;ne<k.length;ne++){var ie=k[ne].index,P=Ie(H(ie,!0)-$);if(P<=ae)ae=P,J=ie;else break}return J}function H($,k){var J=m(u($-1)-f($));return k?D(J):J}function Y(){var $=d("left");return Ee(v)[$]-Ee(b)[$]+m(g(!1))}function D($){return n.trimSpace&&e.is(Ct)&&($=mt($,0,m(S(!0)-F()))),$}function f($){var k=n.focus;return k==="center"?(F()-p($,!0))/2:+k*p($)||0}function M($){return H($?t.Controller.getEnd():0,!!n.trimSpace)}function E($){var k=m(O(Y(),$));return $?k>=0:k<=v[d("scrollWidth")]-Ee(b)[d("width")]}function I($,k){k=Vt(k)?Y():k;var J=$!==!0&&m(k)<m(M(!1)),ae=$!==!1&&m(k)>m(M(!0));return J||ae}return{mount:G,move:T,jump:x,translate:R,shift:O,cancel:W,toIndex:V,toPosition:H,getPosition:Y,getLimit:M,exceededLimit:I,reposition:N}}function Ni(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=t.Move,c=i.getPosition,p=i.getLimit,g=i.toPosition,u=t.Slides,F=u.isEnough,S=u.getLength,y=n.omitEnd,d=e.is(_t),m=e.is(Ct),w=fe(Y,!1),v=fe(Y,!0),b=n.start||0,L,G=b,N,T,x;function R(){C(),r([$e,Ce,ln],C),r(pn,O)}function C(){N=S(!0),T=n.perMove,x=n.perPage,L=E();var P=mt(b,0,y?L:N-1);P!==b&&(b=P,i.reposition())}function O(){L!==E()&&s(ln)}function W(P,ee,de){if(!ie()){var se=H(P),ge=M(se);ge>-1&&(ee||ge!==b)&&(J(ge),i.move(se,ge,G,de))}}function V(P,ee,de,se){t.Scroll.scroll(P,ee,de,function(){var ge=M(i.toIndex(c()));J(y?nt(ge,L):ge),se&&se()})}function H(P){var ee=b;if(tt(P)){var de=P.match(/([+\-<>])(\d+)?/)||[],se=de[1],ge=de[2];se==="+"||se==="-"?ee=D(b+ +(""+se+(+ge||1)),b):se===">"?ee=ge?I(+ge):w(!0):se==="<"&&(ee=v(!0))}else ee=d?P:mt(P,0,L);return ee}function Y(P,ee){var de=T||(ne()?1:x),se=D(b+de*(P?-1:1),b,!(T||ne()));return se===-1&&m&&!Po(c(),p(!P),1)?P?0:L:ee?se:M(se)}function D(P,ee,de){if(F()||ne()){var se=f(P);se!==P&&(ee=P,P=se,de=!1),P<0||P>L?!T&&(tn(0,P,ee,!0)||tn(L,ee,P,!0))?P=I($(P)):d?P=de?P<0?-(N%x||x):N:P:n.rewind?P=P<0?L:0:P=-1:de&&P!==ee&&(P=I($(ee)+(P<ee?-1:1)))}else P=-1;return P}function f(P){if(m&&n.trimSpace==="move"&&P!==b)for(var ee=c();ee===g(P,!0)&&tn(P,0,e.length-1,!n.rewind);)P<b?--P:++P;return P}function M(P){return d?(P+N)%N||0:P}function E(){for(var P=N-(ne()||d&&T?1:x);y&&P-- >0;)if(g(N-1,!0)!==g(P,!0)){P++;break}return mt(P,0,N-1)}function I(P){return mt(ne()?P:x*P,0,L)}function $(P){return ne()?nt(P,L):an((P>=L?N-1:P)/x)}function k(P){var ee=i.toIndex(P);return m?mt(ee,0,L):ee}function J(P){P!==b&&(G=b,b=P)}function ae(P){return P?G:b}function ne(){return!Vt(n.focus)||n.isNavigation}function ie(){return e.state.is([wt,Ht])&&!!n.waitForTransition}return{mount:R,go:W,scroll:V,getNext:w,getPrev:v,getAdjacent:Y,getEnd:E,setIndex:J,getIndex:ae,toIndex:I,toPage:$,toDest:k,hasFocus:ne,isBusy:ie}}var Oi="http://www.w3.org/2000/svg",ji="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Yt=40;function Bi(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.emit,c=n.classes,p=n.i18n,g=t.Elements,u=t.Controller,F=g.arrows,S=g.track,y=F,d=g.prev,m=g.next,w,v,b={};function L(){N(),r($e,G)}function G(){T(),L()}function N(){var V=n.arrows;V&&!(d&&m)&&C(),d&&m&&(Rt(b,{prev:d,next:m}),Mt(y,V?"":"none"),He(y,v=Zn+"--"+n.direction),V&&(x(),W(),re([d,m],Dt,S.id),i(Uo,d,m)))}function T(){o.destroy(),Ye(y,v),w?(ct(F?[d,m]:y),d=m=null):Ve([d,m],Jn)}function x(){r([rt,Tt,Ce,ut,ln],W),s(m,"click",fe(R,">")),s(d,"click",fe(R,"<"))}function R(V){u.go(V,!0)}function C(){y=F||ht("div",c.arrows),d=O(!0),m=O(!1),w=!0,Ot(y,[d,m]),!F&&Vn(y,S)}function O(V){var H='<button class="'+c.arrow+" "+(V?c.prev:c.next)+'" type="button"><svg xmlns="'+Oi+'" viewBox="0 0 '+Yt+" "+Yt+'" width="'+Yt+'" height="'+Yt+'" focusable="false"><path d="'+(n.arrowPath||ji)+'" />';return Mo(H)}function W(){if(d&&m){var V=e.index,H=u.getPrev(),Y=u.getNext(),D=H>-1&&V<H?p.last:p.prev,f=Y>-1&&V>Y?p.first:p.next;d.disabled=H<0,m.disabled=Y<0,re(d,Le,D),re(m,Le,f),i(qo,d,m,H,Y)}}return{arrows:b,mount:L,destroy:T,update:W}}var Di=On+"-interval";function Ui(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.emit,c=dn(n.interval,e.go.bind(e,">"),x),p=c.isPaused,g=t.Elements,u=t.Elements,F=u.root,S=u.toggle,y=n.autoplay,d,m,w=y==="pause";function v(){y&&(b(),S&&re(S,Dt,g.track.id),w||L(),T())}function b(){n.pauseOnHover&&s(F,"mouseenter mouseleave",function(C){d=C.type==="mouseenter",N()}),n.pauseOnFocus&&s(F,"focusin focusout",function(C){m=C.type==="focusin",N()}),S&&s(S,"click",function(){w?L():G(!0)}),r([Je,un,Ce],c.rewind),r(Je,R)}function L(){p()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),m=d=w=!1,T(),i(qn))}function G(C){C===void 0&&(C=!0),w=!!C,T(),p()||(c.pause(),i(Gn))}function N(){w||(d||m?G(!1):L())}function T(){S&&(Ge(S,pt,!w),re(S,Le,n.i18n[w?"play":"pause"]))}function x(C){var O=g.bar;O&&Me(O,"width",C*100+"%"),i(Xo,C)}function R(C){var O=t.Slides.getAt(C);c.set(O&&+We(O.slide,Di)||n.interval)}return{mount:v,destroy:c.cancel,play:L,pause:G,isPaused:p}}function qi(e,t,n){var o=ve(e),r=o.on;function s(){n.cover&&(r(Yn,fe(c,!0)),r([rt,$e,Ce],fe(i,!0)))}function i(p){t.Slides.forEach(function(g){var u=jt(g.container||g.slide,"img");u&&u.src&&c(p,u,g)})}function c(p,g,u){u.style("background",p?'center/cover no-repeat url("'+g.src+'")':"",!0),Mt(g,p?"none":"")}return{mount:s,destroy:fe(i,!1)}}var Gi=10,Yi=600,Xi=.6,Ki=1.5,Ji=800;function Zi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=e.state.set,c=t.Move,p=c.getPosition,g=c.getLimit,u=c.exceededLimit,F=c.translate,S=e.is(Ct),y,d,m=1;function w(){r(Je,G),r([$e,Ce],N)}function v(x,R,C,O,W){var V=p();if(G(),C&&(!S||!u())){var H=t.Layout.sliderSize(),Y=En(x)*H*an(Ie(x)/H)||0;x=c.toPosition(t.Controller.toDest(x%H))+Y}var D=Po(V,x,1);m=1,R=D?0:R||rn(Ie(x-V)/Ki,Ji),d=O,y=dn(R,b,fe(L,V,x,W),1),i(Ht),s(un),y.start()}function b(){i(xt),d&&d(),s(ut)}function L(x,R,C,O){var W=p(),V=x+(R-x)*T(O),H=(V-W)*m;F(W+H),S&&!C&&u()&&(m*=Xi,Ie(H)<Gi&&v(g(u(!0)),Yi,!1,d,!0))}function G(){y&&y.cancel()}function N(){y&&!y.isPaused()&&(G(),b())}function T(x){var R=n.easingFunc;return R?R(x):1-Math.pow(1-x,4)}return{mount:w,destroy:G,scroll:v,cancel:N}}var ft={passive:!1,capture:!0};function Qi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=o.bind,c=o.unbind,p=e.state,g=t.Move,u=t.Scroll,F=t.Controller,S=t.Elements.track,y=t.Media.reduce,d=t.Direction,m=d.resolve,w=d.orient,v=g.getPosition,b=g.exceededLimit,L,G,N,T,x,R=!1,C,O,W;function V(){i(S,wn,An,ft),i(S,Tn,An,ft),i(S,pr,Y,ft),i(S,"click",M,{capture:!0}),i(S,"dragstart",qe),r([rt,$e],H)}function H(){var U=n.drag;_e(!U),T=U==="free"}function Y(U){if(C=!1,!O){var a=ge(U);se(U.target)&&(a||!U.button)&&(F.isBusy()?qe(U,!0):(W=a?S:window,x=p.is([wt,Ht]),N=null,i(W,wn,D,ft),i(W,Tn,f,ft),g.cancel(),u.cancel(),E(U)))}}function D(U){if(p.is(Qt)||(p.set(Qt),s(jo)),U.cancelable)if(x){g.translate(L+de(ne(U)));var a=ie(U)>ho,h=R!==(R=b());(a||h)&&E(U),C=!0,s(Bo),qe(U)}else k(U)&&(x=$(U),qe(U))}function f(U){p.is(Qt)&&(p.set(xt),s(Do)),x&&(I(U),qe(U)),c(W,wn,D),c(W,Tn,f),x=!1}function M(U){!O&&C&&qe(U,!0)}function E(U){N=G,G=U,L=v()}function I(U){var a=J(U),h=ae(a),z=n.rewind&&n.rewindByDrag;y(!1),T?F.scroll(h,0,n.snap):e.is(Ut)?F.go(w(En(a))<0?z?"<":"-":z?">":"+"):e.is(Ct)&&R&&z?F.go(b(!0)?">":"<"):F.go(F.toDest(h),!0),y(!0)}function $(U){var a=n.dragMinThreshold,h=Lt(a),z=h&&a.mouse||0,j=(h?a.touch:+a)||10;return Ie(ne(U))>(ge(U)?j:z)}function k(U){return Ie(ne(U))>Ie(ne(U,!0))}function J(U){if(e.is(_t)||!R){var a=ie(U);if(a&&a<ho)return ne(U)/a}return 0}function ae(U){return v()+En(U)*nt(Ie(U)*(n.flickPower||600),T?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(U,a){return ee(U,a)-ee(P(U),a)}function ie(U){return In(U)-In(P(U))}function P(U){return G===U&&N||G}function ee(U,a){return(ge(U)?U.changedTouches[0]:U)["page"+m(a?"Y":"X")]}function de(U){return U/(R&&e.is(Ct)?ki:1)}function se(U){var a=n.noDrag;return!Ft(U,"."+ir+", ."+vn)&&(!a||!Ft(U,a))}function ge(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function ye(){return x}function _e(U){O=U}return{mount:V,disable:_e,isDragging:ye}}var ea={Spacebar:" ",Right:fn,Left:mn,Up:Zo,Down:Qo};function Qn(e){return e=tt(e)?e:e.key,ea[e]||e}var vo="keydown";function ta(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.unbind,c=e.root,p=t.Direction.resolve,g,u;function F(){S(),r($e,y),r($e,S),r(Je,m)}function S(){var v=n.keyboard;v&&(g=v==="global"?window:c,s(g,vo,w))}function y(){i(g,vo)}function d(v){u=v}function m(){var v=u;u=!0,Eo(function(){u=v})}function w(v){if(!u){var b=Qn(v);b===p(mn)?e.go("<"):b===p(fn)&&e.go(">")}}return{mount:F,destroy:y,disable:d}}var Et=On+"-lazy",nn=Et+"-srcset",na="["+Et+"], ["+nn+"]";function oa(e,t,n){var o=ve(e),r=o.on,s=o.off,i=o.bind,c=o.emit,p=n.lazyLoad==="sequential",g=[Tt,ut],u=[];function F(){n.lazyLoad&&(S(),r(Ce,S))}function S(){Ke(u),y(),p?v():(s(g),r(g,d),d())}function y(){t.Slides.forEach(function(b){Nn(b.slide,na).forEach(function(L){var G=We(L,Et),N=We(L,nn);if(G!==L.src||N!==L.srcset){var T=n.classes.spinner,x=L.parentElement,R=jt(x,"."+T)||ht("span",T,x);u.push([L,b,R]),L.src||Mt(L,"none")}})})}function d(){u=u.filter(function(b){var L=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(e.index,L)?m(b):!0}),u.length||s(g)}function m(b){var L=b[0];He(b[1].slide,Rn),i(L,"load error",fe(w,b)),re(L,"src",We(L,Et)),re(L,"srcset",We(L,nn)),Ve(L,Et),Ve(L,nn)}function w(b,L){var G=b[0],N=b[1];Ye(N.slide,Rn),L.type!=="error"&&(ct(b[2]),Mt(G,""),c(Yn,G,N),c(St)),p&&v()}function v(){u.length&&m(u.shift())}return{mount:F,destroy:fe(Ke,u),check:d}}function ra(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=o.bind,c=t.Slides,p=t.Elements,g=t.Controller,u=g.hasFocus,F=g.getIndex,S=g.go,y=t.Direction.resolve,d=p.pagination,m=[],w,v;function b(){L(),r([$e,Ce,ln],b);var O=n.pagination;d&&Mt(d,O?"":"none"),O&&(r([Je,un,ut],C),G(),C(),s(Go,{list:w,items:m},R(e.index)))}function L(){w&&(ct(d?ot(w.children):w),Ye(w,v),Ke(m),w=null),o.destroy()}function G(){var O=e.length,W=n.classes,V=n.i18n,H=n.perPage,Y=u()?g.getEnd()+1:Wt(O/H);w=d||ht("ul",W.pagination,p.track.parentElement),He(w,v=bn+"--"+x()),re(w,Xe,"tablist"),re(w,Le,V.select),re(w,Kn,x()===yn?"vertical":"");for(var D=0;D<Y;D++){var f=ht("li",null,w),M=ht("button",{class:W.page,type:"button"},f),E=c.getIn(D).map(function($){return $.slide.id}),I=!u()&&H>1?V.pageX:V.slideX;i(M,"click",fe(N,D)),n.paginationKeyboard&&i(M,"keydown",fe(T,D)),re(f,Xe,"presentation"),re(M,Xe,"tab"),re(M,Dt,E.join(" ")),re(M,Le,Ln(I,D+1)),re(M,vt,-1),m.push({li:f,button:M,page:D})}}function N(O){S(">"+O,!0)}function T(O,W){var V=m.length,H=Qn(W),Y=x(),D=-1;H===y(fn,!1,Y)?D=++O%V:H===y(mn,!1,Y)?D=(--O+V)%V:H==="Home"?D=0:H==="End"&&(D=V-1);var f=m[D];f&&(Ro(f.button),S(">"+D),qe(W,!0))}function x(){return n.paginationDirection||n.direction}function R(O){return m[g.toPage(O)]}function C(){var O=R(F(!0)),W=R(F());if(O){var V=O.button;Ye(V,pt),Ve(V,uo),re(V,vt,-1)}if(W){var H=W.button;He(H,pt),re(H,uo,!0),re(H,vt,"")}s(Yo,{list:w,items:m},O,W)}return{items:m,mount:b,destroy:L,getAt:R,update:C}}var ia=[" ","Enter"];function aa(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(d){d.isParent||(g(e,d.splide),g(d.splide,e))}),o&&u()}function c(){s.forEach(function(d){d.destroy()}),Ke(s)}function p(){c(),i()}function g(d,m){var w=ve(d);w.on(Je,function(v,b,L){m.go(m.is(_t)?L:v)}),s.push(w)}function u(){var d=ve(e),m=d.on;m(Bn,S),m(Ko,y),m([rt,$e],F),s.push(d),d.emit(Un,e.splides)}function F(){re(t.Elements.list,Kn,n.direction===yn?"vertical":"")}function S(d){e.go(d.index)}function y(d,m){Hn(ia,Qn(m))&&(S(d),qe(m))}return{setup:fe(t.Media.set,{slideFocus:Vt(r)?o:r},!0),mount:i,destroy:c,remount:p}}function la(e,t,n){var o=ve(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",c,ft)}function c(g){if(g.cancelable){var u=g.deltaY,F=u<0,S=In(g),y=n.wheelMinThreshold||0,d=n.wheelSleep||0;Ie(u)>y&&S-s>d&&(e.go(F?"<":">"),s=S),p(F)&&qe(g)}}function p(g){return!n.releaseWheel||e.state.is(wt)||t.Controller.getAdjacent(g)!==-1}return{mount:i}}var sa=90;function ca(e,t,n){var o=ve(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,c=ht("span",Ai),p=dn(sa,fe(u,!1));function g(){i&&(S(!t.Autoplay.isPaused()),re(s,fo,!0),c.textContent="…",r(qn,fe(S,!0)),r(Gn,fe(S,!1)),r([Tt,ut],fe(u,!0)))}function u(y){re(s,mo,y),y?(Ot(s,c),p.start()):(ct(c),p.cancel())}function F(){Ve(s,[go,fo,mo]),ct(c)}function S(y){i&&re(s,go,y?"off":"polite")}return{mount:g,disable:S,destroy:F}}var pa=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Ri,Slides:Wi,Layout:Pi,Clones:Hi,Move:Vi,Controller:Ni,Arrows:Bi,Autoplay:Ui,Cover:qi,Scroll:Zi,Drag:Qi,Keyboard:ta,LazyLoad:oa,Pagination:ra,Sync:aa,Wheel:la,Live:ca}),ua={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},da={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Li,i18n:ua,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(e,t,n){var o=t.Slides;function r(){ve(e).on([rt,Ce],s)}function s(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,p){o.style("transition","opacity "+n.speed+"ms "+n.easing),Eo(p)}return{mount:r,start:i,cancel:An}}function ma(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,c=fe(Me,i,"transition"),p;function g(){ve(e).bind(i,"transitionend",function(y){y.target===i&&p&&(F(),p())})}function u(y,d){var m=o.toPosition(y,!0),w=o.getPosition(),v=S(y);Ie(m-w)>=1&&v>=1?n.useScroll?s.scroll(m,v,!1,d):(c("transform "+v+"ms "+n.easing),o.translate(m,!0),p=d):(o.jump(y),d())}function F(){c(""),s.cancel()}function S(y){var d=n.rewindSpeed;if(e.is(Ct)&&d){var m=r.getIndex(!0),w=r.getEnd();if(m===0&&y>=w||m>=w&&y===0)return d}return n.speed}return{mount:g,start:u,cancel:F}}var fa=(function(){function e(n,o){this.event=ve(),this.Components={},this.state=yi(yt),this.splides=[],this._o={},this._E={};var r=tt(n)?Wo(document,n):n;It(r,r+" is invalid."),this.root=r,o=Ze({label:We(r,Le)||"",labelledby:We(r,Xn)||""},da,e.defaults,o||{});try{Ze(o,JSON.parse(We(r,On)))}catch{It(!1,"Invalid JSON")}this._o=Object.create(Ze({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,c=this.Components;It(i.is([yt,on]),"Already mounted!"),i.set(yt),this._C=c,this._T=r||this._T||(this.is(Ut)?ga:ma),this._E=o||this._E;var p=Rt({},pa,this._E,{Transition:this._T});return st(p,function(g,u){var F=g(s,c,s._o);c[u]=F,F.setup&&F.setup()}),st(c,function(g){g.mount&&g.mount()}),this.emit(rt),He(this.root,Ii),i.set(xt),this.emit(Fn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(xt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(ot(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(Ce),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(yt)?ve(this).on(Fn,this.destroy.bind(this,o)):(st(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Dn),r.destroy(),o&&Ke(this.splides),s.set(on)),this},ui(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),eo=fa;eo.defaults={};eo.STATES=gi;var bo=[[rt,"onMounted"],[Fn,"onReady"],[Je,"onMove"],[Tt,"onMoved"],[Bn,"onClick"],[Ho,"onActive"],[Vo,"onInactive"],[No,"onVisible"],[Oo,"onHidden"],[Ce,"onRefresh"],[$e,"onUpdated"],[St,"onResize"],[pn,"onResized"],[jo,"onDrag"],[Bo,"onDragging"],[Do,"onDragged"],[un,"onScroll"],[ut,"onScrolled"],[Dn,"onDestroy"],[Uo,"onArrowsMounted"],[qo,"onArrowsUpdated"],[Go,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[Un,"onNavigationMounted"],[qn,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[Gn,"onAutoplayPause"],[Yn,"onLazyLoadLoaded"]];function to(...e){return e.filter(Boolean).join(" ")}function sn(e){return e!==null&&typeof e=="object"}function Mn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Mn(n,t[o]));if(sn(e)&&sn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Mn(e[r],t[r]))}return e===t}function ya(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ha(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function Wn(e,t){const n=e;return ha(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():sn(o)?n[r]=Wn(sn(n[r])?n[r]:{},o):n[r]=o}),n}var va=({children:e,className:t,...n})=>A.createElement("div",{className:to("splide__track",t),...n},A.createElement("ul",{className:"splide__list"},e)),ur=class extends A.Component{constructor(){super(...arguments),this.splideRef=A.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new eo(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Wn({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Mn(this.options,e)&&(this.splide.options=e,this.options=Wn({},e));const t=this.getSlides();ya(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){bo.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:o,...r}=this.props;return A.createElement(t,{className:to("splide",e),ref:this.splideRef,...this.omit(r,["options",...bo.map(s=>s[1])])},n?A.createElement(va,null,o):o)}},dr=({children:e,className:t,...n})=>A.createElement("li",{className:to("splide__slide",t),...n},e);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const ba="RichTextRenderer-module__link___BWeZ2",xa={link:ba},Pt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?l.jsx("a",{className:xa.link,href:o.value,target:o.target,children:t(o.children)},r):l.jsx("span",{style:Sa(o),children:o.text},r));return l.jsx(l.Fragment,{children:e.map((n,o)=>{const r=n.children;return l.jsx("div",{children:t(r)},o)})})};function Sa(e){return{...e.fontFamily&&{fontFamily:e.fontFamily},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Ca="SvgImage-module__svg___q3xE-",wa="SvgImage-module__img___VsTm-",xo={svg:Ca,img:wa},Ta=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},_a=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ze=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=A.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return A.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!Ta(e)||!s?l.jsx("img",{src:e,alt:"",className:ue(xo.img,o),style:r}):l.jsx("span",{"data-supports-mask":s,className:ue(xo.svg,o),style:{"--svg":_a(e),"--fill":t,"--hover-fill":n,...r??{}}})},$a={"top-left":Z.topLeftAlignment,"top-center":Z.topCenterAlignment,"top-right":Z.topRightAlignment,"middle-left":Z.middleLeftAlignment,"middle-center":Z.middleCenterAlignment,"middle-right":Z.middleRightAlignment,"bottom-left":Z.bottomLeftAlignment,"bottom-center":Z.bottomCenterAlignment,"bottom-right":Z.bottomRightAlignment};function Aa({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=A.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:p,textAlign:g,wordSpacing:u,fontSizeLineHeight:F,textAppearance:S,color:y}=n.imageCaption,[d,m]=A.useState(void 0),[w,v]=A.useState(null),[b,L]=A.useState(0),[G,N]=A.useState(0),{direction:T,transition:x,controls:R,pagination:C,imageCaption:O,triggers:W}=e,V=A.useRef(x.type),{x:H,y:Y}=e.controls.offset,D=f=>{r&&r.go(f)};return A.useEffect(()=>{if(!w)return;const f=new ResizeObserver(M=>{if(!r)return;const[E]=M;m({width:Math.round(E.contentRect.width),height:Math.round(E.contentRect.height)})});return f.observe(w),()=>f.unobserve(w)},[w]),A.useEffect(()=>{!r||V.current===x.type||(N(f=>f+1),V.current=x.type)},[x.type]),l.jsx("div",{className:ue(Z.wrapper,{[Z.editor]:o}),ref:v,children:l.jsxs("div",{className:Z.sliderInner,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:x.backgroundColor&&x.type==="fade in"?x.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:ue(Z.captionBlock),children:l.jsx("div",{className:Z.captionTextWrapper,children:t.map((f,M)=>l.jsx("div",{className:ue(Z.captionText,$a[O.alignment],{[Z.withPointerEvents]:M===b&&o,[Z.active]:M===b}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":_.scalingValue(i.width,o),letterSpacing:_.scalingValue(p,o),wordSpacing:_.scalingValue(u,o),textAlign:g,fontSize:_.scalingValue(F.fontSize,o),lineHeight:_.scalingValue(F.lineHeight,o),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:y,transitionDuration:x.duration?`${Math.round(parseInt(x.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-hover-color":O.linkHoverColor,"--link-color":O.linkColor,position:"relative",top:_.scalingValue(O.offset.y,o),left:_.scalingValue(O.offset.x,o)},children:l.jsx(Pt,{content:f.imageCaption})})},M))})}),l.jsx(ur,{onMove:f=>{L(f.index)},ref:s,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:T==="horiz"||x.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:x.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,M)=>l.jsx(dr,{children:l.jsx("div",{className:Z.sliderItem,children:l.jsx("div",{className:Z.imgWrapper,children:l.jsx("img",{className:ue(Z.sliderImage,{[Z.contain]:f.image.objectFit==="contain",[Z.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},M))},G),R.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ue(Z.arrow,{[Z.arrowVertical]:T==="vert",[Z.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{onClick:()=>{D("-1")},className:Z.arrowInner,style:{transform:`translate(${_.scalingValue(H,o)}, ${_.scalingValue(Y*(T==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&l.jsx(Ze,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:ue(Z.arrowImg,Z.mirror)}),!R.arrowsImgUrl&&l.jsx(So,{color:R.color,className:ue(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),l.jsx("div",{className:ue(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:T==="vert",[Z.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{className:Z.arrowInner,onClick:()=>D("+1"),style:{transform:`translate(${_.scalingValue(H*(T==="horiz"?-1:1),o)}, ${_.scalingValue(Y,o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&l.jsx(Ze,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Z.arrowImg}),!R.arrowsImgUrl&&l.jsx(So,{color:R.color,className:ue(Z.arrowIcon,Z.arrowImg)})]})})]}),W.triggersList.click&&l.jsx("div",{className:Z.clickOverlay,onClick:()=>{r&&r.go("+1")}}),C.isActive&&l.jsx("div",{className:ue(Z.pagination,{[Z.paginationInsideBottom]:C.position==="inside-1"&&T==="horiz",[Z.paginationInsideTop]:C.position==="inside-2"&&T==="horiz",[Z.paginationOutsideBottom]:C.position==="outside-1"&&T==="horiz",[Z.paginationOutsideTop]:C.position==="outside-2"&&T==="horiz",[Z.paginationInsideLeft]:C.position==="inside-1"&&T==="vert",[Z.paginationInsideRight]:C.position==="inside-2"&&T==="vert",[Z.paginationOutsideLeft]:C.position==="outside-1"&&T==="vert",[Z.paginationOutsideRight]:C.position==="outside-2"&&T==="vert",[Z.paginationVertical]:T==="vert"}),children:l.jsx("div",{className:Z.paginationInner,style:{backgroundColor:C.colors[2],transform:`scale(${C.scale/100}) translate(${_.scalingValue(C.offset.x,o)}, ${_.scalingValue(C.offset.y,o)}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:t.map((f,M)=>l.jsx("button",{onClick:()=>{r&&r.go(M)},className:ue(Z.paginationItem),children:l.jsx("div",{className:ue(Z.dot,{[Z.activeDot]:M===b}),style:{backgroundColor:M===b?C.colors[0]:C.colors[1],"--pagination-hover-color":C.hover}})},M))})})]})})}function So({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ia={element:Aa,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Ea="ImageRevealSlider-module__imageRevealSlider___UE5Ob",La="ImageRevealSlider-module__image___Qjt-e",Fa="ImageRevealSlider-module__link___N-iLG",ka="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:Ea,image:La,link:Fa,cursor:ka};function Co(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const s=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*s,c=s/2,p=i/2;if(e>=o.x-c&&e<=o.x+c&&t>=o.y-p&&t<=o.y+p)return!0}return!1}function _n(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ra(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await _n(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await _n(e);s=i.height/i.width*r}else{const i=await _n(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Ma({settings:e,content:t,isEditor:n}){const[o,r]=A.useState(null),[s,i]=A.useState([]),[c,p]=A.useState(0),g=A.useRef(0),[u,F]=A.useState({x:0,y:0}),[S,y]=A.useState(1),[d,m]=A.useState("none"),w=A.useRef({x:0,y:0}),[v,b]=A.useState(!1),{sizeType:L,imageWidth:G,randomRangeImageWidth:N}=e.imageSize,{revealPosition:T,visible:x}=e.position,{cursorType:R,target:C,defaultCursorScale:O,defaultCursor:W,hoverCursorScale:V,hoverCursor:H}=e.cursor;A.useEffect(()=>{if(!o)return;const f=(I,$)=>{const k=o.getBoundingClientRect(),J=I-k.left,ae=$-k.top;if(F({x:J,y:ae}),R==="system"){m("none"),y(1);return}const te=J,ie=ae,P=document.elementFromPoint(k.left+te,k.top+ie);if(P&&P.closest("a")){m("none"),y(1);return}const Q=Co(te,ie,s)||C==="area"?{img:H??"none",scale:V}:{img:W??"none",scale:O};m(Q.img),y(Q.scale)},M=I=>{I.stopPropagation(),w.current={x:I.clientX,y:I.clientY},f(I.clientX,I.clientY)},E=()=>{v&&f(w.current.x,w.current.y)};return o.addEventListener("mousemove",M),window.addEventListener("scroll",E,!0),()=>{o.removeEventListener("mousemove",M),window.removeEventListener("scroll",E,!0)}},[o,v,u,R,C,H,W,V,O,s]),A.useEffect(()=>{v||(m("none"),y(0))},[v]);const Y=async(f,M,E,I={})=>{const{width:$,height:k,finalWidth:J}=await Ra(f.image.url,L,G,N);let ae=0,te=0;T==="same"?(ae=M/2,te=E/2):(ae=I.x??Math.random()*M,te=I.y??Math.random()*E);const ie=Math.min(Math.max(ae,$/2),M-$/2),P=Math.min(Math.max(te,k/2),E-k/2);return{id:g.current++,url:f.image.url,link:f.link,name:f.image.name,x:ie,y:P,width:J}};A.useEffect(()=>{if(!o||t.length===0)return;const f=o.getBoundingClientRect(),M=f.width,E=f.height,I=[];(async()=>{const k=t[0],J=await Y(k,M,E);I.push(J),i(I),p(1)})()},[L,G,N,T,o]),A.useEffect(()=>{x==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[x]);const D=async f=>{if(!o)return;const M=o.getBoundingClientRect(),E=f.clientX-M.left,I=f.clientY-M.top;if(C==="image"&&!Co(E,I,s))return;let $=0,k=0;T==="on Click"?($=E,k=I):T==="same"?($=M.width/2,k=M.height/2):($=Math.random()*M.width,k=Math.random()*M.height);const J=t[c],ae=await Y(J,M.width,M.height,{x:$,y:k});i(te=>x==="all"?[...te,ae]:[ae]),p(te=>te>=t.length-1?0:te+1)};return l.jsxs("div",{ref:r,onClick:D,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:ut.imageRevealSlider,style:{cursor:d==="none"?"default":"none"},children:[s.map(f=>l.jsx("div",{className:ut.wrapper,style:{top:`${f.y}px`,left:`${f.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:f.width??"auto",height:"auto",cursor:d==="none"?"default":"none"},children:C==="area"&&f.link?l.jsx("a",{href:f.link,target:"_blank",className:ut.link,children:l.jsx("img",{src:f.url,alt:f.name,className:ut.image},f.id)}):l.jsx("img",{src:f.url,alt:f.name,className:ut.image},f.id)},f.id)),v&&l.jsx("div",{className:ut.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${d}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Wa={element:Ma,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Pa="LightBox-module__hidden___9s-9x",za="LightBox-module__heroImage___sTxNF",Ha="LightBox-module__background___rm9ml",Va="LightBox-module__editor___4ACaY",Na="LightBox-module__contentStyle___Bgnsq",Oa="LightBox-module__imageStyle___tLIlB",ja="LightBox-module__imgWrapper___LuFUp",Ba="LightBox-module__contain___8-yaS",Da="LightBox-module__cover___hNvOG",Ua="LightBox-module__caption___b6L2I",qa="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ya="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",Ka="LightBox-module__nextArrow___zkAQN",Ja="LightBox-module__arrowInner___p48sW",Za="LightBox-module__arrowIcon___3VaFf",Qa="LightBox-module__arrowImg___pNV88",el="LightBox-module__mirror___pjeXc",tl="LightBox-module__thumbsWrapper___GB-nU",nl="LightBox-module__thumbsContainerVertical___wttk5",ol="LightBox-module__thumbsContainer___osSma",rl="LightBox-module__thumbsAlignStart___MO6tY",il="LightBox-module__thumbsAlignCenter___Q4sUx",al="LightBox-module__thumbsAlignEnd___p4y9R",ll="LightBox-module__thumbItem___HvnF3",sl="LightBox-module__closeButton___g2khP",cl="LightBox-module__fadeIn___0m5GW",pl="LightBox-module__slideInLeft___gPYwC",ul="LightBox-module__slideInRight___S-pPp",dl="LightBox-module__slideInTop___DFdAj",gl="LightBox-module__slideInBottom___m27kZ",ml="LightBox-module__fadeOut___55qBR",fl="LightBox-module__slideOutLeft___NvU7P",yl="LightBox-module__slideOutRight___SK7eC",hl="LightBox-module__slideOutTop___Vgg0z",vl="LightBox-module__slideOutBottom___nJ0Ef",bl="LightBox-module__scaleSlide___vZriG",q={hidden:Pa,heroImage:za,background:Ha,editor:Va,contentStyle:Na,imageStyle:Oa,imgWrapper:ja,contain:Ba,cover:Da,caption:Ua,captionTextInner:qa,lightboxSplide:Ga,arrow:Ya,arrowVertical:Xa,nextArrow:Ka,arrowInner:Ja,arrowIcon:Za,arrowImg:Qa,mirror:el,thumbsWrapper:tl,thumbsContainerVertical:nl,thumbsContainer:ol,thumbsAlignStart:rl,thumbsAlignCenter:il,thumbsAlignEnd:al,thumbItem:ll,closeButton:sl,fadeIn:cl,slideInLeft:pl,slideInRight:ul,slideInTop:dl,slideInBottom:gl,fadeOut:ml,slideOutLeft:fl,slideOutRight:yl,slideOutTop:hl,slideOutBottom:vl,scaleSlide:bl},Yt=(e,t,n)=>{const o={},[r,s]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), calc(-50% + ${_.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${_.scalingValue(t.x,n)}, calc(-50% + ${_.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), ${_.scalingValue(t.y,n)})`:o.transform=`translate(${_.scalingValue(t.x,n)}, ${_.scalingValue(t.y,n)})`,o};function gr(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function wo(e){const t=e.getBoundingClientRect(),n=gr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,c=o/r,p=s/i;let g,u;p>c?(g=o,u=o/p):(u=r,g=r*p);const F=t.left+n.left,S=t.top+n.top,y=(o-g)/2+F,d=(r-u)/2+S;return{x:y,y:d,width:g,height:u}}function To(e){const t=e.getBoundingClientRect(),n=gr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function _o(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function xl(e,t){const n=(()=>{if(e==="fade in")return q.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return q.slideInLeft;case"right":return q.slideInRight;case"top":return q.slideInTop;case"bottom":return q.slideInBottom;default:return q.slideInRight}return q.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return q.fadeIn;if(e==="slide in")switch(t){case"left":return q.slideInLeft;case"right":return q.slideInRight;case"top":return q.slideInTop;case"bottom":return q.slideInBottom;default:return q.slideInRight}return q.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return q.fadeOut;if(e==="slide in")switch(t){case"left":return q.slideOutLeft;case"right":return q.slideOutRight;case"top":return q.slideOutTop;case"bottom":return q.slideOutBottom;default:return q.slideOutRight}return q.fadeOut})(),s=(()=>{if(e==="fade in")return q.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return q.slideOutLeft;case"right":return q.slideOutRight;case"top":return q.slideOutTop;case"bottom":return q.slideOutBottom;default:return q.slideOutRight}return q.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const Sl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,c]=A.useState(!1),{url:p}=e.thumbnailBlock.cover;return A.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:p,alt:"Cover",className:q.heroImage,onClick:()=>c(!0)}),l.jsx(Cl,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},Cl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:c})=>{var U;const[p,g]=A.useState(0),[u,F]=A.useState(0),[S,y]=A.useState(!1),[d,m]=A.useState(!1),[w,v]=A.useState({}),b=A.useRef(null),L=A.useRef(null),G=A.useRef(null),N=A.useRef(!1),T=A.useRef(null),x=A.useRef(null),R=A.useRef(null),C=A.useRef(null),O=A.useRef(!1),W=A.useRef(null),[V,H]=A.useState(!1),{appear:Y,triggers:D,slider:f,thumbnail:M,controls:E,area:I,caption:$,layout:k}=r.lightboxBlock,{appearClass:J,backdropAppearClass:ae,backdropDisappearClass:te,disappearClass:ie}=xl(Y.type,Y.direction),P=(c==null?void 0:c.itemId)??null;A.useEffect(()=>{const a=()=>{setTimeout(()=>{var z,j;(j=(z=b.current)==null?void 0:z.splide)==null||j.refresh()},16)},h=()=>{F(z=>z+1)};return window.addEventListener("ArticleEditor.Layout:change",a),window.addEventListener("ArticleEditor.ComponentContent:change",h),()=>{window.removeEventListener("ArticleEditor.Layout:change",a),window.removeEventListener("ArticleEditor.ComponentContent:change",h)}},[]),A.useEffect(()=>{if(!e||!M.isActive){H(!1);return}const a=W.current;if(!a)return;const h=()=>{f.direction==="horiz"?H(a.scrollWidth>a.clientWidth):H(a.scrollHeight>a.clientHeight)};h();const z=new ResizeObserver(h);return z.observe(a),()=>z.disconnect()},[e,M.isActive,n.length,w,f.direction]);const Q=A.useCallback(()=>{const a=window.matchMedia("(max-width: 768px)").matches,h=_o(I.color);a&&!i&&h>.9&&(document.body.style.backgroundColor=""),y(!0),N.current=!0;const z=j=>{j.target===T.current&&j.animationName&&(T.current&&x.current&&T.current.removeEventListener("animationend",x.current),x.current=null,N.current&&(N.current=!1,t()),y(!1))};T.current&&(x.current=z,T.current.addEventListener("animationend",z))},[t,I.color,i]),de=(a,h,z)=>{var j,B;if(a){if(D.type==="click"&&D.switch==="image")D.repeat==="close"&&p===n.length-1?Q():(j=b.current)==null||j.go("+1");else if(D.type==="click"&&D.switch==="50/50"){const X=a.getBoundingClientRect(),K=h-X.left,ee=z-X.top,ne=X.width,le=X.height;let se;f.direction==="horiz"?se=K<ne/2?"-1":"+1":se=ee<le/2?"-1":"+1",(B=b.current)==null||B.go(se)}}},ce=a=>{if(O.current){O.current=!1;return}const h=n[p],z=(h==null?void 0:h.image.objectFit)==="cover";let j,B;if("changedTouches"in a&&a.changedTouches.length>0)j=a.changedTouches[0].clientX,B=a.changedTouches[0].clientY;else if("clientX"in a)j=a.clientX,B=a.clientY;else return;let X;if(z&&G.current){const K=To(G.current);X=j>=K.left&&j<=K.right&&B>=K.top&&B<=K.bottom}else{const K=G.current?wo(G.current):null;if(!K){a.target===a.currentTarget&&Q();return}X=j>=K.x&&j<=K.x+K.width&&B>=K.y&&B<=K.y+K.height}X?de(G.current,j,B):Q()},ge=a=>{const h=a.target;(h.classList.contains(q.thumbsWrapper)||h.classList.contains(q.thumbsContainer))&&ce(a)};A.useEffect(()=>{if(!e)return;const a=h=>{var z,j;if(h.key==="Escape"){Q();return}if(h.key==="ArrowRight"){g(B=>(B+1)%Math.max(n.length,1)),(z=b.current)==null||z.go("+1");return}h.key==="ArrowLeft"&&(g(B=>(B-1+Math.max(n.length,1))%Math.max(n.length,1)),(j=b.current)==null||j.go("-1"))};return window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[e,Q,n.length]),A.useEffect(()=>{if(e){if(g(0),F(h=>h+1),N.current=!1,y(!1),m(!1),v({}),!P)return;const a=new CustomEvent("page-overlay",{detail:{itemId:P}});window.dispatchEvent(a)}return()=>{T.current&&x.current&&(T.current.removeEventListener("animationend",x.current),x.current=null),m(!1)}},[e,P]),A.useEffect(()=>{L.current!==null&&L.current!==f.type&&F(a=>a+1),L.current=f.type},[f.type]),A.useEffect(()=>{if(!e)return;const a=document.body.style.overflow,h=window.matchMedia("(max-width: 768px)").matches,z=_o(I.color);document.body.style.overflow="hidden",m(!1);const j=X=>{X.target===T.current&&!N.current&&X.animationName&&(h&&!i&&z>.9&&(document.body.style.backgroundColor=I.color),m(!0),T.current&&R.current&&T.current.removeEventListener("animationend",R.current),R.current=null)};T.current&&(R.current=j,T.current.addEventListener("animationend",j));const B=X=>{const K=X.target;K&&(K.closest(`.${q.thumbsWrapper}`)||K.closest(`.${q.thumbsContainer}`))||f.type!=="slide"&&X.preventDefault()};return document.addEventListener("touchmove",B,{passive:!1}),()=>{document.body.style.overflow=a,document.removeEventListener("touchmove",B),T.current&&R.current&&(T.current.removeEventListener("animationend",R.current),R.current=null),m(!1)}},[e,i,I.color,f.type]),A.useEffect(()=>{if(!e)return;const a=h=>{var j,B;if(N.current){h.stopPropagation();return}if(O.current){O.current=!1;return}const z=h.target;if(!(z&&(z.closest(`.${q.thumbsContainer}`)||z.closest(`.${q.thumbItem}`)))){if(f.type==="slide"&&D.type==="drag"&&((B=(j=b.current)==null?void 0:j.splide)!=null&&B.root)){const X=b.current.splide.root;if(z&&(X.contains(z)||X===z))return}if(h.touches.length===0&&h.changedTouches.length>0){const X=n[p],K=(X==null?void 0:X.image.objectFit)==="cover",ee=h.changedTouches[0];let ne;if(K&&G.current){const le=To(G.current);ne=ee.clientX>=le.left&&ee.clientX<=le.right&&ee.clientY>=le.top&&ee.clientY<=le.bottom}else{const le=G.current?wo(G.current):null;if(!le)return;ne=ee.clientX>=le.x&&ee.clientX<=le.x+le.width&&ee.clientY>=le.y&&ee.clientY<=le.y+le.height}if(!ne){h.stopPropagation(),N.current=!0;const le=se=>{se.stopPropagation(),se.preventDefault(),document.removeEventListener("click",le,!0)};document.addEventListener("click",le,!0),Q()}}}};return document.addEventListener("touchend",a,{passive:!0}),()=>{document.removeEventListener("touchend",a)}},[e,Q,p,n]);const he=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&D.type==="drag";A.useEffect(()=>{var se,Se;if(!e||!he||!((Se=(se=b.current)==null?void 0:se.splide)!=null&&Se.root))return;const a=b.current.splide.root,h=30,z=(oe,pe)=>{if(C.current){const fe=Math.abs(oe-C.current.x),Ie=Math.abs(pe-C.current.y);(fe>0||Ie>0)&&(O.current=!0)}},j=oe=>{C.current&&(oe.preventDefault(),z(oe.clientX,oe.clientY))},B=oe=>{C.current&&oe.touches.length>0&&(oe.preventDefault(),z(oe.touches[0].clientX,oe.touches[0].clientY))},X=(oe,pe)=>{if(!C.current||!b.current){C.current=null;return}const fe=Math.abs(oe-C.current.x),Ie=Math.abs(pe-C.current.y);Ie>h&&Ie>fe&&b.current.go(pe<C.current.y?"+1":"-1"),C.current=null},K=oe=>{C.current&&X(oe.clientX,oe.clientY),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("pointermove",j)},ee=oe=>{if(C.current){if(oe.changedTouches.length>0){const pe=oe.changedTouches[0];X(pe.clientX,pe.clientY)}document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),document.removeEventListener("touchmove",B)}},ne=oe=>{C.current={x:oe.clientX,y:oe.clientY},O.current=!1,document.addEventListener("pointermove",j,{passive:!1}),document.addEventListener("pointerup",K),document.addEventListener("pointercancel",K)},le=oe=>{oe.touches.length>0&&(C.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},O.current=!1,document.addEventListener("touchmove",B,{passive:!1}),document.addEventListener("touchend",ee),document.addEventListener("touchcancel",ee))};return a.addEventListener("pointerdown",ne),a.addEventListener("touchstart",le),()=>{a.removeEventListener("pointerdown",ne),a.removeEventListener("touchstart",le),document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("touchmove",B),document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),C.current=null,O.current=!1}},[e,he,u]);const _e={backgroundColor:I.color,backdropFilter:`blur(${I.blur}px)`,animationDuration:`${parseInt(Y.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:br.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:i?null:T,className:ue(q.background,S?te:ae,{[q.editor]:i},{[q.hidden]:!e}),style:{..._e,...d&&!i&&!S?{position:"absolute"}:{}}}),l.jsxs("div",{ref:i?T:null,className:ue(q.contentStyle,S?ie:J,{[q.editor]:i},{[q.hidden]:!e}),style:{animationDuration:`${parseInt(Y.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(ur,{onMove:a=>g(a.index),ref:b,className:q.lightboxSplide,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,direction:f.direction==="horiz"||f.type==="fade"||f.type==="scale"?"ltr":"ttb",pagination:!1,drag:D.type==="drag"&&!he,perPage:1,width:"100%",height:"100%",type:f.type==="fade"||f.type==="scale"?"fade":"loop",padding:0,rewind:D.repeat!=="close",start:0},style:{"--splide-speed":f.duration},children:n.map((a,h)=>{const z=Yt(k.position,k.offset,i),j=`${_.scalingValue(k.padding.top,i)} ${_.scalingValue(k.padding.right,i)} ${_.scalingValue(k.padding.bottom,i)} ${_.scalingValue(k.padding.left,i)}`,B=f.type==="scale"?(()=>{const{transform:X,...K}=z;return{...K,position:"absolute",padding:j,boxSizing:"border-box","--position-transform":X||"none"}})():{...z,position:"absolute",padding:j,boxSizing:"border-box"};return l.jsx(dr,{children:l.jsx("div",{className:q.imgWrapper,onClick:ce,children:l.jsx("img",{ref:h===p?G:null,className:ue(q.imageStyle,{[q.contain]:a.image.objectFit==="contain",[q.cover]:a.image.objectFit==="cover",[q.scaleSlide]:f.type==="scale"}),src:a.image.url,alt:a.image.name??"",style:{...B,pointerEvents:a.image.objectFit==="contain"?"none":"auto"}})})},h)})},u),E.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ue(q.arrow,{[q.arrowVertical]:f.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:l.jsxs("button",{className:q.arrowInner,style:{transform:`translate(${_.scalingValue(E.offset.x,i)}, ${_.scalingValue(E.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${E.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var a;return(a=b.current)==null?void 0:a.go("-1")},"aria-label":"Previous",children:[E.arrowsImgUrl&&l.jsx(Ze,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:ue(q.arrowImg,q.mirror)}),!E.arrowsImgUrl&&l.jsx($o,{color:E.color,className:ue(q.arrowIcon,q.arrowImg,q.mirror)})]})}),l.jsx("div",{className:ue(q.arrow,q.nextArrow,{[q.arrowVertical]:f.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:l.jsxs("button",{className:q.arrowInner,style:{transform:`translate(${_.scalingValue(E.offset.x*(f.direction==="horiz"?-1:1),i)}, ${_.scalingValue(E.offset.y,i)}) scale(${E.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var a;return(a=b.current)==null?void 0:a.go("+1")},"aria-label":"Next",children:[E.arrowsImgUrl&&l.jsx(Ze,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:q.arrowImg}),!E.arrowsImgUrl&&l.jsx($o,{color:E.color,className:ue(q.arrowIcon,q.arrowImg)})]})})]}),I.closeIconUrl&&(()=>{const a=Yt(I.closeIconAlign,I.closeIconOffset,i),h=`scale(${I.closeIconScale})`,z=a.transform?`${a.transform} ${h}`:h;return l.jsx("button",{className:q.closeButton,style:{...a,transform:z},onClick:Q,"aria-label":"Close lightbox",children:l.jsx(Ze,{url:I.closeIconUrl,fill:I.closeIconColor??"#000000",hoverFill:I.closeIconHover??"#cccccc"})})})(),$&&$.isActive&&o.imageCaption&&((U=n[p])==null?void 0:U.imageCaption)&&(()=>{const{widthSettings:a,fontSettings:h,letterSpacing:z,textAlign:j,wordSpacing:B,fontSizeLineHeight:X,textAppearance:K,color:ee}=o.imageCaption;return l.jsx("div",{className:q.caption,style:{...Yt($.alignment,$.offset,i),fontFamily:h.fontFamily,fontWeight:h.fontWeight,fontStyle:h.fontStyle,width:a.sizing==="auto"?"max-content":_.scalingValue(a.width,i),letterSpacing:_.scalingValue(z,i),wordSpacing:_.scalingValue(B,i),textAlign:j,fontSize:_.scalingValue(X.fontSize,i),lineHeight:_.scalingValue(X.lineHeight,i),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:ee},onClick:ne=>ne.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:q.captionTextInner,style:{"--link-color":$.linkColor,"--link-hover-color":$.linkHoverColor},children:l.jsx(Pt,{content:n[p].imageCaption})})})})(),M.isActive&&(()=>{const[a,h]=M.position.split("-"),z=f.direction==="horiz"?`${a}-left`:M.position,j=Yt(z,M.offset,i),B=()=>{if(f.direction==="horiz"){if(h==="left")return"flex-start";if(h==="center")return"center";if(h==="right")return"flex-end"}else{if(a==="top")return"flex-start";if(a==="middle")return"center";if(a==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:W,className:q.thumbsWrapper,onClick:X=>ge(X),style:{position:i?"absolute":"fixed",...j,...f.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:ue(q.thumbsContainer,{[q.thumbsContainerVertical]:f.direction==="vert",[q.thumbsAlignStart]:M.align==="start",[q.thumbsAlignCenter]:M.align==="center",[q.thumbsAlignEnd]:M.align==="end"}),style:{gap:_.scalingValue(M.grid.gap,i),justifyContent:V?"flex-start":B()},children:n.map((X,K)=>{const ee=K===p,ne=w[K],se=M.grid.size*(ee?M.activeState.scale:1),Se=()=>{if(M.fit!=="fit")return{};if(!ne)return f.direction==="horiz"?{height:_.scalingValue(se,i)}:{width:_.scalingValue(se,i)};const oe=ne.width/ne.height;if(f.direction==="horiz"){const pe=se,fe=pe*oe;return{width:_.scalingValue(fe,i),height:_.scalingValue(pe,i)}}else{const pe=se,fe=pe/oe;return{width:_.scalingValue(pe,i),height:_.scalingValue(fe,i)}}};return l.jsx("button",{className:q.thumbItem,style:{...f.direction==="horiz"&&M.fit!=="fit"?{height:_.scalingValue(se,i)}:{},...f.direction==="vert"&&M.fit!=="fit"?{width:_.scalingValue(se,i)}:{},...M.fit==="cover"?{width:_.scalingValue(se,i),height:_.scalingValue(se,i)}:{},...Se(),transition:ee?"all 0.25s ease-out":"none",opacity:ee?M.activeState.opacity/100:M.opacity/100,"--thumb-hover":M.activeState.opacity/100},onClick:oe=>{var pe;oe.stopPropagation(),g(K),(pe=b.current)==null||pe.go(K)},onMouseEnter:()=>{var oe;M.triggers==="hov"&&((oe=b.current)==null||oe.go(K))},children:l.jsx("img",{src:X.image.url,alt:X.image.name??"",onLoad:oe=>{const pe=oe.currentTarget;pe.naturalWidth&&pe.naturalHeight&&v(fe=>({...fe,[K]:{width:pe.naturalWidth,height:pe.naturalHeight}}))},style:{objectFit:M.fit==="cover"?"cover":"contain",...M.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...M.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${X.image.name}-${K}`)})})})})()]})]}),document.getElementById(s))};function $o({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const wl={element:Sl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function ht(e){const{color:t,...n}=e;return n}function Je(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:_.scalingValue(e.letterSpacing,t),wordSpacing:_.scalingValue(e.wordSpacing,t),fontSize:_.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?_.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}function Xt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Tl(e){return`
6
+ */const ba="RichTextRenderer-module__link___BWeZ2",xa={link:ba},zt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?l.jsx("a",{className:xa.link,href:o.value,target:o.target,children:t(o.children)},r):l.jsx("span",{style:Sa(o),children:o.text},r));return l.jsx(l.Fragment,{children:e.map((n,o)=>{const r=n.children;return l.jsx("div",{children:t(r)},o)})})};function Sa(e){return{...e.fontFamily&&{fontFamily:e.fontFamily},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Ca="SvgImage-module__svg___q3xE-",wa="SvgImage-module__img___VsTm-",xo={svg:Ca,img:wa},Ta=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},_a=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,et=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=A.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return A.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!Ta(e)||!s?l.jsx("img",{src:e,alt:"",className:ue(xo.img,o),style:r}):l.jsx("span",{"data-supports-mask":s,className:ue(xo.svg,o),style:{"--svg":_a(e),"--fill":t,"--hover-fill":n,...r??{}}})},$a={"top-left":Z.topLeftAlignment,"top-center":Z.topCenterAlignment,"top-right":Z.topRightAlignment,"middle-left":Z.middleLeftAlignment,"middle-center":Z.middleCenterAlignment,"middle-right":Z.middleRightAlignment,"bottom-left":Z.bottomLeftAlignment,"bottom-center":Z.bottomCenterAlignment,"bottom-right":Z.bottomRightAlignment};function Aa({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=A.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:p,textAlign:g,wordSpacing:u,fontSizeLineHeight:F,textAppearance:S,color:y}=n.imageCaption,[d,m]=A.useState(void 0),[w,v]=A.useState(null),[b,L]=A.useState(0),[G,N]=A.useState(0),{direction:T,transition:x,controls:R,pagination:C,imageCaption:O,triggers:W}=e,V=A.useRef(x.type),{x:H,y:Y}=e.controls.offset,D=f=>{r&&r.go(f)};return A.useEffect(()=>{if(!w)return;const f=new ResizeObserver(M=>{if(!r)return;const[E]=M;m({width:Math.round(E.contentRect.width),height:Math.round(E.contentRect.height)})});return f.observe(w),()=>f.unobserve(w)},[w]),A.useEffect(()=>{!r||V.current===x.type||(N(f=>f+1),V.current=x.type)},[x.type]),l.jsx("div",{className:ue(Z.wrapper,{[Z.editor]:o}),ref:v,children:l.jsxs("div",{className:Z.sliderInner,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:x.backgroundColor&&x.type==="fade in"?x.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:ue(Z.captionBlock),children:l.jsx("div",{className:Z.captionTextWrapper,children:t.map((f,M)=>l.jsx("div",{className:ue(Z.captionText,$a[O.alignment],{[Z.withPointerEvents]:M===b&&o,[Z.active]:M===b}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":_.scalingValue(i.width,o),letterSpacing:_.scalingValue(p,o),wordSpacing:_.scalingValue(u,o),textAlign:g,fontSize:_.scalingValue(F.fontSize,o),lineHeight:_.scalingValue(F.lineHeight,o),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:y,transitionDuration:x.duration?`${Math.round(parseInt(x.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-hover-color":O.linkHoverColor,"--link-color":O.linkColor,position:"relative",top:_.scalingValue(O.offset.y,o),left:_.scalingValue(O.offset.x,o)},children:l.jsx(zt,{content:f.imageCaption})})},M))})}),l.jsx(ur,{onMove:f=>{L(f.index)},ref:s,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:T==="horiz"||x.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:x.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,M)=>l.jsx(dr,{children:l.jsx("div",{className:Z.sliderItem,children:l.jsx("div",{className:Z.imgWrapper,children:l.jsx("img",{className:ue(Z.sliderImage,{[Z.contain]:f.image.objectFit==="contain",[Z.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},M))},G),R.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ue(Z.arrow,{[Z.arrowVertical]:T==="vert",[Z.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{onClick:()=>{D("-1")},className:Z.arrowInner,style:{transform:`translate(${_.scalingValue(H,o)}, ${_.scalingValue(Y*(T==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&l.jsx(et,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:ue(Z.arrowImg,Z.mirror)}),!R.arrowsImgUrl&&l.jsx(So,{color:R.color,className:ue(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),l.jsx("div",{className:ue(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:T==="vert",[Z.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{className:Z.arrowInner,onClick:()=>D("+1"),style:{transform:`translate(${_.scalingValue(H*(T==="horiz"?-1:1),o)}, ${_.scalingValue(Y,o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&l.jsx(et,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Z.arrowImg}),!R.arrowsImgUrl&&l.jsx(So,{color:R.color,className:ue(Z.arrowIcon,Z.arrowImg)})]})})]}),W.triggersList.click&&l.jsx("div",{className:Z.clickOverlay,onClick:()=>{r&&r.go("+1")}}),C.isActive&&l.jsx("div",{className:ue(Z.pagination,{[Z.paginationInsideBottom]:C.position==="inside-1"&&T==="horiz",[Z.paginationInsideTop]:C.position==="inside-2"&&T==="horiz",[Z.paginationOutsideBottom]:C.position==="outside-1"&&T==="horiz",[Z.paginationOutsideTop]:C.position==="outside-2"&&T==="horiz",[Z.paginationInsideLeft]:C.position==="inside-1"&&T==="vert",[Z.paginationInsideRight]:C.position==="inside-2"&&T==="vert",[Z.paginationOutsideLeft]:C.position==="outside-1"&&T==="vert",[Z.paginationOutsideRight]:C.position==="outside-2"&&T==="vert",[Z.paginationVertical]:T==="vert"}),children:l.jsx("div",{className:Z.paginationInner,style:{backgroundColor:C.colors[2],transform:`scale(${C.scale/100}) translate(${_.scalingValue(C.offset.x,o)}, ${_.scalingValue(C.offset.y,o)}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:t.map((f,M)=>l.jsx("button",{onClick:()=>{r&&r.go(M)},className:ue(Z.paginationItem),children:l.jsx("div",{className:ue(Z.dot,{[Z.activeDot]:M===b}),style:{backgroundColor:M===b?C.colors[0]:C.colors[1],"--pagination-hover-color":C.hover}})},M))})})]})})}function So({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ia={element:Aa,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Ea="ImageRevealSlider-module__imageRevealSlider___UE5Ob",La="ImageRevealSlider-module__image___Qjt-e",Fa="ImageRevealSlider-module__link___N-iLG",ka="ImageRevealSlider-module__cursor___2U03d",gt={imageRevealSlider:Ea,image:La,link:Fa,cursor:ka};function Co(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const s=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*s,c=s/2,p=i/2;if(e>=o.x-c&&e<=o.x+c&&t>=o.y-p&&t<=o.y+p)return!0}return!1}function _n(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ra(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await _n(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await _n(e);s=i.height/i.width*r}else{const i=await _n(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Ma({settings:e,content:t,isEditor:n}){const[o,r]=A.useState(null),[s,i]=A.useState([]),[c,p]=A.useState(0),g=A.useRef(0),[u,F]=A.useState({x:0,y:0}),[S,y]=A.useState(1),[d,m]=A.useState("none"),w=A.useRef({x:0,y:0}),[v,b]=A.useState(!1),{sizeType:L,imageWidth:G,randomRangeImageWidth:N}=e.imageSize,{revealPosition:T,visible:x}=e.position,{cursorType:R,target:C,defaultCursorScale:O,defaultCursor:W,hoverCursorScale:V,hoverCursor:H}=e.cursor;A.useEffect(()=>{if(!o)return;const f=(I,$)=>{const k=o.getBoundingClientRect(),J=I-k.left,ae=$-k.top;if(F({x:J,y:ae}),R==="system"){m("none"),y(1);return}const ne=J,ie=ae,P=document.elementFromPoint(k.left+ne,k.top+ie);if(P&&P.closest("a")){m("none"),y(1);return}const ee=Co(ne,ie,s)||C==="area"?{img:H??"none",scale:V}:{img:W??"none",scale:O};m(ee.img),y(ee.scale)},M=I=>{I.stopPropagation(),w.current={x:I.clientX,y:I.clientY},f(I.clientX,I.clientY)},E=()=>{v&&f(w.current.x,w.current.y)};return o.addEventListener("mousemove",M),window.addEventListener("scroll",E,!0),()=>{o.removeEventListener("mousemove",M),window.removeEventListener("scroll",E,!0)}},[o,v,u,R,C,H,W,V,O,s]),A.useEffect(()=>{v||(m("none"),y(0))},[v]);const Y=async(f,M,E,I={})=>{const{width:$,height:k,finalWidth:J}=await Ra(f.image.url,L,G,N);let ae=0,ne=0;T==="same"?(ae=M/2,ne=E/2):(ae=I.x??Math.random()*M,ne=I.y??Math.random()*E);const ie=Math.min(Math.max(ae,$/2),M-$/2),P=Math.min(Math.max(ne,k/2),E-k/2);return{id:g.current++,url:f.image.url,link:f.link,name:f.image.name,x:ie,y:P,width:J}};A.useEffect(()=>{if(!o||t.length===0)return;const f=o.getBoundingClientRect(),M=f.width,E=f.height,I=[];(async()=>{const k=t[0],J=await Y(k,M,E);I.push(J),i(I),p(1)})()},[L,G,N,T,o]),A.useEffect(()=>{x==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[x]);const D=async f=>{if(!o)return;const M=o.getBoundingClientRect(),E=f.clientX-M.left,I=f.clientY-M.top;if(C==="image"&&!Co(E,I,s))return;let $=0,k=0;T==="on Click"?($=E,k=I):T==="same"?($=M.width/2,k=M.height/2):($=Math.random()*M.width,k=Math.random()*M.height);const J=t[c],ae=await Y(J,M.width,M.height,{x:$,y:k});i(ne=>x==="all"?[...ne,ae]:[ae]),p(ne=>ne>=t.length-1?0:ne+1)};return l.jsxs("div",{ref:r,onClick:D,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:gt.imageRevealSlider,style:{cursor:d==="none"?"default":"none"},children:[s.map(f=>l.jsx("div",{className:gt.wrapper,style:{top:`${f.y}px`,left:`${f.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:f.width??"auto",height:"auto",cursor:d==="none"?"default":"none"},children:C==="area"&&f.link?l.jsx("a",{href:f.link,target:"_blank",className:gt.link,children:l.jsx("img",{src:f.url,alt:f.name,className:gt.image},f.id)}):l.jsx("img",{src:f.url,alt:f.name,className:gt.image},f.id)},f.id)),v&&l.jsx("div",{className:gt.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${d}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Wa={element:Ma,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Pa="LightBox-module__hidden___9s-9x",za="LightBox-module__heroImage___sTxNF",Ha="LightBox-module__background___rm9ml",Va="LightBox-module__editor___4ACaY",Na="LightBox-module__contentStyle___Bgnsq",Oa="LightBox-module__imageStyle___tLIlB",ja="LightBox-module__imgWrapper___LuFUp",Ba="LightBox-module__contain___8-yaS",Da="LightBox-module__cover___hNvOG",Ua="LightBox-module__caption___b6L2I",qa="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ya="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",Ka="LightBox-module__nextArrow___zkAQN",Ja="LightBox-module__arrowInner___p48sW",Za="LightBox-module__arrowIcon___3VaFf",Qa="LightBox-module__arrowImg___pNV88",el="LightBox-module__mirror___pjeXc",tl="LightBox-module__thumbsWrapper___GB-nU",nl="LightBox-module__thumbsContainerVertical___wttk5",ol="LightBox-module__thumbsContainer___osSma",rl="LightBox-module__thumbsAlignStart___MO6tY",il="LightBox-module__thumbsAlignCenter___Q4sUx",al="LightBox-module__thumbsAlignEnd___p4y9R",ll="LightBox-module__thumbItem___HvnF3",sl="LightBox-module__closeButton___g2khP",cl="LightBox-module__fadeIn___0m5GW",pl="LightBox-module__slideInLeft___gPYwC",ul="LightBox-module__slideInRight___S-pPp",dl="LightBox-module__slideInTop___DFdAj",gl="LightBox-module__slideInBottom___m27kZ",ml="LightBox-module__fadeOut___55qBR",fl="LightBox-module__slideOutLeft___NvU7P",yl="LightBox-module__slideOutRight___SK7eC",hl="LightBox-module__slideOutTop___Vgg0z",vl="LightBox-module__slideOutBottom___nJ0Ef",bl="LightBox-module__scaleSlide___vZriG",q={hidden:Pa,heroImage:za,background:Ha,editor:Va,contentStyle:Na,imageStyle:Oa,imgWrapper:ja,contain:Ba,cover:Da,caption:Ua,captionTextInner:qa,lightboxSplide:Ga,arrow:Ya,arrowVertical:Xa,nextArrow:Ka,arrowInner:Ja,arrowIcon:Za,arrowImg:Qa,mirror:el,thumbsWrapper:tl,thumbsContainerVertical:nl,thumbsContainer:ol,thumbsAlignStart:rl,thumbsAlignCenter:il,thumbsAlignEnd:al,thumbItem:ll,closeButton:sl,fadeIn:cl,slideInLeft:pl,slideInRight:ul,slideInTop:dl,slideInBottom:gl,fadeOut:ml,slideOutLeft:fl,slideOutRight:yl,slideOutTop:hl,slideOutBottom:vl,scaleSlide:bl},Xt=(e,t,n)=>{const o={},[r,s]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), calc(-50% + ${_.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${_.scalingValue(t.x,n)}, calc(-50% + ${_.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), ${_.scalingValue(t.y,n)})`:o.transform=`translate(${_.scalingValue(t.x,n)}, ${_.scalingValue(t.y,n)})`,o};function gr(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function wo(e){const t=e.getBoundingClientRect(),n=gr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,c=o/r,p=s/i;let g,u;p>c?(g=o,u=o/p):(u=r,g=r*p);const F=t.left+n.left,S=t.top+n.top,y=(o-g)/2+F,d=(r-u)/2+S;return{x:y,y:d,width:g,height:u}}function To(e){const t=e.getBoundingClientRect(),n=gr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function _o(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function xl(e,t){const n=(()=>{if(e==="fade in")return q.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return q.slideInLeft;case"right":return q.slideInRight;case"top":return q.slideInTop;case"bottom":return q.slideInBottom;default:return q.slideInRight}return q.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return q.fadeIn;if(e==="slide in")switch(t){case"left":return q.slideInLeft;case"right":return q.slideInRight;case"top":return q.slideInTop;case"bottom":return q.slideInBottom;default:return q.slideInRight}return q.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return q.fadeOut;if(e==="slide in")switch(t){case"left":return q.slideOutLeft;case"right":return q.slideOutRight;case"top":return q.slideOutTop;case"bottom":return q.slideOutBottom;default:return q.slideOutRight}return q.fadeOut})(),s=(()=>{if(e==="fade in")return q.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return q.slideOutLeft;case"right":return q.slideOutRight;case"top":return q.slideOutTop;case"bottom":return q.slideOutBottom;default:return q.slideOutRight}return q.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const Sl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,c]=A.useState(!1),{url:p}=e.thumbnailBlock.cover;return A.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:p,alt:"Cover",className:q.heroImage,onClick:()=>c(!0)}),l.jsx(Cl,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},Cl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:c})=>{var U;const[p,g]=A.useState(0),[u,F]=A.useState(0),[S,y]=A.useState(!1),[d,m]=A.useState(!1),[w,v]=A.useState({}),b=A.useRef(null),L=A.useRef(null),G=A.useRef(null),N=A.useRef(!1),T=A.useRef(null),x=A.useRef(null),R=A.useRef(null),C=A.useRef(null),O=A.useRef(!1),W=A.useRef(null),[V,H]=A.useState(!1),{appear:Y,triggers:D,slider:f,thumbnail:M,controls:E,area:I,caption:$,layout:k}=r.lightboxBlock,{appearClass:J,backdropAppearClass:ae,backdropDisappearClass:ne,disappearClass:ie}=xl(Y.type,Y.direction),P=(c==null?void 0:c.itemId)??null;A.useEffect(()=>{const a=()=>{setTimeout(()=>{var z,j;(j=(z=b.current)==null?void 0:z.splide)==null||j.refresh()},16)},h=()=>{F(z=>z+1)};return window.addEventListener("ArticleEditor.Layout:change",a),window.addEventListener("ArticleEditor.ComponentContent:change",h),()=>{window.removeEventListener("ArticleEditor.Layout:change",a),window.removeEventListener("ArticleEditor.ComponentContent:change",h)}},[]),A.useEffect(()=>{if(!e||!M.isActive){H(!1);return}const a=W.current;if(!a)return;const h=()=>{f.direction==="horiz"?H(a.scrollWidth>a.clientWidth):H(a.scrollHeight>a.clientHeight)};h();const z=new ResizeObserver(h);return z.observe(a),()=>z.disconnect()},[e,M.isActive,n.length,w,f.direction]);const ee=A.useCallback(()=>{const a=window.matchMedia("(max-width: 768px)").matches,h=_o(I.color);a&&!i&&h>.9&&(document.body.style.backgroundColor=""),y(!0),N.current=!0;const z=j=>{j.target===T.current&&j.animationName&&(T.current&&x.current&&T.current.removeEventListener("animationend",x.current),x.current=null,N.current&&(N.current=!1,t()),y(!1))};T.current&&(x.current=z,T.current.addEventListener("animationend",z))},[t,I.color,i]),de=(a,h,z)=>{var j,B;if(a){if(D.type==="click"&&D.switch==="image")D.repeat==="close"&&p===n.length-1?ee():(j=b.current)==null||j.go("+1");else if(D.type==="click"&&D.switch==="50/50"){const X=a.getBoundingClientRect(),K=h-X.left,te=z-X.top,oe=X.width,le=X.height;let ce;f.direction==="horiz"?ce=K<oe/2?"-1":"+1":ce=te<le/2?"-1":"+1",(B=b.current)==null||B.go(ce)}}},se=a=>{if(O.current){O.current=!1;return}const h=n[p],z=(h==null?void 0:h.image.objectFit)==="cover";let j,B;if("changedTouches"in a&&a.changedTouches.length>0)j=a.changedTouches[0].clientX,B=a.changedTouches[0].clientY;else if("clientX"in a)j=a.clientX,B=a.clientY;else return;let X;if(z&&G.current){const K=To(G.current);X=j>=K.left&&j<=K.right&&B>=K.top&&B<=K.bottom}else{const K=G.current?wo(G.current):null;if(!K){a.target===a.currentTarget&&ee();return}X=j>=K.x&&j<=K.x+K.width&&B>=K.y&&B<=K.y+K.height}X?de(G.current,j,B):ee()},ge=a=>{const h=a.target;(h.classList.contains(q.thumbsWrapper)||h.classList.contains(q.thumbsContainer))&&se(a)};A.useEffect(()=>{if(!e)return;const a=h=>{var z,j;if(h.key==="Escape"){ee();return}if(h.key==="ArrowRight"){g(B=>(B+1)%Math.max(n.length,1)),(z=b.current)==null||z.go("+1");return}h.key==="ArrowLeft"&&(g(B=>(B-1+Math.max(n.length,1))%Math.max(n.length,1)),(j=b.current)==null||j.go("-1"))};return window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[e,ee,n.length]),A.useEffect(()=>{if(e){if(g(0),F(h=>h+1),N.current=!1,y(!1),m(!1),v({}),!P)return;const a=new CustomEvent("page-overlay",{detail:{itemId:P}});window.dispatchEvent(a)}return()=>{T.current&&x.current&&(T.current.removeEventListener("animationend",x.current),x.current=null),m(!1)}},[e,P]),A.useEffect(()=>{L.current!==null&&L.current!==f.type&&F(a=>a+1),L.current=f.type},[f.type]),A.useEffect(()=>{if(!e)return;const a=document.body.style.overflow,h=window.matchMedia("(max-width: 768px)").matches,z=_o(I.color);document.body.style.overflow="hidden",m(!1);const j=X=>{X.target===T.current&&!N.current&&X.animationName&&(h&&!i&&z>.9&&(document.body.style.backgroundColor=I.color),m(!0),T.current&&R.current&&T.current.removeEventListener("animationend",R.current),R.current=null)};T.current&&(R.current=j,T.current.addEventListener("animationend",j));const B=X=>{const K=X.target;K&&(K.closest(`.${q.thumbsWrapper}`)||K.closest(`.${q.thumbsContainer}`))||f.type!=="slide"&&X.preventDefault()};return document.addEventListener("touchmove",B,{passive:!1}),()=>{document.body.style.overflow=a,document.removeEventListener("touchmove",B),T.current&&R.current&&(T.current.removeEventListener("animationend",R.current),R.current=null),m(!1)}},[e,i,I.color,f.type]),A.useEffect(()=>{if(!e)return;const a=h=>{var j,B;if(N.current){h.stopPropagation();return}if(O.current){O.current=!1;return}const z=h.target;if(!(z&&(z.closest(`.${q.thumbsContainer}`)||z.closest(`.${q.thumbItem}`)))){if(f.type==="slide"&&D.type==="drag"&&((B=(j=b.current)==null?void 0:j.splide)!=null&&B.root)){const X=b.current.splide.root;if(z&&(X.contains(z)||X===z))return}if(h.touches.length===0&&h.changedTouches.length>0){const X=n[p],K=(X==null?void 0:X.image.objectFit)==="cover",te=h.changedTouches[0];let oe;if(K&&G.current){const le=To(G.current);oe=te.clientX>=le.left&&te.clientX<=le.right&&te.clientY>=le.top&&te.clientY<=le.bottom}else{const le=G.current?wo(G.current):null;if(!le)return;oe=te.clientX>=le.x&&te.clientX<=le.x+le.width&&te.clientY>=le.y&&te.clientY<=le.y+le.height}if(!oe){h.stopPropagation(),N.current=!0;const le=ce=>{ce.stopPropagation(),ce.preventDefault(),document.removeEventListener("click",le,!0)};document.addEventListener("click",le,!0),ee()}}}};return document.addEventListener("touchend",a,{passive:!0}),()=>{document.removeEventListener("touchend",a)}},[e,ee,p,n]);const ye=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&D.type==="drag";A.useEffect(()=>{var ce,Se;if(!e||!ye||!((Se=(ce=b.current)==null?void 0:ce.splide)!=null&&Se.root))return;const a=b.current.splide.root,h=30,z=(Q,pe)=>{if(C.current){const he=Math.abs(Q-C.current.x),Ae=Math.abs(pe-C.current.y);(he>0||Ae>0)&&(O.current=!0)}},j=Q=>{C.current&&(Q.preventDefault(),z(Q.clientX,Q.clientY))},B=Q=>{C.current&&Q.touches.length>0&&(Q.preventDefault(),z(Q.touches[0].clientX,Q.touches[0].clientY))},X=(Q,pe)=>{if(!C.current||!b.current){C.current=null;return}const he=Math.abs(Q-C.current.x),Ae=Math.abs(pe-C.current.y);Ae>h&&Ae>he&&b.current.go(pe<C.current.y?"+1":"-1"),C.current=null},K=Q=>{C.current&&X(Q.clientX,Q.clientY),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("pointermove",j)},te=Q=>{if(C.current){if(Q.changedTouches.length>0){const pe=Q.changedTouches[0];X(pe.clientX,pe.clientY)}document.removeEventListener("touchend",te),document.removeEventListener("touchcancel",te),document.removeEventListener("touchmove",B)}},oe=Q=>{C.current={x:Q.clientX,y:Q.clientY},O.current=!1,document.addEventListener("pointermove",j,{passive:!1}),document.addEventListener("pointerup",K),document.addEventListener("pointercancel",K)},le=Q=>{Q.touches.length>0&&(C.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},O.current=!1,document.addEventListener("touchmove",B,{passive:!1}),document.addEventListener("touchend",te),document.addEventListener("touchcancel",te))};return a.addEventListener("pointerdown",oe),a.addEventListener("touchstart",le),()=>{a.removeEventListener("pointerdown",oe),a.removeEventListener("touchstart",le),document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("touchmove",B),document.removeEventListener("touchend",te),document.removeEventListener("touchcancel",te),C.current=null,O.current=!1}},[e,ye,u]);const _e={backgroundColor:I.color,backdropFilter:`blur(${I.blur}px)`,animationDuration:`${parseInt(Y.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:br.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:i?null:T,className:ue(q.background,S?ne:ae,{[q.editor]:i},{[q.hidden]:!e}),style:{..._e,...d&&!i&&!S?{position:"absolute"}:{}}}),l.jsxs("div",{ref:i?T:null,className:ue(q.contentStyle,S?ie:J,{[q.editor]:i},{[q.hidden]:!e}),style:{animationDuration:`${parseInt(Y.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(ur,{onMove:a=>g(a.index),ref:b,className:q.lightboxSplide,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,direction:f.direction==="horiz"||f.type==="fade"||f.type==="scale"?"ltr":"ttb",pagination:!1,drag:D.type==="drag"&&!ye,perPage:1,width:"100%",height:"100%",type:f.type==="fade"||f.type==="scale"?"fade":"loop",padding:0,rewind:D.repeat!=="close",start:0},style:{"--splide-speed":f.duration},children:n.map((a,h)=>{const z=Xt(k.position,k.offset,i),j=`${_.scalingValue(k.padding.top,i)} ${_.scalingValue(k.padding.right,i)} ${_.scalingValue(k.padding.bottom,i)} ${_.scalingValue(k.padding.left,i)}`,B=f.type==="scale"?(()=>{const{transform:X,...K}=z;return{...K,position:"absolute",padding:j,boxSizing:"border-box","--position-transform":X||"none"}})():{...z,position:"absolute",padding:j,boxSizing:"border-box"};return l.jsx(dr,{children:l.jsx("div",{className:q.imgWrapper,onClick:se,children:l.jsx("img",{ref:h===p?G:null,className:ue(q.imageStyle,{[q.contain]:a.image.objectFit==="contain",[q.cover]:a.image.objectFit==="cover",[q.scaleSlide]:f.type==="scale"}),src:a.image.url,alt:a.image.name??"",style:{...B,pointerEvents:a.image.objectFit==="contain"?"none":"auto"}})})},h)})},u),E.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ue(q.arrow,{[q.arrowVertical]:f.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:l.jsxs("button",{className:q.arrowInner,style:{transform:`translate(${_.scalingValue(E.offset.x,i)}, ${_.scalingValue(E.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${E.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var a;return(a=b.current)==null?void 0:a.go("-1")},"aria-label":"Previous",children:[E.arrowsImgUrl&&l.jsx(et,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:ue(q.arrowImg,q.mirror)}),!E.arrowsImgUrl&&l.jsx($o,{color:E.color,className:ue(q.arrowIcon,q.arrowImg,q.mirror)})]})}),l.jsx("div",{className:ue(q.arrow,q.nextArrow,{[q.arrowVertical]:f.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:l.jsxs("button",{className:q.arrowInner,style:{transform:`translate(${_.scalingValue(E.offset.x*(f.direction==="horiz"?-1:1),i)}, ${_.scalingValue(E.offset.y,i)}) scale(${E.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var a;return(a=b.current)==null?void 0:a.go("+1")},"aria-label":"Next",children:[E.arrowsImgUrl&&l.jsx(et,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:q.arrowImg}),!E.arrowsImgUrl&&l.jsx($o,{color:E.color,className:ue(q.arrowIcon,q.arrowImg)})]})})]}),I.closeIconUrl&&(()=>{const a=Xt(I.closeIconAlign,I.closeIconOffset,i),h=`scale(${I.closeIconScale})`,z=a.transform?`${a.transform} ${h}`:h;return l.jsx("button",{className:q.closeButton,style:{...a,transform:z},onClick:ee,"aria-label":"Close lightbox",children:l.jsx(et,{url:I.closeIconUrl,fill:I.closeIconColor??"#000000",hoverFill:I.closeIconHover??"#cccccc"})})})(),$&&$.isActive&&o.imageCaption&&((U=n[p])==null?void 0:U.imageCaption)&&(()=>{const{widthSettings:a,fontSettings:h,letterSpacing:z,textAlign:j,wordSpacing:B,fontSizeLineHeight:X,textAppearance:K,color:te}=o.imageCaption;return l.jsx("div",{className:q.caption,style:{...Xt($.alignment,$.offset,i),fontFamily:h.fontFamily,fontWeight:h.fontWeight,fontStyle:h.fontStyle,width:a.sizing==="auto"?"max-content":_.scalingValue(a.width,i),letterSpacing:_.scalingValue(z,i),wordSpacing:_.scalingValue(B,i),textAlign:j,fontSize:_.scalingValue(X.fontSize,i),lineHeight:_.scalingValue(X.lineHeight,i),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:te},onClick:oe=>oe.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:q.captionTextInner,style:{"--link-color":$.linkColor,"--link-hover-color":$.linkHoverColor},children:l.jsx(zt,{content:n[p].imageCaption})})})})(),M.isActive&&(()=>{const[a,h]=M.position.split("-"),z=f.direction==="horiz"?`${a}-left`:M.position,j=Xt(z,M.offset,i),B=()=>{if(f.direction==="horiz"){if(h==="left")return"flex-start";if(h==="center")return"center";if(h==="right")return"flex-end"}else{if(a==="top")return"flex-start";if(a==="middle")return"center";if(a==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:W,className:q.thumbsWrapper,onClick:X=>ge(X),style:{position:i?"absolute":"fixed",...j,...f.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:ue(q.thumbsContainer,{[q.thumbsContainerVertical]:f.direction==="vert",[q.thumbsAlignStart]:M.align==="start",[q.thumbsAlignCenter]:M.align==="center",[q.thumbsAlignEnd]:M.align==="end"}),style:{gap:_.scalingValue(M.grid.gap,i),justifyContent:V?"flex-start":B()},children:n.map((X,K)=>{const te=K===p,oe=w[K],ce=M.grid.size*(te?M.activeState.scale:1),Se=()=>{if(M.fit!=="fit")return{};if(!oe)return f.direction==="horiz"?{height:_.scalingValue(ce,i)}:{width:_.scalingValue(ce,i)};const Q=oe.width/oe.height;if(f.direction==="horiz"){const pe=ce,he=pe*Q;return{width:_.scalingValue(he,i),height:_.scalingValue(pe,i)}}else{const pe=ce,he=pe/Q;return{width:_.scalingValue(pe,i),height:_.scalingValue(he,i)}}};return l.jsx("button",{className:q.thumbItem,style:{...f.direction==="horiz"&&M.fit!=="fit"?{height:_.scalingValue(ce,i)}:{},...f.direction==="vert"&&M.fit!=="fit"?{width:_.scalingValue(ce,i)}:{},...M.fit==="cover"?{width:_.scalingValue(ce,i),height:_.scalingValue(ce,i)}:{},...Se(),transition:te?"all 0.25s ease-out":"none",opacity:te?M.activeState.opacity/100:M.opacity/100,"--thumb-hover":M.activeState.opacity/100},onClick:Q=>{var pe;Q.stopPropagation(),g(K),(pe=b.current)==null||pe.go(K)},onMouseEnter:()=>{var Q;M.triggers==="hov"&&((Q=b.current)==null||Q.go(K))},children:l.jsx("img",{src:X.image.url,alt:X.image.name??"",onLoad:Q=>{const pe=Q.currentTarget;pe.naturalWidth&&pe.naturalHeight&&v(he=>({...he,[K]:{width:pe.naturalWidth,height:pe.naturalHeight}}))},style:{objectFit:M.fit==="cover"?"cover":"contain",...M.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...M.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${X.image.name}-${K}`)})})})})()]})]}),document.getElementById(s))};function $o({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const wl={element:Sl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function bt(e){const{color:t,...n}=e;return n}function Qe(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:_.scalingValue(e.letterSpacing,t),wordSpacing:_.scalingValue(e.wordSpacing,t),fontSize:_.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?_.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}function Kt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Tl(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Xt(48)};
11
+ min-height: ${Kt(48)};
12
12
  }
13
13
  .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
14
  .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${e}-field-group.${e}-labeled {
35
- gap: ${Xt(4)};
35
+ gap: ${Kt(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,18 +128,18 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${Xt(8)};
131
+ margin-top: ${Kt(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${Xt(8)};
135
+ margin-top: ${Kt(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function _l({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=_.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:c=[],buttonLabel:p,gap:g,fieldsGap:u,buttonCorners:F,buttonStroke:S,buttonPadding:y,isButtonFullWidth:d,inputCorners:m,inputStroke:w,inputPadding:v,inputColor:b,inputTextColor:L,inputBorderColor:G,placeholderColor:N,buttonColor:T,buttonTextColor:x,buttonBorderColor:R,labelTextColor:C,successColor:O,errorColor:W,fontFamily:V,inputFontSettings:H,inputFontSize:Y,inputLineHeight:D,inputLetterSpacing:f,inputWordSpacing:M,inputTextAppearance:E,buttonFontSettings:I,buttonFontSize:$,buttonLineHeight:k,buttonLetterSpacing:J,buttonWordSpacing:ae,buttonTextAppearance:te,labelFontSettings:ie,labelFontSize:P,labelLineHeight:Q,labelLetterSpacing:de,labelWordSpacing:ce,labelTextAppearance:ge,statusFontSettings:he,statusFontSize:_e,statusLineHeight:U,statusLetterSpacing:a,statusWordSpacing:h,statusTextAppearance:z,successMessage:j,errorMessage:B,stateOverrides:X}=e,K=s==="B",ee=c.slice(0,Math.min(i,c.length)),ne={fontSettings:{fontFamily:V,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:Y??.01,lineHeight:D,letterSpacing:f??0,wordSpacing:M??0,textAppearance:E,color:L},le=ht(Je(ne,t)),se=_.scalingValue(w??0,t),Se=_.scalingValue((D??Y??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(s==="C"?w??0:(w??0)*2),t),oe={...le,borderStyle:"solid",borderRadius:s==="C"?0:_.scalingValue(m??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:se,borderLeftWidth:0}:{borderWidth:se},paddingTop:_.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:_.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:_.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:_.scalingValue((v==null?void 0:v.left)??0,t),height:Se,minHeight:Se},pe={fontSettings:{fontFamily:V,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:$??.01,lineHeight:k,letterSpacing:J??0,wordSpacing:ae??0,textAppearance:te,color:x},fe=ht(Je(pe,t)),Ie=_.scalingValue(S??0,t),bn={fontSettings:{fontFamily:V,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:P??.01,lineHeight:Q,letterSpacing:de??0,wordSpacing:ce??0,textAppearance:ge,color:C},Tt=Je(bn,t),be={fontSettings:{fontFamily:V,fontWeight:(he==null?void 0:he.fontWeight)??400,fontStyle:(he==null?void 0:he.fontStyle)??"normal"},fontSize:_e??.01,lineHeight:U,letterSpacing:a??0,wordSpacing:h??0,textAppearance:z,color:O},Pe=ht(Je(be,t)),rt=_.buildColorVars(r,{inputColor:b,inputTextColor:L,inputBorderColor:G,placeholderColor:N!=null&&N.trim()?N:"#cccccc",buttonColor:T,buttonTextColor:x,buttonBorderColor:R,labelTextColor:C,successColor:O,errorColor:W},$l,Al,X),[we,Ne]=A.useState(()=>Object.fromEntries(ee.map(me=>[me.name,""]))),[no,_t]=A.useState("idle"),[mr,Ut]=A.useState(null),xn=o==="success"?"success":o==="error"?"error":no,fr=o==="error"?B:mr,qt=o==="filled",$t=A.useMemo(()=>{if(!qt)return we;let me=null;for(const Oe of ee)(we[Oe.name]??"").trim().length>0||(me=me??{...we},me[Oe.name]="Filled");return me??we},[we,qt,ee]),yr=xn==="error"?_.getFormFieldValidationError(ee,$t):null,hr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),oo=n==null?void 0:n.submitUrl,ro=(me,Oe)=>{Ne(je=>({...je,[me]:Oe}))},vr=async me=>{me.preventDefault();const Oe=Object.fromEntries(ee.map(ke=>{var pt;return[ke.name,((pt=we[ke.name])==null?void 0:pt.trim())??""]}).filter(([,ke])=>ke));if(!oo){_t("error"),Ut("No integrations were found for this form.");return}if(Object.keys(Oe).length===0)return;const je=_.getFormFieldValidationError(ee,we);if(je){_t("error"),Ut(je);return}_t("submitting"),Ut(null);try{const ke=await fetch(oo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Oe)});if(!ke.ok){const pt=await ke.text();throw new Error(pt||`Request failed: ${ke.status}`)}_t("success"),Ne(Object.fromEntries(ee.map(pt=>[pt.name,""])))}catch(ke){_t("error"),Ut(ke instanceof Error?ke.message:"Something went wrong")}};return l.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${hr}`.trim(),style:rt,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Tl(r)}}),l.jsxs("form",{onSubmit:vr,className:`${r}-form`,style:{gap:_.scalingValue(g??0,t)},children:[l.jsx("div",{className:`${r}-fields`,style:{gap:_.scalingValue(u??0,t)},children:ee.map((me,Oe)=>l.jsxs("div",{className:`${r}-field-group${K?` ${r}-labeled`:""}`,children:[K&&l.jsx("span",{className:`${r}-field-label`,style:Tt?{...Tt,lineHeight:Tt.fontSize}:void 0,children:me.label||me.name}),me.type==="textarea"?l.jsx("textarea",{name:me.name,autoComplete:"off",value:$t[me.name]??"",onChange:je=>ro(me.name,je.target.value),placeholder:me.placeholder,className:`${r}-input`,style:oe,rows:1,"data-filled":qt||($t[me.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:me.type==="phone"?"tel":me.type==="email"?"email":"text",name:me.name,autoComplete:"off",value:$t[me.name]??"",onChange:je=>ro(me.name,je.target.value),placeholder:me.placeholder,required:me.isRequired??me.type==="email",className:`${r}-input`,style:oe,"data-filled":qt||($t[me.name]??"").trim().length>0})]},Oe))}),l.jsx("div",{className:`${r}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:_.scalingValue(F??0,t),borderWidth:Ie,paddingTop:_.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:_.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:_.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:_.scalingValue((y==null?void 0:y.left)??0,t),...fe,...d?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${r}-overlay-anchor`,style:d?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:no==="submitting"?"...":p})})})]}),xn==="success"&&l.jsx("p",{className:`${r}-success`,style:{...Pe},children:j}),xn==="error"&&l.jsx("p",{className:`${r}-error`,style:{...Pe},role:"alert",children:yr??fr??B})]})}const $l={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},Al=["hover","focus","filled","success","error"],Il=`import React, { useMemo, useState } from 'react';
142
+ `}function _l({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=_.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:c=[],buttonLabel:p,gap:g,fieldsGap:u,buttonCorners:F,buttonStroke:S,buttonPadding:y,isButtonFullWidth:d,inputCorners:m,inputStroke:w,inputPadding:v,inputColor:b,inputTextColor:L,inputBorderColor:G,placeholderColor:N,buttonColor:T,buttonTextColor:x,buttonBorderColor:R,labelTextColor:C,successColor:O,errorColor:W,fontFamily:V,inputFontSettings:H,inputFontSize:Y,inputLineHeight:D,inputLetterSpacing:f,inputWordSpacing:M,inputTextAppearance:E,buttonFontSettings:I,buttonFontSize:$,buttonLineHeight:k,buttonLetterSpacing:J,buttonWordSpacing:ae,buttonTextAppearance:ne,labelFontSettings:ie,labelFontSize:P,labelLineHeight:ee,labelLetterSpacing:de,labelWordSpacing:se,labelTextAppearance:ge,statusFontSettings:ye,statusFontSize:_e,statusLineHeight:U,statusLetterSpacing:a,statusWordSpacing:h,statusTextAppearance:z,successMessage:j,errorMessage:B,stateOverrides:X}=e,K=s==="B",te=c.slice(0,Math.min(i,c.length)),oe={fontSettings:{fontFamily:V,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:Y??.01,lineHeight:D,letterSpacing:f??0,wordSpacing:M??0,textAppearance:E,color:L},le=bt(Qe(oe,t)),ce=_.scalingValue(w??0,t),Se=_.scalingValue((D??Y??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(s==="C"?w??0:(w??0)*2),t),Q={...le,borderStyle:"solid",borderRadius:s==="C"?0:_.scalingValue(m??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ce,borderLeftWidth:0}:{borderWidth:ce},paddingTop:_.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:_.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:_.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:_.scalingValue((v==null?void 0:v.left)??0,t),height:Se,minHeight:Se},pe={fontSettings:{fontFamily:V,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:$??.01,lineHeight:k,letterSpacing:J??0,wordSpacing:ae??0,textAppearance:ne,color:x},he=bt(Qe(pe,t)),Ae=_.scalingValue(S??0,t),ke={fontSettings:{fontFamily:V,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:P??.01,lineHeight:ee,letterSpacing:de??0,wordSpacing:se??0,textAppearance:ge,color:C},Oe=Qe(ke,t),be={fontSettings:{fontFamily:V,fontWeight:(ye==null?void 0:ye.fontWeight)??400,fontStyle:(ye==null?void 0:ye.fontStyle)??"normal"},fontSize:_e??.01,lineHeight:U,letterSpacing:a??0,wordSpacing:h??0,textAppearance:z,color:O},ze=bt(Qe(be,t)),at=_.buildColorVars(r,{inputColor:b,inputTextColor:L,inputBorderColor:G,placeholderColor:N!=null&&N.trim()?N:"#cccccc",buttonColor:T,buttonTextColor:x,buttonBorderColor:R,labelTextColor:C,successColor:O,errorColor:W},$l,Al,X),[we,je]=A.useState(()=>Object.fromEntries(te.map(me=>[me.name,""]))),[no,$t]=A.useState("idle"),[mr,qt]=A.useState(null),xn=o==="success"?"success":o==="error"?"error":no,fr=o==="error"?B:mr,Gt=o==="filled",At=A.useMemo(()=>{if(!Gt)return we;let me=null;for(const Be of te)(we[Be.name]??"").trim().length>0||(me=me??{...we},me[Be.name]="Filled");return me??we},[we,Gt,te]),yr=xn==="error"?_.getFormFieldValidationError(te,At):null,hr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),oo=n==null?void 0:n.submitUrl,ro=(me,Be)=>{je(De=>({...De,[me]:Be}))},vr=async me=>{me.preventDefault();const Be=Object.fromEntries(te.map(Re=>{var dt;return[Re.name,((dt=we[Re.name])==null?void 0:dt.trim())??""]}).filter(([,Re])=>Re));if(!oo){$t("error"),qt("No integrations were found for this form.");return}if(Object.keys(Be).length===0)return;const De=_.getFormFieldValidationError(te,we);if(De){$t("error"),qt(De);return}$t("submitting"),qt(null);try{const Re=await fetch(oo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Be)});if(!Re.ok){const dt=await Re.text();throw new Error(dt||`Request failed: ${Re.status}`)}$t("success"),je(Object.fromEntries(te.map(dt=>[dt.name,""])))}catch(Re){$t("error"),qt(Re instanceof Error?Re.message:"Something went wrong")}};return l.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${hr}`.trim(),style:at,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Tl(r)}}),l.jsxs("form",{onSubmit:vr,className:`${r}-form`,style:{gap:_.scalingValue(g??0,t)},children:[l.jsx("div",{className:`${r}-fields`,style:{gap:_.scalingValue(u??0,t)},children:te.map((me,Be)=>l.jsxs("div",{className:`${r}-field-group${K?` ${r}-labeled`:""}`,children:[K&&l.jsx("span",{className:`${r}-field-label`,style:Oe?{...Oe,lineHeight:Oe.fontSize}:void 0,children:me.label||me.name}),me.type==="textarea"?l.jsx("textarea",{name:me.name,autoComplete:"off",value:At[me.name]??"",onChange:De=>ro(me.name,De.target.value),placeholder:me.placeholder,className:`${r}-input`,style:Q,rows:1,"data-filled":Gt||(At[me.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:me.type==="phone"?"tel":me.type==="email"?"email":"text",name:me.name,autoComplete:"off",value:At[me.name]??"",onChange:De=>ro(me.name,De.target.value),placeholder:me.placeholder,required:me.isRequired??me.type==="email",className:`${r}-input`,style:Q,"data-filled":Gt||(At[me.name]??"").trim().length>0})]},Be))}),l.jsx("div",{className:`${r}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:_.scalingValue(F??0,t),borderWidth:Ae,paddingTop:_.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:_.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:_.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:_.scalingValue((y==null?void 0:y.left)??0,t),...he,...d?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${r}-overlay-anchor`,style:d?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:no==="submitting"?"...":p})})})]}),xn==="success"&&l.jsx("p",{className:`${r}-success`,style:{...ze},children:j}),xn==="error"&&l.jsx("p",{className:`${r}-error`,style:{...ze},role:"alert",children:yr??fr??B})]})}const $l={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},Al=["hover","focus","filled","success","error"],Il=`import React, { useMemo, useState } from 'react';
143
143
  import { CommonComponentProps } from '../props';
144
144
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
145
145
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -740,7 +740,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
740
740
  };
741
741
 
742
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
743
- `,El=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Kt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ll=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Kt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Kt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Kt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Kt.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:El,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Ll],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},kl={element:_l,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:Fl,sourceCode:Il};function Jt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rl(e){return`
743
+ `,El=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Jt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ll=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Jt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Jt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Jt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Jt.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:El,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Ll],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},kl={element:_l,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:Fl,sourceCode:Il};function Zt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rl(e){return`
744
744
  .${e}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
@@ -922,16 +922,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
922
922
  align-items: center;
923
923
  }
924
924
  .${e}-success {
925
- margin-top: ${Jt(8)};
926
- font-size: ${Jt(14)};
925
+ margin-top: ${Zt(8)};
926
+ font-size: ${Zt(14)};
927
927
  color: var(--${e}-success-success-color, var(--${e}-success-color));
928
928
  }
929
929
  .${e}-error {
930
- margin-top: ${Jt(8)};
931
- font-size: ${Jt(14)};
930
+ margin-top: ${Zt(8)};
931
+ font-size: ${Zt(14)};
932
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const Ml=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=_.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:c,fieldsToShow:p=1,fontFamily:g,inputFontSettings:u,inputFontSize:F,inputLineHeight:S,inputLetterSpacing:y,inputWordSpacing:d,inputTextAppearance:m,buttonFontSettings:w,buttonFontSize:v,buttonLineHeight:b,buttonLetterSpacing:L,buttonWordSpacing:G,buttonTextAppearance:N,statusFontSettings:T,statusFontSize:x,statusLineHeight:R,statusLetterSpacing:C,statusWordSpacing:O,statusTextAppearance:W,iconMaxWidth:V,minHeight:H,corners:Y,stroke:D,stateOverrides:f,inputPadding:M,buttonPadding:E,successMessage:I="Thanks for subscribing!",errorMessage:$="Please, fill all required fields."}=e,k=s.slice(0,Math.min(p,s.length)),[J,ae]=A.useState(()=>Object.fromEntries(k.map(be=>[be.name,""]))),[te,ie]=A.useState("idle"),[P,Q]=A.useState(null),de=o==="success"?"success":o==="error"?"error":te,ce=o==="error"?$:P,ge=o==="filled",he=A.useMemo(()=>{if(!ge)return J;let be=null;for(const Pe of k)(J[Pe.name]??"").trim().length>0||(be=be??{...J},be[Pe.name]="Filled");return be??J},[ge,J,k]),_e=de==="error"?_.getFormFieldValidationError(k,he):null,U=o&&o!=="default"?`${r}-state-${o}`:"",a=k.some(be=>(he[be.name]??"").trim().length>0),h=U!==`${r}-state-filled`&&a?`${r}-state-filled`:"",z=`${U} ${h}`.trim(),j=n==null?void 0:n.submitUrl,B=c??"",X=(i==null?void 0:i.icon)??"",K=(i==null?void 0:i.mode)==="On",ee=B||"Submit",ne={fontSettings:{fontFamily:g,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:F??.01,lineHeight:S,letterSpacing:y??0,wordSpacing:d??0,textAppearance:m,color:e.inputTextColor??"#111111"},le={fontSettings:{fontFamily:g,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:v??.01,lineHeight:b,letterSpacing:L??0,wordSpacing:G??0,textAppearance:N,color:e.buttonTextColor??"#ffffff"},se={fontSettings:{fontFamily:g,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:x??.01,lineHeight:R,letterSpacing:C??0,wordSpacing:O??0,textAppearance:W,color:e.successColor??"#22c55e"},Se=ht(Je(ne,t)),oe=ht(Je(le,t)),pe=ht(Je(se,t)),fe=_.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ne==null?void 0:ne.color)??"#111111",buttonTextColor:e.buttonTextColor??(le==null?void 0:le.color)??"#ffffff"},Wl,Pl,f),Ie={borderRadius:_.scalingValue(Y,t),borderWidth:_.scalingValue(D,t),borderStyle:"solid"},bn={borderLeftWidth:_.scalingValue(D,t)},Tt=async be=>{be.preventDefault();const Pe=Object.fromEntries(k.map(we=>{var Ne;return[we.name,((Ne=J[we.name])==null?void 0:Ne.trim())??""]}).filter(([,we])=>we));if(!j){ie("error"),Q("No integrations were found for this form.");return}if(Object.keys(Pe).length===0)return;const rt=_.getFormFieldValidationError(k,J);if(rt){ie("error"),Q(rt);return}ie("submitting"),Q(null);try{const we=await fetch(j,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Pe)});if(!we.ok){const Ne=await we.text();throw new Error(Ne||`Request failed: ${we.status}`)}ie("success"),ae(Object.fromEntries(k.map(Ne=>[Ne.name,""])))}catch(we){ie("error"),Q(we instanceof Error?we.message:"Something went wrong")}};return l.jsxs("div",{className:`${r}-wrapper ${z}`.trim(),style:fe,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Rl(r)}}),l.jsxs("form",{onSubmit:Tt,className:`${r}-form`,style:{...Ie,height:_.scalingValue(H,t),minHeight:_.scalingValue(H,t)},children:[l.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:k.map(be=>l.jsx("input",{type:be.type==="email"?"email":be.type==="phone"?"tel":"text",name:be.name,autoComplete:"off",value:he[be.name]??"",onChange:Pe=>ae(rt=>({...rt,[be.name]:Pe.target.value})),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${r}-input`,style:{...Se,paddingRight:_.scalingValue(M.right,t),paddingLeft:_.scalingValue(M.left,t),paddingTop:_.scalingValue(M.top,t),paddingBottom:_.scalingValue(M.bottom,t)}},be.name))}),l.jsx("div",{className:`${r}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":ee,style:{...oe,...bn,paddingRight:_.scalingValue(E.right,t),paddingLeft:_.scalingValue(E.left,t),paddingTop:_.scalingValue(E.top,t),paddingBottom:_.scalingValue(E.bottom,t)},children:te==="submitting"?"...":K?X&&l.jsx(Ze,{url:X,className:`${r}-submitBtnIcon`,style:{maxWidth:_.scalingValue(V??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):B})})]}),de==="success"&&l.jsx("p",{className:`${r}-success`,style:{...pe},children:I}),de==="error"&&l.jsx("p",{className:`${r}-error`,style:{...pe},role:"alert",children:_e??ce??$})]})},Wl={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},Pl=["hover","focus","filled","success","error"],zl=`import React, { useMemo, useState } from 'react';
934
+ `}const Ml=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=_.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:c,fieldsToShow:p=1,fontFamily:g,inputFontSettings:u,inputFontSize:F,inputLineHeight:S,inputLetterSpacing:y,inputWordSpacing:d,inputTextAppearance:m,buttonFontSettings:w,buttonFontSize:v,buttonLineHeight:b,buttonLetterSpacing:L,buttonWordSpacing:G,buttonTextAppearance:N,statusFontSettings:T,statusFontSize:x,statusLineHeight:R,statusLetterSpacing:C,statusWordSpacing:O,statusTextAppearance:W,iconMaxWidth:V,minHeight:H,corners:Y,stroke:D,stateOverrides:f,inputPadding:M,buttonPadding:E,successMessage:I="Thanks for subscribing!",errorMessage:$="Please, fill all required fields."}=e,k=s.slice(0,Math.min(p,s.length)),[J,ae]=A.useState(()=>Object.fromEntries(k.map(be=>[be.name,""]))),[ne,ie]=A.useState("idle"),[P,ee]=A.useState(null),de=o==="success"?"success":o==="error"?"error":ne,se=o==="error"?$:P,ge=o==="filled",ye=A.useMemo(()=>{if(!ge)return J;let be=null;for(const ze of k)(J[ze.name]??"").trim().length>0||(be=be??{...J},be[ze.name]="Filled");return be??J},[ge,J,k]),_e=de==="error"?_.getFormFieldValidationError(k,ye):null,U=o&&o!=="default"?`${r}-state-${o}`:"",a=k.some(be=>(ye[be.name]??"").trim().length>0),h=U!==`${r}-state-filled`&&a?`${r}-state-filled`:"",z=`${U} ${h}`.trim(),j=n==null?void 0:n.submitUrl,B=c??"",X=(i==null?void 0:i.icon)??"",K=(i==null?void 0:i.mode)==="On",te=B||"Submit",oe={fontSettings:{fontFamily:g,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:F??.01,lineHeight:S,letterSpacing:y??0,wordSpacing:d??0,textAppearance:m,color:e.inputTextColor??"#111111"},le={fontSettings:{fontFamily:g,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:v??.01,lineHeight:b,letterSpacing:L??0,wordSpacing:G??0,textAppearance:N,color:e.buttonTextColor??"#ffffff"},ce={fontSettings:{fontFamily:g,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:x??.01,lineHeight:R,letterSpacing:C??0,wordSpacing:O??0,textAppearance:W,color:e.successColor??"#22c55e"},Se=bt(Qe(oe,t)),Q=bt(Qe(le,t)),pe=bt(Qe(ce,t)),he=_.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(oe==null?void 0:oe.color)??"#111111",buttonTextColor:e.buttonTextColor??(le==null?void 0:le.color)??"#ffffff"},Wl,Pl,f),Ae={borderRadius:_.scalingValue(Y,t),borderWidth:_.scalingValue(D,t),borderStyle:"solid"},ke={borderLeftWidth:_.scalingValue(D,t)},Oe=async be=>{be.preventDefault();const ze=Object.fromEntries(k.map(we=>{var je;return[we.name,((je=J[we.name])==null?void 0:je.trim())??""]}).filter(([,we])=>we));if(!j){ie("error"),ee("No integrations were found for this form.");return}if(Object.keys(ze).length===0)return;const at=_.getFormFieldValidationError(k,J);if(at){ie("error"),ee(at);return}ie("submitting"),ee(null);try{const we=await fetch(j,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ze)});if(!we.ok){const je=await we.text();throw new Error(je||`Request failed: ${we.status}`)}ie("success"),ae(Object.fromEntries(k.map(je=>[je.name,""])))}catch(we){ie("error"),ee(we instanceof Error?we.message:"Something went wrong")}};return l.jsxs("div",{className:`${r}-wrapper ${z}`.trim(),style:he,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Rl(r)}}),l.jsxs("form",{onSubmit:Oe,className:`${r}-form`,style:{...Ae,height:_.scalingValue(H,t),minHeight:_.scalingValue(H,t)},children:[l.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:k.map(be=>l.jsx("input",{type:be.type==="email"?"email":be.type==="phone"?"tel":"text",name:be.name,autoComplete:"off",value:ye[be.name]??"",onChange:ze=>ae(at=>({...at,[be.name]:ze.target.value})),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${r}-input`,style:{...Se,paddingRight:_.scalingValue(M.right,t),paddingLeft:_.scalingValue(M.left,t),paddingTop:_.scalingValue(M.top,t),paddingBottom:_.scalingValue(M.bottom,t)}},be.name))}),l.jsx("div",{className:`${r}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":te,style:{...Q,...ke,paddingRight:_.scalingValue(E.right,t),paddingLeft:_.scalingValue(E.left,t),paddingTop:_.scalingValue(E.top,t),paddingBottom:_.scalingValue(E.bottom,t)},children:ne==="submitting"?"...":K?X&&l.jsx(et,{url:X,className:`${r}-submitBtnIcon`,style:{maxWidth:_.scalingValue(V??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):B})})]}),de==="success"&&l.jsx("p",{className:`${r}-success`,style:{...pe},children:I}),de==="error"&&l.jsx("p",{className:`${r}-error`,style:{...pe},role:"alert",children:_e??se??$})]})},Wl={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},Pl=["hover","focus","filled","success","error"],zl=`import React, { useMemo, useState } from 'react';
935
935
  import { CommonComponentProps } from '../props';
936
936
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
937
937
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1503,7 +1503,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1503
1503
  };
1504
1504
 
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1506
- `,Hl="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Vl=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],$n={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Nl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Ol={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$n.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...$n.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...$n.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Vl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Hl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Nl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},jl={element:Ml,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Ol,sourceCode:zl},Bl="TestimonialsGrid-module__marqueeWrapper___VC616",Dl="TestimonialsGrid-module__marqueeTrack___U0OTH",Ul="TestimonialsGrid-module__marqueeSet___L7ZdX",ql="TestimonialsGrid-module__wrapper___-JQKm",Gl="TestimonialsGrid-module__cover___3-r73",Yl="TestimonialsGrid-module__elementsOverlay___sSbJp",Xl="TestimonialsGrid-module__control___pD3e4",Be={marqueeWrapper:Bl,marqueeTrack:Dl,marqueeSet:Ul,wrapper:ql,cover:Gl,elementsOverlay:Yl,control:Xl},Kl=30,Jl=e=>{if(typeof e=="number")return e;const t=parseFloat(String(e??""));return Number.isFinite(t)?t:0},Zl=e=>({fontSettings:{...e.fontSettings},letterSpacing:e.letterSpacing,wordSpacing:e.wordSpacing,fontSize:e.fontSizeLineHeight.fontSize,lineHeight:e.fontSizeLineHeight.lineHeight,textAppearance:e.textAppearance,color:e.color}),Ql=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{autoplay:r,align:s,speed:i,direction:c,pauseOnHover:p,gap:g,cardWidth:u,corners:F,stroke:S,strokeColor:y,bgColor:d,padding:m,logoMarginTop:w,logoWidth:v,logoHeight:b,textMinHeight:L,captionMinHeight:G,captionMarginTop:N}=e,T=r==="on",x=T&&!o,R=Math.max(0,Jl(i))*Kl,C=a=>_.scalingValue(a,n??!1),O=A.useRef(null),W=A.useRef(null),V=A.useRef(null),[H,Y]=A.useState(0),[D,f]=A.useState(0),M=A.useRef(0),E=A.useRef(!1),I=A.useRef(null),$=x&&p==="on",k=A.useMemo(()=>typeof c=="boolean"?c?"right":"left":String(c??"").trim().toLowerCase()==="right"?"right":"left",[c]),J=A.useRef(k),ae=a=>{var fe;const h=(fe=e==null?void 0:e.styles)==null?void 0:fe[a];if(h)return h;const z=a==="text"?"text":"caption",j=e==null?void 0:e[`${z}FontFamily`],B=e==null?void 0:e[`${z}FontSettings`],X=e==null?void 0:e[`${z}LetterSpacing`],K=e==null?void 0:e[`${z}WordSpacing`],ee=e==null?void 0:e[`${z}TextAlign`],ne=e==null?void 0:e[`${z}TextAppearance`],le=(e==null?void 0:e[`${z}Color`])??(a==="text"?e==null?void 0:e.textColor:void 0)??(a==="caption"?e==null?void 0:e.captionColor:void 0),se=e==null?void 0:e[`${z}FontSize`],Se=e==null?void 0:e[`${z}LineHeight`];return typeof j=="string"||!!B||typeof X=="number"||typeof K=="number"||typeof ee=="string"||!!ne||typeof le=="string"||typeof se=="number"||typeof Se=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof j=="string"?j:"Arial",fontWeight:typeof(B==null?void 0:B.fontWeight)=="number"?B.fontWeight:400,fontStyle:typeof(B==null?void 0:B.fontStyle)=="string"?B.fontStyle:"normal"},letterSpacing:typeof X=="number"?X:0,wordSpacing:typeof K=="number"?K:0,textAlign:ee==="left"||ee==="center"||ee==="right"?ee:"left",fontSizeLineHeight:{fontSize:typeof se=="number"?se:.01,lineHeight:typeof Se=="number"?Se:.01},textAppearance:{textTransform:(ne==null?void 0:ne.textTransform)??"none",textDecoration:(ne==null?void 0:ne.textDecoration)??"none",fontVariant:(ne==null?void 0:ne.fontVariant)??"normal"},color:typeof le=="string"?le:"#000000"}:void 0},te=ae("text"),ie=ae("caption"),P=A.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:D<=0||H<=0?2:Math.max(2,Math.ceil(H/D)+1),[T,t==null?void 0:t.length,D,H]);A.useLayoutEffect(()=>{if(!T)return;const a=O.current,h=V.current;if(!a||!h)return;let z=0;const j=()=>{Y(a.getBoundingClientRect().width),f(h.getBoundingClientRect().width)},B=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(j)};B();const X=new ResizeObserver(B);return X.observe(a),X.observe(h),()=>{cancelAnimationFrame(z),X.disconnect()}},[T,t==null?void 0:t.length]),A.useLayoutEffect(()=>{const a=W.current;if(!T||!a||!x)return;if(D<=0||R<=0){a.style.transform="translate3d(0, 0, 0)";return}J.current!==k&&(M.current=1-M.current,J.current=k);const h=D/R*1e3,z=k==="left"?-D:0,j=k==="left"?0:-D,B=a.animate([{transform:`translate3d(${z}px, 0, 0)`},{transform:`translate3d(${j}px, 0, 0)`}],{duration:h,iterations:1/0,easing:"linear"});return B.currentTime=M.current*h,E.current&&B.pause(),I.current=B,()=>{const X=typeof B.currentTime=="number"?B.currentTime:0;M.current=h>0?X/h%1:0,B.cancel(),I.current===B&&(I.current=null)}},[T,x,D,R,k]);const Q=()=>{var a;$&&(E.current=!0,(a=I.current)==null||a.pause())},de=()=>{var a;$&&(E.current=!1,(a=I.current)==null||a.play())},ce=A.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),ge=A.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),he=(a,h,z,j)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ce,width:"100%"},children:[l.jsx("div",{"data-controls":j==null?void 0:j.controlsName,"data-controls-axis":"y",className:Be.control,style:{width:"100%",height:C((j==null?void 0:j.marginTop)??0)}}),l.jsx("div",{style:{...Je(Zl(a),n),textAlign:ge,pointerEvents:"auto",...j!=null&&j.minHeight?{minHeight:C(j.minHeight)}:{}},children:l.jsx(Pt,{content:h})})]},z),_e=(a,h)=>{var z,j,B;return l.jsxs("div",{style:{padding:`${C(m.top)} ${C(m.right)} ${C(m.bottom)} ${C(m.left)}`,width:C(u+S*2),height:"100%",borderRadius:C(F),border:`${C(S)} solid ${y}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:Be.cover,style:{background:d,height:"100%"}}),l.jsxs("div",{className:Be.elementsOverlay,style:{display:"flex",flexDirection:"column",pointerEvents:"none",alignItems:ce,textAlign:ge},children:[te&&a.text&&he(te,a.text,"text",{minHeight:L}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ce,width:"100%"},children:[l.jsx("div",{"data-controls":"logoMarginTop",className:Be.control,style:{width:"100%",height:C(w)}}),l.jsx("div",{style:{width:C(v),height:C(b)},children:l.jsx("img",{src:(z=a.logo)==null?void 0:z.url,alt:(j=a.logo)==null?void 0:j.name,style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((B=a.logo)==null?void 0:B.objectFit)||"cover"}})})]},"logo"),ie&&a.caption&&he(ie,a.caption,"caption",{controlsName:"captionMarginTop",marginTop:N,minHeight:G})]})]},h)},U=(a,h,z)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%"},children:[_e(a,`card-${h}`),n&&!z&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(g)})`,width:C(g),height:"100%",pointerEvents:"auto",zIndex:2}})]},h);return T&&(t!=null&&t.length)&&t.length>0?l.jsx("div",{ref:O,className:ue(Be.wrapper,Be.marqueeWrapper),"aria-label":"Testimonials",children:l.jsx("div",{ref:W,className:Be.marqueeTrack,onMouseEnter:Q,onMouseLeave:de,children:Array.from({length:P},(a,h)=>l.jsx("div",{ref:h===0?V:void 0,className:Be.marqueeSet,style:{gap:C(g),paddingRight:C(g)},"aria-hidden":h>0,children:t==null?void 0:t.map((z,j)=>U(z,`${h}-${j}`,j===((t==null?void 0:t.length)??0)-1))},`set-${h}`))})}):l.jsx("div",{className:Be.wrapper,children:l.jsx("div",{style:{display:"flex",flexDirection:"row",gap:C(g),justifyContent:"center",overflowX:"auto"},"aria-label":"Testimonials",children:t==null?void 0:t.map((a,h)=>U(a,h,h===((t==null?void 0:t.length)??0)-1))})})},es=`import { useLayoutEffect, useMemo, useRef, useState } from 'react';
1506
+ `,Hl="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Vl=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],$n={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Nl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Ol={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$n.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...$n.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...$n.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Vl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Hl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Nl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},jl={element:Ml,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Ol,sourceCode:zl},Bl="TestimonialsGrid-module__marqueeWrapper___VC616",Dl="TestimonialsGrid-module__marqueeTrack___U0OTH",Ul="TestimonialsGrid-module__marqueeSet___L7ZdX",ql="TestimonialsGrid-module__wrapper___-JQKm",Gl="TestimonialsGrid-module__cover___3-r73",Yl="TestimonialsGrid-module__elementsOverlay___sSbJp",Xl="TestimonialsGrid-module__control___pD3e4",Ue={marqueeWrapper:Bl,marqueeTrack:Dl,marqueeSet:Ul,wrapper:ql,cover:Gl,elementsOverlay:Yl,control:Xl},Kl=30,Jl=e=>{if(typeof e=="number")return e;const t=parseFloat(String(e??""));return Number.isFinite(t)?t:0},Zl=e=>({fontSettings:{...e.fontSettings},letterSpacing:e.letterSpacing,wordSpacing:e.wordSpacing,fontSize:e.fontSizeLineHeight.fontSize,lineHeight:e.fontSizeLineHeight.lineHeight,textAppearance:e.textAppearance,color:e.color}),Ql=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{autoplay:r,align:s,speed:i,direction:c,pauseOnHover:p,gap:g,cardWidth:u,corners:F,stroke:S,strokeColor:y,bgColor:d,padding:m,logoMarginTop:w,logoWidth:v,logoHeight:b,textMinHeight:L,captionMinHeight:G,captionMarginTop:N}=e,T=r==="on",x=T&&!o,R=Math.max(0,Jl(i))*Kl,C=a=>_.scalingValue(a,n??!1),O=A.useRef(null),W=A.useRef(null),V=A.useRef(null),[H,Y]=A.useState(0),[D,f]=A.useState(0),M=A.useRef(0),E=A.useRef(!1),I=A.useRef(null),$=x&&p==="on",k=A.useMemo(()=>typeof c=="boolean"?c?"right":"left":String(c??"").trim().toLowerCase()==="right"?"right":"left",[c]),J=A.useRef(k),ae=a=>{var he;const h=(he=e==null?void 0:e.styles)==null?void 0:he[a];if(h)return h;const z=a==="text"?"text":"caption",j=e==null?void 0:e[`${z}FontFamily`],B=e==null?void 0:e[`${z}FontSettings`],X=e==null?void 0:e[`${z}LetterSpacing`],K=e==null?void 0:e[`${z}WordSpacing`],te=e==null?void 0:e[`${z}TextAlign`],oe=e==null?void 0:e[`${z}TextAppearance`],le=(e==null?void 0:e[`${z}Color`])??(a==="text"?e==null?void 0:e.textColor:void 0)??(a==="caption"?e==null?void 0:e.captionColor:void 0),ce=e==null?void 0:e[`${z}FontSize`],Se=e==null?void 0:e[`${z}LineHeight`];return typeof j=="string"||!!B||typeof X=="number"||typeof K=="number"||typeof te=="string"||!!oe||typeof le=="string"||typeof ce=="number"||typeof Se=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof j=="string"?j:"Arial",fontWeight:typeof(B==null?void 0:B.fontWeight)=="number"?B.fontWeight:400,fontStyle:typeof(B==null?void 0:B.fontStyle)=="string"?B.fontStyle:"normal"},letterSpacing:typeof X=="number"?X:0,wordSpacing:typeof K=="number"?K:0,textAlign:te==="left"||te==="center"||te==="right"?te:"left",fontSizeLineHeight:{fontSize:typeof ce=="number"?ce:.01,lineHeight:typeof Se=="number"?Se:.01},textAppearance:{textTransform:(oe==null?void 0:oe.textTransform)??"none",textDecoration:(oe==null?void 0:oe.textDecoration)??"none",fontVariant:(oe==null?void 0:oe.fontVariant)??"normal"},color:typeof le=="string"?le:"#000000"}:void 0},ne=ae("text"),ie=ae("caption"),P=A.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:D<=0||H<=0?2:Math.max(2,Math.ceil(H/D)+1),[T,t==null?void 0:t.length,D,H]);A.useLayoutEffect(()=>{if(!T)return;const a=O.current,h=V.current;if(!a||!h)return;let z=0;const j=()=>{Y(a.getBoundingClientRect().width),f(h.getBoundingClientRect().width)},B=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(j)};B();const X=new ResizeObserver(B);return X.observe(a),X.observe(h),()=>{cancelAnimationFrame(z),X.disconnect()}},[T,t==null?void 0:t.length]),A.useLayoutEffect(()=>{const a=W.current;if(!T||!a||!x)return;if(D<=0||R<=0){a.style.transform="translate3d(0, 0, 0)";return}J.current!==k&&(M.current=1-M.current,J.current=k);const h=D/R*1e3,z=k==="left"?-D:0,j=k==="left"?0:-D,B=a.animate([{transform:`translate3d(${z}px, 0, 0)`},{transform:`translate3d(${j}px, 0, 0)`}],{duration:h,iterations:1/0,easing:"linear"});return B.currentTime=M.current*h,E.current&&B.pause(),I.current=B,()=>{const X=typeof B.currentTime=="number"?B.currentTime:0;M.current=h>0?X/h%1:0,B.cancel(),I.current===B&&(I.current=null)}},[T,x,D,R,k]);const ee=()=>{var a;$&&(E.current=!0,(a=I.current)==null||a.pause())},de=()=>{var a;$&&(E.current=!1,(a=I.current)==null||a.play())},se=A.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),ge=A.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),ye=(a,h,z,j)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[l.jsx("div",{"data-controls":j==null?void 0:j.controlsName,"data-controls-axis":"y",className:Ue.control,style:{width:"100%",height:C((j==null?void 0:j.marginTop)??0)}}),l.jsx("div",{style:{...Qe(Zl(a),n),textAlign:ge,pointerEvents:"auto",...j!=null&&j.minHeight?{minHeight:C(j.minHeight)}:{}},children:l.jsx(zt,{content:h})})]},z),_e=(a,h)=>{var z,j,B;return l.jsxs("div",{style:{padding:`${C(m.top)} ${C(m.right)} ${C(m.bottom)} ${C(m.left)}`,width:C(u+S*2),height:"100%",borderRadius:C(F),border:`${C(S)} solid ${y}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:Ue.cover,style:{background:d,height:"100%"}}),l.jsxs("div",{className:Ue.elementsOverlay,style:{display:"flex",flexDirection:"column",pointerEvents:"none",alignItems:se,textAlign:ge},children:[ne&&a.text&&ye(ne,a.text,"text",{minHeight:L}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[l.jsx("div",{"data-controls":"logoMarginTop",className:Ue.control,style:{width:"100%",height:C(w)}}),l.jsx("div",{style:{width:C(v),height:C(b)},children:l.jsx("img",{src:(z=a.logo)==null?void 0:z.url,alt:(j=a.logo)==null?void 0:j.name,style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((B=a.logo)==null?void 0:B.objectFit)||"cover"}})})]},"logo"),ie&&a.caption&&ye(ie,a.caption,"caption",{controlsName:"captionMarginTop",marginTop:N,minHeight:G})]})]},h)},U=(a,h,z)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%"},children:[_e(a,`card-${h}`),n&&!z&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(g)})`,width:C(g),height:"100%",pointerEvents:"auto",zIndex:2}})]},h);return T&&(t!=null&&t.length)&&t.length>0?l.jsx("div",{ref:O,className:ue(Ue.wrapper,Ue.marqueeWrapper),"aria-label":"Testimonials",children:l.jsx("div",{ref:W,className:Ue.marqueeTrack,onMouseEnter:ee,onMouseLeave:de,children:Array.from({length:P},(a,h)=>l.jsx("div",{ref:h===0?V:void 0,className:Ue.marqueeSet,style:{gap:C(g),paddingRight:C(g)},"aria-hidden":h>0,children:t==null?void 0:t.map((z,j)=>U(z,`${h}-${j}`,j===((t==null?void 0:t.length)??0)-1))},`set-${h}`))})}):l.jsx("div",{className:Ue.wrapper,children:l.jsx("div",{style:{display:"flex",flexDirection:"row",gap:C(g),justifyContent:"center",overflowX:"auto"},"aria-label":"Testimonials",children:t==null?void 0:t.map((a,h)=>U(a,h,h===((t==null?void 0:t.length)??0)-1))})})},es=`import { useLayoutEffect, useMemo, useRef, useState } from 'react';
1507
1507
  import cn from 'classnames';
1508
1508
  import classes from './TestimonialsGrid.module.scss';
1509
1509
  import { CommonComponentProps } from '../props';
@@ -1980,7 +1980,7 @@ type TestimonialsStyles = {
1980
1980
  text: CaptionStyles;
1981
1981
  caption: CaptionStyles;
1982
1982
  };
1983
- `,Ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ts={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},textMinHeight:{type:"number",scope:"layout",title:"Quote",min:0,max:300,display:{type:"range-control"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",min:0,max:300,display:{type:"range-control"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Caption",display:{type:"font-family-select"}},captionFontSettings:{...Ao.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Text",display:{type:"font-family-select"}},textFontSettings:{...Ao.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"off",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:3,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:0,logoWidth:.02,logoHeight:.02,textMinHeight:.01,captionMinHeight:.01,captionMarginTop:0,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01},d:{speed:5,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.01,logoWidth:.05,logoHeight:.05,textMinHeight:.07,captionMinHeight:.01,captionMarginTop:.01,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","textMinHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",items:["align","direction"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners","stroke"]},{type:"group",title:"",items:["padding"]}]},{type:"row",title:"Min Height",items:["textMinHeight","captionMinHeight"]},{type:"row",title:"Logo Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},"captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Logo",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},ns={element:Ql,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:750,height:300},schema:ts,sourceCode:es,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"}]}},os="TestimonialSingle-module__container___YKr4M",rs="TestimonialSingle-module__wrapper___hUgOd",is="TestimonialSingle-module__wrapperAutoplayOff___dgrHY",as="TestimonialSingle-module__elementsOverlay___2QyBb",ls="TestimonialSingle-module__fadeStack___Ye77N",ss="TestimonialSingle-module__fadeItemPrev___dQn4-",cs="TestimonialSingle-module__fadeItemCurrent___intAh",ps="TestimonialSingle-module__fadeIn___mnR5D",us="TestimonialSingle-module__fadeOut___WiXP1",ds="TestimonialSingle-module__icon___qH8ha",gs="TestimonialSingle-module__controls___0dIZ-",ms="TestimonialSingle-module__arrow___sVKUw",fs="TestimonialSingle-module__nextArrow___U31Ty",ys="TestimonialSingle-module__arrowInner___tep0d",hs="TestimonialSingle-module__arrowImg___8JHHQ",vs="TestimonialSingle-module__mirror___kWPu-",bs="TestimonialSingle-module__control___RwzDc",xe={container:os,wrapper:rs,wrapperAutoplayOff:is,elementsOverlay:as,fadeStack:ls,fadeItemPrev:ss,fadeItemCurrent:cs,fadeIn:ps,fadeOut:us,icon:ds,controls:gs,arrow:ms,nextArrow:fs,arrowInner:ys,arrowImg:hs,mirror:vs,control:bs},xs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const r=t||[],{autoplay:s,delay:i,align:c,width:p,imageMarginTop:g,textMarginTop:u,captionMarginTop:F,imageWidth:S,imageHeight:y,controlsWidth:d,controlsColor:m,controlsHoverColor:w}=e,v=(()=>{const a=s;if(typeof a=="boolean")return a;if(typeof a=="string"){const h=a.trim().toLowerCase();return h==="on"||h==="true"}return!1})(),b=v&&!o,[L,G]=A.useState(0),[N,T]=A.useState(null),[x,R]=A.useState(!1),C=A.useRef(null),O=A.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=A.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);A.useEffect(()=>{G(0),T(null),R(!1)},[r.length]);const V=r[L],H=N===null?null:r[N],Y=a=>{var fe;const h=(fe=e==null?void 0:e.styles)==null?void 0:fe[a];if(h)return h;const z=a==="text"?"text":"caption",j=e==null?void 0:e[`${z}FontFamily`],B=e==null?void 0:e[`${z}FontSettings`],X=e==null?void 0:e[`${z}LetterSpacing`],K=e==null?void 0:e[`${z}WordSpacing`],ee=e==null?void 0:e[`${z}TextAlign`],ne=e==null?void 0:e[`${z}TextAppearance`],le=e==null?void 0:e[`${z}Color`],se=e==null?void 0:e[`${z}FontSize`],Se=e==null?void 0:e[`${z}LineHeight`];return typeof j=="string"||!!B||typeof X=="number"||typeof K=="number"||typeof ee=="string"||!!ne||typeof le=="string"||typeof se=="number"||typeof Se=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof j=="string"?j:"Arial",fontWeight:typeof(B==null?void 0:B.fontWeight)=="number"?B.fontWeight:400,fontStyle:typeof(B==null?void 0:B.fontStyle)=="string"?B.fontStyle:"normal"},letterSpacing:typeof X=="number"?X:0,wordSpacing:typeof K=="number"?K:0,textAlign:ee==="left"||ee==="center"||ee==="right"?ee:"left",fontSizeLineHeight:{fontSize:typeof se=="number"?se:.01,lineHeight:typeof Se=="number"?Se:.01},textAppearance:{textTransform:(ne==null?void 0:ne.textTransform)??"none",textDecoration:(ne==null?void 0:ne.textDecoration)??"none",fontVariant:(ne==null?void 0:ne.fontVariant)??"normal"},color:typeof le=="string"?le:"#000000"}:void 0},D=Y("text"),f=Y("caption"),M=a=>_.scalingValue(a,n??!1),E=r.length>1&&(!!D||!!f),I=A.useRef(null),[$,k]=A.useState(0),[J,ae]=A.useState(0),te=r.length>1,ie=A.useCallback((a,h)=>!te||h===a?a:(C.current&&window.clearTimeout(C.current),T(a),R(!0),C.current=window.setTimeout(()=>{T(null),R(!1),C.current=null},300),h),[te]);A.useCallback(a=>{G(h=>ie(h,a))},[ie]);const P=A.useCallback(()=>{te&&G(a=>ie(a,(a-1+r.length)%r.length))},[te,ie,r.length]),Q=A.useCallback(()=>{te&&G(a=>ie(a,(a+1)%r.length))},[te,ie,r.length]);A.useEffect(()=>{if(!b||!te)return;const a=window.setInterval(()=>{G(h=>ie(h,(h+1)%r.length))},i);return()=>{window.clearInterval(a)}},[b,te,ie,r.length,i]),A.useEffect(()=>()=>{C.current&&window.clearTimeout(C.current)},[]);const de=e.controls??{mode:"Off",icon:null},ce=de.mode==="On"?de.icon??null:null,ge=A.useMemo(()=>M(.01),[n]),he=A.useMemo(()=>_.scalingValue(d??.02,n??!1),[d,n]),_e=A.useCallback((a,h)=>{var ee,ne,le;const z=h==null?void 0:h.textMinHeightPx,j=h==null?void 0:h.captionMinHeightPx,B=h==null?void 0:h.dataMeasureAttrs;let X=null;if(D){const{fontSettings:se,letterSpacing:Se,wordSpacing:oe,fontSizeLineHeight:pe,textAppearance:fe,color:Ie}=D;X=l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"textMarginTop",className:xe.control,style:{height:_.scalingValue(u??0,n??!1),width:"100%"}}),l.jsx("div",{...B?{"data-testimonial-measure":"text"}:{},style:{fontFamily:se.fontFamily,fontWeight:se.fontWeight,fontStyle:se.fontStyle,...typeof z=="number"&&z>0?{minHeight:z}:{},letterSpacing:_.scalingValue(Se,n),wordSpacing:_.scalingValue(oe,n),textAlign:W,fontSize:_.scalingValue(pe.fontSize,n),lineHeight:_.scalingValue(pe.lineHeight,n),textTransform:fe.textTransform??"none",textDecoration:fe.textDecoration??"none",fontVariant:fe.fontVariant??"normal",color:Ie,pointerEvents:"auto"},children:l.jsx(Pt,{content:a.text??[]})})]},"text")}let K=null;if(f){const{fontSettings:se,letterSpacing:Se,wordSpacing:oe,fontSizeLineHeight:pe,textAppearance:fe,color:Ie}=f;K=l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:xe.control,style:{height:_.scalingValue(F??0,n??!1),width:"100%"}}),l.jsx("div",{...B?{"data-testimonial-measure":"caption"}:{},style:{fontFamily:se.fontFamily,fontWeight:se.fontWeight,fontStyle:se.fontStyle,...typeof j=="number"&&j>0?{minHeight:j}:{},letterSpacing:_.scalingValue(Se,n),wordSpacing:_.scalingValue(oe,n),textAlign:W,fontSize:_.scalingValue(pe.fontSize,n),lineHeight:_.scalingValue(pe.lineHeight,n),textTransform:fe.textTransform??"none",textDecoration:fe.textDecoration??"none",fontVariant:fe.fontVariant??"normal",color:Ie,pointerEvents:"auto"},children:l.jsx(Pt,{content:a.caption})})]},"caption")}return l.jsxs(l.Fragment,{children:[X,l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"imageMarginTop",className:xe.control,style:{height:_.scalingValue(g??0,n??!1),width:"100%"}}),l.jsx("img",{src:(ee=a.image)==null?void 0:ee.url,alt:(ne=a.image)==null?void 0:ne.name,className:xe.icon,style:{pointerEvents:"auto",objectFit:((le=a.image)==null?void 0:le.objectFit)||"cover",width:_.scalingValue(S??0,n??!1),height:_.scalingValue(y??0,n??!1)}})]},"image"),K]})},[F,f,g,S,y,n,O,W,u,D]);if(A.useLayoutEffect(()=>{if(!E){k(0),ae(0);return}const a=I.current;if(!a)return;const h=()=>{const j=Array.from(a.querySelectorAll('[data-testimonial-measure="text"]')).reduce((X,K)=>Math.max(X,K.getBoundingClientRect().height),0),B=Array.from(a.querySelectorAll('[data-testimonial-measure="caption"]')).reduce((X,K)=>Math.max(X,K.getBoundingClientRect().height),0);k(j),ae(B)};h();const z=new ResizeObserver(h);return z.observe(a),()=>{z.disconnect()}},[E,r,_e]),!V)return l.jsx(l.Fragment,{});const U=E?{textMinHeightPx:$,captionMinHeightPx:J}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:xe.container,style:{flexDirection:"column",alignItems:"center"},children:[l.jsxs("div",{className:ue(xe.elementsOverlay,xe.wrapper,!v&&xe.wrapperAutoplayOff),style:{width:_.scalingValue(p??0,n??!1),display:"flex",flexDirection:"column",alignItems:O,inset:0,pointerEvents:"none",height:"100%",boxSizing:"border-box",position:"relative"},children:[E&&l.jsx("div",{ref:I,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:r.map((a,h)=>l.jsx("div",{style:{width:"100%"},children:_e(a,{dataMeasureAttrs:!0})},h))}),l.jsxs("div",{className:xe.fadeStack,children:[H&&x&&l.jsx("div",{className:ue(xe.fadeItemPrev,xe.fadeOut),children:_e(H,U)}),l.jsx("div",{className:ue(xe.fadeItemCurrent,x?xe.fadeIn:void 0),children:_e(V,U)})]})]}),de.mode==="On"&&l.jsxs("div",{className:xe.controls,style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:ge,paddingRight:ge},children:[l.jsx("div",{className:xe.arrow,style:{pointerEvents:"auto",width:he,height:he,"--arrow-hover-color":w},children:l.jsx("button",{type:"button",className:xe.arrowInner,onClick:P,"aria-label":"Previous testimonial",style:{pointerEvents:"auto"},children:ce&&l.jsx(Ze,{url:ce,fill:m,hoverFill:w,className:ue(xe.arrowImg,xe.mirror)})})}),l.jsx("div",{className:ue(xe.arrow,xe.nextArrow),style:{pointerEvents:"auto",width:he,height:he,"--arrow-hover-color":w},children:l.jsx("button",{type:"button",className:xe.arrowInner,onClick:Q,"aria-label":"Next testimonial",style:{pointerEvents:"auto"},children:ce&&l.jsx(Ze,{url:ce,fill:m,hoverFill:w,className:xe.arrowImg})})})]})]})})},Ss=`import cn from 'classnames';
1983
+ `,Ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ts={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},textMinHeight:{type:"number",scope:"layout",title:"Quote",min:0,max:300,display:{type:"range-control"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",min:0,max:300,display:{type:"range-control"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Caption",display:{type:"font-family-select"}},captionFontSettings:{...Ao.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Text",display:{type:"font-family-select"}},textFontSettings:{...Ao.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"off",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:3,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:0,logoWidth:.02,logoHeight:.02,textMinHeight:.01,captionMinHeight:.01,captionMarginTop:0,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01},d:{speed:5,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.01,logoWidth:.05,logoHeight:.05,textMinHeight:.07,captionMinHeight:.01,captionMarginTop:.01,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","textMinHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",items:["align","direction"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners","stroke"]},{type:"group",title:"",items:["padding"]}]},{type:"row",title:"Min Height",items:["textMinHeight","captionMinHeight"]},{type:"row",title:"Logo Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},"captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Logo",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},ns={element:Ql,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:750,height:300},schema:ts,sourceCode:es,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"}]}},os="TestimonialSingle-module__container___YKr4M",rs="TestimonialSingle-module__wrapper___hUgOd",is="TestimonialSingle-module__wrapperAutoplayOff___dgrHY",as="TestimonialSingle-module__elementsOverlay___2QyBb",ls="TestimonialSingle-module__fadeStack___Ye77N",ss="TestimonialSingle-module__fadeItemPrev___dQn4-",cs="TestimonialSingle-module__fadeItemCurrent___intAh",ps="TestimonialSingle-module__fadeIn___mnR5D",us="TestimonialSingle-module__fadeOut___WiXP1",ds="TestimonialSingle-module__icon___qH8ha",gs="TestimonialSingle-module__controls___0dIZ-",ms="TestimonialSingle-module__arrow___sVKUw",fs="TestimonialSingle-module__nextArrow___U31Ty",ys="TestimonialSingle-module__arrowInner___tep0d",hs="TestimonialSingle-module__arrowImg___8JHHQ",vs="TestimonialSingle-module__mirror___kWPu-",bs="TestimonialSingle-module__control___RwzDc",xe={container:os,wrapper:rs,wrapperAutoplayOff:is,elementsOverlay:as,fadeStack:ls,fadeItemPrev:ss,fadeItemCurrent:cs,fadeIn:ps,fadeOut:us,icon:ds,controls:gs,arrow:ms,nextArrow:fs,arrowInner:ys,arrowImg:hs,mirror:vs,control:bs},xs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const r=t||[],{autoplay:s,delay:i,align:c,width:p,imageMarginTop:g,textMarginTop:u,captionMarginTop:F,imageWidth:S,imageHeight:y,controlsWidth:d,controlsColor:m,controlsHoverColor:w}=e,v=(()=>{const a=s;if(typeof a=="boolean")return a;if(typeof a=="string"){const h=a.trim().toLowerCase();return h==="on"||h==="true"}return!1})(),b=v&&!o,[L,G]=A.useState(0),[N,T]=A.useState(null),[x,R]=A.useState(!1),C=A.useRef(null),O=A.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=A.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);A.useEffect(()=>{G(0),T(null),R(!1)},[r.length]);const V=r[L],H=N===null?null:r[N],Y=a=>{var he;const h=(he=e==null?void 0:e.styles)==null?void 0:he[a];if(h)return h;const z=a==="text"?"text":"caption",j=e==null?void 0:e[`${z}FontFamily`],B=e==null?void 0:e[`${z}FontSettings`],X=e==null?void 0:e[`${z}LetterSpacing`],K=e==null?void 0:e[`${z}WordSpacing`],te=e==null?void 0:e[`${z}TextAlign`],oe=e==null?void 0:e[`${z}TextAppearance`],le=e==null?void 0:e[`${z}Color`],ce=e==null?void 0:e[`${z}FontSize`],Se=e==null?void 0:e[`${z}LineHeight`];return typeof j=="string"||!!B||typeof X=="number"||typeof K=="number"||typeof te=="string"||!!oe||typeof le=="string"||typeof ce=="number"||typeof Se=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof j=="string"?j:"Arial",fontWeight:typeof(B==null?void 0:B.fontWeight)=="number"?B.fontWeight:400,fontStyle:typeof(B==null?void 0:B.fontStyle)=="string"?B.fontStyle:"normal"},letterSpacing:typeof X=="number"?X:0,wordSpacing:typeof K=="number"?K:0,textAlign:te==="left"||te==="center"||te==="right"?te:"left",fontSizeLineHeight:{fontSize:typeof ce=="number"?ce:.01,lineHeight:typeof Se=="number"?Se:.01},textAppearance:{textTransform:(oe==null?void 0:oe.textTransform)??"none",textDecoration:(oe==null?void 0:oe.textDecoration)??"none",fontVariant:(oe==null?void 0:oe.fontVariant)??"normal"},color:typeof le=="string"?le:"#000000"}:void 0},D=Y("text"),f=Y("caption"),M=a=>_.scalingValue(a,n??!1),E=r.length>1&&(!!D||!!f),I=A.useRef(null),[$,k]=A.useState(0),[J,ae]=A.useState(0),ne=r.length>1,ie=A.useCallback((a,h)=>!ne||h===a?a:(C.current&&window.clearTimeout(C.current),T(a),R(!0),C.current=window.setTimeout(()=>{T(null),R(!1),C.current=null},300),h),[ne]);A.useCallback(a=>{G(h=>ie(h,a))},[ie]);const P=A.useCallback(()=>{ne&&G(a=>ie(a,(a-1+r.length)%r.length))},[ne,ie,r.length]),ee=A.useCallback(()=>{ne&&G(a=>ie(a,(a+1)%r.length))},[ne,ie,r.length]);A.useEffect(()=>{if(!b||!ne)return;const a=window.setInterval(()=>{G(h=>ie(h,(h+1)%r.length))},i);return()=>{window.clearInterval(a)}},[b,ne,ie,r.length,i]),A.useEffect(()=>()=>{C.current&&window.clearTimeout(C.current)},[]);const de=e.controls??{mode:"Off",icon:null},se=de.mode==="On"?de.icon??null:null,ge=A.useMemo(()=>M(.01),[n]),ye=A.useMemo(()=>_.scalingValue(d??.02,n??!1),[d,n]),_e=A.useCallback((a,h)=>{var te,oe,le,ce,Se;const z=h==null?void 0:h.textMinHeightPx,j=h==null?void 0:h.captionMinHeightPx,B=h==null?void 0:h.dataMeasureAttrs;let X=null;if(D){const{fontSettings:Q,letterSpacing:pe,wordSpacing:he,fontSizeLineHeight:Ae,textAppearance:ke,color:Oe}=D;X=l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"textMarginTop",className:xe.control,style:{height:_.scalingValue(u??0,n??!1),width:"100%"}}),l.jsx("div",{...B?{"data-testimonial-measure":"text"}:{},style:{fontFamily:Q.fontFamily,fontWeight:Q.fontWeight,fontStyle:Q.fontStyle,...typeof z=="number"&&z>0?{minHeight:z}:{},letterSpacing:_.scalingValue(pe,n),wordSpacing:_.scalingValue(he,n),textAlign:W,fontSize:_.scalingValue(Ae.fontSize,n),lineHeight:_.scalingValue(Ae.lineHeight,n),textTransform:ke.textTransform??"none",textDecoration:ke.textDecoration??"none",fontVariant:ke.fontVariant??"normal",color:Oe,pointerEvents:"auto"},children:l.jsx(zt,{content:a.text??[]})})]},"text")}let K=null;if(f){const{fontSettings:Q,letterSpacing:pe,wordSpacing:he,fontSizeLineHeight:Ae,textAppearance:ke,color:Oe}=f;K=l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:xe.control,style:{height:_.scalingValue(F??0,n??!1),width:"100%"}}),l.jsx("div",{...B?{"data-testimonial-measure":"caption"}:{},style:{fontFamily:Q.fontFamily,fontWeight:Q.fontWeight,fontStyle:Q.fontStyle,...typeof j=="number"&&j>0?{minHeight:j}:{},letterSpacing:_.scalingValue(pe,n),wordSpacing:_.scalingValue(he,n),textAlign:W,fontSize:_.scalingValue(Ae.fontSize,n),lineHeight:_.scalingValue(Ae.lineHeight,n),textTransform:ke.textTransform??"none",textDecoration:ke.textDecoration??"none",fontVariant:ke.fontVariant??"normal",color:Oe,pointerEvents:"auto"},children:l.jsx(zt,{content:a.caption})})]},"caption")}return l.jsxs(l.Fragment,{children:[X,l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:l.jsxs("div",{style:{width:_.scalingValue(S??0,n??!1),height:_.scalingValue(y??0,n??!1)},children:[((te=a.image)==null?void 0:te.url)&&l.jsx("div",{"data-controls":"imageMarginTop",className:xe.control,style:{height:_.scalingValue(g??0,n??!1),width:"100%"}}),((oe=a.image)==null?void 0:oe.url)&&l.jsx("img",{src:(le=a.image)==null?void 0:le.url,alt:(ce=a.image)==null?void 0:ce.name,className:xe.icon,style:{pointerEvents:"auto",objectFit:((Se=a.image)==null?void 0:Se.objectFit)||"cover",width:"100%",height:"100%"}})]})},"image"),K]})},[F,f,g,S,y,n,O,W,u,D]);if(A.useLayoutEffect(()=>{if(!E){k(0),ae(0);return}const a=I.current;if(!a)return;const h=()=>{const j=Array.from(a.querySelectorAll('[data-testimonial-measure="text"]')).reduce((X,K)=>Math.max(X,K.getBoundingClientRect().height),0),B=Array.from(a.querySelectorAll('[data-testimonial-measure="caption"]')).reduce((X,K)=>Math.max(X,K.getBoundingClientRect().height),0);k(j),ae(B)};h();const z=new ResizeObserver(h);return z.observe(a),()=>{z.disconnect()}},[E,r,_e]),!V)return l.jsx(l.Fragment,{});const U=E?{textMinHeightPx:$,captionMinHeightPx:J}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:xe.container,style:{flexDirection:"column",alignItems:"center"},children:[l.jsxs("div",{className:ue(xe.elementsOverlay,xe.wrapper,!v&&xe.wrapperAutoplayOff),style:{width:_.scalingValue(p??0,n??!1),display:"flex",flexDirection:"column",alignItems:O,inset:0,pointerEvents:"none",height:"100%",boxSizing:"border-box",position:"relative"},children:[E&&l.jsx("div",{ref:I,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:r.map((a,h)=>l.jsx("div",{style:{width:"100%"},children:_e(a,{dataMeasureAttrs:!0})},h))}),l.jsxs("div",{className:xe.fadeStack,children:[H&&x&&l.jsx("div",{className:ue(xe.fadeItemPrev,xe.fadeOut),children:_e(H,U)}),l.jsx("div",{className:ue(xe.fadeItemCurrent,x?xe.fadeIn:void 0),children:_e(V,U)})]})]}),de.mode==="On"&&l.jsxs("div",{className:xe.controls,style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:ge,paddingRight:ge},children:[l.jsx("div",{className:xe.arrow,style:{pointerEvents:"auto",width:ye,height:ye,"--arrow-hover-color":w},children:l.jsx("button",{type:"button",className:xe.arrowInner,onClick:P,"aria-label":"Previous testimonial",style:{pointerEvents:"auto"},children:se&&l.jsx(et,{url:se,fill:m,hoverFill:w,className:ue(xe.arrowImg,xe.mirror)})})}),l.jsx("div",{className:ue(xe.arrow,xe.nextArrow),style:{pointerEvents:"auto",width:ye,height:ye,"--arrow-hover-color":w},children:l.jsx("button",{type:"button",className:xe.arrowInner,onClick:ee,"aria-label":"Next testimonial",style:{pointerEvents:"auto"},children:se&&l.jsx(et,{url:se,fill:m,hoverFill:w,className:xe.arrowImg})})})]})]})})},Ss=`import cn from 'classnames';
1984
1984
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1985
1985
  import classes from './TestimonialSingle.module.scss';
1986
1986
  import { CommonComponentProps } from '../props';
@@ -2299,22 +2299,25 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2299
2299
  width: '100%',
2300
2300
  }}
2301
2301
  >
2302
- <div
2303
- data-controls="imageMarginTop"
2304
- className={classes.control}
2305
- style={{ height: scalingValue(imageMarginTop ?? 0, isEditor ?? false), width: '100%' }}
2306
- />
2307
- <img
2308
- src={item.image?.url}
2309
- alt={item.image?.name}
2310
- className={classes.icon}
2311
- style={{
2312
- pointerEvents: 'auto',
2313
- objectFit: item.image?.objectFit || 'cover',
2314
- width: scalingValue(imageWidth ?? 0, isEditor ?? false),
2315
- height: scalingValue(imageHeight ?? 0, isEditor ?? false),
2316
- }}
2317
- />
2302
+
2303
+ <div style={{ width: scalingValue(imageWidth ?? 0, isEditor ?? false), height: scalingValue(imageHeight ?? 0, isEditor ?? false)}}>
2304
+ {item.image?.url && <div
2305
+ data-controls="imageMarginTop"
2306
+ className={classes.control}
2307
+ style={{ height: scalingValue(imageMarginTop ?? 0, isEditor ?? false), width: '100%' }}
2308
+ />}
2309
+ {item.image?.url && <img
2310
+ src={item.image?.url}
2311
+ alt={item.image?.name}
2312
+ className={classes.icon}
2313
+ style={{
2314
+ pointerEvents: 'auto',
2315
+ objectFit: item.image?.objectFit || 'cover',
2316
+ width: '100%',
2317
+ height: '100%',
2318
+ }}
2319
+ />}
2320
+ </div>
2318
2321
  </div>
2319
2322
  {captionSection}
2320
2323
  </>