@cntrl-site/components 1.0.12-alpha.22 → 1.0.12-alpha.24

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,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("react"),Le=require("classnames"),w=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),So=require("react-dom");function fa(e){return e.type==="object"&&e.version===1}const ya="ControlSlider-module__wrapper___sHEkd",va="ControlSlider-module__hoverArrow___A-dOH",ba="ControlSlider-module__sliderItem___QQSkR",xa="ControlSlider-module__sliderImage___9hRl-",Ca="ControlSlider-module__arrow___05ghY",Sa="ControlSlider-module__arrowVertical___tBfVN",$a="ControlSlider-module__nextArrow___-30Yc",wa="ControlSlider-module__arrowInner___aEra3",Ta="ControlSlider-module__arrowIcon___S4ztF",La="ControlSlider-module__arrowImg___2dwJW",Ea="ControlSlider-module__mirror___brd6U",Pa="ControlSlider-module__pagination___bicLF",_a="ControlSlider-module__paginationInner___bT-P-",Aa="ControlSlider-module__paginationVertical___zYqKw",Ra="ControlSlider-module__paginationItem___nTRbk",Ia="ControlSlider-module__dot___p1Qun",ka="ControlSlider-module__activeDot___LHFaj",Wa="ControlSlider-module__paginationInsideBottom___R3FWn",Ma="ControlSlider-module__paginationInsideTop___V-qb-",Fa="ControlSlider-module__paginationOutsideBottom___14w8D",Na="ControlSlider-module__paginationOutsideTop___SCLqB",Ha="ControlSlider-module__paginationInsideLeft___yOBRZ",Ba="ControlSlider-module__paginationInsideRight___Rtt3o",Oa="ControlSlider-module__paginationOutsideLeft___lahaw",Va="ControlSlider-module__paginationOutsideRight___EtuQa",Da="ControlSlider-module__imgWrapper___UjEgB",ja="ControlSlider-module__captionBlock___dJ6-j",za="ControlSlider-module__captionTextWrapper___HFlpf",Ka="ControlSlider-module__captionText___uGBVc",Ua="ControlSlider-module__active___WZK4G",qa="ControlSlider-module__withPointerEvents___t-18M",Ga="ControlSlider-module__topLeftAlignment___zjnGM",Ya="ControlSlider-module__topCenterAlignment___gD1xW",Xa="ControlSlider-module__topRightAlignment___NMapS",Za="ControlSlider-module__middleLeftAlignment___OnUrY",Ja="ControlSlider-module__middleCenterAlignment___Tdkl0",Qa="ControlSlider-module__middleRightAlignment___wEbfX",es="ControlSlider-module__bottomLeftAlignment___cTP2-",ts="ControlSlider-module__bottomCenterAlignment___c54fB",ns="ControlSlider-module__bottomRightAlignment___kEwrz",rs="ControlSlider-module__clickOverlay___DZA28",is="ControlSlider-module__contain___pLyq7",os="ControlSlider-module__cover___KdDat",se={wrapper:ya,hoverArrow:va,sliderItem:ba,sliderImage:xa,arrow:Ca,arrowVertical:Sa,nextArrow:$a,arrowInner:wa,arrowIcon:Ta,arrowImg:La,mirror:Ea,pagination:Pa,paginationInner:_a,paginationVertical:Aa,paginationItem:Ra,dot:Ia,activeDot:ka,paginationInsideBottom:Wa,paginationInsideTop:Ma,paginationOutsideBottom:Fa,paginationOutsideTop:Na,paginationInsideLeft:Ha,paginationInsideRight:Ba,paginationOutsideLeft:Oa,paginationOutsideRight:Va,imgWrapper:Da,captionBlock:ja,captionTextWrapper:za,captionText:Ka,active:Ua,withPointerEvents:qa,topLeftAlignment:Ga,topCenterAlignment:Ya,topRightAlignment:Xa,middleLeftAlignment:Za,middleCenterAlignment:Ja,middleRightAlignment:Qa,bottomLeftAlignment:es,bottomCenterAlignment:ts,bottomRightAlignment:ns,clickOverlay:rs,contain:is,cover:os};function as(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ss(e,t,n){return t&&as(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Wi="(prefers-reduced-motion: reduce)",un=1,ls=2,gn=3,xn=4,On=5,or=6,mr=7,cs={CREATED:un,MOUNTED:ls,IDLE:gn,MOVING:xn,SCROLLING:On,DRAGGING:or,DESTROYED:mr};function kt(e){e.length=0}function Dt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ae(e){return e.bind.apply(e,[null].concat(Dt(arguments,1)))}var $o=setTimeout,Gr=function(){};function Mi(e){return requestAnimationFrame(e)}function br(e,t){return typeof t===e}function _n(e){return!oi(e)&&br("object",e)}var ii=Array.isArray,wo=Ae(br,"function"),Bt=Ae(br,"string"),Vn=Ae(br,"undefined");function oi(e){return e===null}function To(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Dn(e){return ii(e)?e:[e]}function gt(e,t){Dn(e).forEach(t)}function ai(e,t){return e.indexOf(t)>-1}function ar(e,t){return e.push.apply(e,Dn(t)),e}function _t(e,t,n){e&&gt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function St(e,t){_t(e,Bt(t)?t.split(" "):t,!0)}function jn(e,t){gt(t,e.appendChild.bind(e))}function si(e,t){gt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function An(e,t){return To(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Lo(e,t){var n=e?Dt(e.children):[];return t?n.filter(function(r){return An(r,t)}):n}function zn(e,t){return t?Lo(e,t)[0]:e.firstElementChild}var Rn=Object.keys;function Zt(e,t,n){return e&&(n?Rn(e).reverse():Rn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function In(e){return Dt(arguments,1).forEach(function(t){Zt(t,function(n,r){e[r]=t[r]})}),e}function Nt(e){return Dt(arguments,1).forEach(function(t){Zt(t,function(n,r){ii(n)?e[r]=n.slice():_n(n)?e[r]=Nt({},_n(e[r])?e[r]:{},n):e[r]=n})}),e}function Fi(e,t){gt(t||Rn(e),function(n){delete e[n]})}function $t(e,t){gt(e,function(n){gt(t,function(r){n&&n.removeAttribute(r)})})}function fe(e,t,n){_n(t)?Zt(t,function(r,i){fe(e,i,r)}):gt(e,function(r){oi(n)||n===""?$t(r,t):r.setAttribute(t,String(n))})}function pn(e,t,n){var r=document.createElement(e);return t&&(Bt(t)?St(r,t):fe(r,t)),n&&jn(n,r),r}function ht(e,t,n){if(Vn(n))return getComputedStyle(e)[t];oi(n)||(e.style[t]=""+n)}function kn(e,t){ht(e,"display",t)}function Eo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function ft(e,t){return e.getAttribute(t)}function Ni(e,t){return e&&e.classList.contains(t)}function ut(e){return e.getBoundingClientRect()}function Jt(e){gt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return zn(new DOMParser().parseFromString(e,"text/html").body)}function Pt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function _o(e,t){return e&&e.querySelector(t)}function li(e,t){return t?Dt(e.querySelectorAll(t)):[]}function At(e,t){_t(e,t,!1)}function Yr(e){return e.timeStamp}function Gt(e){return Bt(e)?e:e?e+"px":""}var Kn="splide",ci="data-"+Kn;function En(e,t){if(!e)throw new Error("["+Kn+"] "+(t||""))}var Ot=Math.min,gr=Math.max,hr=Math.floor,Wn=Math.ceil,tt=Math.abs;function Ao(e,t,n){return tt(e-t)<n}function sr(e,t,n,r){var i=Ot(t,n),a=gr(t,n);return r?i<e&&e<a:i<=e&&e<=a}function ln(e,t,n){var r=Ot(t,n),i=gr(t,n);return Ot(gr(r,e),i)}function Xr(e){return+(e>0)-+(e<0)}function Zr(e,t){return gt(t,function(n){e=e.replace("%s",""+n)}),e}function di(e){return e<10?"0"+e:""+e}var Hi={};function ds(e){return""+e+di(Hi[e]=(Hi[e]||0)+1)}function Ro(){var e=[];function t(s,c,o,d){i(s,c,function(p,T,x){var y="addEventListener"in p,g=y?p.removeEventListener.bind(p,T,o,d):p.removeListener.bind(p,o);y?p.addEventListener(T,o,d):p.addListener(o),e.push([p,T,x,o,g])})}function n(s,c,o){i(s,c,function(d,p,T){e=e.filter(function(x){return x[0]===d&&x[1]===p&&x[2]===T&&(!o||x[3]===o)?(x[4](),!1):!0})})}function r(s,c,o){var d,p=!0;return typeof CustomEvent=="function"?d=new CustomEvent(c,{bubbles:p,detail:o}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(c,p,!1,o)),s.dispatchEvent(d),d}function i(s,c,o){gt(s,function(d){d&&gt(c,function(p){p.split(" ").forEach(function(T){var x=T.split(".");o(d,x[0],x[1])})})})}function a(){e.forEach(function(s){s[4]()}),kt(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var jt="mounted",Jr="ready",Wt="move",Cn="moved",ui="click",Io="active",ko="inactive",Wo="visible",Mo="hidden",Oe="refresh",Ze="updated",hn="resize",xr="resized",Fo="drag",No="dragging",Ho="dragged",Cr="scroll",en="scrolled",us="overflow",pi="destroy",Bo="arrows:mounted",Oo="arrows:updated",Vo="pagination:mounted",Do="pagination:updated",mi="navigation:mounted",gi="autoplay:play",jo="autoplay:playing",hi="autoplay:pause",fi="lazyload:loaded",zo="sk",Ko="sh",fr="ei";function We(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ro();function r(a,s){n.bind(t,Dn(a).join(" "),function(c){s.apply(s,ii(c.detail)?c.detail:[])})}function i(a){n.dispatch(t,a,Dt(arguments,1))}return e&&e.event.on(pi,n.destroy),In(n,{bus:t,on:r,off:Ae(n.unbind,t),emit:i})}function Sr(e,t,n,r){var i=Date.now,a,s=0,c,o=!0,d=0;function p(){if(!o){if(s=e?Ot((i()-a)/e,1):1,n&&n(s),s>=1&&(t(),a=i(),r&&++d>=r))return x();c=Mi(p)}}function T(C){C||g(),a=i()-(C?s*e:0),o=!1,c=Mi(p)}function x(){o=!0}function y(){a=i(),s=0,n&&n(s)}function g(){c&&cancelAnimationFrame(c),s=0,c=0,o=!0}function h(C){e=C}function P(){return o}return{start:T,rewind:y,pause:x,cancel:g,set:h,isPaused:P}}function ps(e){var t=e;function n(i){t=i}function r(i){return ai(Dn(i),t)}return{set:n,is:r}}function ms(e,t){var n=Sr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function gs(e,t,n){var r=e.state,i=n.breakpoints||{},a=n.reducedMotion||{},s=Ro(),c=[];function o(){var g=n.mediaQuery==="min";Rn(i).sort(function(h,P){return g?+h-+P:+P-+h}).forEach(function(h){p(i[h],"("+(g?"min":"max")+"-width:"+h+"px)")}),p(a,Wi),T()}function d(g){g&&s.destroy()}function p(g,h){var P=matchMedia(h);s.bind(P,"change",T),c.push([g,P])}function T(){var g=r.is(mr),h=n.direction,P=c.reduce(function(C,f){return Nt(C,f[1].matches?f[0]:{})},{});Fi(n),y(P),n.destroy?e.destroy(n.destroy==="completely"):g?(d(!0),e.mount()):h!==n.direction&&e.refresh()}function x(g){matchMedia(Wi).matches&&(g?Nt(n,a):Fi(n,Rn(a)))}function y(g,h,P){Nt(n,g),h&&Nt(Object.getPrototypeOf(n),g),(P||!r.is(un))&&e.emit(Ze,n)}return{setup:o,destroy:d,reduce:x,set:y}}var $r="Arrow",wr=$r+"Left",Tr=$r+"Right",Uo=$r+"Up",qo=$r+"Down",Bi="rtl",Lr="ttb",Mr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Uo,Tr],ArrowRight:[qo,wr]};function hs(e,t,n){function r(a,s,c){c=c||n.direction;var o=c===Bi&&!s?1:c===Lr?0:-1;return Mr[a]&&Mr[a][o]||a.replace(/width|left|right/i,function(d,p){var T=Mr[d.toLowerCase()][o]||d;return p>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function i(a){return a*(n.direction===Bi?1:-1)}return{resolve:r,orient:i}}var Rt="role",mn="tabindex",fs="disabled",yt="aria-",Un=yt+"controls",Go=yt+"current",Oi=yt+"selected",pt=yt+"label",yi=yt+"labelledby",Yo=yt+"hidden",vi=yt+"orientation",Mn=yt+"roledescription",Vi=yt+"live",Di=yt+"busy",ji=yt+"atomic",bi=[Rt,mn,fs,Un,Go,pt,yi,Yo,vi,Mn],wt=Kn+"__",zt="is-",Fr=Kn,zi=wt+"track",ys=wt+"list",Er=wt+"slide",Xo=Er+"--clone",vs=Er+"__container",xi=wt+"arrows",Pr=wt+"arrow",Zo=Pr+"--prev",Jo=Pr+"--next",_r=wt+"pagination",Qo=_r+"__page",bs=wt+"progress",xs=bs+"__bar",Cs=wt+"toggle",Ss=wt+"spinner",$s=wt+"sr",ws=zt+"initialized",Qt=zt+"active",ea=zt+"prev",ta=zt+"next",Qr=zt+"visible",ei=zt+"loading",na=zt+"focus-in",ra=zt+"overflow",Ts=[Qt,Qr,ea,ta,ei,na,ra],Ls={slide:Er,clone:Xo,arrows:xi,arrow:Pr,prev:Zo,next:Jo,pagination:_r,page:Qo,spinner:Ss};function Es(e,t){if(wo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!An(n,t);)n=n.parentElement;return n}var Ps=5,Ki=200,ia="touchstart mousedown",Nr="touchmove mousemove",Hr="touchend touchcancel mouseup click";function _s(e,t,n){var r=We(e),i=r.on,a=r.bind,s=e.root,c=n.i18n,o={},d=[],p=[],T=[],x,y,g;function h(){b(),M(),f()}function P(){i(Oe,C),i(Oe,h),i(Ze,f),a(document,ia+" keydown",function(S){g=S.type==="keydown"},{capture:!0}),a(s,"focusin",function(){_t(s,na,!!g)})}function C(S){var A=bi.concat("style");kt(d),At(s,p),At(x,T),$t([x,y],A),$t(s,S?A:["style",Mn])}function f(){At(s,p),At(x,T),p=E(Fr),T=E(zi),St(s,p),St(x,T),fe(s,pt,n.label),fe(s,yi,n.labelledby)}function b(){x=_("."+zi),y=zn(x,"."+ys),En(x&&y,"A track/list element is missing."),ar(d,Lo(y,"."+Er+":not(."+Xo+")")),Zt({arrows:xi,pagination:_r,prev:Zo,next:Jo,bar:xs,toggle:Cs},function(S,A){o[A]=_("."+S)}),In(o,{root:s,track:x,list:y,slides:d})}function M(){var S=s.id||ds(Kn),A=n.role;s.id=S,x.id=x.id||S+"-track",y.id=y.id||S+"-list",!ft(s,Rt)&&s.tagName!=="SECTION"&&A&&fe(s,Rt,A),fe(s,Mn,c.carousel),fe(y,Rt,"presentation")}function _(S){var A=_o(s,S);return A&&Es(A,"."+Fr)===s?A:void 0}function E(S){return[S+"--"+n.type,S+"--"+n.direction,n.drag&&S+"--draggable",n.isNavigation&&S+"--nav",S===Fr&&Qt]}return In(o,{setup:h,mount:P,destroy:C})}var fn="slide",Sn="loop",qn="fade";function As(e,t,n,r){var i=We(e),a=i.on,s=i.emit,c=i.bind,o=e.Components,d=e.root,p=e.options,T=p.isNavigation,x=p.updateOnMove,y=p.i18n,g=p.pagination,h=p.slideFocus,P=o.Direction.resolve,C=ft(r,"style"),f=ft(r,pt),b=n>-1,M=zn(r,"."+vs),_;function E(){b||(r.id=d.id+"-slide"+di(t+1),fe(r,Rt,g?"tabpanel":"group"),fe(r,Mn,y.slide),fe(r,pt,f||Zr(y.slideLabel,[t+1,e.length]))),S()}function S(){c(r,"click",Ae(s,ui,B)),c(r,"keydown",Ae(s,zo,B)),a([Cn,Ko,en],$),a(mi,I),x&&a(Wt,k)}function A(){_=!0,i.destroy(),At(r,Ts),$t(r,bi),fe(r,"style",C),fe(r,pt,f||"")}function I(){var F=e.splides.map(function(W){var j=W.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");fe(r,pt,Zr(y.slideX,(b?n:t)+1)),fe(r,Un,F),fe(r,Rt,h?"button":""),h&&$t(r,Mn)}function k(){_||$()}function $(){if(!_){var F=e.index;O(),V(),_t(r,ea,t===F-1),_t(r,ta,t===F+1)}}function O(){var F=Y();F!==Ni(r,Qt)&&(_t(r,Qt,F),fe(r,Go,T&&F||""),s(F?Io:ko,B))}function V(){var F=L(),W=!F&&(!Y()||b);if(e.state.is([xn,On])||fe(r,Yo,W||""),fe(li(r,p.focusableNodes||""),mn,W?-1:""),h&&fe(r,mn,W?-1:0),F!==Ni(r,Qr)&&(_t(r,Qr,F),s(F?Wo:Mo,B)),!F&&document.activeElement===r){var j=o.Slides.getAt(e.index);j&&Eo(j.slide)}}function q(F,W,j){ht(j&&M||r,F,W)}function Y(){var F=e.index;return F===t||p.cloneStatus&&F===n}function L(){if(e.is(qn))return Y();var F=ut(o.Elements.track),W=ut(r),j=P("left",!0),Q=P("right",!0);return hr(F[j])<=Wn(W[j])&&hr(W[Q])<=Wn(F[Q])}function R(F,W){var j=tt(F-t);return!b&&(p.rewind||e.is(Sn))&&(j=Ot(j,e.length-j)),j<=W}var B={index:t,slideIndex:n,slide:r,container:M,isClone:b,mount:E,destroy:A,update:$,style:q,isWithin:R};return B}function Rs(e,t,n){var r=We(e),i=r.on,a=r.emit,s=r.bind,c=t.Elements,o=c.slides,d=c.list,p=[];function T(){x(),i(Oe,y),i(Oe,x)}function x(){o.forEach(function($,O){h($,O,-1)})}function y(){_(function($){$.destroy()}),kt(p)}function g(){_(function($){$.update()})}function h($,O,V){var q=As(e,O,V,$);q.mount(),p.push(q),p.sort(function(Y,L){return Y.index-L.index})}function P($){return $?E(function(O){return!O.isClone}):p}function C($){var O=t.Controller,V=O.toIndex($),q=O.hasFocus()?1:n.perPage;return E(function(Y){return sr(Y.index,V,V+q-1)})}function f($){return E($)[0]}function b($,O){gt($,function(V){if(Bt(V)&&(V=Po(V)),To(V)){var q=o[O];q?si(V,q):jn(d,V),St(V,n.classes.slide),A(V,Ae(a,hn))}}),a(Oe)}function M($){Jt(E($).map(function(O){return O.slide})),a(Oe)}function _($,O){P(O).forEach($)}function E($){return p.filter(wo($)?$:function(O){return Bt($)?An(O.slide,$):ai(Dn($),O.index)})}function S($,O,V){_(function(q){q.style($,O,V)})}function A($,O){var V=li($,"img"),q=V.length;q?V.forEach(function(Y){s(Y,"load error",function(){--q||O()})}):O()}function I($){return $?o.length:p.length}function k(){return p.length>n.perPage}return{mount:T,destroy:y,update:g,register:h,get:P,getIn:C,getAt:f,add:b,remove:M,forEach:_,filter:E,style:S,getLength:I,isEnough:k}}function Is(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.emit,c=t.Slides,o=t.Direction.resolve,d=t.Elements,p=d.root,T=d.track,x=d.list,y=c.getAt,g=c.style,h,P,C;function f(){b(),a(window,"resize load",ms(Ae(s,hn))),i([Ze,Oe],b),i(hn,M)}function b(){h=n.direction===Lr,ht(p,"maxWidth",Gt(n.width)),ht(T,o("paddingLeft"),_(!1)),ht(T,o("paddingRight"),_(!0)),M(!0)}function M(B){var F=ut(p);(B||P.width!==F.width||P.height!==F.height)&&(ht(T,"height",E()),g(o("marginRight"),Gt(n.gap)),g("width",A()),g("height",I(),!0),P=F,s(xr),C!==(C=R())&&(_t(p,ra,C),s(us,C)))}function _(B){var F=n.padding,W=o(B?"right":"left");return F&&Gt(F[W]||(_n(F)?0:F))||"0px"}function E(){var B="";return h&&(B=S(),En(B,"height or heightRatio is missing."),B="calc("+B+" - "+_(!1)+" - "+_(!0)+")"),B}function S(){return Gt(n.height||ut(x).width*n.heightRatio)}function A(){return n.autoWidth?null:Gt(n.fixedWidth)||(h?"":k())}function I(){return Gt(n.fixedHeight)||(h?n.autoHeight?null:k():S())}function k(){var B=Gt(n.gap);return"calc((100%"+(B&&" + "+B)+")/"+(n.perPage||1)+(B&&" - "+B)+")"}function $(){return ut(x)[o("width")]}function O(B,F){var W=y(B||0);return W?ut(W.slide)[o("width")]+(F?0:Y()):0}function V(B,F){var W=y(B);if(W){var j=ut(W.slide)[o("right")],Q=ut(x)[o("left")];return tt(j-Q)+(F?0:Y())}return 0}function q(B){return V(e.length-1)-V(0)+O(0,B)}function Y(){var B=y(0);return B&&parseFloat(ht(B.slide,o("marginRight")))||0}function L(B){return parseFloat(ht(T,o("padding"+(B?"Right":"Left"))))||0}function R(){return e.is(qn)||q(!0)>$()}return{mount:f,resize:M,listSize:$,slideSize:O,sliderSize:q,totalSize:V,getPadding:L,isOverflow:R}}var ks=2;function Ws(e,t,n){var r=We(e),i=r.on,a=t.Elements,s=t.Slides,c=t.Direction.resolve,o=[],d;function p(){i(Oe,T),i([Ze,hn],y),(d=P())&&(g(d),t.Layout.resize(!0))}function T(){x(),p()}function x(){Jt(o),kt(o),r.destroy()}function y(){var C=P();d!==C&&(d<C||!C)&&r.emit(Oe)}function g(C){var f=s.get().slice(),b=f.length;if(b){for(;f.length<C;)ar(f,f);ar(f.slice(-C),f.slice(0,C)).forEach(function(M,_){var E=_<C,S=h(M.slide,_);E?si(S,f[0].slide):jn(a.list,S),ar(o,S),s.register(S,_-C+(E?0:b),M.index)})}}function h(C,f){var b=C.cloneNode(!0);return St(b,n.classes.clone),b.id=e.root.id+"-clone"+di(f+1),b}function P(){var C=n.clones;if(!e.is(Sn))C=0;else if(Vn(C)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),b=f&&Wn(ut(a.track)[c("width")]/f);C=b||n[c("autoWidth")]&&e.length||n.perPage*ks}return C}return{mount:p,destroy:x}}function Ms(e,t,n){var r=We(e),i=r.on,a=r.emit,s=e.state.set,c=t.Layout,o=c.slideSize,d=c.getPadding,p=c.totalSize,T=c.listSize,x=c.sliderSize,y=t.Direction,g=y.resolve,h=y.orient,P=t.Elements,C=P.list,f=P.track,b;function M(){b=t.Transition,i([jt,xr,Ze,Oe],_)}function _(){t.Controller.isBusy()||(t.Scroll.cancel(),S(e.index),t.Slides.update())}function E(W,j,Q,oe){W!==j&&B(W>Q)&&($(),A(k(q(),W>Q),!0)),s(xn),a(Wt,j,Q,W),b.start(j,function(){s(gn),a(Cn,j,Q,W),oe&&oe()})}function S(W){A(V(W,!0))}function A(W,j){if(!e.is(qn)){var Q=j?W:I(W);ht(C,"transform","translate"+g("X")+"("+Q+"px)"),W!==Q&&a(Ko)}}function I(W){if(e.is(Sn)){var j=O(W),Q=j>t.Controller.getEnd(),oe=j<0;(oe||Q)&&(W=k(W,Q))}return W}function k(W,j){var Q=W-R(j),oe=x();return W-=h(oe*(Wn(tt(Q)/oe)||1))*(j?1:-1),W}function $(){A(q(),!0),b.cancel()}function O(W){for(var j=t.Slides.get(),Q=0,oe=1/0,te=0;te<j.length;te++){var ce=j[te].index,v=tt(V(ce,!0)-W);if(v<=oe)oe=v,Q=ce;else break}return Q}function V(W,j){var Q=h(p(W-1)-L(W));return j?Y(Q):Q}function q(){var W=g("left");return ut(C)[W]-ut(f)[W]+h(d(!1))}function Y(W){return n.trimSpace&&e.is(fn)&&(W=ln(W,0,h(x(!0)-T()))),W}function L(W){var j=n.focus;return j==="center"?(T()-o(W,!0))/2:+j*o(W)||0}function R(W){return V(W?t.Controller.getEnd():0,!!n.trimSpace)}function B(W){var j=h(k(q(),W));return W?j>=0:j<=C[g("scrollWidth")]-ut(f)[g("width")]}function F(W,j){j=Vn(j)?q():j;var Q=W!==!0&&h(j)<h(R(!1)),oe=W!==!1&&h(j)>h(R(!0));return Q||oe}return{mount:M,move:E,jump:S,translate:A,shift:k,cancel:$,toIndex:O,toPosition:V,getPosition:q,getLimit:R,exceededLimit:F,reposition:_}}function Fs(e,t,n){var r=We(e),i=r.on,a=r.emit,s=t.Move,c=s.getPosition,o=s.getLimit,d=s.toPosition,p=t.Slides,T=p.isEnough,x=p.getLength,y=n.omitEnd,g=e.is(Sn),h=e.is(fn),P=Ae(q,!1),C=Ae(q,!0),f=n.start||0,b,M=f,_,E,S;function A(){I(),i([Ze,Oe,fr],I),i(xr,k)}function I(){_=x(!0),E=n.perMove,S=n.perPage,b=B();var v=ln(f,0,y?b:_-1);v!==f&&(f=v,s.reposition())}function k(){b!==B()&&a(fr)}function $(v,ie,$e){if(!ce()){var de=V(v),ye=R(de);ye>-1&&(ie||ye!==f)&&(Q(ye),s.move(de,ye,M,$e))}}function O(v,ie,$e,de){t.Scroll.scroll(v,ie,$e,function(){var ye=R(s.toIndex(c()));Q(y?Ot(ye,b):ye),de&&de()})}function V(v){var ie=f;if(Bt(v)){var $e=v.match(/([+\-<>])(\d+)?/)||[],de=$e[1],ye=$e[2];de==="+"||de==="-"?ie=Y(f+ +(""+de+(+ye||1)),f):de===">"?ie=ye?F(+ye):P(!0):de==="<"&&(ie=C(!0))}else ie=g?v:ln(v,0,b);return ie}function q(v,ie){var $e=E||(te()?1:S),de=Y(f+$e*(v?-1:1),f,!(E||te()));return de===-1&&h&&!Ao(c(),o(!v),1)?v?0:b:ie?de:R(de)}function Y(v,ie,$e){if(T()||te()){var de=L(v);de!==v&&(ie=v,v=de,$e=!1),v<0||v>b?!E&&(sr(0,v,ie,!0)||sr(b,ie,v,!0))?v=F(W(v)):g?v=$e?v<0?-(_%S||S):_:v:n.rewind?v=v<0?b:0:v=-1:$e&&v!==ie&&(v=F(W(ie)+(v<ie?-1:1)))}else v=-1;return v}function L(v){if(h&&n.trimSpace==="move"&&v!==f)for(var ie=c();ie===d(v,!0)&&sr(v,0,e.length-1,!n.rewind);)v<f?--v:++v;return v}function R(v){return g?(v+_)%_||0:v}function B(){for(var v=_-(te()||g&&E?1:S);y&&v-- >0;)if(d(_-1,!0)!==d(v,!0)){v++;break}return ln(v,0,_-1)}function F(v){return ln(te()?v:S*v,0,b)}function W(v){return te()?Ot(v,b):hr((v>=b?_-1:v)/S)}function j(v){var ie=s.toIndex(v);return h?ln(ie,0,b):ie}function Q(v){v!==f&&(M=f,f=v)}function oe(v){return v?M:f}function te(){return!Vn(n.focus)||n.isNavigation}function ce(){return e.state.is([xn,On])&&!!n.waitForTransition}return{mount:A,go:$,scroll:O,getNext:P,getPrev:C,getAdjacent:q,getEnd:B,setIndex:Q,getIndex:oe,toIndex:F,toPage:W,toDest:j,hasFocus:te,isBusy:ce}}var Ns="http://www.w3.org/2000/svg",Hs="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",Jn=40;function Bs(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.emit,c=n.classes,o=n.i18n,d=t.Elements,p=t.Controller,T=d.arrows,x=d.track,y=T,g=d.prev,h=d.next,P,C,f={};function b(){_(),i(Ze,M)}function M(){E(),b()}function _(){var O=n.arrows;O&&!(g&&h)&&I(),g&&h&&(In(f,{prev:g,next:h}),kn(y,O?"":"none"),St(y,C=xi+"--"+n.direction),O&&(S(),$(),fe([g,h],Un,x.id),s(Bo,g,h)))}function E(){r.destroy(),At(y,C),P?(Jt(T?[g,h]:y),g=h=null):$t([g,h],bi)}function S(){i([jt,Cn,Oe,en,fr],$),a(h,"click",Ae(A,">")),a(g,"click",Ae(A,"<"))}function A(O){p.go(O,!0)}function I(){y=T||pn("div",c.arrows),g=k(!0),h=k(!1),P=!0,jn(y,[g,h]),!T&&si(y,x)}function k(O){var V='<button class="'+c.arrow+" "+(O?c.prev:c.next)+'" type="button"><svg xmlns="'+Ns+'" viewBox="0 0 '+Jn+" "+Jn+'" width="'+Jn+'" height="'+Jn+'" focusable="false"><path d="'+(n.arrowPath||Hs)+'" />';return Po(V)}function $(){if(g&&h){var O=e.index,V=p.getPrev(),q=p.getNext(),Y=V>-1&&O<V?o.last:o.prev,L=q>-1&&O>q?o.first:o.next;g.disabled=V<0,h.disabled=q<0,fe(g,pt,Y),fe(h,pt,L),s(Oo,g,h,V,q)}}return{arrows:f,mount:b,destroy:E,update:$}}var Os=ci+"-interval";function Vs(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.emit,c=Sr(n.interval,e.go.bind(e,">"),S),o=c.isPaused,d=t.Elements,p=t.Elements,T=p.root,x=p.toggle,y=n.autoplay,g,h,P=y==="pause";function C(){y&&(f(),x&&fe(x,Un,d.track.id),P||b(),E())}function f(){n.pauseOnHover&&a(T,"mouseenter mouseleave",function(I){g=I.type==="mouseenter",_()}),n.pauseOnFocus&&a(T,"focusin focusout",function(I){h=I.type==="focusin",_()}),x&&a(x,"click",function(){P?b():M(!0)}),i([Wt,Cr,Oe],c.rewind),i(Wt,A)}function b(){o()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),h=g=P=!1,E(),s(gi))}function M(I){I===void 0&&(I=!0),P=!!I,E(),o()||(c.pause(),s(hi))}function _(){P||(g||h?M(!1):b())}function E(){x&&(_t(x,Qt,!P),fe(x,pt,n.i18n[P?"play":"pause"]))}function S(I){var k=d.bar;k&&ht(k,"width",I*100+"%"),s(jo,I)}function A(I){var k=t.Slides.getAt(I);c.set(k&&+ft(k.slide,Os)||n.interval)}return{mount:C,destroy:c.cancel,play:b,pause:M,isPaused:o}}function Ds(e,t,n){var r=We(e),i=r.on;function a(){n.cover&&(i(fi,Ae(c,!0)),i([jt,Ze,Oe],Ae(s,!0)))}function s(o){t.Slides.forEach(function(d){var p=zn(d.container||d.slide,"img");p&&p.src&&c(o,p,d)})}function c(o,d,p){p.style("background",o?'center/cover no-repeat url("'+d.src+'")':"",!0),kn(d,o?"none":"")}return{mount:a,destroy:Ae(s,!1)}}var js=10,zs=600,Ks=.6,Us=1.5,qs=800;function Gs(e,t,n){var r=We(e),i=r.on,a=r.emit,s=e.state.set,c=t.Move,o=c.getPosition,d=c.getLimit,p=c.exceededLimit,T=c.translate,x=e.is(fn),y,g,h=1;function P(){i(Wt,M),i([Ze,Oe],_)}function C(S,A,I,k,$){var O=o();if(M(),I&&(!x||!p())){var V=t.Layout.sliderSize(),q=Xr(S)*V*hr(tt(S)/V)||0;S=c.toPosition(t.Controller.toDest(S%V))+q}var Y=Ao(O,S,1);h=1,A=Y?0:A||gr(tt(S-O)/Us,qs),g=k,y=Sr(A,f,Ae(b,O,S,$),1),s(On),a(Cr),y.start()}function f(){s(gn),g&&g(),a(en)}function b(S,A,I,k){var $=o(),O=S+(A-S)*E(k),V=(O-$)*h;T($+V),x&&!I&&p()&&(h*=Ks,tt(V)<js&&C(d(p(!0)),zs,!1,g,!0))}function M(){y&&y.cancel()}function _(){y&&!y.isPaused()&&(M(),f())}function E(S){var A=n.easingFunc;return A?A(S):1-Math.pow(1-S,4)}return{mount:P,destroy:M,scroll:C,cancel:_}}var cn={passive:!1,capture:!0};function Ys(e,t,n){var r=We(e),i=r.on,a=r.emit,s=r.bind,c=r.unbind,o=e.state,d=t.Move,p=t.Scroll,T=t.Controller,x=t.Elements.track,y=t.Media.reduce,g=t.Direction,h=g.resolve,P=g.orient,C=d.getPosition,f=d.exceededLimit,b,M,_,E,S,A=!1,I,k,$;function O(){s(x,Nr,Gr,cn),s(x,Hr,Gr,cn),s(x,ia,q,cn),s(x,"click",R,{capture:!0}),s(x,"dragstart",Pt),i([jt,Ze],V)}function V(){var N=n.drag;re(!N),E=N==="free"}function q(N){if(I=!1,!k){var m=ye(N);de(N.target)&&(m||!N.button)&&(T.isBusy()?Pt(N,!0):($=m?x:window,S=o.is([xn,On]),_=null,s($,Nr,Y,cn),s($,Hr,L,cn),d.cancel(),p.cancel(),B(N)))}}function Y(N){if(o.is(or)||(o.set(or),a(Fo)),N.cancelable)if(S){d.translate(b+$e(te(N)));var m=ce(N)>Ki,H=A!==(A=f());(m||H)&&B(N),I=!0,a(No),Pt(N)}else j(N)&&(S=W(N),Pt(N))}function L(N){o.is(or)&&(o.set(gn),a(Ho)),S&&(F(N),Pt(N)),c($,Nr,Y),c($,Hr,L),S=!1}function R(N){!k&&I&&Pt(N,!0)}function B(N){_=M,M=N,b=C()}function F(N){var m=Q(N),H=oe(m),D=n.rewind&&n.rewindByDrag;y(!1),E?T.scroll(H,0,n.snap):e.is(qn)?T.go(P(Xr(m))<0?D?"<":"-":D?">":"+"):e.is(fn)&&A&&D?T.go(f(!0)?">":"<"):T.go(T.toDest(H),!0),y(!0)}function W(N){var m=n.dragMinThreshold,H=_n(m),D=H&&m.mouse||0,U=(H?m.touch:+m)||10;return tt(te(N))>(ye(N)?U:D)}function j(N){return tt(te(N))>tt(te(N,!0))}function Q(N){if(e.is(Sn)||!A){var m=ce(N);if(m&&m<Ki)return te(N)/m}return 0}function oe(N){return C()+Xr(N)*Ot(tt(N)*(n.flickPower||600),E?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(N,m){return ie(N,m)-ie(v(N),m)}function ce(N){return Yr(N)-Yr(v(N))}function v(N){return M===N&&_||M}function ie(N,m){return(ye(N)?N.changedTouches[0]:N)["page"+h(m?"Y":"X")]}function $e(N){return N/(A&&e.is(fn)?Ps:1)}function de(N){var m=n.noDrag;return!An(N,"."+Qo+", ."+Pr)&&(!m||!An(N,m))}function ye(N){return typeof TouchEvent<"u"&&N instanceof TouchEvent}function Re(){return S}function re(N){k=N}return{mount:O,disable:re,isDragging:Re}}var Xs={Spacebar:" ",Right:Tr,Left:wr,Up:Uo,Down:qo};function Ci(e){return e=Bt(e)?e:e.key,Xs[e]||e}var Ui="keydown";function Zs(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.unbind,c=e.root,o=t.Direction.resolve,d,p;function T(){x(),i(Ze,y),i(Ze,x),i(Wt,h)}function x(){var C=n.keyboard;C&&(d=C==="global"?window:c,a(d,Ui,P))}function y(){s(d,Ui)}function g(C){p=C}function h(){var C=p;p=!0,$o(function(){p=C})}function P(C){if(!p){var f=Ci(C);f===o(wr)?e.go("<"):f===o(Tr)&&e.go(">")}}return{mount:T,destroy:y,disable:g}}var Pn=ci+"-lazy",lr=Pn+"-srcset",Js="["+Pn+"], ["+lr+"]";function Qs(e,t,n){var r=We(e),i=r.on,a=r.off,s=r.bind,c=r.emit,o=n.lazyLoad==="sequential",d=[Cn,en],p=[];function T(){n.lazyLoad&&(x(),i(Oe,x))}function x(){kt(p),y(),o?C():(a(d),i(d,g),g())}function y(){t.Slides.forEach(function(f){li(f.slide,Js).forEach(function(b){var M=ft(b,Pn),_=ft(b,lr);if(M!==b.src||_!==b.srcset){var E=n.classes.spinner,S=b.parentElement,A=zn(S,"."+E)||pn("span",E,S);p.push([b,f,A]),b.src||kn(b,"none")}})})}function g(){p=p.filter(function(f){var b=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,b)?h(f):!0}),p.length||a(d)}function h(f){var b=f[0];St(f[1].slide,ei),s(b,"load error",Ae(P,f)),fe(b,"src",ft(b,Pn)),fe(b,"srcset",ft(b,lr)),$t(b,Pn),$t(b,lr)}function P(f,b){var M=f[0],_=f[1];At(_.slide,ei),b.type!=="error"&&(Jt(f[2]),kn(M,""),c(fi,M,_),c(hn)),o&&C()}function C(){p.length&&h(p.shift())}return{mount:T,destroy:Ae(kt,p),check:g}}function el(e,t,n){var r=We(e),i=r.on,a=r.emit,s=r.bind,c=t.Slides,o=t.Elements,d=t.Controller,p=d.hasFocus,T=d.getIndex,x=d.go,y=t.Direction.resolve,g=o.pagination,h=[],P,C;function f(){b(),i([Ze,Oe,fr],f);var k=n.pagination;g&&kn(g,k?"":"none"),k&&(i([Wt,Cr,en],I),M(),I(),a(Vo,{list:P,items:h},A(e.index)))}function b(){P&&(Jt(g?Dt(P.children):P),At(P,C),kt(h),P=null),r.destroy()}function M(){var k=e.length,$=n.classes,O=n.i18n,V=n.perPage,q=p()?d.getEnd()+1:Wn(k/V);P=g||pn("ul",$.pagination,o.track.parentElement),St(P,C=_r+"--"+S()),fe(P,Rt,"tablist"),fe(P,pt,O.select),fe(P,vi,S()===Lr?"vertical":"");for(var Y=0;Y<q;Y++){var L=pn("li",null,P),R=pn("button",{class:$.page,type:"button"},L),B=c.getIn(Y).map(function(W){return W.slide.id}),F=!p()&&V>1?O.pageX:O.slideX;s(R,"click",Ae(_,Y)),n.paginationKeyboard&&s(R,"keydown",Ae(E,Y)),fe(L,Rt,"presentation"),fe(R,Rt,"tab"),fe(R,Un,B.join(" ")),fe(R,pt,Zr(F,Y+1)),fe(R,mn,-1),h.push({li:L,button:R,page:Y})}}function _(k){x(">"+k,!0)}function E(k,$){var O=h.length,V=Ci($),q=S(),Y=-1;V===y(Tr,!1,q)?Y=++k%O:V===y(wr,!1,q)?Y=(--k+O)%O:V==="Home"?Y=0:V==="End"&&(Y=O-1);var L=h[Y];L&&(Eo(L.button),x(">"+Y),Pt($,!0))}function S(){return n.paginationDirection||n.direction}function A(k){return h[d.toPage(k)]}function I(){var k=A(T(!0)),$=A(T());if(k){var O=k.button;At(O,Qt),$t(O,Oi),fe(O,mn,-1)}if($){var V=$.button;St(V,Qt),fe(V,Oi,!0),fe(V,mn,"")}a(Do,{list:P,items:h},k,$)}return{items:h,mount:f,destroy:b,getAt:A,update:I}}var tl=[" ","Enter"];function nl(e,t,n){var r=n.isNavigation,i=n.slideFocus,a=[];function s(){e.splides.forEach(function(g){g.isParent||(d(e,g.splide),d(g.splide,e))}),r&&p()}function c(){a.forEach(function(g){g.destroy()}),kt(a)}function o(){c(),s()}function d(g,h){var P=We(g);P.on(Wt,function(C,f,b){h.go(h.is(Sn)?b:C)}),a.push(P)}function p(){var g=We(e),h=g.on;h(ui,x),h(zo,y),h([jt,Ze],T),a.push(g),g.emit(mi,e.splides)}function T(){fe(t.Elements.list,vi,n.direction===Lr?"vertical":"")}function x(g){e.go(g.index)}function y(g,h){ai(tl,Ci(h))&&(x(g),Pt(h))}return{setup:Ae(t.Media.set,{slideFocus:Vn(i)?r:i},!0),mount:s,destroy:c,remount:o}}function rl(e,t,n){var r=We(e),i=r.bind,a=0;function s(){n.wheel&&i(t.Elements.track,"wheel",c,cn)}function c(d){if(d.cancelable){var p=d.deltaY,T=p<0,x=Yr(d),y=n.wheelMinThreshold||0,g=n.wheelSleep||0;tt(p)>y&&x-a>g&&(e.go(T?"<":">"),a=x),o(T)&&Pt(d)}}function o(d){return!n.releaseWheel||e.state.is(xn)||t.Controller.getAdjacent(d)!==-1}return{mount:s}}var il=90;function ol(e,t,n){var r=We(e),i=r.on,a=t.Elements.track,s=n.live&&!n.isNavigation,c=pn("span",$s),o=Sr(il,Ae(p,!1));function d(){s&&(x(!t.Autoplay.isPaused()),fe(a,ji,!0),c.textContent="…",i(gi,Ae(x,!0)),i(hi,Ae(x,!1)),i([Cn,en],Ae(p,!0)))}function p(y){fe(a,Di,y),y?(jn(a,c),o.start()):(Jt(c),o.cancel())}function T(){$t(a,[Vi,ji,Di]),Jt(c)}function x(y){s&&fe(a,Vi,y?"off":"polite")}return{mount:d,disable:x,destroy:T}}var al=Object.freeze({__proto__:null,Media:gs,Direction:hs,Elements:_s,Slides:Rs,Layout:Is,Clones:Ws,Move:Ms,Controller:Fs,Arrows:Bs,Autoplay:Vs,Cover:Ds,Scroll:Gs,Drag:Ys,Keyboard:Zs,LazyLoad:Qs,Pagination:el,Sync:nl,Wheel:rl,Live:ol}),sl={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"},ll={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:Ls,i18n:sl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function cl(e,t,n){var r=t.Slides;function i(){We(e).on([jt,Oe],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function s(c,o){r.style("transition","opacity "+n.speed+"ms "+n.easing),$o(o)}return{mount:i,start:s,cancel:Gr}}function dl(e,t,n){var r=t.Move,i=t.Controller,a=t.Scroll,s=t.Elements.list,c=Ae(ht,s,"transition"),o;function d(){We(e).bind(s,"transitionend",function(y){y.target===s&&o&&(T(),o())})}function p(y,g){var h=r.toPosition(y,!0),P=r.getPosition(),C=x(y);tt(h-P)>=1&&C>=1?n.useScroll?a.scroll(h,C,!1,g):(c("transform "+C+"ms "+n.easing),r.translate(h,!0),o=g):(r.jump(y),g())}function T(){c(""),a.cancel()}function x(y){var g=n.rewindSpeed;if(e.is(fn)&&g){var h=i.getIndex(!0),P=i.getEnd();if(h===0&&y>=P||h>=P&&y===0)return g}return n.speed}return{mount:d,start:p,cancel:T}}var ul=(function(){function e(n,r){this.event=We(),this.Components={},this.state=ps(un),this.splides=[],this._o={},this._E={};var i=Bt(n)?_o(document,n):n;En(i,i+" is invalid."),this.root=i,r=Nt({label:ft(i,pt)||"",labelledby:ft(i,yi)||""},ll,e.defaults,r||{});try{Nt(r,JSON.parse(ft(i,ci)))}catch{En(!1,"Invalid JSON")}this._o=Object.create(Nt({},r))}var t=e.prototype;return t.mount=function(r,i){var a=this,s=this.state,c=this.Components;En(s.is([un,mr]),"Already mounted!"),s.set(un),this._C=c,this._T=i||this._T||(this.is(qn)?cl:dl),this._E=r||this._E;var o=In({},al,this._E,{Transition:this._T});return Zt(o,function(d,p){var T=d(a,c,a._o);c[p]=T,T.setup&&T.setup()}),Zt(c,function(d){d.mount&&d.mount()}),this.emit(jt),St(this.root,ws),s.set(gn),this.emit(Jr),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(gn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(Dt(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(Oe),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,a=this.state;return a.is(un)?We(this).on(Jr,this.destroy.bind(this,r)):(Zt(this._C,function(s){s.destroy&&s.destroy(r)},!0),i.emit(pi),i.destroy(),r&&kt(this.splides),a.set(mr)),this},ss(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Si=ul;Si.defaults={};Si.STATES=cs;var qi=[[jt,"onMounted"],[Jr,"onReady"],[Wt,"onMove"],[Cn,"onMoved"],[ui,"onClick"],[Io,"onActive"],[ko,"onInactive"],[Wo,"onVisible"],[Mo,"onHidden"],[Oe,"onRefresh"],[Ze,"onUpdated"],[hn,"onResize"],[xr,"onResized"],[Fo,"onDrag"],[No,"onDragging"],[Ho,"onDragged"],[Cr,"onScroll"],[en,"onScrolled"],[pi,"onDestroy"],[Bo,"onArrowsMounted"],[Oo,"onArrowsUpdated"],[Vo,"onPaginationMounted"],[Do,"onPaginationUpdated"],[mi,"onNavigationMounted"],[gi,"onAutoplayPlay"],[jo,"onAutoplayPlaying"],[hi,"onAutoplayPause"],[fi,"onLazyLoadLoaded"]];function $i(...e){return e.filter(Boolean).join(" ")}function yr(e){return e!==null&&typeof e=="object"}function ti(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!ti(n,t[r]));if(yr(e)&&yr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!ti(e[i],t[i]))}return e===t}function pl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function ml(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function ni(e,t){const n=e;return ml(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():yr(r)?n[i]=ni(yr(n[i])?n[i]:{},r):n[i]=r}),n}var gl=({children:e,className:t,...n})=>u.createElement("div",{className:$i("splide__track",t),...n},u.createElement("ul",{className:"splide__list"},e)),wi=class extends u.Component{constructor(){super(...arguments),this.splideRef=u.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Si(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ni({},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&&!ti(this.options,e)&&(this.splide.options=e,this.options=ni({},e));const t=this.getSlides();pl(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){qi.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}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:r,...i}=this.props;return u.createElement(t,{className:$i("splide",e),ref:this.splideRef,...this.omit(i,["options",...qi.map(a=>a[1])])},n?u.createElement(gl,null,r):r)}},Ti=({children:e,className:t,...n})=>u.createElement("li",{className:$i("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("react"),Le=require("classnames"),w=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),So=require("react-dom");function ya(e){return e.type==="object"&&e.version===1}const va="ControlSlider-module__wrapper___sHEkd",ba="ControlSlider-module__hoverArrow___A-dOH",xa="ControlSlider-module__sliderItem___QQSkR",Ca="ControlSlider-module__sliderImage___9hRl-",Sa="ControlSlider-module__arrow___05ghY",$a="ControlSlider-module__arrowVertical___tBfVN",wa="ControlSlider-module__nextArrow___-30Yc",Ta="ControlSlider-module__arrowInner___aEra3",La="ControlSlider-module__arrowIcon___S4ztF",Ea="ControlSlider-module__arrowImg___2dwJW",Pa="ControlSlider-module__mirror___brd6U",_a="ControlSlider-module__pagination___bicLF",Aa="ControlSlider-module__paginationInner___bT-P-",Ra="ControlSlider-module__paginationVertical___zYqKw",ka="ControlSlider-module__paginationItem___nTRbk",Ia="ControlSlider-module__dot___p1Qun",Wa="ControlSlider-module__activeDot___LHFaj",Ma="ControlSlider-module__paginationInsideBottom___R3FWn",Fa="ControlSlider-module__paginationInsideTop___V-qb-",Na="ControlSlider-module__paginationOutsideBottom___14w8D",Ha="ControlSlider-module__paginationOutsideTop___SCLqB",Ba="ControlSlider-module__paginationInsideLeft___yOBRZ",Oa="ControlSlider-module__paginationInsideRight___Rtt3o",Va="ControlSlider-module__paginationOutsideLeft___lahaw",Da="ControlSlider-module__paginationOutsideRight___EtuQa",ja="ControlSlider-module__imgWrapper___UjEgB",za="ControlSlider-module__captionBlock___dJ6-j",Ka="ControlSlider-module__captionTextWrapper___HFlpf",Ua="ControlSlider-module__captionText___uGBVc",qa="ControlSlider-module__active___WZK4G",Ga="ControlSlider-module__withPointerEvents___t-18M",Ya="ControlSlider-module__topLeftAlignment___zjnGM",Xa="ControlSlider-module__topCenterAlignment___gD1xW",Za="ControlSlider-module__topRightAlignment___NMapS",Ja="ControlSlider-module__middleLeftAlignment___OnUrY",Qa="ControlSlider-module__middleCenterAlignment___Tdkl0",es="ControlSlider-module__middleRightAlignment___wEbfX",ts="ControlSlider-module__bottomLeftAlignment___cTP2-",ns="ControlSlider-module__bottomCenterAlignment___c54fB",rs="ControlSlider-module__bottomRightAlignment___kEwrz",is="ControlSlider-module__clickOverlay___DZA28",os="ControlSlider-module__contain___pLyq7",as="ControlSlider-module__cover___KdDat",se={wrapper:va,hoverArrow:ba,sliderItem:xa,sliderImage:Ca,arrow:Sa,arrowVertical:$a,nextArrow:wa,arrowInner:Ta,arrowIcon:La,arrowImg:Ea,mirror:Pa,pagination:_a,paginationInner:Aa,paginationVertical:Ra,paginationItem:ka,dot:Ia,activeDot:Wa,paginationInsideBottom:Ma,paginationInsideTop:Fa,paginationOutsideBottom:Na,paginationOutsideTop:Ha,paginationInsideLeft:Ba,paginationInsideRight:Oa,paginationOutsideLeft:Va,paginationOutsideRight:Da,imgWrapper:ja,captionBlock:za,captionTextWrapper:Ka,captionText:Ua,active:qa,withPointerEvents:Ga,topLeftAlignment:Ya,topCenterAlignment:Xa,topRightAlignment:Za,middleLeftAlignment:Ja,middleCenterAlignment:Qa,middleRightAlignment:es,bottomLeftAlignment:ts,bottomCenterAlignment:ns,bottomRightAlignment:rs,clickOverlay:is,contain:os,cover:as};function ss(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ls(e,t,n){return t&&ss(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Wi="(prefers-reduced-motion: reduce)",un=1,cs=2,gn=3,xn=4,Vn=5,ar=6,mr=7,ds={CREATED:un,MOUNTED:cs,IDLE:gn,MOVING:xn,SCROLLING:Vn,DRAGGING:ar,DESTROYED:mr};function It(e){e.length=0}function Dt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ae(e){return e.bind.apply(e,[null].concat(Dt(arguments,1)))}var $o=setTimeout,Gr=function(){};function Mi(e){return requestAnimationFrame(e)}function br(e,t){return typeof t===e}function An(e){return!oi(e)&&br("object",e)}var ii=Array.isArray,wo=Ae(br,"function"),Bt=Ae(br,"string"),Dn=Ae(br,"undefined");function oi(e){return e===null}function To(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function jn(e){return ii(e)?e:[e]}function gt(e,t){jn(e).forEach(t)}function ai(e,t){return e.indexOf(t)>-1}function sr(e,t){return e.push.apply(e,jn(t)),e}function _t(e,t,n){e&&gt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function St(e,t){_t(e,Bt(t)?t.split(" "):t,!0)}function zn(e,t){gt(t,e.appendChild.bind(e))}function si(e,t){gt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function Rn(e,t){return To(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Lo(e,t){var n=e?Dt(e.children):[];return t?n.filter(function(r){return Rn(r,t)}):n}function Kn(e,t){return t?Lo(e,t)[0]:e.firstElementChild}var kn=Object.keys;function Zt(e,t,n){return e&&(n?kn(e).reverse():kn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function In(e){return Dt(arguments,1).forEach(function(t){Zt(t,function(n,r){e[r]=t[r]})}),e}function Nt(e){return Dt(arguments,1).forEach(function(t){Zt(t,function(n,r){ii(n)?e[r]=n.slice():An(n)?e[r]=Nt({},An(e[r])?e[r]:{},n):e[r]=n})}),e}function Fi(e,t){gt(t||kn(e),function(n){delete e[n]})}function $t(e,t){gt(e,function(n){gt(t,function(r){n&&n.removeAttribute(r)})})}function fe(e,t,n){An(t)?Zt(t,function(r,i){fe(e,i,r)}):gt(e,function(r){oi(n)||n===""?$t(r,t):r.setAttribute(t,String(n))})}function pn(e,t,n){var r=document.createElement(e);return t&&(Bt(t)?St(r,t):fe(r,t)),n&&zn(n,r),r}function ht(e,t,n){if(Dn(n))return getComputedStyle(e)[t];oi(n)||(e.style[t]=""+n)}function Wn(e,t){ht(e,"display",t)}function Eo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function ft(e,t){return e.getAttribute(t)}function Ni(e,t){return e&&e.classList.contains(t)}function ut(e){return e.getBoundingClientRect()}function Jt(e){gt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return Kn(new DOMParser().parseFromString(e,"text/html").body)}function Pt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function _o(e,t){return e&&e.querySelector(t)}function li(e,t){return t?Dt(e.querySelectorAll(t)):[]}function At(e,t){_t(e,t,!1)}function Yr(e){return e.timeStamp}function Gt(e){return Bt(e)?e:e?e+"px":""}var Un="splide",ci="data-"+Un;function En(e,t){if(!e)throw new Error("["+Un+"] "+(t||""))}var Ot=Math.min,gr=Math.max,hr=Math.floor,Mn=Math.ceil,tt=Math.abs;function Ao(e,t,n){return tt(e-t)<n}function lr(e,t,n,r){var i=Ot(t,n),a=gr(t,n);return r?i<e&&e<a:i<=e&&e<=a}function ln(e,t,n){var r=Ot(t,n),i=gr(t,n);return Ot(gr(r,e),i)}function Xr(e){return+(e>0)-+(e<0)}function Zr(e,t){return gt(t,function(n){e=e.replace("%s",""+n)}),e}function di(e){return e<10?"0"+e:""+e}var Hi={};function us(e){return""+e+di(Hi[e]=(Hi[e]||0)+1)}function Ro(){var e=[];function t(s,c,o,d){i(s,c,function(p,T,b){var y="addEventListener"in p,g=y?p.removeEventListener.bind(p,T,o,d):p.removeListener.bind(p,o);y?p.addEventListener(T,o,d):p.addListener(o),e.push([p,T,b,o,g])})}function n(s,c,o){i(s,c,function(d,p,T){e=e.filter(function(b){return b[0]===d&&b[1]===p&&b[2]===T&&(!o||b[3]===o)?(b[4](),!1):!0})})}function r(s,c,o){var d,p=!0;return typeof CustomEvent=="function"?d=new CustomEvent(c,{bubbles:p,detail:o}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(c,p,!1,o)),s.dispatchEvent(d),d}function i(s,c,o){gt(s,function(d){d&&gt(c,function(p){p.split(" ").forEach(function(T){var b=T.split(".");o(d,b[0],b[1])})})})}function a(){e.forEach(function(s){s[4]()}),It(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var jt="mounted",Jr="ready",Wt="move",Cn="moved",ui="click",ko="active",Io="inactive",Wo="visible",Mo="hidden",Oe="refresh",Ze="updated",hn="resize",xr="resized",Fo="drag",No="dragging",Ho="dragged",Cr="scroll",en="scrolled",ps="overflow",pi="destroy",Bo="arrows:mounted",Oo="arrows:updated",Vo="pagination:mounted",Do="pagination:updated",mi="navigation:mounted",gi="autoplay:play",jo="autoplay:playing",hi="autoplay:pause",fi="lazyload:loaded",zo="sk",Ko="sh",fr="ei";function We(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ro();function r(a,s){n.bind(t,jn(a).join(" "),function(c){s.apply(s,ii(c.detail)?c.detail:[])})}function i(a){n.dispatch(t,a,Dt(arguments,1))}return e&&e.event.on(pi,n.destroy),In(n,{bus:t,on:r,off:Ae(n.unbind,t),emit:i})}function Sr(e,t,n,r){var i=Date.now,a,s=0,c,o=!0,d=0;function p(){if(!o){if(s=e?Ot((i()-a)/e,1):1,n&&n(s),s>=1&&(t(),a=i(),r&&++d>=r))return b();c=Mi(p)}}function T(x){x||g(),a=i()-(x?s*e:0),o=!1,c=Mi(p)}function b(){o=!0}function y(){a=i(),s=0,n&&n(s)}function g(){c&&cancelAnimationFrame(c),s=0,c=0,o=!0}function h(x){e=x}function P(){return o}return{start:T,rewind:y,pause:b,cancel:g,set:h,isPaused:P}}function ms(e){var t=e;function n(i){t=i}function r(i){return ai(jn(i),t)}return{set:n,is:r}}function gs(e,t){var n=Sr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function hs(e,t,n){var r=e.state,i=n.breakpoints||{},a=n.reducedMotion||{},s=Ro(),c=[];function o(){var g=n.mediaQuery==="min";kn(i).sort(function(h,P){return g?+h-+P:+P-+h}).forEach(function(h){p(i[h],"("+(g?"min":"max")+"-width:"+h+"px)")}),p(a,Wi),T()}function d(g){g&&s.destroy()}function p(g,h){var P=matchMedia(h);s.bind(P,"change",T),c.push([g,P])}function T(){var g=r.is(mr),h=n.direction,P=c.reduce(function(x,f){return Nt(x,f[1].matches?f[0]:{})},{});Fi(n),y(P),n.destroy?e.destroy(n.destroy==="completely"):g?(d(!0),e.mount()):h!==n.direction&&e.refresh()}function b(g){matchMedia(Wi).matches&&(g?Nt(n,a):Fi(n,kn(a)))}function y(g,h,P){Nt(n,g),h&&Nt(Object.getPrototypeOf(n),g),(P||!r.is(un))&&e.emit(Ze,n)}return{setup:o,destroy:d,reduce:b,set:y}}var $r="Arrow",wr=$r+"Left",Tr=$r+"Right",Uo=$r+"Up",qo=$r+"Down",Bi="rtl",Lr="ttb",Mr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Uo,Tr],ArrowRight:[qo,wr]};function fs(e,t,n){function r(a,s,c){c=c||n.direction;var o=c===Bi&&!s?1:c===Lr?0:-1;return Mr[a]&&Mr[a][o]||a.replace(/width|left|right/i,function(d,p){var T=Mr[d.toLowerCase()][o]||d;return p>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function i(a){return a*(n.direction===Bi?1:-1)}return{resolve:r,orient:i}}var Rt="role",mn="tabindex",ys="disabled",yt="aria-",qn=yt+"controls",Go=yt+"current",Oi=yt+"selected",pt=yt+"label",yi=yt+"labelledby",Yo=yt+"hidden",vi=yt+"orientation",Fn=yt+"roledescription",Vi=yt+"live",Di=yt+"busy",ji=yt+"atomic",bi=[Rt,mn,ys,qn,Go,pt,yi,Yo,vi,Fn],wt=Un+"__",zt="is-",Fr=Un,zi=wt+"track",vs=wt+"list",Er=wt+"slide",Xo=Er+"--clone",bs=Er+"__container",xi=wt+"arrows",Pr=wt+"arrow",Zo=Pr+"--prev",Jo=Pr+"--next",_r=wt+"pagination",Qo=_r+"__page",xs=wt+"progress",Cs=xs+"__bar",Ss=wt+"toggle",$s=wt+"spinner",ws=wt+"sr",Ts=zt+"initialized",Qt=zt+"active",ea=zt+"prev",ta=zt+"next",Qr=zt+"visible",ei=zt+"loading",na=zt+"focus-in",ra=zt+"overflow",Ls=[Qt,Qr,ea,ta,ei,na,ra],Es={slide:Er,clone:Xo,arrows:xi,arrow:Pr,prev:Zo,next:Jo,pagination:_r,page:Qo,spinner:$s};function Ps(e,t){if(wo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Rn(n,t);)n=n.parentElement;return n}var _s=5,Ki=200,ia="touchstart mousedown",Nr="touchmove mousemove",Hr="touchend touchcancel mouseup click";function As(e,t,n){var r=We(e),i=r.on,a=r.bind,s=e.root,c=n.i18n,o={},d=[],p=[],T=[],b,y,g;function h(){C(),B(),f()}function P(){i(Oe,x),i(Oe,h),i(Ze,f),a(document,ia+" keydown",function(S){g=S.type==="keydown"},{capture:!0}),a(s,"focusin",function(){_t(s,na,!!g)})}function x(S){var A=bi.concat("style");It(d),At(s,p),At(b,T),$t([b,y],A),$t(s,S?A:["style",Fn])}function f(){At(s,p),At(b,T),p=E(Fr),T=E(zi),St(s,p),St(b,T),fe(s,pt,n.label),fe(s,yi,n.labelledby)}function C(){b=_("."+zi),y=Kn(b,"."+vs),En(b&&y,"A track/list element is missing."),sr(d,Lo(y,"."+Er+":not(."+Xo+")")),Zt({arrows:xi,pagination:_r,prev:Zo,next:Jo,bar:Cs,toggle:Ss},function(S,A){o[A]=_("."+S)}),In(o,{root:s,track:b,list:y,slides:d})}function B(){var S=s.id||us(Un),A=n.role;s.id=S,b.id=b.id||S+"-track",y.id=y.id||S+"-list",!ft(s,Rt)&&s.tagName!=="SECTION"&&A&&fe(s,Rt,A),fe(s,Fn,c.carousel),fe(y,Rt,"presentation")}function _(S){var A=_o(s,S);return A&&Ps(A,"."+Fr)===s?A:void 0}function E(S){return[S+"--"+n.type,S+"--"+n.direction,n.drag&&S+"--draggable",n.isNavigation&&S+"--nav",S===Fr&&Qt]}return In(o,{setup:h,mount:P,destroy:x})}var fn="slide",Sn="loop",Gn="fade";function Rs(e,t,n,r){var i=We(e),a=i.on,s=i.emit,c=i.bind,o=e.Components,d=e.root,p=e.options,T=p.isNavigation,b=p.updateOnMove,y=p.i18n,g=p.pagination,h=p.slideFocus,P=o.Direction.resolve,x=ft(r,"style"),f=ft(r,pt),C=n>-1,B=Kn(r,"."+bs),_;function E(){C||(r.id=d.id+"-slide"+di(t+1),fe(r,Rt,g?"tabpanel":"group"),fe(r,Fn,y.slide),fe(r,pt,f||Zr(y.slideLabel,[t+1,e.length]))),S()}function S(){c(r,"click",Ae(s,ui,H)),c(r,"keydown",Ae(s,zo,H)),a([Cn,Ko,en],$),a(mi,k),b&&a(Wt,I)}function A(){_=!0,i.destroy(),At(r,Ls),$t(r,bi),fe(r,"style",x),fe(r,pt,f||"")}function k(){var M=e.splides.map(function(W){var j=W.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");fe(r,pt,Zr(y.slideX,(C?n:t)+1)),fe(r,qn,M),fe(r,Rt,h?"button":""),h&&$t(r,Fn)}function I(){_||$()}function $(){if(!_){var M=e.index;O(),V(),_t(r,ea,t===M-1),_t(r,ta,t===M+1)}}function O(){var M=X();M!==Ni(r,Qt)&&(_t(r,Qt,M),fe(r,Go,T&&M||""),s(M?ko:Io,H))}function V(){var M=L(),W=!M&&(!X()||C);if(e.state.is([xn,Vn])||fe(r,Yo,W||""),fe(li(r,p.focusableNodes||""),mn,W?-1:""),h&&fe(r,mn,W?-1:0),M!==Ni(r,Qr)&&(_t(r,Qr,M),s(M?Wo:Mo,H)),!M&&document.activeElement===r){var j=o.Slides.getAt(e.index);j&&Eo(j.slide)}}function q(M,W,j){ht(j&&B||r,M,W)}function X(){var M=e.index;return M===t||p.cloneStatus&&M===n}function L(){if(e.is(Gn))return X();var M=ut(o.Elements.track),W=ut(r),j=P("left",!0),Q=P("right",!0);return hr(M[j])<=Mn(W[j])&&hr(W[Q])<=Mn(M[Q])}function R(M,W){var j=tt(M-t);return!C&&(p.rewind||e.is(Sn))&&(j=Ot(j,e.length-j)),j<=W}var H={index:t,slideIndex:n,slide:r,container:B,isClone:C,mount:E,destroy:A,update:$,style:q,isWithin:R};return H}function ks(e,t,n){var r=We(e),i=r.on,a=r.emit,s=r.bind,c=t.Elements,o=c.slides,d=c.list,p=[];function T(){b(),i(Oe,y),i(Oe,b)}function b(){o.forEach(function($,O){h($,O,-1)})}function y(){_(function($){$.destroy()}),It(p)}function g(){_(function($){$.update()})}function h($,O,V){var q=Rs(e,O,V,$);q.mount(),p.push(q),p.sort(function(X,L){return X.index-L.index})}function P($){return $?E(function(O){return!O.isClone}):p}function x($){var O=t.Controller,V=O.toIndex($),q=O.hasFocus()?1:n.perPage;return E(function(X){return lr(X.index,V,V+q-1)})}function f($){return E($)[0]}function C($,O){gt($,function(V){if(Bt(V)&&(V=Po(V)),To(V)){var q=o[O];q?si(V,q):zn(d,V),St(V,n.classes.slide),A(V,Ae(a,hn))}}),a(Oe)}function B($){Jt(E($).map(function(O){return O.slide})),a(Oe)}function _($,O){P(O).forEach($)}function E($){return p.filter(wo($)?$:function(O){return Bt($)?Rn(O.slide,$):ai(jn($),O.index)})}function S($,O,V){_(function(q){q.style($,O,V)})}function A($,O){var V=li($,"img"),q=V.length;q?V.forEach(function(X){s(X,"load error",function(){--q||O()})}):O()}function k($){return $?o.length:p.length}function I(){return p.length>n.perPage}return{mount:T,destroy:y,update:g,register:h,get:P,getIn:x,getAt:f,add:C,remove:B,forEach:_,filter:E,style:S,getLength:k,isEnough:I}}function Is(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.emit,c=t.Slides,o=t.Direction.resolve,d=t.Elements,p=d.root,T=d.track,b=d.list,y=c.getAt,g=c.style,h,P,x;function f(){C(),a(window,"resize load",gs(Ae(s,hn))),i([Ze,Oe],C),i(hn,B)}function C(){h=n.direction===Lr,ht(p,"maxWidth",Gt(n.width)),ht(T,o("paddingLeft"),_(!1)),ht(T,o("paddingRight"),_(!0)),B(!0)}function B(H){var M=ut(p);(H||P.width!==M.width||P.height!==M.height)&&(ht(T,"height",E()),g(o("marginRight"),Gt(n.gap)),g("width",A()),g("height",k(),!0),P=M,s(xr),x!==(x=R())&&(_t(p,ra,x),s(ps,x)))}function _(H){var M=n.padding,W=o(H?"right":"left");return M&&Gt(M[W]||(An(M)?0:M))||"0px"}function E(){var H="";return h&&(H=S(),En(H,"height or heightRatio is missing."),H="calc("+H+" - "+_(!1)+" - "+_(!0)+")"),H}function S(){return Gt(n.height||ut(b).width*n.heightRatio)}function A(){return n.autoWidth?null:Gt(n.fixedWidth)||(h?"":I())}function k(){return Gt(n.fixedHeight)||(h?n.autoHeight?null:I():S())}function I(){var H=Gt(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function $(){return ut(b)[o("width")]}function O(H,M){var W=y(H||0);return W?ut(W.slide)[o("width")]+(M?0:X()):0}function V(H,M){var W=y(H);if(W){var j=ut(W.slide)[o("right")],Q=ut(b)[o("left")];return tt(j-Q)+(M?0:X())}return 0}function q(H){return V(e.length-1)-V(0)+O(0,H)}function X(){var H=y(0);return H&&parseFloat(ht(H.slide,o("marginRight")))||0}function L(H){return parseFloat(ht(T,o("padding"+(H?"Right":"Left"))))||0}function R(){return e.is(Gn)||q(!0)>$()}return{mount:f,resize:B,listSize:$,slideSize:O,sliderSize:q,totalSize:V,getPadding:L,isOverflow:R}}var Ws=2;function Ms(e,t,n){var r=We(e),i=r.on,a=t.Elements,s=t.Slides,c=t.Direction.resolve,o=[],d;function p(){i(Oe,T),i([Ze,hn],y),(d=P())&&(g(d),t.Layout.resize(!0))}function T(){b(),p()}function b(){Jt(o),It(o),r.destroy()}function y(){var x=P();d!==x&&(d<x||!x)&&r.emit(Oe)}function g(x){var f=s.get().slice(),C=f.length;if(C){for(;f.length<x;)sr(f,f);sr(f.slice(-x),f.slice(0,x)).forEach(function(B,_){var E=_<x,S=h(B.slide,_);E?si(S,f[0].slide):zn(a.list,S),sr(o,S),s.register(S,_-x+(E?0:C),B.index)})}}function h(x,f){var C=x.cloneNode(!0);return St(C,n.classes.clone),C.id=e.root.id+"-clone"+di(f+1),C}function P(){var x=n.clones;if(!e.is(Sn))x=0;else if(Dn(x)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),C=f&&Mn(ut(a.track)[c("width")]/f);x=C||n[c("autoWidth")]&&e.length||n.perPage*Ws}return x}return{mount:p,destroy:b}}function Fs(e,t,n){var r=We(e),i=r.on,a=r.emit,s=e.state.set,c=t.Layout,o=c.slideSize,d=c.getPadding,p=c.totalSize,T=c.listSize,b=c.sliderSize,y=t.Direction,g=y.resolve,h=y.orient,P=t.Elements,x=P.list,f=P.track,C;function B(){C=t.Transition,i([jt,xr,Ze,Oe],_)}function _(){t.Controller.isBusy()||(t.Scroll.cancel(),S(e.index),t.Slides.update())}function E(W,j,Q,oe){W!==j&&H(W>Q)&&($(),A(I(q(),W>Q),!0)),s(xn),a(Wt,j,Q,W),C.start(j,function(){s(gn),a(Cn,j,Q,W),oe&&oe()})}function S(W){A(V(W,!0))}function A(W,j){if(!e.is(Gn)){var Q=j?W:k(W);ht(x,"transform","translate"+g("X")+"("+Q+"px)"),W!==Q&&a(Ko)}}function k(W){if(e.is(Sn)){var j=O(W),Q=j>t.Controller.getEnd(),oe=j<0;(oe||Q)&&(W=I(W,Q))}return W}function I(W,j){var Q=W-R(j),oe=b();return W-=h(oe*(Mn(tt(Q)/oe)||1))*(j?1:-1),W}function $(){A(q(),!0),C.cancel()}function O(W){for(var j=t.Slides.get(),Q=0,oe=1/0,te=0;te<j.length;te++){var ce=j[te].index,v=tt(V(ce,!0)-W);if(v<=oe)oe=v,Q=ce;else break}return Q}function V(W,j){var Q=h(p(W-1)-L(W));return j?X(Q):Q}function q(){var W=g("left");return ut(x)[W]-ut(f)[W]+h(d(!1))}function X(W){return n.trimSpace&&e.is(fn)&&(W=ln(W,0,h(b(!0)-T()))),W}function L(W){var j=n.focus;return j==="center"?(T()-o(W,!0))/2:+j*o(W)||0}function R(W){return V(W?t.Controller.getEnd():0,!!n.trimSpace)}function H(W){var j=h(I(q(),W));return W?j>=0:j<=x[g("scrollWidth")]-ut(f)[g("width")]}function M(W,j){j=Dn(j)?q():j;var Q=W!==!0&&h(j)<h(R(!1)),oe=W!==!1&&h(j)>h(R(!0));return Q||oe}return{mount:B,move:E,jump:S,translate:A,shift:I,cancel:$,toIndex:O,toPosition:V,getPosition:q,getLimit:R,exceededLimit:M,reposition:_}}function Ns(e,t,n){var r=We(e),i=r.on,a=r.emit,s=t.Move,c=s.getPosition,o=s.getLimit,d=s.toPosition,p=t.Slides,T=p.isEnough,b=p.getLength,y=n.omitEnd,g=e.is(Sn),h=e.is(fn),P=Ae(q,!1),x=Ae(q,!0),f=n.start||0,C,B=f,_,E,S;function A(){k(),i([Ze,Oe,fr],k),i(xr,I)}function k(){_=b(!0),E=n.perMove,S=n.perPage,C=H();var v=ln(f,0,y?C:_-1);v!==f&&(f=v,s.reposition())}function I(){C!==H()&&a(fr)}function $(v,ie,$e){if(!ce()){var de=V(v),ye=R(de);ye>-1&&(ie||ye!==f)&&(Q(ye),s.move(de,ye,B,$e))}}function O(v,ie,$e,de){t.Scroll.scroll(v,ie,$e,function(){var ye=R(s.toIndex(c()));Q(y?Ot(ye,C):ye),de&&de()})}function V(v){var ie=f;if(Bt(v)){var $e=v.match(/([+\-<>])(\d+)?/)||[],de=$e[1],ye=$e[2];de==="+"||de==="-"?ie=X(f+ +(""+de+(+ye||1)),f):de===">"?ie=ye?M(+ye):P(!0):de==="<"&&(ie=x(!0))}else ie=g?v:ln(v,0,C);return ie}function q(v,ie){var $e=E||(te()?1:S),de=X(f+$e*(v?-1:1),f,!(E||te()));return de===-1&&h&&!Ao(c(),o(!v),1)?v?0:C:ie?de:R(de)}function X(v,ie,$e){if(T()||te()){var de=L(v);de!==v&&(ie=v,v=de,$e=!1),v<0||v>C?!E&&(lr(0,v,ie,!0)||lr(C,ie,v,!0))?v=M(W(v)):g?v=$e?v<0?-(_%S||S):_:v:n.rewind?v=v<0?C:0:v=-1:$e&&v!==ie&&(v=M(W(ie)+(v<ie?-1:1)))}else v=-1;return v}function L(v){if(h&&n.trimSpace==="move"&&v!==f)for(var ie=c();ie===d(v,!0)&&lr(v,0,e.length-1,!n.rewind);)v<f?--v:++v;return v}function R(v){return g?(v+_)%_||0:v}function H(){for(var v=_-(te()||g&&E?1:S);y&&v-- >0;)if(d(_-1,!0)!==d(v,!0)){v++;break}return ln(v,0,_-1)}function M(v){return ln(te()?v:S*v,0,C)}function W(v){return te()?Ot(v,C):hr((v>=C?_-1:v)/S)}function j(v){var ie=s.toIndex(v);return h?ln(ie,0,C):ie}function Q(v){v!==f&&(B=f,f=v)}function oe(v){return v?B:f}function te(){return!Dn(n.focus)||n.isNavigation}function ce(){return e.state.is([xn,Vn])&&!!n.waitForTransition}return{mount:A,go:$,scroll:O,getNext:P,getPrev:x,getAdjacent:q,getEnd:H,setIndex:Q,getIndex:oe,toIndex:M,toPage:W,toDest:j,hasFocus:te,isBusy:ce}}var Hs="http://www.w3.org/2000/svg",Bs="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",Qn=40;function Os(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.emit,c=n.classes,o=n.i18n,d=t.Elements,p=t.Controller,T=d.arrows,b=d.track,y=T,g=d.prev,h=d.next,P,x,f={};function C(){_(),i(Ze,B)}function B(){E(),C()}function _(){var O=n.arrows;O&&!(g&&h)&&k(),g&&h&&(In(f,{prev:g,next:h}),Wn(y,O?"":"none"),St(y,x=xi+"--"+n.direction),O&&(S(),$(),fe([g,h],qn,b.id),s(Bo,g,h)))}function E(){r.destroy(),At(y,x),P?(Jt(T?[g,h]:y),g=h=null):$t([g,h],bi)}function S(){i([jt,Cn,Oe,en,fr],$),a(h,"click",Ae(A,">")),a(g,"click",Ae(A,"<"))}function A(O){p.go(O,!0)}function k(){y=T||pn("div",c.arrows),g=I(!0),h=I(!1),P=!0,zn(y,[g,h]),!T&&si(y,b)}function I(O){var V='<button class="'+c.arrow+" "+(O?c.prev:c.next)+'" type="button"><svg xmlns="'+Hs+'" viewBox="0 0 '+Qn+" "+Qn+'" width="'+Qn+'" height="'+Qn+'" focusable="false"><path d="'+(n.arrowPath||Bs)+'" />';return Po(V)}function $(){if(g&&h){var O=e.index,V=p.getPrev(),q=p.getNext(),X=V>-1&&O<V?o.last:o.prev,L=q>-1&&O>q?o.first:o.next;g.disabled=V<0,h.disabled=q<0,fe(g,pt,X),fe(h,pt,L),s(Oo,g,h,V,q)}}return{arrows:f,mount:C,destroy:E,update:$}}var Vs=ci+"-interval";function Ds(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.emit,c=Sr(n.interval,e.go.bind(e,">"),S),o=c.isPaused,d=t.Elements,p=t.Elements,T=p.root,b=p.toggle,y=n.autoplay,g,h,P=y==="pause";function x(){y&&(f(),b&&fe(b,qn,d.track.id),P||C(),E())}function f(){n.pauseOnHover&&a(T,"mouseenter mouseleave",function(k){g=k.type==="mouseenter",_()}),n.pauseOnFocus&&a(T,"focusin focusout",function(k){h=k.type==="focusin",_()}),b&&a(b,"click",function(){P?C():B(!0)}),i([Wt,Cr,Oe],c.rewind),i(Wt,A)}function C(){o()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),h=g=P=!1,E(),s(gi))}function B(k){k===void 0&&(k=!0),P=!!k,E(),o()||(c.pause(),s(hi))}function _(){P||(g||h?B(!1):C())}function E(){b&&(_t(b,Qt,!P),fe(b,pt,n.i18n[P?"play":"pause"]))}function S(k){var I=d.bar;I&&ht(I,"width",k*100+"%"),s(jo,k)}function A(k){var I=t.Slides.getAt(k);c.set(I&&+ft(I.slide,Vs)||n.interval)}return{mount:x,destroy:c.cancel,play:C,pause:B,isPaused:o}}function js(e,t,n){var r=We(e),i=r.on;function a(){n.cover&&(i(fi,Ae(c,!0)),i([jt,Ze,Oe],Ae(s,!0)))}function s(o){t.Slides.forEach(function(d){var p=Kn(d.container||d.slide,"img");p&&p.src&&c(o,p,d)})}function c(o,d,p){p.style("background",o?'center/cover no-repeat url("'+d.src+'")':"",!0),Wn(d,o?"none":"")}return{mount:a,destroy:Ae(s,!1)}}var zs=10,Ks=600,Us=.6,qs=1.5,Gs=800;function Ys(e,t,n){var r=We(e),i=r.on,a=r.emit,s=e.state.set,c=t.Move,o=c.getPosition,d=c.getLimit,p=c.exceededLimit,T=c.translate,b=e.is(fn),y,g,h=1;function P(){i(Wt,B),i([Ze,Oe],_)}function x(S,A,k,I,$){var O=o();if(B(),k&&(!b||!p())){var V=t.Layout.sliderSize(),q=Xr(S)*V*hr(tt(S)/V)||0;S=c.toPosition(t.Controller.toDest(S%V))+q}var X=Ao(O,S,1);h=1,A=X?0:A||gr(tt(S-O)/qs,Gs),g=I,y=Sr(A,f,Ae(C,O,S,$),1),s(Vn),a(Cr),y.start()}function f(){s(gn),g&&g(),a(en)}function C(S,A,k,I){var $=o(),O=S+(A-S)*E(I),V=(O-$)*h;T($+V),b&&!k&&p()&&(h*=Us,tt(V)<zs&&x(d(p(!0)),Ks,!1,g,!0))}function B(){y&&y.cancel()}function _(){y&&!y.isPaused()&&(B(),f())}function E(S){var A=n.easingFunc;return A?A(S):1-Math.pow(1-S,4)}return{mount:P,destroy:B,scroll:x,cancel:_}}var cn={passive:!1,capture:!0};function Xs(e,t,n){var r=We(e),i=r.on,a=r.emit,s=r.bind,c=r.unbind,o=e.state,d=t.Move,p=t.Scroll,T=t.Controller,b=t.Elements.track,y=t.Media.reduce,g=t.Direction,h=g.resolve,P=g.orient,x=d.getPosition,f=d.exceededLimit,C,B,_,E,S,A=!1,k,I,$;function O(){s(b,Nr,Gr,cn),s(b,Hr,Gr,cn),s(b,ia,q,cn),s(b,"click",R,{capture:!0}),s(b,"dragstart",Pt),i([jt,Ze],V)}function V(){var F=n.drag;re(!F),E=F==="free"}function q(F){if(k=!1,!I){var m=ye(F);de(F.target)&&(m||!F.button)&&(T.isBusy()?Pt(F,!0):($=m?b:window,S=o.is([xn,Vn]),_=null,s($,Nr,X,cn),s($,Hr,L,cn),d.cancel(),p.cancel(),H(F)))}}function X(F){if(o.is(ar)||(o.set(ar),a(Fo)),F.cancelable)if(S){d.translate(C+$e(te(F)));var m=ce(F)>Ki,N=A!==(A=f());(m||N)&&H(F),k=!0,a(No),Pt(F)}else j(F)&&(S=W(F),Pt(F))}function L(F){o.is(ar)&&(o.set(gn),a(Ho)),S&&(M(F),Pt(F)),c($,Nr,X),c($,Hr,L),S=!1}function R(F){!I&&k&&Pt(F,!0)}function H(F){_=B,B=F,C=x()}function M(F){var m=Q(F),N=oe(m),D=n.rewind&&n.rewindByDrag;y(!1),E?T.scroll(N,0,n.snap):e.is(Gn)?T.go(P(Xr(m))<0?D?"<":"-":D?">":"+"):e.is(fn)&&A&&D?T.go(f(!0)?">":"<"):T.go(T.toDest(N),!0),y(!0)}function W(F){var m=n.dragMinThreshold,N=An(m),D=N&&m.mouse||0,U=(N?m.touch:+m)||10;return tt(te(F))>(ye(F)?U:D)}function j(F){return tt(te(F))>tt(te(F,!0))}function Q(F){if(e.is(Sn)||!A){var m=ce(F);if(m&&m<Ki)return te(F)/m}return 0}function oe(F){return x()+Xr(F)*Ot(tt(F)*(n.flickPower||600),E?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(F,m){return ie(F,m)-ie(v(F),m)}function ce(F){return Yr(F)-Yr(v(F))}function v(F){return B===F&&_||B}function ie(F,m){return(ye(F)?F.changedTouches[0]:F)["page"+h(m?"Y":"X")]}function $e(F){return F/(A&&e.is(fn)?_s:1)}function de(F){var m=n.noDrag;return!Rn(F,"."+Qo+", ."+Pr)&&(!m||!Rn(F,m))}function ye(F){return typeof TouchEvent<"u"&&F instanceof TouchEvent}function Re(){return S}function re(F){I=F}return{mount:O,disable:re,isDragging:Re}}var Zs={Spacebar:" ",Right:Tr,Left:wr,Up:Uo,Down:qo};function Ci(e){return e=Bt(e)?e:e.key,Zs[e]||e}var Ui="keydown";function Js(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.unbind,c=e.root,o=t.Direction.resolve,d,p;function T(){b(),i(Ze,y),i(Ze,b),i(Wt,h)}function b(){var x=n.keyboard;x&&(d=x==="global"?window:c,a(d,Ui,P))}function y(){s(d,Ui)}function g(x){p=x}function h(){var x=p;p=!0,$o(function(){p=x})}function P(x){if(!p){var f=Ci(x);f===o(wr)?e.go("<"):f===o(Tr)&&e.go(">")}}return{mount:T,destroy:y,disable:g}}var Pn=ci+"-lazy",cr=Pn+"-srcset",Qs="["+Pn+"], ["+cr+"]";function el(e,t,n){var r=We(e),i=r.on,a=r.off,s=r.bind,c=r.emit,o=n.lazyLoad==="sequential",d=[Cn,en],p=[];function T(){n.lazyLoad&&(b(),i(Oe,b))}function b(){It(p),y(),o?x():(a(d),i(d,g),g())}function y(){t.Slides.forEach(function(f){li(f.slide,Qs).forEach(function(C){var B=ft(C,Pn),_=ft(C,cr);if(B!==C.src||_!==C.srcset){var E=n.classes.spinner,S=C.parentElement,A=Kn(S,"."+E)||pn("span",E,S);p.push([C,f,A]),C.src||Wn(C,"none")}})})}function g(){p=p.filter(function(f){var C=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,C)?h(f):!0}),p.length||a(d)}function h(f){var C=f[0];St(f[1].slide,ei),s(C,"load error",Ae(P,f)),fe(C,"src",ft(C,Pn)),fe(C,"srcset",ft(C,cr)),$t(C,Pn),$t(C,cr)}function P(f,C){var B=f[0],_=f[1];At(_.slide,ei),C.type!=="error"&&(Jt(f[2]),Wn(B,""),c(fi,B,_),c(hn)),o&&x()}function x(){p.length&&h(p.shift())}return{mount:T,destroy:Ae(It,p),check:g}}function tl(e,t,n){var r=We(e),i=r.on,a=r.emit,s=r.bind,c=t.Slides,o=t.Elements,d=t.Controller,p=d.hasFocus,T=d.getIndex,b=d.go,y=t.Direction.resolve,g=o.pagination,h=[],P,x;function f(){C(),i([Ze,Oe,fr],f);var I=n.pagination;g&&Wn(g,I?"":"none"),I&&(i([Wt,Cr,en],k),B(),k(),a(Vo,{list:P,items:h},A(e.index)))}function C(){P&&(Jt(g?Dt(P.children):P),At(P,x),It(h),P=null),r.destroy()}function B(){var I=e.length,$=n.classes,O=n.i18n,V=n.perPage,q=p()?d.getEnd()+1:Mn(I/V);P=g||pn("ul",$.pagination,o.track.parentElement),St(P,x=_r+"--"+S()),fe(P,Rt,"tablist"),fe(P,pt,O.select),fe(P,vi,S()===Lr?"vertical":"");for(var X=0;X<q;X++){var L=pn("li",null,P),R=pn("button",{class:$.page,type:"button"},L),H=c.getIn(X).map(function(W){return W.slide.id}),M=!p()&&V>1?O.pageX:O.slideX;s(R,"click",Ae(_,X)),n.paginationKeyboard&&s(R,"keydown",Ae(E,X)),fe(L,Rt,"presentation"),fe(R,Rt,"tab"),fe(R,qn,H.join(" ")),fe(R,pt,Zr(M,X+1)),fe(R,mn,-1),h.push({li:L,button:R,page:X})}}function _(I){b(">"+I,!0)}function E(I,$){var O=h.length,V=Ci($),q=S(),X=-1;V===y(Tr,!1,q)?X=++I%O:V===y(wr,!1,q)?X=(--I+O)%O:V==="Home"?X=0:V==="End"&&(X=O-1);var L=h[X];L&&(Eo(L.button),b(">"+X),Pt($,!0))}function S(){return n.paginationDirection||n.direction}function A(I){return h[d.toPage(I)]}function k(){var I=A(T(!0)),$=A(T());if(I){var O=I.button;At(O,Qt),$t(O,Oi),fe(O,mn,-1)}if($){var V=$.button;St(V,Qt),fe(V,Oi,!0),fe(V,mn,"")}a(Do,{list:P,items:h},I,$)}return{items:h,mount:f,destroy:C,getAt:A,update:k}}var nl=[" ","Enter"];function rl(e,t,n){var r=n.isNavigation,i=n.slideFocus,a=[];function s(){e.splides.forEach(function(g){g.isParent||(d(e,g.splide),d(g.splide,e))}),r&&p()}function c(){a.forEach(function(g){g.destroy()}),It(a)}function o(){c(),s()}function d(g,h){var P=We(g);P.on(Wt,function(x,f,C){h.go(h.is(Sn)?C:x)}),a.push(P)}function p(){var g=We(e),h=g.on;h(ui,b),h(zo,y),h([jt,Ze],T),a.push(g),g.emit(mi,e.splides)}function T(){fe(t.Elements.list,vi,n.direction===Lr?"vertical":"")}function b(g){e.go(g.index)}function y(g,h){ai(nl,Ci(h))&&(b(g),Pt(h))}return{setup:Ae(t.Media.set,{slideFocus:Dn(i)?r:i},!0),mount:s,destroy:c,remount:o}}function il(e,t,n){var r=We(e),i=r.bind,a=0;function s(){n.wheel&&i(t.Elements.track,"wheel",c,cn)}function c(d){if(d.cancelable){var p=d.deltaY,T=p<0,b=Yr(d),y=n.wheelMinThreshold||0,g=n.wheelSleep||0;tt(p)>y&&b-a>g&&(e.go(T?"<":">"),a=b),o(T)&&Pt(d)}}function o(d){return!n.releaseWheel||e.state.is(xn)||t.Controller.getAdjacent(d)!==-1}return{mount:s}}var ol=90;function al(e,t,n){var r=We(e),i=r.on,a=t.Elements.track,s=n.live&&!n.isNavigation,c=pn("span",ws),o=Sr(ol,Ae(p,!1));function d(){s&&(b(!t.Autoplay.isPaused()),fe(a,ji,!0),c.textContent="…",i(gi,Ae(b,!0)),i(hi,Ae(b,!1)),i([Cn,en],Ae(p,!0)))}function p(y){fe(a,Di,y),y?(zn(a,c),o.start()):(Jt(c),o.cancel())}function T(){$t(a,[Vi,ji,Di]),Jt(c)}function b(y){s&&fe(a,Vi,y?"off":"polite")}return{mount:d,disable:b,destroy:T}}var sl=Object.freeze({__proto__:null,Media:hs,Direction:fs,Elements:As,Slides:ks,Layout:Is,Clones:Ms,Move:Fs,Controller:Ns,Arrows:Os,Autoplay:Ds,Cover:js,Scroll:Ys,Drag:Xs,Keyboard:Js,LazyLoad:el,Pagination:tl,Sync:rl,Wheel:il,Live:al}),ll={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"},cl={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:Es,i18n:ll,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function dl(e,t,n){var r=t.Slides;function i(){We(e).on([jt,Oe],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function s(c,o){r.style("transition","opacity "+n.speed+"ms "+n.easing),$o(o)}return{mount:i,start:s,cancel:Gr}}function ul(e,t,n){var r=t.Move,i=t.Controller,a=t.Scroll,s=t.Elements.list,c=Ae(ht,s,"transition"),o;function d(){We(e).bind(s,"transitionend",function(y){y.target===s&&o&&(T(),o())})}function p(y,g){var h=r.toPosition(y,!0),P=r.getPosition(),x=b(y);tt(h-P)>=1&&x>=1?n.useScroll?a.scroll(h,x,!1,g):(c("transform "+x+"ms "+n.easing),r.translate(h,!0),o=g):(r.jump(y),g())}function T(){c(""),a.cancel()}function b(y){var g=n.rewindSpeed;if(e.is(fn)&&g){var h=i.getIndex(!0),P=i.getEnd();if(h===0&&y>=P||h>=P&&y===0)return g}return n.speed}return{mount:d,start:p,cancel:T}}var pl=(function(){function e(n,r){this.event=We(),this.Components={},this.state=ms(un),this.splides=[],this._o={},this._E={};var i=Bt(n)?_o(document,n):n;En(i,i+" is invalid."),this.root=i,r=Nt({label:ft(i,pt)||"",labelledby:ft(i,yi)||""},cl,e.defaults,r||{});try{Nt(r,JSON.parse(ft(i,ci)))}catch{En(!1,"Invalid JSON")}this._o=Object.create(Nt({},r))}var t=e.prototype;return t.mount=function(r,i){var a=this,s=this.state,c=this.Components;En(s.is([un,mr]),"Already mounted!"),s.set(un),this._C=c,this._T=i||this._T||(this.is(Gn)?dl:ul),this._E=r||this._E;var o=In({},sl,this._E,{Transition:this._T});return Zt(o,function(d,p){var T=d(a,c,a._o);c[p]=T,T.setup&&T.setup()}),Zt(c,function(d){d.mount&&d.mount()}),this.emit(jt),St(this.root,Ts),s.set(gn),this.emit(Jr),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(gn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(Dt(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(Oe),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,a=this.state;return a.is(un)?We(this).on(Jr,this.destroy.bind(this,r)):(Zt(this._C,function(s){s.destroy&&s.destroy(r)},!0),i.emit(pi),i.destroy(),r&&It(this.splides),a.set(mr)),this},ls(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Si=pl;Si.defaults={};Si.STATES=ds;var qi=[[jt,"onMounted"],[Jr,"onReady"],[Wt,"onMove"],[Cn,"onMoved"],[ui,"onClick"],[ko,"onActive"],[Io,"onInactive"],[Wo,"onVisible"],[Mo,"onHidden"],[Oe,"onRefresh"],[Ze,"onUpdated"],[hn,"onResize"],[xr,"onResized"],[Fo,"onDrag"],[No,"onDragging"],[Ho,"onDragged"],[Cr,"onScroll"],[en,"onScrolled"],[pi,"onDestroy"],[Bo,"onArrowsMounted"],[Oo,"onArrowsUpdated"],[Vo,"onPaginationMounted"],[Do,"onPaginationUpdated"],[mi,"onNavigationMounted"],[gi,"onAutoplayPlay"],[jo,"onAutoplayPlaying"],[hi,"onAutoplayPause"],[fi,"onLazyLoadLoaded"]];function $i(...e){return e.filter(Boolean).join(" ")}function yr(e){return e!==null&&typeof e=="object"}function ti(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!ti(n,t[r]));if(yr(e)&&yr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!ti(e[i],t[i]))}return e===t}function ml(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function gl(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function ni(e,t){const n=e;return gl(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():yr(r)?n[i]=ni(yr(n[i])?n[i]:{},r):n[i]=r}),n}var hl=({children:e,className:t,...n})=>u.createElement("div",{className:$i("splide__track",t),...n},u.createElement("ul",{className:"splide__list"},e)),wi=class extends u.Component{constructor(){super(...arguments),this.splideRef=u.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Si(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ni({},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&&!ti(this.options,e)&&(this.splide.options=e,this.options=ni({},e));const t=this.getSlides();ml(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){qi.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}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:r,...i}=this.props;return u.createElement(t,{className:$i("splide",e),ref:this.splideRef,...this.omit(i,["options",...qi.map(a=>a[1])])},n?u.createElement(hl,null,r):r)}},Ti=({children:e,className:t,...n})=>u.createElement("li",{className:$i("splide__slide",t),...n},e);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const hl="RichTextRenderer-module__link___BWeZ2",fl={link:hl},yl=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},Ar=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>yl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Ct(e){const{color:t,...n}=e;return n}function nt(e,t){var i,a,s;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Ar(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:w.scalingValue(e.letterSpacing,t),wordSpacing:w.scalingValue(e.wordSpacing,t),fontSize:w.scalingValue(n,t),lineHeight:r!==void 0?w.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(a=e.textAppearance)==null?void 0:a.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const Fn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?l.jsx("a",{className:fl.link,href:r.value,target:r.target,children:t(r.children)},i):l.jsx("span",{style:vl(r),children:r.text},i));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const i=n.children;return l.jsx("div",{children:t(i)},r)})})};function vl(e){return{...e.fontFamily&&{fontFamily:Ar(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 bl="SvgImage-module__svg___q3xE-",xl="SvgImage-module__img___VsTm-",Gi={svg:bl,img:xl},Cl=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Sl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ht=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[a,s]=u.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return u.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(c)}},[]),!Cl(e)||!a?l.jsx("img",{src:e,alt:"",className:Le(Gi.img,r),style:i}):l.jsx("span",{"data-supports-mask":a,className:Le(Gi.svg,r),style:{"--svg":Sl(e),"--fill":t,"--hover-fill":n,...i??{}}})},$l={"top-left":se.topLeftAlignment,"top-center":se.topCenterAlignment,"top-right":se.topRightAlignment,"middle-left":se.middleLeftAlignment,"middle-center":se.middleCenterAlignment,"middle-right":se.middleRightAlignment,"bottom-left":se.bottomLeftAlignment,"bottom-center":se.bottomCenterAlignment,"bottom-right":se.bottomRightAlignment};function wl({settings:e,content:t,styles:n,isEditor:r}){const[i,a]=u.useState(null),{widthSettings:s,fontSettings:c,letterSpacing:o,textAlign:d,wordSpacing:p,fontSizeLineHeight:T,textAppearance:x,color:y}=n.imageCaption,[g,h]=u.useState(void 0),[P,C]=u.useState(null),[f,b]=u.useState(0),[M,_]=u.useState(0),{direction:E,transition:S,controls:A,pagination:I,imageCaption:k,triggers:$}=e,O=u.useRef(S.type),{x:V,y:q}=e.controls.offset,Y=L=>{i&&i.go(L)};return u.useEffect(()=>{if(!P)return;const L=new ResizeObserver(R=>{if(!i)return;const[B]=R;h({width:Math.round(B.contentRect.width),height:Math.round(B.contentRect.height)})});return L.observe(P),()=>L.unobserve(P)},[P]),u.useEffect(()=>{!i||O.current===S.type||(_(L=>L+1),O.current=S.type)},[S.type]),l.jsx("div",{className:Le(se.wrapper,{[se.editor]:r}),ref:C,children:l.jsxs("div",{className:se.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:S.backgroundColor&&S.type==="fade in"?S.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Le(se.captionBlock),children:l.jsx("div",{className:se.captionTextWrapper,children:t.map((L,R)=>l.jsx("div",{className:Le(se.captionText,$l[k.alignment],{[se.withPointerEvents]:R===f&&r,[se.active]:R===f}),style:{fontFamily:Ar(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:s.sizing==="auto"?"max-content":w.scalingValue(s.width,r),letterSpacing:w.scalingValue(o,r),wordSpacing:w.scalingValue(p,r),textAlign:d,fontSize:w.scalingValue(T.fontSize,r),lineHeight:w.scalingValue(T.lineHeight,r),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:y,transitionDuration:S.duration?`${Math.round(parseInt(S.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:se.captionTextInner,style:{"--link-hover-color":k.linkHoverColor,"--link-color":k.linkColor,position:"relative",top:w.scalingValue(k.offset.y,r),left:w.scalingValue(k.offset.x,r)},children:l.jsx(Fn,{content:L.imageCaption})})},R))})}),l.jsx(wi,{onMove:L=>{b(L.index)},ref:a,options:{arrows:!1,speed:S.duration?parseInt(S.duration):500,autoplay:$.autoPlay!==null,...$.autoPlay!==null&&{interval:parseInt($.autoPlay)*1e3},direction:E==="horiz"||S.type==="fade in"?"ltr":"ttb",pagination:!1,drag:$.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:S.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((L,R)=>l.jsx(Ti,{children:l.jsx("div",{className:se.sliderItem,children:l.jsx("div",{className:se.imgWrapper,children:l.jsx("img",{className:Le(se.sliderImage,{[se.contain]:L.image.objectFit==="contain",[se.cover]:L.image.objectFit==="cover"}),src:L.image.url,alt:L.image.name??""})})})},R))},M),A.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Le(se.arrow,{[se.arrowVertical]:E==="vert",[se.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:l.jsxs("button",{onClick:()=>{Y("-1")},className:se.arrowInner,style:{transform:`translate(${w.scalingValue(V,r)}, ${w.scalingValue(q*(E==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&l.jsx(Ht,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:Le(se.arrowImg,se.mirror)}),!A.arrowsImgUrl&&l.jsx(Yi,{color:A.color,className:Le(se.arrowIcon,se.arrowImg,se.mirror)})]})}),l.jsx("div",{className:Le(se.arrow,se.nextArrow,{[se.arrowVertical]:E==="vert",[se.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:l.jsxs("button",{className:se.arrowInner,onClick:()=>Y("+1"),style:{transform:`translate(${w.scalingValue(V*(E==="horiz"?-1:1),r)}, ${w.scalingValue(q,r)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&l.jsx(Ht,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:se.arrowImg}),!A.arrowsImgUrl&&l.jsx(Yi,{color:A.color,className:Le(se.arrowIcon,se.arrowImg)})]})})]}),$.triggersList.click&&l.jsx("div",{className:se.clickOverlay,onClick:()=>{i&&i.go("+1")}}),I.isActive&&l.jsx("div",{className:Le(se.pagination,{[se.paginationInsideBottom]:I.position==="inside-1"&&E==="horiz",[se.paginationInsideTop]:I.position==="inside-2"&&E==="horiz",[se.paginationOutsideBottom]:I.position==="outside-1"&&E==="horiz",[se.paginationOutsideTop]:I.position==="outside-2"&&E==="horiz",[se.paginationInsideLeft]:I.position==="inside-1"&&E==="vert",[se.paginationInsideRight]:I.position==="inside-2"&&E==="vert",[se.paginationOutsideLeft]:I.position==="outside-1"&&E==="vert",[se.paginationOutsideRight]:I.position==="outside-2"&&E==="vert",[se.paginationVertical]:E==="vert"}),children:l.jsx("div",{className:se.paginationInner,style:{backgroundColor:I.colors[2],transform:`scale(${I.scale/100}) translate(${w.scalingValue(I.offset.x,r)}, ${w.scalingValue(I.offset.y,r)}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:t.map((L,R)=>l.jsx("button",{onClick:()=>{i&&i.go(R)},className:Le(se.paginationItem),children:l.jsx("div",{className:Le(se.dot,{[se.activeDot]:R===f}),style:{backgroundColor:R===f?I.colors[0]:I.colors[1],"--pagination-hover-color":I.hover}})},R))})})]})})}function Yi({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Tl={element:wl,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},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:"inside-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"]}},Ll="ImageRevealSlider-module__imageRevealSlider___UE5Ob",El="ImageRevealSlider-module__image___Qjt-e",Pl="ImageRevealSlider-module__link___N-iLG",_l="ImageRevealSlider-module__cursor___2U03d",sn={imageRevealSlider:Ll,image:El,link:Pl,cursor:_l};function Xi(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const a=r.width?Number.parseFloat(r.width):i.naturalWidth,s=i.naturalHeight/i.naturalWidth*a,c=a/2,o=s/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-o&&t<=r.y+o)return!0}return!1}function Br(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Al(e,t,n,r){let i,a;if(t==="custom"){i=n;const s=await Br(e);a=s.height/s.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const s=await Br(e);a=s.height/s.width*i}else{const s=await Br(e);i=s.width,a=s.height}return{width:i,height:a,finalWidth:`${i}px`}}function Rl({settings:e,content:t,isEditor:n}){const[r,i]=u.useState(null),[a,s]=u.useState([]),[c,o]=u.useState(0),d=u.useRef(0),[p,T]=u.useState({x:0,y:0}),[x,y]=u.useState(1),[g,h]=u.useState("none"),P=u.useRef({x:0,y:0}),[C,f]=u.useState(!1),{sizeType:b,imageWidth:M,randomRangeImageWidth:_}=e.imageSize,{revealPosition:E,visible:S}=e.position,{cursorType:A,target:I,defaultCursorScale:k,defaultCursor:$,hoverCursorScale:O,hoverCursor:V}=e.cursor;u.useEffect(()=>{if(!r)return;const L=(F,W)=>{const j=r.getBoundingClientRect(),Q=F-j.left,oe=W-j.top;if(T({x:Q,y:oe}),A==="system"){h("none"),y(1);return}const te=Q,ce=oe,v=document.elementFromPoint(j.left+te,j.top+ce);if(v&&v.closest("a")){h("none"),y(1);return}const ie=Xi(te,ce,a)||I==="area"?{img:V??"none",scale:O}:{img:$??"none",scale:k};h(ie.img),y(ie.scale)},R=F=>{F.stopPropagation(),P.current={x:F.clientX,y:F.clientY},L(F.clientX,F.clientY)},B=()=>{C&&L(P.current.x,P.current.y)};return r.addEventListener("mousemove",R),window.addEventListener("scroll",B,!0),()=>{r.removeEventListener("mousemove",R),window.removeEventListener("scroll",B,!0)}},[r,C,p,A,I,V,$,O,k,a]),u.useEffect(()=>{C||(h("none"),y(0))},[C]);const q=async(L,R,B,F={})=>{const{width:W,height:j,finalWidth:Q}=await Al(L.image.url,b,M,_);let oe=0,te=0;E==="same"?(oe=R/2,te=B/2):(oe=F.x??Math.random()*R,te=F.y??Math.random()*B);const ce=Math.min(Math.max(oe,W/2),R-W/2),v=Math.min(Math.max(te,j/2),B-j/2);return{id:d.current++,url:L.image.url,link:L.link,name:L.image.name,x:ce,y:v,width:Q}};u.useEffect(()=>{if(!r||t.length===0)return;const L=r.getBoundingClientRect(),R=L.width,B=L.height,F=[];(async()=>{const j=t[0],Q=await q(j,R,B);F.push(Q),s(F),o(1)})()},[b,M,_,E,r]),u.useEffect(()=>{S==="last One"&&s(L=>L.length>0?[L[L.length-1]]:[])},[S]);const Y=async L=>{if(!r)return;const R=r.getBoundingClientRect(),B=L.clientX-R.left,F=L.clientY-R.top;if(I==="image"&&!Xi(B,F,a))return;let W=0,j=0;E==="on Click"?(W=B,j=F):E==="same"?(W=R.width/2,j=R.height/2):(W=Math.random()*R.width,j=Math.random()*R.height);const Q=t[c],oe=await q(Q,R.width,R.height,{x:W,y:j});s(te=>S==="all"?[...te,oe]:[oe]),o(te=>te>=t.length-1?0:te+1)};return l.jsxs("div",{ref:i,onClick:Y,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:sn.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[a.map(L=>l.jsx("div",{className:sn.wrapper,style:{top:`${L.y}px`,left:`${L.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:L.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:I==="area"&&L.link?l.jsx("a",{href:L.link,target:"_blank",className:sn.link,children:l.jsx("img",{src:L.url,alt:L.name,className:sn.image},L.id)}):l.jsx("img",{src:L.url,alt:L.name,className:sn.image},L.id)},L.id)),C&&l.jsx("div",{className:sn.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Il={element:Rl,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{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:""}]}}}},kl="LightBox-module__hidden___9s-9x",Wl="LightBox-module__heroImage___sTxNF",Ml="LightBox-module__background___rm9ml",Fl="LightBox-module__editor___4ACaY",Nl="LightBox-module__contentStyle___Bgnsq",Hl="LightBox-module__imageStyle___tLIlB",Bl="LightBox-module__imgWrapper___LuFUp",Ol="LightBox-module__contain___8-yaS",Vl="LightBox-module__cover___hNvOG",Dl="LightBox-module__caption___b6L2I",jl="LightBox-module__captionTextInner___rCGNH",zl="LightBox-module__lightboxSplide___XFuWC",Kl="LightBox-module__arrow___iz38X",Ul="LightBox-module__arrowVertical___Zfz81",ql="LightBox-module__nextArrow___zkAQN",Gl="LightBox-module__arrowInner___p48sW",Yl="LightBox-module__arrowIcon___3VaFf",Xl="LightBox-module__arrowImg___pNV88",Zl="LightBox-module__mirror___pjeXc",Jl="LightBox-module__thumbsWrapper___GB-nU",Ql="LightBox-module__thumbsContainerVertical___wttk5",ec="LightBox-module__thumbsContainer___osSma",tc="LightBox-module__thumbsAlignStart___MO6tY",nc="LightBox-module__thumbsAlignCenter___Q4sUx",rc="LightBox-module__thumbsAlignEnd___p4y9R",ic="LightBox-module__thumbItem___HvnF3",oc="LightBox-module__closeButton___g2khP",ac="LightBox-module__fadeIn___0m5GW",sc="LightBox-module__slideInLeft___gPYwC",lc="LightBox-module__slideInRight___S-pPp",cc="LightBox-module__slideInTop___DFdAj",dc="LightBox-module__slideInBottom___m27kZ",uc="LightBox-module__fadeOut___55qBR",pc="LightBox-module__slideOutLeft___NvU7P",mc="LightBox-module__slideOutRight___SK7eC",gc="LightBox-module__slideOutTop___Vgg0z",hc="LightBox-module__slideOutBottom___nJ0Ef",fc="LightBox-module__scaleSlide___vZriG",Z={hidden:kl,heroImage:Wl,background:Ml,editor:Fl,contentStyle:Nl,imageStyle:Hl,imgWrapper:Bl,contain:Ol,cover:Vl,caption:Dl,captionTextInner:jl,lightboxSplide:zl,arrow:Kl,arrowVertical:Ul,nextArrow:ql,arrowInner:Gl,arrowIcon:Yl,arrowImg:Xl,mirror:Zl,thumbsWrapper:Jl,thumbsContainerVertical:Ql,thumbsContainer:ec,thumbsAlignStart:tc,thumbsAlignCenter:nc,thumbsAlignEnd:rc,thumbItem:ic,closeButton:oc,fadeIn:ac,slideInLeft:sc,slideInRight:lc,slideInTop:cc,slideInBottom:dc,fadeOut:uc,slideOutLeft:pc,slideOutRight:mc,slideOutTop:gc,slideOutBottom:hc,scaleSlide:fc},Qn=(e,t,n)=>{const r={},[i,a]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="bottom"&&(r.top="auto",r.bottom="0"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),i==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), ${w.scalingValue(t.y,n)})`:r.transform=`translate(${w.scalingValue(t.x,n)}, ${w.scalingValue(t.y,n)})`,r};function oa(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 Zi(e){const t=e.getBoundingClientRect(),n=oa(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,s=e.naturalHeight,c=r/i,o=a/s;let d,p;o>c?(d=r,p=r/o):(p=i,d=i*o);const T=t.left+n.left,x=t.top+n.top,y=(r-d)/2+T,g=(i-p)/2+x;return{x:y,y:g,width:d,height:p}}function Ji(e){const t=e.getBoundingClientRect(),n=oa(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Qi(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function yc(e,t){const n=(()=>{if(e==="fade in")return Z.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return Z.fadeIn;if(e==="slide in")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Z.fadeOut;if(e==="slide in")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})(),a=(()=>{if(e==="fade in")return Z.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:a}}const vc=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:a,isPreviewMode:s})=>{const[c,o]=u.useState(!1),{url:d}=e.thumbnailBlock.cover;return u.useEffect(()=>{i==="close"&&o(!1),i==="open"&&o(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:d,alt:"Cover",className:Z.heroImage,onClick:()=>o(!0)}),l.jsx(bc,{isOpen:c,onClose:()=>o(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},bc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:a,isEditor:s,metadata:c})=>{var N;const[o,d]=u.useState(0),[p,T]=u.useState(0),[x,y]=u.useState(!1),[g,h]=u.useState(!1),[P,C]=u.useState({}),f=u.useRef(null),b=u.useRef(null),M=u.useRef(null),_=u.useRef(!1),E=u.useRef(null),S=u.useRef(null),A=u.useRef(null),I=u.useRef(null),k=u.useRef(!1),$=u.useRef(null),[O,V]=u.useState(!1),{appear:q,triggers:Y,slider:L,thumbnail:R,controls:B,area:F,caption:W,layout:j}=i.lightboxBlock,{appearClass:Q,backdropAppearClass:oe,backdropDisappearClass:te,disappearClass:ce}=yc(q.type,q.direction),v=(c==null?void 0:c.itemId)??null;u.useEffect(()=>{const m=()=>{setTimeout(()=>{var D,U;(U=(D=f.current)==null?void 0:D.splide)==null||U.refresh()},16)},H=()=>{T(D=>D+1)};return window.addEventListener("ArticleEditor.Layout:change",m),window.addEventListener("ArticleEditor.ComponentContent:change",H),()=>{window.removeEventListener("ArticleEditor.Layout:change",m),window.removeEventListener("ArticleEditor.ComponentContent:change",H)}},[]),u.useEffect(()=>{if(!e||!R.isActive){V(!1);return}const m=$.current;if(!m)return;const H=()=>{L.direction==="horiz"?V(m.scrollWidth>m.clientWidth):V(m.scrollHeight>m.clientHeight)};H();const D=new ResizeObserver(H);return D.observe(m),()=>D.disconnect()},[e,R.isActive,n.length,P,L.direction]);const ie=u.useCallback(()=>{const m=window.matchMedia("(max-width: 768px)").matches,H=Qi(F.color);m&&!s&&H>.9&&(document.body.style.backgroundColor=""),y(!0),_.current=!0;const D=U=>{U.target===E.current&&U.animationName&&(E.current&&S.current&&E.current.removeEventListener("animationend",S.current),S.current=null,_.current&&(_.current=!1,t()),y(!1))};E.current&&(S.current=D,E.current.addEventListener("animationend",D))},[t,F.color,s]),$e=(m,H,D)=>{var U,ne;if(m){if(Y.type==="click"&&Y.switch==="image")Y.repeat==="close"&&o===n.length-1?ie():(U=f.current)==null||U.go("+1");else if(Y.type==="click"&&Y.switch==="50/50"){const ee=m.getBoundingClientRect(),J=H-ee.left,ae=D-ee.top,ge=ee.width,me=ee.height;let he;L.direction==="horiz"?he=J<ge/2?"-1":"+1":he=ae<me/2?"-1":"+1",(ne=f.current)==null||ne.go(he)}}},de=m=>{if(k.current){k.current=!1;return}const H=n[o],D=(H==null?void 0:H.image.objectFit)==="cover";let U,ne;if("changedTouches"in m&&m.changedTouches.length>0)U=m.changedTouches[0].clientX,ne=m.changedTouches[0].clientY;else if("clientX"in m)U=m.clientX,ne=m.clientY;else return;let ee;if(D&&M.current){const J=Ji(M.current);ee=U>=J.left&&U<=J.right&&ne>=J.top&&ne<=J.bottom}else{const J=M.current?Zi(M.current):null;if(!J){m.target===m.currentTarget&&ie();return}ee=U>=J.x&&U<=J.x+J.width&&ne>=J.y&&ne<=J.y+J.height}ee?$e(M.current,U,ne):ie()},ye=m=>{const H=m.target;(H.classList.contains(Z.thumbsWrapper)||H.classList.contains(Z.thumbsContainer))&&de(m)};u.useEffect(()=>{if(!e)return;const m=H=>{var D,U;if(H.key==="Escape"){ie();return}if(H.key==="ArrowRight"){d(ne=>(ne+1)%Math.max(n.length,1)),(D=f.current)==null||D.go("+1");return}H.key==="ArrowLeft"&&(d(ne=>(ne-1+Math.max(n.length,1))%Math.max(n.length,1)),(U=f.current)==null||U.go("-1"))};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[e,ie,n.length]),u.useEffect(()=>{if(e){if(d(0),T(H=>H+1),_.current=!1,y(!1),h(!1),C({}),!v)return;const m=new CustomEvent("page-overlay",{detail:{itemId:v}});window.dispatchEvent(m)}return()=>{E.current&&S.current&&(E.current.removeEventListener("animationend",S.current),S.current=null),h(!1)}},[e,v]),u.useEffect(()=>{b.current!==null&&b.current!==L.type&&T(m=>m+1),b.current=L.type},[L.type]),u.useEffect(()=>{if(!e)return;const m=document.body.style.overflow,H=window.matchMedia("(max-width: 768px)").matches,D=Qi(F.color);document.body.style.overflow="hidden",h(!1);const U=ee=>{ee.target===E.current&&!_.current&&ee.animationName&&(H&&!s&&D>.9&&(document.body.style.backgroundColor=F.color),h(!0),E.current&&A.current&&E.current.removeEventListener("animationend",A.current),A.current=null)};E.current&&(A.current=U,E.current.addEventListener("animationend",U));const ne=ee=>{const J=ee.target;J&&(J.closest(`.${Z.thumbsWrapper}`)||J.closest(`.${Z.thumbsContainer}`))||L.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",ne,{passive:!1}),()=>{document.body.style.overflow=m,document.removeEventListener("touchmove",ne),E.current&&A.current&&(E.current.removeEventListener("animationend",A.current),A.current=null),h(!1)}},[e,s,F.color,L.type]),u.useEffect(()=>{if(!e)return;const m=H=>{var U,ne;if(_.current){H.stopPropagation();return}if(k.current){k.current=!1;return}const D=H.target;if(!(D&&(D.closest(`.${Z.thumbsContainer}`)||D.closest(`.${Z.thumbItem}`)||D.closest(`.${Z.arrow}`)||D.closest(`.${Z.closeButton}`)||D.closest(`.${Z.caption}`)))){if(L.type==="slide"&&Y.type==="drag"&&((ne=(U=f.current)==null?void 0:U.splide)!=null&&ne.root)){const ee=f.current.splide.root;if(D&&(ee.contains(D)||ee===D))return}if(H.touches.length===0&&H.changedTouches.length>0){const ee=n[o],J=(ee==null?void 0:ee.image.objectFit)==="cover",ae=H.changedTouches[0];let ge;if(J&&M.current){const me=Ji(M.current);ge=ae.clientX>=me.left&&ae.clientX<=me.right&&ae.clientY>=me.top&&ae.clientY<=me.bottom}else{const me=M.current?Zi(M.current):null;if(!me)return;ge=ae.clientX>=me.x&&ae.clientX<=me.x+me.width&&ae.clientY>=me.y&&ae.clientY<=me.y+me.height}if(!ge){H.stopPropagation(),_.current=!0;const me=he=>{he.stopPropagation(),he.preventDefault(),document.removeEventListener("click",me,!0)};document.addEventListener("click",me,!0),ie()}}}};return document.addEventListener("touchend",m,{passive:!0}),()=>{document.removeEventListener("touchend",m)}},[e,ie,o,n]);const Re=(L.type==="scale"||L.type==="fade")&&L.direction==="vert"&&Y.type==="drag";u.useEffect(()=>{var he,K;if(!e||!Re||!((K=(he=f.current)==null?void 0:he.splide)!=null&&K.root))return;const m=f.current.splide.root,H=30,D=(G,z)=>{if(I.current){const le=Math.abs(G-I.current.x),we=Math.abs(z-I.current.y);(le>0||we>0)&&(k.current=!0)}},U=G=>{I.current&&(G.preventDefault(),D(G.clientX,G.clientY))},ne=G=>{I.current&&G.touches.length>0&&(G.preventDefault(),D(G.touches[0].clientX,G.touches[0].clientY))},ee=(G,z)=>{if(!I.current||!f.current){I.current=null;return}const le=Math.abs(G-I.current.x),we=Math.abs(z-I.current.y);we>H&&we>le&&f.current.go(z<I.current.y?"+1":"-1"),I.current=null},J=G=>{I.current&&ee(G.clientX,G.clientY),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("pointermove",U)},ae=G=>{if(I.current){if(G.changedTouches.length>0){const z=G.changedTouches[0];ee(z.clientX,z.clientY)}document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae),document.removeEventListener("touchmove",ne)}},ge=G=>{I.current={x:G.clientX,y:G.clientY},k.current=!1,document.addEventListener("pointermove",U,{passive:!1}),document.addEventListener("pointerup",J),document.addEventListener("pointercancel",J)},me=G=>{G.touches.length>0&&(I.current={x:G.touches[0].clientX,y:G.touches[0].clientY},k.current=!1,document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",ae),document.addEventListener("touchcancel",ae))};return m.addEventListener("pointerdown",ge),m.addEventListener("touchstart",me),()=>{m.removeEventListener("pointerdown",ge),m.removeEventListener("touchstart",me),document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae),I.current=null,k.current=!1}},[e,Re,p]);const re={backgroundColor:F.color,backdropFilter:`blur(${F.blur}px)`,animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:So.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:s?null:E,className:Le(Z.background,x?te:oe,{[Z.editor]:s},{[Z.hidden]:!e}),style:{...re,...g&&!s&&!x?{position:"absolute"}:{}}}),l.jsxs("div",{ref:s?E:null,className:Le(Z.contentStyle,x?ce:Q,{[Z.editor]:s},{[Z.hidden]:!e}),style:{animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(wi,{onMove:m=>d(m.index),ref:f,className:Z.lightboxSplide,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,direction:L.direction==="horiz"||L.type==="fade"||L.type==="scale"?"ltr":"ttb",pagination:!1,drag:Y.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:L.type==="fade"||L.type==="scale"?"fade":"loop",padding:0,rewind:Y.repeat!=="close",start:0},style:{"--splide-speed":L.duration},children:n.map((m,H)=>{const D=Qn(j.position,j.offset,s),U=`${w.scalingValue(j.padding.top,s)} ${w.scalingValue(j.padding.right,s)} ${w.scalingValue(j.padding.bottom,s)} ${w.scalingValue(j.padding.left,s)}`,ne=L.type==="scale"?(()=>{const{transform:ee,...J}=D;return{...J,position:"absolute",padding:U,boxSizing:"border-box","--position-transform":ee||"none"}})():{...D,position:"absolute",padding:U,boxSizing:"border-box"};return l.jsx(Ti,{children:l.jsx("div",{className:Z.imgWrapper,onClick:de,children:l.jsx("img",{ref:H===o?M:null,className:Le(Z.imageStyle,{[Z.contain]:m.image.objectFit==="contain",[Z.cover]:m.image.objectFit==="cover",[Z.scaleSlide]:L.type==="scale"}),src:m.image.url,alt:m.image.name??"",style:{...ne,pointerEvents:m.image.objectFit==="contain"?"none":"auto"}})})},H)})},p),B.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Le(Z.arrow,{[Z.arrowVertical]:L.direction==="vert"}),style:{color:B.color,"--arrow-hover-color":B.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(B.offset.x,s)}, ${w.scalingValue(B.offset.y*(L.direction==="horiz"?1:-1),s)}) scale(${B.scale}) rotate(${L.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=f.current)==null?void 0:m.go("-1")},"aria-label":"Previous",children:[B.arrowsImgUrl&&l.jsx(Ht,{url:B.arrowsImgUrl,fill:B.color,hoverFill:B.hover,className:Le(Z.arrowImg,Z.mirror)}),!B.arrowsImgUrl&&l.jsx(eo,{color:B.color,className:Le(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),l.jsx("div",{className:Le(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:L.direction==="vert"}),style:{color:B.color,"--arrow-hover-color":B.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(B.offset.x*(L.direction==="horiz"?-1:1),s)}, ${w.scalingValue(B.offset.y,s)}) scale(${B.scale}) rotate(${L.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=f.current)==null?void 0:m.go("+1")},"aria-label":"Next",children:[B.arrowsImgUrl&&l.jsx(Ht,{url:B.arrowsImgUrl,fill:B.color,hoverFill:B.hover,className:Z.arrowImg}),!B.arrowsImgUrl&&l.jsx(eo,{color:B.color,className:Le(Z.arrowIcon,Z.arrowImg)})]})})]}),F.closeIconUrl&&(()=>{const m=Qn(F.closeIconAlign,F.closeIconOffset,s),H=`scale(${F.closeIconScale})`,D=m.transform?`${m.transform} ${H}`:H;return l.jsx("button",{className:Z.closeButton,style:{...m,transform:D},onClick:ie,"aria-label":"Close lightbox",children:l.jsx(Ht,{url:F.closeIconUrl,fill:F.closeIconColor??"#000000",hoverFill:F.closeIconHover??"#cccccc"})})})(),W&&W.isActive&&r.imageCaption&&((N=n[o])==null?void 0:N.imageCaption)&&(()=>{const{widthSettings:m,fontSettings:H,letterSpacing:D,textAlign:U,wordSpacing:ne,fontSizeLineHeight:ee,textAppearance:J,color:ae}=r.imageCaption;return l.jsx("div",{className:Z.caption,style:{...Qn(W.alignment,W.offset,s),fontFamily:Ar(H.fontFamily),fontWeight:H.fontWeight,fontStyle:H.fontStyle,width:m.sizing==="auto"?"max-content":w.scalingValue(m.width,s),letterSpacing:w.scalingValue(D,s),wordSpacing:w.scalingValue(ne,s),textAlign:U,fontSize:w.scalingValue(ee.fontSize,s),lineHeight:w.scalingValue(ee.lineHeight,s),textTransform:J.textTransform??"none",textDecoration:J.textDecoration??"none",fontVariant:J.fontVariant??"normal",color:ae},onClick:ge=>ge.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-color":W.linkColor,"--link-hover-color":W.linkHoverColor},children:l.jsx(Fn,{content:n[o].imageCaption})})})})(),R.isActive&&(()=>{const[m,H]=R.position.split("-"),D=L.direction==="horiz"?`${m}-left`:R.position,U=Qn(D,R.offset,s),ne=()=>{if(L.direction==="horiz"){if(H==="left")return"flex-start";if(H==="center")return"center";if(H==="right")return"flex-end"}else{if(m==="top")return"flex-start";if(m==="middle")return"center";if(m==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:$,className:Z.thumbsWrapper,onClick:ee=>ye(ee),style:{position:s?"absolute":"fixed",...U,...L.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Le(Z.thumbsContainer,{[Z.thumbsContainerVertical]:L.direction==="vert",[Z.thumbsAlignStart]:R.align==="start",[Z.thumbsAlignCenter]:R.align==="center",[Z.thumbsAlignEnd]:R.align==="end"}),style:{gap:w.scalingValue(R.grid.gap,s),justifyContent:O?"flex-start":ne()},children:n.map((ee,J)=>{const ae=J===o,ge=P[J],he=R.grid.size*(ae?R.activeState.scale:1),K=()=>{if(R.fit!=="fit")return{};if(!ge)return L.direction==="horiz"?{height:w.scalingValue(he,s)}:{width:w.scalingValue(he,s)};const G=ge.width/ge.height;if(L.direction==="horiz"){const z=he,le=z*G;return{width:w.scalingValue(le,s),height:w.scalingValue(z,s)}}else{const z=he,le=z/G;return{width:w.scalingValue(z,s),height:w.scalingValue(le,s)}}};return l.jsx("button",{className:Z.thumbItem,style:{...L.direction==="horiz"&&R.fit!=="fit"?{height:w.scalingValue(he,s)}:{},...L.direction==="vert"&&R.fit!=="fit"?{width:w.scalingValue(he,s)}:{},...R.fit==="cover"?{width:w.scalingValue(he,s),height:w.scalingValue(he,s)}:{},...K(),transition:ae?"all 0.25s ease-out":"none",opacity:ae?R.activeState.opacity/100:R.opacity/100,"--thumb-hover":R.activeState.opacity/100},onClick:G=>{var z;G.stopPropagation(),d(J),(z=f.current)==null||z.go(J)},onMouseEnter:()=>{var G;R.triggers==="hov"&&((G=f.current)==null||G.go(J))},children:l.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:G=>{const z=G.currentTarget;z.naturalWidth&&z.naturalHeight&&C(le=>({...le,[J]:{width:z.naturalWidth,height:z.naturalHeight}}))},style:{objectFit:R.fit==="cover"?"cover":"contain",...R.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...R.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${J}`)})})})})()]})]}),document.getElementById(a))};function eo({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const xc={element:vc,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},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 er(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cc(e){return`
6
+ */const fl="RichTextRenderer-module__link___BWeZ2",yl={link:fl},vl=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},Ar=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>vl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Ct(e){const{color:t,...n}=e;return n}function nt(e,t){var i,a,s;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Ar(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:w.scalingValue(e.letterSpacing,t),wordSpacing:w.scalingValue(e.wordSpacing,t),fontSize:w.scalingValue(n,t),lineHeight:r!==void 0?w.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(a=e.textAppearance)==null?void 0:a.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const Nn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?l.jsx("a",{className:yl.link,href:r.value,target:r.target,children:t(r.children)},i):l.jsx("span",{style:bl(r),children:r.text},i));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const i=n.children;return l.jsx("div",{children:t(i)},r)})})};function bl(e){return{...e.fontFamily&&{fontFamily:Ar(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 xl="SvgImage-module__svg___q3xE-",Cl="SvgImage-module__img___VsTm-",Gi={svg:xl,img:Cl},Sl=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},$l=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ht=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[a,s]=u.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return u.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(c)}},[]),!Sl(e)||!a?l.jsx("img",{src:e,alt:"",className:Le(Gi.img,r),style:i}):l.jsx("span",{"data-supports-mask":a,className:Le(Gi.svg,r),style:{"--svg":$l(e),"--fill":t,"--hover-fill":n,...i??{}}})},wl={"top-left":se.topLeftAlignment,"top-center":se.topCenterAlignment,"top-right":se.topRightAlignment,"middle-left":se.middleLeftAlignment,"middle-center":se.middleCenterAlignment,"middle-right":se.middleRightAlignment,"bottom-left":se.bottomLeftAlignment,"bottom-center":se.bottomCenterAlignment,"bottom-right":se.bottomRightAlignment};function Tl({settings:e,content:t,styles:n,isEditor:r}){const[i,a]=u.useState(null),{widthSettings:s,fontSettings:c,letterSpacing:o,textAlign:d,wordSpacing:p,fontSizeLineHeight:T,textAppearance:b,color:y}=n.imageCaption,[g,h]=u.useState(void 0),[P,x]=u.useState(null),[f,C]=u.useState(0),[B,_]=u.useState(0),{direction:E,transition:S,controls:A,pagination:k,imageCaption:I,triggers:$}=e,O=u.useRef(S.type),{x:V,y:q}=e.controls.offset,X=L=>{i&&i.go(L)};return u.useEffect(()=>{if(!P)return;const L=new ResizeObserver(R=>{if(!i)return;const[H]=R;h({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return L.observe(P),()=>L.unobserve(P)},[P]),u.useEffect(()=>{!i||O.current===S.type||(_(L=>L+1),O.current=S.type)},[S.type]),l.jsx("div",{className:Le(se.wrapper,{[se.editor]:r}),ref:x,children:l.jsxs("div",{className:se.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:S.backgroundColor&&S.type==="fade in"?S.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Le(se.captionBlock),children:l.jsx("div",{className:se.captionTextWrapper,children:t.map((L,R)=>l.jsx("div",{className:Le(se.captionText,wl[I.alignment],{[se.withPointerEvents]:R===f&&r,[se.active]:R===f}),style:{fontFamily:Ar(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:s.sizing==="auto"?"max-content":w.scalingValue(s.width,r),letterSpacing:w.scalingValue(o,r),wordSpacing:w.scalingValue(p,r),textAlign:d,fontSize:w.scalingValue(T.fontSize,r),lineHeight:w.scalingValue(T.lineHeight,r),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:y,transitionDuration:S.duration?`${Math.round(parseInt(S.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:se.captionTextInner,style:{"--link-hover-color":I.linkHoverColor,"--link-color":I.linkColor,position:"relative",top:w.scalingValue(I.offset.y,r),left:w.scalingValue(I.offset.x,r)},children:l.jsx(Nn,{content:L.imageCaption})})},R))})}),l.jsx(wi,{onMove:L=>{C(L.index)},ref:a,options:{arrows:!1,speed:S.duration?parseInt(S.duration):500,autoplay:$.autoPlay!==null,...$.autoPlay!==null&&{interval:parseInt($.autoPlay)*1e3},direction:E==="horiz"||S.type==="fade in"?"ltr":"ttb",pagination:!1,drag:$.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:S.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((L,R)=>l.jsx(Ti,{children:l.jsx("div",{className:se.sliderItem,children:l.jsx("div",{className:se.imgWrapper,children:l.jsx("img",{className:Le(se.sliderImage,{[se.contain]:L.image.objectFit==="contain",[se.cover]:L.image.objectFit==="cover"}),src:L.image.url,alt:L.image.name??""})})})},R))},B),A.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Le(se.arrow,{[se.arrowVertical]:E==="vert",[se.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:l.jsxs("button",{onClick:()=>{X("-1")},className:se.arrowInner,style:{transform:`translate(${w.scalingValue(V,r)}, ${w.scalingValue(q*(E==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&l.jsx(Ht,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:Le(se.arrowImg,se.mirror)}),!A.arrowsImgUrl&&l.jsx(Yi,{color:A.color,className:Le(se.arrowIcon,se.arrowImg,se.mirror)})]})}),l.jsx("div",{className:Le(se.arrow,se.nextArrow,{[se.arrowVertical]:E==="vert",[se.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:l.jsxs("button",{className:se.arrowInner,onClick:()=>X("+1"),style:{transform:`translate(${w.scalingValue(V*(E==="horiz"?-1:1),r)}, ${w.scalingValue(q,r)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&l.jsx(Ht,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:se.arrowImg}),!A.arrowsImgUrl&&l.jsx(Yi,{color:A.color,className:Le(se.arrowIcon,se.arrowImg)})]})})]}),$.triggersList.click&&l.jsx("div",{className:se.clickOverlay,onClick:()=>{i&&i.go("+1")}}),k.isActive&&l.jsx("div",{className:Le(se.pagination,{[se.paginationInsideBottom]:k.position==="inside-1"&&E==="horiz",[se.paginationInsideTop]:k.position==="inside-2"&&E==="horiz",[se.paginationOutsideBottom]:k.position==="outside-1"&&E==="horiz",[se.paginationOutsideTop]:k.position==="outside-2"&&E==="horiz",[se.paginationInsideLeft]:k.position==="inside-1"&&E==="vert",[se.paginationInsideRight]:k.position==="inside-2"&&E==="vert",[se.paginationOutsideLeft]:k.position==="outside-1"&&E==="vert",[se.paginationOutsideRight]:k.position==="outside-2"&&E==="vert",[se.paginationVertical]:E==="vert"}),children:l.jsx("div",{className:se.paginationInner,style:{backgroundColor:k.colors[2],transform:`scale(${k.scale/100}) translate(${w.scalingValue(k.offset.x,r)}, ${w.scalingValue(k.offset.y,r)}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:t.map((L,R)=>l.jsx("button",{onClick:()=>{i&&i.go(R)},className:Le(se.paginationItem),children:l.jsx("div",{className:Le(se.dot,{[se.activeDot]:R===f}),style:{backgroundColor:R===f?k.colors[0]:k.colors[1],"--pagination-hover-color":k.hover}})},R))})})]})})}function Yi({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ll={element:Tl,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},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:"inside-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"]}},El="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Pl="ImageRevealSlider-module__image___Qjt-e",_l="ImageRevealSlider-module__link___N-iLG",Al="ImageRevealSlider-module__cursor___2U03d",sn={imageRevealSlider:El,image:Pl,link:_l,cursor:Al};function Xi(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const a=r.width?Number.parseFloat(r.width):i.naturalWidth,s=i.naturalHeight/i.naturalWidth*a,c=a/2,o=s/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-o&&t<=r.y+o)return!0}return!1}function Br(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Rl(e,t,n,r){let i,a;if(t==="custom"){i=n;const s=await Br(e);a=s.height/s.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const s=await Br(e);a=s.height/s.width*i}else{const s=await Br(e);i=s.width,a=s.height}return{width:i,height:a,finalWidth:`${i}px`}}function kl({settings:e,content:t,isEditor:n}){const[r,i]=u.useState(null),[a,s]=u.useState([]),[c,o]=u.useState(0),d=u.useRef(0),[p,T]=u.useState({x:0,y:0}),[b,y]=u.useState(1),[g,h]=u.useState("none"),P=u.useRef({x:0,y:0}),[x,f]=u.useState(!1),{sizeType:C,imageWidth:B,randomRangeImageWidth:_}=e.imageSize,{revealPosition:E,visible:S}=e.position,{cursorType:A,target:k,defaultCursorScale:I,defaultCursor:$,hoverCursorScale:O,hoverCursor:V}=e.cursor;u.useEffect(()=>{if(!r)return;const L=(M,W)=>{const j=r.getBoundingClientRect(),Q=M-j.left,oe=W-j.top;if(T({x:Q,y:oe}),A==="system"){h("none"),y(1);return}const te=Q,ce=oe,v=document.elementFromPoint(j.left+te,j.top+ce);if(v&&v.closest("a")){h("none"),y(1);return}const ie=Xi(te,ce,a)||k==="area"?{img:V??"none",scale:O}:{img:$??"none",scale:I};h(ie.img),y(ie.scale)},R=M=>{M.stopPropagation(),P.current={x:M.clientX,y:M.clientY},L(M.clientX,M.clientY)},H=()=>{x&&L(P.current.x,P.current.y)};return r.addEventListener("mousemove",R),window.addEventListener("scroll",H,!0),()=>{r.removeEventListener("mousemove",R),window.removeEventListener("scroll",H,!0)}},[r,x,p,A,k,V,$,O,I,a]),u.useEffect(()=>{x||(h("none"),y(0))},[x]);const q=async(L,R,H,M={})=>{const{width:W,height:j,finalWidth:Q}=await Rl(L.image.url,C,B,_);let oe=0,te=0;E==="same"?(oe=R/2,te=H/2):(oe=M.x??Math.random()*R,te=M.y??Math.random()*H);const ce=Math.min(Math.max(oe,W/2),R-W/2),v=Math.min(Math.max(te,j/2),H-j/2);return{id:d.current++,url:L.image.url,link:L.link,name:L.image.name,x:ce,y:v,width:Q}};u.useEffect(()=>{if(!r||t.length===0)return;const L=r.getBoundingClientRect(),R=L.width,H=L.height,M=[];(async()=>{const j=t[0],Q=await q(j,R,H);M.push(Q),s(M),o(1)})()},[C,B,_,E,r]),u.useEffect(()=>{S==="last One"&&s(L=>L.length>0?[L[L.length-1]]:[])},[S]);const X=async L=>{if(!r)return;const R=r.getBoundingClientRect(),H=L.clientX-R.left,M=L.clientY-R.top;if(k==="image"&&!Xi(H,M,a))return;let W=0,j=0;E==="on Click"?(W=H,j=M):E==="same"?(W=R.width/2,j=R.height/2):(W=Math.random()*R.width,j=Math.random()*R.height);const Q=t[c],oe=await q(Q,R.width,R.height,{x:W,y:j});s(te=>S==="all"?[...te,oe]:[oe]),o(te=>te>=t.length-1?0:te+1)};return l.jsxs("div",{ref:i,onClick:X,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:sn.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[a.map(L=>l.jsx("div",{className:sn.wrapper,style:{top:`${L.y}px`,left:`${L.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:L.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:k==="area"&&L.link?l.jsx("a",{href:L.link,target:"_blank",className:sn.link,children:l.jsx("img",{src:L.url,alt:L.name,className:sn.image},L.id)}):l.jsx("img",{src:L.url,alt:L.name,className:sn.image},L.id)},L.id)),x&&l.jsx("div",{className:sn.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Il={element:kl,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{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:""}]}}}},Wl="LightBox-module__hidden___9s-9x",Ml="LightBox-module__heroImage___sTxNF",Fl="LightBox-module__background___rm9ml",Nl="LightBox-module__editor___4ACaY",Hl="LightBox-module__contentStyle___Bgnsq",Bl="LightBox-module__imageStyle___tLIlB",Ol="LightBox-module__imgWrapper___LuFUp",Vl="LightBox-module__contain___8-yaS",Dl="LightBox-module__cover___hNvOG",jl="LightBox-module__caption___b6L2I",zl="LightBox-module__captionTextInner___rCGNH",Kl="LightBox-module__lightboxSplide___XFuWC",Ul="LightBox-module__arrow___iz38X",ql="LightBox-module__arrowVertical___Zfz81",Gl="LightBox-module__nextArrow___zkAQN",Yl="LightBox-module__arrowInner___p48sW",Xl="LightBox-module__arrowIcon___3VaFf",Zl="LightBox-module__arrowImg___pNV88",Jl="LightBox-module__mirror___pjeXc",Ql="LightBox-module__thumbsWrapper___GB-nU",ec="LightBox-module__thumbsContainerVertical___wttk5",tc="LightBox-module__thumbsContainer___osSma",nc="LightBox-module__thumbsAlignStart___MO6tY",rc="LightBox-module__thumbsAlignCenter___Q4sUx",ic="LightBox-module__thumbsAlignEnd___p4y9R",oc="LightBox-module__thumbItem___HvnF3",ac="LightBox-module__closeButton___g2khP",sc="LightBox-module__fadeIn___0m5GW",lc="LightBox-module__slideInLeft___gPYwC",cc="LightBox-module__slideInRight___S-pPp",dc="LightBox-module__slideInTop___DFdAj",uc="LightBox-module__slideInBottom___m27kZ",pc="LightBox-module__fadeOut___55qBR",mc="LightBox-module__slideOutLeft___NvU7P",gc="LightBox-module__slideOutRight___SK7eC",hc="LightBox-module__slideOutTop___Vgg0z",fc="LightBox-module__slideOutBottom___nJ0Ef",yc="LightBox-module__scaleSlide___vZriG",Z={hidden:Wl,heroImage:Ml,background:Fl,editor:Nl,contentStyle:Hl,imageStyle:Bl,imgWrapper:Ol,contain:Vl,cover:Dl,caption:jl,captionTextInner:zl,lightboxSplide:Kl,arrow:Ul,arrowVertical:ql,nextArrow:Gl,arrowInner:Yl,arrowIcon:Xl,arrowImg:Zl,mirror:Jl,thumbsWrapper:Ql,thumbsContainerVertical:ec,thumbsContainer:tc,thumbsAlignStart:nc,thumbsAlignCenter:rc,thumbsAlignEnd:ic,thumbItem:oc,closeButton:ac,fadeIn:sc,slideInLeft:lc,slideInRight:cc,slideInTop:dc,slideInBottom:uc,fadeOut:pc,slideOutLeft:mc,slideOutRight:gc,slideOutTop:hc,slideOutBottom:fc,scaleSlide:yc},er=(e,t,n)=>{const r={},[i,a]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="bottom"&&(r.top="auto",r.bottom="0"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),i==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), ${w.scalingValue(t.y,n)})`:r.transform=`translate(${w.scalingValue(t.x,n)}, ${w.scalingValue(t.y,n)})`,r};function oa(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 Zi(e){const t=e.getBoundingClientRect(),n=oa(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,s=e.naturalHeight,c=r/i,o=a/s;let d,p;o>c?(d=r,p=r/o):(p=i,d=i*o);const T=t.left+n.left,b=t.top+n.top,y=(r-d)/2+T,g=(i-p)/2+b;return{x:y,y:g,width:d,height:p}}function Ji(e){const t=e.getBoundingClientRect(),n=oa(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Qi(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function vc(e,t){const n=(()=>{if(e==="fade in")return Z.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return Z.fadeIn;if(e==="slide in")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Z.fadeOut;if(e==="slide in")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})(),a=(()=>{if(e==="fade in")return Z.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:a}}const bc=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:a,isPreviewMode:s})=>{const[c,o]=u.useState(!1),{url:d}=e.thumbnailBlock.cover;return u.useEffect(()=>{i==="close"&&o(!1),i==="open"&&o(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:d,alt:"Cover",className:Z.heroImage,onClick:()=>o(!0)}),l.jsx(xc,{isOpen:c,onClose:()=>o(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},xc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:a,isEditor:s,metadata:c})=>{var F;const[o,d]=u.useState(0),[p,T]=u.useState(0),[b,y]=u.useState(!1),[g,h]=u.useState(!1),[P,x]=u.useState({}),f=u.useRef(null),C=u.useRef(null),B=u.useRef(null),_=u.useRef(!1),E=u.useRef(null),S=u.useRef(null),A=u.useRef(null),k=u.useRef(null),I=u.useRef(!1),$=u.useRef(null),[O,V]=u.useState(!1),{appear:q,triggers:X,slider:L,thumbnail:R,controls:H,area:M,caption:W,layout:j}=i.lightboxBlock,{appearClass:Q,backdropAppearClass:oe,backdropDisappearClass:te,disappearClass:ce}=vc(q.type,q.direction),v=(c==null?void 0:c.itemId)??null;u.useEffect(()=>{const m=()=>{setTimeout(()=>{var D,U;(U=(D=f.current)==null?void 0:D.splide)==null||U.refresh()},16)},N=()=>{T(D=>D+1)};return window.addEventListener("ArticleEditor.Layout:change",m),window.addEventListener("ArticleEditor.ComponentContent:change",N),()=>{window.removeEventListener("ArticleEditor.Layout:change",m),window.removeEventListener("ArticleEditor.ComponentContent:change",N)}},[]),u.useEffect(()=>{if(!e||!R.isActive){V(!1);return}const m=$.current;if(!m)return;const N=()=>{L.direction==="horiz"?V(m.scrollWidth>m.clientWidth):V(m.scrollHeight>m.clientHeight)};N();const D=new ResizeObserver(N);return D.observe(m),()=>D.disconnect()},[e,R.isActive,n.length,P,L.direction]);const ie=u.useCallback(()=>{const m=window.matchMedia("(max-width: 768px)").matches,N=Qi(M.color);m&&!s&&N>.9&&(document.body.style.backgroundColor=""),y(!0),_.current=!0;const D=U=>{U.target===E.current&&U.animationName&&(E.current&&S.current&&E.current.removeEventListener("animationend",S.current),S.current=null,_.current&&(_.current=!1,t()),y(!1))};E.current&&(S.current=D,E.current.addEventListener("animationend",D))},[t,M.color,s]),$e=(m,N,D)=>{var U,ne;if(m){if(X.type==="click"&&X.switch==="image")X.repeat==="close"&&o===n.length-1?ie():(U=f.current)==null||U.go("+1");else if(X.type==="click"&&X.switch==="50/50"){const ee=m.getBoundingClientRect(),J=N-ee.left,ae=D-ee.top,ge=ee.width,me=ee.height;let he;L.direction==="horiz"?he=J<ge/2?"-1":"+1":he=ae<me/2?"-1":"+1",(ne=f.current)==null||ne.go(he)}}},de=m=>{if(I.current){I.current=!1;return}const N=n[o],D=(N==null?void 0:N.image.objectFit)==="cover";let U,ne;if("changedTouches"in m&&m.changedTouches.length>0)U=m.changedTouches[0].clientX,ne=m.changedTouches[0].clientY;else if("clientX"in m)U=m.clientX,ne=m.clientY;else return;let ee;if(D&&B.current){const J=Ji(B.current);ee=U>=J.left&&U<=J.right&&ne>=J.top&&ne<=J.bottom}else{const J=B.current?Zi(B.current):null;if(!J){m.target===m.currentTarget&&ie();return}ee=U>=J.x&&U<=J.x+J.width&&ne>=J.y&&ne<=J.y+J.height}ee?$e(B.current,U,ne):ie()},ye=m=>{const N=m.target;(N.classList.contains(Z.thumbsWrapper)||N.classList.contains(Z.thumbsContainer))&&de(m)};u.useEffect(()=>{if(!e)return;const m=N=>{var D,U;if(N.key==="Escape"){ie();return}if(N.key==="ArrowRight"){d(ne=>(ne+1)%Math.max(n.length,1)),(D=f.current)==null||D.go("+1");return}N.key==="ArrowLeft"&&(d(ne=>(ne-1+Math.max(n.length,1))%Math.max(n.length,1)),(U=f.current)==null||U.go("-1"))};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[e,ie,n.length]),u.useEffect(()=>{if(e){if(d(0),T(N=>N+1),_.current=!1,y(!1),h(!1),x({}),!v)return;const m=new CustomEvent("page-overlay",{detail:{itemId:v}});window.dispatchEvent(m)}return()=>{E.current&&S.current&&(E.current.removeEventListener("animationend",S.current),S.current=null),h(!1)}},[e,v]),u.useEffect(()=>{C.current!==null&&C.current!==L.type&&T(m=>m+1),C.current=L.type},[L.type]),u.useEffect(()=>{if(!e)return;const m=document.body.style.overflow,N=window.matchMedia("(max-width: 768px)").matches,D=Qi(M.color);document.body.style.overflow="hidden",h(!1);const U=ee=>{ee.target===E.current&&!_.current&&ee.animationName&&(N&&!s&&D>.9&&(document.body.style.backgroundColor=M.color),h(!0),E.current&&A.current&&E.current.removeEventListener("animationend",A.current),A.current=null)};E.current&&(A.current=U,E.current.addEventListener("animationend",U));const ne=ee=>{const J=ee.target;J&&(J.closest(`.${Z.thumbsWrapper}`)||J.closest(`.${Z.thumbsContainer}`))||L.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",ne,{passive:!1}),()=>{document.body.style.overflow=m,document.removeEventListener("touchmove",ne),E.current&&A.current&&(E.current.removeEventListener("animationend",A.current),A.current=null),h(!1)}},[e,s,M.color,L.type]),u.useEffect(()=>{if(!e)return;const m=N=>{var U,ne;if(_.current){N.stopPropagation();return}if(I.current){I.current=!1;return}const D=N.target;if(!(D&&(D.closest(`.${Z.thumbsContainer}`)||D.closest(`.${Z.thumbItem}`)||D.closest(`.${Z.arrow}`)||D.closest(`.${Z.closeButton}`)||D.closest(`.${Z.caption}`)))){if(L.type==="slide"&&X.type==="drag"&&((ne=(U=f.current)==null?void 0:U.splide)!=null&&ne.root)){const ee=f.current.splide.root;if(D&&(ee.contains(D)||ee===D))return}if(N.touches.length===0&&N.changedTouches.length>0){const ee=n[o],J=(ee==null?void 0:ee.image.objectFit)==="cover",ae=N.changedTouches[0];let ge;if(J&&B.current){const me=Ji(B.current);ge=ae.clientX>=me.left&&ae.clientX<=me.right&&ae.clientY>=me.top&&ae.clientY<=me.bottom}else{const me=B.current?Zi(B.current):null;if(!me)return;ge=ae.clientX>=me.x&&ae.clientX<=me.x+me.width&&ae.clientY>=me.y&&ae.clientY<=me.y+me.height}if(!ge){N.stopPropagation(),_.current=!0;const me=he=>{he.stopPropagation(),he.preventDefault(),document.removeEventListener("click",me,!0)};document.addEventListener("click",me,!0),ie()}}}};return document.addEventListener("touchend",m,{passive:!0}),()=>{document.removeEventListener("touchend",m)}},[e,ie,o,n]);const Re=(L.type==="scale"||L.type==="fade")&&L.direction==="vert"&&X.type==="drag";u.useEffect(()=>{var he,K;if(!e||!Re||!((K=(he=f.current)==null?void 0:he.splide)!=null&&K.root))return;const m=f.current.splide.root,N=30,D=(Y,z)=>{if(k.current){const le=Math.abs(Y-k.current.x),we=Math.abs(z-k.current.y);(le>0||we>0)&&(I.current=!0)}},U=Y=>{k.current&&(Y.preventDefault(),D(Y.clientX,Y.clientY))},ne=Y=>{k.current&&Y.touches.length>0&&(Y.preventDefault(),D(Y.touches[0].clientX,Y.touches[0].clientY))},ee=(Y,z)=>{if(!k.current||!f.current){k.current=null;return}const le=Math.abs(Y-k.current.x),we=Math.abs(z-k.current.y);we>N&&we>le&&f.current.go(z<k.current.y?"+1":"-1"),k.current=null},J=Y=>{k.current&&ee(Y.clientX,Y.clientY),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("pointermove",U)},ae=Y=>{if(k.current){if(Y.changedTouches.length>0){const z=Y.changedTouches[0];ee(z.clientX,z.clientY)}document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae),document.removeEventListener("touchmove",ne)}},ge=Y=>{k.current={x:Y.clientX,y:Y.clientY},I.current=!1,document.addEventListener("pointermove",U,{passive:!1}),document.addEventListener("pointerup",J),document.addEventListener("pointercancel",J)},me=Y=>{Y.touches.length>0&&(k.current={x:Y.touches[0].clientX,y:Y.touches[0].clientY},I.current=!1,document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",ae),document.addEventListener("touchcancel",ae))};return m.addEventListener("pointerdown",ge),m.addEventListener("touchstart",me),()=>{m.removeEventListener("pointerdown",ge),m.removeEventListener("touchstart",me),document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae),k.current=null,I.current=!1}},[e,Re,p]);const re={backgroundColor:M.color,backdropFilter:`blur(${M.blur}px)`,animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:So.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:s?null:E,className:Le(Z.background,b?te:oe,{[Z.editor]:s},{[Z.hidden]:!e}),style:{...re,...g&&!s&&!b?{position:"absolute"}:{}}}),l.jsxs("div",{ref:s?E:null,className:Le(Z.contentStyle,b?ce:Q,{[Z.editor]:s},{[Z.hidden]:!e}),style:{animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(wi,{onMove:m=>d(m.index),ref:f,className:Z.lightboxSplide,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,direction:L.direction==="horiz"||L.type==="fade"||L.type==="scale"?"ltr":"ttb",pagination:!1,drag:X.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:L.type==="fade"||L.type==="scale"?"fade":"loop",padding:0,rewind:X.repeat!=="close",start:0},style:{"--splide-speed":L.duration},children:n.map((m,N)=>{const D=er(j.position,j.offset,s),U=`${w.scalingValue(j.padding.top,s)} ${w.scalingValue(j.padding.right,s)} ${w.scalingValue(j.padding.bottom,s)} ${w.scalingValue(j.padding.left,s)}`,ne=L.type==="scale"?(()=>{const{transform:ee,...J}=D;return{...J,position:"absolute",padding:U,boxSizing:"border-box","--position-transform":ee||"none"}})():{...D,position:"absolute",padding:U,boxSizing:"border-box"};return l.jsx(Ti,{children:l.jsx("div",{className:Z.imgWrapper,onClick:de,children:l.jsx("img",{ref:N===o?B:null,className:Le(Z.imageStyle,{[Z.contain]:m.image.objectFit==="contain",[Z.cover]:m.image.objectFit==="cover",[Z.scaleSlide]:L.type==="scale"}),src:m.image.url,alt:m.image.name??"",style:{...ne,pointerEvents:m.image.objectFit==="contain"?"none":"auto"}})})},N)})},p),H.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Le(Z.arrow,{[Z.arrowVertical]:L.direction==="vert"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(H.offset.x,s)}, ${w.scalingValue(H.offset.y*(L.direction==="horiz"?1:-1),s)}) scale(${H.scale}) rotate(${L.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=f.current)==null?void 0:m.go("-1")},"aria-label":"Previous",children:[H.arrowsImgUrl&&l.jsx(Ht,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:Le(Z.arrowImg,Z.mirror)}),!H.arrowsImgUrl&&l.jsx(eo,{color:H.color,className:Le(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),l.jsx("div",{className:Le(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:L.direction==="vert"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(H.offset.x*(L.direction==="horiz"?-1:1),s)}, ${w.scalingValue(H.offset.y,s)}) scale(${H.scale}) rotate(${L.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=f.current)==null?void 0:m.go("+1")},"aria-label":"Next",children:[H.arrowsImgUrl&&l.jsx(Ht,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:Z.arrowImg}),!H.arrowsImgUrl&&l.jsx(eo,{color:H.color,className:Le(Z.arrowIcon,Z.arrowImg)})]})})]}),M.closeIconUrl&&(()=>{const m=er(M.closeIconAlign,M.closeIconOffset,s),N=`scale(${M.closeIconScale})`,D=m.transform?`${m.transform} ${N}`:N;return l.jsx("button",{className:Z.closeButton,style:{...m,transform:D},onClick:ie,"aria-label":"Close lightbox",children:l.jsx(Ht,{url:M.closeIconUrl,fill:M.closeIconColor??"#000000",hoverFill:M.closeIconHover??"#cccccc"})})})(),W&&W.isActive&&r.imageCaption&&((F=n[o])==null?void 0:F.imageCaption)&&(()=>{const{widthSettings:m,fontSettings:N,letterSpacing:D,textAlign:U,wordSpacing:ne,fontSizeLineHeight:ee,textAppearance:J,color:ae}=r.imageCaption;return l.jsx("div",{className:Z.caption,style:{...er(W.alignment,W.offset,s),fontFamily:Ar(N.fontFamily),fontWeight:N.fontWeight,fontStyle:N.fontStyle,width:m.sizing==="auto"?"max-content":w.scalingValue(m.width,s),letterSpacing:w.scalingValue(D,s),wordSpacing:w.scalingValue(ne,s),textAlign:U,fontSize:w.scalingValue(ee.fontSize,s),lineHeight:w.scalingValue(ee.lineHeight,s),textTransform:J.textTransform??"none",textDecoration:J.textDecoration??"none",fontVariant:J.fontVariant??"normal",color:ae},onClick:ge=>ge.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-color":W.linkColor,"--link-hover-color":W.linkHoverColor},children:l.jsx(Nn,{content:n[o].imageCaption})})})})(),R.isActive&&(()=>{const[m,N]=R.position.split("-"),D=L.direction==="horiz"?`${m}-left`:R.position,U=er(D,R.offset,s),ne=()=>{if(L.direction==="horiz"){if(N==="left")return"flex-start";if(N==="center")return"center";if(N==="right")return"flex-end"}else{if(m==="top")return"flex-start";if(m==="middle")return"center";if(m==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:$,className:Z.thumbsWrapper,onClick:ee=>ye(ee),style:{position:s?"absolute":"fixed",...U,...L.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Le(Z.thumbsContainer,{[Z.thumbsContainerVertical]:L.direction==="vert",[Z.thumbsAlignStart]:R.align==="start",[Z.thumbsAlignCenter]:R.align==="center",[Z.thumbsAlignEnd]:R.align==="end"}),style:{gap:w.scalingValue(R.grid.gap,s),justifyContent:O?"flex-start":ne()},children:n.map((ee,J)=>{const ae=J===o,ge=P[J],he=R.grid.size*(ae?R.activeState.scale:1),K=()=>{if(R.fit!=="fit")return{};if(!ge)return L.direction==="horiz"?{height:w.scalingValue(he,s)}:{width:w.scalingValue(he,s)};const Y=ge.width/ge.height;if(L.direction==="horiz"){const z=he,le=z*Y;return{width:w.scalingValue(le,s),height:w.scalingValue(z,s)}}else{const z=he,le=z/Y;return{width:w.scalingValue(z,s),height:w.scalingValue(le,s)}}};return l.jsx("button",{className:Z.thumbItem,style:{...L.direction==="horiz"&&R.fit!=="fit"?{height:w.scalingValue(he,s)}:{},...L.direction==="vert"&&R.fit!=="fit"?{width:w.scalingValue(he,s)}:{},...R.fit==="cover"?{width:w.scalingValue(he,s),height:w.scalingValue(he,s)}:{},...K(),transition:ae?"all 0.25s ease-out":"none",opacity:ae?R.activeState.opacity/100:R.opacity/100,"--thumb-hover":R.activeState.opacity/100},onClick:Y=>{var z;Y.stopPropagation(),d(J),(z=f.current)==null||z.go(J)},onMouseEnter:()=>{var Y;R.triggers==="hov"&&((Y=f.current)==null||Y.go(J))},children:l.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:Y=>{const z=Y.currentTarget;z.naturalWidth&&z.naturalHeight&&x(le=>({...le,[J]:{width:z.naturalWidth,height:z.naturalHeight}}))},style:{objectFit:R.fit==="cover"?"cover":"contain",...R.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...R.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${J}`)})})})})()]})]}),document.getElementById(a))};function eo({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Cc={element:bc,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},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 tr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sc(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${er(48)};
11
+ min-height: ${tr(48)};
12
12
  }
13
13
  .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
14
  .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${e}-field-group.${e}-labeled {
35
- gap: ${er(4)};
35
+ gap: ${tr(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,11 +128,11 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${er(8)};
131
+ margin-top: ${tr(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${er(8)};
135
+ margin-top: ${tr(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Sc({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:i,activeEvent:a}){const s=!!n,c=r&&t||!t,{prefix:o}=w.useScopedStyles(),{type:d="A",fieldsToShow:p=2,fields:T=[],buttonLabel:x,gap:y,fieldsGap:g,buttonCorners:h,buttonStroke:P,buttonPadding:C,isButtonFullWidth:f,inputCorners:b,inputStroke:M,inputPadding:_,inputColor:E,inputTextColor:S,inputBorderColor:A,placeholderColor:I,buttonColor:k,buttonTextColor:$,buttonBorderColor:O,labelTextColor:V,successColor:q,errorColor:Y,fontFamily:L,inputFontSettings:R,inputFontSize:B,inputLineHeight:F,inputLetterSpacing:W,inputWordSpacing:j,inputTextAppearance:Q,buttonFontSettings:oe,buttonFontSize:te,buttonLineHeight:ce,buttonLetterSpacing:v,buttonWordSpacing:ie,buttonTextAppearance:$e,labelFontSettings:de,labelFontSize:ye,labelLineHeight:Re,labelLetterSpacing:re,labelWordSpacing:N,labelTextAppearance:m,statusFontSettings:H,statusFontSize:D,statusLineHeight:U,statusLetterSpacing:ne,statusWordSpacing:ee,statusTextAppearance:J,successMessage:ae,errorMessage:ge,stateOverrides:me}=e,he=d==="B",K=T.slice(0,Math.min(p,T.length)),G={fontSettings:{fontFamily:L,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:B??.01,lineHeight:F,letterSpacing:W??0,wordSpacing:j??0,textAppearance:Q,color:S},z=Ct(nt(G,t)),le=w.scalingValue(M??0,t),we=w.scalingValue((F??B??.01)+((_==null?void 0:_.top)??0)+((_==null?void 0:_.bottom)??0)+(d==="C"?M??0:(M??0)*2),t),ke={...z,borderStyle:"solid",borderRadius:d==="C"?0:w.scalingValue(b??0,t),...d==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:le,borderLeftWidth:0}:{borderWidth:le},paddingTop:w.scalingValue((_==null?void 0:_.top)??0,t),paddingRight:w.scalingValue((_==null?void 0:_.right)??0,t),paddingBottom:w.scalingValue((_==null?void 0:_.bottom)??0,t),paddingLeft:w.scalingValue((_==null?void 0:_.left)??0,t),height:we,minHeight:we},Je={fontSettings:{fontFamily:L,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:te??.01,lineHeight:ce,letterSpacing:v??0,wordSpacing:ie??0,textAppearance:$e,color:$},Pe=Ct(nt(Je,t)),Me=w.scalingValue(P??0,t),Ee={fontSettings:{fontFamily:L,fontWeight:(de==null?void 0:de.fontWeight)??400,fontStyle:(de==null?void 0:de.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:Re,letterSpacing:re??0,wordSpacing:N??0,textAppearance:m,color:V},je=nt(Ee,t),He={fontSettings:{fontFamily:L,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:D??.01,lineHeight:U,letterSpacing:ne??0,wordSpacing:ee??0,textAppearance:J,color:q},Ie=Ct(nt(He,t)),Ve=w.buildColorVars(o,{inputColor:E,inputTextColor:S,inputBorderColor:A,placeholderColor:I!=null&&I.trim()?I:"#cccccc",buttonColor:k,buttonTextColor:$,buttonBorderColor:O,labelTextColor:V,successColor:q,errorColor:Y},$c,wc,me),[dt,vt]=u.useState(()=>Object.fromEntries(K.map(be=>[be.name,""]))),[bt,Tt]=u.useState("idle"),[Kt,xt]=u.useState(null),Ut=a==="success"?"success":a==="error"?"error":bt,ve=a==="error"?ge:Kt,Ge=a==="filled",ze=u.useMemo(()=>{if(!Ge)return dt;let be=null;for(const Ye of K)(dt[Ye.name]??"").trim().length>0||(be=be??{...dt},be[Ye.name]="Filled");return be??dt},[dt,Ge,K]),rt=Ut==="error"?w.getFormFieldValidationError(K,ze):null,Tn=`${a&&a!=="default"?`${o}-state-${a}`:""}`.trim(),qt=i==null?void 0:i.submitUrl,tn=(be,Ye)=>{vt(De=>({...De,[be]:Ye}))},Ln=async be=>{if(be.preventDefault(),!c)return;const Ye=Object.fromEntries(K.map(Fe=>{var it;return[Fe.name,((it=dt[Fe.name])==null?void 0:it.trim())??""]}).filter(([,Fe])=>Fe));if(!qt){Tt("error"),xt("No integrations were found for this form.");return}if(Object.keys(Ye).length===0)return;const De=w.getFormFieldValidationError(K,dt);if(De){Tt("error"),xt(De);return}Tt("submitting"),xt(null);try{const Fe=await fetch(qt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ye)});if(!Fe.ok){const it=await Fe.text();throw new Error(it||`Request failed: ${Fe.status}`)}Tt("success"),vt(Object.fromEntries(K.map(it=>[it.name,""])))}catch(Fe){Tt("error"),xt(Fe instanceof Error?Fe.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${o}-type-${d} ${Tn}`.trim(),style:Ve,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Cc(o)}}),l.jsxs("form",{onSubmit:Ln,className:`${o}-form`,children:[l.jsx("div",{className:`${o}-fields`,children:K.map((be,Ye)=>l.jsxs(u.Fragment,{children:[Ye>0&&l.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${o}-control`:void 0,style:{height:w.scalingValue(g??0,t)}}),l.jsxs("div",{className:`${o}-field-group${he?` ${o}-labeled`:""}`,children:[he&&l.jsx("span",{className:`${o}-field-label`,style:je?{...je,lineHeight:je.fontSize}:void 0,children:be.label||be.name}),be.type==="textarea"?l.jsx("textarea",{name:be.name,autoComplete:"off",value:ze[be.name]??"",onChange:De=>tn(be.name,De.target.value),placeholder:be.placeholder,className:`${o}-input`,style:ke,rows:1,"data-filled":Ge||(ze[be.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:be.type==="phone"?"tel":be.type==="email"?"email":"text",name:be.name,autoComplete:"off",value:ze[be.name]??"",onChange:De=>tn(be.name,De.target.value),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${o}-input`,style:ke,"data-filled":Ge||(ze[be.name]??"").trim().length>0})]})]},Ye))}),l.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${o}-control`:void 0,style:{height:w.scalingValue(y??0,t)}}),l.jsx("div",{className:`${o}-overlay-anchor`,children:l.jsx("button",{type:c?"submit":"button",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(h??0,t),borderWidth:Me,paddingTop:w.scalingValue((C==null?void 0:C.top)??0,t),paddingRight:w.scalingValue((C==null?void 0:C.right)??0,t),paddingBottom:w.scalingValue((C==null?void 0:C.bottom)??0,t),paddingLeft:w.scalingValue((C==null?void 0:C.left)??0,t),pointerEvents:c?"auto":void 0,...Pe,...f?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${o}-overlay-anchor`,style:f?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:bt==="submitting"?"...":x})})})]}),Ut==="success"&&l.jsx("p",{className:`${o}-success`,style:{...Ie},children:ae}),Ut==="error"&&l.jsx("p",{className:`${o}-error`,style:{...Ie},role:"alert",children:rt??ve??ge})]})}const $c={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"},wc=["hover","focus","filled","success","error"],Tc=`import React, { useMemo, useState } from 'react';\r
158
+ `}function $c({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:i,activeEvent:a}){const s=!!n,c=r&&t||!t,{prefix:o}=w.useScopedStyles(),{type:d="A",fieldsToShow:p=2,fields:T=[],buttonLabel:b,gap:y,fieldsGap:g,buttonCorners:h,buttonStroke:P,buttonPadding:x,isButtonFullWidth:f,inputCorners:C,inputStroke:B,inputPadding:_,inputColor:E,inputTextColor:S,inputBorderColor:A,placeholderColor:k,buttonColor:I,buttonTextColor:$,buttonBorderColor:O,labelTextColor:V,successColor:q,errorColor:X,fontFamily:L,inputFontSettings:R,inputFontSize:H,inputLineHeight:M,inputLetterSpacing:W,inputWordSpacing:j,inputTextAppearance:Q,buttonFontSettings:oe,buttonFontSize:te,buttonLineHeight:ce,buttonLetterSpacing:v,buttonWordSpacing:ie,buttonTextAppearance:$e,labelFontSettings:de,labelFontSize:ye,labelLineHeight:Re,labelLetterSpacing:re,labelWordSpacing:F,labelTextAppearance:m,statusFontSettings:N,statusFontSize:D,statusLineHeight:U,statusLetterSpacing:ne,statusWordSpacing:ee,statusTextAppearance:J,successMessage:ae,errorMessage:ge,stateOverrides:me}=e,he=d==="B",K=T.slice(0,Math.min(p,T.length)),Y={fontSettings:{fontFamily:L,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:H??.01,lineHeight:M,letterSpacing:W??0,wordSpacing:j??0,textAppearance:Q,color:S},z=Ct(nt(Y,t)),le=w.scalingValue(B??0,t),we=w.scalingValue((M??H??.01)+((_==null?void 0:_.top)??0)+((_==null?void 0:_.bottom)??0)+(d==="C"?B??0:(B??0)*2),t),Ie={...z,borderStyle:"solid",borderRadius:d==="C"?0:w.scalingValue(C??0,t),...d==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:le,borderLeftWidth:0}:{borderWidth:le},paddingTop:w.scalingValue((_==null?void 0:_.top)??0,t),paddingRight:w.scalingValue((_==null?void 0:_.right)??0,t),paddingBottom:w.scalingValue((_==null?void 0:_.bottom)??0,t),paddingLeft:w.scalingValue((_==null?void 0:_.left)??0,t),height:we,minHeight:we},Je={fontSettings:{fontFamily:L,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:te??.01,lineHeight:ce,letterSpacing:v??0,wordSpacing:ie??0,textAppearance:$e,color:$},Pe=Ct(nt(Je,t)),Me=w.scalingValue(P??0,t),Ee={fontSettings:{fontFamily:L,fontWeight:(de==null?void 0:de.fontWeight)??400,fontStyle:(de==null?void 0:de.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:Re,letterSpacing:re??0,wordSpacing:F??0,textAppearance:m,color:V},je=nt(Ee,t),He={fontSettings:{fontFamily:L,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:D??.01,lineHeight:U,letterSpacing:ne??0,wordSpacing:ee??0,textAppearance:J,color:q},ke=Ct(nt(He,t)),Ve=w.buildColorVars(o,{inputColor:E,inputTextColor:S,inputBorderColor:A,placeholderColor:k!=null&&k.trim()?k:"#cccccc",buttonColor:I,buttonTextColor:$,buttonBorderColor:O,labelTextColor:V,successColor:q,errorColor:X},wc,Tc,me),[dt,vt]=u.useState(()=>Object.fromEntries(K.map(be=>[be.name,""]))),[bt,Tt]=u.useState("idle"),[Kt,xt]=u.useState(null),Ut=a==="success"?"success":a==="error"?"error":bt,ve=a==="error"?ge:Kt,Ge=a==="filled",ze=u.useMemo(()=>{if(!Ge)return dt;let be=null;for(const Ye of K)(dt[Ye.name]??"").trim().length>0||(be=be??{...dt},be[Ye.name]="Filled");return be??dt},[dt,Ge,K]),rt=Ut==="error"?w.getFormFieldValidationError(K,ze):null,Tn=`${a&&a!=="default"?`${o}-state-${a}`:""}`.trim(),qt=i==null?void 0:i.submitUrl,tn=(be,Ye)=>{vt(De=>({...De,[be]:Ye}))},Ln=async be=>{if(be.preventDefault(),!c)return;const Ye=Object.fromEntries(K.map(Fe=>{var it;return[Fe.name,((it=dt[Fe.name])==null?void 0:it.trim())??""]}).filter(([,Fe])=>Fe));if(!qt){Tt("error"),xt("No integrations were found for this form.");return}if(Object.keys(Ye).length===0)return;const De=w.getFormFieldValidationError(K,dt);if(De){Tt("error"),xt(De);return}Tt("submitting"),xt(null);try{const Fe=await fetch(qt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ye)});if(!Fe.ok){const it=await Fe.text();throw new Error(it||`Request failed: ${Fe.status}`)}Tt("success"),vt(Object.fromEntries(K.map(it=>[it.name,""])))}catch(Fe){Tt("error"),xt(Fe instanceof Error?Fe.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${o}-type-${d} ${Tn}`.trim(),style:Ve,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Sc(o)}}),l.jsxs("form",{onSubmit:Ln,className:`${o}-form`,children:[l.jsx("div",{className:`${o}-fields`,children:K.map((be,Ye)=>l.jsxs(u.Fragment,{children:[Ye>0&&l.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${o}-control`:void 0,style:{height:w.scalingValue(g??0,t)}}),l.jsxs("div",{className:`${o}-field-group${he?` ${o}-labeled`:""}`,children:[he&&l.jsx("span",{className:`${o}-field-label`,style:je?{...je,lineHeight:je.fontSize}:void 0,children:be.label||be.name}),be.type==="textarea"?l.jsx("textarea",{name:be.name,autoComplete:"off",value:ze[be.name]??"",onChange:De=>tn(be.name,De.target.value),placeholder:be.placeholder,className:`${o}-input`,style:Ie,rows:1,"data-filled":Ge||(ze[be.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:be.type==="phone"?"tel":be.type==="email"?"email":"text",name:be.name,autoComplete:"off",value:ze[be.name]??"",onChange:De=>tn(be.name,De.target.value),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${o}-input`,style:Ie,"data-filled":Ge||(ze[be.name]??"").trim().length>0})]})]},Ye))}),l.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${o}-control`:void 0,style:{height:w.scalingValue(y??0,t)}}),l.jsx("div",{className:`${o}-overlay-anchor`,children:l.jsx("button",{type:c?"submit":"button",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(h??0,t),borderWidth:Me,paddingTop:w.scalingValue((x==null?void 0:x.top)??0,t),paddingRight:w.scalingValue((x==null?void 0:x.right)??0,t),paddingBottom:w.scalingValue((x==null?void 0:x.bottom)??0,t),paddingLeft:w.scalingValue((x==null?void 0:x.left)??0,t),pointerEvents:c?"auto":void 0,...Pe,...f?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${o}-overlay-anchor`,style:f?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:bt==="submitting"?"...":b})})})]}),Ut==="success"&&l.jsx("p",{className:`${o}-success`,style:{...ke},children:ae}),Ut==="error"&&l.jsx("p",{className:`${o}-error`,style:{...ke},role:"alert",children:rt??ve??ge})]})}const wc={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"},Tc=["hover","focus","filled","success","error"],Lc=`import React, { useMemo, useState } from 'react';\r
159
159
  import { CommonComponentProps } from '../props';\r
160
160
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
161
161
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -789,7 +789,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
789
789
  };\r
790
790
  \r
791
791
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
792
- `,Lc=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{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"}],tr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ec=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Pc={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:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",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:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",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:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",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:{...tr.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:{...tr.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:{...tr.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:{...tr.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:Lc,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:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{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:[...Ec],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"]},_c={element:Sc,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:Pc,sourceCode:Tc};function nr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ac(e){return`
792
+ `,Ec=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{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"}],nr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],_c={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:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",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:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",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:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",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:{...nr.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:{...nr.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:{...nr.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:{...nr.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:Ec,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:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{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:[...Pc],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"]},Ac={element:$c,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:_c,sourceCode:Lc};function rr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rc(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -971,16 +971,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
971
971
  align-items: center;
972
972
  }
973
973
  .${e}-success {
974
- margin-top: ${nr(8)};
975
- font-size: ${nr(14)};
974
+ margin-top: ${rr(8)};
975
+ font-size: ${rr(14)};
976
976
  color: var(--${e}-success-success-color, var(--${e}-success-color));
977
977
  }
978
978
  .${e}-error {
979
- margin-top: ${nr(8)};
980
- font-size: ${nr(14)};
979
+ margin-top: ${rr(8)};
980
+ font-size: ${rr(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const Rc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:i})=>{const{prefix:a}=w.useScopedStyles(),s=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:o,buttonLabel:d,fieldsToShow:p=1,fontFamily:T,inputFontSettings:x,inputFontSize:y,inputLineHeight:g,inputLetterSpacing:h,inputWordSpacing:P,inputTextAppearance:C,buttonFontSettings:f,buttonFontSize:b,buttonLineHeight:M,buttonLetterSpacing:_,buttonWordSpacing:E,buttonTextAppearance:S,statusFontSettings:A,statusFontSize:I,statusLineHeight:k,statusLetterSpacing:$,statusWordSpacing:O,statusTextAppearance:V,iconMaxWidth:q,minHeight:Y,corners:L,stroke:R,stateOverrides:B,inputPadding:F,buttonPadding:W,successMessage:j="Thanks for subscribing!",errorMessage:Q="Please, fill all required fields."}=e,oe=c.slice(0,Math.min(p,c.length)),[te,ce]=u.useState(()=>Object.fromEntries(oe.map(Ee=>[Ee.name,""]))),[v,ie]=u.useState("idle"),[$e,de]=u.useState(null),ye=i==="success"?"success":i==="error"?"error":v,Re=i==="error"?Q:$e,re=i==="filled",N=u.useMemo(()=>{if(!re)return te;let Ee=null;for(const je of oe)(te[je.name]??"").trim().length>0||(Ee=Ee??{...te},Ee[je.name]="Filled");return Ee??te},[re,te,oe]),m=ye==="error"?w.getFormFieldValidationError(oe,N):null,H=i&&i!=="default"?`${a}-state-${i}`:"",D=oe.some(Ee=>(N[Ee.name]??"").trim().length>0),U=H!==`${a}-state-filled`&&D?`${a}-state-filled`:"",ne=`${H} ${U}`.trim(),ee=r==null?void 0:r.submitUrl,J=d??"",ae=(o==null?void 0:o.icon)??"",ge=(o==null?void 0:o.mode)==="On",me=J||"Submit",he={fontSettings:{fontFamily:T,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:y??.01,lineHeight:g,letterSpacing:h??0,wordSpacing:P??0,textAppearance:C,color:e.inputTextColor??"#111111"},K={fontSettings:{fontFamily:T,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:b??.01,lineHeight:M,letterSpacing:_??0,wordSpacing:E??0,textAppearance:S,color:e.buttonTextColor??"#ffffff"},G={fontSettings:{fontFamily:T,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:I??.01,lineHeight:k,letterSpacing:$??0,wordSpacing:O??0,textAppearance:V,color:e.successColor??"#22c55e"},z=Ct(nt(he,t)),le=Ct(nt(K,t)),we=Ct(nt(G,t)),ke=w.buildColorVars(a,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(he==null?void 0:he.color)??"#111111",buttonTextColor:e.buttonTextColor??(K==null?void 0:K.color)??"#ffffff"},Ic,kc,B),Je={borderRadius:w.scalingValue(L,t),borderWidth:w.scalingValue(R,t),borderStyle:"solid"},Pe={borderLeftWidth:w.scalingValue(R,t)},Me=async Ee=>{if(Ee.preventDefault(),!s)return;const je=Object.fromEntries(oe.map(Ie=>{var Ve;return[Ie.name,((Ve=te[Ie.name])==null?void 0:Ve.trim())??""]}).filter(([,Ie])=>Ie));if(!ee){ie("error"),de("No integrations were found for this form.");return}if(Object.keys(je).length===0)return;const He=w.getFormFieldValidationError(oe,te);if(He){ie("error"),de(He);return}ie("submitting"),de(null);try{const Ie=await fetch(ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)});if(!Ie.ok){const Ve=await Ie.text();throw new Error(Ve||`Request failed: ${Ie.status}`)}ie("success"),ce(Object.fromEntries(oe.map(Ve=>[Ve.name,""])))}catch(Ie){ie("error"),de(Ie instanceof Error?Ie.message:"Something went wrong")}};return l.jsxs("div",{className:`${a}-wrapper ${ne}`.trim(),style:ke,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ac(a)}}),l.jsxs("form",{onSubmit:Me,className:`${a}-form`,style:{...Je,height:w.scalingValue(Y,t),minHeight:w.scalingValue(Y,t)},children:[l.jsx("div",{className:`${a}-inputWrap ${a}-overlayAnchor`,style:{flex:1,minWidth:0},children:oe.map(Ee=>l.jsx("input",{type:Ee.type==="email"?"email":Ee.type==="phone"?"tel":"text",name:Ee.name,autoComplete:"off",value:N[Ee.name]??"",onChange:je=>ce(He=>({...He,[Ee.name]:je.target.value})),placeholder:Ee.placeholder,required:Ee.isRequired??Ee.type==="email",className:`${a}-input`,style:{...z,paddingRight:w.scalingValue(F.right,t),paddingLeft:w.scalingValue(F.left,t),paddingTop:w.scalingValue(F.top,t),paddingBottom:w.scalingValue(F.bottom,t)}},Ee.name))}),l.jsx("div",{className:`${a}-overlayAnchor`,children:l.jsx("button",{type:s?"submit":"button",className:`${a}-submitBtn`,"aria-label":me,style:{...le,...Pe,paddingRight:w.scalingValue(W.right,t),paddingLeft:w.scalingValue(W.left,t),paddingTop:w.scalingValue(W.top,t),paddingBottom:w.scalingValue(W.bottom,t),pointerEvents:s?"auto":void 0},children:v==="submitting"?"...":ge?ae&&l.jsx(Ht,{url:ae,className:`${a}-submitBtnIcon`,style:{maxWidth:w.scalingValue(q??0,t)},fill:`var(--${a}-button-text-color)`,hoverFill:`var(--${a}-button-text-color)`}):J})})]}),ye==="success"&&l.jsx("p",{className:`${a}-success`,style:{...we},children:j}),ye==="error"&&l.jsx("p",{className:`${a}-error`,style:{...we},role:"alert",children:m??Re??Q})]})},Ic={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"},kc=["hover","focus","filled","success","error"],Wc=`import React, { useMemo, useState } from 'react';\r
983
+ `}const kc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:i})=>{const{prefix:a}=w.useScopedStyles(),s=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:o,buttonLabel:d,fieldsToShow:p=1,fontFamily:T,inputFontSettings:b,inputFontSize:y,inputLineHeight:g,inputLetterSpacing:h,inputWordSpacing:P,inputTextAppearance:x,buttonFontSettings:f,buttonFontSize:C,buttonLineHeight:B,buttonLetterSpacing:_,buttonWordSpacing:E,buttonTextAppearance:S,statusFontSettings:A,statusFontSize:k,statusLineHeight:I,statusLetterSpacing:$,statusWordSpacing:O,statusTextAppearance:V,iconMaxWidth:q,minHeight:X,corners:L,stroke:R,stateOverrides:H,inputPadding:M,buttonPadding:W,successMessage:j="Thanks for subscribing!",errorMessage:Q="Please, fill all required fields."}=e,oe=c.slice(0,Math.min(p,c.length)),[te,ce]=u.useState(()=>Object.fromEntries(oe.map(Ee=>[Ee.name,""]))),[v,ie]=u.useState("idle"),[$e,de]=u.useState(null),ye=i==="success"?"success":i==="error"?"error":v,Re=i==="error"?Q:$e,re=i==="filled",F=u.useMemo(()=>{if(!re)return te;let Ee=null;for(const je of oe)(te[je.name]??"").trim().length>0||(Ee=Ee??{...te},Ee[je.name]="Filled");return Ee??te},[re,te,oe]),m=ye==="error"?w.getFormFieldValidationError(oe,F):null,N=i&&i!=="default"?`${a}-state-${i}`:"",D=oe.some(Ee=>(F[Ee.name]??"").trim().length>0),U=N!==`${a}-state-filled`&&D?`${a}-state-filled`:"",ne=`${N} ${U}`.trim(),ee=r==null?void 0:r.submitUrl,J=d??"",ae=(o==null?void 0:o.icon)??"",ge=(o==null?void 0:o.mode)==="On",me=J||"Submit",he={fontSettings:{fontFamily:T,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:y??.01,lineHeight:g,letterSpacing:h??0,wordSpacing:P??0,textAppearance:x,color:e.inputTextColor??"#111111"},K={fontSettings:{fontFamily:T,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:C??.01,lineHeight:B,letterSpacing:_??0,wordSpacing:E??0,textAppearance:S,color:e.buttonTextColor??"#ffffff"},Y={fontSettings:{fontFamily:T,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:k??.01,lineHeight:I,letterSpacing:$??0,wordSpacing:O??0,textAppearance:V,color:e.successColor??"#22c55e"},z=Ct(nt(he,t)),le=Ct(nt(K,t)),we=Ct(nt(Y,t)),Ie=w.buildColorVars(a,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(he==null?void 0:he.color)??"#111111",buttonTextColor:e.buttonTextColor??(K==null?void 0:K.color)??"#ffffff"},Ic,Wc,H),Je={borderRadius:w.scalingValue(L,t),borderWidth:w.scalingValue(R,t),borderStyle:"solid"},Pe={borderLeftWidth:w.scalingValue(R,t)},Me=async Ee=>{if(Ee.preventDefault(),!s)return;const je=Object.fromEntries(oe.map(ke=>{var Ve;return[ke.name,((Ve=te[ke.name])==null?void 0:Ve.trim())??""]}).filter(([,ke])=>ke));if(!ee){ie("error"),de("No integrations were found for this form.");return}if(Object.keys(je).length===0)return;const He=w.getFormFieldValidationError(oe,te);if(He){ie("error"),de(He);return}ie("submitting"),de(null);try{const ke=await fetch(ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)});if(!ke.ok){const Ve=await ke.text();throw new Error(Ve||`Request failed: ${ke.status}`)}ie("success"),ce(Object.fromEntries(oe.map(Ve=>[Ve.name,""])))}catch(ke){ie("error"),de(ke instanceof Error?ke.message:"Something went wrong")}};return l.jsxs("div",{className:`${a}-wrapper ${ne}`.trim(),style:Ie,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Rc(a)}}),l.jsxs("form",{onSubmit:Me,className:`${a}-form`,style:{...Je,height:w.scalingValue(X,t),minHeight:w.scalingValue(X,t)},children:[l.jsx("div",{className:`${a}-inputWrap ${a}-overlayAnchor`,style:{flex:1,minWidth:0},children:oe.map(Ee=>l.jsx("input",{type:Ee.type==="email"?"email":Ee.type==="phone"?"tel":"text",name:Ee.name,autoComplete:"off",value:F[Ee.name]??"",onChange:je=>ce(He=>({...He,[Ee.name]:je.target.value})),placeholder:Ee.placeholder,required:Ee.isRequired??Ee.type==="email",className:`${a}-input`,style:{...z,paddingRight:w.scalingValue(M.right,t),paddingLeft:w.scalingValue(M.left,t),paddingTop:w.scalingValue(M.top,t),paddingBottom:w.scalingValue(M.bottom,t)}},Ee.name))}),l.jsx("div",{className:`${a}-overlayAnchor`,children:l.jsx("button",{type:s?"submit":"button",className:`${a}-submitBtn`,"aria-label":me,style:{...le,...Pe,paddingRight:w.scalingValue(W.right,t),paddingLeft:w.scalingValue(W.left,t),paddingTop:w.scalingValue(W.top,t),paddingBottom:w.scalingValue(W.bottom,t),pointerEvents:s?"auto":void 0},children:v==="submitting"?"...":ge?ae&&l.jsx(Ht,{url:ae,className:`${a}-submitBtnIcon`,style:{maxWidth:w.scalingValue(q??0,t)},fill:`var(--${a}-button-text-color)`,hoverFill:`var(--${a}-button-text-color)`}):J})})]}),ye==="success"&&l.jsx("p",{className:`${a}-success`,style:{...we},children:j}),ye==="error"&&l.jsx("p",{className:`${a}-error`,style:{...we},role:"alert",children:m??Re??Q})]})},Ic={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"},Wc=["hover","focus","filled","success","error"],Mc=`import React, { useMemo, useState } from 'react';\r
984
984
  import { CommonComponentProps } from '../props';\r
985
985
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
986
986
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
1557
1557
  };\r
1558
1558
  \r
1559
1559
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1560
- `,Mc="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>'),Fc=[{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."}],Or={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Nc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Hc={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:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",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 Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",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:{...Or.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:{...Or.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:{...Or.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:Fc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Mc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",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:.001,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:.001,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:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"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:[...Nc],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"]},Bc={element:Rc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Hc,sourceCode:Wc};function Oc(e){return`
1560
+ `,Fc="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>'),Nc=[{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."}],Or={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Bc={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:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",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 Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",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:{...Or.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:{...Or.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:{...Or.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:Nc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Fc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",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:.001,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:.001,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:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"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:[...Hc],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"]},Oc={element:kc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Bc,sourceCode:Mc};function Vc(e){return`
1561
1561
  .${e}-marquee-wrapper {
1562
1562
  overflow: hidden;
1563
1563
  width: 100%;
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1689
1689
  .${e}-image-hover-grayscale:hover img {
1690
1690
  filter: grayscale(100%);
1691
1691
  }
1692
- `}const Vc=30,Dc=20,Vr=2,jc=2,zc=(e,t)=>Array.from({length:t},()=>e).flat(),Kc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},Uc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Kc(r,e))},qc=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:a,isFirstSet:s,scaled:c,onFirstSetImageDone:o})=>{var S,A,I;const d=u.useRef(null);u.useLayoutEffect(()=>{if(!s)return;const k=d.current;k!=null&&k.complete&&(o==null||o())},[s,(S=e.image)==null?void 0:S.url,o]);const p=n.display==="Cover",T=n.ratioValue??"1:1",x=n.reversed??!1,[y,g]=T.split(":").map(Number),C=(x?g:y)/(x?y:g);let f=r,b=f/C;b>i&&(b=i,f=b*C);const M=c(f),_=c(b),E=((A=e.image)==null?void 0:A.url)&&l.jsx("img",{ref:d,src:e.image.url,alt:((I=e.image)==null?void 0:I.name)??"",style:p?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:s?o:void 0,onError:s?o:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...p?{width:M}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:l.jsx("div",{className:a,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...p?{width:M,height:_,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(i)}},children:E&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Le(`${t}-marquee-link`,!p&&`${t}-marquee-link-contain`),children:E}):E})})},Gc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=w.useScopedStyles(),s=u.useMemo(()=>Oc(a),[a]),{speed:c,direction:o,pauseOnHover:d,gap:p,imageMaxWidth:T,imageMaxHeight:x,imageFit:y,hoverEffect:g}=e,h=!!i,P=!n||!!r,C=P&&g!=="off"&&g!=="randomize"?`${a}-image-hover-${g}`:void 0,f=n?!!r:!0,M=((t==null?void 0:t.length)??0)>0&&(f||!!n),_=Math.max(0,c)*Vc,E=m=>w.scalingValue(m,n??!1),S=u.useRef(null),A=u.useRef(null),I=u.useRef(null),[k,$]=u.useState(0),[O,V]=u.useState(0),q=f&&d==="on",[Y,L]=u.useState(!1),[R,B]=u.useState({}),F=u.useRef(R);F.current=R;const W=u.useRef(null),j=u.useRef(0),Q=u.useRef(null),oe=u.useMemo(()=>(t??[]).map(m=>{var H;return((H=m.image)==null?void 0:H.url)??""}).join("\0"),[t]),[te,ce]=u.useState(Vr),v=u.useMemo(()=>{const m=t??[];return!f||m.length===0?m:zc(m,te)},[t,f,te]),ie=u.useMemo(()=>v.filter(m=>{var H;return!!((H=m.image)!=null&&H.url)}).length,[v]),$e=M?jc:1;u.useLayoutEffect(()=>{j.current=0,B({}),W.current=null,ce(Vr),$(0)},[oe]),u.useEffect(()=>{if(!P||g!=="randomize")return;const m=S.current;if(!m)return;const H=ee=>{B(J=>{let ae=null;for(const ge of ee)ge in J&&(Uc(m,ge)||(ae||(ae={...J}),delete ae[ge]));return ae??J})},D=new IntersectionObserver(ee=>{const J=new Set;for(const ae of ee){const ge=ae.target.dataset.marqueeItemIndex,me=ge!==void 0?Number(ge):NaN;Number.isNaN(me)||J.add(me)}J.size>0&&H(J)},{root:m,threshold:0});Object.keys(R).forEach(ee=>{const J=Number(ee);m.querySelectorAll(`[data-marquee-item-index="${J}"]`).forEach(ae=>D.observe(ae))});let U=0;const ne=()=>{const ee=Object.keys(F.current);ee.length!==0&&(H(ee.map(Number)),U=requestAnimationFrame(ne))};return Object.keys(F.current).length>0&&(U=requestAnimationFrame(ne)),()=>{cancelAnimationFrame(U),D.disconnect()}},[g,R,P]),u.useLayoutEffect(()=>{if(!M)return;const m=S.current,H=I.current;if(!m||!H)return;let D=0;const U=()=>{const J=m.getBoundingClientRect().width,ae=H.getBoundingClientRect().width,ge=W.current,me=typeof ge=="number"&&Math.abs(ge-ae)<=.25;if(W.current=ae,f&&ae>0&&te>0){const he=ae/te;if(he>0&&J>0){const K=Math.max(Vr,Math.ceil(J/he)+1);if(K!==te){ce(K);return}}}if(ae>0&&k<=0){$(ae);return}me&&ae!==k?$(ae):!me&&k<=0&&(cancelAnimationFrame(D),D=requestAnimationFrame(U))},ne=()=>{cancelAnimationFrame(D),D=requestAnimationFrame(U)};Q.current=ne,ne();const ee=new ResizeObserver(ne);return ee.observe(m),ee.observe(H),()=>{Q.current=null,cancelAnimationFrame(D),ee.disconnect()}},[f,M,k,oe,te]),u.useLayoutEffect(()=>{const m=A.current;if(!M||!m)return;const H=k>0?k:0,D=H>0&&_>0?H/_*1e3:0,U=`${Math.max(0,D)/1e3}s`;m.style.setProperty("--marquee-distance",`${H}px`),m.style.setProperty("--marquee-duration",U)},[f,M,_,k]),u.useLayoutEffect(()=>{if(!M){V(0);return}if(k<=0){V(0);return}const m=A.current;if(!m)return;const H=()=>{const U=m.getBoundingClientRect().height;V(U>0?U:0)};H();const D=new ResizeObserver(H);return D.observe(m),()=>D.disconnect()},[M,$e,v,n,p,T,x,k,y,R]);const de=()=>{q&&L(!0)},ye=()=>{q&&L(!1)},Re=u.useCallback(()=>{var m;j.current=Math.min(ie,j.current+1),(m=Q.current)==null||m.call(Q)},[ie]),re=u.useCallback((m,H)=>{B(D=>{const U=D[m]??H,ne=(t??[]).filter(J=>J!==U);if(ne.length===0)return D;const ee=ne[Math.floor(Math.random()*ne.length)];return{...D,[m]:ee}})},[t]),N=(m,H,D,U)=>{const ne=P&&g==="randomize"&&y.display==="Cover"?R[D]??m:m,ee=`max(${E(p)}, ${Dc}px)`,J=`calc(-0.5 * (${ee} + ${E(p)}))`;return l.jsxs("div",{className:`${a}-marquee-card`,"data-marquee-item-index":D,onMouseEnter:P&&g==="randomize"&&y.display==="Cover"?()=>re(D,m):void 0,children:[l.jsx(qc,{item:ne,prefix:a,imageFit:y,imageMaxWidth:T,imageMaxHeight:x,imageHoverClass:C,isEditor:n,isFirstSet:U,scaled:E,onFirstSetImageDone:Re}),h&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${a}-gap-control`,style:{position:"absolute",top:0,right:J,width:ee,height:"100%"}})]},`${H}-${D}`)};if(M){const m=f?q&&Y?"paused":"running":"paused";return l.jsxs("div",{ref:S,className:Le(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Marquee",style:k>0&&O>0?{height:O}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),l.jsx("div",{ref:A,className:`${a}-marquee-track`,"data-direction":o,onMouseEnter:de,onMouseLeave:ye,style:{"--marquee-play-state":m},children:Array.from({length:$e},(H,D)=>l.jsx("div",{ref:D===0?I:void 0,className:Le(`${a}-marquee-row`,`${a}-marquee-set`),style:{gap:E(p),paddingRight:E(p)},"aria-hidden":D>0,children:v.map((U,ne)=>N(U,D,ne,D===0))},`set-${D}`))},"marquee-track")]})}return l.jsxs("div",{ref:S,className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),l.jsx("div",{className:Le(`${a}-marquee-row`,`${a}-marquee-static`),style:{gap:E(p),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((m,H)=>N(m,0,H))},"marquee-static")]})},Yc=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1692
+ `}const Dc=30,jc=20,Vr=2,zc=2,Kc=(e,t)=>Array.from({length:t},()=>e).flat(),Uc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},qc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Uc(r,e))},Gc=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:a,isFirstSet:s,scaled:c,onFirstSetImageDone:o})=>{var S,A,k;const d=u.useRef(null);u.useLayoutEffect(()=>{if(!s)return;const I=d.current;I!=null&&I.complete&&(o==null||o())},[s,(S=e.image)==null?void 0:S.url,o]);const p=n.display==="Cover",T=n.ratioValue??"1:1",b=n.reversed??!1,[y,g]=T.split(":").map(Number),x=(b?g:y)/(b?y:g);let f=r,C=f/x;C>i&&(C=i,f=C*x);const B=c(f),_=c(C),E=((A=e.image)==null?void 0:A.url)&&l.jsx("img",{ref:d,src:e.image.url,alt:((k=e.image)==null?void 0:k.name)??"",style:p?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:s?o:void 0,onError:s?o:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...p?{width:B}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:l.jsx("div",{className:a,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...p?{width:B,height:_,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(i)}},children:E&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Le(`${t}-marquee-link`,!p&&`${t}-marquee-link-contain`),children:E}):E})})},Yc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=w.useScopedStyles(),s=u.useMemo(()=>Vc(a),[a]),{speed:c,direction:o,pauseOnHover:d,gap:p,imageMaxWidth:T,imageMaxHeight:b,imageFit:y,hoverEffect:g}=e,h=!!i,P=!n||!!r,x=P&&g!=="off"&&g!=="randomize"?`${a}-image-hover-${g}`:void 0,f=n?!!r:!0,B=((t==null?void 0:t.length)??0)>0&&(f||!!n),_=Math.max(0,c)*Dc,E=m=>w.scalingValue(m,n??!1),S=u.useRef(null),A=u.useRef(null),k=u.useRef(null),[I,$]=u.useState(0),[O,V]=u.useState(0),q=f&&d==="on",[X,L]=u.useState(!1),[R,H]=u.useState({}),M=u.useRef(R);M.current=R;const W=u.useRef(null),j=u.useRef(0),Q=u.useRef(null),oe=u.useMemo(()=>(t??[]).map(m=>{var N;return((N=m.image)==null?void 0:N.url)??""}).join("\0"),[t]),[te,ce]=u.useState(Vr),v=u.useMemo(()=>{const m=t??[];return!f||m.length===0?m:Kc(m,te)},[t,f,te]),ie=u.useMemo(()=>v.filter(m=>{var N;return!!((N=m.image)!=null&&N.url)}).length,[v]),$e=B?zc:1;u.useLayoutEffect(()=>{j.current=0,H({}),W.current=null,ce(Vr),$(0)},[oe]),u.useEffect(()=>{if(!P||g!=="randomize")return;const m=S.current;if(!m)return;const N=ee=>{H(J=>{let ae=null;for(const ge of ee)ge in J&&(qc(m,ge)||(ae||(ae={...J}),delete ae[ge]));return ae??J})},D=new IntersectionObserver(ee=>{const J=new Set;for(const ae of ee){const ge=ae.target.dataset.marqueeItemIndex,me=ge!==void 0?Number(ge):NaN;Number.isNaN(me)||J.add(me)}J.size>0&&N(J)},{root:m,threshold:0});Object.keys(R).forEach(ee=>{const J=Number(ee);m.querySelectorAll(`[data-marquee-item-index="${J}"]`).forEach(ae=>D.observe(ae))});let U=0;const ne=()=>{const ee=Object.keys(M.current);ee.length!==0&&(N(ee.map(Number)),U=requestAnimationFrame(ne))};return Object.keys(M.current).length>0&&(U=requestAnimationFrame(ne)),()=>{cancelAnimationFrame(U),D.disconnect()}},[g,R,P]),u.useLayoutEffect(()=>{if(!B)return;const m=S.current,N=k.current;if(!m||!N)return;let D=0;const U=()=>{const J=m.getBoundingClientRect().width,ae=N.getBoundingClientRect().width,ge=W.current,me=typeof ge=="number"&&Math.abs(ge-ae)<=.25;if(W.current=ae,f&&ae>0&&te>0){const he=ae/te;if(he>0&&J>0){const K=Math.max(Vr,Math.ceil(J/he)+1);if(K!==te){ce(K);return}}}if(ae>0&&I<=0){$(ae);return}me&&ae!==I?$(ae):!me&&I<=0&&(cancelAnimationFrame(D),D=requestAnimationFrame(U))},ne=()=>{cancelAnimationFrame(D),D=requestAnimationFrame(U)};Q.current=ne,ne();const ee=new ResizeObserver(ne);return ee.observe(m),ee.observe(N),()=>{Q.current=null,cancelAnimationFrame(D),ee.disconnect()}},[f,B,I,oe,te]),u.useLayoutEffect(()=>{const m=A.current;if(!B||!m)return;const N=I>0?I:0,D=N>0&&_>0?N/_*1e3:0,U=`${Math.max(0,D)/1e3}s`;m.style.setProperty("--marquee-distance",`${N}px`),m.style.setProperty("--marquee-duration",U)},[f,B,_,I]),u.useLayoutEffect(()=>{if(!B){V(0);return}if(I<=0){V(0);return}const m=A.current;if(!m)return;const N=()=>{const U=m.getBoundingClientRect().height;V(U>0?U:0)};N();const D=new ResizeObserver(N);return D.observe(m),()=>D.disconnect()},[B,$e,v,n,p,T,b,I,y,R]);const de=()=>{q&&L(!0)},ye=()=>{q&&L(!1)},Re=u.useCallback(()=>{var m;j.current=Math.min(ie,j.current+1),(m=Q.current)==null||m.call(Q)},[ie]),re=u.useCallback((m,N)=>{H(D=>{const U=D[m]??N,ne=(t??[]).filter(J=>J!==U);if(ne.length===0)return D;const ee=ne[Math.floor(Math.random()*ne.length)];return{...D,[m]:ee}})},[t]),F=(m,N,D,U)=>{const ne=P&&g==="randomize"&&y.display==="Cover"?R[D]??m:m,ee=`max(${E(p)}, ${jc}px)`,J=`calc(-0.5 * (${ee} + ${E(p)}))`;return l.jsxs("div",{className:`${a}-marquee-card`,"data-marquee-item-index":D,onMouseEnter:P&&g==="randomize"&&y.display==="Cover"?()=>re(D,m):void 0,children:[l.jsx(Gc,{item:ne,prefix:a,imageFit:y,imageMaxWidth:T,imageMaxHeight:b,imageHoverClass:x,isEditor:n,isFirstSet:U,scaled:E,onFirstSetImageDone:Re}),h&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${a}-gap-control`,style:{position:"absolute",top:0,right:J,width:ee,height:"100%"}})]},`${N}-${D}`)};if(B){const m=f?q&&X?"paused":"running":"paused";return l.jsxs("div",{ref:S,className:Le(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Marquee",style:I>0&&O>0?{height:O}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),l.jsx("div",{ref:A,className:`${a}-marquee-track`,"data-direction":o,onMouseEnter:de,onMouseLeave:ye,style:{"--marquee-play-state":m},children:Array.from({length:$e},(N,D)=>l.jsx("div",{ref:D===0?k:void 0,className:Le(`${a}-marquee-row`,`${a}-marquee-set`),style:{gap:E(p),paddingRight:E(p)},"aria-hidden":D>0,children:v.map((U,ne)=>F(U,D,ne,D===0))},`set-${D}`))},"marquee-track")]})}return l.jsxs("div",{ref:S,className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),l.jsx("div",{className:Le(`${a}-marquee-row`,`${a}-marquee-static`),style:{gap:E(p),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((m,N)=>F(m,0,N))},"marquee-static")]})},Xc=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1693
1693
  import cn from 'classnames';\r
1694
1694
  import { CommonComponentProps } from '../props';\r
1695
1695
  import { scalingValue } from '../utils/scalingValue';\r
@@ -2320,7 +2320,7 @@ type MarqueeProps = {\r
2320
2320
  isPreviewMode?: boolean;\r
2321
2321
  isEditMode?: boolean;\r
2322
2322
  } & CommonComponentProps;\r
2323
- `,Xc={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"Fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit.display",value:"Cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""},link:""}]}},Zc={element:Gc,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:140},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Xc,sourceCode:Yc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function to(e){return`
2323
+ `,Zc={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"Fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit.display",value:"Cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""},link:""}]}},Jc={element:Yc,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:140},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Zc,sourceCode:Xc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function to(e){return`
2324
2324
  .${e}-marquee-wrapper {
2325
2325
  overflow: hidden;
2326
2326
  width: 100%;
@@ -2407,7 +2407,7 @@ type MarqueeProps = {\r
2407
2407
  pointer-events: auto;
2408
2408
  z-index: 10;
2409
2409
  }
2410
- `}const Jc=30,no=2,Qc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=w.useScopedStyles(),{autoplay:s,align:c,speed:o,direction:d,pauseOnHover:p,gap:T,cardWidth:x,corners:y,stroke:g,strokeColor:h,bgColor:P,padding:C,logoMarginTop:f,logoWidth:b,logoHeight:M,captionMarginTop:_}=e,E=!!i,S=((t==null?void 0:t.length)??0)>0,A=s==="on"&&(!n||!!r),I=S&&(A||!!n),k=Math.max(0,o)*Jc,$=K=>w.scalingValue(K,n??!1),O=u.useRef(null),V=u.useRef(null),q=u.useRef(null),[Y,L]=u.useState(0),[R,B]=u.useState(0),[F,W]=u.useState(0),j=A&&p==="on",[Q,oe]=u.useState(!1),te=u.useRef(null),[ce,v]=u.useState(0),[ie,$e]=u.useState(0),de=u.useRef(null),ye=K=>{var z,le,we,ke,Je;return{fontSettings:{fontFamily:(e==null?void 0:e[`${K}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${K}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((le=e==null?void 0:e[`${K}FontSettings`])==null?void 0:le.fontStyle)??"normal"},textAppearance:{textTransform:((we=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:we.textTransform)??"none",textDecoration:((ke=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:ke.textDecoration)??"none",fontVariant:((Je=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Je.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${K}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${K}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${K}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${K}LineHeight`])??.01,color:(e==null?void 0:e[`${K}Color`])??"#000000"}},Re=ye("text"),re=ye("caption"),N=u.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(K=>{var G,z;return(((G=K.text)==null?void 0:G.length)??0)>0||(((z=K.caption)==null?void 0:z.length)??0)>0}),[t]),m=u.useMemo(()=>!I||(t==null?void 0:t.length)===0?1:R<=0||Y<=0?no:Math.max(no,Math.ceil(Y/R)+1),[I,t==null?void 0:t.length,R,Y]);u.useLayoutEffect(()=>{if(!I)return;const K=O.current,G=q.current;if(!K||!G)return;let z=0;const le=()=>{const Je=K.getBoundingClientRect().width,Pe=G.getBoundingClientRect().width,Me=de.current,Ee=typeof Me=="number"&&Math.abs(Me-Pe)<=.25;if(de.current=Pe,L(Je),typeof Pe=="number"&&Pe>0&&R<=0){B(Pe);return}Ee&&Pe!==R?B(Pe):!Ee&&R<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(le))},we=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(le)};we();const ke=new ResizeObserver(we);return ke.observe(K),ke.observe(G),()=>{cancelAnimationFrame(z),ke.disconnect()}},[A,I,R]),u.useLayoutEffect(()=>{const K=V.current;if(!I||!K)return;const G=R>0?R:0,z=G>0&&k>0?G/k*1e3:0,le=`${Math.max(0,z)/1e3}s`;K.style.setProperty("--marquee-distance",`${G}px`),K.style.setProperty("--marquee-duration",le)},[A,I,k,R]),u.useLayoutEffect(()=>{if(!I){W(0);return}const K=q.current,G=V.current;if(!K||!G)return;const z=()=>{let we=0;for(let ke=0;ke<K.children.length;ke++){const Pe=K.children[ke].firstElementChild;Pe&&(we=Math.max(we,Pe.offsetHeight))}we<=0&&(we=G.offsetHeight),W(we>0?we:0)};z();const le=new ResizeObserver(z);return le.observe(K),le.observe(G),()=>{le.disconnect()}},[I,m,t,n,T,x,C,g,y,b,M,ce,ie]);const H=()=>{j&&oe(!0)},D=()=>{j&&oe(!1)},U=u.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),ne=u.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]),ee=u.useCallback((K,G,z,le)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:U,width:"100%"},children:[l.jsx("div",{"data-controls":E?le==null?void 0:le.controlsName:void 0,"data-controls-axis":E?"y":void 0,className:E?`${a}-control`:void 0,style:{height:$((le==null?void 0:le.marginTop)??0)}}),l.jsx("div",{...le!=null&&le.dataMeasureKind?{"data-testimonial-measure":le.dataMeasureKind}:{},style:{...nt(K,n),textAlign:ne,pointerEvents:"auto",...typeof(le==null?void 0:le.minHeightPx)=="number"&&le.minHeightPx>0?{minHeight:le.minHeightPx}:{}},children:l.jsx(Fn,{content:G})})]},z),[U,ne,n,E,a,$]),J=u.useCallback((K,G,z)=>{var le,we,ke;return l.jsxs("div",{style:{padding:`${$(C.top)} ${$(C.right)} ${$(C.bottom)} ${$(C.left)}`,width:$(x+g*2),height:"100%",borderRadius:$(y),border:`${$(g)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${a}-cover`,style:{background:P}}),l.jsxs("div",{className:`${a}-elements-overlay`,style:{alignItems:U,textAlign:ne},children:[K.text&&ee(Re,K.text,"text",z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(z==null?void 0:z.textMinHeightPx)=="number"&&z.textMinHeightPx>0?{minHeightPx:z.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:U,width:"100%"},children:[l.jsx("div",{"data-controls":E&&!(z!=null&&z.dataMeasureAttrs)?"logoMarginTop":void 0,className:E&&!(z!=null&&z.dataMeasureAttrs)?`${a}-control`:void 0,style:{height:$(f)}}),l.jsx("div",{style:{width:$(b),height:$(M)},children:((le=K.logo)==null?void 0:le.url)&&l.jsx("img",{src:K.logo.url,alt:((we=K.logo)==null?void 0:we.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ke=K.logo)==null?void 0:ke.objectFit)||"contain"}})})]}),K.caption&&ee(re,K.caption,"caption",{...z!=null&&z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:_,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},G)},[P,_,re,x,y,M,f,b,U,ne,C.bottom,C.left,C.right,C.top,ee,g,h,Re,n,E,a]),ae=u.useCallback(K=>{v(K.maxTextPx),$e(K.maxCaptionPx)},[]);u.useLayoutEffect(()=>{if(!N){ae({maxTextPx:0,maxCaptionPx:0});return}const K=te.current;if(!K)return;const G=()=>{w.readTestimonialTextMeasure(K,ae)};G();const z=new ResizeObserver(G);return z.observe(K),()=>{z.disconnect()}},[N,ae,t,J]);const ge=N?{textMinHeightPx:ce,captionMinHeightPx:ie}:void 0,me=N?l.jsx("div",{ref:te,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((K,G)=>J(K,`measure-${G}`,{dataMeasureAttrs:!0}))}):null,he=(K,G)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[J(K,`card-${G}`,ge),E&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(T)})`,width:$(T),height:"100%",pointerEvents:"auto",zIndex:2}})]},G);if(I){const K=A?j&&Q?"paused":"running":"paused";return l.jsxs("div",{ref:O,className:Le(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...F>0?{height:F}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:to(a)}}),me,l.jsx("div",{ref:V,className:`${a}-marquee-track`,"data-direction":d,onMouseEnter:H,onMouseLeave:D,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":K},children:Array.from({length:m},(G,z)=>l.jsx("div",{ref:z===0?q:void 0,className:`${a}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(T),paddingRight:$(T)},"aria-hidden":z>0,children:t==null?void 0:t.map((le,we)=>he(le,`${z}-${we}`))},`set-${z}`))})]})}return l.jsxs("div",{className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:to(a)}}),me,l.jsx("div",{style:{gap:$(T),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((K,G)=>he(K,G))})]})},ed=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
2410
+ `}const Qc=30,no=2,ed=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=w.useScopedStyles(),{autoplay:s,align:c,speed:o,direction:d,pauseOnHover:p,gap:T,cardWidth:b,corners:y,stroke:g,strokeColor:h,bgColor:P,padding:x,logoMarginTop:f,logoWidth:C,logoHeight:B,captionMarginTop:_}=e,E=!!i,S=((t==null?void 0:t.length)??0)>0,A=s==="on"&&(!n||!!r),k=S&&(A||!!n),I=Math.max(0,o)*Qc,$=K=>w.scalingValue(K,n??!1),O=u.useRef(null),V=u.useRef(null),q=u.useRef(null),[X,L]=u.useState(0),[R,H]=u.useState(0),[M,W]=u.useState(0),j=A&&p==="on",[Q,oe]=u.useState(!1),te=u.useRef(null),[ce,v]=u.useState(0),[ie,$e]=u.useState(0),de=u.useRef(null),ye=K=>{var z,le,we,Ie,Je;return{fontSettings:{fontFamily:(e==null?void 0:e[`${K}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${K}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((le=e==null?void 0:e[`${K}FontSettings`])==null?void 0:le.fontStyle)??"normal"},textAppearance:{textTransform:((we=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:we.textTransform)??"none",textDecoration:((Ie=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Ie.textDecoration)??"none",fontVariant:((Je=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Je.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${K}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${K}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${K}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${K}LineHeight`])??.01,color:(e==null?void 0:e[`${K}Color`])??"#000000"}},Re=ye("text"),re=ye("caption"),F=u.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(K=>{var Y,z;return(((Y=K.text)==null?void 0:Y.length)??0)>0||(((z=K.caption)==null?void 0:z.length)??0)>0}),[t]),m=u.useMemo(()=>!k||(t==null?void 0:t.length)===0?1:R<=0||X<=0?no:Math.max(no,Math.ceil(X/R)+1),[k,t==null?void 0:t.length,R,X]);u.useLayoutEffect(()=>{if(!k)return;const K=O.current,Y=q.current;if(!K||!Y)return;let z=0;const le=()=>{const Je=K.getBoundingClientRect().width,Pe=Y.getBoundingClientRect().width,Me=de.current,Ee=typeof Me=="number"&&Math.abs(Me-Pe)<=.25;if(de.current=Pe,L(Je),typeof Pe=="number"&&Pe>0&&R<=0){H(Pe);return}Ee&&Pe!==R?H(Pe):!Ee&&R<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(le))},we=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(le)};we();const Ie=new ResizeObserver(we);return Ie.observe(K),Ie.observe(Y),()=>{cancelAnimationFrame(z),Ie.disconnect()}},[A,k,R]),u.useLayoutEffect(()=>{const K=V.current;if(!k||!K)return;const Y=R>0?R:0,z=Y>0&&I>0?Y/I*1e3:0,le=`${Math.max(0,z)/1e3}s`;K.style.setProperty("--marquee-distance",`${Y}px`),K.style.setProperty("--marquee-duration",le)},[A,k,I,R]),u.useLayoutEffect(()=>{if(!k){W(0);return}const K=q.current,Y=V.current;if(!K||!Y)return;const z=()=>{let we=0;for(let Ie=0;Ie<K.children.length;Ie++){const Pe=K.children[Ie].firstElementChild;Pe&&(we=Math.max(we,Pe.offsetHeight))}we<=0&&(we=Y.offsetHeight),W(we>0?we:0)};z();const le=new ResizeObserver(z);return le.observe(K),le.observe(Y),()=>{le.disconnect()}},[k,m,t,n,T,b,x,g,y,C,B,ce,ie]);const N=()=>{j&&oe(!0)},D=()=>{j&&oe(!1)},U=u.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),ne=u.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]),ee=u.useCallback((K,Y,z,le)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:U,width:"100%"},children:[l.jsx("div",{"data-controls":E?le==null?void 0:le.controlsName:void 0,"data-controls-axis":E?"y":void 0,className:E?`${a}-control`:void 0,style:{height:$((le==null?void 0:le.marginTop)??0)}}),l.jsx("div",{...le!=null&&le.dataMeasureKind?{"data-testimonial-measure":le.dataMeasureKind}:{},style:{...nt(K,n),textAlign:ne,pointerEvents:"auto",...typeof(le==null?void 0:le.minHeightPx)=="number"&&le.minHeightPx>0?{minHeight:le.minHeightPx}:{}},children:l.jsx(Nn,{content:Y})})]},z),[U,ne,n,E,a,$]),J=u.useCallback((K,Y,z)=>{var le,we,Ie;return l.jsxs("div",{style:{padding:`${$(x.top)} ${$(x.right)} ${$(x.bottom)} ${$(x.left)}`,width:$(b+g*2),height:"100%",borderRadius:$(y),border:`${$(g)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${a}-cover`,style:{background:P}}),l.jsxs("div",{className:`${a}-elements-overlay`,style:{alignItems:U,textAlign:ne},children:[K.text&&ee(Re,K.text,"text",z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(z==null?void 0:z.textMinHeightPx)=="number"&&z.textMinHeightPx>0?{minHeightPx:z.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:U,width:"100%"},children:[l.jsx("div",{"data-controls":E&&!(z!=null&&z.dataMeasureAttrs)?"logoMarginTop":void 0,className:E&&!(z!=null&&z.dataMeasureAttrs)?`${a}-control`:void 0,style:{height:$(f)}}),l.jsx("div",{style:{width:$(C),height:$(B)},children:((le=K.logo)==null?void 0:le.url)&&l.jsx("img",{src:K.logo.url,alt:((we=K.logo)==null?void 0:we.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ie=K.logo)==null?void 0:Ie.objectFit)||"contain"}})})]}),K.caption&&ee(re,K.caption,"caption",{...z!=null&&z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:_,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},Y)},[P,_,re,b,y,B,f,C,U,ne,x.bottom,x.left,x.right,x.top,ee,g,h,Re,n,E,a]),ae=u.useCallback(K=>{v(K.maxTextPx),$e(K.maxCaptionPx)},[]);u.useLayoutEffect(()=>{if(!F){ae({maxTextPx:0,maxCaptionPx:0});return}const K=te.current;if(!K)return;const Y=()=>{w.readTestimonialTextMeasure(K,ae)};Y();const z=new ResizeObserver(Y);return z.observe(K),()=>{z.disconnect()}},[F,ae,t,J]);const ge=F?{textMinHeightPx:ce,captionMinHeightPx:ie}:void 0,me=F?l.jsx("div",{ref:te,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((K,Y)=>J(K,`measure-${Y}`,{dataMeasureAttrs:!0}))}):null,he=(K,Y)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[J(K,`card-${Y}`,ge),E&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(T)})`,width:$(T),height:"100%",pointerEvents:"auto",zIndex:2}})]},Y);if(k){const K=A?j&&Q?"paused":"running":"paused";return l.jsxs("div",{ref:O,className:Le(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...M>0?{height:M}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:to(a)}}),me,l.jsx("div",{ref:V,className:`${a}-marquee-track`,"data-direction":d,onMouseEnter:N,onMouseLeave:D,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":K},children:Array.from({length:m},(Y,z)=>l.jsx("div",{ref:z===0?q:void 0,className:`${a}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(T),paddingRight:$(T)},"aria-hidden":z>0,children:t==null?void 0:t.map((le,we)=>he(le,`${z}-${we}`))},`set-${z}`))})]})}return l.jsxs("div",{className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:to(a)}}),me,l.jsx("div",{style:{gap:$(T),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((K,Y)=>he(K,Y))})]})},td=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
2411
2411
  import cn from 'classnames';\r
2412
2412
  import { CommonComponentProps } from '../props';\r
2413
2413
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -3023,7 +3023,7 @@ type TestimonialsSettings = {\r
3023
3023
  logoHeight: number;\r
3024
3024
  captionMarginTop: number;\r
3025
3025
  };\r
3026
- `,ro={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},td={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ro.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ro.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},nd={element:Qc,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:td,sourceCode:ed,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function rd(e){return`
3026
+ `,ro={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},nd={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ro.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ro.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},rd={element:ed,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:nd,sourceCode:td,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function id(e){return`
3027
3027
  .${e}-container {
3028
3028
  position: relative;
3029
3029
  overflow-x: clip;
@@ -3147,7 +3147,7 @@ type TestimonialsSettings = {\r
3147
3147
  width: 100%;
3148
3148
  height: 100%;
3149
3149
  }
3150
- `}const id=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=w.useScopedStyles(),s=t||[],{autoplay:c,delay:o,align:d,width:p,imageMarginTop:T,textMarginTop:x,captionMarginTop:y,imageWidth:g,imageHeight:h,controlsWidth:P,controlsColor:C,controlsHoverColor:f}=e,b=c==="on"&&r,[M,_]=u.useState(0),[E,S]=u.useState(null),[A,I]=u.useState(!1),k=u.useRef(null),$=u.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),O=u.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);u.useEffect(()=>{_(0),S(null),I(!1)},[s.length]);const V=s[M],q=E===null?null:s[E],Y=re=>{var m,H,D,U,ne;return{fontSettings:{fontFamily:(e==null?void 0:e[`${re}FontFamily`])??"Arial",fontWeight:((m=e==null?void 0:e[`${re}FontSettings`])==null?void 0:m.fontWeight)??400,fontStyle:((H=e==null?void 0:e[`${re}FontSettings`])==null?void 0:H.fontStyle)??"normal"},textAppearance:{textTransform:((D=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:D.textTransform)??"none",textDecoration:((U=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:U.textDecoration)??"none",fontVariant:((ne=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:ne.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${re}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${re}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${re}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${re}WordSpacing`])??0,color:(e==null?void 0:e[`${re}Color`])??"#000000"}},L=Y("text"),R=Y("caption"),B=s.length>1&&s.some(re=>{var N,m;return(((N=re.text)==null?void 0:N.length)??0)>0||(((m=re.caption)==null?void 0:m.length)??0)>0}),F=u.useRef(null),[W,j]=u.useState(0),[Q,oe]=u.useState(0),te=e.controls??{mode:"Off",icon:null},ce=s.length>1,v=u.useCallback((re,N)=>!ce||N===re?re:(k.current&&window.clearTimeout(k.current),S(re),I(!0),k.current=window.setTimeout(()=>{S(null),I(!1),k.current=null},300),N),[ce]),ie=u.useCallback(()=>{ce&&_(re=>v(re,(re-1+s.length)%s.length))},[ce,v,s.length]),$e=u.useCallback(()=>{ce&&_(re=>v(re,(re+1)%s.length))},[ce,v,s.length]);u.useEffect(()=>{if(!b||!ce)return;const re=Math.max(300,Number.isFinite(o*1e3)?o*1e3:0),N=window.setInterval(()=>{_(m=>v(m,(m+1)%s.length))},re);return()=>{window.clearInterval(N)}},[b,ce,v,s.length,o]),u.useEffect(()=>()=>{k.current&&window.clearTimeout(k.current)},[]);const de=(re,N)=>{var ne,ee,J,ae;const m=N==null?void 0:N.textMinHeightPx,H=N==null?void 0:N.captionMinHeightPx,D=N==null?void 0:N.dataMeasureAttrs,U=i&&!(N!=null&&N.dataMeasureAttrs)&&!(N!=null&&N.hideControls);return l.jsxs(l.Fragment,{children:[re.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[l.jsx("div",{"data-controls":U?"textMarginTop":void 0,className:U?`${a}-control`:void 0,style:{height:w.scalingValue(x??0,n??!1)}}),l.jsx("div",{...D&&{"data-testimonial-measure":"text"},style:{...nt(L,n),...m&&m>0?{minHeight:m}:{},textAlign:O,pointerEvents:"auto"},children:l.jsx(Fn,{content:re.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[l.jsx("div",{"data-controls":U?"imageMarginTop":void 0,className:U?`${a}-control`:void 0,style:{height:w.scalingValue(T??0,n??!1)}}),l.jsx("div",{style:{width:w.scalingValue(g??0,n??!1),height:w.scalingValue(h??0,n??!1)},children:((ne=re.image)==null?void 0:ne.url)&&l.jsx("img",{src:(ee=re.image)==null?void 0:ee.url,alt:((J=re.image)==null?void 0:J.name)??"",className:`${a}-icon`,style:{objectFit:((ae=re.image)==null?void 0:ae.objectFit)||"contain"}})})]}),re.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[l.jsx("div",{"data-controls":U?"captionMarginTop":void 0,className:U?`${a}-control`:void 0,style:{height:w.scalingValue(y??0,n??!1)}}),l.jsx("div",{...D?{"data-testimonial-measure":"caption"}:{},style:{...nt(R,n),...H&&H>0?{minHeight:H}:{},textAlign:O,pointerEvents:"auto"},children:l.jsx(Fn,{content:re.caption})})]})]})},ye=u.useCallback(re=>{j(re.maxTextPx),oe(re.maxCaptionPx)},[]);if(u.useLayoutEffect(()=>{if(!B){ye({maxTextPx:0,maxCaptionPx:0});return}const re=F.current;if(!re)return;const N=()=>{w.readTestimonialTextMeasure(re,ye)};N();const m=new ResizeObserver(N);return m.observe(re),()=>{m.disconnect()}},[B,ye,t]),!V)return l.jsx(l.Fragment,{});const Re=B?{textMinHeightPx:W,captionMinHeightPx:Q}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${a}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:rd(a)}}),l.jsxs("div",{className:`${a}-wrapper`,style:{width:w.scalingValue(p??0,n??!1),alignItems:$},children:[B&&l.jsx("div",{ref:F,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((re,N)=>l.jsx("div",{style:{width:"100%"},children:de(re,{dataMeasureAttrs:!0})},N))}),l.jsxs("div",{className:`${a}-fade-stack`,children:[q&&A&&l.jsx("div",{className:Le(`${a}-fade-item-prev`,`${a}-fade-out`),children:de(q,{...Re,hideControls:!0})}),l.jsx("div",{className:Le(`${a}-fade-item-current`,A?`${a}-fade-in`:void 0),children:de(V,Re)})]})]}),te.mode==="On"&&l.jsxs("div",{className:`${a}-controls`,children:[l.jsx("div",{className:`${a}-arrow`,style:{width:w.scalingValue(P??.02,n??!1),height:w.scalingValue(P??.02,n??!1),"--arrow-hover-color":f},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:ie,disabled:!ce,"aria-label":"Previous testimonial",children:te.icon&&l.jsx(Ht,{url:te.icon,fill:C,hoverFill:f,className:Le(`${a}-arrow-img`,`${a}-mirror`)})})}),l.jsx("div",{className:Le(`${a}-arrow`,`${a}-next-arrow`),style:{width:w.scalingValue(P??.02,n??!1),height:w.scalingValue(P??.02,n??!1),"--arrow-hover-color":f},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:$e,disabled:!ce,"aria-label":"Next testimonial",children:te.icon&&l.jsx(Ht,{url:te.icon,fill:C,hoverFill:f,className:`${a}-arrow-img`})})})]})]})})},od=`import cn from 'classnames';\r
3150
+ `}const od=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=w.useScopedStyles(),s=t||[],{autoplay:c,delay:o,align:d,width:p,imageMarginTop:T,textMarginTop:b,captionMarginTop:y,imageWidth:g,imageHeight:h,controlsWidth:P,controlsColor:x,controlsHoverColor:f}=e,C=c==="on"&&r,[B,_]=u.useState(0),[E,S]=u.useState(null),[A,k]=u.useState(!1),I=u.useRef(null),$=u.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),O=u.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);u.useEffect(()=>{_(0),S(null),k(!1)},[s.length]);const V=s[B],q=E===null?null:s[E],X=re=>{var m,N,D,U,ne;return{fontSettings:{fontFamily:(e==null?void 0:e[`${re}FontFamily`])??"Arial",fontWeight:((m=e==null?void 0:e[`${re}FontSettings`])==null?void 0:m.fontWeight)??400,fontStyle:((N=e==null?void 0:e[`${re}FontSettings`])==null?void 0:N.fontStyle)??"normal"},textAppearance:{textTransform:((D=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:D.textTransform)??"none",textDecoration:((U=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:U.textDecoration)??"none",fontVariant:((ne=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:ne.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${re}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${re}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${re}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${re}WordSpacing`])??0,color:(e==null?void 0:e[`${re}Color`])??"#000000"}},L=X("text"),R=X("caption"),H=s.length>1&&s.some(re=>{var F,m;return(((F=re.text)==null?void 0:F.length)??0)>0||(((m=re.caption)==null?void 0:m.length)??0)>0}),M=u.useRef(null),[W,j]=u.useState(0),[Q,oe]=u.useState(0),te=e.controls??{mode:"Off",icon:null},ce=s.length>1,v=u.useCallback((re,F)=>!ce||F===re?re:(I.current&&window.clearTimeout(I.current),S(re),k(!0),I.current=window.setTimeout(()=>{S(null),k(!1),I.current=null},300),F),[ce]),ie=u.useCallback(()=>{ce&&_(re=>v(re,(re-1+s.length)%s.length))},[ce,v,s.length]),$e=u.useCallback(()=>{ce&&_(re=>v(re,(re+1)%s.length))},[ce,v,s.length]);u.useEffect(()=>{if(!C||!ce)return;const re=Math.max(300,Number.isFinite(o*1e3)?o*1e3:0),F=window.setInterval(()=>{_(m=>v(m,(m+1)%s.length))},re);return()=>{window.clearInterval(F)}},[C,ce,v,s.length,o]),u.useEffect(()=>()=>{I.current&&window.clearTimeout(I.current)},[]);const de=(re,F)=>{var ne,ee,J,ae;const m=F==null?void 0:F.textMinHeightPx,N=F==null?void 0:F.captionMinHeightPx,D=F==null?void 0:F.dataMeasureAttrs,U=i&&!(F!=null&&F.dataMeasureAttrs)&&!(F!=null&&F.hideControls);return l.jsxs(l.Fragment,{children:[re.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[l.jsx("div",{"data-controls":U?"textMarginTop":void 0,className:U?`${a}-control`:void 0,style:{height:w.scalingValue(b??0,n??!1)}}),l.jsx("div",{...D&&{"data-testimonial-measure":"text"},style:{...nt(L,n),...m&&m>0?{minHeight:m}:{},textAlign:O,pointerEvents:"auto"},children:l.jsx(Nn,{content:re.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[l.jsx("div",{"data-controls":U?"imageMarginTop":void 0,className:U?`${a}-control`:void 0,style:{height:w.scalingValue(T??0,n??!1)}}),l.jsx("div",{style:{width:w.scalingValue(g??0,n??!1),height:w.scalingValue(h??0,n??!1)},children:((ne=re.image)==null?void 0:ne.url)&&l.jsx("img",{src:(ee=re.image)==null?void 0:ee.url,alt:((J=re.image)==null?void 0:J.name)??"",className:`${a}-icon`,style:{objectFit:((ae=re.image)==null?void 0:ae.objectFit)||"contain"}})})]}),re.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[l.jsx("div",{"data-controls":U?"captionMarginTop":void 0,className:U?`${a}-control`:void 0,style:{height:w.scalingValue(y??0,n??!1)}}),l.jsx("div",{...D?{"data-testimonial-measure":"caption"}:{},style:{...nt(R,n),...N&&N>0?{minHeight:N}:{},textAlign:O,pointerEvents:"auto"},children:l.jsx(Nn,{content:re.caption})})]})]})},ye=u.useCallback(re=>{j(re.maxTextPx),oe(re.maxCaptionPx)},[]);if(u.useLayoutEffect(()=>{if(!H){ye({maxTextPx:0,maxCaptionPx:0});return}const re=M.current;if(!re)return;const F=()=>{w.readTestimonialTextMeasure(re,ye)};F();const m=new ResizeObserver(F);return m.observe(re),()=>{m.disconnect()}},[H,ye,t]),!V)return l.jsx(l.Fragment,{});const Re=H?{textMinHeightPx:W,captionMinHeightPx:Q}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${a}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:id(a)}}),l.jsxs("div",{className:`${a}-wrapper`,style:{width:w.scalingValue(p??0,n??!1),alignItems:$},children:[H&&l.jsx("div",{ref:M,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((re,F)=>l.jsx("div",{style:{width:"100%"},children:de(re,{dataMeasureAttrs:!0})},F))}),l.jsxs("div",{className:`${a}-fade-stack`,children:[q&&A&&l.jsx("div",{className:Le(`${a}-fade-item-prev`,`${a}-fade-out`),children:de(q,{...Re,hideControls:!0})}),l.jsx("div",{className:Le(`${a}-fade-item-current`,A?`${a}-fade-in`:void 0),children:de(V,Re)})]})]}),te.mode==="On"&&l.jsxs("div",{className:`${a}-controls`,children:[l.jsx("div",{className:`${a}-arrow`,style:{width:w.scalingValue(P??.02,n??!1),height:w.scalingValue(P??.02,n??!1),"--arrow-hover-color":f},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:ie,disabled:!ce,"aria-label":"Previous testimonial",children:te.icon&&l.jsx(Ht,{url:te.icon,fill:x,hoverFill:f,className:Le(`${a}-arrow-img`,`${a}-mirror`)})})}),l.jsx("div",{className:Le(`${a}-arrow`,`${a}-next-arrow`),style:{width:w.scalingValue(P??.02,n??!1),height:w.scalingValue(P??.02,n??!1),"--arrow-hover-color":f},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:$e,disabled:!ce,"aria-label":"Next testimonial",children:te.icon&&l.jsx(Ht,{url:te.icon,fill:x,hoverFill:f,className:`${a}-arrow-img`})})})]})]})})},ad=`import cn from 'classnames';\r
3151
3151
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
3152
3152
  import { CommonComponentProps } from '../props';\r
3153
3153
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -3642,11 +3642,11 @@ type TestimonialsSettings = {\r
3642
3642
  icon?: string | null;\r
3643
3643
  };\r
3644
3644
  };\r
3645
- `,ad="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" 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" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),io={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},sd={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...io.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...io.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{autoplay:"on",controls:{mode:"On",icon:ad},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},ld={element:id,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:sd,sourceCode:od,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function cd(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function oo(e){return((e==null?void 0:e.trim().length)??0)>0}function Dr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function jr(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((i-t)/2,r)}}function dd(e){return`
3645
+ `,sd="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" 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" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),io={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ld={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...io.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...io.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{autoplay:"on",controls:{mode:"On",icon:sd},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},cd={element:od,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:ld,sourceCode:ad,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function dd(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function oo(e){return((e==null?void 0:e.trim().length)??0)>0}function Dr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function jr(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((i-t)/2,r)}}function ud(e){return`
3646
3646
  .${e}-wrapper {
3647
3647
  display: grid;
3648
3648
  align-items: start;
3649
- min-height: ${cd(48)};
3649
+ min-height: ${dd(48)};
3650
3650
  }
3651
3651
  .${e}-item {
3652
3652
  display: flex;
@@ -3669,6 +3669,7 @@ type TestimonialsSettings = {\r
3669
3669
  display: flex;
3670
3670
  justify-content: center;
3671
3671
  align-items: center;
3672
+ align-self: center;
3672
3673
  }
3673
3674
  .${e}-item-image-wrapper-fit-slider {
3674
3675
  display: grid;
@@ -3775,7 +3776,7 @@ type TestimonialsSettings = {\r
3775
3776
  }
3776
3777
  .${e}-type-b .${e}-item-image-link,
3777
3778
  .${e}-type-c .${e}-item-image-link {
3778
- align-items: flex-start;
3779
+ align-items: center;
3779
3780
  }
3780
3781
  .${e}-type-b .${e}-item-title,
3781
3782
  .${e}-type-b .${e}-item-subtitle,
@@ -3820,7 +3821,7 @@ type TestimonialsSettings = {\r
3820
3821
  height: auto;
3821
3822
  display: flex;
3822
3823
  flex-direction: column;
3823
- align-items: flex-start;
3824
+ align-items: center;
3824
3825
  }
3825
3826
  .${e}-lightbox-counter {
3826
3827
  margin: 0;
@@ -3844,7 +3845,7 @@ type TestimonialsSettings = {\r
3844
3845
  pointer-events: auto;
3845
3846
  z-index: 10;
3846
3847
  }
3847
- `}const Lt=500,ud=750,Mt="cubic-bezier(0.22, 1, 0.36, 1)";function Ft(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ao({media:e,className:t,style:n,onImageClick:r}){return Ft(e)?l.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):l.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function pd({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:a,onPrev:s,onNext:c,counterClassName:o,counterStyle:d}){const p=n==="cover",T=u.useRef(null),x=u.useRef(null),[y,g]=u.useState(null),[h,P]=u.useState(r?"opening":"open"),[C,f]=u.useState(!0),b=u.useRef(t),M=u.useCallback(()=>{const k=T.current,$=x.current;if(!k||!$)return;const O=k.getBoundingClientRect(),V=O.width,q=O.height,Y=$.naturalWidth,L=$.naturalHeight;if(!V||!q||!Y||!L)return;if(n==="cover"){g({width:V,height:q,left:O.left,top:O.top});return}const R=Y/L,B=V/q;if(R>B){const F=V/R;g({width:V,height:F,left:O.left,top:O.top+(q-F)/2})}else{const F=q*R;g({width:F,height:q,left:O.left+(V-F)/2,top:O.top})}},[n]);u.useEffect(()=>{M();const k=T.current;if(!k)return;const $=new ResizeObserver(()=>M());return $.observe(k),()=>$.disconnect()},[M,t]),u.useEffect(()=>{h==="opening"&&y&&P("open")},[h,y]),u.useEffect(()=>{if(h!=="closing")return;const k=setTimeout(()=>a(),Lt);return()=>clearTimeout(k)},[h,a]),u.useEffect(()=>{b.current!==t&&f(!1),b.current=t},[t]),u.useEffect(()=>{const k=$=>{$.key==="Escape"&&($.preventDefault(),$.stopPropagation(),h!=="closing"&&P("closing"))};return window.addEventListener("keydown",k,!0),()=>window.removeEventListener("keydown",k,!0)},[h]);const _=()=>{h!=="closing"&&P("closing")},E=h==="open",S=h==="closing",A=S&&i&&!!r,I=h==="opening"?r??y:A?r:y;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:_,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:E?1:0,transition:`opacity ${Lt}ms ${Mt}`,pointerEvents:"none"}}),l.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),l.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:E?1:0,transition:`opacity ${Lt}ms ${Mt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:E?1:0,transition:`opacity ${Lt}ms ${Mt}`},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]})}),I&&l.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:I.top,left:I.left,width:I.width,height:I.height,objectFit:n==="cover"?"cover":"contain",opacity:S&&!A?0:1,transition:S&&!A?`opacity ${Lt}ms ${Mt}`:A||C?`top ${Lt}ms ${Mt}, left ${Lt}ms ${Mt}, width ${Lt}ms ${Mt}, height ${Lt}ms ${Mt}`:"none",pointerEvents:"none",zIndex:9998}}),E&&y&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:y.top,left:y.left,width:y.width/2,height:y.height,cursor:"w-resize",zIndex:9999},onClick:k=>{k.stopPropagation(),s()}}),l.jsx("div",{style:{position:"fixed",top:y.top,left:y.left+y.width/2,width:y.width/2,height:y.height,cursor:"e-resize",zIndex:9999},onClick:k=>{k.stopPropagation(),c()}})]})]})}function md(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function gd({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:a,activeEvent:s,layoutId:c}){const{prefix:o}=w.useScopedStyles(),{type:d="a",gridLayout:p,textBoxWidth:T=100,verticalGap:x,entriesCount:y,lightbox:g,imageDisplay:h,lightboxImageDisplay:P,slider:C,sliderTiming:f,direction:b,transition:M,titleMarginTop:_,subtitleMarginTop:E,titleColor:S,subtitleColor:A,lightboxCounterColor:I,titleFontFamily:k,titleFontSettings:$,titleFontSize:O,titleLineHeight:V,titleLetterSpacing:q,titleWordSpacing:Y,titleTextAppearance:L,subtitleFontFamily:R,subtitleFontSettings:B,subtitleFontSize:F,subtitleLineHeight:W,subtitleLetterSpacing:j,subtitleWordSpacing:Q,subtitleTextAppearance:oe,lightboxCounterFontFamily:te,lightboxCounterFontSettings:ce,lightboxCounterFontSize:v,lightboxCounterLineHeight:ie,lightboxCounterLetterSpacing:$e,lightboxCounterWordSpacing:de,lightboxCounterTextAppearance:ye,showText:Re="always",alignEntries:re="off"}=e,N={fontSettings:{fontFamily:k,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:O??.01,lineHeight:V,letterSpacing:q??0,wordSpacing:Y??0,textAppearance:L,color:S},H={...Ct(nt(N,n))},D={fontSettings:{fontFamily:R,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:F??.01,lineHeight:W,letterSpacing:j??0,wordSpacing:Q??0,textAppearance:oe,color:A},ne={...Ct(nt(D,n))},ee={fontSettings:{fontFamily:te,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:v??.01,lineHeight:ie,letterSpacing:$e??0,wordSpacing:de??0,textAppearance:ye,color:I},ae={...Ct(nt(ee,n)),...jr(v,ie,o,n)},ge=Dr(O,V,`${o}-item-title`,`${o}-text-tight-leading`),me=Dr(F,W,`${o}-item-subtitle`,`${o}-text-tight-leading`),he=jr(O,V,o,n),K=jr(F,W,o,n),G=Dr(v,ie,`${o}-lightbox-counter`,`${o}-text-tight-leading`),z=w.buildColorVars(o,{titleColor:S,subtitleColor:A,lightboxCounterColor:I},hd,fd),ke=`${s&&s!=="default"?`${o}-state-${s}`:""}${Re==="on hover"&&(!n||r)?` ${o}-show-text-hover`:""}`.trim(),Je=y===0?1/0:y,Pe=(t??[]).slice(0,Je),Me=p.entryWidth??.2,Ee=(h==null?void 0:h.display)==="cover",je=(h==null?void 0:h.ratioValue)??"1:1",He=(h==null?void 0:h.reversed)??!1,[Ie,Ve]=je.split(":").map(Number),bt=`${He?Ve:Ie} / ${He?Ie:Ve}`,Tt=w.scalingValue(Me??0,n),Kt=!Ee&&C!=="off",xt={width:Tt,...Ee?{aspectRatio:bt,height:"auto",overflow:"hidden"}:{height:"auto"}},Ut=`${o}-item-image-wrapper${Kt?` ${o}-item-image-wrapper-fit-slider`:""}`.trim(),ve=d==="c",Ge=ve&&re==="on",ze=`calc(${w.scalingValue(Me??0,n)} * (${T} / 100))`,rt=w.scalingValue(Me*T/100,n),wn=Ee?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Tn,qt]=u.useState("ltr"),[tn,Ln]=u.useState(0),be=u.useRef(null);u.useEffect(()=>{const Te=be.current;if(!Te)return;const ot=new ResizeObserver(at=>{Ln(Math.round(at[0].contentRect.width))});return ot.observe(Te),()=>ot.disconnect()},[]);const Ye=(()=>{const Te={...z},ot=be.current?getComputedStyle(be.current).getPropertyValue("--cntrl-article-width").trim():"";return ot&&(Te["--cntrl-article-width"]=ot),Te})(),[De,Fe]=u.useState(!1),[it,Gn]=u.useState([]),[Ir,nn]=u.useState(0),[kr,Yn]=u.useState(null),Xn=(Te,ot,at)=>{if(n&&!r||g==="off")return;const X=Te.currentTarget.getBoundingClientRect();Yn({top:X.top,left:X.left,width:X.width,height:X.height}),Gn(ot),nn(at),Fe(!0)};u.useEffect(()=>{if(!De||g!=="on"||typeof document>"u")return;const Te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Te}},[De,g]),u.useEffect(()=>{!n||r||(Fe(!1),Yn(null))},[n,r]);const Wr=u.useMemo(()=>dd(o),[o]);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Wr}}),l.jsx("div",{style:z,children:l.jsx("div",{ref:be,className:`${o}-wrapper ${o}-type-${d}${Ge?` ${o}-align-entries`:""} ${ke}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:Ge?0:w.scalingValue(x??0,n),columnGap:w.scalingValue(p.horizontalGap??0,n),width:w.scalingValue(p.wrapperWidth??0,n),...Ge?{[`--${o}-align-entries-row-gap`]:w.scalingValue(x??0,n)}:{}},children:Pe.map((Te,ot)=>{var Ue,ct;const at=oo(Te.title),X=oo(Te.subtitle),ue=(((Ue=Te.link)==null?void 0:Ue.length)??0)>0&&g==="off"?Te.link:void 0,pe=Math.floor(ot/p.columnsCount)===Math.ceil(Pe.length/p.columnsCount)-1,xe=ve?l.jsxs("div",{className:`${o}-item-text-block`,children:[at&&l.jsx("p",{className:ge,style:{width:ze,...H,...he},children:Te.title}),at&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(_??0,n),width:rt}}),X&&l.jsx("p",{className:me,style:{width:ze,...ne,...K},children:Te.subtitle}),X&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(E??0,n),width:rt}})]}):null,Be=ve?l.jsxs("div",{className:`${o}-item-title-row`,children:[at&&l.jsx("p",{className:ge,style:{width:ze,...H,...he},children:Te.title}),at&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(_??0,n),width:rt}})]}):null,Ke=ve?l.jsxs("div",{className:`${o}-item-subtitle-row`,children:[X&&l.jsx("p",{className:me,style:{width:ze,...ne,...K},children:Te.subtitle}),X&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(E??0,n),width:rt}})]}):null,Ce=ue?l.jsxs("a",{href:ue,target:"_blank",className:`${o}-item-text-link`,children:[Be,Ke]}):l.jsxs(l.Fragment,{children:[Be,Ke]}),st=l.jsx("div",{className:Ut,style:xt,children:(((ct=Te.image)==null?void 0:ct.length)??0)===0?null:C==="off"?(()=>{const _e=Te.image[0],et=Te.image.filter(Xe=>!Ft(Xe)).map(Xe=>Xe.url);return l.jsx(ao,{media:_e,className:`${o}-item-${Ft(_e)?"video":"image"}`.trim(),style:wn,onImageClick:Ft(_e)?void 0:Xe=>Xn(Xe,et,0)})})():l.jsxs(l.Fragment,{children:[Kt&&l.jsx("div",{className:`${o}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Te.image.map(_e=>Ft(_e)?l.jsx("video",{src:_e.url,muted:!0,playsInline:!0},`sizer-${_e.url}`):l.jsx("img",{src:_e.url,alt:""},`sizer-${_e.url}`))}),l.jsx(wi,{className:`${o}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:f*1e3,width:"100%",height:"100%",speed:ud,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":b!=="random"?b==="horizontal"?"ltr":"ttb":Tn},onMoved:_e=>{if(b!=="random"||M==="fade")return;const Qe=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";qt(Qe),setTimeout(()=>{_e.refresh()},0)},children:Te.image.map((_e,Qe)=>{const et=Te.image.filter(qe=>!Ft(qe)),Xe=et.map(qe=>qe.url),rn=et.findIndex(qe=>qe.url===_e.url);return l.jsx(Ti,{children:l.jsx(ao,{media:_e,className:`${o}-item-${Ft(_e)?"video":"image"}`.trim(),style:wn,onImageClick:Ft(_e)?void 0:qe=>Xn(qe,Xe,rn)})},Qe)})},`${M}-${Me}-${b}-${f}-${tn}-${c}`)]})}),lt=ve?null:l.jsxs(l.Fragment,{children:[l.jsx("div",{"data-controls":i&&at?"titleMarginTop":void 0,className:i&&at?`${o}-control`:void 0,style:{height:at?w.scalingValue(_??0,n):0,width:rt}}),l.jsx("p",{className:ge,style:{width:ze,...H,...he},children:Te.title}),l.jsx("div",{"data-controls":i&&X?"subtitleMarginTop":void 0,className:i&&X?`${o}-control`:void 0,style:{height:X?w.scalingValue(E??0,n):0,width:rt}}),l.jsx("p",{className:me,style:{width:ze,...ne,...K},children:Te.subtitle})]});return l.jsx("div",{className:`${o}-item`.trim(),children:l.jsx("div",{className:`${i?`${o}-item-inner`:`${o}-item-inner-hidden`}${Ge&&pe?` ${o}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${w.scalingValue(Me??0,n)} * (${T} / 100))`:w.scalingValue(Me??0,n)},children:Ge?l.jsxs(l.Fragment,{children:[Ce,l.jsx("a",{href:ue,target:"_blank",className:`${o}-item-image-link`,children:st})]}):l.jsxs("a",{href:ue,target:"_blank",className:`${o}-item-image-link`,children:[xe,st,lt]})})},ot)})})}),(!n||r)&&De&&typeof document<"u"&&g==="on"&&So.createPortal(l.jsx("div",{style:Ye,"data-selection":"none",children:l.jsx(pd,{images:it,index:Ir,imageDisplay:md(P),originRect:kr,reverseClose:C==="off",onClose:()=>Fe(!1),onPrev:()=>nn(Te=>(Te-1+it.length)%it.length),onNext:()=>nn(Te=>(Te+1)%it.length),counterClassName:G,counterStyle:ae})}),document.body)]})}const hd={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},fd=["hover","focus","filled","success","error"],yd=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3848
+ `}const Lt=500,pd=750,Mt="cubic-bezier(0.22, 1, 0.36, 1)";function Ft(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ao({media:e,className:t,style:n,onImageClick:r}){return Ft(e)?l.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):l.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function md({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:a,onPrev:s,onNext:c,counterClassName:o,counterStyle:d}){const p=n==="cover",T=u.useRef(null),b=u.useRef(null),[y,g]=u.useState(null),[h,P]=u.useState(r?"opening":"open"),[x,f]=u.useState(!0),C=u.useRef(t),B=u.useCallback(()=>{const I=T.current,$=b.current;if(!I||!$)return;const O=I.getBoundingClientRect(),V=O.width,q=O.height,X=$.naturalWidth,L=$.naturalHeight;if(!V||!q||!X||!L)return;if(n==="cover"){g({width:V,height:q,left:O.left,top:O.top});return}const R=X/L,H=V/q;if(R>H){const M=V/R;g({width:V,height:M,left:O.left,top:O.top+(q-M)/2})}else{const M=q*R;g({width:M,height:q,left:O.left+(V-M)/2,top:O.top})}},[n]);u.useEffect(()=>{B();const I=T.current;if(!I)return;const $=new ResizeObserver(()=>B());return $.observe(I),()=>$.disconnect()},[B,t]),u.useEffect(()=>{h==="opening"&&y&&P("open")},[h,y]),u.useEffect(()=>{if(h!=="closing")return;const I=setTimeout(()=>a(),Lt);return()=>clearTimeout(I)},[h,a]),u.useEffect(()=>{C.current!==t&&f(!1),C.current=t},[t]),u.useEffect(()=>{const I=$=>{$.key==="Escape"&&($.preventDefault(),$.stopPropagation(),h!=="closing"&&P("closing"))};return window.addEventListener("keydown",I,!0),()=>window.removeEventListener("keydown",I,!0)},[h]);const _=()=>{h!=="closing"&&P("closing")},E=h==="open",S=h==="closing",A=S&&i&&!!r,k=h==="opening"?r??y:A?r:y;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:_,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:E?1:0,transition:`opacity ${Lt}ms ${Mt}`,pointerEvents:"none"}}),l.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),l.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:E?1:0,transition:`opacity ${Lt}ms ${Mt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:E?1:0,transition:`opacity ${Lt}ms ${Mt}`},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]})}),k&&l.jsx("img",{ref:b,src:e[t],onLoad:B,style:{position:"fixed",top:k.top,left:k.left,width:k.width,height:k.height,objectFit:n==="cover"?"cover":"contain",opacity:S&&!A?0:1,transition:S&&!A?`opacity ${Lt}ms ${Mt}`:A||x?`top ${Lt}ms ${Mt}, left ${Lt}ms ${Mt}, width ${Lt}ms ${Mt}, height ${Lt}ms ${Mt}`:"none",pointerEvents:"none",zIndex:9998}}),E&&y&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:y.top,left:y.left,width:y.width/2,height:y.height,cursor:"w-resize",zIndex:9999},onClick:I=>{I.stopPropagation(),s()}}),l.jsx("div",{style:{position:"fixed",top:y.top,left:y.left+y.width/2,width:y.width/2,height:y.height,cursor:"e-resize",zIndex:9999},onClick:I=>{I.stopPropagation(),c()}})]})]})}function gd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function hd({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:a,activeEvent:s,layoutId:c}){const{prefix:o}=w.useScopedStyles(),{type:d="a",gridLayout:p,textBoxWidth:T=100,verticalGap:b,entriesCount:y,lightbox:g,imageDisplay:h,lightboxImageDisplay:P,slider:x,sliderTiming:f,direction:C,transition:B,titleMarginTop:_,subtitleMarginTop:E,titleColor:S,subtitleColor:A,lightboxCounterColor:k,titleFontFamily:I,titleFontSettings:$,titleFontSize:O,titleLineHeight:V,titleLetterSpacing:q,titleWordSpacing:X,titleTextAppearance:L,subtitleFontFamily:R,subtitleFontSettings:H,subtitleFontSize:M,subtitleLineHeight:W,subtitleLetterSpacing:j,subtitleWordSpacing:Q,subtitleTextAppearance:oe,lightboxCounterFontFamily:te,lightboxCounterFontSettings:ce,lightboxCounterFontSize:v,lightboxCounterLineHeight:ie,lightboxCounterLetterSpacing:$e,lightboxCounterWordSpacing:de,lightboxCounterTextAppearance:ye,showText:Re="always",alignEntries:re="off"}=e,F={fontSettings:{fontFamily:I,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:O??.01,lineHeight:V,letterSpacing:q??0,wordSpacing:X??0,textAppearance:L,color:S},N={...Ct(nt(F,n))},D={fontSettings:{fontFamily:R,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:M??.01,lineHeight:W,letterSpacing:j??0,wordSpacing:Q??0,textAppearance:oe,color:A},ne={...Ct(nt(D,n))},ee={fontSettings:{fontFamily:te,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:v??.01,lineHeight:ie,letterSpacing:$e??0,wordSpacing:de??0,textAppearance:ye,color:k},ae={...Ct(nt(ee,n)),...jr(v,ie,o,n)},ge=Dr(O,V,`${o}-item-title`,`${o}-text-tight-leading`),me=Dr(M,W,`${o}-item-subtitle`,`${o}-text-tight-leading`),he=jr(O,V,o,n),K=jr(M,W,o,n),Y=Dr(v,ie,`${o}-lightbox-counter`,`${o}-text-tight-leading`),z=w.buildColorVars(o,{titleColor:S,subtitleColor:A,lightboxCounterColor:k},fd,yd),Ie=`${s&&s!=="default"?`${o}-state-${s}`:""}${Re==="on hover"&&(!n||r)?` ${o}-show-text-hover`:""}`.trim(),Je=y===0?1/0:y,Pe=(t??[]).slice(0,Je),Me=p.entryWidth??.2,Ee=(h==null?void 0:h.display)==="cover",je=(h==null?void 0:h.ratioValue)??"1:1",He=(h==null?void 0:h.reversed)??!1,[ke,Ve]=je.split(":").map(Number),bt=`${He?Ve:ke} / ${He?ke:Ve}`,Tt=w.scalingValue(Me??0,n),Kt=!Ee&&x!=="off",xt={width:Tt,...Ee?{aspectRatio:bt,height:"auto",overflow:"hidden"}:{height:"auto"}},Ut=`${o}-item-image-wrapper${Kt?` ${o}-item-image-wrapper-fit-slider`:""}`.trim(),ve=d==="c",Ge=ve&&re==="on",ze=`calc(${w.scalingValue(Me??0,n)} * (${T} / 100))`,rt=w.scalingValue(Me*T/100,n),wn=Ee?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Tn,qt]=u.useState("ltr"),[tn,Ln]=u.useState(0),be=u.useRef(null);u.useEffect(()=>{const Te=be.current;if(!Te)return;const ot=new ResizeObserver(at=>{Ln(Math.round(at[0].contentRect.width))});return ot.observe(Te),()=>ot.disconnect()},[]);const Ye=(()=>{const Te={...z},ot=be.current?getComputedStyle(be.current).getPropertyValue("--cntrl-article-width").trim():"";return ot&&(Te["--cntrl-article-width"]=ot),Te})(),[De,Fe]=u.useState(!1),[it,Yn]=u.useState([]),[kr,nn]=u.useState(0),[Ir,Xn]=u.useState(null),Zn=(Te,ot,at)=>{if(n&&!r||g==="off")return;const G=Te.currentTarget.getBoundingClientRect();Xn({top:G.top,left:G.left,width:G.width,height:G.height}),Yn(ot),nn(at),Fe(!0)};u.useEffect(()=>{if(!De||g!=="on"||typeof document>"u")return;const Te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Te}},[De,g]),u.useEffect(()=>{!n||r||(Fe(!1),Xn(null))},[n,r]);const Wr=u.useMemo(()=>ud(o),[o]);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Wr}}),l.jsx("div",{style:z,children:l.jsx("div",{ref:be,className:`${o}-wrapper ${o}-type-${d}${Ge?` ${o}-align-entries`:""} ${Ie}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:Ge?0:w.scalingValue(b??0,n),columnGap:w.scalingValue(p.horizontalGap??0,n),width:w.scalingValue(p.wrapperWidth??0,n),...Ge?{[`--${o}-align-entries-row-gap`]:w.scalingValue(b??0,n)}:{}},children:Pe.map((Te,ot)=>{var Ue,ct;const at=oo(Te.title),G=oo(Te.subtitle),ue=(((Ue=Te.link)==null?void 0:Ue.length)??0)>0&&g==="off"?Te.link:void 0,pe=Math.floor(ot/p.columnsCount)===Math.ceil(Pe.length/p.columnsCount)-1,xe=ve?l.jsxs("div",{className:`${o}-item-text-block`,children:[at&&l.jsx("p",{className:ge,style:{width:ze,...N,...he},children:Te.title}),at&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(_??0,n),width:rt}}),G&&l.jsx("p",{className:me,style:{width:ze,...ne,...K},children:Te.subtitle}),G&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(E??0,n),width:rt}})]}):null,Be=ve?l.jsxs("div",{className:`${o}-item-title-row`,children:[at&&l.jsx("p",{className:ge,style:{width:ze,...N,...he},children:Te.title}),at&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(_??0,n),width:rt}})]}):null,Ke=ve?l.jsxs("div",{className:`${o}-item-subtitle-row`,children:[G&&l.jsx("p",{className:me,style:{width:ze,...ne,...K},children:Te.subtitle}),G&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(E??0,n),width:rt}})]}):null,Ce=ue?l.jsxs("a",{href:ue,target:"_blank",className:`${o}-item-text-link`,children:[Be,Ke]}):l.jsxs(l.Fragment,{children:[Be,Ke]}),st=l.jsx("div",{className:Ut,style:xt,children:(((ct=Te.image)==null?void 0:ct.length)??0)===0?null:x==="off"?(()=>{const _e=Te.image[0],et=Te.image.filter(Xe=>!Ft(Xe)).map(Xe=>Xe.url);return l.jsx(ao,{media:_e,className:`${o}-item-${Ft(_e)?"video":"image"}`.trim(),style:wn,onImageClick:Ft(_e)?void 0:Xe=>Zn(Xe,et,0)})})():l.jsxs(l.Fragment,{children:[Kt&&l.jsx("div",{className:`${o}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Te.image.map(_e=>Ft(_e)?l.jsx("video",{src:_e.url,muted:!0,playsInline:!0},`sizer-${_e.url}`):l.jsx("img",{src:_e.url,alt:""},`sizer-${_e.url}`))}),l.jsx(wi,{className:`${o}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:f*1e3,width:"100%",height:"100%",speed:pd,type:B==="fade"?"fade":"loop",rewind:B==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:B==="fade"?"ltr":C!=="random"?C==="horizontal"?"ltr":"ttb":Tn},onMoved:_e=>{if(C!=="random"||B==="fade")return;const Qe=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";qt(Qe),setTimeout(()=>{_e.refresh()},0)},children:Te.image.map((_e,Qe)=>{const et=Te.image.filter(qe=>!Ft(qe)),Xe=et.map(qe=>qe.url),rn=et.findIndex(qe=>qe.url===_e.url);return l.jsx(Ti,{children:l.jsx(ao,{media:_e,className:`${o}-item-${Ft(_e)?"video":"image"}`.trim(),style:wn,onImageClick:Ft(_e)?void 0:qe=>Zn(qe,Xe,rn)})},Qe)})},`${B}-${Me}-${C}-${f}-${tn}-${c}`)]})}),lt=ve?null:l.jsxs(l.Fragment,{children:[l.jsx("div",{"data-controls":i&&at?"titleMarginTop":void 0,className:i&&at?`${o}-control`:void 0,style:{height:at?w.scalingValue(_??0,n):0,width:rt}}),l.jsx("p",{className:ge,style:{width:ze,...N,...he},children:Te.title}),l.jsx("div",{"data-controls":i&&G?"subtitleMarginTop":void 0,className:i&&G?`${o}-control`:void 0,style:{height:G?w.scalingValue(E??0,n):0,width:rt}}),l.jsx("p",{className:me,style:{width:ze,...ne,...K},children:Te.subtitle})]});return l.jsx("div",{className:`${o}-item`.trim(),children:l.jsx("div",{className:`${i?`${o}-item-inner`:`${o}-item-inner-hidden`}${Ge&&pe?` ${o}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${w.scalingValue(Me??0,n)} * (${T} / 100))`:w.scalingValue(Me??0,n)},children:Ge?l.jsxs(l.Fragment,{children:[Ce,l.jsx("a",{href:ue,target:"_blank",className:`${o}-item-image-link`,children:st})]}):l.jsxs("a",{href:ue,target:"_blank",className:`${o}-item-image-link`,children:[xe,st,lt]})})},ot)})})}),(!n||r)&&De&&typeof document<"u"&&g==="on"&&So.createPortal(l.jsx("div",{style:Ye,"data-selection":"none",children:l.jsx(md,{images:it,index:kr,imageDisplay:gd(P),originRect:Ir,reverseClose:x==="off",onClose:()=>Fe(!1),onPrev:()=>nn(Te=>(Te-1+it.length)%it.length),onNext:()=>nn(Te=>(Te+1)%it.length),counterClassName:Y,counterStyle:ae})}),document.body)]})}const fd={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},yd=["hover","focus","filled","success","error"],vd=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3848
3849
  import '@splidejs/react-splide/css/core';
3849
3850
  import { CommonComponentProps } from '../props';
3850
3851
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
@@ -3919,6 +3920,7 @@ function getCSS(P: string): string {
3919
3920
  display: flex;
3920
3921
  justify-content: center;
3921
3922
  align-items: center;
3923
+ align-self: center;
3922
3924
  }
3923
3925
  .\${P}-item-image-wrapper-fit-slider {
3924
3926
  display: grid;
@@ -4025,7 +4027,7 @@ function getCSS(P: string): string {
4025
4027
  }
4026
4028
  .\${P}-type-b .\${P}-item-image-link,
4027
4029
  .\${P}-type-c .\${P}-item-image-link {
4028
- align-items: flex-start;
4030
+ align-items: center;
4029
4031
  }
4030
4032
  .\${P}-type-b .\${P}-item-title,
4031
4033
  .\${P}-type-b .\${P}-item-subtitle,
@@ -4070,7 +4072,7 @@ function getCSS(P: string): string {
4070
4072
  height: auto;
4071
4073
  display: flex;
4072
4074
  flex-direction: column;
4073
- align-items: flex-start;
4075
+ align-items: center;
4074
4076
  }
4075
4077
  .\${P}-lightbox-counter {
4076
4078
  margin: 0;
@@ -5012,11 +5014,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5012
5014
  };
5013
5015
 
5014
5016
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5015
- `,zr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vd=["titleColor","subtitleColor","lightboxCounterColor"],bd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"bird's eye view over the old town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"doors of matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"cattedrale di santa maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"old city through the cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"private stone gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"exiting the old town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"laundry under the sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"city gates view",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"fortifications around the city",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Lightbox Counter Color",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Affigere-Regular",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"c",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"c",gridLayout:{entryWidth:.1736,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:100,verticalGap:.0694,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:55e-5,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:[{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...vd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},xd={element:gd,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:bd,sourceCode:yd};function cr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cd(e){return String(e??"").trim().length>0}function so(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function lo(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function co(e,t,n,r,i,a,s){const c=w.scalingValue(a,s),o=w.scalingValue(0,s),d=e===0,p=e===t-1&&!i;return{borderTopWidth:d&&n?c:o,borderBottomWidth:!p||r?c:o}}function Sd(e,t,n){const r=w.scalingValue(t,n),i=w.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const uo=10;function $d(e){return`
5017
+ `,zr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},bd=["titleColor","subtitleColor","lightboxCounterColor"],xd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"bird's eye view over the old town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"doors of matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"cattedrale di santa maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"old city through the cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"private stone gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"exiting the old town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"laundry under the sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"city gates view",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"fortifications around the city",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Lightbox Counter Color",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:[{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...bd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Cd={element:hd,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:xd,sourceCode:vd};function dr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sd(e){return String(e??"").trim().length>0}function so(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function lo(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function co(e,t,n,r,i,a,s){const c=w.scalingValue(a,s),o=w.scalingValue(0,s),d=e===0,p=e===t-1&&!i;return{borderTopWidth:d&&n?c:o,borderBottomWidth:!p||r?c:o}}function $d(e,t,n){const r=w.scalingValue(t,n),i=w.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const uo=10;function wd(e){return`
5016
5018
  .${e}-wrapper {
5017
5019
  display: grid;
5018
5020
  align-items: start;
5019
- min-height: ${cr(48)};
5021
+ min-height: ${dr(48)};
5020
5022
  position: relative;
5021
5023
  overflow: visible;
5022
5024
  box-sizing: border-box;
@@ -5138,7 +5140,7 @@ a.${e}-list-item {
5138
5140
  flex-shrink: 0;
5139
5141
  overflow: visible;
5140
5142
  box-sizing: border-box;
5141
- min-width: ${cr(50)};
5143
+ min-width: ${dr(50)};
5142
5144
  position: relative;
5143
5145
  display: flex;
5144
5146
  align-items: flex-start;
@@ -5146,7 +5148,7 @@ a.${e}-list-item {
5146
5148
 
5147
5149
  .${e}-list-col-last {
5148
5150
  flex: 1 1 auto;
5149
- min-width: ${cr(50)};
5151
+ min-width: ${dr(50)};
5150
5152
  }
5151
5153
 
5152
5154
  .${e}-list-col-title {
@@ -5443,7 +5445,7 @@ a.${e}-list-item {
5443
5445
  overflow-wrap: anywhere;
5444
5446
  word-break: break-word;
5445
5447
  }
5446
- `}const Vt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Li=["AColumn","BColumn","CColumn","DColumn","EColumn"],It="cutLabel",Ei=[...Li,It],Rr=["A","B","C","D","E"];function aa(e){return`${e}ColumnVerticalAlign`}const ri=["Top","Center","Bottom"];function Pi(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Rr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function wd(e){const t=Pi(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Td(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Rr.includes(n)?n:null}function sa(e,t,n){const r=Td(e);return r?r===t?!1:wd(n[aa(r)]):!0}function Nn(e){const t=Pi(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Rr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Ld(e,t,n){if(la(e,t,n))return Nn(e);const r=Nn(e);return r.kind==="baseline"?{kind:"top"}:r}function Ed(e){const t=Nn(e);return t.kind==="baseline"?{kind:"top"}:t}function la(e,t,n){return sa(e,n,t)?Nn(e).kind==="baseline":!1}function Pd(e){const t={};let n=!1;for(const r of Rr){const i=aa(r),a=e[i];if(e.type==="b"){const s=String(a??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[i]="Top",n=!0);continue}sa(a,r,e)||(t[i]="Top",n=!0)}return n?t:null}function _d(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Ad(e){const t=Nn(e).kind;return t==="baseline"?"center":t}function Rd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function po(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Id(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),a=i-r;return n.remove(),a}function Kr(e,t,n,r){const i=e.titleEl;if(!i)return 0;const a=i.closest(`.${n}`);if(!a)return 0;const s=Id(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+s;const c=a.getBoundingClientRect(),o=i.getBoundingClientRect().height;let d=0;return e.kind==="center"?d=(c.height-o)/2:e.kind==="bottom"&&(d=c.height-o),c.top-t+d+s}function kd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const a=i.querySelector(`.${n}`);a&&(a.style.minHeight=`${r}px`,a.style.height=`${r}px`)}),r)}function Wd(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Md={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Se(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Fd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Nd(e){return[Se(e,"textFontFamily"),Se(e,"textFontSettings"),{type:"row",items:[Se(e,"textFontSize"),Se(e,"textLineHeight"),Se(e,"textLetterSpacing"),Se(e,"textWordSpacing")]},Se(e,"textTextAlign"),Se(e,"textTextAppearance"),`${e}VerticalAlign`]}function Hd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ei.map(e=>[Fd[e],Nd(e)]))}}function vr(e,t){const n=r=>{const i=Se(t,r);return e[i]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===It?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function mo(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return Ct(nt(n,t))}function go(e,t,n,r){const i=vr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s!==void 0&&s<a?`${n} ${r}`:n}function ho(e,t,n,r){const i=vr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s===void 0||s>=a?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((a-s)/2,r)}}const mt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],yn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],vn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],bn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Bd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Od=["hover","focus","filled","success","error"],fo=.004,dn=.004,Ur=dn,yo=12,_i=50,Hn=1440,Bn=_i/Hn;function ca(e){const t=typeof e=="number"&&e>0?e:Hn;return _i/t}function Vd(e,t){const n={position:"absolute",width:yo,height:yo,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Et({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...i,children:l.jsx("div",{style:Vd(e,r)})})}function Dd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return Hn}const da={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function dr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function jd(e,t=1){const n=t/e;return Object.fromEntries(mt.map(r=>[r,n]))}function zd(){return Object.fromEntries([...yn.map(e=>[e,0]),...vn.map(e=>[e,0])])}function Kd(){return Object.fromEntries(bn.map(e=>[e,0]))}function rr(e){return Object.fromEntries(mt.map(t=>[t,typeof e[t]=="number"?e[t]:da[t]]))}function ua(e,t,n){const r=e-Bn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const a=r/i;return{paddingLeft:t*a,paddingRight:n*a}}function ur(e,t,n){const r=Ai(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((a,s)=>a+s,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function Ud(e,t,n){const r={};for(let i=0;i<e;i+=1){const a=yn[i],s=vn[i],c=typeof n[a]=="number"?n[a]:0,o=typeof n[s]=="number"?n[s]:0,d=ua(t[i]??0,c,o);d.paddingLeft!==c&&(r[a]=d.paddingLeft),d.paddingRight!==o&&(r[s]=d.paddingRight)}return r}function Ai(e,t,n){if(e<=0)return[];const r=mt.slice(0,e).map(d=>n[d]);if(e===1)return r;const i=r.slice(0,e-1),s=i.reduce((d,p)=>d+p,0)+Bn;if(t>=s)return r;const c=[...i];let o=s-t;for(let d=c.length-1;d>=0&&o>0;d-=1){const p=c[d]-Bn;if(p<=0)continue;const T=Math.min(o,p);c[d]-=T,o-=T}return[...c,r[e-1]]}function qd(e,t,n){if(e<=1)return{};const r=Ai(e,t,n),i={};for(let a=0;a<e-1;a+=1){const s=mt[a];r[a]!==n[s]&&(i[s]=r[a])}return i}function vo(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Vt]}function Gd(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Yd(e,t,n,r){const i=Math.min(r,e.length,mt.length),a={};for(let s=0;s<i;s+=1){const c=e[s],o=t.indexOf(c);if(o===-1)continue;const d=mt[o],p=yn[o],T=vn[o],x=bn[o],y=mt[s],g=yn[s],h=vn[s],P=bn[s],C=n[d],f=n[p],b=n[T],M=n[x];typeof C=="number"&&(a[y]=C),typeof f=="number"&&(a[g]=f),typeof b=="number"&&(a[h]=b),typeof M=="number"&&(a[P]=M)}return a}function Xd(e,t,n){const r=Pd(e);r&&(e={...e,...r});const i=ca(n==null?void 0:n.designWidth),a=e.columns,s=t.columns,c=dr(e),o=dr(t),d=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof a=="number"?a:typeof s=="number"?s:Vt.length,T=b=>{if(d)return b;const M=rr({...t,...b}),_=dr(b),E=ur(p,_,M),S=Ud(p,E,{...t,...b});return Object.keys(S).length===0?b:{...b,...S}};if(typeof a=="number"&&a!==s){const b={...e,...jd(a,c),...zd()};if(d)for(const M of bn)typeof t[M]=="number"&&(b[M]=t[M]);else Object.assign(b,Kd());return b}const x=vo(e),y=vo(t);if(!Gd(x,y))return T({...e,...Yd(x,y,t,p)});if(c<o&&typeof p=="number"&&!d){const b=rr({...t,...e});return T({...e,...qd(p,c,b)})}if(d){const b=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(c-i)/2);return b>M?{...e,textPaddingLR:M}:e}const g=rr({...t,...e}),h=ur(p,o,rr(t)),C=ur(p,c,g).some((b,M)=>b<(h[M]??b)),f=mt.some(b=>{const M=e[b],_=t[b];return typeof M=="number"&&typeof _=="number"&&M!==_});return C||f?T(e):e}function Zd(e,t,n,r){const i=t.slice(0,e).reduce((s,c)=>s+c,0),a=n.slice(e+1,t.length-1).reduce((s,c)=>s+c,0);return Math.max(Bn,r-i-a-Bn)}function Jd(e,t){return Math.random()*(t-e)+e}function Qd(e){return Object.fromEntries(mt.map(t=>[t,typeof e[t]=="number"?e[t]:da[t]]))}function qr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function eu(e,t,n,r,i,a){return e.slice(0,t).map((s,c)=>{const o=yn[c],d=vn[c],p=bn[c];return{key:s,textPrefix:Md[s],widthKey:mt[c],width:n[mt[c]],paddingLeftKey:o,paddingRightKey:d,paddingBottomKey:p,paddingLeft:r[o],paddingRight:i[d],paddingBottom:a[p]}})}function tu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:a,layoutId:s,onUpdateSettings:c}){const{prefix:o}=w.useScopedStyles(),d=!!i,{columns:p,type:T,wrapperWidth:x,entriesCount:y,cellMinHeight:g,dividerWidth:h,showVisibility:P,cut:C,showCut:f,cutCellMinHeight:b,cutLabel:M,imageSize:_,imageOnHover:E,entryHoverEffect:S,entryHoverShowOption:A,rowPaddingTop:I,rowPaddingBottom:k,rowPaddingTopB:$,columnsOrder:O,textPaddingLR:V,textColor:q,backgroundColor:Y,dividerColor:L,textHoverColor:R,backgroundHoverColor:B,dividerHoverColor:F}=e,[W,j]=u.useState(void 0),[Q,oe]=u.useState(null),te=E==="on"&&(!n||r),ce=(C??0)>0,v=T==="b",ie=u.useRef(null),$e=u.useRef(null),[de,ye]=u.useState(null),[Re,re]=u.useState(Hn),N=ca(Re),m=Math.max(0,((x??0)-N)/2),H=Math.min(V??0,m),D=Math.max(H,dn),U=((x??0)+N)/2;u.useLayoutEffect(()=>{if(!n){re(Hn);return}const X=()=>{re(Dd(ie.current))};X();const ue=ie.current;if(!ue)return;const pe=new ResizeObserver(X);pe.observe(ue);let xe=ue;for(;xe&&!xe.style.getPropertyValue("--cntrl-article-width");)xe=xe.parentElement;return xe&&pe.observe(xe),()=>pe.disconnect()},[n,s]),u.useEffect(()=>{j(void 0)},[C,f,t,y]),u.useEffect(()=>{n&&!r&&j(void 0)},[n,r]);const ne=w.buildColorVars(o,{textColor:q,backgroundColor:Y,dividerColor:L,textHoverColor:R,backgroundHoverColor:B,dividerHoverColor:F},Bd,Od),ee=a&&a!=="default"?`${o}-state-${a}`:"",ae=`${!n||r?S==="default"?`${o}-entry-hover-default`:S==="blinds"?`${o}-entry-hover-blinds`:S==="reveal"?`${o}-entry-hover-reveal`:"":""} ${ee}`.trim(),ge=S==="reveal"&&(!n||r),me=(P==null?void 0:P[0])??!1,he=(P==null?void 0:P[1])??!1,K=u.useRef(e),G=u.useRef(s);u.useEffect(()=>{if(!c||!n){K.current=e,G.current=s;return}if(G.current!==s){K.current=e,G.current=s;return}const X=K.current;if(!(X!==e))return;const pe=Xd(e,X,{designWidth:Re});K.current=e,pe!==e&&c(pe)},[e,c,n,s,Re]);const z=u.useMemo(()=>Qd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),le=u.useMemo(()=>qr(e,yn),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),we=u.useMemo(()=>qr(e,vn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),ke=u.useMemo(()=>qr(e,bn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Je=u.useMemo(()=>Array.isArray(O)&&O.length>0?O:[...Vt],[O]),Pe=u.useMemo(()=>eu(Je,p,z,le,we,ke),[Je,p,z,le,we,ke]),Me=dr(e),Ee=u.useMemo(()=>mt.slice(0,p).map(X=>z[X]),[p,z]),je=u.useMemo(()=>Ai(p,Me,z),[p,Me,z]),He=u.useMemo(()=>ur(p,Me,z),[p,Me,z]),Ie=u.useMemo(()=>Pe.map((X,ue)=>ua(He[ue]??0,X.paddingLeft,X.paddingRight)),[Pe,He]),Ve=u.useMemo(()=>{const X=y===0?1/0:y;return(t??[]).slice(0,X).map((pe,xe)=>({id:xe,cells:Object.fromEntries(Vt.map(Be=>[Be,pe[Be]??""])),image:pe.image,link:pe.link}))},[t,y]),dt=ce?W??C:Ve.length,vt=u.useMemo(()=>ce?Ve.slice(0,dt):Ve,[Ve,ce,dt]),bt=ce&&dt<Ve.length,Tt=vt.length>1||bt,Kt=[me?`${o}-divider-top`:"",he||Tt?`${o}-divider-bottom`:""].filter(Boolean).join(" "),xt=!n||r,Ut=()=>{if(!xt)return;const X=W??C;if(!f){j(Ve.length);return}j(Math.min(X+f,Ve.length))},ve=X=>w.scalingValue(X,n??!1),Ge=v?$??0:I??0,ze=k??0,rt=g??0,wn=Ge+rt/2,Tn=Math.max(ze,Ur),qt=co(0,vt.length,me,he,bt,h??0,n??!1).borderTopWidth,tn=de!=null?`${de}px`:`calc(${qt} + ${ve(wn)})`,Ln=v?"rowPaddingTopB":"rowPaddingTop",be=Pe[0],Ye=Pe[Pe.length-1],De=Ie[0],Fe=Ie[Ie.length-1],it=be&&De?Math.max(De.paddingLeft,dn):0,Gn=Ye&&Fe?Math.max(Fe.paddingRight,dn):0,Ir=Me,nn=X=>{const ue=ie.current;if(!ue)return{x:0,y:0};const pe=ue.getBoundingClientRect();return{x:X.clientX-pe.left+uo,y:X.clientY-pe.top+uo}},kr=(X,ue)=>{if(!te)return;const pe=X.image;if(!(pe!=null&&pe.url)){oe(null);return}const{x:xe,y:Be}=nn(ue),Ke=(_==null?void 0:_.min)??80,Ce=(_==null?void 0:_.max)??320,st=(Q==null?void 0:Q.rowId)===X.id?Q.widthPx:Jd(Ke,Ce);oe({rowId:X.id,url:pe.url,objectFit:pe.objectFit??"cover",widthPx:st,x:xe,y:Be})},Yn=X=>{if(!te||!Q)return;const{x:ue,y:pe}=nn(X);oe(xe=>!xe||xe.x===ue&&xe.y===pe?xe:{...xe,x:ue,y:pe})},Xn=()=>{oe(null)},Wr=X=>{ge&&so(X,o),te&&oe(null)},Te=X=>{ge&&lo(X,o)};u.useLayoutEffect(()=>{if(!d||v){ye(null);return}const X=$e.current,ue=X==null?void 0:X.parentElement;if(!X||!ue){ye(null);return}const pe=()=>{const Be=X.querySelector("[data-list-row]");if(!Be){ye(null);return}const Ke=ue.getBoundingClientRect(),Ce=Be.getBoundingClientRect();ye(Ce.top-Ke.top+Ce.height/2)};pe();const xe=new ResizeObserver(pe);return xe.observe(X),xe.observe(ue),()=>xe.disconnect()},[d,v,vt,Ge,ze,rt,t,e,Pe,He,Re,h,me,he,bt]);const ot=u.useMemo(()=>!v&&Li.some(X=>{const ue=X.charAt(0),pe=e[`${X}VerticalAlign`];return la(pe,e,ue)}),[v,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);u.useLayoutEffect(()=>{var st;const X=ie.current;if(!X)return;const ue=()=>{X.querySelectorAll("[data-list-col]").forEach(lt=>{lt.style.transform="";const Ue=lt.querySelector(`.${o}-list-col`);Ue&&(Ue.style.minHeight="",Ue.style.height="");const ct=lt.querySelector(`.${o}-list-col-title`);ct&&(ct.style.transform="")})};if(v||!ot){ue();return}const pe=()=>{const lt=Array.from(X.querySelectorAll("[data-list-row]")),Ue=`${o}-list-col`,ct=`${o}-baseline-probe`;lt.forEach(_e=>{_e.querySelectorAll("[data-list-col]").forEach(Qe=>{Qe.style.transform="";const et=Qe.querySelector(`.${Ue}`);et&&(et.style.minHeight="",et.style.height="");const Xe=Qe.querySelector(`.${o}-list-col-title`);Xe&&(Xe.style.transform="")})}),lt.forEach(_e=>{const Qe=Array.from(_e.querySelectorAll("[data-list-col]"));kd(_e,Qe,Ue)}),X.offsetHeight,lt.forEach(_e=>{const Qe=Array.from(_e.querySelectorAll("[data-list-col]")),et=_e.getBoundingClientRect().top,Xe=new Map,rn=Qe.map(Ne=>{const on=Ne.querySelector(`.${o}-list-col-title`),an={el:Ne,titleEl:on,letter:Ne.getAttribute("data-col-letter")??"",kind:Ne.getAttribute("data-valign")??"top",anchor:Ne.getAttribute("data-valign-anchor")};return Xe.set(an.letter,an),an}),qe=new Map,Zn=(Ne,on)=>{const an=qe.get(Ne.letter);if(an!==void 0)return an;const Ri=Ne.anchor?Xe.get(Ne.anchor):void 0;if(Ne.kind!=="baseline"||!Ri||on.has(Ne.letter)){const ki=Kr(Ne,et,Ue,ct);return qe.set(Ne.letter,ki),ki}on.add(Ne.letter);const ma=Zn(Ri,on);on.delete(Ne.letter);const ga=Kr(Ne,et,Ue,ct),ha=ma-ga;Wd(Ne.titleEl,ha);const Ii=Kr(Ne,et,Ue,ct);return qe.set(Ne.letter,Ii),Ii};rn.forEach(Ne=>Zn(Ne,new Set))})};let xe=null;const Be=()=>{xe===null&&(xe=requestAnimationFrame(()=>{xe=null,pe()}))};pe();const Ke=new ResizeObserver(()=>Be());Ke.observe(X);let Ce=!1;return typeof document<"u"&&((st=document.fonts)!=null&&st.ready)&&document.fonts.ready.then(()=>{Ce||Be()}),()=>{Ce=!0,xe!==null&&(cancelAnimationFrame(xe),xe=null),Ke.disconnect(),ue()}},[ot,v,e,t,Re,vt,He]);const at=u.useMemo(()=>$d(o),[o]);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:at}}),l.jsx("div",{style:ne,children:l.jsxs("div",{ref:ie,className:`${o}-wrapper ${ae}${Kt?` ${Kt}`:""}${v?` ${o}-type-b`:""}`.trim(),style:{width:w.scalingValue(x??0,n),...!v&&d?{[`--${o}-first-entry-handle-top`]:tn}:{}},onMouseMove:te?Yn:void 0,onMouseLeave:te?Xn:void 0,children:[l.jsxs("div",{style:{width:"100%",position:"relative"},children:[vt.map((X,ue)=>{var Ke;const pe=(((Ke=X.link)==null?void 0:Ke.length)??0)>0,xe=pe&&(!n||r)?"a":"div",Be=co(ue,vt.length,me,he,bt,h??0,n??!1);return l.jsxs(xe,{ref:ue===0?Ce=>{$e.current=Ce}:void 0,className:`${o}-list-item${pe||A==="always"?` ${o}-list-item-has-link`:""}`,...pe?{href:X.link,target:"_blank"}:{},style:Be,onMouseEnter:Ce=>{ge&&(pe||A==="always")&&so(Ce,o),te&&kr(X,Ce)},onMouseLeave:Ce=>{ge&&(pe||A==="always")&&lo(Ce,o)},children:[Ge>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:ve(Ge)}}),l.jsxs("div",{className:`${o}-list-cols-row${v?"":` ${o}-list-cols-row-h`}${d&&ue===0&&v?` ${o}-list-cols-row-controls`:""}`,...v?{}:{"data-list-row":""},style:v?void 0:{minHeight:ve(rt)},children:[Pe.map((Ce,st)=>{const lt=st===Pe.length-1,Ue=Ie[st],ct=Ce.paddingBottom,_e=Cd(X.cells[Ce.key]),Qe=v&&_e&&ct>0,et=v?{minHeight:ve(rt)}:{width:ve(He[st])},Xe=v?{paddingLeft:ve(H),paddingRight:ve(H)}:{paddingLeft:ve(Ue.paddingLeft),paddingRight:ve(Ue.paddingRight)},rn=Ce.textPrefix.charAt(0),qe=v?Ed(e[`${Ce.textPrefix}VerticalAlign`]):Ld(e[`${Ce.textPrefix}VerticalAlign`],e,rn),Zn=v&&_e&&d&&ue===0;return l.jsxs("div",{className:v?`${o}-list-col-wrap`:void 0,...v?{}:{"data-list-col":"","data-col-letter":rn,"data-valign":qe.kind,...qe.kind==="baseline"?{"data-valign-anchor":qe.anchorLetter}:{}},children:[l.jsx("div",{className:`${o}-list-col${lt?` ${o}-list-col-last`:""}`,style:{...Xe,...et,...v?{justifyContent:po(qe.kind)}:{}},"data-test":Ce.width,children:l.jsx("span",{className:go(e,Ce.textPrefix,`${o}-list-col-title`,`${o}-text-tight-leading`),style:{...mo(vr(e,Ce.textPrefix),n),...ho(e,Ce.textPrefix,o,n),...v?{}:_d(qe.kind)},children:X.cells[Ce.key]??null})}),Qe&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:ve(ct)}}),Zn&&l.jsx(Et,{P:o,"data-controls":Ce.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Math.max(ct,Ur))}})]},Ce.key)}),d&&ue===0&&v&&l.jsxs(l.Fragment,{children:[l.jsx(Et,{P:o,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(U),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ve(D),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(U),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ve(Math.max(D,Me-D)),width:ve(D),height:"100%"}})]})]}),!v&&ze>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:ve(ze)}}),d&&ue===0&&!v&&l.jsx(Et,{P:o,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Tn)}})]},X.id)}),d&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(Et,{P:o,"data-controls":Ln,"data-controls-static-handle":"",...v?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:v?"center":"left-y",areaStyle:{position:"absolute",top:qt,left:0,width:"100%",height:ve(Math.max(Ge,Ur))}})},"row-padding-handles"),d&&!v&&be&&Ye&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Et,{P:o,"data-controls":be.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(He[0]-((De==null?void 0:De.paddingRight)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(it),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":Ye.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(He[Pe.length-1]-((Fe==null?void 0:Fe.paddingLeft)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(Ir-Gn),width:ve(Gn),height:"100%"}})]},"column-edge-padding-handles"),d&&!v&&Pe.slice(0,-1).map((X,ue)=>{const pe=Pe[ue+1],xe=je.slice(0,ue+1).reduce((lt,Ue)=>lt+Ue,0),Be=Ie[ue],Ke=Ie[ue+1],Ce=Math.max(Be.paddingRight,dn),st=Math.max(Ke.paddingLeft,dn);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Et,{P:o,"data-controls":X.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(He[ue]-Be.paddingLeft),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(xe-Ce),width:ve(Ce),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":pe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(He[ue+1]-Ke.paddingRight),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(xe),width:ve(st),height:"100%"}})]},`${X.paddingRightKey}-padding`)}),d&&!v&&Pe.slice(0,-1).map((X,ue)=>{const pe=Zd(ue,je,Ee,Me),Be=je.slice(0,ue+1).reduce((Ke,Ce)=>Ke+Ce,0)-fo/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":X.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(_i),"data-controls-max-fraction":String(pe),"data-controls-variant":"column-width",className:`${o}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ve(Be),width:ve(fo),height:"calc(100%)",pointerEvents:"auto"}})},`${X.widthKey}-junction`)})]}),bt&&(()=>{const X=vr(e,It),ue=Ad(e.cutLabelVerticalAlign),pe=X.textTextAlign==="justify"||v;return l.jsx("button",{type:"button",className:`${o}-cut-item`,style:{minHeight:ve(b??0),cursor:xt?"pointer":"default",...Sd(he,h??0,n??!1)},onClick:xt?Ut:void 0,onMouseEnter:ge||te?Wr:void 0,onMouseLeave:ge?Te:void 0,children:l.jsx("div",{className:`${o}-list-cols-row`,style:{...v?{paddingLeft:ve(H),paddingRight:ve(H)}:{},justifyContent:Rd(X.textTextAlign),alignItems:po(ue)},children:l.jsx("span",{className:go(e,It,`${o}-cut-label`,`${o}-text-tight-leading`),style:{...mo(X,n),...ho(e,It,o,n),...pe?{width:"100%"}:{}},children:M})})})})(),te&&Q&&l.jsx("img",{className:`${o}-hover-image`,src:Q.url,alt:"",style:{width:cr(Q.widthPx),objectFit:Q.objectFit,left:Q.x,top:Q.y}})]})})]})}const nu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
5448
+ `}const Vt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Li=["AColumn","BColumn","CColumn","DColumn","EColumn"],kt="cutLabel",Ei=[...Li,kt],Rr=["A","B","C","D","E"];function aa(e){return`${e}ColumnVerticalAlign`}const ri=["Top","Center","Bottom"];function Pi(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Rr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Td(e){const t=Pi(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Ld(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Rr.includes(n)?n:null}function sa(e,t,n){const r=Ld(e);return r?r===t?!1:Td(n[aa(r)]):!0}function Hn(e){const t=Pi(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Rr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Ed(e,t,n){if(la(e,t,n))return Hn(e);const r=Hn(e);return r.kind==="baseline"?{kind:"top"}:r}function Pd(e){const t=Hn(e);return t.kind==="baseline"?{kind:"top"}:t}function la(e,t,n){return sa(e,n,t)?Hn(e).kind==="baseline":!1}function _d(e){const t={};let n=!1;for(const r of Rr){const i=aa(r),a=e[i];if(e.type==="b"){const s=String(a??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[i]="Top",n=!0);continue}sa(a,r,e)||(t[i]="Top",n=!0)}return n?t:null}function Ad(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Rd(e){const t=Hn(e).kind;return t==="baseline"?"center":t}function kd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function po(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Id(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),a=i-r;return n.remove(),a}function Kr(e,t,n,r){const i=e.titleEl;if(!i)return 0;const a=i.closest(`.${n}`);if(!a)return 0;const s=Id(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+s;const c=a.getBoundingClientRect(),o=i.getBoundingClientRect().height;let d=0;return e.kind==="center"?d=(c.height-o)/2:e.kind==="bottom"&&(d=c.height-o),c.top-t+d+s}function Wd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const a=i.querySelector(`.${n}`);a&&(a.style.minHeight=`${r}px`,a.style.height=`${r}px`)}),r)}function Md(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Fd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Se(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Nd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Hd(e){return[Se(e,"textFontFamily"),Se(e,"textFontSettings"),{type:"row",items:[Se(e,"textFontSize"),Se(e,"textLineHeight"),Se(e,"textLetterSpacing"),Se(e,"textWordSpacing")]},Se(e,"textTextAlign"),Se(e,"textTextAppearance"),`${e}VerticalAlign`]}function Bd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ei.map(e=>[Nd[e],Hd(e)]))}}function vr(e,t){const n=r=>{const i=Se(t,r);return e[i]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===kt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function mo(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return Ct(nt(n,t))}function go(e,t,n,r){const i=vr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s!==void 0&&s<a?`${n} ${r}`:n}function ho(e,t,n,r){const i=vr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s===void 0||s>=a?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((a-s)/2,r)}}const mt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],yn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],vn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],bn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Od={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Vd=["hover","focus","filled","success","error"],fo=.004,dn=.004,Ur=dn,yo=12,_i=50,Bn=1440,On=_i/Bn;function ca(e){const t=typeof e=="number"&&e>0?e:Bn;return _i/t}function Dd(e,t){const n={position:"absolute",width:yo,height:yo,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Et({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...i,children:l.jsx("div",{style:Dd(e,r)})})}function jd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return Bn}const da={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function _n(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function zd(e,t=1){const n=t/e;return Object.fromEntries(mt.map(r=>[r,n]))}function Kd(){return Object.fromEntries([...yn.map(e=>[e,0]),...vn.map(e=>[e,0])])}function Ud(){return Object.fromEntries(bn.map(e=>[e,0]))}function ir(e){return Object.fromEntries(mt.map(t=>[t,typeof e[t]=="number"?e[t]:da[t]]))}function ua(e,t,n){const r=e-On,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const a=r/i;return{paddingLeft:t*a,paddingRight:n*a}}function ur(e,t,n){const r=Ai(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((a,s)=>a+s,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function qd(e,t,n){const r={};for(let i=0;i<e;i+=1){const a=yn[i],s=vn[i],c=typeof n[a]=="number"?n[a]:0,o=typeof n[s]=="number"?n[s]:0,d=ua(t[i]??0,c,o);d.paddingLeft!==c&&(r[a]=d.paddingLeft),d.paddingRight!==o&&(r[s]=d.paddingRight)}return r}function Ai(e,t,n){if(e<=0)return[];const r=mt.slice(0,e).map(d=>n[d]);if(e===1)return r;const i=r.slice(0,e-1),s=i.reduce((d,p)=>d+p,0)+On;if(t>=s)return r;const c=[...i];let o=s-t;for(let d=c.length-1;d>=0&&o>0;d-=1){const p=c[d]-On;if(p<=0)continue;const T=Math.min(o,p);c[d]-=T,o-=T}return[...c,r[e-1]]}function Gd(e,t,n){if(e<=1)return{};const r=Ai(e,t,n),i={};for(let a=0;a<e-1;a+=1){const s=mt[a];r[a]!==n[s]&&(i[s]=r[a])}return i}function vo(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Vt]}function Yd(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Xd(e,t,n,r){const i=Math.min(r,e.length,mt.length),a={};for(let s=0;s<i;s+=1){const c=e[s],o=t.indexOf(c);if(o===-1)continue;const d=mt[o],p=yn[o],T=vn[o],b=bn[o],y=mt[s],g=yn[s],h=vn[s],P=bn[s],x=n[d],f=n[p],C=n[T],B=n[b];typeof x=="number"&&(a[y]=x),typeof f=="number"&&(a[g]=f),typeof C=="number"&&(a[h]=C),typeof B=="number"&&(a[P]=B)}return a}function pa(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r])return!0;return!1}function Zd(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const i=_n(e),a=e.type==="b"||e.type===void 0&&t.type==="b",s={...e,...zd(n,i),...Kd()};if(a)for(const c of bn)typeof t[c]=="number"&&(s[c]=t[c]);else Object.assign(s,Ud());return pa(e,s)?s:e}function Jd(e,t,n){const r=_d(e);r&&(e={...e,...r});const i=ca(n==null?void 0:n.designWidth),a=e.columns,s=t.columns,c=_n(e),o=_n(t),d=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof a=="number"?a:typeof s=="number"?s:Vt.length,T=C=>{if(d)return C;const B=ir({...t,...C}),_=_n(C),E=ur(p,_,B),S=qd(p,E,{...t,...C});return Object.keys(S).length===0?C:{...C,...S}};if(typeof a=="number"&&a!==s)return e;const b=vo(e),y=vo(t);if(!Yd(b,y))return T({...e,...Xd(b,y,t,p)});if(c<o&&typeof p=="number"&&!d){const C=ir({...t,...e});return T({...e,...Gd(p,c,C)})}if(d){const C=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,B=Math.max(0,(c-i)/2);return C>B?{...e,textPaddingLR:B}:e}const g=ir({...t,...e}),h=ur(p,o,ir(t)),x=ur(p,c,g).some((C,B)=>C<(h[B]??C)),f=mt.some(C=>{const B=e[C],_=t[C];return typeof B=="number"&&typeof _=="number"&&B!==_});return x||f?T(e):e}function Qd(e,t,n,r){const i=t.slice(0,e).reduce((s,c)=>s+c,0),a=n.slice(e+1,t.length-1).reduce((s,c)=>s+c,0);return Math.max(On,r-i-a-On)}function eu(e,t){return Math.random()*(t-e)+e}function tu(e){return Object.fromEntries(mt.map(t=>[t,typeof e[t]=="number"?e[t]:da[t]]))}function qr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function nu(e,t,n,r,i,a){return e.slice(0,t).map((s,c)=>{const o=yn[c],d=vn[c],p=bn[c];return{key:s,textPrefix:Fd[s],widthKey:mt[c],width:n[mt[c]],paddingLeftKey:o,paddingRightKey:d,paddingBottomKey:p,paddingLeft:r[o],paddingRight:i[d],paddingBottom:a[p]}})}function ru({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:a,layoutId:s,onUpdateSettings:c}){const{prefix:o}=w.useScopedStyles(),d=!!i,{columns:p,type:T,wrapperWidth:b,entriesCount:y,cellMinHeight:g,dividerWidth:h,showVisibility:P,cut:x,showCut:f,cutCellMinHeight:C,cutLabel:B,imageSize:_,imageOnHover:E,entryHoverEffect:S,entryHoverShowOption:A,rowPaddingTop:k,rowPaddingBottom:I,rowPaddingTopB:$,columnsOrder:O,textPaddingLR:V,textColor:q,backgroundColor:X,dividerColor:L,textHoverColor:R,backgroundHoverColor:H,dividerHoverColor:M}=e,[W,j]=u.useState(void 0),[Q,oe]=u.useState(null),te=E==="on"&&(!n||r),ce=(x??0)>0,v=T==="b",ie=u.useRef(null),$e=u.useRef(null),[de,ye]=u.useState(null),[Re,re]=u.useState(Bn),F=ca(Re),m=Math.max(0,((b??0)-F)/2),N=Math.min(V??0,m),D=Math.max(N,dn),U=((b??0)+F)/2;u.useLayoutEffect(()=>{if(!n){re(Bn);return}const G=()=>{re(jd(ie.current))};G();const ue=ie.current;if(!ue)return;const pe=new ResizeObserver(G);pe.observe(ue);let xe=ue;for(;xe&&!xe.style.getPropertyValue("--cntrl-article-width");)xe=xe.parentElement;return xe&&pe.observe(xe),()=>pe.disconnect()},[n,s]),u.useEffect(()=>{j(void 0)},[x,f,t,y]),u.useEffect(()=>{n&&!r&&j(void 0)},[n,r]);const ne=w.buildColorVars(o,{textColor:q,backgroundColor:X,dividerColor:L,textHoverColor:R,backgroundHoverColor:H,dividerHoverColor:M},Od,Vd),ee=a&&a!=="default"?`${o}-state-${a}`:"",ae=`${!n||r?S==="default"?`${o}-entry-hover-default`:S==="blinds"?`${o}-entry-hover-blinds`:S==="reveal"?`${o}-entry-hover-reveal`:"":""} ${ee}`.trim(),ge=S==="reveal"&&(!n||r),me=(P==null?void 0:P[0])??!1,he=(P==null?void 0:P[1])??!1,K=u.useRef(e),Y=u.useRef(s);u.useEffect(()=>{if(!c||!n){K.current=e,Y.current=s;return}if(Y.current!==s){K.current=e,Y.current=s;return}const G=K.current;if(!(G!==e))return;if(typeof G.columns=="number"&&typeof e.columns=="number"&&G.columns!==e.columns){K.current=e;return}const pe=Jd(e,G,{designWidth:Re});K.current=e,pa(e,pe)&&c(pe)},[e,c,n,s,Re]);const z=u.useMemo(()=>tu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),le=u.useMemo(()=>qr(e,yn),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),we=u.useMemo(()=>qr(e,vn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ie=u.useMemo(()=>qr(e,bn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Je=u.useMemo(()=>Array.isArray(O)&&O.length>0?O:[...Vt],[O]),Pe=u.useMemo(()=>nu(Je,p,z,le,we,Ie),[Je,p,z,le,we,Ie]),Me=_n(e),Ee=u.useMemo(()=>mt.slice(0,p).map(G=>z[G]),[p,z]),je=u.useMemo(()=>Ai(p,Me,z),[p,Me,z]),He=u.useMemo(()=>ur(p,Me,z),[p,Me,z]),ke=u.useMemo(()=>Pe.map((G,ue)=>ua(He[ue]??0,G.paddingLeft,G.paddingRight)),[Pe,He]),Ve=u.useMemo(()=>{const G=y===0?1/0:y;return(t??[]).slice(0,G).map((pe,xe)=>({id:xe,cells:Object.fromEntries(Vt.map(Be=>[Be,pe[Be]??""])),image:pe.image,link:pe.link}))},[t,y]),dt=ce?W??x:Ve.length,vt=u.useMemo(()=>ce?Ve.slice(0,dt):Ve,[Ve,ce,dt]),bt=ce&&dt<Ve.length,Tt=vt.length>1||bt,Kt=[me?`${o}-divider-top`:"",he||Tt?`${o}-divider-bottom`:""].filter(Boolean).join(" "),xt=!n||r,Ut=()=>{if(!xt)return;const G=W??x;if(!f){j(Ve.length);return}j(Math.min(G+f,Ve.length))},ve=G=>w.scalingValue(G,n??!1),Ge=v?$??0:k??0,ze=I??0,rt=g??0,wn=Ge+rt/2,Tn=Math.max(ze,Ur),qt=co(0,vt.length,me,he,bt,h??0,n??!1).borderTopWidth,tn=de!=null?`${de}px`:`calc(${qt} + ${ve(wn)})`,Ln=v?"rowPaddingTopB":"rowPaddingTop",be=Pe[0],Ye=Pe[Pe.length-1],De=ke[0],Fe=ke[ke.length-1],it=be&&De?Math.max(De.paddingLeft,dn):0,Yn=Ye&&Fe?Math.max(Fe.paddingRight,dn):0,kr=Me,nn=G=>{const ue=ie.current;if(!ue)return{x:0,y:0};const pe=ue.getBoundingClientRect();return{x:G.clientX-pe.left+uo,y:G.clientY-pe.top+uo}},Ir=(G,ue)=>{if(!te)return;const pe=G.image;if(!(pe!=null&&pe.url)){oe(null);return}const{x:xe,y:Be}=nn(ue),Ke=(_==null?void 0:_.min)??80,Ce=(_==null?void 0:_.max)??320,st=(Q==null?void 0:Q.rowId)===G.id?Q.widthPx:eu(Ke,Ce);oe({rowId:G.id,url:pe.url,objectFit:pe.objectFit??"cover",widthPx:st,x:xe,y:Be})},Xn=G=>{if(!te||!Q)return;const{x:ue,y:pe}=nn(G);oe(xe=>!xe||xe.x===ue&&xe.y===pe?xe:{...xe,x:ue,y:pe})},Zn=()=>{oe(null)},Wr=G=>{ge&&so(G,o),te&&oe(null)},Te=G=>{ge&&lo(G,o)};u.useLayoutEffect(()=>{if(!d||v){ye(null);return}const G=$e.current,ue=G==null?void 0:G.parentElement;if(!G||!ue){ye(null);return}const pe=()=>{const Be=G.querySelector("[data-list-row]");if(!Be){ye(null);return}const Ke=ue.getBoundingClientRect(),Ce=Be.getBoundingClientRect();ye(Ce.top-Ke.top+Ce.height/2)};pe();const xe=new ResizeObserver(pe);return xe.observe(G),xe.observe(ue),()=>xe.disconnect()},[d,v,vt,Ge,ze,rt,t,e,Pe,He,Re,h,me,he,bt]);const ot=u.useMemo(()=>!v&&Li.some(G=>{const ue=G.charAt(0),pe=e[`${G}VerticalAlign`];return la(pe,e,ue)}),[v,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);u.useLayoutEffect(()=>{var st;const G=ie.current;if(!G)return;const ue=()=>{G.querySelectorAll("[data-list-col]").forEach(lt=>{lt.style.transform="";const Ue=lt.querySelector(`.${o}-list-col`);Ue&&(Ue.style.minHeight="",Ue.style.height="");const ct=lt.querySelector(`.${o}-list-col-title`);ct&&(ct.style.transform="")})};if(v||!ot){ue();return}const pe=()=>{const lt=Array.from(G.querySelectorAll("[data-list-row]")),Ue=`${o}-list-col`,ct=`${o}-baseline-probe`;lt.forEach(_e=>{_e.querySelectorAll("[data-list-col]").forEach(Qe=>{Qe.style.transform="";const et=Qe.querySelector(`.${Ue}`);et&&(et.style.minHeight="",et.style.height="");const Xe=Qe.querySelector(`.${o}-list-col-title`);Xe&&(Xe.style.transform="")})}),lt.forEach(_e=>{const Qe=Array.from(_e.querySelectorAll("[data-list-col]"));Wd(_e,Qe,Ue)}),G.offsetHeight,lt.forEach(_e=>{const Qe=Array.from(_e.querySelectorAll("[data-list-col]")),et=_e.getBoundingClientRect().top,Xe=new Map,rn=Qe.map(Ne=>{const on=Ne.querySelector(`.${o}-list-col-title`),an={el:Ne,titleEl:on,letter:Ne.getAttribute("data-col-letter")??"",kind:Ne.getAttribute("data-valign")??"top",anchor:Ne.getAttribute("data-valign-anchor")};return Xe.set(an.letter,an),an}),qe=new Map,Jn=(Ne,on)=>{const an=qe.get(Ne.letter);if(an!==void 0)return an;const Ri=Ne.anchor?Xe.get(Ne.anchor):void 0;if(Ne.kind!=="baseline"||!Ri||on.has(Ne.letter)){const Ii=Kr(Ne,et,Ue,ct);return qe.set(Ne.letter,Ii),Ii}on.add(Ne.letter);const ga=Jn(Ri,on);on.delete(Ne.letter);const ha=Kr(Ne,et,Ue,ct),fa=ga-ha;Md(Ne.titleEl,fa);const ki=Kr(Ne,et,Ue,ct);return qe.set(Ne.letter,ki),ki};rn.forEach(Ne=>Jn(Ne,new Set))})};let xe=null;const Be=()=>{xe===null&&(xe=requestAnimationFrame(()=>{xe=null,pe()}))};pe();const Ke=new ResizeObserver(()=>Be());Ke.observe(G);let Ce=!1;return typeof document<"u"&&((st=document.fonts)!=null&&st.ready)&&document.fonts.ready.then(()=>{Ce||Be()}),()=>{Ce=!0,xe!==null&&(cancelAnimationFrame(xe),xe=null),Ke.disconnect(),ue()}},[ot,v,e,t,Re,vt,He]);const at=u.useMemo(()=>wd(o),[o]);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:at}}),l.jsx("div",{style:ne,children:l.jsxs("div",{ref:ie,className:`${o}-wrapper ${ae}${Kt?` ${Kt}`:""}${v?` ${o}-type-b`:""}`.trim(),style:{width:w.scalingValue(b??0,n),...!v&&d?{[`--${o}-first-entry-handle-top`]:tn}:{}},onMouseMove:te?Xn:void 0,onMouseLeave:te?Zn:void 0,children:[l.jsxs("div",{style:{width:"100%",position:"relative"},children:[vt.map((G,ue)=>{var Ke;const pe=(((Ke=G.link)==null?void 0:Ke.length)??0)>0,xe=pe&&(!n||r)?"a":"div",Be=co(ue,vt.length,me,he,bt,h??0,n??!1);return l.jsxs(xe,{ref:ue===0?Ce=>{$e.current=Ce}:void 0,className:`${o}-list-item${pe||A==="always"?` ${o}-list-item-has-link`:""}`,...pe?{href:G.link,target:"_blank"}:{},style:Be,onMouseEnter:Ce=>{ge&&(pe||A==="always")&&so(Ce,o),te&&Ir(G,Ce)},onMouseLeave:Ce=>{ge&&(pe||A==="always")&&lo(Ce,o)},children:[Ge>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:ve(Ge)}}),l.jsxs("div",{className:`${o}-list-cols-row${v?"":` ${o}-list-cols-row-h`}${d&&ue===0&&v?` ${o}-list-cols-row-controls`:""}`,...v?{}:{"data-list-row":""},style:v?void 0:{minHeight:ve(rt)},children:[Pe.map((Ce,st)=>{const lt=st===Pe.length-1,Ue=ke[st],ct=Ce.paddingBottom,_e=Sd(G.cells[Ce.key]),Qe=v&&_e&&ct>0,et=v?{minHeight:ve(rt)}:{width:ve(He[st])},Xe=v?{paddingLeft:ve(N),paddingRight:ve(N)}:{paddingLeft:ve(Ue.paddingLeft),paddingRight:ve(Ue.paddingRight)},rn=Ce.textPrefix.charAt(0),qe=v?Pd(e[`${Ce.textPrefix}VerticalAlign`]):Ed(e[`${Ce.textPrefix}VerticalAlign`],e,rn),Jn=v&&_e&&d&&ue===0;return l.jsxs("div",{className:v?`${o}-list-col-wrap`:void 0,...v?{}:{"data-list-col":"","data-col-letter":rn,"data-valign":qe.kind,...qe.kind==="baseline"?{"data-valign-anchor":qe.anchorLetter}:{}},children:[l.jsx("div",{className:`${o}-list-col${lt?` ${o}-list-col-last`:""}`,style:{...Xe,...et,...v?{justifyContent:po(qe.kind)}:{}},"data-test":Ce.width,children:l.jsx("span",{className:go(e,Ce.textPrefix,`${o}-list-col-title`,`${o}-text-tight-leading`),style:{...mo(vr(e,Ce.textPrefix),n),...ho(e,Ce.textPrefix,o,n),...v?{}:Ad(qe.kind)},children:G.cells[Ce.key]??null})}),Qe&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:ve(ct)}}),Jn&&l.jsx(Et,{P:o,"data-controls":Ce.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Math.max(ct,Ur))}})]},Ce.key)}),d&&ue===0&&v&&l.jsxs(l.Fragment,{children:[l.jsx(Et,{P:o,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(U),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ve(D),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(U),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ve(Math.max(D,Me-D)),width:ve(D),height:"100%"}})]})]}),!v&&ze>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:ve(ze)}}),d&&ue===0&&!v&&l.jsx(Et,{P:o,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Tn)}})]},G.id)}),d&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(Et,{P:o,"data-controls":Ln,"data-controls-static-handle":"",...v?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:v?"center":"left-y",areaStyle:{position:"absolute",top:qt,left:0,width:"100%",height:ve(Math.max(Ge,Ur))}})},"row-padding-handles"),d&&!v&&be&&Ye&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Et,{P:o,"data-controls":be.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(He[0]-((De==null?void 0:De.paddingRight)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(it),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":Ye.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(He[Pe.length-1]-((Fe==null?void 0:Fe.paddingLeft)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(kr-Yn),width:ve(Yn),height:"100%"}})]},"column-edge-padding-handles"),d&&!v&&Pe.slice(0,-1).map((G,ue)=>{const pe=Pe[ue+1],xe=je.slice(0,ue+1).reduce((lt,Ue)=>lt+Ue,0),Be=ke[ue],Ke=ke[ue+1],Ce=Math.max(Be.paddingRight,dn),st=Math.max(Ke.paddingLeft,dn);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Et,{P:o,"data-controls":G.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(He[ue]-Be.paddingLeft),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(xe-Ce),width:ve(Ce),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":pe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(He[ue+1]-Ke.paddingRight),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(xe),width:ve(st),height:"100%"}})]},`${G.paddingRightKey}-padding`)}),d&&!v&&Pe.slice(0,-1).map((G,ue)=>{const pe=Qd(ue,je,Ee,Me),Be=je.slice(0,ue+1).reduce((Ke,Ce)=>Ke+Ce,0)-fo/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":G.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(_i),"data-controls-max-fraction":String(pe),"data-controls-variant":"column-width",className:`${o}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ve(Be),width:ve(fo),height:"calc(100%)",pointerEvents:"auto"}})},`${G.widthKey}-junction`)})]}),bt&&(()=>{const G=vr(e,kt),ue=Rd(e.cutLabelVerticalAlign),pe=G.textTextAlign==="justify"||v;return l.jsx("button",{type:"button",className:`${o}-cut-item`,style:{minHeight:ve(C??0),cursor:xt?"pointer":"default",...$d(he,h??0,n??!1)},onClick:xt?Ut:void 0,onMouseEnter:ge||te?Wr:void 0,onMouseLeave:ge?Te:void 0,children:l.jsx("div",{className:`${o}-list-cols-row`,style:{...v?{paddingLeft:ve(N),paddingRight:ve(N)}:{},justifyContent:kd(G.textTextAlign),alignItems:po(ue)},children:l.jsx("span",{className:go(e,kt,`${o}-cut-label`,`${o}-text-tight-leading`),style:{...mo(G,n),...ho(e,kt,o,n),...pe?{width:"100%"}:{}},children:B})})})})(),te&&Q&&l.jsx("img",{className:`${o}-hover-image`,src:Q.url,alt:"",style:{width:dr(Q.widthPx),objectFit:Q.objectFit,left:Q.x,top:Q.y}})]})})]})}const iu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
5447
5449
  import { CommonComponentProps } from '../props';
5448
5450
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
5449
5451
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -7039,6 +7041,57 @@ function getColumnLayoutUpdatesForOrderChange(
7039
7041
  return updates;
7040
7042
  }
7041
7043
 
7044
+ function hasListSettingsChanges(
7045
+ current: ListSettings,
7046
+ updated: ListSettings,
7047
+ ): boolean {
7048
+ const keys = new Set([
7049
+ ...Object.keys(current),
7050
+ ...Object.keys(updated),
7051
+ ]);
7052
+
7053
+ for (const key of keys) {
7054
+ if (current[key as keyof ListSettings] !== updated[key as keyof ListSettings]) {
7055
+ return true;
7056
+ }
7057
+ }
7058
+
7059
+ return false;
7060
+ }
7061
+
7062
+ export function applyListColumnCountChange(
7063
+ nextSettings: ListSettings,
7064
+ prevSettings: ListSettings,
7065
+ ): ListSettings {
7066
+ const nextColumns = nextSettings.columns;
7067
+ const prevColumns = prevSettings.columns;
7068
+
7069
+ if (typeof nextColumns !== 'number' || nextColumns === prevColumns) {
7070
+ return nextSettings;
7071
+ }
7072
+
7073
+ const nextContentWidth = getListEffectiveContentWidth(nextSettings);
7074
+ const isVerticalLayout = nextSettings.type === 'b'
7075
+ || (nextSettings.type === undefined && prevSettings.type === 'b');
7076
+ const updates: ListSettings = {
7077
+ ...nextSettings,
7078
+ ...getEqualListColumnWidthUpdates(nextColumns, nextContentWidth),
7079
+ ...getResetListColumnPaddingUpdates(),
7080
+ };
7081
+
7082
+ if (isVerticalLayout) {
7083
+ for (const key of COLUMN_PADDING_BOTTOM_KEYS) {
7084
+ if (typeof prevSettings[key] === 'number') {
7085
+ updates[key] = prevSettings[key];
7086
+ }
7087
+ }
7088
+ } else {
7089
+ Object.assign(updates, getResetListColumnPaddingBottomUpdates());
7090
+ }
7091
+
7092
+ return hasListSettingsChanges(nextSettings, updates) ? updates : nextSettings;
7093
+ }
7094
+
7042
7095
  export function applyListSettingsChange(
7043
7096
  nextSettings: ListSettings,
7044
7097
  prevSettings: ListSettings,
@@ -7089,23 +7142,7 @@ export function applyListSettingsChange(
7089
7142
  };
7090
7143
 
7091
7144
  if (typeof nextColumns === 'number' && nextColumns !== prevColumns) {
7092
- const updates: ListSettings = {
7093
- ...nextSettings,
7094
- ...getEqualListColumnWidthUpdates(nextColumns, nextContentWidth),
7095
- ...getResetListColumnPaddingUpdates(),
7096
- };
7097
-
7098
- if (isVerticalLayout) {
7099
- for (const key of COLUMN_PADDING_BOTTOM_KEYS) {
7100
- if (typeof prevSettings[key] === 'number') {
7101
- updates[key] = prevSettings[key];
7102
- }
7103
- }
7104
- } else {
7105
- Object.assign(updates, getResetListColumnPaddingBottomUpdates());
7106
- }
7107
-
7108
- return updates;
7145
+ return nextSettings;
7109
7146
  }
7110
7147
 
7111
7148
  const nextOrder = getColumnsOrder(nextSettings);
@@ -7383,6 +7420,15 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
7383
7420
  return;
7384
7421
  }
7385
7422
 
7423
+ if (
7424
+ typeof prevSettings.columns === 'number'
7425
+ && typeof settings.columns === 'number'
7426
+ && prevSettings.columns !== settings.columns
7427
+ ) {
7428
+ prevSettingsRef.current = settings;
7429
+ return;
7430
+ }
7431
+
7386
7432
  const updatedSettings = applyListSettingsChange(
7387
7433
  settings,
7388
7434
  prevSettings,
@@ -7391,7 +7437,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
7391
7437
 
7392
7438
  prevSettingsRef.current = settings;
7393
7439
 
7394
- if (updatedSettings === settings) {
7440
+ if (!hasListSettingsChanges(settings, updatedSettings)) {
7395
7441
  return;
7396
7442
  }
7397
7443
 
@@ -8341,4 +8387,4 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8341
8387
  </>
8342
8388
  );
8343
8389
  }
8344
- `,$n=["A","B","C","D","E"],bo=[...ri,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Yt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",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"]}}}};function ru(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function ir(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function iu(){return Object.fromEntries($n.map((e,t)=>{const n=Vt[t],r=`${e} column`;return[n,ru(r)]}))}function ou(){const e={};for(const t of $n)e[`${t}ColumnWidth`]=ir(`${t} column width`),e[`${t}ColumnPaddingLeft`]=ir(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=ir(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=ir(`${t} column padding bottom`);return e}function xo(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Vt]};for(const a of $n)r[`${a}ColumnWidth`]=a==="A"?.0798:.32,r[`${a}ColumnPaddingLeft`]=0,r[`${a}ColumnPaddingRight`]=0,r[`${a}ColumnPaddingBottom`]=0;const i=n.type==="b"&&t?t:{};return{...r,...i,...n}}function au(e){const t={};if(e===It)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ri]},enum:[...ri]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...bo],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...bo]}}return t[Se(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Se(e,"textFontSettings")]={...Yt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Se(e,"textFontSize")]={...Yt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Se(e,"textLineHeight")]={...Yt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Se(e,"textLetterSpacing")]={...Yt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Se(e,"textWordSpacing")]={...Yt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Se(e,"textTextAlign")]={...Yt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Se(e,"textTextAppearance")]={...Yt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const su=Ei.reduce((e,t)=>({...e,...au(t)}),{});function lu(e){return{verticalAlign:e===It?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===It?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function cu(e,t={}){var n;return{...lu(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Co=new Set(["textFontFamily","textFontSettings"]);function du(e,t,n){const r=a=>n===void 0?!0:n==="common"?Co.has(a):!Co.has(a),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=Pi(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[Se(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[Se(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[Se(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[Se(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[Se(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[Se(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[Se(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[Se(e,"textTextAppearance")]=t.textTextAppearance),i}function pr(e={},t){return Ei.reduce((n,r)=>({...n,...du(r,cu(r,e),t)}),{})}const uu=pr(),pu=Hd();function pa(e){return[Se(e,"textFontFamily"),Se(e,"textFontSettings"),Se(e,"textFontSize"),Se(e,"textLineHeight"),Se(e,"textLetterSpacing"),Se(e,"textWordSpacing"),Se(e,"textTextAlign"),Se(e,"textTextAppearance"),`${e}VerticalAlign`]}function mu(){const e=[];return Li.forEach((t,n)=>{const r=Vt[n],i=pa(t);for(let a=1;a<Vt.length;a+=1){const s=[{name:"columns",value:a},...Array.from({length:a},(c,o)=>({name:`columnsOrder.${o}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:s,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const gu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],hu=["cutLabel","cutCellMinHeight","showCut"],fu=pa(It),yu=[...hu,...fu],vu=[...$n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Xt=[{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(1).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(2).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(3).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(4).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(5).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(6).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(7).webp"}],bu=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Xt[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Xt[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Xt[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Xt[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Xt[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Xt[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Xt[6],link:""}],xu=[...$n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Cu={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...iu(),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:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:bu},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...ou(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...su,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...uu,...pr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:xo({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...pr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:xo({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...pr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:0,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...mu(),...yu.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...vu.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...$n.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...xu]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:[{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[pu]}],paletteBookmark:{items:[...gu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Su={element:tu,id:"list",name:"Default List",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Cu,sourceCode:nu},$u=[Tl,Il,xc,_c,Bc,Zc,nd,ld,xd,Su];exports.components=$u;exports.isSchemaV1=fa;
8390
+ `,$n=["A","B","C","D","E"],bo=[...ri,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Yt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",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"]}}}};function ou(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function or(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function au(){return Object.fromEntries($n.map((e,t)=>{const n=Vt[t],r=`${e} column`;return[n,ou(r)]}))}function su(){const e={};for(const t of $n)e[`${t}ColumnWidth`]=or(`${t} column width`),e[`${t}ColumnPaddingLeft`]=or(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=or(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=or(`${t} column padding bottom`);return e}function xo(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Vt]};for(const a of $n)r[`${a}ColumnWidth`]=a==="A"?.0798:.32,r[`${a}ColumnPaddingLeft`]=0,r[`${a}ColumnPaddingRight`]=0,r[`${a}ColumnPaddingBottom`]=0;const i=n.type==="b"&&t?t:{};return{...r,...i,...n}}function lu(e){const t={};if(e===kt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ri]},enum:[...ri]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...bo],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...bo]}}return t[Se(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Se(e,"textFontSettings")]={...Yt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Se(e,"textFontSize")]={...Yt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Se(e,"textLineHeight")]={...Yt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Se(e,"textLetterSpacing")]={...Yt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Se(e,"textWordSpacing")]={...Yt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Se(e,"textTextAlign")]={...Yt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Se(e,"textTextAppearance")]={...Yt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const cu=Ei.reduce((e,t)=>({...e,...lu(t)}),{});function du(e){return{verticalAlign:e===kt?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===kt?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function uu(e,t={}){var n;return{...du(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Co=new Set(["textFontFamily","textFontSettings"]);function pu(e,t,n){const r=a=>n===void 0?!0:n==="common"?Co.has(a):!Co.has(a),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=Pi(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[Se(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[Se(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[Se(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[Se(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[Se(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[Se(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[Se(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[Se(e,"textTextAppearance")]=t.textTextAppearance),i}function pr(e={},t){return Ei.reduce((n,r)=>({...n,...pu(r,uu(r,e),t)}),{})}const mu=pr(),gu=Bd();function ma(e){return[Se(e,"textFontFamily"),Se(e,"textFontSettings"),Se(e,"textFontSize"),Se(e,"textLineHeight"),Se(e,"textLetterSpacing"),Se(e,"textWordSpacing"),Se(e,"textTextAlign"),Se(e,"textTextAppearance"),`${e}VerticalAlign`]}function hu(){const e=[];return Li.forEach((t,n)=>{const r=Vt[n],i=ma(t);for(let a=1;a<Vt.length;a+=1){const s=[{name:"columns",value:a},...Array.from({length:a},(c,o)=>({name:`columnsOrder.${o}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:s,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const fu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],yu=["cutLabel","cutCellMinHeight","showCut"],vu=ma(kt),bu=[...yu,...vu],xu=[...$n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Xt=[{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(1).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(2).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(3).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(4).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(5).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(6).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(7).webp"}],Cu=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Xt[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Xt[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Xt[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Xt[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Xt[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Xt[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Xt[6],link:""}],Su=[...$n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],$u={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...au(),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:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Cu},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...su(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...cu,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...mu,...pr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:xo({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...pr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:xo({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...pr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...hu(),...bu.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...xu.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...$n.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Su]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:[{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[gu]}],paletteBookmark:{items:[...fu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},wu={element:ru,id:"list",name:"Default List",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:Zd,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:$u,sourceCode:iu},Tu=[Ll,Il,Cc,Ac,Oc,Jc,rd,cd,Cd,wu];exports.components=Tu;exports.isSchemaV1=ya;