@cntrl-site/components 1.0.6 → 1.0.7-alpha.0

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.
package/dist/index.js CHANGED
@@ -1,145 +1,145 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),j=require("react"),de=require("classnames"),I=require("./useScopedStyles-DpVdqfXj.js"),mr=require("react-dom");function fr(e){return e.type==="object"&&e.version===1}const hr="ControlSlider-module__wrapper___sHEkd",yr="ControlSlider-module__hoverArrow___A-dOH",vr="ControlSlider-module__sliderItem___QQSkR",br="ControlSlider-module__sliderImage___9hRl-",Sr="ControlSlider-module__arrow___05ghY",xr="ControlSlider-module__arrowVertical___tBfVN",Cr="ControlSlider-module__nextArrow___-30Yc",$r="ControlSlider-module__arrowInner___aEra3",_r="ControlSlider-module__arrowIcon___S4ztF",wr="ControlSlider-module__arrowImg___2dwJW",Tr="ControlSlider-module__mirror___brd6U",Er="ControlSlider-module__pagination___bicLF",Lr="ControlSlider-module__paginationInner___bT-P-",Ar="ControlSlider-module__paginationVertical___zYqKw",Ir="ControlSlider-module__paginationItem___nTRbk",kr="ControlSlider-module__dot___p1Qun",Fr="ControlSlider-module__activeDot___LHFaj",Rr="ControlSlider-module__paginationInsideBottom___R3FWn",Br="ControlSlider-module__paginationInsideTop___V-qb-",Vr="ControlSlider-module__paginationOutsideBottom___14w8D",Pr="ControlSlider-module__paginationOutsideTop___SCLqB",Or="ControlSlider-module__paginationInsideLeft___yOBRZ",Wr="ControlSlider-module__paginationInsideRight___Rtt3o",Nr="ControlSlider-module__paginationOutsideLeft___lahaw",zr="ControlSlider-module__paginationOutsideRight___EtuQa",jr="ControlSlider-module__imgWrapper___UjEgB",Mr="ControlSlider-module__captionBlock___dJ6-j",Hr="ControlSlider-module__captionTextWrapper___HFlpf",Dr="ControlSlider-module__captionText___uGBVc",Ur="ControlSlider-module__active___WZK4G",Gr="ControlSlider-module__withPointerEvents___t-18M",Yr="ControlSlider-module__topLeftAlignment___zjnGM",qr="ControlSlider-module__topCenterAlignment___gD1xW",Xr="ControlSlider-module__topRightAlignment___NMapS",Kr="ControlSlider-module__middleLeftAlignment___OnUrY",Jr="ControlSlider-module__middleCenterAlignment___Tdkl0",Zr="ControlSlider-module__middleRightAlignment___wEbfX",Qr="ControlSlider-module__bottomLeftAlignment___cTP2-",ei="ControlSlider-module__bottomCenterAlignment___c54fB",ti="ControlSlider-module__bottomRightAlignment___kEwrz",ni="ControlSlider-module__clickOverlay___DZA28",oi="ControlSlider-module__contain___pLyq7",ri="ControlSlider-module__cover___KdDat",G={wrapper:hr,hoverArrow:yr,sliderItem:vr,sliderImage:br,arrow:Sr,arrowVertical:xr,nextArrow:Cr,arrowInner:$r,arrowIcon:_r,arrowImg:wr,mirror:Tr,pagination:Er,paginationInner:Lr,paginationVertical:Ar,paginationItem:Ir,dot:kr,activeDot:Fr,paginationInsideBottom:Rr,paginationInsideTop:Br,paginationOutsideBottom:Vr,paginationOutsideTop:Pr,paginationInsideLeft:Or,paginationInsideRight:Wr,paginationOutsideLeft:Nr,paginationOutsideRight:zr,imgWrapper:jr,captionBlock:Mr,captionTextWrapper:Hr,captionText:Dr,active:Ur,withPointerEvents:Gr,topLeftAlignment:Yr,topCenterAlignment:qr,topRightAlignment:Xr,middleLeftAlignment:Kr,middleCenterAlignment:Jr,middleRightAlignment:Zr,bottomLeftAlignment:Qr,bottomCenterAlignment:ei,bottomRightAlignment:ti,clickOverlay:ni,contain:oi,cover:ri};function ii(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 ai(e,t,n){return t&&ii(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var to="(prefers-reduced-motion: reduce)",ut=1,li=2,ft=3,vt=4,Rt=5,qt=6,Zt=7,si={CREATED:ut,MOUNTED:li,IDLE:ft,MOVING:vt,SCROLLING:Rt,DRAGGING:qt,DESTROYED:Zt};function He(e){e.length=0}function Ke(e,t,n){return Array.prototype.slice.call(e,t,n)}function ue(e){return e.bind.apply(e,[null].concat(Ke(arguments,1)))}var $o=setTimeout,$n=function(){};function no(e){return requestAnimationFrame(e)}function on(e,t){return typeof t===e}function Tt(e){return!Rn(e)&&on("object",e)}var Fn=Array.isArray,_o=ue(on,"function"),qe=ue(on,"string"),Bt=ue(on,"undefined");function Rn(e){return e===null}function wo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Vt(e){return Fn(e)?e:[e]}function Te(e,t){Vt(e).forEach(t)}function Bn(e,t){return e.indexOf(t)>-1}function Xt(e,t){return e.push.apply(e,Vt(t)),e}function ze(e,t,n){e&&Te(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Fe(e,t){ze(e,qe(t)?t.split(" "):t,!0)}function Pt(e,t){Te(t,e.appendChild.bind(e))}function Vn(e,t){Te(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Et(e,t){return wo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function To(e,t){var n=e?Ke(e.children):[];return t?n.filter(function(o){return Et(o,t)}):n}function Ot(e,t){return t?To(e,t)[0]:e.firstElementChild}var Lt=Object.keys;function nt(e,t,n){return e&&(n?Lt(e).reverse():Lt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function At(e){return Ke(arguments,1).forEach(function(t){nt(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Ke(arguments,1).forEach(function(t){nt(t,function(n,o){Fn(n)?e[o]=n.slice():Tt(n)?e[o]=Ye({},Tt(e[o])?e[o]:{},n):e[o]=n})}),e}function oo(e,t){Te(t||Lt(e),function(n){delete e[n]})}function Re(e,t){Te(e,function(n){Te(t,function(o){n&&n.removeAttribute(o)})})}function Z(e,t,n){Tt(t)?nt(t,function(o,r){Z(e,r,o)}):Te(e,function(o){Rn(n)||n===""?Re(o,t):o.setAttribute(t,String(n))})}function pt(e,t,n){var o=document.createElement(e);return t&&(qe(t)?Fe(o,t):Z(o,t)),n&&Pt(n,o),o}function Le(e,t,n){if(Bt(n))return getComputedStyle(e)[t];Rn(n)||(e.style[t]=""+n)}function It(e,t){Le(e,"display",t)}function Eo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Ae(e,t){return e.getAttribute(t)}function ro(e,t){return e&&e.classList.contains(t)}function _e(e){return e.getBoundingClientRect()}function ot(e){Te(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Lo(e){return Ot(new DOMParser().parseFromString(e,"text/html").body)}function Ne(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Ao(e,t){return e&&e.querySelector(t)}function Pn(e,t){return t?Ke(e.querySelectorAll(t)):[]}function je(e,t){ze(e,t,!1)}function _n(e){return e.timeStamp}function et(e){return qe(e)?e:e?e+"px":""}var Wt="splide",On="data-"+Wt;function _t(e,t){if(!e)throw new Error("["+Wt+"] "+(t||""))}var Xe=Math.min,Qt=Math.max,en=Math.floor,kt=Math.ceil,Ce=Math.abs;function Io(e,t,n){return Ce(e-t)<n}function Kt(e,t,n,o){var r=Xe(t,n),a=Qt(t,n);return o?r<e&&e<a:r<=e&&e<=a}function st(e,t,n){var o=Xe(t,n),r=Qt(t,n);return Xe(Qt(o,e),r)}function wn(e){return+(e>0)-+(e<0)}function Tn(e,t){return Te(t,function(n){e=e.replace("%s",""+n)}),e}function Wn(e){return e<10?"0"+e:""+e}var io={};function ci(e){return""+e+Wn(io[e]=(io[e]||0)+1)}function ko(){var e=[];function t(i,l,s,p){r(i,l,function(c,_,v){var g="addEventListener"in c,u=g?c.removeEventListener.bind(c,_,s,p):c.removeListener.bind(c,s);g?c.addEventListener(_,s,p):c.addListener(s),e.push([c,_,v,s,u])})}function n(i,l,s){r(i,l,function(p,c,_){e=e.filter(function(v){return v[0]===p&&v[1]===c&&v[2]===_&&(!s||v[3]===s)?(v[4](),!1):!0})})}function o(i,l,s){var p,c=!0;return typeof CustomEvent=="function"?p=new CustomEvent(l,{bubbles:c,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(l,c,!1,s)),i.dispatchEvent(p),p}function r(i,l,s){Te(i,function(p){p&&Te(l,function(c){c.split(" ").forEach(function(_){var v=_.split(".");s(p,v[0],v[1])})})})}function a(){e.forEach(function(i){i[4]()}),He(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var Je="mounted",En="ready",De="move",bt="moved",Nn="click",Fo="active",Ro="inactive",Bo="visible",Vo="hidden",ve="refresh",xe="updated",ht="resize",rn="resized",Po="drag",Oo="dragging",Wo="dragged",an="scroll",it="scrolled",ui="overflow",zn="destroy",No="arrows:mounted",zo="arrows:updated",jo="pagination:mounted",Mo="pagination:updated",jn="navigation:mounted",Mn="autoplay:play",Ho="autoplay:playing",Hn="autoplay:pause",Dn="lazyload:loaded",Do="sk",Uo="sh",tn="ei";function ge(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ko();function o(a,i){n.bind(t,Vt(a).join(" "),function(l){i.apply(i,Fn(l.detail)?l.detail:[])})}function r(a){n.dispatch(t,a,Ke(arguments,1))}return e&&e.event.on(zn,n.destroy),At(n,{bus:t,on:o,off:ue(n.unbind,t),emit:r})}function ln(e,t,n,o){var r=Date.now,a,i=0,l,s=!0,p=0;function c(){if(!s){if(i=e?Xe((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++p>=o))return v();l=no(c)}}function _(f){f||u(),a=r()-(f?i*e:0),s=!1,l=no(c)}function v(){s=!0}function g(){a=r(),i=0,n&&n(i)}function u(){l&&cancelAnimationFrame(l),i=0,l=0,s=!0}function d(f){e=f}function x(){return s}return{start:_,rewind:g,pause:v,cancel:u,set:d,isPaused:x}}function pi(e){var t=e;function n(r){t=r}function o(r){return Bn(Vt(r),t)}return{set:n,is:o}}function di(e,t){var n=ln(0,e,null,1);return function(){n.isPaused()&&n.start()}}function gi(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=ko(),l=[];function s(){var u=n.mediaQuery==="min";Lt(r).sort(function(d,x){return u?+d-+x:+x-+d}).forEach(function(d){c(r[d],"("+(u?"min":"max")+"-width:"+d+"px)")}),c(a,to),_()}function p(u){u&&i.destroy()}function c(u,d){var x=matchMedia(d);i.bind(x,"change",_),l.push([u,x])}function _(){var u=o.is(Zt),d=n.direction,x=l.reduce(function(f,h){return Ye(f,h[1].matches?h[0]:{})},{});oo(n),g(x),n.destroy?e.destroy(n.destroy==="completely"):u?(p(!0),e.mount()):d!==n.direction&&e.refresh()}function v(u){matchMedia(to).matches&&(u?Ye(n,a):oo(n,Lt(a)))}function g(u,d,x){Ye(n,u),d&&Ye(Object.getPrototypeOf(n),u),(x||!o.is(ut))&&e.emit(xe,n)}return{setup:s,destroy:p,reduce:v,set:g}}var sn="Arrow",cn=sn+"Left",un=sn+"Right",Go=sn+"Up",Yo=sn+"Down",ao="rtl",pn="ttb",yn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Go,un],ArrowRight:[Yo,cn]};function mi(e,t,n){function o(a,i,l){l=l||n.direction;var s=l===ao&&!i?1:l===pn?0:-1;return yn[a]&&yn[a][s]||a.replace(/width|left|right/i,function(p,c){var _=yn[p.toLowerCase()][s]||p;return c>0?_.charAt(0).toUpperCase()+_.slice(1):_})}function r(a){return a*(n.direction===ao?1:-1)}return{resolve:o,orient:r}}var Me="role",dt="tabindex",fi="disabled",Ie="aria-",Nt=Ie+"controls",qo=Ie+"current",lo=Ie+"selected",we=Ie+"label",Un=Ie+"labelledby",Xo=Ie+"hidden",Gn=Ie+"orientation",Ft=Ie+"roledescription",so=Ie+"live",co=Ie+"busy",uo=Ie+"atomic",Yn=[Me,dt,fi,Nt,qo,we,Un,Xo,Gn,Ft],Be=Wt+"__",Ze="is-",vn=Wt,po=Be+"track",hi=Be+"list",dn=Be+"slide",Ko=dn+"--clone",yi=dn+"__container",qn=Be+"arrows",gn=Be+"arrow",Jo=gn+"--prev",Zo=gn+"--next",mn=Be+"pagination",Qo=mn+"__page",vi=Be+"progress",bi=vi+"__bar",Si=Be+"toggle",xi=Be+"spinner",Ci=Be+"sr",$i=Ze+"initialized",rt=Ze+"active",er=Ze+"prev",tr=Ze+"next",Ln=Ze+"visible",An=Ze+"loading",nr=Ze+"focus-in",or=Ze+"overflow",_i=[rt,Ln,er,tr,An,nr,or],wi={slide:dn,clone:Ko,arrows:qn,arrow:gn,prev:Jo,next:Zo,pagination:mn,page:Qo,spinner:xi};function Ti(e,t){if(_o(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Et(n,t);)n=n.parentElement;return n}var Ei=5,go=200,rr="touchstart mousedown",bn="touchmove mousemove",Sn="touchend touchcancel mouseup click";function Li(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=e.root,l=n.i18n,s={},p=[],c=[],_=[],v,g,u;function d(){$(),M(),h()}function x(){r(ve,f),r(ve,d),r(xe,h),a(document,rr+" keydown",function(y){u=y.type==="keydown"},{capture:!0}),a(i,"focusin",function(){ze(i,nr,!!u)})}function f(y){var L=Yn.concat("style");He(p),je(i,c),je(v,_),Re([v,g],L),Re(i,y?L:["style",Ft])}function h(){je(i,c),je(v,_),c=w(vn),_=w(po),Fe(i,c),Fe(v,_),Z(i,we,n.label),Z(i,Un,n.labelledby)}function $(){v=O("."+po),g=Ot(v,"."+hi),_t(v&&g,"A track/list element is missing."),Xt(p,To(g,"."+dn+":not(."+Ko+")")),nt({arrows:qn,pagination:mn,prev:Jo,next:Zo,bar:bi,toggle:Si},function(y,L){s[L]=O("."+y)}),At(s,{root:i,track:v,list:g,slides:p})}function M(){var y=i.id||ci(Wt),L=n.role;i.id=y,v.id=v.id||y+"-track",g.id=g.id||y+"-list",!Ae(i,Me)&&i.tagName!=="SECTION"&&L&&Z(i,Me,L),Z(i,Ft,l.carousel),Z(g,Me,"presentation")}function O(y){var L=Ao(i,y);return L&&Ti(L,"."+vn)===i?L:void 0}function w(y){return[y+"--"+n.type,y+"--"+n.direction,n.drag&&y+"--draggable",n.isNavigation&&y+"--nav",y===vn&&rt]}return At(s,{setup:d,mount:x,destroy:f})}var yt="slide",St="loop",zt="fade";function Ai(e,t,n,o){var r=ge(e),a=r.on,i=r.emit,l=r.bind,s=e.Components,p=e.root,c=e.options,_=c.isNavigation,v=c.updateOnMove,g=c.i18n,u=c.pagination,d=c.slideFocus,x=s.Direction.resolve,f=Ae(o,"style"),h=Ae(o,we),$=n>-1,M=Ot(o,"."+yi),O;function w(){$||(o.id=p.id+"-slide"+Wn(t+1),Z(o,Me,u?"tabpanel":"group"),Z(o,Ft,g.slide),Z(o,we,h||Tn(g.slideLabel,[t+1,e.length]))),y()}function y(){l(o,"click",ue(i,Nn,E)),l(o,"keydown",ue(i,Do,E)),a([bt,Uo,it],R),a(jn,B),v&&a(De,N)}function L(){O=!0,r.destroy(),je(o,_i),Re(o,Yn),Z(o,"style",f),Z(o,we,h||"")}function B(){var T=e.splides.map(function(C){var F=C.splide.Components.Slides.getAt(t);return F?F.slide.id:""}).join(" ");Z(o,we,Tn(g.slideX,($?n:t)+1)),Z(o,Nt,T),Z(o,Me,d?"button":""),d&&Re(o,Ft)}function N(){O||R()}function R(){if(!O){var T=e.index;V(),P(),ze(o,er,t===T-1),ze(o,tr,t===T+1)}}function V(){var T=H();T!==ro(o,rt)&&(ze(o,rt,T),Z(o,qo,_&&T||""),i(T?Fo:Ro,E))}function P(){var T=m(),C=!T&&(!H()||$);if(e.state.is([vt,Rt])||Z(o,Xo,C||""),Z(Pn(o,c.focusableNodes||""),dt,C?-1:""),d&&Z(o,dt,C?-1:0),T!==ro(o,Ln)&&(ze(o,Ln,T),i(T?Bo:Vo,E)),!T&&document.activeElement===o){var F=s.Slides.getAt(e.index);F&&Eo(F.slide)}}function U(T,C,F){Le(F&&M||o,T,C)}function H(){var T=e.index;return T===t||c.cloneStatus&&T===n}function m(){if(e.is(zt))return H();var T=_e(s.Elements.track),C=_e(o),F=x("left",!0),Y=x("right",!0);return en(T[F])<=kt(C[F])&&en(C[Y])<=kt(T[Y])}function k(T,C){var F=Ce(T-t);return!$&&(c.rewind||e.is(St))&&(F=Xe(F,e.length-F)),F<=C}var E={index:t,slideIndex:n,slide:o,container:M,isClone:$,mount:w,destroy:L,update:R,style:U,isWithin:k};return E}function Ii(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,l=t.Elements,s=l.slides,p=l.list,c=[];function _(){v(),r(ve,g),r(ve,v)}function v(){s.forEach(function(R,V){d(R,V,-1)})}function g(){O(function(R){R.destroy()}),He(c)}function u(){O(function(R){R.update()})}function d(R,V,P){var U=Ai(e,V,P,R);U.mount(),c.push(U),c.sort(function(H,m){return H.index-m.index})}function x(R){return R?w(function(V){return!V.isClone}):c}function f(R){var V=t.Controller,P=V.toIndex(R),U=V.hasFocus()?1:n.perPage;return w(function(H){return Kt(H.index,P,P+U-1)})}function h(R){return w(R)[0]}function $(R,V){Te(R,function(P){if(qe(P)&&(P=Lo(P)),wo(P)){var U=s[V];U?Vn(P,U):Pt(p,P),Fe(P,n.classes.slide),L(P,ue(a,ht))}}),a(ve)}function M(R){ot(w(R).map(function(V){return V.slide})),a(ve)}function O(R,V){x(V).forEach(R)}function w(R){return c.filter(_o(R)?R:function(V){return qe(R)?Et(V.slide,R):Bn(Vt(R),V.index)})}function y(R,V,P){O(function(U){U.style(R,V,P)})}function L(R,V){var P=Pn(R,"img"),U=P.length;U?P.forEach(function(H){i(H,"load error",function(){--U||V()})}):V()}function B(R){return R?s.length:c.length}function N(){return c.length>n.perPage}return{mount:_,destroy:g,update:u,register:d,get:x,getIn:f,getAt:h,add:$,remove:M,forEach:O,filter:w,style:y,getLength:B,isEnough:N}}function ki(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,l=t.Slides,s=t.Direction.resolve,p=t.Elements,c=p.root,_=p.track,v=p.list,g=l.getAt,u=l.style,d,x,f;function h(){$(),a(window,"resize load",di(ue(i,ht))),r([xe,ve],$),r(ht,M)}function $(){d=n.direction===pn,Le(c,"maxWidth",et(n.width)),Le(_,s("paddingLeft"),O(!1)),Le(_,s("paddingRight"),O(!0)),M(!0)}function M(E){var T=_e(c);(E||x.width!==T.width||x.height!==T.height)&&(Le(_,"height",w()),u(s("marginRight"),et(n.gap)),u("width",L()),u("height",B(),!0),x=T,i(rn),f!==(f=k())&&(ze(c,or,f),i(ui,f)))}function O(E){var T=n.padding,C=s(E?"right":"left");return T&&et(T[C]||(Tt(T)?0:T))||"0px"}function w(){var E="";return d&&(E=y(),_t(E,"height or heightRatio is missing."),E="calc("+E+" - "+O(!1)+" - "+O(!0)+")"),E}function y(){return et(n.height||_e(v).width*n.heightRatio)}function L(){return n.autoWidth?null:et(n.fixedWidth)||(d?"":N())}function B(){return et(n.fixedHeight)||(d?n.autoHeight?null:N():y())}function N(){var E=et(n.gap);return"calc((100%"+(E&&" + "+E)+")/"+(n.perPage||1)+(E&&" - "+E)+")"}function R(){return _e(v)[s("width")]}function V(E,T){var C=g(E||0);return C?_e(C.slide)[s("width")]+(T?0:H()):0}function P(E,T){var C=g(E);if(C){var F=_e(C.slide)[s("right")],Y=_e(v)[s("left")];return Ce(F-Y)+(T?0:H())}return 0}function U(E){return P(e.length-1)-P(0)+V(0,E)}function H(){var E=g(0);return E&&parseFloat(Le(E.slide,s("marginRight")))||0}function m(E){return parseFloat(Le(_,s("padding"+(E?"Right":"Left"))))||0}function k(){return e.is(zt)||U(!0)>R()}return{mount:h,resize:M,listSize:R,slideSize:V,sliderSize:U,totalSize:P,getPadding:m,isOverflow:k}}var Fi=2;function Ri(e,t,n){var o=ge(e),r=o.on,a=t.Elements,i=t.Slides,l=t.Direction.resolve,s=[],p;function c(){r(ve,_),r([xe,ht],g),(p=x())&&(u(p),t.Layout.resize(!0))}function _(){v(),c()}function v(){ot(s),He(s),o.destroy()}function g(){var f=x();p!==f&&(p<f||!f)&&o.emit(ve)}function u(f){var h=i.get().slice(),$=h.length;if($){for(;h.length<f;)Xt(h,h);Xt(h.slice(-f),h.slice(0,f)).forEach(function(M,O){var w=O<f,y=d(M.slide,O);w?Vn(y,h[0].slide):Pt(a.list,y),Xt(s,y),i.register(y,O-f+(w?0:$),M.index)})}}function d(f,h){var $=f.cloneNode(!0);return Fe($,n.classes.clone),$.id=e.root.id+"-clone"+Wn(h+1),$}function x(){var f=n.clones;if(!e.is(St))f=0;else if(Bt(f)){var h=n[l("fixedWidth")]&&t.Layout.slideSize(0),$=h&&kt(_e(a.track)[l("width")]/h);f=$||n[l("autoWidth")]&&e.length||n.perPage*Fi}return f}return{mount:c,destroy:v}}function Bi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=e.state.set,l=t.Layout,s=l.slideSize,p=l.getPadding,c=l.totalSize,_=l.listSize,v=l.sliderSize,g=t.Direction,u=g.resolve,d=g.orient,x=t.Elements,f=x.list,h=x.track,$;function M(){$=t.Transition,r([Je,rn,xe,ve],O)}function O(){t.Controller.isBusy()||(t.Scroll.cancel(),y(e.index),t.Slides.update())}function w(C,F,Y,re){C!==F&&E(C>Y)&&(R(),L(N(U(),C>Y),!0)),i(vt),a(De,F,Y,C),$.start(F,function(){i(ft),a(bt,F,Y,C),re&&re()})}function y(C){L(P(C,!0))}function L(C,F){if(!e.is(zt)){var Y=F?C:B(C);Le(f,"transform","translate"+u("X")+"("+Y+"px)"),C!==Y&&a(Uo)}}function B(C){if(e.is(St)){var F=V(C),Y=F>t.Controller.getEnd(),re=F<0;(re||Y)&&(C=N(C,Y))}return C}function N(C,F){var Y=C-k(F),re=v();return C-=d(re*(kt(Ce(Y)/re)||1))*(F?1:-1),C}function R(){L(U(),!0),$.cancel()}function V(C){for(var F=t.Slides.get(),Y=0,re=1/0,te=0;te<F.length;te++){var ie=F[te].index,A=Ce(P(ie,!0)-C);if(A<=re)re=A,Y=ie;else break}return Y}function P(C,F){var Y=d(c(C-1)-m(C));return F?H(Y):Y}function U(){var C=u("left");return _e(f)[C]-_e(h)[C]+d(p(!1))}function H(C){return n.trimSpace&&e.is(yt)&&(C=st(C,0,d(v(!0)-_()))),C}function m(C){var F=n.focus;return F==="center"?(_()-s(C,!0))/2:+F*s(C)||0}function k(C){return P(C?t.Controller.getEnd():0,!!n.trimSpace)}function E(C){var F=d(N(U(),C));return C?F>=0:F<=f[u("scrollWidth")]-_e(h)[u("width")]}function T(C,F){F=Bt(F)?U():F;var Y=C!==!0&&d(F)<d(k(!1)),re=C!==!1&&d(F)>d(k(!0));return Y||re}return{mount:M,move:w,jump:y,translate:L,shift:N,cancel:R,toIndex:V,toPosition:P,getPosition:U,getLimit:k,exceededLimit:T,reposition:O}}function Vi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=t.Move,l=i.getPosition,s=i.getLimit,p=i.toPosition,c=t.Slides,_=c.isEnough,v=c.getLength,g=n.omitEnd,u=e.is(St),d=e.is(yt),x=ue(U,!1),f=ue(U,!0),h=n.start||0,$,M=h,O,w,y;function L(){B(),r([xe,ve,tn],B),r(rn,N)}function B(){O=v(!0),w=n.perMove,y=n.perPage,$=E();var A=st(h,0,g?$:O-1);A!==h&&(h=A,i.reposition())}function N(){$!==E()&&a(tn)}function R(A,K,me){if(!ie()){var se=P(A),fe=k(se);fe>-1&&(K||fe!==h)&&(Y(fe),i.move(se,fe,M,me))}}function V(A,K,me,se){t.Scroll.scroll(A,K,me,function(){var fe=k(i.toIndex(l()));Y(g?Xe(fe,$):fe),se&&se()})}function P(A){var K=h;if(qe(A)){var me=A.match(/([+\-<>])(\d+)?/)||[],se=me[1],fe=me[2];se==="+"||se==="-"?K=H(h+ +(""+se+(+fe||1)),h):se===">"?K=fe?T(+fe):x(!0):se==="<"&&(K=f(!0))}else K=u?A:st(A,0,$);return K}function U(A,K){var me=w||(te()?1:y),se=H(h+me*(A?-1:1),h,!(w||te()));return se===-1&&d&&!Io(l(),s(!A),1)?A?0:$:K?se:k(se)}function H(A,K,me){if(_()||te()){var se=m(A);se!==A&&(K=A,A=se,me=!1),A<0||A>$?!w&&(Kt(0,A,K,!0)||Kt($,K,A,!0))?A=T(C(A)):u?A=me?A<0?-(O%y||y):O:A:n.rewind?A=A<0?$:0:A=-1:me&&A!==K&&(A=T(C(K)+(A<K?-1:1)))}else A=-1;return A}function m(A){if(d&&n.trimSpace==="move"&&A!==h)for(var K=l();K===p(A,!0)&&Kt(A,0,e.length-1,!n.rewind);)A<h?--A:++A;return A}function k(A){return u?(A+O)%O||0:A}function E(){for(var A=O-(te()||u&&w?1:y);g&&A-- >0;)if(p(O-1,!0)!==p(A,!0)){A++;break}return st(A,0,O-1)}function T(A){return st(te()?A:y*A,0,$)}function C(A){return te()?Xe(A,$):en((A>=$?O-1:A)/y)}function F(A){var K=i.toIndex(A);return d?st(K,0,$):K}function Y(A){A!==h&&(M=h,h=A)}function re(A){return A?M:h}function te(){return!Bt(n.focus)||n.isNavigation}function ie(){return e.state.is([vt,Rt])&&!!n.waitForTransition}return{mount:L,go:R,scroll:V,getNext:x,getPrev:f,getAdjacent:U,getEnd:E,setIndex:Y,getIndex:re,toIndex:T,toPage:C,toDest:F,hasFocus:te,isBusy:ie}}var Pi="http://www.w3.org/2000/svg",Oi="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",Ht=40;function Wi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,l=n.classes,s=n.i18n,p=t.Elements,c=t.Controller,_=p.arrows,v=p.track,g=_,u=p.prev,d=p.next,x,f,h={};function $(){O(),r(xe,M)}function M(){w(),$()}function O(){var V=n.arrows;V&&!(u&&d)&&B(),u&&d&&(At(h,{prev:u,next:d}),It(g,V?"":"none"),Fe(g,f=qn+"--"+n.direction),V&&(y(),R(),Z([u,d],Nt,v.id),i(No,u,d)))}function w(){o.destroy(),je(g,f),x?(ot(_?[u,d]:g),u=d=null):Re([u,d],Yn)}function y(){r([Je,bt,ve,it,tn],R),a(d,"click",ue(L,">")),a(u,"click",ue(L,"<"))}function L(V){c.go(V,!0)}function B(){g=_||pt("div",l.arrows),u=N(!0),d=N(!1),x=!0,Pt(g,[u,d]),!_&&Vn(g,v)}function N(V){var P='<button class="'+l.arrow+" "+(V?l.prev:l.next)+'" type="button"><svg xmlns="'+Pi+'" viewBox="0 0 '+Ht+" "+Ht+'" width="'+Ht+'" height="'+Ht+'" focusable="false"><path d="'+(n.arrowPath||Oi)+'" />';return Lo(P)}function R(){if(u&&d){var V=e.index,P=c.getPrev(),U=c.getNext(),H=P>-1&&V<P?s.last:s.prev,m=U>-1&&V>U?s.first:s.next;u.disabled=P<0,d.disabled=U<0,Z(u,we,H),Z(d,we,m),i(zo,u,d,P,U)}}return{arrows:h,mount:$,destroy:w,update:R}}var Ni=On+"-interval";function zi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,l=ln(n.interval,e.go.bind(e,">"),y),s=l.isPaused,p=t.Elements,c=t.Elements,_=c.root,v=c.toggle,g=n.autoplay,u,d,x=g==="pause";function f(){g&&(h(),v&&Z(v,Nt,p.track.id),x||$(),w())}function h(){n.pauseOnHover&&a(_,"mouseenter mouseleave",function(B){u=B.type==="mouseenter",O()}),n.pauseOnFocus&&a(_,"focusin focusout",function(B){d=B.type==="focusin",O()}),v&&a(v,"click",function(){x?$():M(!0)}),r([De,an,ve],l.rewind),r(De,L)}function $(){s()&&t.Slides.isEnough()&&(l.start(!n.resetProgress),d=u=x=!1,w(),i(Mn))}function M(B){B===void 0&&(B=!0),x=!!B,w(),s()||(l.pause(),i(Hn))}function O(){x||(u||d?M(!1):$())}function w(){v&&(ze(v,rt,!x),Z(v,we,n.i18n[x?"play":"pause"]))}function y(B){var N=p.bar;N&&Le(N,"width",B*100+"%"),i(Ho,B)}function L(B){var N=t.Slides.getAt(B);l.set(N&&+Ae(N.slide,Ni)||n.interval)}return{mount:f,destroy:l.cancel,play:$,pause:M,isPaused:s}}function ji(e,t,n){var o=ge(e),r=o.on;function a(){n.cover&&(r(Dn,ue(l,!0)),r([Je,xe,ve],ue(i,!0)))}function i(s){t.Slides.forEach(function(p){var c=Ot(p.container||p.slide,"img");c&&c.src&&l(s,c,p)})}function l(s,p,c){c.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),It(p,s?"none":"")}return{mount:a,destroy:ue(i,!1)}}var Mi=10,Hi=600,Di=.6,Ui=1.5,Gi=800;function Yi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=e.state.set,l=t.Move,s=l.getPosition,p=l.getLimit,c=l.exceededLimit,_=l.translate,v=e.is(yt),g,u,d=1;function x(){r(De,M),r([xe,ve],O)}function f(y,L,B,N,R){var V=s();if(M(),B&&(!v||!c())){var P=t.Layout.sliderSize(),U=wn(y)*P*en(Ce(y)/P)||0;y=l.toPosition(t.Controller.toDest(y%P))+U}var H=Io(V,y,1);d=1,L=H?0:L||Qt(Ce(y-V)/Ui,Gi),u=N,g=ln(L,h,ue($,V,y,R),1),i(Rt),a(an),g.start()}function h(){i(ft),u&&u(),a(it)}function $(y,L,B,N){var R=s(),V=y+(L-y)*w(N),P=(V-R)*d;_(R+P),v&&!B&&c()&&(d*=Di,Ce(P)<Mi&&f(p(c(!0)),Hi,!1,u,!0))}function M(){g&&g.cancel()}function O(){g&&!g.isPaused()&&(M(),h())}function w(y){var L=n.easingFunc;return L?L(y):1-Math.pow(1-y,4)}return{mount:x,destroy:M,scroll:f,cancel:O}}var ct={passive:!1,capture:!0};function qi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,l=o.unbind,s=e.state,p=t.Move,c=t.Scroll,_=t.Controller,v=t.Elements.track,g=t.Media.reduce,u=t.Direction,d=u.resolve,x=u.orient,f=p.getPosition,h=p.exceededLimit,$,M,O,w,y,L=!1,B,N,R;function V(){i(v,bn,$n,ct),i(v,Sn,$n,ct),i(v,rr,U,ct),i(v,"click",k,{capture:!0}),i(v,"dragstart",Ne),r([Je,xe],P)}function P(){var z=n.drag;Ue(!z),w=z==="free"}function U(z){if(B=!1,!N){var b=fe(z);se(z.target)&&(b||!z.button)&&(_.isBusy()?Ne(z,!0):(R=b?v:window,y=s.is([vt,Rt]),O=null,i(R,bn,H,ct),i(R,Sn,m,ct),p.cancel(),c.cancel(),E(z)))}}function H(z){if(s.is(qt)||(s.set(qt),a(Po)),z.cancelable)if(y){p.translate($+me(te(z)));var b=ie(z)>go,D=L!==(L=h());(b||D)&&E(z),B=!0,a(Oo),Ne(z)}else F(z)&&(y=C(z),Ne(z))}function m(z){s.is(qt)&&(s.set(ft),a(Wo)),y&&(T(z),Ne(z)),l(R,bn,H),l(R,Sn,m),y=!1}function k(z){!N&&B&&Ne(z,!0)}function E(z){O=M,M=z,$=f()}function T(z){var b=Y(z),D=re(b),q=n.rewind&&n.rewindByDrag;g(!1),w?_.scroll(D,0,n.snap):e.is(zt)?_.go(x(wn(b))<0?q?"<":"-":q?">":"+"):e.is(yt)&&L&&q?_.go(h(!0)?">":"<"):_.go(_.toDest(D),!0),g(!0)}function C(z){var b=n.dragMinThreshold,D=Tt(b),q=D&&b.mouse||0,J=(D?b.touch:+b)||10;return Ce(te(z))>(fe(z)?J:q)}function F(z){return Ce(te(z))>Ce(te(z,!0))}function Y(z){if(e.is(St)||!L){var b=ie(z);if(b&&b<go)return te(z)/b}return 0}function re(z){return f()+wn(z)*Xe(Ce(z)*(n.flickPower||600),w?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(z,b){return K(z,b)-K(A(z),b)}function ie(z){return _n(z)-_n(A(z))}function A(z){return M===z&&O||M}function K(z,b){return(fe(z)?z.changedTouches[0]:z)["page"+d(b?"Y":"X")]}function me(z){return z/(L&&e.is(yt)?Ei:1)}function se(z){var b=n.noDrag;return!Et(z,"."+Qo+", ."+gn)&&(!b||!Et(z,b))}function fe(z){return typeof TouchEvent<"u"&&z instanceof TouchEvent}function Se(){return y}function Ue(z){N=z}return{mount:V,disable:Ue,isDragging:Se}}var Xi={Spacebar:" ",Right:un,Left:cn,Up:Go,Down:Yo};function Xn(e){return e=qe(e)?e:e.key,Xi[e]||e}var mo="keydown";function Ki(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.unbind,l=e.root,s=t.Direction.resolve,p,c;function _(){v(),r(xe,g),r(xe,v),r(De,d)}function v(){var f=n.keyboard;f&&(p=f==="global"?window:l,a(p,mo,x))}function g(){i(p,mo)}function u(f){c=f}function d(){var f=c;c=!0,$o(function(){c=f})}function x(f){if(!c){var h=Xn(f);h===s(cn)?e.go("<"):h===s(un)&&e.go(">")}}return{mount:_,destroy:g,disable:u}}var wt=On+"-lazy",Jt=wt+"-srcset",Ji="["+wt+"], ["+Jt+"]";function Zi(e,t,n){var o=ge(e),r=o.on,a=o.off,i=o.bind,l=o.emit,s=n.lazyLoad==="sequential",p=[bt,it],c=[];function _(){n.lazyLoad&&(v(),r(ve,v))}function v(){He(c),g(),s?f():(a(p),r(p,u),u())}function g(){t.Slides.forEach(function(h){Pn(h.slide,Ji).forEach(function($){var M=Ae($,wt),O=Ae($,Jt);if(M!==$.src||O!==$.srcset){var w=n.classes.spinner,y=$.parentElement,L=Ot(y,"."+w)||pt("span",w,y);c.push([$,h,L]),$.src||It($,"none")}})})}function u(){c=c.filter(function(h){var $=n.perPage*((n.preloadPages||1)+1)-1;return h[1].isWithin(e.index,$)?d(h):!0}),c.length||a(p)}function d(h){var $=h[0];Fe(h[1].slide,An),i($,"load error",ue(x,h)),Z($,"src",Ae($,wt)),Z($,"srcset",Ae($,Jt)),Re($,wt),Re($,Jt)}function x(h,$){var M=h[0],O=h[1];je(O.slide,An),$.type!=="error"&&(ot(h[2]),It(M,""),l(Dn,M,O),l(ht)),s&&f()}function f(){c.length&&d(c.shift())}return{mount:_,destroy:ue(He,c),check:u}}function Qi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,l=t.Slides,s=t.Elements,p=t.Controller,c=p.hasFocus,_=p.getIndex,v=p.go,g=t.Direction.resolve,u=s.pagination,d=[],x,f;function h(){$(),r([xe,ve,tn],h);var N=n.pagination;u&&It(u,N?"":"none"),N&&(r([De,an,it],B),M(),B(),a(jo,{list:x,items:d},L(e.index)))}function $(){x&&(ot(u?Ke(x.children):x),je(x,f),He(d),x=null),o.destroy()}function M(){var N=e.length,R=n.classes,V=n.i18n,P=n.perPage,U=c()?p.getEnd()+1:kt(N/P);x=u||pt("ul",R.pagination,s.track.parentElement),Fe(x,f=mn+"--"+y()),Z(x,Me,"tablist"),Z(x,we,V.select),Z(x,Gn,y()===pn?"vertical":"");for(var H=0;H<U;H++){var m=pt("li",null,x),k=pt("button",{class:R.page,type:"button"},m),E=l.getIn(H).map(function(C){return C.slide.id}),T=!c()&&P>1?V.pageX:V.slideX;i(k,"click",ue(O,H)),n.paginationKeyboard&&i(k,"keydown",ue(w,H)),Z(m,Me,"presentation"),Z(k,Me,"tab"),Z(k,Nt,E.join(" ")),Z(k,we,Tn(T,H+1)),Z(k,dt,-1),d.push({li:m,button:k,page:H})}}function O(N){v(">"+N,!0)}function w(N,R){var V=d.length,P=Xn(R),U=y(),H=-1;P===g(un,!1,U)?H=++N%V:P===g(cn,!1,U)?H=(--N+V)%V:P==="Home"?H=0:P==="End"&&(H=V-1);var m=d[H];m&&(Eo(m.button),v(">"+H),Ne(R,!0))}function y(){return n.paginationDirection||n.direction}function L(N){return d[p.toPage(N)]}function B(){var N=L(_(!0)),R=L(_());if(N){var V=N.button;je(V,rt),Re(V,lo),Z(V,dt,-1)}if(R){var P=R.button;Fe(P,rt),Z(P,lo,!0),Z(P,dt,"")}a(Mo,{list:x,items:d},N,R)}return{items:d,mount:h,destroy:$,getAt:L,update:B}}var ea=[" ","Enter"];function ta(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(u){u.isParent||(p(e,u.splide),p(u.splide,e))}),o&&c()}function l(){a.forEach(function(u){u.destroy()}),He(a)}function s(){l(),i()}function p(u,d){var x=ge(u);x.on(De,function(f,h,$){d.go(d.is(St)?$:f)}),a.push(x)}function c(){var u=ge(e),d=u.on;d(Nn,v),d(Do,g),d([Je,xe],_),a.push(u),u.emit(jn,e.splides)}function _(){Z(t.Elements.list,Gn,n.direction===pn?"vertical":"")}function v(u){e.go(u.index)}function g(u,d){Bn(ea,Xn(d))&&(v(u),Ne(d))}return{setup:ue(t.Media.set,{slideFocus:Bt(r)?o:r},!0),mount:i,destroy:l,remount:s}}function na(e,t,n){var o=ge(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",l,ct)}function l(p){if(p.cancelable){var c=p.deltaY,_=c<0,v=_n(p),g=n.wheelMinThreshold||0,u=n.wheelSleep||0;Ce(c)>g&&v-a>u&&(e.go(_?"<":">"),a=v),s(_)&&Ne(p)}}function s(p){return!n.releaseWheel||e.state.is(vt)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var oa=90;function ra(e,t,n){var o=ge(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,l=pt("span",Ci),s=ln(oa,ue(c,!1));function p(){i&&(v(!t.Autoplay.isPaused()),Z(a,uo,!0),l.textContent="…",r(Mn,ue(v,!0)),r(Hn,ue(v,!1)),r([bt,it],ue(c,!0)))}function c(g){Z(a,co,g),g?(Pt(a,l),s.start()):(ot(l),s.cancel())}function _(){Re(a,[so,uo,co]),ot(l)}function v(g){i&&Z(a,so,g?"off":"polite")}return{mount:p,disable:v,destroy:_}}var ia=Object.freeze({__proto__:null,Media:gi,Direction:mi,Elements:Li,Slides:Ii,Layout:ki,Clones:Ri,Move:Bi,Controller:Vi,Arrows:Wi,Autoplay:zi,Cover:ji,Scroll:Yi,Drag:qi,Keyboard:Ki,LazyLoad:Zi,Pagination:Qi,Sync:ta,Wheel:na,Live:ra}),aa={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"},la={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:wi,i18n:aa,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function sa(e,t,n){var o=t.Slides;function r(){ge(e).on([Je,ve],a)}function a(){o.forEach(function(l){l.style("transform","translateX(-"+100*l.index+"%)")})}function i(l,s){o.style("transition","opacity "+n.speed+"ms "+n.easing),$o(s)}return{mount:r,start:i,cancel:$n}}function ca(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,l=ue(Le,i,"transition"),s;function p(){ge(e).bind(i,"transitionend",function(g){g.target===i&&s&&(_(),s())})}function c(g,u){var d=o.toPosition(g,!0),x=o.getPosition(),f=v(g);Ce(d-x)>=1&&f>=1?n.useScroll?a.scroll(d,f,!1,u):(l("transform "+f+"ms "+n.easing),o.translate(d,!0),s=u):(o.jump(g),u())}function _(){l(""),a.cancel()}function v(g){var u=n.rewindSpeed;if(e.is(yt)&&u){var d=r.getIndex(!0),x=r.getEnd();if(d===0&&g>=x||d>=x&&g===0)return u}return n.speed}return{mount:p,start:c,cancel:_}}var ua=(function(){function e(n,o){this.event=ge(),this.Components={},this.state=pi(ut),this.splides=[],this._o={},this._E={};var r=qe(n)?Ao(document,n):n;_t(r,r+" is invalid."),this.root=r,o=Ye({label:Ae(r,we)||"",labelledby:Ae(r,Un)||""},la,e.defaults,o||{});try{Ye(o,JSON.parse(Ae(r,On)))}catch{_t(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,l=this.Components;_t(i.is([ut,Zt]),"Already mounted!"),i.set(ut),this._C=l,this._T=r||this._T||(this.is(zt)?sa:ca),this._E=o||this._E;var s=At({},ia,this._E,{Transition:this._T});return nt(s,function(p,c){var _=p(a,l,a._o);l[c]=_,_.setup&&_.setup()}),nt(l,function(p){p.mount&&p.mount()}),this.emit(Je),Fe(this.root,$i),i.set(ft),this.emit(En),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ft)&&(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(Ke(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(ve),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(ut)?ge(this).on(En,this.destroy.bind(this,o)):(nt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(zn),r.destroy(),o&&He(this.splides),a.set(Zt)),this},ai(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})(),Kn=ua;Kn.defaults={};Kn.STATES=si;var fo=[[Je,"onMounted"],[En,"onReady"],[De,"onMove"],[bt,"onMoved"],[Nn,"onClick"],[Fo,"onActive"],[Ro,"onInactive"],[Bo,"onVisible"],[Vo,"onHidden"],[ve,"onRefresh"],[xe,"onUpdated"],[ht,"onResize"],[rn,"onResized"],[Po,"onDrag"],[Oo,"onDragging"],[Wo,"onDragged"],[an,"onScroll"],[it,"onScrolled"],[zn,"onDestroy"],[No,"onArrowsMounted"],[zo,"onArrowsUpdated"],[jo,"onPaginationMounted"],[Mo,"onPaginationUpdated"],[jn,"onNavigationMounted"],[Mn,"onAutoplayPlay"],[Ho,"onAutoplayPlaying"],[Hn,"onAutoplayPause"],[Dn,"onLazyLoadLoaded"]];function Jn(...e){return e.filter(Boolean).join(" ")}function nn(e){return e!==null&&typeof e=="object"}function In(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!In(n,t[o]));if(nn(e)&&nn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!In(e[r],t[r]))}return e===t}function pa(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function da(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 kn(e,t){const n=e;return da(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():nn(o)?n[r]=kn(nn(n[r])?n[r]:{},o):n[r]=o}),n}var ga=({children:e,className:t,...n})=>j.createElement("div",{className:Jn("splide__track",t),...n},j.createElement("ul",{className:"splide__list"},e)),ir=class extends j.Component{constructor(){super(...arguments),this.splideRef=j.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Kn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=kn({},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&&!In(this.options,e)&&(this.splide.options=e,this.options=kn({},e));const t=this.getSlides();pa(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){fo.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 j.createElement(t,{className:Jn("splide",e),ref:this.splideRef,...this.omit(r,["options",...fo.map(a=>a[1])])},n?j.createElement(ga,null,o):o)}},ar=({children:e,className:t,...n})=>j.createElement("li",{className:Jn("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),j=require("react"),ft=require("classnames"),x=require("./useScopedStyles-DpVdqfXj.js"),br=require("react-dom");function Sr(t){return t.type==="object"&&t.version===1}const xr="ControlSlider-module__wrapper___sHEkd",Cr="ControlSlider-module__hoverArrow___A-dOH",$r="ControlSlider-module__sliderItem___QQSkR",wr="ControlSlider-module__sliderImage___9hRl-",Tr="ControlSlider-module__arrow___05ghY",_r="ControlSlider-module__arrowVertical___tBfVN",Ar="ControlSlider-module__nextArrow___-30Yc",Er="ControlSlider-module__arrowInner___aEra3",Lr="ControlSlider-module__arrowIcon___S4ztF",Fr="ControlSlider-module__arrowImg___2dwJW",kr="ControlSlider-module__mirror___brd6U",Ir="ControlSlider-module__pagination___bicLF",Rr="ControlSlider-module__paginationInner___bT-P-",Wr="ControlSlider-module__paginationVertical___zYqKw",Vr="ControlSlider-module__paginationItem___nTRbk",zr="ControlSlider-module__dot___p1Qun",Nr="ControlSlider-module__activeDot___LHFaj",Mr="ControlSlider-module__paginationInsideBottom___R3FWn",Pr="ControlSlider-module__paginationInsideTop___V-qb-",jr="ControlSlider-module__paginationOutsideBottom___14w8D",Hr="ControlSlider-module__paginationOutsideTop___SCLqB",Or="ControlSlider-module__paginationInsideLeft___yOBRZ",Br="ControlSlider-module__paginationInsideRight___Rtt3o",Dr="ControlSlider-module__paginationOutsideLeft___lahaw",Ur="ControlSlider-module__paginationOutsideRight___EtuQa",Gr="ControlSlider-module__imgWrapper___UjEgB",qr="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",ti="ControlSlider-module__topRightAlignment___NMapS",ei="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",X={wrapper:xr,hoverArrow:Cr,sliderItem:$r,sliderImage:wr,arrow:Tr,arrowVertical:_r,nextArrow:Ar,arrowInner:Er,arrowIcon:Lr,arrowImg:Fr,mirror:kr,pagination:Ir,paginationInner:Rr,paginationVertical:Wr,paginationItem:Vr,dot:zr,activeDot:Nr,paginationInsideBottom:Mr,paginationInsideTop:Pr,paginationOutsideBottom:jr,paginationOutsideTop:Hr,paginationInsideLeft:Or,paginationInsideRight:Br,paginationOutsideLeft:Dr,paginationOutsideRight:Ur,imgWrapper:Gr,captionBlock:qr,captionTextWrapper:Yr,captionText:Xr,active:Kr,withPointerEvents:Jr,topLeftAlignment:Zr,topCenterAlignment:Qr,topRightAlignment:ti,middleLeftAlignment:ei,middleCenterAlignment:ni,middleRightAlignment:oi,bottomLeftAlignment:ri,bottomCenterAlignment:ii,bottomRightAlignment:ai,clickOverlay:li,contain:si,cover:ci};function pi(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function ui(t,e,n){return e&&pi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var io="(prefers-reduced-motion: reduce)",ge=1,di=2,ve=3,xe=4,Ne=5,Ze=6,nn=7,gi={CREATED:ge,MOUNTED:di,IDLE:ve,MOVING:xe,SCROLLING:Ne,DRAGGING:Ze,DESTROYED:nn};function qt(t){t.length=0}function te(t,e,n){return Array.prototype.slice.call(t,e,n)}function mt(t){return t.bind.apply(t,[null].concat(te(arguments,1)))}var Lo=setTimeout,An=function(){};function ao(t){return requestAnimationFrame(t)}function sn(t,e){return typeof e===t}function Le(t){return!Nn(t)&&sn("object",t)}var zn=Array.isArray,Fo=mt(sn,"function"),Zt=mt(sn,"string"),Me=mt(sn,"undefined");function Nn(t){return t===null}function ko(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Pe(t){return zn(t)?t:[t]}function Lt(t,e){Pe(t).forEach(e)}function Mn(t,e){return t.indexOf(e)>-1}function Qe(t,e){return t.push.apply(t,Pe(e)),t}function Dt(t,e,n){t&&Lt(e,function(o){o&&t.classList[n?"add":"remove"](o)})}function zt(t,e){Dt(t,Zt(e)?e.split(" "):e,!0)}function je(t,e){Lt(e,t.appendChild.bind(t))}function Pn(t,e){Lt(t,function(n){var o=(e||n).parentNode;o&&o.insertBefore(n,e)})}function Fe(t,e){return ko(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Io(t,e){var n=t?te(t.children):[];return e?n.filter(function(o){return Fe(o,e)}):n}function He(t,e){return e?Io(t,e)[0]:t.firstElementChild}var ke=Object.keys;function ie(t,e,n){return t&&(n?ke(t).reverse():ke(t)).forEach(function(o){o!=="__proto__"&&e(t[o],o)}),t}function Ie(t){return te(arguments,1).forEach(function(e){ie(e,function(n,o){t[o]=e[o]})}),t}function Kt(t){return te(arguments,1).forEach(function(e){ie(e,function(n,o){zn(n)?t[o]=n.slice():Le(n)?t[o]=Kt({},Le(t[o])?t[o]:{},n):t[o]=n})}),t}function lo(t,e){Lt(e||ke(t),function(n){delete t[n]})}function Nt(t,e){Lt(t,function(n){Lt(e,function(o){n&&n.removeAttribute(o)})})}function nt(t,e,n){Le(e)?ie(e,function(o,r){nt(t,r,o)}):Lt(t,function(o){Nn(n)||n===""?Nt(o,e):o.setAttribute(e,String(n))})}function me(t,e,n){var o=document.createElement(t);return e&&(Zt(e)?zt(o,e):nt(o,e)),n&&je(n,o),o}function It(t,e,n){if(Me(n))return getComputedStyle(t)[e];Nn(n)||(t.style[e]=""+n)}function Re(t,e){It(t,"display",e)}function Ro(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function Rt(t,e){return t.getAttribute(e)}function so(t,e){return t&&t.classList.contains(e)}function At(t){return t.getBoundingClientRect()}function ae(t){Lt(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function Wo(t){return He(new DOMParser().parseFromString(t,"text/html").body)}function Bt(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function Vo(t,e){return t&&t.querySelector(e)}function jn(t,e){return e?te(t.querySelectorAll(e)):[]}function Ut(t,e){Dt(t,e,!1)}function En(t){return t.timeStamp}function re(t){return Zt(t)?t:t?t+"px":""}var Oe="splide",Hn="data-"+Oe;function Ae(t,e){if(!t)throw new Error("["+Oe+"] "+(e||""))}var Qt=Math.min,on=Math.max,rn=Math.floor,We=Math.ceil,wt=Math.abs;function zo(t,e,n){return wt(t-e)<n}function tn(t,e,n,o){var r=Qt(e,n),a=on(e,n);return o?r<t&&t<a:r<=t&&t<=a}function ue(t,e,n){var o=Qt(e,n),r=on(e,n);return Qt(on(o,t),r)}function Ln(t){return+(t>0)-+(t<0)}function Fn(t,e){return Lt(e,function(n){t=t.replace("%s",""+n)}),t}function On(t){return t<10?"0"+t:""+t}var co={};function mi(t){return""+t+On(co[t]=(co[t]||0)+1)}function No(){var t=[];function e(i,p,c,f){r(i,p,function(u,k,b){var y="addEventListener"in u,l=y?u.removeEventListener.bind(u,k,c,f):u.removeListener.bind(u,c);y?u.addEventListener(k,c,f):u.addListener(c),t.push([u,k,b,c,l])})}function n(i,p,c){r(i,p,function(f,u,k){t=t.filter(function(b){return b[0]===f&&b[1]===u&&b[2]===k&&(!c||b[3]===c)?(b[4](),!1):!0})})}function o(i,p,c){var f,u=!0;return typeof CustomEvent=="function"?f=new CustomEvent(p,{bubbles:u,detail:c}):(f=document.createEvent("CustomEvent"),f.initCustomEvent(p,u,!1,c)),i.dispatchEvent(f),f}function r(i,p,c){Lt(i,function(f){f&&Lt(p,function(u){u.split(" ").forEach(function(k){var b=k.split(".");c(f,b[0],b[1])})})})}function a(){t.forEach(function(i){i[4]()}),qt(t)}return{bind:e,unbind:n,dispatch:o,destroy:a}}var ee="mounted",kn="ready",Yt="move",Ce="moved",Bn="click",Mo="active",Po="inactive",jo="visible",Ho="hidden",St="refresh",$t="updated",be="resize",cn="resized",Oo="drag",Bo="dragging",Do="dragged",pn="scroll",se="scrolled",fi="overflow",Dn="destroy",Uo="arrows:mounted",Go="arrows:updated",qo="pagination:mounted",Yo="pagination:updated",Un="navigation:mounted",Gn="autoplay:play",Xo="autoplay:playing",qn="autoplay:pause",Yn="lazyload:loaded",Ko="sk",Jo="sh",an="ei";function vt(t){var e=t?t.event.bus:document.createDocumentFragment(),n=No();function o(a,i){n.bind(e,Pe(a).join(" "),function(p){i.apply(i,zn(p.detail)?p.detail:[])})}function r(a){n.dispatch(e,a,te(arguments,1))}return t&&t.event.on(Dn,n.destroy),Ie(n,{bus:e,on:o,off:mt(n.unbind,e),emit:r})}function un(t,e,n,o){var r=Date.now,a,i=0,p,c=!0,f=0;function u(){if(!c){if(i=t?Qt((r()-a)/t,1):1,n&&n(i),i>=1&&(e(),a=r(),o&&++f>=o))return b();p=ao(u)}}function k(h){h||l(),a=r()-(h?i*t:0),c=!1,p=ao(u)}function b(){c=!0}function y(){a=r(),i=0,n&&n(i)}function l(){p&&cancelAnimationFrame(p),i=0,p=0,c=!0}function g(h){t=h}function $(){return c}return{start:k,rewind:y,pause:b,cancel:l,set:g,isPaused:$}}function yi(t){var e=t;function n(r){e=r}function o(r){return Mn(Pe(r),e)}return{set:n,is:o}}function hi(t,e){var n=un(0,t,null,1);return function(){n.isPaused()&&n.start()}}function vi(t,e,n){var o=t.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=No(),p=[];function c(){var l=n.mediaQuery==="min";ke(r).sort(function(g,$){return l?+g-+$:+$-+g}).forEach(function(g){u(r[g],"("+(l?"min":"max")+"-width:"+g+"px)")}),u(a,io),k()}function f(l){l&&i.destroy()}function u(l,g){var $=matchMedia(g);i.bind($,"change",k),p.push([l,$])}function k(){var l=o.is(nn),g=n.direction,$=p.reduce(function(h,v){return Kt(h,v[1].matches?v[0]:{})},{});lo(n),y($),n.destroy?t.destroy(n.destroy==="completely"):l?(f(!0),t.mount()):g!==n.direction&&t.refresh()}function b(l){matchMedia(io).matches&&(l?Kt(n,a):lo(n,ke(a)))}function y(l,g,$){Kt(n,l),g&&Kt(Object.getPrototypeOf(n),l),($||!o.is(ge))&&t.emit($t,n)}return{setup:c,destroy:f,reduce:b,set:y}}var dn="Arrow",gn=dn+"Left",mn=dn+"Right",Zo=dn+"Up",Qo=dn+"Down",po="rtl",fn="ttb",xn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Zo,mn],ArrowRight:[Qo,gn]};function bi(t,e,n){function o(a,i,p){p=p||n.direction;var c=p===po&&!i?1:p===fn?0:-1;return xn[a]&&xn[a][c]||a.replace(/width|left|right/i,function(f,u){var k=xn[f.toLowerCase()][c]||f;return u>0?k.charAt(0).toUpperCase()+k.slice(1):k})}function r(a){return a*(n.direction===po?1:-1)}return{resolve:o,orient:r}}var Gt="role",fe="tabindex",Si="disabled",Wt="aria-",Be=Wt+"controls",tr=Wt+"current",uo=Wt+"selected",Et=Wt+"label",Xn=Wt+"labelledby",er=Wt+"hidden",Kn=Wt+"orientation",Ve=Wt+"roledescription",go=Wt+"live",mo=Wt+"busy",fo=Wt+"atomic",Jn=[Gt,fe,Si,Be,tr,Et,Xn,er,Kn,Ve],Mt=Oe+"__",ne="is-",Cn=Oe,yo=Mt+"track",xi=Mt+"list",yn=Mt+"slide",nr=yn+"--clone",Ci=yn+"__container",Zn=Mt+"arrows",hn=Mt+"arrow",or=hn+"--prev",rr=hn+"--next",vn=Mt+"pagination",ir=vn+"__page",$i=Mt+"progress",wi=$i+"__bar",Ti=Mt+"toggle",_i=Mt+"spinner",Ai=Mt+"sr",Ei=ne+"initialized",le=ne+"active",ar=ne+"prev",lr=ne+"next",In=ne+"visible",Rn=ne+"loading",sr=ne+"focus-in",cr=ne+"overflow",Li=[le,In,ar,lr,Rn,sr,cr],Fi={slide:yn,clone:nr,arrows:Zn,arrow:hn,prev:or,next:rr,pagination:vn,page:ir,spinner:_i};function ki(t,e){if(Fo(t.closest))return t.closest(e);for(var n=t;n&&n.nodeType===1&&!Fe(n,e);)n=n.parentElement;return n}var Ii=5,ho=200,pr="touchstart mousedown",$n="touchmove mousemove",wn="touchend touchcancel mouseup click";function Ri(t,e,n){var o=vt(t),r=o.on,a=o.bind,i=t.root,p=n.i18n,c={},f=[],u=[],k=[],b,y,l;function g(){E(),B(),v()}function $(){r(St,h),r(St,g),r($t,v),a(document,pr+" keydown",function(m){l=m.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Dt(i,sr,!!l)})}function h(m){var F=Jn.concat("style");qt(f),Ut(i,u),Ut(b,k),Nt([b,y],F),Nt(i,m?F:["style",Ve])}function v(){Ut(i,u),Ut(b,k),u=L(Cn),k=L(yo),zt(i,u),zt(b,k),nt(i,Et,n.label),nt(i,Xn,n.labelledby)}function E(){b=M("."+yo),y=He(b,"."+xi),Ae(b&&y,"A track/list element is missing."),Qe(f,Io(y,"."+yn+":not(."+nr+")")),ie({arrows:Zn,pagination:vn,prev:or,next:rr,bar:wi,toggle:Ti},function(m,F){c[F]=M("."+m)}),Ie(c,{root:i,track:b,list:y,slides:f})}function B(){var m=i.id||mi(Oe),F=n.role;i.id=m,b.id=b.id||m+"-track",y.id=y.id||m+"-list",!Rt(i,Gt)&&i.tagName!=="SECTION"&&F&&nt(i,Gt,F),nt(i,Ve,p.carousel),nt(y,Gt,"presentation")}function M(m){var F=Vo(i,m);return F&&ki(F,"."+Cn)===i?F:void 0}function L(m){return[m+"--"+n.type,m+"--"+n.direction,n.drag&&m+"--draggable",n.isNavigation&&m+"--nav",m===Cn&&le]}return Ie(c,{setup:g,mount:$,destroy:h})}var Se="slide",$e="loop",De="fade";function Wi(t,e,n,o){var r=vt(t),a=r.on,i=r.emit,p=r.bind,c=t.Components,f=t.root,u=t.options,k=u.isNavigation,b=u.updateOnMove,y=u.i18n,l=u.pagination,g=u.slideFocus,$=c.Direction.resolve,h=Rt(o,"style"),v=Rt(o,Et),E=n>-1,B=He(o,"."+Ci),M;function L(){E||(o.id=f.id+"-slide"+On(e+1),nt(o,Gt,l?"tabpanel":"group"),nt(o,Ve,y.slide),nt(o,Et,v||Fn(y.slideLabel,[e+1,t.length]))),m()}function m(){p(o,"click",mt(i,Bn,C)),p(o,"keydown",mt(i,Ko,C)),a([Ce,Jo,se],R),a(Un,I),b&&a(Yt,N)}function F(){M=!0,r.destroy(),Ut(o,Li),Nt(o,Jn),nt(o,"style",h),nt(o,Et,v||"")}function I(){var T=t.splides.map(function(A){var V=A.splide.Components.Slides.getAt(e);return V?V.slide.id:""}).join(" ");nt(o,Et,Fn(y.slideX,(E?n:e)+1)),nt(o,Be,T),nt(o,Gt,g?"button":""),g&&Nt(o,Ve)}function N(){M||R()}function R(){if(!M){var T=t.index;W(),_(),Dt(o,ar,e===T-1),Dt(o,lr,e===T+1)}}function W(){var T=H();T!==so(o,le)&&(Dt(o,le,T),nt(o,tr,k&&T||""),i(T?Mo:Po,C))}function _(){var T=d(),A=!T&&(!H()||E);if(t.state.is([xe,Ne])||nt(o,er,A||""),nt(jn(o,u.focusableNodes||""),fe,A?-1:""),g&&nt(o,fe,A?-1:0),T!==so(o,In)&&(Dt(o,In,T),i(T?jo:Ho,C)),!T&&document.activeElement===o){var V=c.Slides.getAt(t.index);V&&Ro(V.slide)}}function D(T,A,V){It(V&&B||o,T,A)}function H(){var T=t.index;return T===e||u.cloneStatus&&T===n}function d(){if(t.is(De))return H();var T=At(c.Elements.track),A=At(o),V=$("left",!0),q=$("right",!0);return rn(T[V])<=We(A[V])&&rn(A[q])<=We(T[q])}function w(T,A){var V=wt(T-e);return!E&&(u.rewind||t.is($e))&&(V=Qt(V,t.length-V)),V<=A}var C={index:e,slideIndex:n,slide:o,container:B,isClone:E,mount:L,destroy:F,update:R,style:D,isWithin:w};return C}function Vi(t,e,n){var o=vt(t),r=o.on,a=o.emit,i=o.bind,p=e.Elements,c=p.slides,f=p.list,u=[];function k(){b(),r(St,y),r(St,b)}function b(){c.forEach(function(R,W){g(R,W,-1)})}function y(){M(function(R){R.destroy()}),qt(u)}function l(){M(function(R){R.update()})}function g(R,W,_){var D=Wi(t,W,_,R);D.mount(),u.push(D),u.sort(function(H,d){return H.index-d.index})}function $(R){return R?L(function(W){return!W.isClone}):u}function h(R){var W=e.Controller,_=W.toIndex(R),D=W.hasFocus()?1:n.perPage;return L(function(H){return tn(H.index,_,_+D-1)})}function v(R){return L(R)[0]}function E(R,W){Lt(R,function(_){if(Zt(_)&&(_=Wo(_)),ko(_)){var D=c[W];D?Pn(_,D):je(f,_),zt(_,n.classes.slide),F(_,mt(a,be))}}),a(St)}function B(R){ae(L(R).map(function(W){return W.slide})),a(St)}function M(R,W){$(W).forEach(R)}function L(R){return u.filter(Fo(R)?R:function(W){return Zt(R)?Fe(W.slide,R):Mn(Pe(R),W.index)})}function m(R,W,_){M(function(D){D.style(R,W,_)})}function F(R,W){var _=jn(R,"img"),D=_.length;D?_.forEach(function(H){i(H,"load error",function(){--D||W()})}):W()}function I(R){return R?c.length:u.length}function N(){return u.length>n.perPage}return{mount:k,destroy:y,update:l,register:g,get:$,getIn:h,getAt:v,add:E,remove:B,forEach:M,filter:L,style:m,getLength:I,isEnough:N}}function zi(t,e,n){var o=vt(t),r=o.on,a=o.bind,i=o.emit,p=e.Slides,c=e.Direction.resolve,f=e.Elements,u=f.root,k=f.track,b=f.list,y=p.getAt,l=p.style,g,$,h;function v(){E(),a(window,"resize load",hi(mt(i,be))),r([$t,St],E),r(be,B)}function E(){g=n.direction===fn,It(u,"maxWidth",re(n.width)),It(k,c("paddingLeft"),M(!1)),It(k,c("paddingRight"),M(!0)),B(!0)}function B(C){var T=At(u);(C||$.width!==T.width||$.height!==T.height)&&(It(k,"height",L()),l(c("marginRight"),re(n.gap)),l("width",F()),l("height",I(),!0),$=T,i(cn),h!==(h=w())&&(Dt(u,cr,h),i(fi,h)))}function M(C){var T=n.padding,A=c(C?"right":"left");return T&&re(T[A]||(Le(T)?0:T))||"0px"}function L(){var C="";return g&&(C=m(),Ae(C,"height or heightRatio is missing."),C="calc("+C+" - "+M(!1)+" - "+M(!0)+")"),C}function m(){return re(n.height||At(b).width*n.heightRatio)}function F(){return n.autoWidth?null:re(n.fixedWidth)||(g?"":N())}function I(){return re(n.fixedHeight)||(g?n.autoHeight?null:N():m())}function N(){var C=re(n.gap);return"calc((100%"+(C&&" + "+C)+")/"+(n.perPage||1)+(C&&" - "+C)+")"}function R(){return At(b)[c("width")]}function W(C,T){var A=y(C||0);return A?At(A.slide)[c("width")]+(T?0:H()):0}function _(C,T){var A=y(C);if(A){var V=At(A.slide)[c("right")],q=At(b)[c("left")];return wt(V-q)+(T?0:H())}return 0}function D(C){return _(t.length-1)-_(0)+W(0,C)}function H(){var C=y(0);return C&&parseFloat(It(C.slide,c("marginRight")))||0}function d(C){return parseFloat(It(k,c("padding"+(C?"Right":"Left"))))||0}function w(){return t.is(De)||D(!0)>R()}return{mount:v,resize:B,listSize:R,slideSize:W,sliderSize:D,totalSize:_,getPadding:d,isOverflow:w}}var Ni=2;function Mi(t,e,n){var o=vt(t),r=o.on,a=e.Elements,i=e.Slides,p=e.Direction.resolve,c=[],f;function u(){r(St,k),r([$t,be],y),(f=$())&&(l(f),e.Layout.resize(!0))}function k(){b(),u()}function b(){ae(c),qt(c),o.destroy()}function y(){var h=$();f!==h&&(f<h||!h)&&o.emit(St)}function l(h){var v=i.get().slice(),E=v.length;if(E){for(;v.length<h;)Qe(v,v);Qe(v.slice(-h),v.slice(0,h)).forEach(function(B,M){var L=M<h,m=g(B.slide,M);L?Pn(m,v[0].slide):je(a.list,m),Qe(c,m),i.register(m,M-h+(L?0:E),B.index)})}}function g(h,v){var E=h.cloneNode(!0);return zt(E,n.classes.clone),E.id=t.root.id+"-clone"+On(v+1),E}function $(){var h=n.clones;if(!t.is($e))h=0;else if(Me(h)){var v=n[p("fixedWidth")]&&e.Layout.slideSize(0),E=v&&We(At(a.track)[p("width")]/v);h=E||n[p("autoWidth")]&&t.length||n.perPage*Ni}return h}return{mount:u,destroy:b}}function Pi(t,e,n){var o=vt(t),r=o.on,a=o.emit,i=t.state.set,p=e.Layout,c=p.slideSize,f=p.getPadding,u=p.totalSize,k=p.listSize,b=p.sliderSize,y=e.Direction,l=y.resolve,g=y.orient,$=e.Elements,h=$.list,v=$.track,E;function B(){E=e.Transition,r([ee,cn,$t,St],M)}function M(){e.Controller.isBusy()||(e.Scroll.cancel(),m(t.index),e.Slides.update())}function L(A,V,q,at){A!==V&&C(A>q)&&(R(),F(N(D(),A>q),!0)),i(xe),a(Yt,V,q,A),E.start(V,function(){i(ve),a(Ce,V,q,A),at&&at()})}function m(A){F(_(A,!0))}function F(A,V){if(!t.is(De)){var q=V?A:I(A);It(h,"transform","translate"+l("X")+"("+q+"px)"),A!==q&&a(Jo)}}function I(A){if(t.is($e)){var V=W(A),q=V>e.Controller.getEnd(),at=V<0;(at||q)&&(A=N(A,q))}return A}function N(A,V){var q=A-w(V),at=b();return A-=g(at*(We(wt(q)/at)||1))*(V?1:-1),A}function R(){F(D(),!0),E.cancel()}function W(A){for(var V=e.Slides.get(),q=0,at=1/0,it=0;it<V.length;it++){var pt=V[it].index,z=wt(_(pt,!0)-A);if(z<=at)at=z,q=pt;else break}return q}function _(A,V){var q=g(u(A-1)-d(A));return V?H(q):q}function D(){var A=l("left");return At(h)[A]-At(v)[A]+g(f(!1))}function H(A){return n.trimSpace&&t.is(Se)&&(A=ue(A,0,g(b(!0)-k()))),A}function d(A){var V=n.focus;return V==="center"?(k()-c(A,!0))/2:+V*c(A)||0}function w(A){return _(A?e.Controller.getEnd():0,!!n.trimSpace)}function C(A){var V=g(N(D(),A));return A?V>=0:V<=h[l("scrollWidth")]-At(v)[l("width")]}function T(A,V){V=Me(V)?D():V;var q=A!==!0&&g(V)<g(w(!1)),at=A!==!1&&g(V)>g(w(!0));return q||at}return{mount:B,move:L,jump:m,translate:F,shift:N,cancel:R,toIndex:W,toPosition:_,getPosition:D,getLimit:w,exceededLimit:T,reposition:M}}function ji(t,e,n){var o=vt(t),r=o.on,a=o.emit,i=e.Move,p=i.getPosition,c=i.getLimit,f=i.toPosition,u=e.Slides,k=u.isEnough,b=u.getLength,y=n.omitEnd,l=t.is($e),g=t.is(Se),$=mt(D,!1),h=mt(D,!0),v=n.start||0,E,B=v,M,L,m;function F(){I(),r([$t,St,an],I),r(cn,N)}function I(){M=b(!0),L=n.perMove,m=n.perPage,E=C();var z=ue(v,0,y?E:M-1);z!==v&&(v=z,i.reposition())}function N(){E!==C()&&a(an)}function R(z,J,Y){if(!pt()){var K=_(z),tt=w(K);tt>-1&&(J||tt!==v)&&(q(tt),i.move(K,tt,B,Y))}}function W(z,J,Y,K){e.Scroll.scroll(z,J,Y,function(){var tt=w(i.toIndex(p()));q(y?Qt(tt,E):tt),K&&K()})}function _(z){var J=v;if(Zt(z)){var Y=z.match(/([+\-<>])(\d+)?/)||[],K=Y[1],tt=Y[2];K==="+"||K==="-"?J=H(v+ +(""+K+(+tt||1)),v):K===">"?J=tt?T(+tt):$(!0):K==="<"&&(J=h(!0))}else J=l?z:ue(z,0,E);return J}function D(z,J){var Y=L||(it()?1:m),K=H(v+Y*(z?-1:1),v,!(L||it()));return K===-1&&g&&!zo(p(),c(!z),1)?z?0:E:J?K:w(K)}function H(z,J,Y){if(k()||it()){var K=d(z);K!==z&&(J=z,z=K,Y=!1),z<0||z>E?!L&&(tn(0,z,J,!0)||tn(E,J,z,!0))?z=T(A(z)):l?z=Y?z<0?-(M%m||m):M:z:n.rewind?z=z<0?E:0:z=-1:Y&&z!==J&&(z=T(A(J)+(z<J?-1:1)))}else z=-1;return z}function d(z){if(g&&n.trimSpace==="move"&&z!==v)for(var J=p();J===f(z,!0)&&tn(z,0,t.length-1,!n.rewind);)z<v?--z:++z;return z}function w(z){return l?(z+M)%M||0:z}function C(){for(var z=M-(it()||l&&L?1:m);y&&z-- >0;)if(f(M-1,!0)!==f(z,!0)){z++;break}return ue(z,0,M-1)}function T(z){return ue(it()?z:m*z,0,E)}function A(z){return it()?Qt(z,E):rn((z>=E?M-1:z)/m)}function V(z){var J=i.toIndex(z);return g?ue(J,0,E):J}function q(z){z!==v&&(B=v,v=z)}function at(z){return z?B:v}function it(){return!Me(n.focus)||n.isNavigation}function pt(){return t.state.is([xe,Ne])&&!!n.waitForTransition}return{mount:F,go:R,scroll:W,getNext:$,getPrev:h,getAdjacent:D,getEnd:C,setIndex:q,getIndex:at,toIndex:T,toPage:A,toDest:V,hasFocus:it,isBusy:pt}}var Hi="http://www.w3.org/2000/svg",Oi="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",qe=40;function Bi(t,e,n){var o=vt(t),r=o.on,a=o.bind,i=o.emit,p=n.classes,c=n.i18n,f=e.Elements,u=e.Controller,k=f.arrows,b=f.track,y=k,l=f.prev,g=f.next,$,h,v={};function E(){M(),r($t,B)}function B(){L(),E()}function M(){var W=n.arrows;W&&!(l&&g)&&I(),l&&g&&(Ie(v,{prev:l,next:g}),Re(y,W?"":"none"),zt(y,h=Zn+"--"+n.direction),W&&(m(),R(),nt([l,g],Be,b.id),i(Uo,l,g)))}function L(){o.destroy(),Ut(y,h),$?(ae(k?[l,g]:y),l=g=null):Nt([l,g],Jn)}function m(){r([ee,Ce,St,se,an],R),a(g,"click",mt(F,">")),a(l,"click",mt(F,"<"))}function F(W){u.go(W,!0)}function I(){y=k||me("div",p.arrows),l=N(!0),g=N(!1),$=!0,je(y,[l,g]),!k&&Pn(y,b)}function N(W){var _='<button class="'+p.arrow+" "+(W?p.prev:p.next)+'" type="button"><svg xmlns="'+Hi+'" viewBox="0 0 '+qe+" "+qe+'" width="'+qe+'" height="'+qe+'" focusable="false"><path d="'+(n.arrowPath||Oi)+'" />';return Wo(_)}function R(){if(l&&g){var W=t.index,_=u.getPrev(),D=u.getNext(),H=_>-1&&W<_?c.last:c.prev,d=D>-1&&W>D?c.first:c.next;l.disabled=_<0,g.disabled=D<0,nt(l,Et,H),nt(g,Et,d),i(Go,l,g,_,D)}}return{arrows:v,mount:E,destroy:L,update:R}}var Di=Hn+"-interval";function Ui(t,e,n){var o=vt(t),r=o.on,a=o.bind,i=o.emit,p=un(n.interval,t.go.bind(t,">"),m),c=p.isPaused,f=e.Elements,u=e.Elements,k=u.root,b=u.toggle,y=n.autoplay,l,g,$=y==="pause";function h(){y&&(v(),b&&nt(b,Be,f.track.id),$||E(),L())}function v(){n.pauseOnHover&&a(k,"mouseenter mouseleave",function(I){l=I.type==="mouseenter",M()}),n.pauseOnFocus&&a(k,"focusin focusout",function(I){g=I.type==="focusin",M()}),b&&a(b,"click",function(){$?E():B(!0)}),r([Yt,pn,St],p.rewind),r(Yt,F)}function E(){c()&&e.Slides.isEnough()&&(p.start(!n.resetProgress),g=l=$=!1,L(),i(Gn))}function B(I){I===void 0&&(I=!0),$=!!I,L(),c()||(p.pause(),i(qn))}function M(){$||(l||g?B(!1):E())}function L(){b&&(Dt(b,le,!$),nt(b,Et,n.i18n[$?"play":"pause"]))}function m(I){var N=f.bar;N&&It(N,"width",I*100+"%"),i(Xo,I)}function F(I){var N=e.Slides.getAt(I);p.set(N&&+Rt(N.slide,Di)||n.interval)}return{mount:h,destroy:p.cancel,play:E,pause:B,isPaused:c}}function Gi(t,e,n){var o=vt(t),r=o.on;function a(){n.cover&&(r(Yn,mt(p,!0)),r([ee,$t,St],mt(i,!0)))}function i(c){e.Slides.forEach(function(f){var u=He(f.container||f.slide,"img");u&&u.src&&p(c,u,f)})}function p(c,f,u){u.style("background",c?'center/cover no-repeat url("'+f.src+'")':"",!0),Re(f,c?"none":"")}return{mount:a,destroy:mt(i,!1)}}var qi=10,Yi=600,Xi=.6,Ki=1.5,Ji=800;function Zi(t,e,n){var o=vt(t),r=o.on,a=o.emit,i=t.state.set,p=e.Move,c=p.getPosition,f=p.getLimit,u=p.exceededLimit,k=p.translate,b=t.is(Se),y,l,g=1;function $(){r(Yt,B),r([$t,St],M)}function h(m,F,I,N,R){var W=c();if(B(),I&&(!b||!u())){var _=e.Layout.sliderSize(),D=Ln(m)*_*rn(wt(m)/_)||0;m=p.toPosition(e.Controller.toDest(m%_))+D}var H=zo(W,m,1);g=1,F=H?0:F||on(wt(m-W)/Ki,Ji),l=N,y=un(F,v,mt(E,W,m,R),1),i(Ne),a(pn),y.start()}function v(){i(ve),l&&l(),a(se)}function E(m,F,I,N){var R=c(),W=m+(F-m)*L(N),_=(W-R)*g;k(R+_),b&&!I&&u()&&(g*=Xi,wt(_)<qi&&h(f(u(!0)),Yi,!1,l,!0))}function B(){y&&y.cancel()}function M(){y&&!y.isPaused()&&(B(),v())}function L(m){var F=n.easingFunc;return F?F(m):1-Math.pow(1-m,4)}return{mount:$,destroy:B,scroll:h,cancel:M}}var de={passive:!1,capture:!0};function Qi(t,e,n){var o=vt(t),r=o.on,a=o.emit,i=o.bind,p=o.unbind,c=t.state,f=e.Move,u=e.Scroll,k=e.Controller,b=e.Elements.track,y=e.Media.reduce,l=e.Direction,g=l.resolve,$=l.orient,h=f.getPosition,v=f.exceededLimit,E,B,M,L,m,F=!1,I,N,R;function W(){i(b,$n,An,de),i(b,wn,An,de),i(b,pr,D,de),i(b,"click",w,{capture:!0}),i(b,"dragstart",Bt),r([ee,$t],_)}function _(){var P=n.drag;st(!P),L=P==="free"}function D(P){if(I=!1,!N){var S=tt(P);K(P.target)&&(S||!P.button)&&(k.isBusy()?Bt(P,!0):(R=S?b:window,m=c.is([xe,Ne]),M=null,i(R,$n,H,de),i(R,wn,d,de),f.cancel(),u.cancel(),C(P)))}}function H(P){if(c.is(Ze)||(c.set(Ze),a(Oo)),P.cancelable)if(m){f.translate(E+Y(it(P)));var S=pt(P)>ho,U=F!==(F=v());(S||U)&&C(P),I=!0,a(Bo),Bt(P)}else V(P)&&(m=A(P),Bt(P))}function d(P){c.is(Ze)&&(c.set(ve),a(Do)),m&&(T(P),Bt(P)),p(R,$n,H),p(R,wn,d),m=!1}function w(P){!N&&I&&Bt(P,!0)}function C(P){M=B,B=P,E=h()}function T(P){var S=q(P),U=at(S),G=n.rewind&&n.rewindByDrag;y(!1),L?k.scroll(U,0,n.snap):t.is(De)?k.go($(Ln(S))<0?G?"<":"-":G?">":"+"):t.is(Se)&&F&&G?k.go(v(!0)?">":"<"):k.go(k.toDest(U),!0),y(!0)}function A(P){var S=n.dragMinThreshold,U=Le(S),G=U&&S.mouse||0,Z=(U?S.touch:+S)||10;return wt(it(P))>(tt(P)?Z:G)}function V(P){return wt(it(P))>wt(it(P,!0))}function q(P){if(t.is($e)||!F){var S=pt(P);if(S&&S<ho)return it(P)/S}return 0}function at(P){return h()+Ln(P)*Qt(wt(P)*(n.flickPower||600),L?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}function it(P,S){return J(P,S)-J(z(P),S)}function pt(P){return En(P)-En(z(P))}function z(P){return B===P&&M||B}function J(P,S){return(tt(P)?P.changedTouches[0]:P)["page"+g(S?"Y":"X")]}function Y(P){return P/(F&&t.is(Se)?Ii:1)}function K(P){var S=n.noDrag;return!Fe(P,"."+ir+", ."+hn)&&(!S||!Fe(P,S))}function tt(P){return typeof TouchEvent<"u"&&P instanceof TouchEvent}function ct(){return m}function st(P){N=P}return{mount:W,disable:st,isDragging:ct}}var ta={Spacebar:" ",Right:mn,Left:gn,Up:Zo,Down:Qo};function Qn(t){return t=Zt(t)?t:t.key,ta[t]||t}var vo="keydown";function ea(t,e,n){var o=vt(t),r=o.on,a=o.bind,i=o.unbind,p=t.root,c=e.Direction.resolve,f,u;function k(){b(),r($t,y),r($t,b),r(Yt,g)}function b(){var h=n.keyboard;h&&(f=h==="global"?window:p,a(f,vo,$))}function y(){i(f,vo)}function l(h){u=h}function g(){var h=u;u=!0,Lo(function(){u=h})}function $(h){if(!u){var v=Qn(h);v===c(gn)?t.go("<"):v===c(mn)&&t.go(">")}}return{mount:k,destroy:y,disable:l}}var Ee=Hn+"-lazy",en=Ee+"-srcset",na="["+Ee+"], ["+en+"]";function oa(t,e,n){var o=vt(t),r=o.on,a=o.off,i=o.bind,p=o.emit,c=n.lazyLoad==="sequential",f=[Ce,se],u=[];function k(){n.lazyLoad&&(b(),r(St,b))}function b(){qt(u),y(),c?h():(a(f),r(f,l),l())}function y(){e.Slides.forEach(function(v){jn(v.slide,na).forEach(function(E){var B=Rt(E,Ee),M=Rt(E,en);if(B!==E.src||M!==E.srcset){var L=n.classes.spinner,m=E.parentElement,F=He(m,"."+L)||me("span",L,m);u.push([E,v,F]),E.src||Re(E,"none")}})})}function l(){u=u.filter(function(v){var E=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(t.index,E)?g(v):!0}),u.length||a(f)}function g(v){var E=v[0];zt(v[1].slide,Rn),i(E,"load error",mt($,v)),nt(E,"src",Rt(E,Ee)),nt(E,"srcset",Rt(E,en)),Nt(E,Ee),Nt(E,en)}function $(v,E){var B=v[0],M=v[1];Ut(M.slide,Rn),E.type!=="error"&&(ae(v[2]),Re(B,""),p(Yn,B,M),p(be)),c&&h()}function h(){u.length&&g(u.shift())}return{mount:k,destroy:mt(qt,u),check:l}}function ra(t,e,n){var o=vt(t),r=o.on,a=o.emit,i=o.bind,p=e.Slides,c=e.Elements,f=e.Controller,u=f.hasFocus,k=f.getIndex,b=f.go,y=e.Direction.resolve,l=c.pagination,g=[],$,h;function v(){E(),r([$t,St,an],v);var N=n.pagination;l&&Re(l,N?"":"none"),N&&(r([Yt,pn,se],I),B(),I(),a(qo,{list:$,items:g},F(t.index)))}function E(){$&&(ae(l?te($.children):$),Ut($,h),qt(g),$=null),o.destroy()}function B(){var N=t.length,R=n.classes,W=n.i18n,_=n.perPage,D=u()?f.getEnd()+1:We(N/_);$=l||me("ul",R.pagination,c.track.parentElement),zt($,h=vn+"--"+m()),nt($,Gt,"tablist"),nt($,Et,W.select),nt($,Kn,m()===fn?"vertical":"");for(var H=0;H<D;H++){var d=me("li",null,$),w=me("button",{class:R.page,type:"button"},d),C=p.getIn(H).map(function(A){return A.slide.id}),T=!u()&&_>1?W.pageX:W.slideX;i(w,"click",mt(M,H)),n.paginationKeyboard&&i(w,"keydown",mt(L,H)),nt(d,Gt,"presentation"),nt(w,Gt,"tab"),nt(w,Be,C.join(" ")),nt(w,Et,Fn(T,H+1)),nt(w,fe,-1),g.push({li:d,button:w,page:H})}}function M(N){b(">"+N,!0)}function L(N,R){var W=g.length,_=Qn(R),D=m(),H=-1;_===y(mn,!1,D)?H=++N%W:_===y(gn,!1,D)?H=(--N+W)%W:_==="Home"?H=0:_==="End"&&(H=W-1);var d=g[H];d&&(Ro(d.button),b(">"+H),Bt(R,!0))}function m(){return n.paginationDirection||n.direction}function F(N){return g[f.toPage(N)]}function I(){var N=F(k(!0)),R=F(k());if(N){var W=N.button;Ut(W,le),Nt(W,uo),nt(W,fe,-1)}if(R){var _=R.button;zt(_,le),nt(_,uo,!0),nt(_,fe,"")}a(Yo,{list:$,items:g},N,R)}return{items:g,mount:v,destroy:E,getAt:F,update:I}}var ia=[" ","Enter"];function aa(t,e,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){t.splides.forEach(function(l){l.isParent||(f(t,l.splide),f(l.splide,t))}),o&&u()}function p(){a.forEach(function(l){l.destroy()}),qt(a)}function c(){p(),i()}function f(l,g){var $=vt(l);$.on(Yt,function(h,v,E){g.go(g.is($e)?E:h)}),a.push($)}function u(){var l=vt(t),g=l.on;g(Bn,b),g(Ko,y),g([ee,$t],k),a.push(l),l.emit(Un,t.splides)}function k(){nt(e.Elements.list,Kn,n.direction===fn?"vertical":"")}function b(l){t.go(l.index)}function y(l,g){Mn(ia,Qn(g))&&(b(l),Bt(g))}return{setup:mt(e.Media.set,{slideFocus:Me(r)?o:r},!0),mount:i,destroy:p,remount:c}}function la(t,e,n){var o=vt(t),r=o.bind,a=0;function i(){n.wheel&&r(e.Elements.track,"wheel",p,de)}function p(f){if(f.cancelable){var u=f.deltaY,k=u<0,b=En(f),y=n.wheelMinThreshold||0,l=n.wheelSleep||0;wt(u)>y&&b-a>l&&(t.go(k?"<":">"),a=b),c(k)&&Bt(f)}}function c(f){return!n.releaseWheel||t.state.is(xe)||e.Controller.getAdjacent(f)!==-1}return{mount:i}}var sa=90;function ca(t,e,n){var o=vt(t),r=o.on,a=e.Elements.track,i=n.live&&!n.isNavigation,p=me("span",Ai),c=un(sa,mt(u,!1));function f(){i&&(b(!e.Autoplay.isPaused()),nt(a,fo,!0),p.textContent="…",r(Gn,mt(b,!0)),r(qn,mt(b,!1)),r([Ce,se],mt(u,!0)))}function u(y){nt(a,mo,y),y?(je(a,p),c.start()):(ae(p),c.cancel())}function k(){Nt(a,[go,fo,mo]),ae(p)}function b(y){i&&nt(a,go,y?"off":"polite")}return{mount:f,disable:b,destroy:k}}var pa=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Ri,Slides:Vi,Layout:zi,Clones:Mi,Move:Pi,Controller:ji,Arrows:Bi,Autoplay:Ui,Cover:Gi,Scroll:Zi,Drag:Qi,Keyboard:ea,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:Fi,i18n:ua,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(t,e,n){var o=e.Slides;function r(){vt(t).on([ee,St],a)}function a(){o.forEach(function(p){p.style("transform","translateX(-"+100*p.index+"%)")})}function i(p,c){o.style("transition","opacity "+n.speed+"ms "+n.easing),Lo(c)}return{mount:r,start:i,cancel:An}}function ma(t,e,n){var o=e.Move,r=e.Controller,a=e.Scroll,i=e.Elements.list,p=mt(It,i,"transition"),c;function f(){vt(t).bind(i,"transitionend",function(y){y.target===i&&c&&(k(),c())})}function u(y,l){var g=o.toPosition(y,!0),$=o.getPosition(),h=b(y);wt(g-$)>=1&&h>=1?n.useScroll?a.scroll(g,h,!1,l):(p("transform "+h+"ms "+n.easing),o.translate(g,!0),c=l):(o.jump(y),l())}function k(){p(""),a.cancel()}function b(y){var l=n.rewindSpeed;if(t.is(Se)&&l){var g=r.getIndex(!0),$=r.getEnd();if(g===0&&y>=$||g>=$&&y===0)return l}return n.speed}return{mount:f,start:u,cancel:k}}var fa=(function(){function t(n,o){this.event=vt(),this.Components={},this.state=yi(ge),this.splides=[],this._o={},this._E={};var r=Zt(n)?Vo(document,n):n;Ae(r,r+" is invalid."),this.root=r,o=Kt({label:Rt(r,Et)||"",labelledby:Rt(r,Xn)||""},da,t.defaults,o||{});try{Kt(o,JSON.parse(Rt(r,Hn)))}catch{Ae(!1,"Invalid JSON")}this._o=Object.create(Kt({},o))}var e=t.prototype;return e.mount=function(o,r){var a=this,i=this.state,p=this.Components;Ae(i.is([ge,nn]),"Already mounted!"),i.set(ge),this._C=p,this._T=r||this._T||(this.is(De)?ga:ma),this._E=o||this._E;var c=Ie({},pa,this._E,{Transition:this._T});return ie(c,function(f,u){var k=f(a,p,a._o);p[u]=k,k.setup&&k.setup()}),ie(p,function(f){f.mount&&f.mount()}),this.emit(ee),zt(this.root,Ei),i.set(ve),this.emit(kn),this},e.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ve)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},e.go=function(o){return this._C.Controller.go(o),this},e.on=function(o,r){return this.event.on(o,r),this},e.off=function(o){return this.event.off(o),this},e.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(te(arguments,1))),this},e.add=function(o,r){return this._C.Slides.add(o,r),this},e.remove=function(o){return this._C.Slides.remove(o),this},e.is=function(o){return this._o.type===o},e.refresh=function(){return this.emit(St),this},e.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(ge)?vt(this).on(kn,this.destroy.bind(this,o)):(ie(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Dn),r.destroy(),o&&qt(this.splides),a.set(nn)),this},ui(t,[{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()}}]),t})(),to=fa;to.defaults={};to.STATES=gi;var bo=[[ee,"onMounted"],[kn,"onReady"],[Yt,"onMove"],[Ce,"onMoved"],[Bn,"onClick"],[Mo,"onActive"],[Po,"onInactive"],[jo,"onVisible"],[Ho,"onHidden"],[St,"onRefresh"],[$t,"onUpdated"],[be,"onResize"],[cn,"onResized"],[Oo,"onDrag"],[Bo,"onDragging"],[Do,"onDragged"],[pn,"onScroll"],[se,"onScrolled"],[Dn,"onDestroy"],[Uo,"onArrowsMounted"],[Go,"onArrowsUpdated"],[qo,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[Un,"onNavigationMounted"],[Gn,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[qn,"onAutoplayPause"],[Yn,"onLazyLoadLoaded"]];function eo(...t){return t.filter(Boolean).join(" ")}function ln(t){return t!==null&&typeof t=="object"}function Wn(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((n,o)=>!Wn(n,e[o]));if(ln(t)&&ln(e)){const n=Object.keys(t),o=Object.keys(e);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(e,r)||!Wn(t[r],e[r]))}return t===e}function ya(t,e){return t.length===e.length&&!t.some((n,o)=>n!==e[o])}function ha(t,e){if(t){const n=Object.keys(t);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&e(t[r],r)===!1)break}}return t}function Vn(t,e){const n=t;return ha(e,(o,r)=>{Array.isArray(o)?n[r]=o.slice():ln(o)?n[r]=Vn(ln(n[r])?n[r]:{},o):n[r]=o}),n}var va=({children:t,className:e,...n})=>j.createElement("div",{className:eo("splide__track",e),...n},j.createElement("ul",{className:"splide__list"},t)),ur=class extends j.Component{constructor(){super(...arguments),this.splideRef=j.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new to(o,t),this.bind(this.splide),this.splide.mount(e,n),this.options=Vn({},t||{}),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:t}=this.props;t&&!Wn(this.options,t)&&(this.splide.options=t,this.options=Vn({},t));const e=this.getSlides();ya(this.slides,e)||(this.splide.refresh(),this.slides=e)}sync(t){var e;(e=this.splide)==null||e.sync(t)}go(t){var e;(e=this.splide)==null||e.go(t)}getSlides(){var t;if(this.splide){const e=(t=this.splide.Components.Elements)==null?void 0:t.list.children;return e&&Array.prototype.slice.call(e)||[]}return[]}bind(t){bo.forEach(([e,n])=>{const o=this.props[n];typeof o=="function"&&t.on(e,(...r)=>{o(t,...r)})})}omit(t,e){return e.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:e="div",hasTrack:n=!0,children:o,...r}=this.props;return j.createElement(e,{className:eo("splide",t),ref:this.splideRef,...this.omit(r,["options",...bo.map(a=>a[1])])},n?j.createElement(va,null,o):o)}},dr=({children:t,className:e,...n})=>j.createElement("li",{className:eo("splide__slide",e),...n},t);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const ma="RichTextRenderer-module__link___BWeZ2",fa={link:ma},lr=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?S.jsx("a",{className:fa.link,href:o.value,target:o.target,children:t(o.children)},r):S.jsx("span",{style:ha(o),children:o.text},r));return S.jsx(S.Fragment,{children:e.map((n,o)=>{const r=n.children;return S.jsx("div",{children:t(r)},o)})})};function ha(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 ya="SvgImage-module__svg___q3xE-",va="SvgImage-module__img___VsTm-",ho={svg:ya,img:va},ba=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Sa=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,gt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=j.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return j.useEffect(()=>{if(typeof window<"u"&&window.CSS){const l=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(l)}},[]),!ba(e)||!a?S.jsx("img",{src:e,alt:"",className:de(ho.img,o),style:r}):S.jsx("span",{"data-supports-mask":a,className:de(ho.svg,o),style:{"--svg":Sa(e),"--fill":t,"--hover-fill":n,...r??{}}})},xa={"top-left":G.topLeftAlignment,"top-center":G.topCenterAlignment,"top-right":G.topRightAlignment,"middle-left":G.middleLeftAlignment,"middle-center":G.middleCenterAlignment,"middle-right":G.middleRightAlignment,"bottom-left":G.bottomLeftAlignment,"bottom-center":G.bottomCenterAlignment,"bottom-right":G.bottomRightAlignment};function Ca({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=j.useState(null),{widthSettings:i,fontSettings:l,letterSpacing:s,textAlign:p,wordSpacing:c,fontSizeLineHeight:_,textAppearance:v,color:g}=n.imageCaption,[u,d]=j.useState(void 0),[x,f]=j.useState(null),[h,$]=j.useState(0),[M,O]=j.useState(0),{direction:w,transition:y,controls:L,pagination:B,imageCaption:N,triggers:R}=e,V=j.useRef(y.type),{x:P,y:U}=e.controls.offset,H=m=>{r&&r.go(m)};return j.useEffect(()=>{if(!x)return;const m=new ResizeObserver(k=>{if(!r)return;const[E]=k;d({width:Math.round(E.contentRect.width),height:Math.round(E.contentRect.height)})});return m.observe(x),()=>m.unobserve(x)},[x]),j.useEffect(()=>{!r||V.current===y.type||(O(m=>m+1),V.current=y.type)},[y.type]),S.jsx("div",{className:de(G.wrapper,{[G.editor]:o}),ref:f,children:S.jsxs("div",{className:G.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:y.backgroundColor&&y.type==="fade in"?y.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&S.jsx("div",{className:de(G.captionBlock),children:S.jsx("div",{className:G.captionTextWrapper,children:t.map((m,k)=>S.jsx("div",{className:de(G.captionText,xa[N.alignment],{[G.withPointerEvents]:k===h&&o,[G.active]:k===h}),style:{fontFamily:l.fontFamily,fontWeight:l.fontWeight,fontStyle:l.fontStyle,width:i.sizing==="auto"?"max-content":I.scalingValue(i.width,o),letterSpacing:I.scalingValue(s,o),wordSpacing:I.scalingValue(c,o),textAlign:p,fontSize:I.scalingValue(_.fontSize,o),lineHeight:I.scalingValue(_.lineHeight,o),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:g,transitionDuration:y.duration?`${Math.round(parseInt(y.duration)/2)}ms`:"500ms"},children:S.jsx("div",{"data-styles":"imageCaption",className:G.captionTextInner,style:{"--link-hover-color":N.linkHoverColor,"--link-color":N.linkColor,position:"relative",top:I.scalingValue(N.offset.y,o),left:I.scalingValue(N.offset.x,o)},children:S.jsx(lr,{content:m.imageCaption})})},k))})}),S.jsx(ir,{onMove:m=>{$(m.index)},ref:a,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:w==="horiz"||y.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:y.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((m,k)=>S.jsx(ar,{children:S.jsx("div",{className:G.sliderItem,children:S.jsx("div",{className:G.imgWrapper,children:S.jsx("img",{className:de(G.sliderImage,{[G.contain]:m.image.objectFit==="contain",[G.cover]:m.image.objectFit==="cover"}),src:m.image.url,alt:m.image.name??""})})})},k))},M),L.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:de(G.arrow,{[G.arrowVertical]:w==="vert",[G.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:S.jsxs("button",{onClick:()=>{H("-1")},className:G.arrowInner,style:{transform:`translate(${I.scalingValue(P,o)}, ${I.scalingValue(U*(w==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&S.jsx(gt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:de(G.arrowImg,G.mirror)}),!L.arrowsImgUrl&&S.jsx(yo,{color:L.color,className:de(G.arrowIcon,G.arrowImg,G.mirror)})]})}),S.jsx("div",{className:de(G.arrow,G.nextArrow,{[G.arrowVertical]:w==="vert",[G.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:S.jsxs("button",{className:G.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${I.scalingValue(P*(w==="horiz"?-1:1),o)}, ${I.scalingValue(U,o)}) scale(${e.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&S.jsx(gt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:G.arrowImg}),!L.arrowsImgUrl&&S.jsx(yo,{color:L.color,className:de(G.arrowIcon,G.arrowImg)})]})})]}),R.triggersList.click&&S.jsx("div",{className:G.clickOverlay,onClick:()=>{r&&r.go("+1")}}),B.isActive&&S.jsx("div",{className:de(G.pagination,{[G.paginationInsideBottom]:B.position==="inside-1"&&w==="horiz",[G.paginationInsideTop]:B.position==="inside-2"&&w==="horiz",[G.paginationOutsideBottom]:B.position==="outside-1"&&w==="horiz",[G.paginationOutsideTop]:B.position==="outside-2"&&w==="horiz",[G.paginationInsideLeft]:B.position==="inside-1"&&w==="vert",[G.paginationInsideRight]:B.position==="inside-2"&&w==="vert",[G.paginationOutsideLeft]:B.position==="outside-1"&&w==="vert",[G.paginationOutsideRight]:B.position==="outside-2"&&w==="vert",[G.paginationVertical]:w==="vert"}),children:S.jsx("div",{className:G.paginationInner,style:{backgroundColor:B.colors[2],transform:`scale(${B.scale/100}) translate(${I.scalingValue(B.offset.x,o)}, ${I.scalingValue(B.offset.y,o)}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:t.map((m,k)=>S.jsx("button",{onClick:()=>{r&&r.go(k)},className:de(G.paginationItem),children:S.jsx("div",{className:de(G.dot,{[G.activeDot]:k===h}),style:{backgroundColor:k===h?B.colors[0]:B.colors[1],"--pagination-hover-color":B.hover}})},k))})})]})})}function yo({color:e,className:t}){return S.jsx("svg",{viewBox:"0 0 10 18",className:t,children:S.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:S.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 $a={element:Ca,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"]}},_a="ImageRevealSlider-module__imageRevealSlider___UE5Ob",wa="ImageRevealSlider-module__image___Qjt-e",Ta="ImageRevealSlider-module__link___N-iLG",Ea="ImageRevealSlider-module__cursor___2U03d",lt={imageRevealSlider:_a,image:wa,link:Ta,cursor:Ea};function vo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,l=a/2,s=i/2;if(e>=o.x-l&&e<=o.x+l&&t>=o.y-s&&t<=o.y+s)return!0}return!1}function xn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function La(e,t,n,o){let r,a;if(t==="custom"){r=n;const i=await xn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await xn(e);a=i.height/i.width*r}else{const i=await xn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Aa({settings:e,content:t,isEditor:n}){const[o,r]=j.useState(null),[a,i]=j.useState([]),[l,s]=j.useState(0),p=j.useRef(0),[c,_]=j.useState({x:0,y:0}),[v,g]=j.useState(1),[u,d]=j.useState("none"),x=j.useRef({x:0,y:0}),[f,h]=j.useState(!1),{sizeType:$,imageWidth:M,randomRangeImageWidth:O}=e.imageSize,{revealPosition:w,visible:y}=e.position,{cursorType:L,target:B,defaultCursorScale:N,defaultCursor:R,hoverCursorScale:V,hoverCursor:P}=e.cursor;j.useEffect(()=>{if(!o)return;const m=(T,C)=>{const F=o.getBoundingClientRect(),Y=T-F.left,re=C-F.top;if(_({x:Y,y:re}),L==="system"){d("none"),g(1);return}const te=Y,ie=re,A=document.elementFromPoint(F.left+te,F.top+ie);if(A&&A.closest("a")){d("none"),g(1);return}const K=vo(te,ie,a)||B==="area"?{img:P??"none",scale:V}:{img:R??"none",scale:N};d(K.img),g(K.scale)},k=T=>{T.stopPropagation(),x.current={x:T.clientX,y:T.clientY},m(T.clientX,T.clientY)},E=()=>{f&&m(x.current.x,x.current.y)};return o.addEventListener("mousemove",k),window.addEventListener("scroll",E,!0),()=>{o.removeEventListener("mousemove",k),window.removeEventListener("scroll",E,!0)}},[o,f,c,L,B,P,R,V,N,a]),j.useEffect(()=>{f||(d("none"),g(0))},[f]);const U=async(m,k,E,T={})=>{const{width:C,height:F,finalWidth:Y}=await La(m.image.url,$,M,O);let re=0,te=0;w==="same"?(re=k/2,te=E/2):(re=T.x??Math.random()*k,te=T.y??Math.random()*E);const ie=Math.min(Math.max(re,C/2),k-C/2),A=Math.min(Math.max(te,F/2),E-F/2);return{id:p.current++,url:m.image.url,link:m.link,name:m.image.name,x:ie,y:A,width:Y}};j.useEffect(()=>{if(!o||t.length===0)return;const m=o.getBoundingClientRect(),k=m.width,E=m.height,T=[];(async()=>{const F=t[0],Y=await U(F,k,E);T.push(Y),i(T),s(1)})()},[$,M,O,w,o]),j.useEffect(()=>{y==="last One"&&i(m=>m.length>0?[m[m.length-1]]:[])},[y]);const H=async m=>{if(!o)return;const k=o.getBoundingClientRect(),E=m.clientX-k.left,T=m.clientY-k.top;if(B==="image"&&!vo(E,T,a))return;let C=0,F=0;w==="on Click"?(C=E,F=T):w==="same"?(C=k.width/2,F=k.height/2):(C=Math.random()*k.width,F=Math.random()*k.height);const Y=t[l],re=await U(Y,k.width,k.height,{x:C,y:F});i(te=>y==="all"?[...te,re]:[re]),s(te=>te>=t.length-1?0:te+1)};return S.jsxs("div",{ref:r,onClick:H,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),className:lt.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[a.map(m=>S.jsx("div",{className:lt.wrapper,style:{top:`${m.y}px`,left:`${m.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:m.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:B==="area"&&m.link?S.jsx("a",{href:m.link,target:"_blank",className:lt.link,children:S.jsx("img",{src:m.url,alt:m.name,className:lt.image},m.id)}):S.jsx("img",{src:m.url,alt:m.name,className:lt.image},m.id)},m.id)),f&&S.jsx("div",{className:lt.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ia={element:Aa,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:""}]}}}},ka="LightBox-module__hidden___9s-9x",Fa="LightBox-module__heroImage___sTxNF",Ra="LightBox-module__background___rm9ml",Ba="LightBox-module__editor___4ACaY",Va="LightBox-module__contentStyle___Bgnsq",Pa="LightBox-module__imageStyle___tLIlB",Oa="LightBox-module__imgWrapper___LuFUp",Wa="LightBox-module__contain___8-yaS",Na="LightBox-module__cover___hNvOG",za="LightBox-module__caption___b6L2I",ja="LightBox-module__captionTextInner___rCGNH",Ma="LightBox-module__lightboxSplide___XFuWC",Ha="LightBox-module__arrow___iz38X",Da="LightBox-module__arrowVertical___Zfz81",Ua="LightBox-module__nextArrow___zkAQN",Ga="LightBox-module__arrowInner___p48sW",Ya="LightBox-module__arrowIcon___3VaFf",qa="LightBox-module__arrowImg___pNV88",Xa="LightBox-module__mirror___pjeXc",Ka="LightBox-module__thumbsWrapper___GB-nU",Ja="LightBox-module__thumbsContainerVertical___wttk5",Za="LightBox-module__thumbsContainer___osSma",Qa="LightBox-module__thumbsAlignStart___MO6tY",el="LightBox-module__thumbsAlignCenter___Q4sUx",tl="LightBox-module__thumbsAlignEnd___p4y9R",nl="LightBox-module__thumbItem___HvnF3",ol="LightBox-module__closeButton___g2khP",rl="LightBox-module__fadeIn___0m5GW",il="LightBox-module__slideInLeft___gPYwC",al="LightBox-module__slideInRight___S-pPp",ll="LightBox-module__slideInTop___DFdAj",sl="LightBox-module__slideInBottom___m27kZ",cl="LightBox-module__fadeOut___55qBR",ul="LightBox-module__slideOutLeft___NvU7P",pl="LightBox-module__slideOutRight___SK7eC",dl="LightBox-module__slideOutTop___Vgg0z",gl="LightBox-module__slideOutBottom___nJ0Ef",ml="LightBox-module__scaleSlide___vZriG",W={hidden:ka,heroImage:Fa,background:Ra,editor:Ba,contentStyle:Va,imageStyle:Pa,imgWrapper:Oa,contain:Wa,cover:Na,caption:za,captionTextInner:ja,lightboxSplide:Ma,arrow:Ha,arrowVertical:Da,nextArrow:Ua,arrowInner:Ga,arrowIcon:Ya,arrowImg:qa,mirror:Xa,thumbsWrapper:Ka,thumbsContainerVertical:Ja,thumbsContainer:Za,thumbsAlignStart:Qa,thumbsAlignCenter:el,thumbsAlignEnd:tl,thumbItem:nl,closeButton:ol,fadeIn:rl,slideInLeft:il,slideInRight:al,slideInTop:ll,slideInBottom:sl,fadeOut:cl,slideOutLeft:ul,slideOutRight:pl,slideOutTop:dl,slideOutBottom:gl,scaleSlide:ml},Dt=(e,t,n)=>{const o={},[r,a]=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"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${I.scalingValue(t.x,n)}), calc(-50% + ${I.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${I.scalingValue(t.x,n)}, calc(-50% + ${I.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${I.scalingValue(t.x,n)}), ${I.scalingValue(t.y,n)})`:o.transform=`translate(${I.scalingValue(t.x,n)}, ${I.scalingValue(t.y,n)})`,o};function sr(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 bo(e){const t=e.getBoundingClientRect(),n=sr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,l=o/r,s=a/i;let p,c;s>l?(p=o,c=o/s):(c=r,p=r*s);const _=t.left+n.left,v=t.top+n.top,g=(o-p)/2+_,u=(r-c)/2+v;return{x:g,y:u,width:p,height:c}}function So(e){const t=e.getBoundingClientRect(),n=sr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function xo(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 fl(e,t){const n=(()=>{if(e==="fade in")return W.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return W.slideInLeft;case"right":return W.slideInRight;case"top":return W.slideInTop;case"bottom":return W.slideInBottom;default:return W.slideInRight}return W.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return W.fadeIn;if(e==="slide in")switch(t){case"left":return W.slideInLeft;case"right":return W.slideInRight;case"top":return W.slideInTop;case"bottom":return W.slideInBottom;default:return W.slideInRight}return W.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return W.fadeOut;if(e==="slide in")switch(t){case"left":return W.slideOutLeft;case"right":return W.slideOutRight;case"top":return W.slideOutTop;case"bottom":return W.slideOutBottom;default:return W.slideOutRight}return W.fadeOut})(),a=(()=>{if(e==="fade in")return W.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return W.slideOutLeft;case"right":return W.slideOutRight;case"top":return W.slideOutTop;case"bottom":return W.slideOutBottom;default:return W.slideOutRight}return W.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const hl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,l]=j.useState(!1),{url:s}=e.thumbnailBlock.cover;return j.useEffect(()=>{r==="close"&&l(!1),r==="open"&&l(!0)},[r]),S.jsxs(S.Fragment,{children:[S.jsx("img",{src:s,alt:"Cover",className:W.heroImage,onClick:()=>l(!0)}),S.jsx(yl,{isOpen:i,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},yl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:l})=>{var z;const[s,p]=j.useState(0),[c,_]=j.useState(0),[v,g]=j.useState(!1),[u,d]=j.useState(!1),[x,f]=j.useState({}),h=j.useRef(null),$=j.useRef(null),M=j.useRef(null),O=j.useRef(!1),w=j.useRef(null),y=j.useRef(null),L=j.useRef(null),B=j.useRef(null),N=j.useRef(!1),R=j.useRef(null),[V,P]=j.useState(!1),{appear:U,triggers:H,slider:m,thumbnail:k,controls:E,area:T,caption:C,layout:F}=r.lightboxBlock,{appearClass:Y,backdropAppearClass:re,backdropDisappearClass:te,disappearClass:ie}=fl(U.type,U.direction),A=(l==null?void 0:l.itemId)??null;j.useEffect(()=>{const b=()=>{setTimeout(()=>{var q,J;(J=(q=h.current)==null?void 0:q.splide)==null||J.refresh()},16)},D=()=>{_(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",b),window.addEventListener("ArticleEditor.ComponentContent:change",D),()=>{window.removeEventListener("ArticleEditor.Layout:change",b),window.removeEventListener("ArticleEditor.ComponentContent:change",D)}},[]),j.useEffect(()=>{if(!e||!k.isActive){P(!1);return}const b=R.current;if(!b)return;const D=()=>{m.direction==="horiz"?P(b.scrollWidth>b.clientWidth):P(b.scrollHeight>b.clientHeight)};D();const q=new ResizeObserver(D);return q.observe(b),()=>q.disconnect()},[e,k.isActive,n.length,x,m.direction]);const K=j.useCallback(()=>{const b=window.matchMedia("(max-width: 768px)").matches,D=xo(T.color);b&&!i&&D>.9&&(document.body.style.backgroundColor=""),g(!0),O.current=!0;const q=J=>{J.target===w.current&&J.animationName&&(w.current&&y.current&&w.current.removeEventListener("animationend",y.current),y.current=null,O.current&&(O.current=!1,t()),g(!1))};w.current&&(y.current=q,w.current.addEventListener("animationend",q))},[t,T.color,i]),me=(b,D,q)=>{var J,ne;if(b){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&s===n.length-1?K():(J=h.current)==null||J.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const Q=b.getBoundingClientRect(),X=D-Q.left,oe=q-Q.top,ye=Q.width,ae=Q.height;let pe;m.direction==="horiz"?pe=X<ye/2?"-1":"+1":pe=oe<ae/2?"-1":"+1",(ne=h.current)==null||ne.go(pe)}}},se=b=>{if(N.current){N.current=!1;return}const D=n[s],q=(D==null?void 0:D.image.objectFit)==="cover";let J,ne;if("changedTouches"in b&&b.changedTouches.length>0)J=b.changedTouches[0].clientX,ne=b.changedTouches[0].clientY;else if("clientX"in b)J=b.clientX,ne=b.clientY;else return;let Q;if(q&&M.current){const X=So(M.current);Q=J>=X.left&&J<=X.right&&ne>=X.top&&ne<=X.bottom}else{const X=M.current?bo(M.current):null;if(!X){b.target===b.currentTarget&&K();return}Q=J>=X.x&&J<=X.x+X.width&&ne>=X.y&&ne<=X.y+X.height}Q?me(M.current,J,ne):K()},fe=b=>{const D=b.target;(D.classList.contains(W.thumbsWrapper)||D.classList.contains(W.thumbsContainer))&&se(b)};j.useEffect(()=>{if(!e)return;const b=D=>{var q,J;if(D.key==="Escape"){K();return}if(D.key==="ArrowRight"){p(ne=>(ne+1)%Math.max(n.length,1)),(q=h.current)==null||q.go("+1");return}D.key==="ArrowLeft"&&(p(ne=>(ne-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=h.current)==null||J.go("-1"))};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[e,K,n.length]),j.useEffect(()=>{if(e){if(p(0),_(D=>D+1),O.current=!1,g(!1),d(!1),f({}),!A)return;const b=new CustomEvent("page-overlay",{detail:{itemId:A}});window.dispatchEvent(b)}return()=>{w.current&&y.current&&(w.current.removeEventListener("animationend",y.current),y.current=null),d(!1)}},[e,A]),j.useEffect(()=>{$.current!==null&&$.current!==m.type&&_(b=>b+1),$.current=m.type},[m.type]),j.useEffect(()=>{if(!e)return;const b=document.body.style.overflow,D=window.matchMedia("(max-width: 768px)").matches,q=xo(T.color);document.body.style.overflow="hidden",d(!1);const J=Q=>{Q.target===w.current&&!O.current&&Q.animationName&&(D&&!i&&q>.9&&(document.body.style.backgroundColor=T.color),d(!0),w.current&&L.current&&w.current.removeEventListener("animationend",L.current),L.current=null)};w.current&&(L.current=J,w.current.addEventListener("animationend",J));const ne=Q=>{const X=Q.target;X&&(X.closest(`.${W.thumbsWrapper}`)||X.closest(`.${W.thumbsContainer}`))||m.type!=="slide"&&Q.preventDefault()};return document.addEventListener("touchmove",ne,{passive:!1}),()=>{document.body.style.overflow=b,document.removeEventListener("touchmove",ne),w.current&&L.current&&(w.current.removeEventListener("animationend",L.current),L.current=null),d(!1)}},[e,i,T.color,m.type]),j.useEffect(()=>{if(!e)return;const b=D=>{var J,ne;if(O.current){D.stopPropagation();return}if(N.current){N.current=!1;return}const q=D.target;if(!(q&&(q.closest(`.${W.thumbsContainer}`)||q.closest(`.${W.thumbItem}`)))){if(m.type==="slide"&&H.type==="drag"&&((ne=(J=h.current)==null?void 0:J.splide)!=null&&ne.root)){const Q=h.current.splide.root;if(q&&(Q.contains(q)||Q===q))return}if(D.touches.length===0&&D.changedTouches.length>0){const Q=n[s],X=(Q==null?void 0:Q.image.objectFit)==="cover",oe=D.changedTouches[0];let ye;if(X&&M.current){const ae=So(M.current);ye=oe.clientX>=ae.left&&oe.clientX<=ae.right&&oe.clientY>=ae.top&&oe.clientY<=ae.bottom}else{const ae=M.current?bo(M.current):null;if(!ae)return;ye=oe.clientX>=ae.x&&oe.clientX<=ae.x+ae.width&&oe.clientY>=ae.y&&oe.clientY<=ae.y+ae.height}if(!ye){D.stopPropagation(),O.current=!0;const ae=pe=>{pe.stopPropagation(),pe.preventDefault(),document.removeEventListener("click",ae,!0)};document.addEventListener("click",ae,!0),K()}}}};return document.addEventListener("touchend",b,{passive:!0}),()=>{document.removeEventListener("touchend",b)}},[e,K,s,n]);const Se=(m.type==="scale"||m.type==="fade")&&m.direction==="vert"&&H.type==="drag";j.useEffect(()=>{var pe,Ve;if(!e||!Se||!((Ve=(pe=h.current)==null?void 0:pe.splide)!=null&&Ve.root))return;const b=h.current.splide.root,D=30,q=(ee,ce)=>{if(B.current){const $e=Math.abs(ee-B.current.x),Ge=Math.abs(ce-B.current.y);($e>0||Ge>0)&&(N.current=!0)}},J=ee=>{B.current&&(ee.preventDefault(),q(ee.clientX,ee.clientY))},ne=ee=>{B.current&&ee.touches.length>0&&(ee.preventDefault(),q(ee.touches[0].clientX,ee.touches[0].clientY))},Q=(ee,ce)=>{if(!B.current||!h.current){B.current=null;return}const $e=Math.abs(ee-B.current.x),Ge=Math.abs(ce-B.current.y);Ge>D&&Ge>$e&&h.current.go(ce<B.current.y?"+1":"-1"),B.current=null},X=ee=>{B.current&&Q(ee.clientX,ee.clientY),document.removeEventListener("pointerup",X),document.removeEventListener("pointercancel",X),document.removeEventListener("pointermove",J)},oe=ee=>{if(B.current){if(ee.changedTouches.length>0){const ce=ee.changedTouches[0];Q(ce.clientX,ce.clientY)}document.removeEventListener("touchend",oe),document.removeEventListener("touchcancel",oe),document.removeEventListener("touchmove",ne)}},ye=ee=>{B.current={x:ee.clientX,y:ee.clientY},N.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",X),document.addEventListener("pointercancel",X)},ae=ee=>{ee.touches.length>0&&(B.current={x:ee.touches[0].clientX,y:ee.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",oe),document.addEventListener("touchcancel",oe))};return b.addEventListener("pointerdown",ye),b.addEventListener("touchstart",ae),()=>{b.removeEventListener("pointerdown",ye),b.removeEventListener("touchstart",ae),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",X),document.removeEventListener("pointercancel",X),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",oe),document.removeEventListener("touchcancel",oe),B.current=null,N.current=!1}},[e,Se,c]);const Ue={backgroundColor:T.color,backdropFilter:`blur(${T.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:mr.createPortal(S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:i?null:w,className:de(W.background,v?te:re,{[W.editor]:i},{[W.hidden]:!e}),style:{...Ue,...u&&!i&&!v?{position:"absolute"}:{}}}),S.jsxs("div",{ref:i?w:null,className:de(W.contentStyle,v?ie:Y,{[W.editor]:i},{[W.hidden]:!e}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[S.jsx(ir,{onMove:b=>p(b.index),ref:h,className:W.lightboxSplide,options:{arrows:!1,speed:m.duration?parseInt(m.duration):500,direction:m.direction==="horiz"||m.type==="fade"||m.type==="scale"?"ltr":"ttb",pagination:!1,drag:H.type==="drag"&&!Se,perPage:1,width:"100%",height:"100%",type:m.type==="fade"||m.type==="scale"?"fade":"loop",padding:0,rewind:H.repeat!=="close",start:0},style:{"--splide-speed":m.duration},children:n.map((b,D)=>{const q=Dt(F.position,F.offset,i),J=`${I.scalingValue(F.padding.top,i)} ${I.scalingValue(F.padding.right,i)} ${I.scalingValue(F.padding.bottom,i)} ${I.scalingValue(F.padding.left,i)}`,ne=m.type==="scale"?(()=>{const{transform:Q,...X}=q;return{...X,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":Q||"none"}})():{...q,position:"absolute",padding:J,boxSizing:"border-box"};return S.jsx(ar,{children:S.jsx("div",{className:W.imgWrapper,onClick:se,children:S.jsx("img",{ref:D===s?M:null,className:de(W.imageStyle,{[W.contain]:b.image.objectFit==="contain",[W.cover]:b.image.objectFit==="cover",[W.scaleSlide]:m.type==="scale"}),src:b.image.url,alt:b.image.name??"",style:{...ne,pointerEvents:b.image.objectFit==="contain"?"none":"auto"}})})},D)})},c),E.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:de(W.arrow,{[W.arrowVertical]:m.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:S.jsxs("button",{className:W.arrowInner,style:{transform:`translate(${I.scalingValue(E.offset.x,i)}, ${I.scalingValue(E.offset.y*(m.direction==="horiz"?1:-1),i)}) scale(${E.scale}) rotate(${m.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=h.current)==null?void 0:b.go("-1")},"aria-label":"Previous",children:[E.arrowsImgUrl&&S.jsx(gt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:de(W.arrowImg,W.mirror)}),!E.arrowsImgUrl&&S.jsx(Co,{color:E.color,className:de(W.arrowIcon,W.arrowImg,W.mirror)})]})}),S.jsx("div",{className:de(W.arrow,W.nextArrow,{[W.arrowVertical]:m.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:S.jsxs("button",{className:W.arrowInner,style:{transform:`translate(${I.scalingValue(E.offset.x*(m.direction==="horiz"?-1:1),i)}, ${I.scalingValue(E.offset.y,i)}) scale(${E.scale}) rotate(${m.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=h.current)==null?void 0:b.go("+1")},"aria-label":"Next",children:[E.arrowsImgUrl&&S.jsx(gt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:W.arrowImg}),!E.arrowsImgUrl&&S.jsx(Co,{color:E.color,className:de(W.arrowIcon,W.arrowImg)})]})})]}),T.closeIconUrl&&(()=>{const b=Dt(T.closeIconAlign,T.closeIconOffset,i),D=`scale(${T.closeIconScale})`,q=b.transform?`${b.transform} ${D}`:D;return S.jsx("button",{className:W.closeButton,style:{...b,transform:q},onClick:K,"aria-label":"Close lightbox",children:S.jsx(gt,{url:T.closeIconUrl,fill:T.closeIconColor??"#000000",hoverFill:T.closeIconHover??"#cccccc"})})})(),C&&C.isActive&&o.imageCaption&&((z=n[s])==null?void 0:z.imageCaption)&&(()=>{const{widthSettings:b,fontSettings:D,letterSpacing:q,textAlign:J,wordSpacing:ne,fontSizeLineHeight:Q,textAppearance:X,color:oe}=o.imageCaption;return S.jsx("div",{className:W.caption,style:{...Dt(C.alignment,C.offset,i),fontFamily:D.fontFamily,fontWeight:D.fontWeight,fontStyle:D.fontStyle,width:b.sizing==="auto"?"max-content":I.scalingValue(b.width,i),letterSpacing:I.scalingValue(q,i),wordSpacing:I.scalingValue(ne,i),textAlign:J,fontSize:I.scalingValue(Q.fontSize,i),lineHeight:I.scalingValue(Q.lineHeight,i),textTransform:X.textTransform??"none",textDecoration:X.textDecoration??"none",fontVariant:X.fontVariant??"normal",color:oe},onClick:ye=>ye.stopPropagation(),children:S.jsx("div",{"data-styles":"imageCaption",className:W.captionTextInner,style:{"--link-color":C.linkColor,"--link-hover-color":C.linkHoverColor},children:S.jsx(lr,{content:n[s].imageCaption})})})})(),k.isActive&&(()=>{const[b,D]=k.position.split("-"),q=m.direction==="horiz"?`${b}-left`:k.position,J=Dt(q,k.offset,i),ne=()=>{if(m.direction==="horiz"){if(D==="left")return"flex-start";if(D==="center")return"center";if(D==="right")return"flex-end"}else{if(b==="top")return"flex-start";if(b==="middle")return"center";if(b==="bottom")return"flex-end"}return"flex-start"};return S.jsx("div",{ref:R,className:W.thumbsWrapper,onClick:Q=>fe(Q),style:{position:i?"absolute":"fixed",...J,...m.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:S.jsx("div",{className:de(W.thumbsContainer,{[W.thumbsContainerVertical]:m.direction==="vert",[W.thumbsAlignStart]:k.align==="start",[W.thumbsAlignCenter]:k.align==="center",[W.thumbsAlignEnd]:k.align==="end"}),style:{gap:I.scalingValue(k.grid.gap,i),justifyContent:V?"flex-start":ne()},children:n.map((Q,X)=>{const oe=X===s,ye=x[X],pe=k.grid.size*(oe?k.activeState.scale:1),Ve=()=>{if(k.fit!=="fit")return{};if(!ye)return m.direction==="horiz"?{height:I.scalingValue(pe,i)}:{width:I.scalingValue(pe,i)};const ee=ye.width/ye.height;if(m.direction==="horiz"){const ce=pe,$e=ce*ee;return{width:I.scalingValue($e,i),height:I.scalingValue(ce,i)}}else{const ce=pe,$e=ce/ee;return{width:I.scalingValue(ce,i),height:I.scalingValue($e,i)}}};return S.jsx("button",{className:W.thumbItem,style:{...m.direction==="horiz"&&k.fit!=="fit"?{height:I.scalingValue(pe,i)}:{},...m.direction==="vert"&&k.fit!=="fit"?{width:I.scalingValue(pe,i)}:{},...k.fit==="cover"?{width:I.scalingValue(pe,i),height:I.scalingValue(pe,i)}:{},...Ve(),transition:oe?"all 0.25s ease-out":"none",opacity:oe?k.activeState.opacity/100:k.opacity/100,"--thumb-hover":k.activeState.opacity/100},onClick:ee=>{var ce;ee.stopPropagation(),p(X),(ce=h.current)==null||ce.go(X)},onMouseEnter:()=>{var ee;k.triggers==="hov"&&((ee=h.current)==null||ee.go(X))},children:S.jsx("img",{src:Q.image.url,alt:Q.image.name??"",onLoad:ee=>{const ce=ee.currentTarget;ce.naturalWidth&&ce.naturalHeight&&f($e=>({...$e,[X]:{width:ce.naturalWidth,height:ce.naturalHeight}}))},style:{objectFit:k.fit==="cover"?"cover":"contain",...k.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...k.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Q.image.name}-${X}`)})})})})()]})]}),document.getElementById(a))};function Co({color:e,className:t}){return S.jsx("svg",{viewBox:"0 0 10 18",className:t,children:S.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:S.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 vl={element:hl,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 mt(e){const{color:t,...n}=e;return n}function tt(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:I.scalingValue(e.letterSpacing,t),wordSpacing:I.scalingValue(e.wordSpacing,t),fontSize:I.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?I.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 Ut(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bl(e){return`
7
- .${e}-wrapper {
6
+ */const ba="RichTextRenderer-module__link___BWeZ2",Sa={link:ba},ze=({content:t})=>{const e=n=>n.map((o,r)=>o.type==="link"?s.jsx("a",{className:Sa.link,href:o.value,target:o.target,children:e(o.children)},r):s.jsx("span",{style:xa(o),children:o.text},r));return s.jsx(s.Fragment,{children:t.map((n,o)=>{const r=n.children;return s.jsx("div",{children:e(r)},o)})})};function xa(t){return{...t.fontFamily&&{fontFamily:t.fontFamily},...t.fontWeight&&{fontWeight:t.fontWeight},...t.fontStyle&&{fontStyle:t.fontStyle},...t.textDecoration&&{textDecoration:t.textDecoration},...t.textTransform&&{textTransform:t.textTransform},...t.fontVariant&&{fontVariant:t.fontVariant},...t.verticalAlign&&{verticalAlign:t.verticalAlign,lineHeight:"0px"}}}const Ca="SvgImage-module__svg___q3xE-",$a="SvgImage-module__img___VsTm-",So={svg:Ca,img:$a},wa=t=>{const e=t.trim();return e.startsWith("data:image/svg+xml")?!0:(e.split(/[?#]/)[0]??e).endsWith(".svg")},Ta=t=>`url("${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,ye=({url:t,fill:e="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=j.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return j.useEffect(()=>{if(typeof window<"u"&&window.CSS){const p=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(p)}},[]),!wa(t)||!a?s.jsx("img",{src:t,alt:"",className:ft(So.img,o),style:r}):s.jsx("span",{"data-supports-mask":a,className:ft(So.svg,o),style:{"--svg":Ta(t),"--fill":e,"--hover-fill":n,...r??{}}})},_a={"top-left":X.topLeftAlignment,"top-center":X.topCenterAlignment,"top-right":X.topRightAlignment,"middle-left":X.middleLeftAlignment,"middle-center":X.middleCenterAlignment,"middle-right":X.middleRightAlignment,"bottom-left":X.bottomLeftAlignment,"bottom-center":X.bottomCenterAlignment,"bottom-right":X.bottomRightAlignment};function Aa({settings:t,content:e,styles:n,isEditor:o}){const[r,a]=j.useState(null),{widthSettings:i,fontSettings:p,letterSpacing:c,textAlign:f,wordSpacing:u,fontSizeLineHeight:k,textAppearance:b,color:y}=n.imageCaption,[l,g]=j.useState(void 0),[$,h]=j.useState(null),[v,E]=j.useState(0),[B,M]=j.useState(0),{direction:L,transition:m,controls:F,pagination:I,imageCaption:N,triggers:R}=t,W=j.useRef(m.type),{x:_,y:D}=t.controls.offset,H=d=>{r&&r.go(d)};return j.useEffect(()=>{if(!$)return;const d=new ResizeObserver(w=>{if(!r)return;const[C]=w;g({width:Math.round(C.contentRect.width),height:Math.round(C.contentRect.height)})});return d.observe($),()=>d.unobserve($)},[$]),j.useEffect(()=>{!r||W.current===m.type||(M(d=>d+1),W.current=m.type)},[m.type]),s.jsx("div",{className:ft(X.wrapper,{[X.editor]:o}),ref:h,children:s.jsxs("div",{className:X.sliderInner,style:{width:l?l.width:"100%",height:l?l.height:"100%",backgroundColor:m.backgroundColor&&m.type==="fade in"?m.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&s.jsx("div",{className:ft(X.captionBlock),children:s.jsx("div",{className:X.captionTextWrapper,children:e.map((d,w)=>s.jsx("div",{className:ft(X.captionText,_a[N.alignment],{[X.withPointerEvents]:w===v&&o,[X.active]:w===v}),style:{fontFamily:p.fontFamily,fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:i.sizing==="auto"?"max-content":x.scalingValue(i.width,o),letterSpacing:x.scalingValue(c,o),wordSpacing:x.scalingValue(u,o),textAlign:f,fontSize:x.scalingValue(k.fontSize,o),lineHeight:x.scalingValue(k.lineHeight,o),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:y,transitionDuration:m.duration?`${Math.round(parseInt(m.duration)/2)}ms`:"500ms"},children:s.jsx("div",{"data-styles":"imageCaption",className:X.captionTextInner,style:{"--link-hover-color":N.linkHoverColor,"--link-color":N.linkColor,position:"relative",top:x.scalingValue(N.offset.y,o),left:x.scalingValue(N.offset.x,o)},children:s.jsx(ze,{content:d.imageCaption})})},w))})}),s.jsx(ur,{onMove:d=>{E(d.index)},ref:a,options:{arrows:!1,speed:m.duration?parseInt(m.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:L==="horiz"||m.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:l?l.width:"100%",height:l?l.height:"100%",type:m.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((d,w)=>s.jsx(dr,{children:s.jsx("div",{className:X.sliderItem,children:s.jsx("div",{className:X.imgWrapper,children:s.jsx("img",{className:ft(X.sliderImage,{[X.contain]:d.image.objectFit==="contain",[X.cover]:d.image.objectFit==="cover"}),src:d.image.url,alt:d.image.name??""})})})},w))},B),F.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:ft(X.arrow,{[X.arrowVertical]:L==="vert",[X.hoverArrow]:F.show==="on hover"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:s.jsxs("button",{onClick:()=>{H("-1")},className:X.arrowInner,style:{transform:`translate(${x.scalingValue(_,o)}, ${x.scalingValue(D*(L==="horiz"?1:-1),o)}) scale(${t.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[F.arrowsImgUrl&&s.jsx(ye,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:ft(X.arrowImg,X.mirror)}),!F.arrowsImgUrl&&s.jsx(xo,{color:F.color,className:ft(X.arrowIcon,X.arrowImg,X.mirror)})]})}),s.jsx("div",{className:ft(X.arrow,X.nextArrow,{[X.arrowVertical]:L==="vert",[X.hoverArrow]:F.show==="on hover"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:s.jsxs("button",{className:X.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${x.scalingValue(_*(L==="horiz"?-1:1),o)}, ${x.scalingValue(D,o)}) scale(${t.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[F.arrowsImgUrl&&s.jsx(ye,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:X.arrowImg}),!F.arrowsImgUrl&&s.jsx(xo,{color:F.color,className:ft(X.arrowIcon,X.arrowImg)})]})})]}),R.triggersList.click&&s.jsx("div",{className:X.clickOverlay,onClick:()=>{r&&r.go("+1")}}),I.isActive&&s.jsx("div",{className:ft(X.pagination,{[X.paginationInsideBottom]:I.position==="inside-1"&&L==="horiz",[X.paginationInsideTop]:I.position==="inside-2"&&L==="horiz",[X.paginationOutsideBottom]:I.position==="outside-1"&&L==="horiz",[X.paginationOutsideTop]:I.position==="outside-2"&&L==="horiz",[X.paginationInsideLeft]:I.position==="inside-1"&&L==="vert",[X.paginationInsideRight]:I.position==="inside-2"&&L==="vert",[X.paginationOutsideLeft]:I.position==="outside-1"&&L==="vert",[X.paginationOutsideRight]:I.position==="outside-2"&&L==="vert",[X.paginationVertical]:L==="vert"}),children:s.jsx("div",{className:X.paginationInner,style:{backgroundColor:I.colors[2],transform:`scale(${I.scale/100}) translate(${x.scalingValue(I.offset.x,o)}, ${x.scalingValue(I.offset.y,o)}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:e.map((d,w)=>s.jsx("button",{onClick:()=>{r&&r.go(w)},className:ft(X.paginationItem),children:s.jsx("div",{className:ft(X.dot,{[X.activeDot]:w===v}),style:{backgroundColor:w===v?I.colors[0]:I.colors[1],"--pagination-hover-color":I.hover}})},w))})})]})})}function xo({color:t,className:e}){return s.jsx("svg",{viewBox:"0 0 10 18",className:e,children:s.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:s.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:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ea={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"]}},La="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fa="ImageRevealSlider-module__image___Qjt-e",ka="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",pe={imageRevealSlider:La,image:Fa,link:ka,cursor:Ia};function Co(t,e,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,p=a/2,c=i/2;if(t>=o.x-p&&t<=o.x+p&&e>=o.y-c&&e<=o.y+c)return!0}return!1}function Tn(t){return new Promise(e=>{const n=new Image;n.src=t,n.onload=()=>{e({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ra(t,e,n,o){let r,a;if(e==="custom"){r=n;const i=await Tn(t);a=i.height/i.width*r}else if(e==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await Tn(t);a=i.height/i.width*r}else{const i=await Tn(t);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Wa({settings:t,content:e,isEditor:n}){const[o,r]=j.useState(null),[a,i]=j.useState([]),[p,c]=j.useState(0),f=j.useRef(0),[u,k]=j.useState({x:0,y:0}),[b,y]=j.useState(1),[l,g]=j.useState("none"),$=j.useRef({x:0,y:0}),[h,v]=j.useState(!1),{sizeType:E,imageWidth:B,randomRangeImageWidth:M}=t.imageSize,{revealPosition:L,visible:m}=t.position,{cursorType:F,target:I,defaultCursorScale:N,defaultCursor:R,hoverCursorScale:W,hoverCursor:_}=t.cursor;j.useEffect(()=>{if(!o)return;const d=(T,A)=>{const V=o.getBoundingClientRect(),q=T-V.left,at=A-V.top;if(k({x:q,y:at}),F==="system"){g("none"),y(1);return}const it=q,pt=at,z=document.elementFromPoint(V.left+it,V.top+pt);if(z&&z.closest("a")){g("none"),y(1);return}const J=Co(it,pt,a)||I==="area"?{img:_??"none",scale:W}:{img:R??"none",scale:N};g(J.img),y(J.scale)},w=T=>{T.stopPropagation(),$.current={x:T.clientX,y:T.clientY},d(T.clientX,T.clientY)},C=()=>{h&&d($.current.x,$.current.y)};return o.addEventListener("mousemove",w),window.addEventListener("scroll",C,!0),()=>{o.removeEventListener("mousemove",w),window.removeEventListener("scroll",C,!0)}},[o,h,u,F,I,_,R,W,N,a]),j.useEffect(()=>{h||(g("none"),y(0))},[h]);const D=async(d,w,C,T={})=>{const{width:A,height:V,finalWidth:q}=await Ra(d.image.url,E,B,M);let at=0,it=0;L==="same"?(at=w/2,it=C/2):(at=T.x??Math.random()*w,it=T.y??Math.random()*C);const pt=Math.min(Math.max(at,A/2),w-A/2),z=Math.min(Math.max(it,V/2),C-V/2);return{id:f.current++,url:d.image.url,link:d.link,name:d.image.name,x:pt,y:z,width:q}};j.useEffect(()=>{if(!o||e.length===0)return;const d=o.getBoundingClientRect(),w=d.width,C=d.height,T=[];(async()=>{const V=e[0],q=await D(V,w,C);T.push(q),i(T),c(1)})()},[E,B,M,L,o]),j.useEffect(()=>{m==="last One"&&i(d=>d.length>0?[d[d.length-1]]:[])},[m]);const H=async d=>{if(!o)return;const w=o.getBoundingClientRect(),C=d.clientX-w.left,T=d.clientY-w.top;if(I==="image"&&!Co(C,T,a))return;let A=0,V=0;L==="on Click"?(A=C,V=T):L==="same"?(A=w.width/2,V=w.height/2):(A=Math.random()*w.width,V=Math.random()*w.height);const q=e[p],at=await D(q,w.width,w.height,{x:A,y:V});i(it=>m==="all"?[...it,at]:[at]),c(it=>it>=e.length-1?0:it+1)};return s.jsxs("div",{ref:r,onClick:H,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:pe.imageRevealSlider,style:{cursor:l==="none"?"default":"none"},children:[a.map(d=>s.jsx("div",{className:pe.wrapper,style:{top:`${d.y}px`,left:`${d.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:d.width??"auto",height:"auto",cursor:l==="none"?"default":"none"},children:I==="area"&&d.link?s.jsx("a",{href:d.link,target:"_blank",className:pe.link,children:s.jsx("img",{src:d.url,alt:d.name,className:pe.image},d.id)}):s.jsx("img",{src:d.url,alt:d.name,className:pe.image},d.id)},d.id)),h&&s.jsx("div",{className:pe.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${l}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Va={element:Wa,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:""}]}}}},za="LightBox-module__hidden___9s-9x",Na="LightBox-module__heroImage___sTxNF",Ma="LightBox-module__background___rm9ml",Pa="LightBox-module__editor___4ACaY",ja="LightBox-module__contentStyle___Bgnsq",Ha="LightBox-module__imageStyle___tLIlB",Oa="LightBox-module__imgWrapper___LuFUp",Ba="LightBox-module__contain___8-yaS",Da="LightBox-module__cover___hNvOG",Ua="LightBox-module__caption___b6L2I",Ga="LightBox-module__captionTextInner___rCGNH",qa="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",tl="LightBox-module__mirror___pjeXc",el="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",O={hidden:za,heroImage:Na,background:Ma,editor:Pa,contentStyle:ja,imageStyle:Ha,imgWrapper:Oa,contain:Ba,cover:Da,caption:Ua,captionTextInner:Ga,lightboxSplide:qa,arrow:Ya,arrowVertical:Xa,nextArrow:Ka,arrowInner:Ja,arrowIcon:Za,arrowImg:Qa,mirror:tl,thumbsWrapper:el,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},Ye=(t,e,n)=>{const o={},[r,a]=t.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"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${x.scalingValue(e.x,n)}), calc(-50% + ${x.scalingValue(e.y,n)}))`:r==="middle"?o.transform=`translate(${x.scalingValue(e.x,n)}, calc(-50% + ${x.scalingValue(e.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${x.scalingValue(e.x,n)}), ${x.scalingValue(e.y,n)})`:o.transform=`translate(${x.scalingValue(e.x,n)}, ${x.scalingValue(e.y,n)})`,o};function gr(t){const e=window.getComputedStyle(t);return{top:parseFloat(e.paddingTop)||0,right:parseFloat(e.paddingRight)||0,bottom:parseFloat(e.paddingBottom)||0,left:parseFloat(e.paddingLeft)||0}}function $o(t){const e=t.getBoundingClientRect(),n=gr(t),o=Math.max(0,e.width-n.left-n.right),r=Math.max(0,e.height-n.top-n.bottom),a=t.naturalWidth,i=t.naturalHeight,p=o/r,c=a/i;let f,u;c>p?(f=o,u=o/c):(u=r,f=r*c);const k=e.left+n.left,b=e.top+n.top,y=(o-f)/2+k,l=(r-u)/2+b;return{x:y,y:l,width:f,height:u}}function wo(t){const e=t.getBoundingClientRect(),n=gr(t);return{left:e.left+n.left,right:e.right-n.right,top:e.top+n.top,bottom:e.bottom-n.bottom}}function To(t){const e=t.match(/rgba?\(([^)]+)\)/);if(e){const o=e[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=t.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Sl(t,e){const n=(()=>{if(t==="fade in")return O.fadeIn;if(t==="slide in"||t==="mix")switch(e){case"left":return O.slideInLeft;case"right":return O.slideInRight;case"top":return O.slideInTop;case"bottom":return O.slideInBottom;default:return O.slideInRight}return O.fadeIn})(),o=(()=>{if(t==="fade in"||t==="mix")return O.fadeIn;if(t==="slide in")switch(e){case"left":return O.slideInLeft;case"right":return O.slideInRight;case"top":return O.slideInTop;case"bottom":return O.slideInBottom;default:return O.slideInRight}return O.fadeIn})(),r=(()=>{if(t==="fade in"||t==="mix")return O.fadeOut;if(t==="slide in")switch(e){case"left":return O.slideOutLeft;case"right":return O.slideOutRight;case"top":return O.slideOutTop;case"bottom":return O.slideOutBottom;default:return O.slideOutRight}return O.fadeOut})(),a=(()=>{if(t==="fade in")return O.fadeOut;if(t==="slide in"||t==="mix")switch(e){case"left":return O.slideOutLeft;case"right":return O.slideOutRight;case"top":return O.slideOutTop;case"bottom":return O.slideOutBottom;default:return O.slideOutRight}return O.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const xl=({settings:t,content:e,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,p]=j.useState(!1),{url:c}=t.thumbnailBlock.cover;return j.useEffect(()=>{r==="close"&&p(!1),r==="open"&&p(!0)},[r]),s.jsxs(s.Fragment,{children:[s.jsx("img",{src:c,alt:"Cover",className:O.heroImage,onClick:()=>p(!0)}),s.jsx(Cl,{isOpen:i,onClose:()=>p(!1),content:e,settings:t,lightboxStyles:n,portalId:o,isEditor:a})]})},Cl=({isOpen:t,onClose:e,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:p})=>{var P;const[c,f]=j.useState(0),[u,k]=j.useState(0),[b,y]=j.useState(!1),[l,g]=j.useState(!1),[$,h]=j.useState({}),v=j.useRef(null),E=j.useRef(null),B=j.useRef(null),M=j.useRef(!1),L=j.useRef(null),m=j.useRef(null),F=j.useRef(null),I=j.useRef(null),N=j.useRef(!1),R=j.useRef(null),[W,_]=j.useState(!1),{appear:D,triggers:H,slider:d,thumbnail:w,controls:C,area:T,caption:A,layout:V}=r.lightboxBlock,{appearClass:q,backdropAppearClass:at,backdropDisappearClass:it,disappearClass:pt}=Sl(D.type,D.direction),z=(p==null?void 0:p.itemId)??null;j.useEffect(()=>{const S=()=>{setTimeout(()=>{var G,Z;(Z=(G=v.current)==null?void 0:G.splide)==null||Z.refresh()},16)},U=()=>{k(G=>G+1)};return window.addEventListener("ArticleEditor.Layout:change",S),window.addEventListener("ArticleEditor.ComponentContent:change",U),()=>{window.removeEventListener("ArticleEditor.Layout:change",S),window.removeEventListener("ArticleEditor.ComponentContent:change",U)}},[]),j.useEffect(()=>{if(!t||!w.isActive){_(!1);return}const S=R.current;if(!S)return;const U=()=>{d.direction==="horiz"?_(S.scrollWidth>S.clientWidth):_(S.scrollHeight>S.clientHeight)};U();const G=new ResizeObserver(U);return G.observe(S),()=>G.disconnect()},[t,w.isActive,n.length,$,d.direction]);const J=j.useCallback(()=>{const S=window.matchMedia("(max-width: 768px)").matches,U=To(T.color);S&&!i&&U>.9&&(document.body.style.backgroundColor=""),y(!0),M.current=!0;const G=Z=>{Z.target===L.current&&Z.animationName&&(L.current&&m.current&&L.current.removeEventListener("animationend",m.current),m.current=null,M.current&&(M.current=!1,e()),y(!1))};L.current&&(m.current=G,L.current.addEventListener("animationend",G))},[e,T.color,i]),Y=(S,U,G)=>{var Z,ot;if(S){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&c===n.length-1?J():(Z=v.current)==null||Z.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const et=S.getBoundingClientRect(),Q=U-et.left,lt=G-et.top,yt=et.width,ut=et.height;let ht;d.direction==="horiz"?ht=Q<yt/2?"-1":"+1":ht=lt<ut/2?"-1":"+1",(ot=v.current)==null||ot.go(ht)}}},K=S=>{if(N.current){N.current=!1;return}const U=n[c],G=(U==null?void 0:U.image.objectFit)==="cover";let Z,ot;if("changedTouches"in S&&S.changedTouches.length>0)Z=S.changedTouches[0].clientX,ot=S.changedTouches[0].clientY;else if("clientX"in S)Z=S.clientX,ot=S.clientY;else return;let et;if(G&&B.current){const Q=wo(B.current);et=Z>=Q.left&&Z<=Q.right&&ot>=Q.top&&ot<=Q.bottom}else{const Q=B.current?$o(B.current):null;if(!Q){S.target===S.currentTarget&&J();return}et=Z>=Q.x&&Z<=Q.x+Q.width&&ot>=Q.y&&ot<=Q.y+Q.height}et?Y(B.current,Z,ot):J()},tt=S=>{const U=S.target;(U.classList.contains(O.thumbsWrapper)||U.classList.contains(O.thumbsContainer))&&K(S)};j.useEffect(()=>{if(!t)return;const S=U=>{var G,Z;if(U.key==="Escape"){J();return}if(U.key==="ArrowRight"){f(ot=>(ot+1)%Math.max(n.length,1)),(G=v.current)==null||G.go("+1");return}U.key==="ArrowLeft"&&(f(ot=>(ot-1+Math.max(n.length,1))%Math.max(n.length,1)),(Z=v.current)==null||Z.go("-1"))};return window.addEventListener("keydown",S),()=>{window.removeEventListener("keydown",S)}},[t,J,n.length]),j.useEffect(()=>{if(t){if(f(0),k(U=>U+1),M.current=!1,y(!1),g(!1),h({}),!z)return;const S=new CustomEvent("page-overlay",{detail:{itemId:z}});window.dispatchEvent(S)}return()=>{L.current&&m.current&&(L.current.removeEventListener("animationend",m.current),m.current=null),g(!1)}},[t,z]),j.useEffect(()=>{E.current!==null&&E.current!==d.type&&k(S=>S+1),E.current=d.type},[d.type]),j.useEffect(()=>{if(!t)return;const S=document.body.style.overflow,U=window.matchMedia("(max-width: 768px)").matches,G=To(T.color);document.body.style.overflow="hidden",g(!1);const Z=et=>{et.target===L.current&&!M.current&&et.animationName&&(U&&!i&&G>.9&&(document.body.style.backgroundColor=T.color),g(!0),L.current&&F.current&&L.current.removeEventListener("animationend",F.current),F.current=null)};L.current&&(F.current=Z,L.current.addEventListener("animationend",Z));const ot=et=>{const Q=et.target;Q&&(Q.closest(`.${O.thumbsWrapper}`)||Q.closest(`.${O.thumbsContainer}`))||d.type!=="slide"&&et.preventDefault()};return document.addEventListener("touchmove",ot,{passive:!1}),()=>{document.body.style.overflow=S,document.removeEventListener("touchmove",ot),L.current&&F.current&&(L.current.removeEventListener("animationend",F.current),F.current=null),g(!1)}},[t,i,T.color,d.type]),j.useEffect(()=>{if(!t)return;const S=U=>{var Z,ot;if(M.current){U.stopPropagation();return}if(N.current){N.current=!1;return}const G=U.target;if(!(G&&(G.closest(`.${O.thumbsContainer}`)||G.closest(`.${O.thumbItem}`)))){if(d.type==="slide"&&H.type==="drag"&&((ot=(Z=v.current)==null?void 0:Z.splide)!=null&&ot.root)){const et=v.current.splide.root;if(G&&(et.contains(G)||et===G))return}if(U.touches.length===0&&U.changedTouches.length>0){const et=n[c],Q=(et==null?void 0:et.image.objectFit)==="cover",lt=U.changedTouches[0];let yt;if(Q&&B.current){const ut=wo(B.current);yt=lt.clientX>=ut.left&&lt.clientX<=ut.right&&lt.clientY>=ut.top&&lt.clientY<=ut.bottom}else{const ut=B.current?$o(B.current):null;if(!ut)return;yt=lt.clientX>=ut.x&&lt.clientX<=ut.x+ut.width&&lt.clientY>=ut.y&&lt.clientY<=ut.y+ut.height}if(!yt){U.stopPropagation(),M.current=!0;const ut=ht=>{ht.stopPropagation(),ht.preventDefault(),document.removeEventListener("click",ut,!0)};document.addEventListener("click",ut,!0),J()}}}};return document.addEventListener("touchend",S,{passive:!0}),()=>{document.removeEventListener("touchend",S)}},[t,J,c,n]);const ct=(d.type==="scale"||d.type==="fade")&&d.direction==="vert"&&H.type==="drag";j.useEffect(()=>{var ht,Pt;if(!t||!ct||!((Pt=(ht=v.current)==null?void 0:ht.splide)!=null&&Pt.root))return;const S=v.current.splide.root,U=30,G=(rt,gt)=>{if(I.current){const Tt=Math.abs(rt-I.current.x),Xt=Math.abs(gt-I.current.y);(Tt>0||Xt>0)&&(N.current=!0)}},Z=rt=>{I.current&&(rt.preventDefault(),G(rt.clientX,rt.clientY))},ot=rt=>{I.current&&rt.touches.length>0&&(rt.preventDefault(),G(rt.touches[0].clientX,rt.touches[0].clientY))},et=(rt,gt)=>{if(!I.current||!v.current){I.current=null;return}const Tt=Math.abs(rt-I.current.x),Xt=Math.abs(gt-I.current.y);Xt>U&&Xt>Tt&&v.current.go(gt<I.current.y?"+1":"-1"),I.current=null},Q=rt=>{I.current&&et(rt.clientX,rt.clientY),document.removeEventListener("pointerup",Q),document.removeEventListener("pointercancel",Q),document.removeEventListener("pointermove",Z)},lt=rt=>{if(I.current){if(rt.changedTouches.length>0){const gt=rt.changedTouches[0];et(gt.clientX,gt.clientY)}document.removeEventListener("touchend",lt),document.removeEventListener("touchcancel",lt),document.removeEventListener("touchmove",ot)}},yt=rt=>{I.current={x:rt.clientX,y:rt.clientY},N.current=!1,document.addEventListener("pointermove",Z,{passive:!1}),document.addEventListener("pointerup",Q),document.addEventListener("pointercancel",Q)},ut=rt=>{rt.touches.length>0&&(I.current={x:rt.touches[0].clientX,y:rt.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",ot,{passive:!1}),document.addEventListener("touchend",lt),document.addEventListener("touchcancel",lt))};return S.addEventListener("pointerdown",yt),S.addEventListener("touchstart",ut),()=>{S.removeEventListener("pointerdown",yt),S.removeEventListener("touchstart",ut),document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",Q),document.removeEventListener("pointercancel",Q),document.removeEventListener("touchmove",ot),document.removeEventListener("touchend",lt),document.removeEventListener("touchcancel",lt),I.current=null,N.current=!1}},[t,ct,u]);const st={backgroundColor:T.color,backdropFilter:`blur(${T.blur}px)`,animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:br.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:i?null:L,className:ft(O.background,b?it:at,{[O.editor]:i},{[O.hidden]:!t}),style:{...st,...l&&!i&&!b?{position:"absolute"}:{}}}),s.jsxs("div",{ref:i?L:null,className:ft(O.contentStyle,b?pt:q,{[O.editor]:i},{[O.hidden]:!t}),style:{animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[s.jsx(ur,{onMove:S=>f(S.index),ref:v,className:O.lightboxSplide,options:{arrows:!1,speed:d.duration?parseInt(d.duration):500,direction:d.direction==="horiz"||d.type==="fade"||d.type==="scale"?"ltr":"ttb",pagination:!1,drag:H.type==="drag"&&!ct,perPage:1,width:"100%",height:"100%",type:d.type==="fade"||d.type==="scale"?"fade":"loop",padding:0,rewind:H.repeat!=="close",start:0},style:{"--splide-speed":d.duration},children:n.map((S,U)=>{const G=Ye(V.position,V.offset,i),Z=`${x.scalingValue(V.padding.top,i)} ${x.scalingValue(V.padding.right,i)} ${x.scalingValue(V.padding.bottom,i)} ${x.scalingValue(V.padding.left,i)}`,ot=d.type==="scale"?(()=>{const{transform:et,...Q}=G;return{...Q,position:"absolute",padding:Z,boxSizing:"border-box","--position-transform":et||"none"}})():{...G,position:"absolute",padding:Z,boxSizing:"border-box"};return s.jsx(dr,{children:s.jsx("div",{className:O.imgWrapper,onClick:K,children:s.jsx("img",{ref:U===c?B:null,className:ft(O.imageStyle,{[O.contain]:S.image.objectFit==="contain",[O.cover]:S.image.objectFit==="cover",[O.scaleSlide]:d.type==="scale"}),src:S.image.url,alt:S.image.name??"",style:{...ot,pointerEvents:S.image.objectFit==="contain"?"none":"auto"}})})},U)})},u),C.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:ft(O.arrow,{[O.arrowVertical]:d.direction==="vert"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:s.jsxs("button",{className:O.arrowInner,style:{transform:`translate(${x.scalingValue(C.offset.x,i)}, ${x.scalingValue(C.offset.y*(d.direction==="horiz"?1:-1),i)}) scale(${C.scale}) rotate(${d.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=v.current)==null?void 0:S.go("-1")},"aria-label":"Previous",children:[C.arrowsImgUrl&&s.jsx(ye,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:ft(O.arrowImg,O.mirror)}),!C.arrowsImgUrl&&s.jsx(_o,{color:C.color,className:ft(O.arrowIcon,O.arrowImg,O.mirror)})]})}),s.jsx("div",{className:ft(O.arrow,O.nextArrow,{[O.arrowVertical]:d.direction==="vert"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:s.jsxs("button",{className:O.arrowInner,style:{transform:`translate(${x.scalingValue(C.offset.x*(d.direction==="horiz"?-1:1),i)}, ${x.scalingValue(C.offset.y,i)}) scale(${C.scale}) rotate(${d.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=v.current)==null?void 0:S.go("+1")},"aria-label":"Next",children:[C.arrowsImgUrl&&s.jsx(ye,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:O.arrowImg}),!C.arrowsImgUrl&&s.jsx(_o,{color:C.color,className:ft(O.arrowIcon,O.arrowImg)})]})})]}),T.closeIconUrl&&(()=>{const S=Ye(T.closeIconAlign,T.closeIconOffset,i),U=`scale(${T.closeIconScale})`,G=S.transform?`${S.transform} ${U}`:U;return s.jsx("button",{className:O.closeButton,style:{...S,transform:G},onClick:J,"aria-label":"Close lightbox",children:s.jsx(ye,{url:T.closeIconUrl,fill:T.closeIconColor??"#000000",hoverFill:T.closeIconHover??"#cccccc"})})})(),A&&A.isActive&&o.imageCaption&&((P=n[c])==null?void 0:P.imageCaption)&&(()=>{const{widthSettings:S,fontSettings:U,letterSpacing:G,textAlign:Z,wordSpacing:ot,fontSizeLineHeight:et,textAppearance:Q,color:lt}=o.imageCaption;return s.jsx("div",{className:O.caption,style:{...Ye(A.alignment,A.offset,i),fontFamily:U.fontFamily,fontWeight:U.fontWeight,fontStyle:U.fontStyle,width:S.sizing==="auto"?"max-content":x.scalingValue(S.width,i),letterSpacing:x.scalingValue(G,i),wordSpacing:x.scalingValue(ot,i),textAlign:Z,fontSize:x.scalingValue(et.fontSize,i),lineHeight:x.scalingValue(et.lineHeight,i),textTransform:Q.textTransform??"none",textDecoration:Q.textDecoration??"none",fontVariant:Q.fontVariant??"normal",color:lt},onClick:yt=>yt.stopPropagation(),children:s.jsx("div",{"data-styles":"imageCaption",className:O.captionTextInner,style:{"--link-color":A.linkColor,"--link-hover-color":A.linkHoverColor},children:s.jsx(ze,{content:n[c].imageCaption})})})})(),w.isActive&&(()=>{const[S,U]=w.position.split("-"),G=d.direction==="horiz"?`${S}-left`:w.position,Z=Ye(G,w.offset,i),ot=()=>{if(d.direction==="horiz"){if(U==="left")return"flex-start";if(U==="center")return"center";if(U==="right")return"flex-end"}else{if(S==="top")return"flex-start";if(S==="middle")return"center";if(S==="bottom")return"flex-end"}return"flex-start"};return s.jsx("div",{ref:R,className:O.thumbsWrapper,onClick:et=>tt(et),style:{position:i?"absolute":"fixed",...Z,...d.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:s.jsx("div",{className:ft(O.thumbsContainer,{[O.thumbsContainerVertical]:d.direction==="vert",[O.thumbsAlignStart]:w.align==="start",[O.thumbsAlignCenter]:w.align==="center",[O.thumbsAlignEnd]:w.align==="end"}),style:{gap:x.scalingValue(w.grid.gap,i),justifyContent:W?"flex-start":ot()},children:n.map((et,Q)=>{const lt=Q===c,yt=$[Q],ht=w.grid.size*(lt?w.activeState.scale:1),Pt=()=>{if(w.fit!=="fit")return{};if(!yt)return d.direction==="horiz"?{height:x.scalingValue(ht,i)}:{width:x.scalingValue(ht,i)};const rt=yt.width/yt.height;if(d.direction==="horiz"){const gt=ht,Tt=gt*rt;return{width:x.scalingValue(Tt,i),height:x.scalingValue(gt,i)}}else{const gt=ht,Tt=gt/rt;return{width:x.scalingValue(gt,i),height:x.scalingValue(Tt,i)}}};return s.jsx("button",{className:O.thumbItem,style:{...d.direction==="horiz"&&w.fit!=="fit"?{height:x.scalingValue(ht,i)}:{},...d.direction==="vert"&&w.fit!=="fit"?{width:x.scalingValue(ht,i)}:{},...w.fit==="cover"?{width:x.scalingValue(ht,i),height:x.scalingValue(ht,i)}:{},...Pt(),transition:lt?"all 0.25s ease-out":"none",opacity:lt?w.activeState.opacity/100:w.opacity/100,"--thumb-hover":w.activeState.opacity/100},onClick:rt=>{var gt;rt.stopPropagation(),f(Q),(gt=v.current)==null||gt.go(Q)},onMouseEnter:()=>{var rt;w.triggers==="hov"&&((rt=v.current)==null||rt.go(Q))},children:s.jsx("img",{src:et.image.url,alt:et.image.name??"",onLoad:rt=>{const gt=rt.currentTarget;gt.naturalWidth&&gt.naturalHeight&&h(Tt=>({...Tt,[Q]:{width:gt.naturalWidth,height:gt.naturalHeight}}))},style:{objectFit:w.fit==="cover"?"cover":"contain",...w.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...w.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${et.image.name}-${Q}`)})})})})()]})]}),document.getElementById(a))};function _o({color:t,className:e}){return s.jsx("svg",{viewBox:"0 0 10 18",className:e,children:s.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:s.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:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const $l={element:xl,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 he(t){const{color:e,...n}=t;return n}function Jt(t,e){var n,o,r;return{fontFamily:t.fontSettings.fontFamily,fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:x.scalingValue(t.letterSpacing,e),wordSpacing:x.scalingValue(t.wordSpacing,e),fontSize:x.scalingValue(t.fontSize,e),lineHeight:t.lineHeight!==void 0?x.scalingValue(t.lineHeight,e):void 0,textTransform:(n=t.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=t.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=t.textAppearance)==null?void 0:r.fontVariant,color:t.color}}function Xe(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function wl(t){return`
7
+ .${t}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Ut(48)};
11
+ min-height: ${Xe(48)};
12
12
  }
13
- .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
- .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
13
+ .${t}-wrapper.${t}-type-C .${t}-input:focus-visible,
14
+ .${t}-wrapper.${t}-type-C .${t}-button:focus-visible {
15
15
  outline: none;
16
16
  }
17
- .${e}-form {
17
+ .${t}-form {
18
18
  display: flex;
19
19
  flex-direction: column;
20
20
  width: 100%;
21
21
  }
22
- .${e}-fields {
22
+ .${t}-fields {
23
23
  display: flex;
24
24
  flex-direction: column;
25
25
  flex: 1;
26
26
  min-width: 0;
27
27
  }
28
- .${e}-field-group {
28
+ .${t}-field-group {
29
29
  display: flex;
30
30
  flex-direction: column;
31
31
  flex: 1;
32
32
  min-width: 0;
33
33
  }
34
- .${e}-field-group.${e}-labeled {
35
- gap: ${Ut(4)};
34
+ .${t}-field-group.${t}-labeled {
35
+ gap: ${Xe(4)};
36
36
  }
37
- .${e}-field-label {
37
+ .${t}-field-label {
38
38
  white-space: nowrap;
39
- color: var(--${e}-label-text-color);
39
+ color: var(--${t}-label-text-color);
40
40
  }
41
- .${e}-input {
41
+ .${t}-input {
42
42
  width: 100%;
43
43
  box-sizing: border-box;
44
44
  outline: none;
45
45
  -webkit-tap-highlight-color: transparent;
46
- background-color: var(--${e}-input-color);
47
- color: var(--${e}-input-text-color);
48
- border-color: var(--${e}-input-border-color);
46
+ background-color: var(--${t}-input-color);
47
+ color: var(--${t}-input-text-color);
48
+ border-color: var(--${t}-input-border-color);
49
49
  transition: color 250ms, border-color 250ms, background-color 250ms;
50
50
  }
51
- .${e}-input::placeholder {
52
- color: var(--${e}-placeholder-color);
51
+ .${t}-input::placeholder {
52
+ color: var(--${t}-placeholder-color);
53
53
  opacity: 1;
54
54
  transition: color 250ms, opacity 250ms;
55
55
  }
56
- .${e}-input:hover {
57
- background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
58
- color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
59
- border-color: var(--${e}-hover-input-border-color, var(--${e}-input-border-color));
60
- }
61
- .${e}-wrapper.${e}-state-hover .${e}-input {
62
- background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
63
- color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
64
- border-color: var(--${e}-hover-input-border-color, var(--${e}-input-border-color));
65
- }
66
- .${e}-input:focus,
67
- .${e}-input:focus-visible,
68
- .${e}-wrapper.${e}-state-focus .${e}-input {
69
- background-color: var(--${e}-focus-input-color, var(--${e}-input-color));
70
- color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
71
- border-color: var(--${e}-focus-input-border-color, var(--${e}-input-border-color));
72
- }
73
- .${e}-input[data-filled="true"] {
74
- background-color: var(--${e}-filled-input-color, var(--${e}-input-color));
75
- color: var(--${e}-filled-input-text-color, var(--${e}-input-text-color));
76
- border-color: var(--${e}-filled-input-border-color, var(--${e}-input-border-color));
77
- }
78
- .${e}-wrapper.${e}-state-filled .${e}-button {
79
- background-color: var(--${e}-filled-button-color, var(--${e}-button-color));
80
- color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
81
- border-color: var(--${e}-filled-button-border-color, var(--${e}-button-border-color));
82
- }
83
- .${e}-wrapper.${e}-state-success .${e}-input,
84
- .${e}-wrapper.${e}-state-success .${e}-button {
56
+ .${t}-input:hover {
57
+ background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
58
+ color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
59
+ border-color: var(--${t}-hover-input-border-color, var(--${t}-input-border-color));
60
+ }
61
+ .${t}-wrapper.${t}-state-hover .${t}-input {
62
+ background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
63
+ color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
64
+ border-color: var(--${t}-hover-input-border-color, var(--${t}-input-border-color));
65
+ }
66
+ .${t}-input:focus,
67
+ .${t}-input:focus-visible,
68
+ .${t}-wrapper.${t}-state-focus .${t}-input {
69
+ background-color: var(--${t}-focus-input-color, var(--${t}-input-color));
70
+ color: var(--${t}-focus-input-text-color, var(--${t}-input-text-color));
71
+ border-color: var(--${t}-focus-input-border-color, var(--${t}-input-border-color));
72
+ }
73
+ .${t}-input[data-filled="true"] {
74
+ background-color: var(--${t}-filled-input-color, var(--${t}-input-color));
75
+ color: var(--${t}-filled-input-text-color, var(--${t}-input-text-color));
76
+ border-color: var(--${t}-filled-input-border-color, var(--${t}-input-border-color));
77
+ }
78
+ .${t}-wrapper.${t}-state-filled .${t}-button {
79
+ background-color: var(--${t}-filled-button-color, var(--${t}-button-color));
80
+ color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
81
+ border-color: var(--${t}-filled-button-border-color, var(--${t}-button-border-color));
82
+ }
83
+ .${t}-wrapper.${t}-state-success .${t}-input,
84
+ .${t}-wrapper.${t}-state-success .${t}-button {
85
85
  pointer-events: none;
86
86
  }
87
- .${e}-wrapper.${e}-state-error .${e}-input {
87
+ .${t}-wrapper.${t}-state-error .${t}-input {
88
88
  }
89
- .${e}-input[data-field-type="textarea"] {
89
+ .${t}-input[data-field-type="textarea"] {
90
90
  resize: vertical;
91
91
  }
92
- .${e}-input:disabled {
92
+ .${t}-input:disabled {
93
93
  cursor: not-allowed;
94
94
  }
95
- .${e}-button {
95
+ .${t}-button {
96
96
  cursor: pointer;
97
97
  white-space: nowrap;
98
98
  box-sizing: border-box;
99
99
  outline: none;
100
- background-color: var(--${e}-button-color);
101
- color: var(--${e}-button-text-color);
102
- border-color: var(--${e}-button-border-color);
100
+ background-color: var(--${t}-button-color);
101
+ color: var(--${t}-button-text-color);
102
+ border-color: var(--${t}-button-border-color);
103
103
  transition: color 250ms, background-color 250ms, border-color 250ms;
104
104
  }
105
- .${e}-button:hover {
106
- background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
107
- color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
108
- border-color: var(--${e}-hover-button-border-color, var(--${e}-button-border-color));
109
- }
110
- .${e}-wrapper.${e}-state-hover .${e}-button {
111
- background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
112
- color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
113
- border-color: var(--${e}-hover-button-border-color, var(--${e}-button-border-color));
114
- }
115
- .${e}-button:focus,
116
- .${e}-button:focus-visible,
117
- .${e}-wrapper.${e}-state-focus .${e}-button {
118
- background-color: var(--${e}-focus-button-color, var(--${e}-button-color));
119
- color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
120
- border-color: var(--${e}-focus-button-border-color, var(--${e}-button-border-color));
121
- }
122
- .${e}-input:focus-visible,
123
- .${e}-wrapper.${e}-state-focus .${e}-input {
105
+ .${t}-button:hover {
106
+ background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
107
+ color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
108
+ border-color: var(--${t}-hover-button-border-color, var(--${t}-button-border-color));
109
+ }
110
+ .${t}-wrapper.${t}-state-hover .${t}-button {
111
+ background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
112
+ color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
113
+ border-color: var(--${t}-hover-button-border-color, var(--${t}-button-border-color));
114
+ }
115
+ .${t}-button:focus,
116
+ .${t}-button:focus-visible,
117
+ .${t}-wrapper.${t}-state-focus .${t}-button {
118
+ background-color: var(--${t}-focus-button-color, var(--${t}-button-color));
119
+ color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
120
+ border-color: var(--${t}-focus-button-border-color, var(--${t}-button-border-color));
121
+ }
122
+ .${t}-input:focus-visible,
123
+ .${t}-wrapper.${t}-state-focus .${t}-input {
124
124
  outline: none;
125
125
  }
126
- .${e}-button:focus-visible,
127
- .${e}-wrapper.${e}-state-focus .${e}-button {
126
+ .${t}-button:focus-visible,
127
+ .${t}-wrapper.${t}-state-focus .${t}-button {
128
128
  outline: none;
129
129
  }
130
- .${e}-success {
131
- margin-top: ${Ut(8)};
132
- color: var(--${e}-success-success-color, var(--${e}-success-color));
130
+ .${t}-success {
131
+ margin-top: ${Xe(8)};
132
+ color: var(--${t}-success-success-color, var(--${t}-success-color));
133
133
  }
134
- .${e}-error {
135
- margin-top: ${Ut(8)};
136
- color: var(--${e}-error-error-color, var(--${e}-error-color));
134
+ .${t}-error {
135
+ margin-top: ${Xe(8)};
136
+ color: var(--${t}-error-error-color, var(--${t}-error-color));
137
137
  }
138
- .${e}-overlay-anchor {
138
+ .${t}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function Sl({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=I.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:l=[],buttonLabel:s,gap:p,fieldsGap:c,buttonCorners:_,buttonStroke:v,buttonPadding:g,isButtonFullWidth:u,inputCorners:d,inputStroke:x,inputPadding:f,inputColor:h,inputTextColor:$,inputBorderColor:M,placeholderColor:O,buttonColor:w,buttonTextColor:y,buttonBorderColor:L,labelTextColor:B,successColor:N,errorColor:R,fontFamily:V,inputFontSettings:P,inputFontSize:U,inputLineHeight:H,inputLetterSpacing:m,inputWordSpacing:k,inputTextAppearance:E,buttonFontSettings:T,buttonFontSize:C,buttonLineHeight:F,buttonLetterSpacing:Y,buttonWordSpacing:re,buttonTextAppearance:te,labelFontSettings:ie,labelFontSize:A,labelLineHeight:K,labelLetterSpacing:me,labelWordSpacing:se,labelTextAppearance:fe,statusFontSettings:Se,statusFontSize:Ue,statusLineHeight:z,statusLetterSpacing:b,statusWordSpacing:D,statusTextAppearance:q,successMessage:J,errorMessage:ne,stateOverrides:Q}=e,X=a==="B",oe=l.slice(0,Math.min(i,l.length)),ye={fontSettings:{fontFamily:V,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:U??.01,lineHeight:H,letterSpacing:m??0,wordSpacing:k??0,textAppearance:E,color:$},ae=mt(tt(ye,t)),pe=I.scalingValue(x??0,t),Ve=I.scalingValue((H??U??.01)+((f==null?void 0:f.top)??0)+((f==null?void 0:f.bottom)??0)+(a==="C"?x??0:(x??0)*2),t),ee={...ae,borderStyle:"solid",borderRadius:a==="C"?0:I.scalingValue(d??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:pe,borderLeftWidth:0}:{borderWidth:pe},paddingTop:I.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:I.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:I.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:I.scalingValue((f==null?void 0:f.left)??0,t),height:Ve,minHeight:Ve},ce={fontSettings:{fontFamily:V,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:C??.01,lineHeight:F,letterSpacing:Y??0,wordSpacing:re??0,textAppearance:te,color:y},$e=mt(tt(ce,t)),Ge=I.scalingValue(v??0,t),fn={fontSettings:{fontFamily:V,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:A??.01,lineHeight:K,letterSpacing:me??0,wordSpacing:se??0,textAppearance:fe,color:B},xt=tt(fn,t),he={fontSettings:{fontFamily:V,fontWeight:(Se==null?void 0:Se.fontWeight)??400,fontStyle:(Se==null?void 0:Se.fontStyle)??"normal"},fontSize:Ue??.01,lineHeight:z,letterSpacing:b??0,wordSpacing:D??0,textAppearance:q,color:N},ke=mt(tt(he,t)),Qe=I.buildColorVars(r,{inputColor:h,inputTextColor:$,inputBorderColor:M,placeholderColor:O!=null&&O.trim()?O:"#cccccc",buttonColor:w,buttonTextColor:y,buttonBorderColor:L,labelTextColor:B,successColor:N,errorColor:R},xl,Cl,Q),[be,Pe]=j.useState(()=>Object.fromEntries(oe.map(le=>[le.name,""]))),[Zn,Ct]=j.useState("idle"),[cr,jt]=j.useState(null),hn=o==="success"?"success":o==="error"?"error":Zn,ur=o==="error"?ne:cr,Mt=o==="filled",$t=j.useMemo(()=>{if(!Mt)return be;let le=null;for(const Oe of oe)(be[Oe.name]??"").trim().length>0||(le=le??{...be},le[Oe.name]="Filled");return le??be},[be,Mt,oe]),pr=hn==="error"?I.getFormFieldValidationError(oe,$t):null,dr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),Qn=n==null?void 0:n.submitUrl,eo=(le,Oe)=>{Pe(We=>({...We,[le]:Oe}))},gr=async le=>{le.preventDefault();const Oe=Object.fromEntries(oe.map(Ee=>{var at;return[Ee.name,((at=be[Ee.name])==null?void 0:at.trim())??""]}).filter(([,Ee])=>Ee));if(!Qn){Ct("error"),jt("No integrations were found for this form.");return}if(Object.keys(Oe).length===0)return;const We=I.getFormFieldValidationError(oe,be);if(We){Ct("error"),jt(We);return}Ct("submitting"),jt(null);try{const Ee=await fetch(Qn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Oe)});if(!Ee.ok){const at=await Ee.text();throw new Error(at||`Request failed: ${Ee.status}`)}Ct("success"),Pe(Object.fromEntries(oe.map(at=>[at.name,""])))}catch(Ee){Ct("error"),jt(Ee instanceof Error?Ee.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${dr}`.trim(),style:Qe,children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:bl(r)}}),S.jsxs("form",{onSubmit:gr,className:`${r}-form`,style:{gap:I.scalingValue(p??0,t)},children:[S.jsx("div",{className:`${r}-fields`,style:{gap:I.scalingValue(c??0,t)},children:oe.map((le,Oe)=>S.jsxs("div",{className:`${r}-field-group${X?` ${r}-labeled`:""}`,children:[X&&S.jsx("span",{className:`${r}-field-label`,style:xt?{...xt,lineHeight:xt.fontSize}:void 0,children:le.label||le.name}),le.type==="textarea"?S.jsx("textarea",{name:le.name,autoComplete:"off",value:$t[le.name]??"",onChange:We=>eo(le.name,We.target.value),placeholder:le.placeholder,className:`${r}-input`,style:ee,rows:1,"data-filled":Mt||($t[le.name]??"").trim().length>0,"data-field-type":"textarea"}):S.jsx("input",{type:le.type==="phone"?"tel":le.type==="email"?"email":"text",name:le.name,autoComplete:"off",value:$t[le.name]??"",onChange:We=>eo(le.name,We.target.value),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${r}-input`,style:ee,"data-filled":Mt||($t[le.name]??"").trim().length>0})]},Oe))}),S.jsx("div",{className:`${r}-overlay-anchor`,children:S.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:I.scalingValue(_??0,t),borderWidth:Ge,paddingTop:I.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:I.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:I.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:I.scalingValue((g==null?void 0:g.left)??0,t),...$e,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:S.jsx("span",{className:`${r}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Zn==="submitting"?"...":s})})})]}),hn==="success"&&S.jsx("p",{className:`${r}-success`,style:{...ke},children:J}),hn==="error"&&S.jsx("p",{className:`${r}-error`,style:{...ke},role:"alert",children:pr??ur??ne})]})}const xl={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"},Cl=["hover","focus","filled","success","error"],$l=`import React, { useMemo, useState } from 'react';
142
+ `}function Tl({settings:t,isEditor:e,metadata:n,activeEvent:o}){const{prefix:r}=x.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:p=[],buttonLabel:c,gap:f,fieldsGap:u,buttonCorners:k,buttonStroke:b,buttonPadding:y,isButtonFullWidth:l,inputCorners:g,inputStroke:$,inputPadding:h,inputColor:v,inputTextColor:E,inputBorderColor:B,placeholderColor:M,buttonColor:L,buttonTextColor:m,buttonBorderColor:F,labelTextColor:I,successColor:N,errorColor:R,fontFamily:W,inputFontSettings:_,inputFontSize:D,inputLineHeight:H,inputLetterSpacing:d,inputWordSpacing:w,inputTextAppearance:C,buttonFontSettings:T,buttonFontSize:A,buttonLineHeight:V,buttonLetterSpacing:q,buttonWordSpacing:at,buttonTextAppearance:it,labelFontSettings:pt,labelFontSize:z,labelLineHeight:J,labelLetterSpacing:Y,labelWordSpacing:K,labelTextAppearance:tt,statusFontSettings:ct,statusFontSize:st,statusLineHeight:P,statusLetterSpacing:S,statusWordSpacing:U,statusTextAppearance:G,successMessage:Z,errorMessage:ot,stateOverrides:et}=t,Q=a==="B",lt=p.slice(0,Math.min(i,p.length)),yt={fontSettings:{fontFamily:W,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:D??.01,lineHeight:H,letterSpacing:d??0,wordSpacing:w??0,textAppearance:C,color:E},ut=he(Jt(yt,e)),ht=x.scalingValue($??0,e),Pt=x.scalingValue((H??D??.01)+((h==null?void 0:h.top)??0)+((h==null?void 0:h.bottom)??0)+(a==="C"?$??0:($??0)*2),e),rt={...ut,borderStyle:"solid",borderRadius:a==="C"?0:x.scalingValue(g??0,e),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ht,borderLeftWidth:0}:{borderWidth:ht},paddingTop:x.scalingValue((h==null?void 0:h.top)??0,e),paddingRight:x.scalingValue((h==null?void 0:h.right)??0,e),paddingBottom:x.scalingValue((h==null?void 0:h.bottom)??0,e),paddingLeft:x.scalingValue((h==null?void 0:h.left)??0,e),height:Pt,minHeight:Pt},gt={fontSettings:{fontFamily:W,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:A??.01,lineHeight:V,letterSpacing:q??0,wordSpacing:at??0,textAppearance:it,color:m},Tt=he(Jt(gt,e)),Xt=x.scalingValue(b??0,e),bn={fontSettings:{fontFamily:W,fontWeight:(pt==null?void 0:pt.fontWeight)??400,fontStyle:(pt==null?void 0:pt.fontStyle)??"normal"},fontSize:z??.01,lineHeight:J,letterSpacing:Y??0,wordSpacing:K??0,textAppearance:tt,color:I},we=Jt(bn,e),bt={fontSettings:{fontFamily:W,fontWeight:(ct==null?void 0:ct.fontWeight)??400,fontStyle:(ct==null?void 0:ct.fontStyle)??"normal"},fontSize:st??.01,lineHeight:P,letterSpacing:S??0,wordSpacing:U??0,textAppearance:G,color:N},Vt=he(Jt(bt,e)),oe=x.buildColorVars(r,{inputColor:v,inputTextColor:E,inputBorderColor:B,placeholderColor:M!=null&&M.trim()?M:"#cccccc",buttonColor:L,buttonTextColor:m,buttonBorderColor:F,labelTextColor:I,successColor:N,errorColor:R},_l,Al,et),[xt,jt]=j.useState(()=>Object.fromEntries(lt.map(dt=>[dt.name,""]))),[no,Te]=j.useState("idle"),[mr,Ue]=j.useState(null),Sn=o==="success"?"success":o==="error"?"error":no,fr=o==="error"?ot:mr,Ge=o==="filled",_e=j.useMemo(()=>{if(!Ge)return xt;let dt=null;for(const Ht of lt)(xt[Ht.name]??"").trim().length>0||(dt=dt??{...xt},dt[Ht.name]="Filled");return dt??xt},[xt,Ge,lt]),yr=Sn==="error"?x.getFormFieldValidationError(lt,_e):null,hr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),oo=n==null?void 0:n.submitUrl,ro=(dt,Ht)=>{jt(Ot=>({...Ot,[dt]:Ht}))},vr=async dt=>{dt.preventDefault();const Ht=Object.fromEntries(lt.map(Ft=>{var ce;return[Ft.name,((ce=xt[Ft.name])==null?void 0:ce.trim())??""]}).filter(([,Ft])=>Ft));if(!oo){Te("error"),Ue("No integrations were found for this form.");return}if(Object.keys(Ht).length===0)return;const Ot=x.getFormFieldValidationError(lt,xt);if(Ot){Te("error"),Ue(Ot);return}Te("submitting"),Ue(null);try{const Ft=await fetch(oo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ht)});if(!Ft.ok){const ce=await Ft.text();throw new Error(ce||`Request failed: ${Ft.status}`)}Te("success"),jt(Object.fromEntries(lt.map(ce=>[ce.name,""])))}catch(Ft){Te("error"),Ue(Ft instanceof Error?Ft.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${hr}`.trim(),style:oe,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:wl(r)}}),s.jsxs("form",{onSubmit:vr,className:`${r}-form`,style:{gap:x.scalingValue(f??0,e)},children:[s.jsx("div",{className:`${r}-fields`,style:{gap:x.scalingValue(u??0,e)},children:lt.map((dt,Ht)=>s.jsxs("div",{className:`${r}-field-group${Q?` ${r}-labeled`:""}`,children:[Q&&s.jsx("span",{className:`${r}-field-label`,style:we?{...we,lineHeight:we.fontSize}:void 0,children:dt.label||dt.name}),dt.type==="textarea"?s.jsx("textarea",{name:dt.name,autoComplete:"off",value:_e[dt.name]??"",onChange:Ot=>ro(dt.name,Ot.target.value),placeholder:dt.placeholder,className:`${r}-input`,style:rt,rows:1,"data-filled":Ge||(_e[dt.name]??"").trim().length>0,"data-field-type":"textarea"}):s.jsx("input",{type:dt.type==="phone"?"tel":dt.type==="email"?"email":"text",name:dt.name,autoComplete:"off",value:_e[dt.name]??"",onChange:Ot=>ro(dt.name,Ot.target.value),placeholder:dt.placeholder,required:dt.isRequired??dt.type==="email",className:`${r}-input`,style:rt,"data-filled":Ge||(_e[dt.name]??"").trim().length>0})]},Ht))}),s.jsx("div",{className:`${r}-overlay-anchor`,children:s.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:x.scalingValue(k??0,e),borderWidth:Xt,paddingTop:x.scalingValue((y==null?void 0:y.top)??0,e),paddingRight:x.scalingValue((y==null?void 0:y.right)??0,e),paddingBottom:x.scalingValue((y==null?void 0:y.bottom)??0,e),paddingLeft:x.scalingValue((y==null?void 0:y.left)??0,e),...Tt,...l?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:s.jsx("span",{className:`${r}-overlay-anchor`,style:l?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:no==="submitting"?"...":c})})})]}),Sn==="success"&&s.jsx("p",{className:`${r}-success`,style:{...Vt},children:Z}),Sn==="error"&&s.jsx("p",{className:`${r}-error`,style:{...Vt},role:"alert",children:yr??fr??ot})]})}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"],El=`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,8 +740,8 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
740
740
  };
741
741
 
742
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
743
- `,_l=[{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"}],Gt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},wl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Tl={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:{...Gt.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:{...Gt.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:{...Gt.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:{...Gt.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:_l,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:[...wl],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"]},El={element:Sl,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},version:1,defaultSize:{width:300,height:42},schema:Tl,sourceCode:$l};function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ll(e){return`
744
- .${e}-wrapper {
743
+ `,Ll=[{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"}],Ke={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],kl={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:{...Ke.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:{...Ke.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:{...Ke.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:{...Ke.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:Ll,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:[...Fl],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"]},Il={element:Tl,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},version:1,defaultSize:{width:300,height:42},schema:kl,sourceCode:El};function Je(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Rl(t){return`
744
+ .${t}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
747
747
  width: 100%;
@@ -749,90 +749,90 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
749
749
  align-items: stretch;
750
750
  justify-content: center;
751
751
  }
752
- .${e}-form {
752
+ .${t}-form {
753
753
  display: flex;
754
754
  width: 100%;
755
755
  align-items: stretch;
756
756
  overflow: hidden;
757
- border-color: var(--${e}-stroke-color);
757
+ border-color: var(--${t}-stroke-color);
758
758
  transition: border-color 250ms;
759
759
  }
760
- .${e}-form:hover {
761
- border-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
760
+ .${t}-form:hover {
761
+ border-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
762
762
  }
763
- .${e}-form:focus-within {
764
- border-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
763
+ .${t}-form:focus-within {
764
+ border-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
765
765
  }
766
- .${e}-wrapper.${e}-state-hover .${e}-form {
767
- border-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
766
+ .${t}-wrapper.${t}-state-hover .${t}-form {
767
+ border-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
768
768
  }
769
- .${e}-wrapper.${e}-state-focus .${e}-form {
770
- border-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
769
+ .${t}-wrapper.${t}-state-focus .${t}-form {
770
+ border-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
771
771
  }
772
- .${e}-wrapper.${e}-state-filled .${e}-form {
773
- border-color: var(--${e}-filled-stroke-color, var(--${e}-stroke-color));
772
+ .${t}-wrapper.${t}-state-filled .${t}-form {
773
+ border-color: var(--${t}-filled-stroke-color, var(--${t}-stroke-color));
774
774
  }
775
- .${e}-inputWrap {
775
+ .${t}-inputWrap {
776
776
  position: relative;
777
777
  display: flex;
778
778
  align-items: center;
779
779
  flex: 1;
780
780
  min-width: 0;
781
- background-color: var(--${e}-input-color);
781
+ background-color: var(--${t}-input-color);
782
782
  transition: background-color 250ms;
783
783
  }
784
- .${e}-inputWrap:hover,
785
- .${e}-wrapper.${e}-state-hover .${e}-inputWrap {
786
- background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
784
+ .${t}-inputWrap:hover,
785
+ .${t}-wrapper.${t}-state-hover .${t}-inputWrap {
786
+ background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
787
787
  }
788
- .${e}-inputWrap:focus-within,
789
- .${e}-wrapper.${e}-state-focus .${e}-inputWrap {
790
- background-color: var(--${e}-focus-input-color, var(--${e}-input-color));
788
+ .${t}-inputWrap:focus-within,
789
+ .${t}-wrapper.${t}-state-focus .${t}-inputWrap {
790
+ background-color: var(--${t}-focus-input-color, var(--${t}-input-color));
791
791
  }
792
- .${e}-wrapper.${e}-state-filled .${e}-inputWrap {
793
- background-color: var(--${e}-filled-input-color, var(--${e}-input-color));
792
+ .${t}-wrapper.${t}-state-filled .${t}-inputWrap {
793
+ background-color: var(--${t}-filled-input-color, var(--${t}-input-color));
794
794
  }
795
- .${e}-input {
795
+ .${t}-input {
796
796
  flex: 1;
797
797
  min-width: 0;
798
798
  background: transparent;
799
799
  border: none;
800
800
  outline: none;
801
801
  -webkit-tap-highlight-color: transparent;
802
- color: var(--${e}-input-text-color);
802
+ color: var(--${t}-input-text-color);
803
803
  transition: color 250ms, background-color 250ms, border-color 250ms;
804
804
  }
805
- .${e}-input:hover {
806
- color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
805
+ .${t}-input:hover {
806
+ color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
807
807
  }
808
- .${e}-inputWrap:hover .${e}-input,
809
- .${e}-wrapper.${e}-state-hover .${e}-input {
810
- color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
808
+ .${t}-inputWrap:hover .${t}-input,
809
+ .${t}-wrapper.${t}-state-hover .${t}-input {
810
+ color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
811
811
  }
812
- .${e}-input:focus,
813
- .${e}-wrapper.${e}-state-focus .${e}-input {
814
- color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
812
+ .${t}-input:focus,
813
+ .${t}-wrapper.${t}-state-focus .${t}-input {
814
+ color: var(--${t}-focus-input-text-color, var(--${t}-input-text-color));
815
815
  }
816
- .${e}-wrapper.${e}-state-filled .${e}-input {
817
- color: var(--${e}-filled-input-text-color, var(--${e}-input-text-color));
816
+ .${t}-wrapper.${t}-state-filled .${t}-input {
817
+ color: var(--${t}-filled-input-text-color, var(--${t}-input-text-color));
818
818
  }
819
- .${e}-input::placeholder {
820
- color: var(--${e}-placeholder-color);
819
+ .${t}-input::placeholder {
820
+ color: var(--${t}-placeholder-color);
821
821
  opacity: 1;
822
822
  transition: color 250ms, opacity 250ms;
823
823
  }
824
- .${e}-inputWrap:hover .${e}-input::placeholder,
825
- .${e}-wrapper.${e}-state-hover .${e}-input::placeholder {
826
- color: var(--${e}-hover-placeholder-color, var(--${e}-placeholder-color));
824
+ .${t}-inputWrap:hover .${t}-input::placeholder,
825
+ .${t}-wrapper.${t}-state-hover .${t}-input::placeholder {
826
+ color: var(--${t}-hover-placeholder-color, var(--${t}-placeholder-color));
827
827
  }
828
- .${e}-inputWrap:focus-within .${e}-input::placeholder,
829
- .${e}-wrapper.${e}-state-focus .${e}-input::placeholder {
830
- color: var(--${e}-focus-placeholder-color, var(--${e}-placeholder-color));
828
+ .${t}-inputWrap:focus-within .${t}-input::placeholder,
829
+ .${t}-wrapper.${t}-state-focus .${t}-input::placeholder {
830
+ color: var(--${t}-focus-placeholder-color, var(--${t}-placeholder-color));
831
831
  }
832
- .${e}-wrapper.${e}-state-filled .${e}-input::placeholder {
833
- color: var(--${e}-filled-placeholder-color, var(--${e}-placeholder-color));
832
+ .${t}-wrapper.${t}-state-filled .${t}-input::placeholder {
833
+ color: var(--${t}-filled-placeholder-color, var(--${t}-placeholder-color));
834
834
  }
835
- .${e}-submitBtn {
835
+ .${t}-submitBtn {
836
836
  box-sizing: border-box;
837
837
  height: 100%;
838
838
  display: flex;
@@ -841,13 +841,13 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
841
841
  border: none;
842
842
  cursor: pointer;
843
843
  white-space: nowrap;
844
- background-color: var(--${e}-button-color);
845
- color: var(--${e}-button-text-color);
844
+ background-color: var(--${t}-button-color);
845
+ color: var(--${t}-button-text-color);
846
846
  border-left-style: solid;
847
- border-left-color: var(--${e}-stroke-color);
847
+ border-left-color: var(--${t}-stroke-color);
848
848
  transition: color 250ms, background-color 250ms, border-color 250ms;
849
849
  }
850
- .${e}-submitBtn img {
850
+ .${t}-submitBtn img {
851
851
  display: block;
852
852
  box-sizing: border-box;
853
853
  flex: 0 1 auto;
@@ -858,7 +858,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
858
858
  max-height: 100%;
859
859
  object-fit: contain;
860
860
  }
861
- .${e}-submitBtn svg {
861
+ .${t}-submitBtn svg {
862
862
  display: block;
863
863
  box-sizing: border-box;
864
864
  flex: 0 1 auto;
@@ -868,7 +868,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
868
868
  max-width: 100%;
869
869
  max-height: 100%;
870
870
  }
871
- .${e}-submitBtn .${e}-submitBtnIcon {
871
+ .${t}-submitBtn .${t}-submitBtnIcon {
872
872
  position: relative;
873
873
  top: auto;
874
874
  left: auto;
@@ -884,54 +884,54 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
884
884
  max-width: 100%;
885
885
  max-height: 100%;
886
886
  }
887
- .${e}-submitBtn:hover,
888
- .${e}-wrapper.${e}-state-hover .${e}-submitBtn {
889
- background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
890
- color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
891
- border-left-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
887
+ .${t}-submitBtn:hover,
888
+ .${t}-wrapper.${t}-state-hover .${t}-submitBtn {
889
+ background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
890
+ color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
891
+ border-left-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
892
892
  }
893
- .${e}-submitBtn:focus,
894
- .${e}-wrapper.${e}-state-focus .${e}-submitBtn {
895
- background-color: var(--${e}-focus-button-color, var(--${e}-button-color));
896
- color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
897
- border-left-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
893
+ .${t}-submitBtn:focus,
894
+ .${t}-wrapper.${t}-state-focus .${t}-submitBtn {
895
+ background-color: var(--${t}-focus-button-color, var(--${t}-button-color));
896
+ color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
897
+ border-left-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
898
898
  }
899
- .${e}-wrapper.${e}-state-filled .${e}-submitBtn {
900
- background-color: var(--${e}-filled-button-color, var(--${e}-button-color));
901
- color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
902
- border-left-color: var(--${e}-filled-stroke-color, var(--${e}-stroke-color));
899
+ .${t}-wrapper.${t}-state-filled .${t}-submitBtn {
900
+ background-color: var(--${t}-filled-button-color, var(--${t}-button-color));
901
+ color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
902
+ border-left-color: var(--${t}-filled-stroke-color, var(--${t}-stroke-color));
903
903
  }
904
- .${e}-submitBtn:hover .${e}-submitBtnIcon,
905
- .${e}-wrapper.${e}-state-hover .${e}-submitBtn .${e}-submitBtnIcon {
906
- background-color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
904
+ .${t}-submitBtn:hover .${t}-submitBtnIcon,
905
+ .${t}-wrapper.${t}-state-hover .${t}-submitBtn .${t}-submitBtnIcon {
906
+ background-color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
907
907
  }
908
- .${e}-submitBtn:focus .${e}-submitBtnIcon,
909
- .${e}-wrapper.${e}-state-focus .${e}-submitBtn .${e}-submitBtnIcon {
910
- background-color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
908
+ .${t}-submitBtn:focus .${t}-submitBtnIcon,
909
+ .${t}-wrapper.${t}-state-focus .${t}-submitBtn .${t}-submitBtnIcon {
910
+ background-color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
911
911
  }
912
- .${e}-wrapper.${e}-state-filled .${e}-submitBtn .${e}-submitBtnIcon {
913
- background-color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
912
+ .${t}-wrapper.${t}-state-filled .${t}-submitBtn .${t}-submitBtnIcon {
913
+ background-color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
914
914
  }
915
- .${e}-wrapper.${e}-state-success .${e}-input,
916
- .${e}-wrapper.${e}-state-success .${e}-submitBtn {
915
+ .${t}-wrapper.${t}-state-success .${t}-input,
916
+ .${t}-wrapper.${t}-state-success .${t}-submitBtn {
917
917
  pointer-events: none;
918
918
  }
919
- .${e}-overlayAnchor {
919
+ .${t}-overlayAnchor {
920
920
  position: relative;
921
921
  display: flex;
922
922
  align-items: center;
923
923
  }
924
- .${e}-success {
925
- margin-top: ${Yt(8)};
926
- font-size: ${Yt(14)};
927
- color: var(--${e}-success-success-color, var(--${e}-success-color));
924
+ .${t}-success {
925
+ margin-top: ${Je(8)};
926
+ font-size: ${Je(14)};
927
+ color: var(--${t}-success-success-color, var(--${t}-success-color));
928
928
  }
929
- .${e}-error {
930
- margin-top: ${Yt(8)};
931
- font-size: ${Yt(14)};
932
- color: var(--${e}-error-error-color, var(--${e}-error-color));
929
+ .${t}-error {
930
+ margin-top: ${Je(8)};
931
+ font-size: ${Je(14)};
932
+ color: var(--${t}-error-error-color, var(--${t}-error-color));
933
933
  }
934
- `}const Al=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=I.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:l,fieldsToShow:s=1,fontFamily:p,inputFontSettings:c,inputFontSize:_,inputLineHeight:v,inputLetterSpacing:g,inputWordSpacing:u,inputTextAppearance:d,buttonFontSettings:x,buttonFontSize:f,buttonLineHeight:h,buttonLetterSpacing:$,buttonWordSpacing:M,buttonTextAppearance:O,statusFontSettings:w,statusFontSize:y,statusLineHeight:L,statusLetterSpacing:B,statusWordSpacing:N,statusTextAppearance:R,iconMaxWidth:V,minHeight:P,corners:U,stroke:H,stateOverrides:m,inputPadding:k,buttonPadding:E,successMessage:T="Thanks for subscribing!",errorMessage:C="Please, fill all required fields."}=e,F=a.slice(0,Math.min(s,a.length)),[Y,re]=j.useState(()=>Object.fromEntries(F.map(he=>[he.name,""]))),[te,ie]=j.useState("idle"),[A,K]=j.useState(null),me=o==="success"?"success":o==="error"?"error":te,se=o==="error"?C:A,fe=o==="filled",Se=j.useMemo(()=>{if(!fe)return Y;let he=null;for(const ke of F)(Y[ke.name]??"").trim().length>0||(he=he??{...Y},he[ke.name]="Filled");return he??Y},[fe,Y,F]),Ue=me==="error"?I.getFormFieldValidationError(F,Se):null,z=o&&o!=="default"?`${r}-state-${o}`:"",b=F.some(he=>(Se[he.name]??"").trim().length>0),D=z!==`${r}-state-filled`&&b?`${r}-state-filled`:"",q=`${z} ${D}`.trim(),J=n==null?void 0:n.submitUrl,ne=l??"",Q=(i==null?void 0:i.icon)??"",X=(i==null?void 0:i.mode)==="On",oe=ne||"Submit",ye={fontSettings:{fontFamily:p,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:_??.01,lineHeight:v,letterSpacing:g??0,wordSpacing:u??0,textAppearance:d,color:e.inputTextColor??"#111111"},ae={fontSettings:{fontFamily:p,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:f??.01,lineHeight:h,letterSpacing:$??0,wordSpacing:M??0,textAppearance:O,color:e.buttonTextColor??"#ffffff"},pe={fontSettings:{fontFamily:p,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:y??.01,lineHeight:L,letterSpacing:B??0,wordSpacing:N??0,textAppearance:R,color:e.successColor??"#22c55e"},Ve=mt(tt(ye,t)),ee=mt(tt(ae,t)),ce=mt(tt(pe,t)),$e=I.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ye==null?void 0:ye.color)??"#111111",buttonTextColor:e.buttonTextColor??(ae==null?void 0:ae.color)??"#ffffff"},Il,kl,m),Ge={borderRadius:I.scalingValue(U,t),borderWidth:I.scalingValue(H,t),borderStyle:"solid"},fn={borderLeftWidth:I.scalingValue(H,t)},xt=async he=>{he.preventDefault();const ke=Object.fromEntries(F.map(be=>{var Pe;return[be.name,((Pe=Y[be.name])==null?void 0:Pe.trim())??""]}).filter(([,be])=>be));if(!J){ie("error"),K("No integrations were found for this form.");return}if(Object.keys(ke).length===0)return;const Qe=I.getFormFieldValidationError(F,Y);if(Qe){ie("error"),K(Qe);return}ie("submitting"),K(null);try{const be=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!be.ok){const Pe=await be.text();throw new Error(Pe||`Request failed: ${be.status}`)}ie("success"),re(Object.fromEntries(F.map(Pe=>[Pe.name,""])))}catch(be){ie("error"),K(be instanceof Error?be.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${q}`.trim(),style:$e,children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:Ll(r)}}),S.jsxs("form",{onSubmit:xt,className:`${r}-form`,style:{...Ge,height:I.scalingValue(P,t),minHeight:I.scalingValue(P,t)},children:[S.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:F.map(he=>S.jsx("input",{type:he.type==="email"?"email":he.type==="phone"?"tel":"text",name:he.name,autoComplete:"off",value:Se[he.name]??"",onChange:ke=>re(Qe=>({...Qe,[he.name]:ke.target.value})),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${r}-input`,style:{...Ve,paddingRight:I.scalingValue(k.right,t),paddingLeft:I.scalingValue(k.left,t),paddingTop:I.scalingValue(k.top,t),paddingBottom:I.scalingValue(k.bottom,t)}},he.name))}),S.jsx("div",{className:`${r}-overlayAnchor`,children:S.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":oe,style:{...ee,...fn,paddingRight:I.scalingValue(E.right,t),paddingLeft:I.scalingValue(E.left,t),paddingTop:I.scalingValue(E.top,t),paddingBottom:I.scalingValue(E.bottom,t)},children:te==="submitting"?"...":X?Q&&S.jsx(gt,{url:Q,className:`${r}-submitBtnIcon`,style:{maxWidth:I.scalingValue(V??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ne})})]}),me==="success"&&S.jsx("p",{className:`${r}-success`,style:{...ce},children:T}),me==="error"&&S.jsx("p",{className:`${r}-error`,style:{...ce},role:"alert",children:Ue??se??C})]})},Il={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"},kl=["hover","focus","filled","success","error"],Fl=`import React, { useMemo, useState } from 'react';
934
+ `}const Wl=({settings:t,isEditor:e,metadata:n,activeEvent:o})=>{const{prefix:r}=x.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:p,fieldsToShow:c=1,fontFamily:f,inputFontSettings:u,inputFontSize:k,inputLineHeight:b,inputLetterSpacing:y,inputWordSpacing:l,inputTextAppearance:g,buttonFontSettings:$,buttonFontSize:h,buttonLineHeight:v,buttonLetterSpacing:E,buttonWordSpacing:B,buttonTextAppearance:M,statusFontSettings:L,statusFontSize:m,statusLineHeight:F,statusLetterSpacing:I,statusWordSpacing:N,statusTextAppearance:R,iconMaxWidth:W,minHeight:_,corners:D,stroke:H,stateOverrides:d,inputPadding:w,buttonPadding:C,successMessage:T="Thanks for subscribing!",errorMessage:A="Please, fill all required fields."}=t,V=a.slice(0,Math.min(c,a.length)),[q,at]=j.useState(()=>Object.fromEntries(V.map(bt=>[bt.name,""]))),[it,pt]=j.useState("idle"),[z,J]=j.useState(null),Y=o==="success"?"success":o==="error"?"error":it,K=o==="error"?A:z,tt=o==="filled",ct=j.useMemo(()=>{if(!tt)return q;let bt=null;for(const Vt of V)(q[Vt.name]??"").trim().length>0||(bt=bt??{...q},bt[Vt.name]="Filled");return bt??q},[tt,q,V]),st=Y==="error"?x.getFormFieldValidationError(V,ct):null,P=o&&o!=="default"?`${r}-state-${o}`:"",S=V.some(bt=>(ct[bt.name]??"").trim().length>0),U=P!==`${r}-state-filled`&&S?`${r}-state-filled`:"",G=`${P} ${U}`.trim(),Z=n==null?void 0:n.submitUrl,ot=p??"",et=(i==null?void 0:i.icon)??"",Q=(i==null?void 0:i.mode)==="On",lt=ot||"Submit",yt={fontSettings:{fontFamily:f,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:k??.01,lineHeight:b,letterSpacing:y??0,wordSpacing:l??0,textAppearance:g,color:t.inputTextColor??"#111111"},ut={fontSettings:{fontFamily:f,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:h??.01,lineHeight:v,letterSpacing:E??0,wordSpacing:B??0,textAppearance:M,color:t.buttonTextColor??"#ffffff"},ht={fontSettings:{fontFamily:f,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:m??.01,lineHeight:F,letterSpacing:I??0,wordSpacing:N??0,textAppearance:R,color:t.successColor??"#22c55e"},Pt=he(Jt(yt,e)),rt=he(Jt(ut,e)),gt=he(Jt(ht,e)),Tt=x.buildColorVars(r,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(yt==null?void 0:yt.color)??"#111111",buttonTextColor:t.buttonTextColor??(ut==null?void 0:ut.color)??"#ffffff"},Vl,zl,d),Xt={borderRadius:x.scalingValue(D,e),borderWidth:x.scalingValue(H,e),borderStyle:"solid"},bn={borderLeftWidth:x.scalingValue(H,e)},we=async bt=>{bt.preventDefault();const Vt=Object.fromEntries(V.map(xt=>{var jt;return[xt.name,((jt=q[xt.name])==null?void 0:jt.trim())??""]}).filter(([,xt])=>xt));if(!Z){pt("error"),J("No integrations were found for this form.");return}if(Object.keys(Vt).length===0)return;const oe=x.getFormFieldValidationError(V,q);if(oe){pt("error"),J(oe);return}pt("submitting"),J(null);try{const xt=await fetch(Z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Vt)});if(!xt.ok){const jt=await xt.text();throw new Error(jt||`Request failed: ${xt.status}`)}pt("success"),at(Object.fromEntries(V.map(jt=>[jt.name,""])))}catch(xt){pt("error"),J(xt instanceof Error?xt.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${G}`.trim(),style:Tt,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:Rl(r)}}),s.jsxs("form",{onSubmit:we,className:`${r}-form`,style:{...Xt,height:x.scalingValue(_,e),minHeight:x.scalingValue(_,e)},children:[s.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:V.map(bt=>s.jsx("input",{type:bt.type==="email"?"email":bt.type==="phone"?"tel":"text",name:bt.name,autoComplete:"off",value:ct[bt.name]??"",onChange:Vt=>at(oe=>({...oe,[bt.name]:Vt.target.value})),placeholder:bt.placeholder,required:bt.isRequired??bt.type==="email",className:`${r}-input`,style:{...Pt,paddingRight:x.scalingValue(w.right,e),paddingLeft:x.scalingValue(w.left,e),paddingTop:x.scalingValue(w.top,e),paddingBottom:x.scalingValue(w.bottom,e)}},bt.name))}),s.jsx("div",{className:`${r}-overlayAnchor`,children:s.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":lt,style:{...rt,...bn,paddingRight:x.scalingValue(C.right,e),paddingLeft:x.scalingValue(C.left,e),paddingTop:x.scalingValue(C.top,e),paddingBottom:x.scalingValue(C.bottom,e)},children:it==="submitting"?"...":Q?et&&s.jsx(ye,{url:et,className:`${r}-submitBtnIcon`,style:{maxWidth:x.scalingValue(W??0,e)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ot})})]}),Y==="success"&&s.jsx("p",{className:`${r}-success`,style:{...gt},children:T}),Y==="error"&&s.jsx("p",{className:`${r}-error`,style:{...gt},role:"alert",children:st??K??A})]})},Vl={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"},zl=["hover","focus","filled","success","error"],Nl=`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,4 +1503,753 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1503
1503
  };
1504
1504
 
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1506
- `,Rl="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>'),Bl=[{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."}],Cn={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Pl={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:{...Cn.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:{...Cn.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:{...Cn.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:Bl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Rl},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:[...Vl],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"]},Ol={element:Al,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Pl,sourceCode:Fl},Wl=[$a,Ia,vl,El,Ol];exports.components=Wl;exports.isSchemaV1=fr;
1506
+ `,Ml="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>'),Pl=[{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"}}}},jl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Hl={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:Pl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Ml},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:[...jl],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"]},Ol={element:Wl,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Hl,sourceCode:Nl},Bl="Testimonials-module__marqueeWrapper___CwgXx",Dl="Testimonials-module__marqueeTrack___0eRvh",Ul="Testimonials-module__marqueeSet___Zz-mH",Gl="Testimonials-module__wrapper___MSG51",ql="Testimonials-module__cover___8N6A3",Yl="Testimonials-module__elementsOverlay___ar14y",Xl="Testimonials-module__image___fqDvN",Kl="Testimonials-module__control___ORbH3",kt={marqueeWrapper:Bl,marqueeTrack:Dl,marqueeSet:Ul,wrapper:Gl,cover:ql,elementsOverlay:Yl,image:Xl,control:Kl},Jl=30,Zl=t=>{if(typeof t=="number")return t;const e=parseFloat(String(t??""));return Number.isFinite(e)?e:0},Ql=t=>({fontSettings:{...t.fontSettings},letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,fontSize:t.fontSizeLineHeight.fontSize,lineHeight:t.fontSizeLineHeight.lineHeight,textAppearance:t.textAppearance,color:t.color}),ts=({settings:t,content:e,isEditor:n})=>{const o=(e==null?void 0:e.items)??[],{autoplay:r,speed:a,direction:i,pause:p,gap:c,cardWidth:f,cardHeight:u,corners:k,stroke:b,strokeColor:y,bgColor:l,padding:g,iconMarginTop:$,iconWidth:h,textMarginTop:v,textMinHeight:E,captionMarginTop:B}=t,M=r==="on",L=Math.max(0,Zl(a))*Jl,m=Y=>x.scalingValue(Y,n??!1),F=j.useRef(null),I=j.useRef(null),N=j.useRef(null),[R,W]=j.useState(0),[_,D]=j.useState(0),H=j.useRef(0),d=j.useRef(!1),w=j.useRef(null),C=j.useRef(i),T=M&&p==="hover",A=Y=>{var yt;const K=(yt=t==null?void 0:t.styles)==null?void 0:yt[Y];if(K)return K;const tt=Y==="text"?"text":"caption",ct=t==null?void 0:t[`${tt}FontFamily`],st=t==null?void 0:t[`${tt}FontSettings`],P=t==null?void 0:t[`${tt}LetterSpacing`],S=t==null?void 0:t[`${tt}WordSpacing`],U=t==null?void 0:t[`${tt}TextAlign`],G=t==null?void 0:t[`${tt}TextAppearance`],Z=(t==null?void 0:t[`${tt}Color`])??(Y==="text"?t==null?void 0:t.imageCaptionColor:void 0),ot=t==null?void 0:t[`${tt}FontSize`],et=t==null?void 0:t[`${tt}LineHeight`];return typeof ct=="string"||!!st||typeof P=="number"||typeof S=="number"||typeof U=="string"||!!G||typeof Z=="string"||typeof ot=="number"||typeof et=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof ct=="string"?ct:"Arial",fontWeight:typeof(st==null?void 0:st.fontWeight)=="number"?st.fontWeight:400,fontStyle:typeof(st==null?void 0:st.fontStyle)=="string"?st.fontStyle:"normal"},letterSpacing:typeof P=="number"?P:0,wordSpacing:typeof S=="number"?S:0,textAlign:U==="left"||U==="center"||U==="right"?U:"left",fontSizeLineHeight:{fontSize:typeof ot=="number"?ot:.01,lineHeight:typeof et=="number"?et:.01},textAppearance:{textTransform:(G==null?void 0:G.textTransform)??"none",textDecoration:(G==null?void 0:G.textDecoration)??"none",fontVariant:(G==null?void 0:G.fontVariant)??"normal"},color:typeof Z=="string"?Z:"#000000"}:void 0},V=A("text"),q=A("caption"),at=j.useMemo(()=>!M||o.length===0?1:_<=0||R<=0?2:Math.max(2,Math.ceil(R/_)+1),[M,o.length,_,R]);j.useLayoutEffect(()=>{if(!M)return;const Y=F.current,K=N.current;if(!Y||!K)return;let tt=0;const ct=()=>{W(Y.getBoundingClientRect().width),D(K.getBoundingClientRect().width)},st=()=>{cancelAnimationFrame(tt),tt=requestAnimationFrame(ct)};st();const P=new ResizeObserver(st);return P.observe(Y),P.observe(K),()=>{cancelAnimationFrame(tt),P.disconnect()}},[M,o.length]),j.useLayoutEffect(()=>{const Y=I.current;if(!M||!Y)return;if(_<=0||L<=0){Y.style.transform="translate3d(0, 0, 0)";return}C.current!==i&&(H.current=1-H.current,C.current=i);const K=_/L*1e3,tt=i==="right"?-_:0,ct=i==="right"?0:-_,st=Y.animate([{transform:`translate3d(${tt}px, 0, 0)`},{transform:`translate3d(${ct}px, 0, 0)`}],{duration:K,iterations:1/0,easing:"linear"});return st.currentTime=H.current*K,d.current&&st.pause(),w.current=st,()=>{const P=typeof st.currentTime=="number"?st.currentTime:0;H.current=K>0?P/K%1:0,st.cancel(),w.current===st&&(w.current=null)}},[M,_,L,i]);const it=()=>{var Y;T&&(d.current=!0,(Y=w.current)==null||Y.pause())},pt=()=>{var Y;T&&(d.current=!1,(Y=w.current)==null||Y.play())},z=(Y,K,tt,ct,st,P,S)=>s.jsxs("div",{children:[s.jsx("div",{"data-controls":ct,className:kt.control}),s.jsx("div",{"data-styles":tt,className:kt.caption,style:{...Jt(Ql(Y),n),textAlign:Y.textAlign,pointerEvents:"auto",marginTop:m(P),...S?{minHeight:m(S)}:{}},children:s.jsx(ze,{content:K})})]},st),J=(Y,K)=>{var tt,ct,st,P;return s.jsxs("div",{style:{padding:`${m(g.top)} ${m(g.right)} ${m(g.bottom)} ${m(g.left)}`,width:m(f+b*2),minHeight:m(u),height:"100%",borderRadius:m(k),border:`${m(b)} solid ${y}`,boxSizing:"border-box",position:"relative",flex:"0 0 auto"},children:[((tt=Y.image)==null?void 0:tt.url)&&s.jsx("img",{className:kt.image,src:Y.image.url,alt:Y.image.name,style:{objectFit:Y.image.objectFit||"cover",borderRadius:m(k),height:m(u)}}),s.jsx("div",{className:kt.cover,style:{background:l,borderRadius:m(k),height:"100%"}}),s.jsxs("div",{className:kt.elementsOverlay,style:{display:"flex",flexDirection:"column",pointerEvents:"none"},children:[s.jsx("div",{children:s.jsx("div",{"data-controls":"elements.icon.margin.top",className:kt.control,style:{marginTop:m($),width:m(h)},children:s.jsx("img",{src:(ct=Y.icon)==null?void 0:ct.url,alt:(st=Y.icon)==null?void 0:st.name,style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((P=Y.icon)==null?void 0:P.objectFit)||"cover"}})})},"icon"),V&&z(V,Y.text,"text","elements.text.margin.top","text",v,E),q&&z(q,Y.caption,"caption","elements.caption.margin.top","caption",B)]})]},K)};return M&&o.length>0?s.jsx("div",{ref:F,className:ft(kt.wrapper,kt.marqueeWrapper),"aria-label":"Testimonials",children:s.jsx("div",{ref:I,className:kt.marqueeTrack,onMouseEnter:it,onMouseLeave:pt,children:Array.from({length:at},(Y,K)=>s.jsx("div",{ref:K===0?N:void 0,className:kt.marqueeSet,style:{gap:m(c),paddingRight:m(c)},"aria-hidden":K>0,children:o.map((tt,ct)=>J(tt,`${K}-${ct}`))},`set-${K}`))})}):s.jsx("div",{className:kt.wrapper,children:s.jsx("div",{style:{display:"flex",flexDirection:"row",gap:m(c),justifyContent:"center",overflowX:"auto"},"aria-label":"Testimonials",children:o.map((Y,K)=>J(Y,K))})})},es=`import { useLayoutEffect, useMemo, useRef, useState } from 'react';
1507
+ import cn from 'classnames';
1508
+ import classes from './Testimonials.module.scss';
1509
+ import { CommonComponentProps } from '../props';
1510
+ import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
1511
+ import { scalingValue } from '../utils/scalingValue';
1512
+ import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
1513
+
1514
+ type TestimonialsProps = {
1515
+ settings: TestimonialsSettings;
1516
+ content?: { items: TestimonialsItem[] };
1517
+ isEditor?: boolean;
1518
+ } & CommonComponentProps;
1519
+
1520
+ type CaptionStyleFromFlatSettings = {
1521
+ fontSettings: {
1522
+ fontFamily: string;
1523
+ fontWeight: number;
1524
+ fontStyle: string;
1525
+ };
1526
+ widthSettings: {
1527
+ width: number;
1528
+ sizing: 'auto' | 'manual';
1529
+ };
1530
+ letterSpacing: number;
1531
+ textAlign: 'left' | 'center' | 'right';
1532
+ wordSpacing: number;
1533
+ fontSizeLineHeight: {
1534
+ fontSize: number;
1535
+ lineHeight: number;
1536
+ };
1537
+ textAppearance: {
1538
+ textTransform: 'none' | 'uppercase' | 'lowercase';
1539
+ textDecoration: 'none' | 'underline';
1540
+ fontVariant: 'normal' | 'small-caps';
1541
+ };
1542
+ color: string;
1543
+ };
1544
+
1545
+ const PX_PER_SEC_PER_SPEED_UNIT = 30;
1546
+
1547
+ const parseSpeed = (speed: unknown): number => {
1548
+ if (typeof speed === 'number') return speed;
1549
+ const n = parseFloat(String(speed ?? ''));
1550
+ return Number.isFinite(n) ? n : 0;
1551
+ };
1552
+
1553
+ const resolveCaptionTextStyles = (caption: CaptionStyles): TextStyles => ({
1554
+ fontSettings: { ...caption.fontSettings },
1555
+ letterSpacing: caption.letterSpacing,
1556
+ wordSpacing: caption.wordSpacing,
1557
+ fontSize: caption.fontSizeLineHeight.fontSize,
1558
+ lineHeight: caption.fontSizeLineHeight.lineHeight,
1559
+ textAppearance: caption.textAppearance,
1560
+ color: caption.color,
1561
+ });
1562
+
1563
+ export const Testimonials = ({ settings, content, isEditor }: TestimonialsProps) => {
1564
+ const items = content?.items ?? [];
1565
+ const { autoplay, speed, direction, pause, gap, cardWidth, cardHeight, corners, stroke, strokeColor, bgColor, padding, iconMarginTop, iconWidth, textMarginTop, textMinHeight, captionMarginTop } = settings;
1566
+ const isAutoplay = autoplay === 'on';
1567
+ const pxPerSec = Math.max(0, parseSpeed(speed)) * PX_PER_SEC_PER_SPEED_UNIT;
1568
+ const scaled = (v: number) => scalingValue(v, isEditor ?? false);
1569
+ const wrapperRef = useRef<HTMLDivElement | null>(null);
1570
+ const trackRef = useRef<HTMLDivElement | null>(null);
1571
+ const setRef = useRef<HTMLDivElement | null>(null);
1572
+ const [containerWidth, setContainerWidth] = useState(0);
1573
+ const [setWidth, setSetWidth] = useState(0);
1574
+ const progressRef = useRef(0);
1575
+ const hoveringRef = useRef(false);
1576
+ const animRef = useRef<Animation | null>(null);
1577
+ const lastDirectionRef = useRef(direction);
1578
+ const hoverPauseEnabled = isAutoplay && pause === 'hover';
1579
+
1580
+ const resolveCaptionStyle = (kind: 'text' | 'caption'): CaptionStyles | undefined => {
1581
+ const fromNested = (settings as any)?.styles?.[kind] as CaptionStyles | undefined;
1582
+ if (fromNested) return fromNested;
1583
+
1584
+ const prefix = kind === 'text' ? 'text' : 'caption';
1585
+ const fontFamily = (settings as any)?.[\`\${prefix}FontFamily\`];
1586
+ const fontSettings = (settings as any)?.[\`\${prefix}FontSettings\`];
1587
+ const letterSpacing = (settings as any)?.[\`\${prefix}LetterSpacing\`];
1588
+ const wordSpacing = (settings as any)?.[\`\${prefix}WordSpacing\`];
1589
+ const textAlign = (settings as any)?.[\`\${prefix}TextAlign\`];
1590
+ const textAppearance = (settings as any)?.[\`\${prefix}TextAppearance\`];
1591
+ const color =
1592
+ (settings as any)?.[\`\${prefix}Color\`] ??
1593
+ (kind === 'text' ? (settings as any)?.imageCaptionColor : undefined);
1594
+ const fontSize = (settings as any)?.[\`\${prefix}FontSize\`];
1595
+ const lineHeight = (settings as any)?.[\`\${prefix}LineHeight\`];
1596
+
1597
+ const hasAnyFlat =
1598
+ typeof fontFamily === "string" ||
1599
+ !!fontSettings ||
1600
+ typeof letterSpacing === "number" ||
1601
+ typeof wordSpacing === "number" ||
1602
+ typeof textAlign === "string" ||
1603
+ !!textAppearance ||
1604
+ typeof color === "string" ||
1605
+ typeof fontSize === "number" ||
1606
+ typeof lineHeight === "number";
1607
+ if (!hasAnyFlat) return undefined;
1608
+
1609
+ const flat: CaptionStyleFromFlatSettings = {
1610
+ widthSettings: { width: 0.13, sizing: 'manual' },
1611
+ fontSettings: {
1612
+ fontFamily: typeof fontFamily === 'string' ? fontFamily : 'Arial',
1613
+ fontWeight: typeof fontSettings?.fontWeight === 'number' ? fontSettings.fontWeight : 400,
1614
+ fontStyle: typeof fontSettings?.fontStyle === 'string' ? fontSettings.fontStyle : 'normal',
1615
+ },
1616
+ letterSpacing: typeof letterSpacing === 'number' ? letterSpacing : 0,
1617
+ wordSpacing: typeof wordSpacing === 'number' ? wordSpacing : 0,
1618
+ textAlign: (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') ? textAlign : 'left',
1619
+ fontSizeLineHeight: {
1620
+ fontSize: typeof fontSize === 'number' ? fontSize : 0.01,
1621
+ lineHeight: typeof lineHeight === 'number' ? lineHeight : 0.01,
1622
+ },
1623
+ textAppearance: {
1624
+ textTransform: textAppearance?.textTransform ?? 'none',
1625
+ textDecoration: textAppearance?.textDecoration ?? 'none',
1626
+ fontVariant: textAppearance?.fontVariant ?? 'normal',
1627
+ },
1628
+ color: typeof color === 'string' ? color : '#000000',
1629
+ };
1630
+
1631
+ return flat as CaptionStyles;
1632
+ };
1633
+
1634
+ const textStyle = resolveCaptionStyle('text');
1635
+ const captionStyle = resolveCaptionStyle('caption');
1636
+
1637
+ const copies = useMemo(() => {
1638
+ if (!isAutoplay || items.length === 0) return 1;
1639
+ if (setWidth <= 0 || containerWidth <= 0) return 2;
1640
+ return Math.max(2, Math.ceil(containerWidth / setWidth) + 1);
1641
+ }, [isAutoplay, items.length, setWidth, containerWidth]);
1642
+
1643
+ useLayoutEffect(() => {
1644
+ if (!isAutoplay) return;
1645
+ const wrapper = wrapperRef.current;
1646
+ const set = setRef.current;
1647
+ if (!wrapper || !set) return;
1648
+ let raf = 0;
1649
+ const measure = () => {
1650
+ setContainerWidth(wrapper.getBoundingClientRect().width);
1651
+ setSetWidth(set.getBoundingClientRect().width);
1652
+ };
1653
+ const schedule = () => {
1654
+ cancelAnimationFrame(raf);
1655
+ raf = requestAnimationFrame(measure);
1656
+ };
1657
+ schedule();
1658
+ const ro = new ResizeObserver(schedule);
1659
+ ro.observe(wrapper);
1660
+ ro.observe(set);
1661
+ return () => {
1662
+ cancelAnimationFrame(raf);
1663
+ ro.disconnect();
1664
+ };
1665
+ }, [isAutoplay, items.length]);
1666
+
1667
+ useLayoutEffect(() => {
1668
+ const track = trackRef.current;
1669
+ if (!isAutoplay || !track) return;
1670
+ if (setWidth <= 0 || pxPerSec <= 0) {
1671
+ track.style.transform = 'translate3d(0, 0, 0)';
1672
+ return;
1673
+ }
1674
+ if (lastDirectionRef.current !== direction) {
1675
+ progressRef.current = 1 - progressRef.current;
1676
+ lastDirectionRef.current = direction;
1677
+ }
1678
+ const duration = (setWidth / pxPerSec) * 1000;
1679
+ const from = direction === 'right' ? -setWidth : 0;
1680
+ const to = direction === 'right' ? 0 : -setWidth;
1681
+ const anim = track.animate(
1682
+ [{ transform: \`translate3d(\${from}px, 0, 0)\` }, { transform: \`translate3d(\${to}px, 0, 0)\` }],
1683
+ { duration, iterations: Infinity, easing: 'linear' }
1684
+ );
1685
+ anim.currentTime = progressRef.current * duration;
1686
+ if (hoveringRef.current) anim.pause();
1687
+ animRef.current = anim;
1688
+ return () => {
1689
+ const ct = typeof anim.currentTime === 'number' ? anim.currentTime : 0;
1690
+ progressRef.current = duration > 0 ? (ct / duration) % 1 : 0;
1691
+ anim.cancel();
1692
+ if (animRef.current === anim) animRef.current = null;
1693
+ };
1694
+ }, [isAutoplay, setWidth, pxPerSec, direction]);
1695
+
1696
+ const onTrackEnter = () => {
1697
+ if (!hoverPauseEnabled) return;
1698
+ hoveringRef.current = true;
1699
+ animRef.current?.pause();
1700
+ };
1701
+ const onTrackLeave = () => {
1702
+ if (!hoverPauseEnabled) return;
1703
+ hoveringRef.current = false;
1704
+ animRef.current?.play();
1705
+ };
1706
+
1707
+ const renderText = (
1708
+ style: CaptionStyles,
1709
+ content: any[],
1710
+ dataStyles: string,
1711
+ dataControls: string,
1712
+ key: string,
1713
+ marginTop: number,
1714
+ minHeight?: number
1715
+ ) => (
1716
+ <div key={key}>
1717
+ <div data-controls={dataControls} className={classes.control} />
1718
+ <div
1719
+ data-styles={dataStyles}
1720
+ className={classes.caption}
1721
+ style={{
1722
+ ...textStylesToCss(resolveCaptionTextStyles(style), isEditor),
1723
+ textAlign: style.textAlign,
1724
+ pointerEvents: 'auto',
1725
+ marginTop: scaled(marginTop),
1726
+ ...(minHeight ? { minHeight: scaled(minHeight) } : {}),
1727
+ }}
1728
+ >
1729
+ <RichTextRenderer content={content} />
1730
+ </div>
1731
+ </div>
1732
+ );
1733
+
1734
+ const renderCard = (item: TestimonialsItem, key: string | number) => (
1735
+ <div
1736
+ key={key}
1737
+ style={{
1738
+ padding: \`\${scaled(padding.top)} \${scaled(padding.right)} \${scaled(padding.bottom)} \${scaled(padding.left)}\`,
1739
+ width: scaled(cardWidth + stroke * 2),
1740
+ minHeight: scaled(cardHeight),
1741
+ height: '100%',
1742
+ borderRadius: scaled(corners),
1743
+ border: \`\${scaled(stroke)} solid \${strokeColor}\`,
1744
+ boxSizing: 'border-box',
1745
+ position: 'relative',
1746
+ flex: '0 0 auto',
1747
+ }}
1748
+ >
1749
+ {item.image?.url && (
1750
+ <img
1751
+ className={classes.image}
1752
+ src={item.image.url}
1753
+ alt={item.image.name}
1754
+ style={{
1755
+ objectFit: item.image.objectFit || 'cover',
1756
+ borderRadius: scaled(corners),
1757
+ height: scaled(cardHeight),
1758
+ }}
1759
+ />
1760
+ )}
1761
+ <div
1762
+ className={classes.cover}
1763
+ style={{
1764
+ background: bgColor,
1765
+ borderRadius: scaled(corners),
1766
+ height: '100%',
1767
+ }}
1768
+ />
1769
+ <div
1770
+ className={classes.elementsOverlay}
1771
+ style={{ display: 'flex', flexDirection: 'column', pointerEvents: 'none' }}
1772
+ >
1773
+ <div key="icon">
1774
+ <div
1775
+ data-controls="elements.icon.margin.top"
1776
+ className={classes.control}
1777
+ style={{ marginTop: scaled(iconMarginTop), width: scaled(iconWidth) }}
1778
+ >
1779
+ <img
1780
+ src={item.icon?.url}
1781
+ alt={item.icon?.name}
1782
+ style={{ pointerEvents: 'auto',width: '100%', height: '100%', objectFit: item.icon?.objectFit || 'cover' }}
1783
+ />
1784
+ </div>
1785
+ </div>
1786
+ {textStyle && renderText(textStyle, item.text, 'text', 'elements.text.margin.top', 'text', textMarginTop, textMinHeight)}
1787
+ {captionStyle && renderText(captionStyle, item.caption, 'caption', 'elements.caption.margin.top', 'caption', captionMarginTop)}
1788
+ </div>
1789
+ </div>
1790
+ );
1791
+
1792
+ if (isAutoplay && items.length > 0) {
1793
+ return (
1794
+ <div ref={wrapperRef} className={cn(classes.wrapper, classes.marqueeWrapper)} aria-label="Testimonials">
1795
+ <div
1796
+ ref={trackRef}
1797
+ className={classes.marqueeTrack}
1798
+ onMouseEnter={onTrackEnter}
1799
+ onMouseLeave={onTrackLeave}
1800
+ >
1801
+ {Array.from({ length: copies }, (_, copyIndex) => (
1802
+ <div
1803
+ key={\`set-\${copyIndex}\`}
1804
+ ref={copyIndex === 0 ? setRef : undefined}
1805
+ className={classes.marqueeSet}
1806
+ style={{ gap: scaled(gap), paddingRight: scaled(gap) }}
1807
+ aria-hidden={copyIndex > 0}
1808
+ >
1809
+ {items.map((item, index) => renderCard(item, \`\${copyIndex}-\${index}\`))}
1810
+ </div>
1811
+ ))}
1812
+ </div>
1813
+ </div>
1814
+ );
1815
+ }
1816
+
1817
+ return (
1818
+ <div className={classes.wrapper}>
1819
+ <div
1820
+ style={{
1821
+ display: 'flex',
1822
+ flexDirection: 'row',
1823
+ gap: scaled(gap),
1824
+ justifyContent: 'center',
1825
+ overflowX: 'auto',
1826
+ }}
1827
+ aria-label="Testimonials"
1828
+ >
1829
+ {items.map((item, index) => renderCard(item, index))}
1830
+ </div>
1831
+ </div>
1832
+ );
1833
+ };
1834
+
1835
+ export type TestimonialsItem = {
1836
+ image?: {
1837
+ url?: string;
1838
+ name?: string;
1839
+ objectFit?: 'cover' | 'contain';
1840
+ };
1841
+ icon?: {
1842
+ url?: string;
1843
+ name?: string;
1844
+ objectFit?: 'cover' | 'contain';
1845
+ };
1846
+ text: any[];
1847
+ caption: any[];
1848
+ };
1849
+
1850
+ type Padding = {
1851
+ top: number;
1852
+ right: number;
1853
+ bottom: number;
1854
+ left: number;
1855
+ };
1856
+
1857
+ type TestimonialsSettings = {
1858
+ autoplay: 'on' | 'off';
1859
+ speed: number;
1860
+ direction: 'left' | 'right';
1861
+ pause: 'hover' | 'off';
1862
+ gap: number;
1863
+ cardWidth: number;
1864
+ cardHeight: number;
1865
+ corners: number;
1866
+ stroke: number;
1867
+ strokeColor: string;
1868
+ bgColor: string;
1869
+ padding: Padding;
1870
+ iconMarginTop: number;
1871
+ iconWidth: number;
1872
+ textMarginTop: number;
1873
+ textMinHeight: number;
1874
+ captionMarginTop: number;
1875
+ styles: TestimonialsStyles;
1876
+ };
1877
+
1878
+ type CaptionStyles = {
1879
+ fontSettings: {
1880
+ fontFamily: string;
1881
+ fontWeight: number;
1882
+ fontStyle: string;
1883
+ };
1884
+ widthSettings: {
1885
+ width: number;
1886
+ sizing: 'auto' | 'manual';
1887
+ };
1888
+ letterSpacing: number;
1889
+ textAlign: 'left' | 'center' | 'right';
1890
+ wordSpacing: number;
1891
+ fontSizeLineHeight: {
1892
+ fontSize: number;
1893
+ lineHeight: number;
1894
+ };
1895
+ textAppearance: {
1896
+ textTransform: 'none' | 'uppercase' | 'lowercase';
1897
+ textDecoration: 'none' | 'underline';
1898
+ fontVariant: 'normal' | 'small-caps';
1899
+ };
1900
+ color: string;
1901
+ };
1902
+
1903
+ type TestimonialsStyles = {
1904
+ text: CaptionStyles;
1905
+ caption: CaptionStyles;
1906
+ };
1907
+ `,Ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ns={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-toggle"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:1,max:10},direction:{type:"string",scope:"common",display:{type:"switch-toggle"},enum:["left","right"]},pause:{title:"Pause on",type:"string",scope:"common",display:{type:"switch-toggle"},enum:["hover","off"]},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},cardWidth:{type:"number",scope:"layout",title:"Card width",min:0,max:400,display:{type:"range-control"}},cardHeight:{type:"number",scope:"layout",title:"Card height",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:20,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker"}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},iconMarginTop:{type:"number",scope:"layout",title:"Icon margin top",min:0,max:100,display:{type:"range-control"}},iconWidth:{type:"number",scope:"layout",title:"Icon width",min:0,max:200,display:{type:"range-control"}},imageCaptionColor:{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"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},textMinHeight:{type:"number",scope:"layout",title:"Text min height",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 Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Ao.fontSettings,scope:"common",title:"Caption",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 Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ao.fontSettings,scope:"common",title:"Text",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",pause:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.2)",imageCaptionColor:"#000000",captionColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},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,cardHeight:.2,corners:.005,stroke:.001,padding:{top:0,right:0,bottom:0,left:0},iconMarginTop:0,iconWidth:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0},d:{speed:5,gap:.02,cardWidth:.15,cardHeight:.2,corners:.005,stroke:.001,padding:{top:0,right:0,bottom:0,left:0},iconMarginTop:0,iconWidth:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0}},displayRules:[],layout:["__componentName__","autoplay","speed","direction","pause","gap","cardWidth","cardHeight","corners","stroke","strokeColor","bgColor","padding","iconMarginTop","iconWidth","textMarginTop","textMinHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["pause","speed"]},{type:"row",items:["direction","gap"]},{type:"row",items:[{type:"group",title:"",items:["cardWidth","cardHeight","corners","stroke"]},{type:"group",title:"",items:["padding","iconWidth"]}]},{type:"row",items:["textMinHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}],paletteBookmark:{items:["strokeColor","bgColor","imageCaptionColor","captionColor"],panelIds:["general","typeStyle"]},content:{properties:{items:{type:"array",scope:"common",display:{type:"content-items",addItemFromFileExplorer:!1,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",title:"Image",display:{minWidth:58,maxWidth:108,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}}},icon:{type:"object",title:"Icon",display:{minWidth:58,maxWidth:108,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}}},text:{type:"array",title:"Text",display:{type:"rich-text",minWidth:300,maxWidth:550}},caption:{type:"array",title:"Caption",display:{type:"rich-text",minWidth:300,maxWidth:550}}}}}},defaults:{items:[{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.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"}]}]},{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.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"}]}]},{image:{},icon:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.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"}]}]}]}}},os={element:ts,id:"testimonials",name:"Testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:700,height:300},schema:ns,sourceCode:es,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"}]}},rs="Testimonials-module__container___Hxc4p",is="Testimonials-module__wrapper___uBekx",as="Testimonials-module__cover___ZvEoE",ls="Testimonials-module__elementsOverlay___5I51C",ss="Testimonials-module__image___afGk-",cs="Testimonials-module__icon___Cpw7E",ps="Testimonials-module__control___DktvH",_t={container:rs,wrapper:is,cover:as,elementsOverlay:ls,image:ss,icon:cs,control:ps},us=({settings:t,content:e,isEditor:n})=>{var E,B,M,L,m;const o=(e==null?void 0:e.items)??[],{autoplay:r,speed:a}=t,i=r==="on",p=t.width??0,c=t.iconMarginTop??0,f=t.iconAlign??"left",u=t.iconScale??100,k=t.textMarginTop??0,b=t.textMinHeight??0,y=t.captionMarginTop??0,l=o[0],g=F=>{var q;const I=(q=t==null?void 0:t.styles)==null?void 0:q[F];if(I)return I;const N=F==="imageCaption"?"imageCaption":"caption",R=t==null?void 0:t[`${N}FontFamily`],W=t==null?void 0:t[`${N}FontSettings`],_=t==null?void 0:t[`${N}LetterSpacing`],D=t==null?void 0:t[`${N}WordSpacing`],H=t==null?void 0:t[`${N}TextAlign`],d=t==null?void 0:t[`${N}TextAppearance`],w=t==null?void 0:t[`${N}Color`],C=t==null?void 0:t[`${N}FontSize`],T=t==null?void 0:t[`${N}LineHeight`];return typeof R=="string"||!!W||typeof _=="number"||typeof D=="number"||typeof H=="string"||!!d||typeof w=="string"||typeof C=="number"||typeof T=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof R=="string"?R:"Arial",fontWeight:typeof(W==null?void 0:W.fontWeight)=="number"?W.fontWeight:400,fontStyle:typeof(W==null?void 0:W.fontStyle)=="string"?W.fontStyle:"normal"},letterSpacing:typeof _=="number"?_:0,wordSpacing:typeof D=="number"?D:0,textAlign:H==="left"||H==="center"||H==="right"?H:"left",fontSizeLineHeight:{fontSize:typeof C=="number"?C:.01,lineHeight:typeof T=="number"?T:.01},textAppearance:{textTransform:(d==null?void 0:d.textTransform)??"none",textDecoration:(d==null?void 0:d.textDecoration)??"none",fontVariant:(d==null?void 0:d.fontVariant)??"normal"},color:typeof w=="string"?w:"#000000"}:void 0},$=g("imageCaption"),h=g("caption"),v=j.useMemo(()=>["text","icon","caption"].map((I,N)=>({key:I,order:N})),[]);return l?s.jsx(s.Fragment,{children:s.jsxs("div",{className:_t.container,style:{flexDirection:"column",alignItems:"center"},children:[s.jsx("div",{className:ft(_t.wrapper,!i&&_t.wrapperAutoplayOff),style:{width:x.scalingValue(p,n??!1)},children:s.jsxs("div",{style:{padding:`${x.scalingValue(t.padding.top,n??!1)} ${x.scalingValue(t.padding.right,n??!1)} ${x.scalingValue(t.padding.bottom,n??!1)} ${x.scalingValue(t.padding.left,n??!1)}`,width:x.scalingValue(p,n??!1),height:"100%",boxSizing:"border-box",position:"relative"},children:[((E=l.image)==null?void 0:E.url)&&s.jsx("img",{className:_t.image,src:(B=l.image)==null?void 0:B.url,alt:(M=l.image)==null?void 0:M.name,style:{objectFit:((L=l.image)==null?void 0:L.objectFit)||"cover"}}),s.jsx("div",{className:_t.cover}),s.jsx("div",{className:_t.elementsOverlay,style:{display:"flex",flexDirection:"column",inset:0,pointerEvents:"none"},children:v.map(({key:F,order:I})=>{var N,R;if(F==="icon")return s.jsxs("div",{style:{order:I,zIndex:I},children:[s.jsx("div",{"data-controls":"iconMarginTop",className:_t.control,style:{height:x.scalingValue(c,n??!1)}}),s.jsx("div",{style:{width:"100%",textAlign:f},children:s.jsx("img",{src:(N=l.icon)==null?void 0:N.url,alt:(R=l.icon)==null?void 0:R.name,className:_t.icon,style:{transform:`scale(${u/100})`,pointerEvents:"auto"}})})]},"icon");if(F==="text"&&$){const{widthSettings:W,fontSettings:_,letterSpacing:D,textAlign:H,wordSpacing:d,fontSizeLineHeight:w,textAppearance:C,color:T}=$;return s.jsxs("div",{style:{order:I,zIndex:I},children:[s.jsx("div",{"data-controls":"textMarginTop",className:_t.control,style:{height:x.scalingValue(k,n??!1)}}),s.jsx("div",{"data-styles":"imageCaption",className:_t.caption,style:{fontFamily:_.fontFamily,fontWeight:_.fontWeight,fontStyle:_.fontStyle,minHeight:x.scalingValue(b,n??!1),letterSpacing:x.scalingValue(D,n),wordSpacing:x.scalingValue(d,n),textAlign:H,fontSize:x.scalingValue(w.fontSize,n),lineHeight:x.scalingValue(w.lineHeight,n),textTransform:C.textTransform??"none",textDecoration:C.textDecoration??"none",fontVariant:C.fontVariant??"normal",color:T,pointerEvents:"auto"},children:s.jsx(ze,{content:l.imageCaption??l.text??[]})})]},"text")}if(F==="caption"&&h){const{widthSettings:W,fontSettings:_,letterSpacing:D,textAlign:H,wordSpacing:d,fontSizeLineHeight:w,textAppearance:C,color:T}=h;return s.jsxs("div",{style:{order:I,zIndex:I},children:[s.jsx("div",{"data-controls":"captionMarginTop",className:_t.control,style:{height:x.scalingValue(y,n??!1)}}),s.jsx("div",{"data-styles":"caption",className:_t.caption,style:{fontFamily:_.fontFamily,fontWeight:_.fontWeight,fontStyle:_.fontStyle,minHeight:0,letterSpacing:x.scalingValue(D,n),wordSpacing:x.scalingValue(d,n),textAlign:H,fontSize:x.scalingValue(w.fontSize,n),lineHeight:x.scalingValue(w.lineHeight,n),textTransform:C.textTransform??"none",textDecoration:C.textDecoration??"none",fontVariant:C.fontVariant??"normal",color:T,pointerEvents:"auto"},children:s.jsx(ze,{content:l.caption})})]},"caption")}return null})})]})}),((m=t.controls)==null?void 0:m.isActive)==="visible"&&t.autoplay==="off"&&s.jsx("div",{children:"Controls"})]})}):s.jsx(s.Fragment,{})},ds=`import cn from 'classnames';
1908
+ import { useMemo } from 'react';
1909
+ import classes from './Testimonials.module.scss';
1910
+ import { CommonComponentProps } from '../props';
1911
+ import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
1912
+ import { scalingValue } from '../utils/scalingValue';
1913
+
1914
+ type TestimonialsProps = {
1915
+ settings: TestimonialsSettings;
1916
+ content?: { items: TestimonialsItem[] };
1917
+ isEditor?: boolean;
1918
+ } & CommonComponentProps;
1919
+
1920
+ type CaptionStyleFromFlatSettings = {
1921
+ fontSettings: {
1922
+ fontFamily: string;
1923
+ fontWeight: number;
1924
+ fontStyle: string;
1925
+ };
1926
+ widthSettings: {
1927
+ width: number;
1928
+ sizing: 'auto' | 'manual';
1929
+ };
1930
+ letterSpacing: number;
1931
+ textAlign: 'left' | 'center' | 'right';
1932
+ wordSpacing: number;
1933
+ fontSizeLineHeight: {
1934
+ fontSize: number;
1935
+ lineHeight: number;
1936
+ };
1937
+ textAppearance: {
1938
+ textTransform: 'none' | 'uppercase' | 'lowercase';
1939
+ textDecoration: 'none' | 'underline';
1940
+ fontVariant: 'normal' | 'small-caps';
1941
+ };
1942
+ color: string;
1943
+ };
1944
+
1945
+ export const TestimonialSingle = ({ settings, content, isEditor }: TestimonialsProps) => {
1946
+ const items = content?.items ?? [];
1947
+ const { autoplay, speed } = settings;
1948
+ const isAutoplay = autoplay === 'on';
1949
+
1950
+ const cardWidth = settings.width ?? 0;
1951
+ const iconMarginTop = settings.iconMarginTop ?? 0;
1952
+ const iconAlign = settings.iconAlign ?? 'left';
1953
+ const iconScale = settings.iconScale ?? 100;
1954
+ const textMarginTop = settings.textMarginTop ?? 0;
1955
+ const textMinHeight = settings.textMinHeight ?? 0;
1956
+ const captionMarginTop = settings.captionMarginTop ?? 0;
1957
+
1958
+ const item = items[0];
1959
+
1960
+ const resolveCaptionStyle = (
1961
+ kind: 'imageCaption' | 'caption'
1962
+ ): CaptionStyles | undefined => {
1963
+ const fromNested = (settings as any)?.styles?.[kind] as CaptionStyles | undefined;
1964
+ if (fromNested) return fromNested;
1965
+
1966
+ const prefix = kind === 'imageCaption' ? 'imageCaption' : 'caption';
1967
+ const fontFamily = (settings as any)?.[\`\${prefix}FontFamily\`];
1968
+ const fontSettings = (settings as any)?.[\`\${prefix}FontSettings\`];
1969
+ const letterSpacing = (settings as any)?.[\`\${prefix}LetterSpacing\`];
1970
+ const wordSpacing = (settings as any)?.[\`\${prefix}WordSpacing\`];
1971
+ const textAlign = (settings as any)?.[\`\${prefix}TextAlign\`];
1972
+ const textAppearance = (settings as any)?.[\`\${prefix}TextAppearance\`];
1973
+ const color = (settings as any)?.[\`\${prefix}Color\`];
1974
+ const fontSize = (settings as any)?.[\`\${prefix}FontSize\`];
1975
+ const lineHeight = (settings as any)?.[\`\${prefix}LineHeight\`];
1976
+
1977
+ const hasAnyFlat =
1978
+ typeof fontFamily === 'string' ||
1979
+ !!fontSettings ||
1980
+ typeof letterSpacing === 'number' ||
1981
+ typeof wordSpacing === 'number' ||
1982
+ typeof textAlign === 'string' ||
1983
+ !!textAppearance ||
1984
+ typeof color === 'string' ||
1985
+ typeof fontSize === 'number' ||
1986
+ typeof lineHeight === 'number';
1987
+ if (!hasAnyFlat) return undefined;
1988
+
1989
+ const flat: CaptionStyleFromFlatSettings = {
1990
+ widthSettings: { width: 0.13, sizing: 'manual' },
1991
+ fontSettings: {
1992
+ fontFamily: typeof fontFamily === 'string' ? fontFamily : 'Arial',
1993
+ fontWeight: typeof fontSettings?.fontWeight === 'number' ? fontSettings.fontWeight : 400,
1994
+ fontStyle: typeof fontSettings?.fontStyle === 'string' ? fontSettings.fontStyle : 'normal',
1995
+ },
1996
+ letterSpacing: typeof letterSpacing === 'number' ? letterSpacing : 0,
1997
+ wordSpacing: typeof wordSpacing === 'number' ? wordSpacing : 0,
1998
+ textAlign: (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') ? textAlign : 'left',
1999
+ fontSizeLineHeight: {
2000
+ fontSize: typeof fontSize === 'number' ? fontSize : 0.01,
2001
+ lineHeight: typeof lineHeight === 'number' ? lineHeight : 0.01,
2002
+ },
2003
+ textAppearance: {
2004
+ textTransform: textAppearance?.textTransform ?? 'none',
2005
+ textDecoration: textAppearance?.textDecoration ?? 'none',
2006
+ fontVariant: textAppearance?.fontVariant ?? 'normal',
2007
+ },
2008
+ color: typeof color === 'string' ? color : '#000000',
2009
+ };
2010
+
2011
+ return flat as CaptionStyles;
2012
+ };
2013
+
2014
+ const imageCaptionStyle = resolveCaptionStyle('imageCaption');
2015
+ const captionStyle = resolveCaptionStyle('caption');
2016
+ const elementOrder = useMemo(() => {
2017
+ const order: ElementOrderKey[] = ['text', 'icon', 'caption'];
2018
+ return order.map((key, index: number) => ({ key, order: index }));
2019
+ }, []);
2020
+
2021
+ if (!item) return <></>;
2022
+
2023
+ return (
2024
+ <>
2025
+ <div
2026
+ className={classes.container}
2027
+ style={{
2028
+ flexDirection: 'column',
2029
+ alignItems: 'center'
2030
+ }}
2031
+ >
2032
+ <div
2033
+ className={cn(classes.wrapper, !isAutoplay && classes.wrapperAutoplayOff)}
2034
+ style={{
2035
+ width: scalingValue(cardWidth, isEditor ?? false),
2036
+ }}
2037
+ >
2038
+ <div
2039
+ style={{
2040
+ padding: \`\${scalingValue(settings.padding.top, isEditor ?? false)} \${scalingValue(settings.padding.right, isEditor ?? false)} \${scalingValue(settings.padding.bottom, isEditor ?? false)} \${scalingValue(settings.padding.left, isEditor ?? false)}\`,
2041
+ width: scalingValue(cardWidth, isEditor ?? false),
2042
+ height: '100%',
2043
+ boxSizing: 'border-box',
2044
+ position: 'relative',
2045
+ }}
2046
+ >
2047
+ {item.image?.url && (
2048
+ <img
2049
+ className={classes.image}
2050
+ src={item.image?.url}
2051
+ alt={item.image?.name}
2052
+ style={{objectFit: item.image?.objectFit || 'cover'}}
2053
+ />
2054
+ )}
2055
+ <div className={classes.cover} />
2056
+ <div
2057
+ className={classes.elementsOverlay}
2058
+ style={{
2059
+ display: 'flex',
2060
+ flexDirection: 'column',
2061
+ inset: 0,
2062
+ pointerEvents: 'none',
2063
+ }}
2064
+ >
2065
+ {elementOrder.map(({ key, order: orderIndex }: { key: ElementOrderKey, order: number }) => {
2066
+ if (key === 'icon') {
2067
+ return (
2068
+ <div key="icon" style={{ order: orderIndex, zIndex: orderIndex }}>
2069
+ <div
2070
+ data-controls="iconMarginTop"
2071
+ className={classes.control}
2072
+ style={{ height: scalingValue(iconMarginTop, isEditor ?? false) }}
2073
+ />
2074
+ <div
2075
+ style={{
2076
+ width: '100%',
2077
+ textAlign: iconAlign
2078
+ }}
2079
+ >
2080
+ <img
2081
+ src={item.icon?.url}
2082
+ alt={item.icon?.name}
2083
+ className={classes.icon}
2084
+ style={{
2085
+ transform: \`scale(\${iconScale / 100})\`,
2086
+ pointerEvents: 'auto'
2087
+ }}
2088
+ />
2089
+ </div>
2090
+ </div>
2091
+ );
2092
+ }
2093
+ if (key === 'text' && imageCaptionStyle) {
2094
+ const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } =
2095
+ imageCaptionStyle;
2096
+ return (
2097
+ <div key="text" style={{ order: orderIndex, zIndex: orderIndex }}>
2098
+ <div
2099
+ data-controls="textMarginTop"
2100
+ className={classes.control}
2101
+ style={{ height: scalingValue(textMarginTop, isEditor ?? false) }}
2102
+ />
2103
+ <div
2104
+ data-styles="imageCaption"
2105
+ className={classes.caption}
2106
+ style={{
2107
+ fontFamily: fontSettings.fontFamily,
2108
+ fontWeight: fontSettings.fontWeight,
2109
+ fontStyle: fontSettings.fontStyle,
2110
+ minHeight: scalingValue(textMinHeight, isEditor ?? false),
2111
+ letterSpacing: scalingValue(letterSpacing, isEditor),
2112
+ wordSpacing: scalingValue(wordSpacing, isEditor),
2113
+ textAlign,
2114
+ fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2115
+ lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2116
+ textTransform: textAppearance.textTransform ?? 'none',
2117
+ textDecoration: textAppearance.textDecoration ?? 'none',
2118
+ fontVariant: textAppearance.fontVariant ?? 'normal',
2119
+ color,
2120
+ pointerEvents: 'auto'
2121
+ }}
2122
+ >
2123
+ <RichTextRenderer content={item.imageCaption ?? item.text ?? []} />
2124
+ </div>
2125
+ </div>
2126
+ );
2127
+ }
2128
+ if (key === 'caption' && captionStyle) {
2129
+ const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } =
2130
+ captionStyle;
2131
+ return (
2132
+ <div key="caption" style={{ order: orderIndex, zIndex: orderIndex }}>
2133
+ <div
2134
+ data-controls="captionMarginTop"
2135
+ className={classes.control}
2136
+ style={{ height: scalingValue(captionMarginTop, isEditor ?? false) }}
2137
+ />
2138
+ <div
2139
+ data-styles="caption"
2140
+ className={classes.caption}
2141
+ style={{
2142
+ fontFamily: fontSettings.fontFamily,
2143
+ fontWeight: fontSettings.fontWeight,
2144
+ fontStyle: fontSettings.fontStyle,
2145
+ minHeight: 0,
2146
+ letterSpacing: scalingValue(letterSpacing, isEditor),
2147
+ wordSpacing: scalingValue(wordSpacing, isEditor),
2148
+ textAlign,
2149
+ fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2150
+ lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2151
+ textTransform: textAppearance.textTransform ?? 'none',
2152
+ textDecoration: textAppearance.textDecoration ?? 'none',
2153
+ fontVariant: textAppearance.fontVariant ?? 'normal',
2154
+ color,
2155
+ pointerEvents: 'auto'
2156
+ }}
2157
+ >
2158
+ <RichTextRenderer content={item.caption} />
2159
+ </div>
2160
+ </div>
2161
+ );
2162
+ }
2163
+ return null;
2164
+ })}
2165
+ </div>
2166
+ </div>
2167
+ </div>
2168
+ {settings.controls?.isActive === 'visible' && settings.autoplay === 'off' && (
2169
+ // TODO: Add controls
2170
+ <div>Controls</div>
2171
+ )}
2172
+ </div>
2173
+ </>
2174
+ );
2175
+ };
2176
+
2177
+ export type TestimonialsItem = {
2178
+ image?: {
2179
+ url?: string;
2180
+ name?: string;
2181
+ objectFit?: 'cover' | 'contain';
2182
+ };
2183
+ icon?: {
2184
+ url?: string;
2185
+ name?: string;
2186
+ objectFit?: 'cover' | 'contain';
2187
+ };
2188
+ text: any[];
2189
+ imageCaption?: any[];
2190
+ caption: any[];
2191
+ };
2192
+
2193
+ type Padding = {
2194
+ top: number;
2195
+ right: number;
2196
+ bottom: number;
2197
+ left: number;
2198
+ };
2199
+
2200
+ type TestimonialsSettings = {
2201
+ autoplay: 'on' | 'off';
2202
+ speed: number;
2203
+ width: number;
2204
+ iconMarginTop?: number;
2205
+ iconAlign?: 'left' | 'center' | 'right';
2206
+ iconScale?: number;
2207
+ textMarginTop?: number;
2208
+ textMinHeight?: number;
2209
+ captionMarginTop?: number;
2210
+ padding: Padding;
2211
+ styles: TestimonialsStyles;
2212
+ controls: {
2213
+ isActive: 'visible' | 'hidden';
2214
+ arrowsImgUrl: string | null;
2215
+ align: 'top-center' | 'top-left' | 'top-right' | 'bottom-center' | 'bottom-left' | 'bottom-right' | 'center-center' | 'center-left' | 'center-right';
2216
+ gap: number;
2217
+ scale: number;
2218
+ color: string;
2219
+ hover: string;
2220
+ };
2221
+ };
2222
+
2223
+ type CaptionStyles = {
2224
+ fontSettings: {
2225
+ fontFamily: string;
2226
+ fontWeight: number;
2227
+ fontStyle: string;
2228
+ };
2229
+ widthSettings: {
2230
+ width: number;
2231
+ sizing: 'auto' | 'manual';
2232
+ };
2233
+ letterSpacing: number;
2234
+ textAlign: 'left' | 'center' | 'right';
2235
+ wordSpacing: number;
2236
+ fontSizeLineHeight: {
2237
+ fontSize: number;
2238
+ lineHeight: number;
2239
+ };
2240
+ textAppearance: {
2241
+ textTransform: 'none' | 'uppercase' | 'lowercase';
2242
+ textDecoration: 'none' | 'underline';
2243
+ fontVariant: 'normal' | 'small-caps';
2244
+ };
2245
+ color: string;
2246
+ };
2247
+
2248
+ type TestimonialsStyles = {
2249
+ imageCaption?: CaptionStyles;
2250
+ text: CaptionStyles;
2251
+ caption: CaptionStyles;
2252
+ };
2253
+
2254
+ type ElementOrderKey = 'text' | 'icon' | 'caption';
2255
+ `,Eo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ct={fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"},gs={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-toggle"},enum:["on","off"]},speed:{type:"string",scope:"layout",title:"Speed",display:{type:"speed-control"},min:1,max:10},width:{type:"number",scope:"layout",title:"Card width",min:0,max:400,display:{type:"range-control"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},iconMarginTop:{type:"number",scope:"layout",title:"Icon margin top",min:0,max:100,display:{type:"range-control"}},iconAlign:{type:"string",scope:"common",title:"Icon align",enum:["left","center","right"],display:{type:"align-group",direction:"vertical"}},iconScale:{type:"number",scope:"layout",title:"Icon scale",min:50,max:600,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},textMinHeight:{type:"number",scope:"layout",title:"Text min height",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"}},imageCaptionFontFamily:{type:"string",scope:"common",title:"Text Font Family",display:{type:"font-family-select"}},imageCaptionFontSettings:{...Eo.fontSettings,scope:"common",title:"Text",display:{type:"font-settings-weight"}},imageCaptionFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},imageCaptionLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},imageCaptionLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},imageCaptionWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},imageCaptionTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},imageCaptionTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Text Align",enum:["left","center","right"]},imageCaptionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},captionFontFamily:{type:"string",scope:"common",title:"Caption Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Eo.fontSettings,scope:"common",title:"Caption",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"}},captionTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Caption Align",enum:["left","center","right"]},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Color"}},defaults:{autoplay:"off",iconAlign:"left",iconScale:100,imageCaptionFontFamily:Ct.fontSettings.fontFamily,imageCaptionFontSettings:{fontWeight:Ct.fontSettings.fontWeight,fontStyle:Ct.fontSettings.fontStyle},imageCaptionLetterSpacing:Ct.letterSpacing,imageCaptionWordSpacing:Ct.wordSpacing,imageCaptionTextAlign:Ct.textAlign,imageCaptionTextAppearance:Ct.textAppearance,imageCaptionColor:Ct.color,captionFontFamily:Ct.fontSettings.fontFamily,captionFontSettings:{fontWeight:Ct.fontSettings.fontWeight,fontStyle:Ct.fontSettings.fontStyle},captionLetterSpacing:Ct.letterSpacing,captionWordSpacing:Ct.wordSpacing,captionTextAlign:Ct.textAlign,captionTextAppearance:Ct.textAppearance,captionColor:Ct.color},layoutDefaults:{m:{speed:5,width:.15,height:.2,corners:.005,stroke:.001,padding:{top:0,right:0,bottom:0,left:0},iconMarginTop:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0},d:{speed:5,width:.15,height:.2,corners:.005,stroke:.001,padding:{top:0,right:0,bottom:0,left:0},iconMarginTop:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0}},displayRules:[],layout:["__componentName__","autoplay","speed","width","padding","iconMarginTop","iconAlign","iconScale","textMarginTop","textMinHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed"]},{type:"row",items:[{type:"group",title:"",items:["width"]},{type:"group",title:"",items:["padding"]}]},{type:"row",items:[{type:"group",title:"",items:["iconMarginTop","iconAlign","iconScale"]}]},{type:"row",items:[{type:"group",title:"",items:["textMarginTop","textMinHeight","captionMarginTop"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"",items:[{type:"row",items:["imageCaptionFontFamily","imageCaptionFontSettings"]},{type:"row",items:["imageCaptionFontSize","imageCaptionLineHeight","imageCaptionLetterSpacing","imageCaptionWordSpacing"]},"imageCaptionTextAppearance",{type:"row",items:["imageCaptionTextAlign","imageCaptionColor"]}]},{type:"group",title:"",items:[{type:"row",items:["captionFontFamily","captionFontSettings"]},{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance",{type:"row",items:["captionTextAlign","captionColor"]}]}]}],paletteBookmark:{items:["imageCaptionColor","captionColor"],panelIds:["general","typeStyle"]},content:{properties:{items:{type:"array",scope:"common",display:{type:"content-items",addItemFromFileExplorer:!1,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",title:"Image",display:{minWidth:58,maxWidth:108,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}}},icon:{type:"object",title:"Icon",display:{minWidth:58,maxWidth:108,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}}},imageCaption:{type:"array",title:"Text",display:{type:"rich-text",minWidth:300,maxWidth:550}},caption:{type:"array",title:"Caption",display:{type:"rich-text",minWidth:300,maxWidth:550}}}}}},defaults:{items:[{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},imageCaption:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},imageCaption:[{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"}]}]},{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},imageCaption:[{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"}]}]}]}}},ms={element:us,id:"testimonial single",name:"Testimonial Single",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:700,height:300},schema:gs,sourceCode:ds,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"},{path:"styles.caption.fontSettings"}]}},fs=[Ea,Va,$l,Il,Ol,os,ms];exports.components=fs;exports.isSchemaV1=Sr;