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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +25 -25
  2. package/dist/index.mjs +800 -729
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),p=require("react"),Te=require("classnames"),w=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Jo=require("react-dom");function Xi(e){return e.type==="object"&&e.version===1}const Zi="ControlSlider-module__wrapper___sHEkd",Ji="ControlSlider-module__hoverArrow___A-dOH",Qi="ControlSlider-module__sliderItem___QQSkR",ea="ControlSlider-module__sliderImage___9hRl-",ta="ControlSlider-module__arrow___05ghY",na="ControlSlider-module__arrowVertical___tBfVN",ra="ControlSlider-module__nextArrow___-30Yc",oa="ControlSlider-module__arrowInner___aEra3",ia="ControlSlider-module__arrowIcon___S4ztF",aa="ControlSlider-module__arrowImg___2dwJW",sa="ControlSlider-module__mirror___brd6U",la="ControlSlider-module__pagination___bicLF",ca="ControlSlider-module__paginationInner___bT-P-",da="ControlSlider-module__paginationVertical___zYqKw",ua="ControlSlider-module__paginationItem___nTRbk",pa="ControlSlider-module__dot___p1Qun",ma="ControlSlider-module__activeDot___LHFaj",ga="ControlSlider-module__paginationInsideBottom___R3FWn",ha="ControlSlider-module__paginationInsideTop___V-qb-",fa="ControlSlider-module__paginationOutsideBottom___14w8D",ya="ControlSlider-module__paginationOutsideTop___SCLqB",va="ControlSlider-module__paginationInsideLeft___yOBRZ",ba="ControlSlider-module__paginationInsideRight___Rtt3o",xa="ControlSlider-module__paginationOutsideLeft___lahaw",Ca="ControlSlider-module__paginationOutsideRight___EtuQa",Sa="ControlSlider-module__imgWrapper___UjEgB",wa="ControlSlider-module__captionBlock___dJ6-j",$a="ControlSlider-module__captionTextWrapper___HFlpf",Ta="ControlSlider-module__captionText___uGBVc",La="ControlSlider-module__active___WZK4G",Ea="ControlSlider-module__withPointerEvents___t-18M",Pa="ControlSlider-module__topLeftAlignment___zjnGM",_a="ControlSlider-module__topCenterAlignment___gD1xW",Aa="ControlSlider-module__topRightAlignment___NMapS",Ra="ControlSlider-module__middleLeftAlignment___OnUrY",Ia="ControlSlider-module__middleCenterAlignment___Tdkl0",Wa="ControlSlider-module__middleRightAlignment___wEbfX",ka="ControlSlider-module__bottomLeftAlignment___cTP2-",Fa="ControlSlider-module__bottomCenterAlignment___c54fB",Ma="ControlSlider-module__bottomRightAlignment___kEwrz",Ha="ControlSlider-module__clickOverlay___DZA28",Na="ControlSlider-module__contain___pLyq7",Ba="ControlSlider-module__cover___KdDat",ae={wrapper:Zi,hoverArrow:Ji,sliderItem:Qi,sliderImage:ea,arrow:ta,arrowVertical:na,nextArrow:ra,arrowInner:oa,arrowIcon:ia,arrowImg:aa,mirror:sa,pagination:la,paginationInner:ca,paginationVertical:da,paginationItem:ua,dot:pa,activeDot:ma,paginationInsideBottom:ga,paginationInsideTop:ha,paginationOutsideBottom:fa,paginationOutsideTop:ya,paginationInsideLeft:va,paginationInsideRight:ba,paginationOutsideLeft:xa,paginationOutsideRight:Ca,imgWrapper:Sa,captionBlock:wa,captionTextWrapper:$a,captionText:Ta,active:La,withPointerEvents:Ea,topLeftAlignment:Pa,topCenterAlignment:_a,topRightAlignment:Aa,middleLeftAlignment:Ra,middleCenterAlignment:Ia,middleRightAlignment:Wa,bottomLeftAlignment:ka,bottomCenterAlignment:Fa,bottomRightAlignment:Ma,clickOverlay:Ha,contain:Na,cover:Ba};function Oa(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 Va(e,t,n){return t&&Oa(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ho="(prefers-reduced-motion: reduce)",Gt=1,Da=2,Zt=3,rn=4,$n=5,jn=6,Xn=7,ja={CREATED:Gt,MOUNTED:Da,IDLE:Zt,MOVING:rn,SCROLLING:$n,DRAGGING:jn,DESTROYED:Xn};function St(e){e.length=0}function It(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ie(e){return e.bind.apply(e,[null].concat(It(arguments,1)))}var Qo=setTimeout,Pr=function(){};function fo(e){return requestAnimationFrame(e)}function nr(e,t){return typeof t===e}function mn(e){return!Br(e)&&nr("object",e)}var Nr=Array.isArray,ei=Ie(nr,"function"),_t=Ie(nr,"string"),Tn=Ie(nr,"undefined");function Br(e){return e===null}function ti(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ln(e){return Nr(e)?e:[e]}function rt(e,t){Ln(e).forEach(t)}function Or(e,t){return e.indexOf(t)>-1}function zn(e,t){return e.push.apply(e,Ln(t)),e}function vt(e,t,n){e&&rt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function mt(e,t){vt(e,_t(t)?t.split(" "):t,!0)}function En(e,t){rt(t,e.appendChild.bind(e))}function Vr(e,t){rt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function gn(e,t){return ti(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ni(e,t){var n=e?It(e.children):[];return t?n.filter(function(r){return gn(r,t)}):n}function Pn(e,t){return t?ni(e,t)[0]:e.firstElementChild}var hn=Object.keys;function Bt(e,t,n){return e&&(n?hn(e).reverse():hn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function fn(e){return It(arguments,1).forEach(function(t){Bt(t,function(n,r){e[r]=t[r]})}),e}function Et(e){return It(arguments,1).forEach(function(t){Bt(t,function(n,r){Nr(n)?e[r]=n.slice():mn(n)?e[r]=Et({},mn(e[r])?e[r]:{},n):e[r]=n})}),e}function yo(e,t){rt(t||hn(e),function(n){delete e[n]})}function gt(e,t){rt(e,function(n){rt(t,function(r){n&&n.removeAttribute(r)})})}function he(e,t,n){mn(t)?Bt(t,function(r,o){he(e,o,r)}):rt(e,function(r){Br(n)||n===""?gt(r,t):r.setAttribute(t,String(n))})}function Yt(e,t,n){var r=document.createElement(e);return t&&(_t(t)?mt(r,t):he(r,t)),n&&En(n,r),r}function at(e,t,n){if(Tn(n))return getComputedStyle(e)[t];Br(n)||(e.style[t]=""+n)}function yn(e,t){at(e,"display",t)}function ri(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function st(e,t){return e.getAttribute(t)}function vo(e,t){return e&&e.classList.contains(t)}function et(e){return e.getBoundingClientRect()}function Ot(e){rt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function oi(e){return Pn(new DOMParser().parseFromString(e,"text/html").body)}function yt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ii(e,t){return e&&e.querySelector(t)}function Dr(e,t){return t?It(e.querySelectorAll(t)):[]}function bt(e,t){vt(e,t,!1)}function _r(e){return e.timeStamp}function Mt(e){return _t(e)?e:e?e+"px":""}var _n="splide",jr="data-"+_n;function un(e,t){if(!e)throw new Error("["+_n+"] "+(t||""))}var At=Math.min,Zn=Math.max,Jn=Math.floor,vn=Math.ceil,Ge=Math.abs;function ai(e,t,n){return Ge(e-t)<n}function Kn(e,t,n,r){var o=At(t,n),s=Zn(t,n);return r?o<e&&e<s:o<=e&&e<=s}function Kt(e,t,n){var r=At(t,n),o=Zn(t,n);return At(Zn(r,e),o)}function Ar(e){return+(e>0)-+(e<0)}function Rr(e,t){return rt(t,function(n){e=e.replace("%s",""+n)}),e}function zr(e){return e<10?"0"+e:""+e}var bo={};function za(e){return""+e+zr(bo[e]=(bo[e]||0)+1)}function si(){var e=[];function t(i,a,c,u){o(i,a,function(d,L,h){var f="addEventListener"in d,m=f?d.removeEventListener.bind(d,L,c,u):d.removeListener.bind(d,c);f?d.addEventListener(L,c,u):d.addListener(c),e.push([d,L,h,c,m])})}function n(i,a,c){o(i,a,function(u,d,L){e=e.filter(function(h){return h[0]===u&&h[1]===d&&h[2]===L&&(!c||h[3]===c)?(h[4](),!1):!0})})}function r(i,a,c){var u,d=!0;return typeof CustomEvent=="function"?u=new CustomEvent(a,{bubbles:d,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(a,d,!1,c)),i.dispatchEvent(u),u}function o(i,a,c){rt(i,function(u){u&&rt(a,function(d){d.split(" ").forEach(function(L){var h=L.split(".");c(u,h[0],h[1])})})})}function s(){e.forEach(function(i){i[4]()}),St(e)}return{bind:t,unbind:n,dispatch:r,destroy:s}}var Wt="mounted",Ir="ready",wt="move",on="moved",Kr="click",li="active",ci="inactive",di="visible",ui="hidden",Be="refresh",Ke="updated",Jt="resize",rr="resized",pi="drag",mi="dragging",gi="dragged",or="scroll",Dt="scrolled",Ka="overflow",qr="destroy",hi="arrows:mounted",fi="arrows:updated",yi="pagination:mounted",vi="pagination:updated",Ur="navigation:mounted",Gr="autoplay:play",bi="autoplay:playing",Yr="autoplay:pause",Xr="lazyload:loaded",xi="sk",Ci="sh",Qn="ei";function ke(e){var t=e?e.event.bus:document.createDocumentFragment(),n=si();function r(s,i){n.bind(t,Ln(s).join(" "),function(a){i.apply(i,Nr(a.detail)?a.detail:[])})}function o(s){n.dispatch(t,s,It(arguments,1))}return e&&e.event.on(qr,n.destroy),fn(n,{bus:t,on:r,off:Ie(n.unbind,t),emit:o})}function ir(e,t,n,r){var o=Date.now,s,i=0,a,c=!0,u=0;function d(){if(!c){if(i=e?At((o()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=o(),r&&++u>=r))return h();a=fo(d)}}function L(v){v||m(),s=o()-(v?i*e:0),c=!1,a=fo(d)}function h(){c=!0}function f(){s=o(),i=0,n&&n(i)}function m(){a&&cancelAnimationFrame(a),i=0,a=0,c=!0}function g(v){e=v}function $(){return c}return{start:L,rewind:f,pause:h,cancel:m,set:g,isPaused:$}}function qa(e){var t=e;function n(o){t=o}function r(o){return Or(Ln(o),t)}return{set:n,is:r}}function Ua(e,t){var n=ir(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Ga(e,t,n){var r=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},i=si(),a=[];function c(){var m=n.mediaQuery==="min";hn(o).sort(function(g,$){return m?+g-+$:+$-+g}).forEach(function(g){d(o[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),d(s,ho),L()}function u(m){m&&i.destroy()}function d(m,g){var $=matchMedia(g);i.bind($,"change",L),a.push([m,$])}function L(){var m=r.is(Xn),g=n.direction,$=a.reduce(function(v,C){return Et(v,C[1].matches?C[0]:{})},{});yo(n),f($),n.destroy?e.destroy(n.destroy==="completely"):m?(u(!0),e.mount()):g!==n.direction&&e.refresh()}function h(m){matchMedia(ho).matches&&(m?Et(n,s):yo(n,hn(s)))}function f(m,g,$){Et(n,m),g&&Et(Object.getPrototypeOf(n),m),($||!r.is(Gt))&&e.emit(Ke,n)}return{setup:c,destroy:u,reduce:h,set:f}}var ar="Arrow",sr=ar+"Left",lr=ar+"Right",Si=ar+"Up",wi=ar+"Down",xo="rtl",cr="ttb",fr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Si,lr],ArrowRight:[wi,sr]};function Ya(e,t,n){function r(s,i,a){a=a||n.direction;var c=a===xo&&!i?1:a===cr?0:-1;return fr[s]&&fr[s][c]||s.replace(/width|left|right/i,function(u,d){var L=fr[u.toLowerCase()][c]||u;return d>0?L.charAt(0).toUpperCase()+L.slice(1):L})}function o(s){return s*(n.direction===xo?1:-1)}return{resolve:r,orient:o}}var xt="role",Xt="tabindex",Xa="disabled",lt="aria-",An=lt+"controls",$i=lt+"current",Co=lt+"selected",tt=lt+"label",Zr=lt+"labelledby",Ti=lt+"hidden",Jr=lt+"orientation",bn=lt+"roledescription",So=lt+"live",wo=lt+"busy",$o=lt+"atomic",Qr=[xt,Xt,Xa,An,$i,tt,Zr,Ti,Jr,bn],ht=_n+"__",kt="is-",yr=_n,To=ht+"track",Za=ht+"list",dr=ht+"slide",Li=dr+"--clone",Ja=dr+"__container",eo=ht+"arrows",ur=ht+"arrow",Ei=ur+"--prev",Pi=ur+"--next",pr=ht+"pagination",_i=pr+"__page",Qa=ht+"progress",es=Qa+"__bar",ts=ht+"toggle",ns=ht+"spinner",rs=ht+"sr",os=kt+"initialized",Vt=kt+"active",Ai=kt+"prev",Ri=kt+"next",Wr=kt+"visible",kr=kt+"loading",Ii=kt+"focus-in",Wi=kt+"overflow",is=[Vt,Wr,Ai,Ri,kr,Ii,Wi],as={slide:dr,clone:Li,arrows:eo,arrow:ur,prev:Ei,next:Pi,pagination:pr,page:_i,spinner:ns};function ss(e,t){if(ei(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!gn(n,t);)n=n.parentElement;return n}var ls=5,Lo=200,ki="touchstart mousedown",vr="touchmove mousemove",br="touchend touchcancel mouseup click";function cs(e,t,n){var r=ke(e),o=r.on,s=r.bind,i=e.root,a=n.i18n,c={},u=[],d=[],L=[],h,f,m;function g(){y(),M(),C()}function $(){o(Be,v),o(Be,g),o(Ke,C),s(document,ki+" keydown",function(x){m=x.type==="keydown"},{capture:!0}),s(i,"focusin",function(){vt(i,Ii,!!m)})}function v(x){var _=Qr.concat("style");St(u),bt(i,d),bt(h,L),gt([h,f],_),gt(i,x?_:["style",bn])}function C(){bt(i,d),bt(h,L),d=A(yr),L=A(To),mt(i,d),mt(h,L),he(i,tt,n.label),he(i,Zr,n.labelledby)}function y(){h=H("."+To),f=Pn(h,"."+Za),un(h&&f,"A track/list element is missing."),zn(u,ni(f,"."+dr+":not(."+Li+")")),Bt({arrows:eo,pagination:pr,prev:Ei,next:Pi,bar:es,toggle:ts},function(x,_){c[_]=H("."+x)}),fn(c,{root:i,track:h,list:f,slides:u})}function M(){var x=i.id||za(_n),_=n.role;i.id=x,h.id=h.id||x+"-track",f.id=f.id||x+"-list",!st(i,xt)&&i.tagName!=="SECTION"&&_&&he(i,xt,_),he(i,bn,a.carousel),he(f,xt,"presentation")}function H(x){var _=ii(i,x);return _&&ss(_,"."+yr)===i?_:void 0}function A(x){return[x+"--"+n.type,x+"--"+n.direction,n.drag&&x+"--draggable",n.isNavigation&&x+"--nav",x===yr&&Vt]}return fn(c,{setup:g,mount:$,destroy:v})}var Qt="slide",an="loop",Rn="fade";function ds(e,t,n,r){var o=ke(e),s=o.on,i=o.emit,a=o.bind,c=e.Components,u=e.root,d=e.options,L=d.isNavigation,h=d.updateOnMove,f=d.i18n,m=d.pagination,g=d.slideFocus,$=c.Direction.resolve,v=st(r,"style"),C=st(r,tt),y=n>-1,M=Pn(r,"."+Ja),H;function A(){y||(r.id=u.id+"-slide"+zr(t+1),he(r,xt,m?"tabpanel":"group"),he(r,bn,f.slide),he(r,tt,C||Rr(f.slideLabel,[t+1,e.length]))),x()}function x(){a(r,"click",Ie(i,Kr,W)),a(r,"keydown",Ie(i,xi,W)),s([on,Ci,Dt],k),s(Ur,T),h&&s(wt,R)}function _(){H=!0,o.destroy(),bt(r,is),gt(r,Qr),he(r,"style",v),he(r,tt,C||"")}function T(){var F=e.splides.map(function(P){var N=P.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");he(r,tt,Rr(f.slideX,(y?n:t)+1)),he(r,An,F),he(r,xt,g?"button":""),g&&gt(r,bn)}function R(){H||k()}function k(){if(!H){var F=e.index;V(),O(),vt(r,Ai,t===F-1),vt(r,Ri,t===F+1)}}function V(){var F=Y();F!==vo(r,Vt)&&(vt(r,Vt,F),he(r,$i,L&&F||""),i(F?li:ci,W))}function O(){var F=b(),P=!F&&(!Y()||y);if(e.state.is([rn,$n])||he(r,Ti,P||""),he(Dr(r,d.focusableNodes||""),Xt,P?-1:""),g&&he(r,Xt,P?-1:0),F!==vo(r,Wr)&&(vt(r,Wr,F),i(F?di:ui,W)),!F&&document.activeElement===r){var N=c.Slides.getAt(e.index);N&&ri(N.slide)}}function G(F,P,N){at(N&&M||r,F,P)}function Y(){var F=e.index;return F===t||d.cloneStatus&&F===n}function b(){if(e.is(Rn))return Y();var F=et(c.Elements.track),P=et(r),N=$("left",!0),J=$("right",!0);return Jn(F[N])<=vn(P[N])&&Jn(P[J])<=vn(F[J])}function B(F,P){var N=Ge(F-t);return!y&&(d.rewind||e.is(an))&&(N=At(N,e.length-N)),N<=P}var W={index:t,slideIndex:n,slide:r,container:M,isClone:y,mount:A,destroy:_,update:k,style:G,isWithin:B};return W}function us(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=r.bind,a=t.Elements,c=a.slides,u=a.list,d=[];function L(){h(),o(Be,f),o(Be,h)}function h(){c.forEach(function(k,V){g(k,V,-1)})}function f(){H(function(k){k.destroy()}),St(d)}function m(){H(function(k){k.update()})}function g(k,V,O){var G=ds(e,V,O,k);G.mount(),d.push(G),d.sort(function(Y,b){return Y.index-b.index})}function $(k){return k?A(function(V){return!V.isClone}):d}function v(k){var V=t.Controller,O=V.toIndex(k),G=V.hasFocus()?1:n.perPage;return A(function(Y){return Kn(Y.index,O,O+G-1)})}function C(k){return A(k)[0]}function y(k,V){rt(k,function(O){if(_t(O)&&(O=oi(O)),ti(O)){var G=c[V];G?Vr(O,G):En(u,O),mt(O,n.classes.slide),_(O,Ie(s,Jt))}}),s(Be)}function M(k){Ot(A(k).map(function(V){return V.slide})),s(Be)}function H(k,V){$(V).forEach(k)}function A(k){return d.filter(ei(k)?k:function(V){return _t(k)?gn(V.slide,k):Or(Ln(k),V.index)})}function x(k,V,O){H(function(G){G.style(k,V,O)})}function _(k,V){var O=Dr(k,"img"),G=O.length;G?O.forEach(function(Y){i(Y,"load error",function(){--G||V()})}):V()}function T(k){return k?c.length:d.length}function R(){return d.length>n.perPage}return{mount:L,destroy:f,update:m,register:g,get:$,getIn:v,getAt:C,add:y,remove:M,forEach:H,filter:A,style:x,getLength:T,isEnough:R}}function ps(e,t,n){var r=ke(e),o=r.on,s=r.bind,i=r.emit,a=t.Slides,c=t.Direction.resolve,u=t.Elements,d=u.root,L=u.track,h=u.list,f=a.getAt,m=a.style,g,$,v;function C(){y(),s(window,"resize load",Ua(Ie(i,Jt))),o([Ke,Be],y),o(Jt,M)}function y(){g=n.direction===cr,at(d,"maxWidth",Mt(n.width)),at(L,c("paddingLeft"),H(!1)),at(L,c("paddingRight"),H(!0)),M(!0)}function M(W){var F=et(d);(W||$.width!==F.width||$.height!==F.height)&&(at(L,"height",A()),m(c("marginRight"),Mt(n.gap)),m("width",_()),m("height",T(),!0),$=F,i(rr),v!==(v=B())&&(vt(d,Wi,v),i(Ka,v)))}function H(W){var F=n.padding,P=c(W?"right":"left");return F&&Mt(F[P]||(mn(F)?0:F))||"0px"}function A(){var W="";return g&&(W=x(),un(W,"height or heightRatio is missing."),W="calc("+W+" - "+H(!1)+" - "+H(!0)+")"),W}function x(){return Mt(n.height||et(h).width*n.heightRatio)}function _(){return n.autoWidth?null:Mt(n.fixedWidth)||(g?"":R())}function T(){return Mt(n.fixedHeight)||(g?n.autoHeight?null:R():x())}function R(){var W=Mt(n.gap);return"calc((100%"+(W&&" + "+W)+")/"+(n.perPage||1)+(W&&" - "+W)+")"}function k(){return et(h)[c("width")]}function V(W,F){var P=f(W||0);return P?et(P.slide)[c("width")]+(F?0:Y()):0}function O(W,F){var P=f(W);if(P){var N=et(P.slide)[c("right")],J=et(h)[c("left")];return Ge(N-J)+(F?0:Y())}return 0}function G(W){return O(e.length-1)-O(0)+V(0,W)}function Y(){var W=f(0);return W&&parseFloat(at(W.slide,c("marginRight")))||0}function b(W){return parseFloat(at(L,c("padding"+(W?"Right":"Left"))))||0}function B(){return e.is(Rn)||G(!0)>k()}return{mount:C,resize:M,listSize:k,slideSize:V,sliderSize:G,totalSize:O,getPadding:b,isOverflow:B}}var ms=2;function gs(e,t,n){var r=ke(e),o=r.on,s=t.Elements,i=t.Slides,a=t.Direction.resolve,c=[],u;function d(){o(Be,L),o([Ke,Jt],f),(u=$())&&(m(u),t.Layout.resize(!0))}function L(){h(),d()}function h(){Ot(c),St(c),r.destroy()}function f(){var v=$();u!==v&&(u<v||!v)&&r.emit(Be)}function m(v){var C=i.get().slice(),y=C.length;if(y){for(;C.length<v;)zn(C,C);zn(C.slice(-v),C.slice(0,v)).forEach(function(M,H){var A=H<v,x=g(M.slide,H);A?Vr(x,C[0].slide):En(s.list,x),zn(c,x),i.register(x,H-v+(A?0:y),M.index)})}}function g(v,C){var y=v.cloneNode(!0);return mt(y,n.classes.clone),y.id=e.root.id+"-clone"+zr(C+1),y}function $(){var v=n.clones;if(!e.is(an))v=0;else if(Tn(v)){var C=n[a("fixedWidth")]&&t.Layout.slideSize(0),y=C&&vn(et(s.track)[a("width")]/C);v=y||n[a("autoWidth")]&&e.length||n.perPage*ms}return v}return{mount:d,destroy:h}}function hs(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=e.state.set,a=t.Layout,c=a.slideSize,u=a.getPadding,d=a.totalSize,L=a.listSize,h=a.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,$=t.Elements,v=$.list,C=$.track,y;function M(){y=t.Transition,o([Wt,rr,Ke,Be],H)}function H(){t.Controller.isBusy()||(t.Scroll.cancel(),x(e.index),t.Slides.update())}function A(P,N,J,oe){P!==N&&W(P>J)&&(k(),_(R(G(),P>J),!0)),i(rn),s(wt,N,J,P),y.start(N,function(){i(Zt),s(on,N,J,P),oe&&oe()})}function x(P){_(O(P,!0))}function _(P,N){if(!e.is(Rn)){var J=N?P:T(P);at(v,"transform","translate"+m("X")+"("+J+"px)"),P!==J&&s(Ci)}}function T(P){if(e.is(an)){var N=V(P),J=N>t.Controller.getEnd(),oe=N<0;(oe||J)&&(P=R(P,J))}return P}function R(P,N){var J=P-B(N),oe=h();return P-=g(oe*(vn(Ge(J)/oe)||1))*(N?1:-1),P}function k(){_(G(),!0),y.cancel()}function V(P){for(var N=t.Slides.get(),J=0,oe=1/0,K=0;K<N.length;K++){var le=N[K].index,D=Ge(O(le,!0)-P);if(D<=oe)oe=D,J=le;else break}return J}function O(P,N){var J=g(d(P-1)-b(P));return N?Y(J):J}function G(){var P=m("left");return et(v)[P]-et(C)[P]+g(u(!1))}function Y(P){return n.trimSpace&&e.is(Qt)&&(P=Kt(P,0,g(h(!0)-L()))),P}function b(P){var N=n.focus;return N==="center"?(L()-c(P,!0))/2:+N*c(P)||0}function B(P){return O(P?t.Controller.getEnd():0,!!n.trimSpace)}function W(P){var N=g(R(G(),P));return P?N>=0:N<=v[m("scrollWidth")]-et(C)[m("width")]}function F(P,N){N=Tn(N)?G():N;var J=P!==!0&&g(N)<g(B(!1)),oe=P!==!1&&g(N)>g(B(!0));return J||oe}return{mount:M,move:A,jump:x,translate:_,shift:R,cancel:k,toIndex:V,toPosition:O,getPosition:G,getLimit:B,exceededLimit:F,reposition:H}}function fs(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=t.Move,a=i.getPosition,c=i.getLimit,u=i.toPosition,d=t.Slides,L=d.isEnough,h=d.getLength,f=n.omitEnd,m=e.is(an),g=e.is(Qt),$=Ie(G,!1),v=Ie(G,!0),C=n.start||0,y,M=C,H,A,x;function _(){T(),o([Ke,Be,Qn],T),o(rr,R)}function T(){H=h(!0),A=n.perMove,x=n.perPage,y=W();var D=Kt(C,0,f?y:H-1);D!==C&&(C=D,i.reposition())}function R(){y!==W()&&s(Qn)}function k(D,ie,ve){if(!le()){var pe=O(D),Ce=B(pe);Ce>-1&&(ie||Ce!==C)&&(J(Ce),i.move(pe,Ce,M,ve))}}function V(D,ie,ve,pe){t.Scroll.scroll(D,ie,ve,function(){var Ce=B(i.toIndex(a()));J(f?At(Ce,y):Ce),pe&&pe()})}function O(D){var ie=C;if(_t(D)){var ve=D.match(/([+\-<>])(\d+)?/)||[],pe=ve[1],Ce=ve[2];pe==="+"||pe==="-"?ie=Y(C+ +(""+pe+(+Ce||1)),C):pe===">"?ie=Ce?F(+Ce):$(!0):pe==="<"&&(ie=v(!0))}else ie=m?D:Kt(D,0,y);return ie}function G(D,ie){var ve=A||(K()?1:x),pe=Y(C+ve*(D?-1:1),C,!(A||K()));return pe===-1&&g&&!ai(a(),c(!D),1)?D?0:y:ie?pe:B(pe)}function Y(D,ie,ve){if(L()||K()){var pe=b(D);pe!==D&&(ie=D,D=pe,ve=!1),D<0||D>y?!A&&(Kn(0,D,ie,!0)||Kn(y,ie,D,!0))?D=F(P(D)):m?D=ve?D<0?-(H%x||x):H:D:n.rewind?D=D<0?y:0:D=-1:ve&&D!==ie&&(D=F(P(ie)+(D<ie?-1:1)))}else D=-1;return D}function b(D){if(g&&n.trimSpace==="move"&&D!==C)for(var ie=a();ie===u(D,!0)&&Kn(D,0,e.length-1,!n.rewind);)D<C?--D:++D;return D}function B(D){return m?(D+H)%H||0:D}function W(){for(var D=H-(K()||m&&A?1:x);f&&D-- >0;)if(u(H-1,!0)!==u(D,!0)){D++;break}return Kt(D,0,H-1)}function F(D){return Kt(K()?D:x*D,0,y)}function P(D){return K()?At(D,y):Jn((D>=y?H-1:D)/x)}function N(D){var ie=i.toIndex(D);return g?Kt(ie,0,y):ie}function J(D){D!==C&&(M=C,C=D)}function oe(D){return D?M:C}function K(){return!Tn(n.focus)||n.isNavigation}function le(){return e.state.is([rn,$n])&&!!n.waitForTransition}return{mount:_,go:k,scroll:V,getNext:$,getPrev:v,getAdjacent:G,getEnd:W,setIndex:J,getIndex:oe,toIndex:F,toPage:P,toDest:N,hasFocus:K,isBusy:le}}var ys="http://www.w3.org/2000/svg",vs="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",Mn=40;function bs(e,t,n){var r=ke(e),o=r.on,s=r.bind,i=r.emit,a=n.classes,c=n.i18n,u=t.Elements,d=t.Controller,L=u.arrows,h=u.track,f=L,m=u.prev,g=u.next,$,v,C={};function y(){H(),o(Ke,M)}function M(){A(),y()}function H(){var V=n.arrows;V&&!(m&&g)&&T(),m&&g&&(fn(C,{prev:m,next:g}),yn(f,V?"":"none"),mt(f,v=eo+"--"+n.direction),V&&(x(),k(),he([m,g],An,h.id),i(hi,m,g)))}function A(){r.destroy(),bt(f,v),$?(Ot(L?[m,g]:f),m=g=null):gt([m,g],Qr)}function x(){o([Wt,on,Be,Dt,Qn],k),s(g,"click",Ie(_,">")),s(m,"click",Ie(_,"<"))}function _(V){d.go(V,!0)}function T(){f=L||Yt("div",a.arrows),m=R(!0),g=R(!1),$=!0,En(f,[m,g]),!L&&Vr(f,h)}function R(V){var O='<button class="'+a.arrow+" "+(V?a.prev:a.next)+'" type="button"><svg xmlns="'+ys+'" viewBox="0 0 '+Mn+" "+Mn+'" width="'+Mn+'" height="'+Mn+'" focusable="false"><path d="'+(n.arrowPath||vs)+'" />';return oi(O)}function k(){if(m&&g){var V=e.index,O=d.getPrev(),G=d.getNext(),Y=O>-1&&V<O?c.last:c.prev,b=G>-1&&V>G?c.first:c.next;m.disabled=O<0,g.disabled=G<0,he(m,tt,Y),he(g,tt,b),i(fi,m,g,O,G)}}return{arrows:C,mount:y,destroy:A,update:k}}var xs=jr+"-interval";function Cs(e,t,n){var r=ke(e),o=r.on,s=r.bind,i=r.emit,a=ir(n.interval,e.go.bind(e,">"),x),c=a.isPaused,u=t.Elements,d=t.Elements,L=d.root,h=d.toggle,f=n.autoplay,m,g,$=f==="pause";function v(){f&&(C(),h&&he(h,An,u.track.id),$||y(),A())}function C(){n.pauseOnHover&&s(L,"mouseenter mouseleave",function(T){m=T.type==="mouseenter",H()}),n.pauseOnFocus&&s(L,"focusin focusout",function(T){g=T.type==="focusin",H()}),h&&s(h,"click",function(){$?y():M(!0)}),o([wt,or,Be],a.rewind),o(wt,_)}function y(){c()&&t.Slides.isEnough()&&(a.start(!n.resetProgress),g=m=$=!1,A(),i(Gr))}function M(T){T===void 0&&(T=!0),$=!!T,A(),c()||(a.pause(),i(Yr))}function H(){$||(m||g?M(!1):y())}function A(){h&&(vt(h,Vt,!$),he(h,tt,n.i18n[$?"play":"pause"]))}function x(T){var R=u.bar;R&&at(R,"width",T*100+"%"),i(bi,T)}function _(T){var R=t.Slides.getAt(T);a.set(R&&+st(R.slide,xs)||n.interval)}return{mount:v,destroy:a.cancel,play:y,pause:M,isPaused:c}}function Ss(e,t,n){var r=ke(e),o=r.on;function s(){n.cover&&(o(Xr,Ie(a,!0)),o([Wt,Ke,Be],Ie(i,!0)))}function i(c){t.Slides.forEach(function(u){var d=Pn(u.container||u.slide,"img");d&&d.src&&a(c,d,u)})}function a(c,u,d){d.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),yn(u,c?"none":"")}return{mount:s,destroy:Ie(i,!1)}}var ws=10,$s=600,Ts=.6,Ls=1.5,Es=800;function Ps(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=e.state.set,a=t.Move,c=a.getPosition,u=a.getLimit,d=a.exceededLimit,L=a.translate,h=e.is(Qt),f,m,g=1;function $(){o(wt,M),o([Ke,Be],H)}function v(x,_,T,R,k){var V=c();if(M(),T&&(!h||!d())){var O=t.Layout.sliderSize(),G=Ar(x)*O*Jn(Ge(x)/O)||0;x=a.toPosition(t.Controller.toDest(x%O))+G}var Y=ai(V,x,1);g=1,_=Y?0:_||Zn(Ge(x-V)/Ls,Es),m=R,f=ir(_,C,Ie(y,V,x,k),1),i($n),s(or),f.start()}function C(){i(Zt),m&&m(),s(Dt)}function y(x,_,T,R){var k=c(),V=x+(_-x)*A(R),O=(V-k)*g;L(k+O),h&&!T&&d()&&(g*=Ts,Ge(O)<ws&&v(u(d(!0)),$s,!1,m,!0))}function M(){f&&f.cancel()}function H(){f&&!f.isPaused()&&(M(),C())}function A(x){var _=n.easingFunc;return _?_(x):1-Math.pow(1-x,4)}return{mount:$,destroy:M,scroll:v,cancel:H}}var qt={passive:!1,capture:!0};function _s(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=r.bind,a=r.unbind,c=e.state,u=t.Move,d=t.Scroll,L=t.Controller,h=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,$=m.orient,v=u.getPosition,C=u.exceededLimit,y,M,H,A,x,_=!1,T,R,k;function V(){i(h,vr,Pr,qt),i(h,br,Pr,qt),i(h,ki,G,qt),i(h,"click",B,{capture:!0}),i(h,"dragstart",yt),o([Wt,Ke],O)}function O(){var E=n.drag;Q(!E),A=E==="free"}function G(E){if(T=!1,!R){var S=Ce(E);pe(E.target)&&(S||!E.button)&&(L.isBusy()?yt(E,!0):(k=S?h:window,x=c.is([rn,$n]),H=null,i(k,vr,Y,qt),i(k,br,b,qt),u.cancel(),d.cancel(),W(E)))}}function Y(E){if(c.is(jn)||(c.set(jn),s(pi)),E.cancelable)if(x){u.translate(y+ve(K(E)));var S=le(E)>Lo,q=_!==(_=C());(S||q)&&W(E),T=!0,s(mi),yt(E)}else N(E)&&(x=P(E),yt(E))}function b(E){c.is(jn)&&(c.set(Zt),s(gi)),x&&(F(E),yt(E)),a(k,vr,Y),a(k,br,b),x=!1}function B(E){!R&&T&&yt(E,!0)}function W(E){H=M,M=E,y=v()}function F(E){var S=J(E),q=oe(S),U=n.rewind&&n.rewindByDrag;f(!1),A?L.scroll(q,0,n.snap):e.is(Rn)?L.go($(Ar(S))<0?U?"<":"-":U?">":"+"):e.is(Qt)&&_&&U?L.go(C(!0)?">":"<"):L.go(L.toDest(q),!0),f(!0)}function P(E){var S=n.dragMinThreshold,q=mn(S),U=q&&S.mouse||0,X=(q?S.touch:+S)||10;return Ge(K(E))>(Ce(E)?X:U)}function N(E){return Ge(K(E))>Ge(K(E,!0))}function J(E){if(e.is(an)||!_){var S=le(E);if(S&&S<Lo)return K(E)/S}return 0}function oe(E){return v()+Ar(E)*At(Ge(E)*(n.flickPower||600),A?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function K(E,S){return ie(E,S)-ie(D(E),S)}function le(E){return _r(E)-_r(D(E))}function D(E){return M===E&&H||M}function ie(E,S){return(Ce(E)?E.changedTouches[0]:E)["page"+g(S?"Y":"X")]}function ve(E){return E/(_&&e.is(Qt)?ls:1)}function pe(E){var S=n.noDrag;return!gn(E,"."+_i+", ."+ur)&&(!S||!gn(E,S))}function Ce(E){return typeof TouchEvent<"u"&&E instanceof TouchEvent}function I(){return x}function Q(E){R=E}return{mount:V,disable:Q,isDragging:I}}var As={Spacebar:" ",Right:lr,Left:sr,Up:Si,Down:wi};function to(e){return e=_t(e)?e:e.key,As[e]||e}var Eo="keydown";function Rs(e,t,n){var r=ke(e),o=r.on,s=r.bind,i=r.unbind,a=e.root,c=t.Direction.resolve,u,d;function L(){h(),o(Ke,f),o(Ke,h),o(wt,g)}function h(){var v=n.keyboard;v&&(u=v==="global"?window:a,s(u,Eo,$))}function f(){i(u,Eo)}function m(v){d=v}function g(){var v=d;d=!0,Qo(function(){d=v})}function $(v){if(!d){var C=to(v);C===c(sr)?e.go("<"):C===c(lr)&&e.go(">")}}return{mount:L,destroy:f,disable:m}}var pn=jr+"-lazy",qn=pn+"-srcset",Is="["+pn+"], ["+qn+"]";function Ws(e,t,n){var r=ke(e),o=r.on,s=r.off,i=r.bind,a=r.emit,c=n.lazyLoad==="sequential",u=[on,Dt],d=[];function L(){n.lazyLoad&&(h(),o(Be,h))}function h(){St(d),f(),c?v():(s(u),o(u,m),m())}function f(){t.Slides.forEach(function(C){Dr(C.slide,Is).forEach(function(y){var M=st(y,pn),H=st(y,qn);if(M!==y.src||H!==y.srcset){var A=n.classes.spinner,x=y.parentElement,_=Pn(x,"."+A)||Yt("span",A,x);d.push([y,C,_]),y.src||yn(y,"none")}})})}function m(){d=d.filter(function(C){var y=n.perPage*((n.preloadPages||1)+1)-1;return C[1].isWithin(e.index,y)?g(C):!0}),d.length||s(u)}function g(C){var y=C[0];mt(C[1].slide,kr),i(y,"load error",Ie($,C)),he(y,"src",st(y,pn)),he(y,"srcset",st(y,qn)),gt(y,pn),gt(y,qn)}function $(C,y){var M=C[0],H=C[1];bt(H.slide,kr),y.type!=="error"&&(Ot(C[2]),yn(M,""),a(Xr,M,H),a(Jt)),c&&v()}function v(){d.length&&g(d.shift())}return{mount:L,destroy:Ie(St,d),check:m}}function ks(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=r.bind,a=t.Slides,c=t.Elements,u=t.Controller,d=u.hasFocus,L=u.getIndex,h=u.go,f=t.Direction.resolve,m=c.pagination,g=[],$,v;function C(){y(),o([Ke,Be,Qn],C);var R=n.pagination;m&&yn(m,R?"":"none"),R&&(o([wt,or,Dt],T),M(),T(),s(yi,{list:$,items:g},_(e.index)))}function y(){$&&(Ot(m?It($.children):$),bt($,v),St(g),$=null),r.destroy()}function M(){var R=e.length,k=n.classes,V=n.i18n,O=n.perPage,G=d()?u.getEnd()+1:vn(R/O);$=m||Yt("ul",k.pagination,c.track.parentElement),mt($,v=pr+"--"+x()),he($,xt,"tablist"),he($,tt,V.select),he($,Jr,x()===cr?"vertical":"");for(var Y=0;Y<G;Y++){var b=Yt("li",null,$),B=Yt("button",{class:k.page,type:"button"},b),W=a.getIn(Y).map(function(P){return P.slide.id}),F=!d()&&O>1?V.pageX:V.slideX;i(B,"click",Ie(H,Y)),n.paginationKeyboard&&i(B,"keydown",Ie(A,Y)),he(b,xt,"presentation"),he(B,xt,"tab"),he(B,An,W.join(" ")),he(B,tt,Rr(F,Y+1)),he(B,Xt,-1),g.push({li:b,button:B,page:Y})}}function H(R){h(">"+R,!0)}function A(R,k){var V=g.length,O=to(k),G=x(),Y=-1;O===f(lr,!1,G)?Y=++R%V:O===f(sr,!1,G)?Y=(--R+V)%V:O==="Home"?Y=0:O==="End"&&(Y=V-1);var b=g[Y];b&&(ri(b.button),h(">"+Y),yt(k,!0))}function x(){return n.paginationDirection||n.direction}function _(R){return g[u.toPage(R)]}function T(){var R=_(L(!0)),k=_(L());if(R){var V=R.button;bt(V,Vt),gt(V,Co),he(V,Xt,-1)}if(k){var O=k.button;mt(O,Vt),he(O,Co,!0),he(O,Xt,"")}s(vi,{list:$,items:g},R,k)}return{items:g,mount:C,destroy:y,getAt:_,update:T}}var Fs=[" ","Enter"];function Ms(e,t,n){var r=n.isNavigation,o=n.slideFocus,s=[];function i(){e.splides.forEach(function(m){m.isParent||(u(e,m.splide),u(m.splide,e))}),r&&d()}function a(){s.forEach(function(m){m.destroy()}),St(s)}function c(){a(),i()}function u(m,g){var $=ke(m);$.on(wt,function(v,C,y){g.go(g.is(an)?y:v)}),s.push($)}function d(){var m=ke(e),g=m.on;g(Kr,h),g(xi,f),g([Wt,Ke],L),s.push(m),m.emit(Ur,e.splides)}function L(){he(t.Elements.list,Jr,n.direction===cr?"vertical":"")}function h(m){e.go(m.index)}function f(m,g){Or(Fs,to(g))&&(h(m),yt(g))}return{setup:Ie(t.Media.set,{slideFocus:Tn(o)?r:o},!0),mount:i,destroy:a,remount:c}}function Hs(e,t,n){var r=ke(e),o=r.bind,s=0;function i(){n.wheel&&o(t.Elements.track,"wheel",a,qt)}function a(u){if(u.cancelable){var d=u.deltaY,L=d<0,h=_r(u),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;Ge(d)>f&&h-s>m&&(e.go(L?"<":">"),s=h),c(L)&&yt(u)}}function c(u){return!n.releaseWheel||e.state.is(rn)||t.Controller.getAdjacent(u)!==-1}return{mount:i}}var Ns=90;function Bs(e,t,n){var r=ke(e),o=r.on,s=t.Elements.track,i=n.live&&!n.isNavigation,a=Yt("span",rs),c=ir(Ns,Ie(d,!1));function u(){i&&(h(!t.Autoplay.isPaused()),he(s,$o,!0),a.textContent="…",o(Gr,Ie(h,!0)),o(Yr,Ie(h,!1)),o([on,Dt],Ie(d,!0)))}function d(f){he(s,wo,f),f?(En(s,a),c.start()):(Ot(a),c.cancel())}function L(){gt(s,[So,$o,wo]),Ot(a)}function h(f){i&&he(s,So,f?"off":"polite")}return{mount:u,disable:h,destroy:L}}var Os=Object.freeze({__proto__:null,Media:Ga,Direction:Ya,Elements:cs,Slides:us,Layout:ps,Clones:gs,Move:hs,Controller:fs,Arrows:bs,Autoplay:Cs,Cover:Ss,Scroll:Ps,Drag:_s,Keyboard:Rs,LazyLoad:Ws,Pagination:ks,Sync:Ms,Wheel:Hs,Live:Bs}),Vs={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"},Ds={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:as,i18n:Vs,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function js(e,t,n){var r=t.Slides;function o(){ke(e).on([Wt,Be],s)}function s(){r.forEach(function(a){a.style("transform","translateX(-"+100*a.index+"%)")})}function i(a,c){r.style("transition","opacity "+n.speed+"ms "+n.easing),Qo(c)}return{mount:o,start:i,cancel:Pr}}function zs(e,t,n){var r=t.Move,o=t.Controller,s=t.Scroll,i=t.Elements.list,a=Ie(at,i,"transition"),c;function u(){ke(e).bind(i,"transitionend",function(f){f.target===i&&c&&(L(),c())})}function d(f,m){var g=r.toPosition(f,!0),$=r.getPosition(),v=h(f);Ge(g-$)>=1&&v>=1?n.useScroll?s.scroll(g,v,!1,m):(a("transform "+v+"ms "+n.easing),r.translate(g,!0),c=m):(r.jump(f),m())}function L(){a(""),s.cancel()}function h(f){var m=n.rewindSpeed;if(e.is(Qt)&&m){var g=o.getIndex(!0),$=o.getEnd();if(g===0&&f>=$||g>=$&&f===0)return m}return n.speed}return{mount:u,start:d,cancel:L}}var Ks=(function(){function e(n,r){this.event=ke(),this.Components={},this.state=qa(Gt),this.splides=[],this._o={},this._E={};var o=_t(n)?ii(document,n):n;un(o,o+" is invalid."),this.root=o,r=Et({label:st(o,tt)||"",labelledby:st(o,Zr)||""},Ds,e.defaults,r||{});try{Et(r,JSON.parse(st(o,jr)))}catch{un(!1,"Invalid JSON")}this._o=Object.create(Et({},r))}var t=e.prototype;return t.mount=function(r,o){var s=this,i=this.state,a=this.Components;un(i.is([Gt,Xn]),"Already mounted!"),i.set(Gt),this._C=a,this._T=o||this._T||(this.is(Rn)?js:zs),this._E=r||this._E;var c=fn({},Os,this._E,{Transition:this._T});return Bt(c,function(u,d){var L=u(s,a,s._o);a[d]=L,L.setup&&L.setup()}),Bt(a,function(u){u.mount&&u.mount()}),this.emit(Wt),mt(this.root,os),i.set(Zt),this.emit(Ir),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(Zt)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(It(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),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(Be),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,s=this.state;return s.is(Gt)?ke(this).on(Ir,this.destroy.bind(this,r)):(Bt(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(qr),o.destroy(),r&&St(this.splides),s.set(Xn)),this},Va(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})(),no=Ks;no.defaults={};no.STATES=ja;var Po=[[Wt,"onMounted"],[Ir,"onReady"],[wt,"onMove"],[on,"onMoved"],[Kr,"onClick"],[li,"onActive"],[ci,"onInactive"],[di,"onVisible"],[ui,"onHidden"],[Be,"onRefresh"],[Ke,"onUpdated"],[Jt,"onResize"],[rr,"onResized"],[pi,"onDrag"],[mi,"onDragging"],[gi,"onDragged"],[or,"onScroll"],[Dt,"onScrolled"],[qr,"onDestroy"],[hi,"onArrowsMounted"],[fi,"onArrowsUpdated"],[yi,"onPaginationMounted"],[vi,"onPaginationUpdated"],[Ur,"onNavigationMounted"],[Gr,"onAutoplayPlay"],[bi,"onAutoplayPlaying"],[Yr,"onAutoplayPause"],[Xr,"onLazyLoadLoaded"]];function ro(...e){return e.filter(Boolean).join(" ")}function er(e){return e!==null&&typeof e=="object"}function Fr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Fr(n,t[r]));if(er(e)&&er(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Fr(e[o],t[o]))}return e===t}function qs(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Us(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function Mr(e,t){const n=e;return Us(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():er(r)?n[o]=Mr(er(n[o])?n[o]:{},r):n[o]=r}),n}var Gs=({children:e,className:t,...n})=>p.createElement("div",{className:ro("splide__track",t),...n},p.createElement("ul",{className:"splide__list"},e)),oo=class extends p.Component{constructor(){super(...arguments),this.splideRef=p.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new no(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Mr({},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&&!Fr(this.options,e)&&(this.splide.options=e,this.options=Mr({},e));const t=this.getSlides();qs(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){Po.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(e,...o)})})}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,...o}=this.props;return p.createElement(t,{className:ro("splide",e),ref:this.splideRef,...this.omit(o,["options",...Po.map(s=>s[1])])},n?p.createElement(Gs,null,r):r)}},io=({children:e,className:t,...n})=>p.createElement("li",{className:ro("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),p=require("react"),Te=require("classnames"),w=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Jo=require("react-dom");function Xi(e){return e.type==="object"&&e.version===1}const Zi="ControlSlider-module__wrapper___sHEkd",Ji="ControlSlider-module__hoverArrow___A-dOH",Qi="ControlSlider-module__sliderItem___QQSkR",ea="ControlSlider-module__sliderImage___9hRl-",ta="ControlSlider-module__arrow___05ghY",na="ControlSlider-module__arrowVertical___tBfVN",ra="ControlSlider-module__nextArrow___-30Yc",oa="ControlSlider-module__arrowInner___aEra3",ia="ControlSlider-module__arrowIcon___S4ztF",aa="ControlSlider-module__arrowImg___2dwJW",sa="ControlSlider-module__mirror___brd6U",la="ControlSlider-module__pagination___bicLF",ca="ControlSlider-module__paginationInner___bT-P-",da="ControlSlider-module__paginationVertical___zYqKw",ua="ControlSlider-module__paginationItem___nTRbk",pa="ControlSlider-module__dot___p1Qun",ma="ControlSlider-module__activeDot___LHFaj",ga="ControlSlider-module__paginationInsideBottom___R3FWn",ha="ControlSlider-module__paginationInsideTop___V-qb-",fa="ControlSlider-module__paginationOutsideBottom___14w8D",ya="ControlSlider-module__paginationOutsideTop___SCLqB",va="ControlSlider-module__paginationInsideLeft___yOBRZ",ba="ControlSlider-module__paginationInsideRight___Rtt3o",xa="ControlSlider-module__paginationOutsideLeft___lahaw",Ca="ControlSlider-module__paginationOutsideRight___EtuQa",Sa="ControlSlider-module__imgWrapper___UjEgB",wa="ControlSlider-module__captionBlock___dJ6-j",$a="ControlSlider-module__captionTextWrapper___HFlpf",Ta="ControlSlider-module__captionText___uGBVc",La="ControlSlider-module__active___WZK4G",Ea="ControlSlider-module__withPointerEvents___t-18M",Pa="ControlSlider-module__topLeftAlignment___zjnGM",_a="ControlSlider-module__topCenterAlignment___gD1xW",Aa="ControlSlider-module__topRightAlignment___NMapS",Ra="ControlSlider-module__middleLeftAlignment___OnUrY",Wa="ControlSlider-module__middleCenterAlignment___Tdkl0",Ia="ControlSlider-module__middleRightAlignment___wEbfX",ka="ControlSlider-module__bottomLeftAlignment___cTP2-",Fa="ControlSlider-module__bottomCenterAlignment___c54fB",Ma="ControlSlider-module__bottomRightAlignment___kEwrz",Ha="ControlSlider-module__clickOverlay___DZA28",Na="ControlSlider-module__contain___pLyq7",Ba="ControlSlider-module__cover___KdDat",ae={wrapper:Zi,hoverArrow:Ji,sliderItem:Qi,sliderImage:ea,arrow:ta,arrowVertical:na,nextArrow:ra,arrowInner:oa,arrowIcon:ia,arrowImg:aa,mirror:sa,pagination:la,paginationInner:ca,paginationVertical:da,paginationItem:ua,dot:pa,activeDot:ma,paginationInsideBottom:ga,paginationInsideTop:ha,paginationOutsideBottom:fa,paginationOutsideTop:ya,paginationInsideLeft:va,paginationInsideRight:ba,paginationOutsideLeft:xa,paginationOutsideRight:Ca,imgWrapper:Sa,captionBlock:wa,captionTextWrapper:$a,captionText:Ta,active:La,withPointerEvents:Ea,topLeftAlignment:Pa,topCenterAlignment:_a,topRightAlignment:Aa,middleLeftAlignment:Ra,middleCenterAlignment:Wa,middleRightAlignment:Ia,bottomLeftAlignment:ka,bottomCenterAlignment:Fa,bottomRightAlignment:Ma,clickOverlay:Ha,contain:Na,cover:Ba};function Oa(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 Va(e,t,n){return t&&Oa(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ho="(prefers-reduced-motion: reduce)",Yt=1,Da=2,Jt=3,on=4,Tn=5,zn=6,Zn=7,ja={CREATED:Yt,MOUNTED:Da,IDLE:Jt,MOVING:on,SCROLLING:Tn,DRAGGING:zn,DESTROYED:Zn};function St(e){e.length=0}function Wt(e,t,n){return Array.prototype.slice.call(e,t,n)}function We(e){return e.bind.apply(e,[null].concat(Wt(arguments,1)))}var Qo=setTimeout,Pr=function(){};function fo(e){return requestAnimationFrame(e)}function rr(e,t){return typeof t===e}function gn(e){return!Br(e)&&rr("object",e)}var Nr=Array.isArray,ei=We(rr,"function"),_t=We(rr,"string"),Ln=We(rr,"undefined");function Br(e){return e===null}function ti(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function En(e){return Nr(e)?e:[e]}function rt(e,t){En(e).forEach(t)}function Or(e,t){return e.indexOf(t)>-1}function Kn(e,t){return e.push.apply(e,En(t)),e}function vt(e,t,n){e&&rt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function mt(e,t){vt(e,_t(t)?t.split(" "):t,!0)}function Pn(e,t){rt(t,e.appendChild.bind(e))}function Vr(e,t){rt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function hn(e,t){return ti(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ni(e,t){var n=e?Wt(e.children):[];return t?n.filter(function(r){return hn(r,t)}):n}function _n(e,t){return t?ni(e,t)[0]:e.firstElementChild}var fn=Object.keys;function Ot(e,t,n){return e&&(n?fn(e).reverse():fn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function yn(e){return Wt(arguments,1).forEach(function(t){Ot(t,function(n,r){e[r]=t[r]})}),e}function Et(e){return Wt(arguments,1).forEach(function(t){Ot(t,function(n,r){Nr(n)?e[r]=n.slice():gn(n)?e[r]=Et({},gn(e[r])?e[r]:{},n):e[r]=n})}),e}function yo(e,t){rt(t||fn(e),function(n){delete e[n]})}function gt(e,t){rt(e,function(n){rt(t,function(r){n&&n.removeAttribute(r)})})}function he(e,t,n){gn(t)?Ot(t,function(r,o){he(e,o,r)}):rt(e,function(r){Br(n)||n===""?gt(r,t):r.setAttribute(t,String(n))})}function Xt(e,t,n){var r=document.createElement(e);return t&&(_t(t)?mt(r,t):he(r,t)),n&&Pn(n,r),r}function at(e,t,n){if(Ln(n))return getComputedStyle(e)[t];Br(n)||(e.style[t]=""+n)}function vn(e,t){at(e,"display",t)}function ri(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function st(e,t){return e.getAttribute(t)}function vo(e,t){return e&&e.classList.contains(t)}function et(e){return e.getBoundingClientRect()}function Vt(e){rt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function oi(e){return _n(new DOMParser().parseFromString(e,"text/html").body)}function yt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ii(e,t){return e&&e.querySelector(t)}function Dr(e,t){return t?Wt(e.querySelectorAll(t)):[]}function bt(e,t){vt(e,t,!1)}function _r(e){return e.timeStamp}function Mt(e){return _t(e)?e:e?e+"px":""}var An="splide",jr="data-"+An;function pn(e,t){if(!e)throw new Error("["+An+"] "+(t||""))}var At=Math.min,Jn=Math.max,Qn=Math.floor,bn=Math.ceil,Ge=Math.abs;function ai(e,t,n){return Ge(e-t)<n}function qn(e,t,n,r){var o=At(t,n),s=Jn(t,n);return r?o<e&&e<s:o<=e&&e<=s}function qt(e,t,n){var r=At(t,n),o=Jn(t,n);return At(Jn(r,e),o)}function Ar(e){return+(e>0)-+(e<0)}function Rr(e,t){return rt(t,function(n){e=e.replace("%s",""+n)}),e}function zr(e){return e<10?"0"+e:""+e}var bo={};function za(e){return""+e+zr(bo[e]=(bo[e]||0)+1)}function si(){var e=[];function t(i,a,c,u){o(i,a,function(d,L,h){var f="addEventListener"in d,m=f?d.removeEventListener.bind(d,L,c,u):d.removeListener.bind(d,c);f?d.addEventListener(L,c,u):d.addListener(c),e.push([d,L,h,c,m])})}function n(i,a,c){o(i,a,function(u,d,L){e=e.filter(function(h){return h[0]===u&&h[1]===d&&h[2]===L&&(!c||h[3]===c)?(h[4](),!1):!0})})}function r(i,a,c){var u,d=!0;return typeof CustomEvent=="function"?u=new CustomEvent(a,{bubbles:d,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(a,d,!1,c)),i.dispatchEvent(u),u}function o(i,a,c){rt(i,function(u){u&&rt(a,function(d){d.split(" ").forEach(function(L){var h=L.split(".");c(u,h[0],h[1])})})})}function s(){e.forEach(function(i){i[4]()}),St(e)}return{bind:t,unbind:n,dispatch:r,destroy:s}}var It="mounted",Wr="ready",wt="move",an="moved",Kr="click",li="active",ci="inactive",di="visible",ui="hidden",Be="refresh",Ke="updated",Qt="resize",or="resized",pi="drag",mi="dragging",gi="dragged",ir="scroll",jt="scrolled",Ka="overflow",qr="destroy",hi="arrows:mounted",fi="arrows:updated",yi="pagination:mounted",vi="pagination:updated",Ur="navigation:mounted",Gr="autoplay:play",bi="autoplay:playing",Yr="autoplay:pause",Xr="lazyload:loaded",xi="sk",Ci="sh",er="ei";function ke(e){var t=e?e.event.bus:document.createDocumentFragment(),n=si();function r(s,i){n.bind(t,En(s).join(" "),function(a){i.apply(i,Nr(a.detail)?a.detail:[])})}function o(s){n.dispatch(t,s,Wt(arguments,1))}return e&&e.event.on(qr,n.destroy),yn(n,{bus:t,on:r,off:We(n.unbind,t),emit:o})}function ar(e,t,n,r){var o=Date.now,s,i=0,a,c=!0,u=0;function d(){if(!c){if(i=e?At((o()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=o(),r&&++u>=r))return h();a=fo(d)}}function L(v){v||m(),s=o()-(v?i*e:0),c=!1,a=fo(d)}function h(){c=!0}function f(){s=o(),i=0,n&&n(i)}function m(){a&&cancelAnimationFrame(a),i=0,a=0,c=!0}function g(v){e=v}function $(){return c}return{start:L,rewind:f,pause:h,cancel:m,set:g,isPaused:$}}function qa(e){var t=e;function n(o){t=o}function r(o){return Or(En(o),t)}return{set:n,is:r}}function Ua(e,t){var n=ar(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Ga(e,t,n){var r=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},i=si(),a=[];function c(){var m=n.mediaQuery==="min";fn(o).sort(function(g,$){return m?+g-+$:+$-+g}).forEach(function(g){d(o[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),d(s,ho),L()}function u(m){m&&i.destroy()}function d(m,g){var $=matchMedia(g);i.bind($,"change",L),a.push([m,$])}function L(){var m=r.is(Zn),g=n.direction,$=a.reduce(function(v,C){return Et(v,C[1].matches?C[0]:{})},{});yo(n),f($),n.destroy?e.destroy(n.destroy==="completely"):m?(u(!0),e.mount()):g!==n.direction&&e.refresh()}function h(m){matchMedia(ho).matches&&(m?Et(n,s):yo(n,fn(s)))}function f(m,g,$){Et(n,m),g&&Et(Object.getPrototypeOf(n),m),($||!r.is(Yt))&&e.emit(Ke,n)}return{setup:c,destroy:u,reduce:h,set:f}}var sr="Arrow",lr=sr+"Left",cr=sr+"Right",Si=sr+"Up",wi=sr+"Down",xo="rtl",dr="ttb",yr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Si,cr],ArrowRight:[wi,lr]};function Ya(e,t,n){function r(s,i,a){a=a||n.direction;var c=a===xo&&!i?1:a===dr?0:-1;return yr[s]&&yr[s][c]||s.replace(/width|left|right/i,function(u,d){var L=yr[u.toLowerCase()][c]||u;return d>0?L.charAt(0).toUpperCase()+L.slice(1):L})}function o(s){return s*(n.direction===xo?1:-1)}return{resolve:r,orient:o}}var xt="role",Zt="tabindex",Xa="disabled",lt="aria-",Rn=lt+"controls",$i=lt+"current",Co=lt+"selected",tt=lt+"label",Zr=lt+"labelledby",Ti=lt+"hidden",Jr=lt+"orientation",xn=lt+"roledescription",So=lt+"live",wo=lt+"busy",$o=lt+"atomic",Qr=[xt,Zt,Xa,Rn,$i,tt,Zr,Ti,Jr,xn],ht=An+"__",kt="is-",vr=An,To=ht+"track",Za=ht+"list",ur=ht+"slide",Li=ur+"--clone",Ja=ur+"__container",eo=ht+"arrows",pr=ht+"arrow",Ei=pr+"--prev",Pi=pr+"--next",mr=ht+"pagination",_i=mr+"__page",Qa=ht+"progress",es=Qa+"__bar",ts=ht+"toggle",ns=ht+"spinner",rs=ht+"sr",os=kt+"initialized",Dt=kt+"active",Ai=kt+"prev",Ri=kt+"next",Ir=kt+"visible",kr=kt+"loading",Wi=kt+"focus-in",Ii=kt+"overflow",is=[Dt,Ir,Ai,Ri,kr,Wi,Ii],as={slide:ur,clone:Li,arrows:eo,arrow:pr,prev:Ei,next:Pi,pagination:mr,page:_i,spinner:ns};function ss(e,t){if(ei(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!hn(n,t);)n=n.parentElement;return n}var ls=5,Lo=200,ki="touchstart mousedown",br="touchmove mousemove",xr="touchend touchcancel mouseup click";function cs(e,t,n){var r=ke(e),o=r.on,s=r.bind,i=e.root,a=n.i18n,c={},u=[],d=[],L=[],h,f,m;function g(){y(),M(),C()}function $(){o(Be,v),o(Be,g),o(Ke,C),s(document,ki+" keydown",function(x){m=x.type==="keydown"},{capture:!0}),s(i,"focusin",function(){vt(i,Wi,!!m)})}function v(x){var _=Qr.concat("style");St(u),bt(i,d),bt(h,L),gt([h,f],_),gt(i,x?_:["style",xn])}function C(){bt(i,d),bt(h,L),d=A(vr),L=A(To),mt(i,d),mt(h,L),he(i,tt,n.label),he(i,Zr,n.labelledby)}function y(){h=H("."+To),f=_n(h,"."+Za),pn(h&&f,"A track/list element is missing."),Kn(u,ni(f,"."+ur+":not(."+Li+")")),Ot({arrows:eo,pagination:mr,prev:Ei,next:Pi,bar:es,toggle:ts},function(x,_){c[_]=H("."+x)}),yn(c,{root:i,track:h,list:f,slides:u})}function M(){var x=i.id||za(An),_=n.role;i.id=x,h.id=h.id||x+"-track",f.id=f.id||x+"-list",!st(i,xt)&&i.tagName!=="SECTION"&&_&&he(i,xt,_),he(i,xn,a.carousel),he(f,xt,"presentation")}function H(x){var _=ii(i,x);return _&&ss(_,"."+vr)===i?_:void 0}function A(x){return[x+"--"+n.type,x+"--"+n.direction,n.drag&&x+"--draggable",n.isNavigation&&x+"--nav",x===vr&&Dt]}return yn(c,{setup:g,mount:$,destroy:v})}var en="slide",sn="loop",Wn="fade";function ds(e,t,n,r){var o=ke(e),s=o.on,i=o.emit,a=o.bind,c=e.Components,u=e.root,d=e.options,L=d.isNavigation,h=d.updateOnMove,f=d.i18n,m=d.pagination,g=d.slideFocus,$=c.Direction.resolve,v=st(r,"style"),C=st(r,tt),y=n>-1,M=_n(r,"."+Ja),H;function A(){y||(r.id=u.id+"-slide"+zr(t+1),he(r,xt,m?"tabpanel":"group"),he(r,xn,f.slide),he(r,tt,C||Rr(f.slideLabel,[t+1,e.length]))),x()}function x(){a(r,"click",We(i,Kr,I)),a(r,"keydown",We(i,xi,I)),s([an,Ci,jt],k),s(Ur,T),h&&s(wt,R)}function _(){H=!0,o.destroy(),bt(r,is),gt(r,Qr),he(r,"style",v),he(r,tt,C||"")}function T(){var F=e.splides.map(function(P){var N=P.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");he(r,tt,Rr(f.slideX,(y?n:t)+1)),he(r,Rn,F),he(r,xt,g?"button":""),g&&gt(r,xn)}function R(){H||k()}function k(){if(!H){var F=e.index;V(),O(),vt(r,Ai,t===F-1),vt(r,Ri,t===F+1)}}function V(){var F=Y();F!==vo(r,Dt)&&(vt(r,Dt,F),he(r,$i,L&&F||""),i(F?li:ci,I))}function O(){var F=b(),P=!F&&(!Y()||y);if(e.state.is([on,Tn])||he(r,Ti,P||""),he(Dr(r,d.focusableNodes||""),Zt,P?-1:""),g&&he(r,Zt,P?-1:0),F!==vo(r,Ir)&&(vt(r,Ir,F),i(F?di:ui,I)),!F&&document.activeElement===r){var N=c.Slides.getAt(e.index);N&&ri(N.slide)}}function G(F,P,N){at(N&&M||r,F,P)}function Y(){var F=e.index;return F===t||d.cloneStatus&&F===n}function b(){if(e.is(Wn))return Y();var F=et(c.Elements.track),P=et(r),N=$("left",!0),J=$("right",!0);return Qn(F[N])<=bn(P[N])&&Qn(P[J])<=bn(F[J])}function B(F,P){var N=Ge(F-t);return!y&&(d.rewind||e.is(sn))&&(N=At(N,e.length-N)),N<=P}var I={index:t,slideIndex:n,slide:r,container:M,isClone:y,mount:A,destroy:_,update:k,style:G,isWithin:B};return I}function us(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=r.bind,a=t.Elements,c=a.slides,u=a.list,d=[];function L(){h(),o(Be,f),o(Be,h)}function h(){c.forEach(function(k,V){g(k,V,-1)})}function f(){H(function(k){k.destroy()}),St(d)}function m(){H(function(k){k.update()})}function g(k,V,O){var G=ds(e,V,O,k);G.mount(),d.push(G),d.sort(function(Y,b){return Y.index-b.index})}function $(k){return k?A(function(V){return!V.isClone}):d}function v(k){var V=t.Controller,O=V.toIndex(k),G=V.hasFocus()?1:n.perPage;return A(function(Y){return qn(Y.index,O,O+G-1)})}function C(k){return A(k)[0]}function y(k,V){rt(k,function(O){if(_t(O)&&(O=oi(O)),ti(O)){var G=c[V];G?Vr(O,G):Pn(u,O),mt(O,n.classes.slide),_(O,We(s,Qt))}}),s(Be)}function M(k){Vt(A(k).map(function(V){return V.slide})),s(Be)}function H(k,V){$(V).forEach(k)}function A(k){return d.filter(ei(k)?k:function(V){return _t(k)?hn(V.slide,k):Or(En(k),V.index)})}function x(k,V,O){H(function(G){G.style(k,V,O)})}function _(k,V){var O=Dr(k,"img"),G=O.length;G?O.forEach(function(Y){i(Y,"load error",function(){--G||V()})}):V()}function T(k){return k?c.length:d.length}function R(){return d.length>n.perPage}return{mount:L,destroy:f,update:m,register:g,get:$,getIn:v,getAt:C,add:y,remove:M,forEach:H,filter:A,style:x,getLength:T,isEnough:R}}function ps(e,t,n){var r=ke(e),o=r.on,s=r.bind,i=r.emit,a=t.Slides,c=t.Direction.resolve,u=t.Elements,d=u.root,L=u.track,h=u.list,f=a.getAt,m=a.style,g,$,v;function C(){y(),s(window,"resize load",Ua(We(i,Qt))),o([Ke,Be],y),o(Qt,M)}function y(){g=n.direction===dr,at(d,"maxWidth",Mt(n.width)),at(L,c("paddingLeft"),H(!1)),at(L,c("paddingRight"),H(!0)),M(!0)}function M(I){var F=et(d);(I||$.width!==F.width||$.height!==F.height)&&(at(L,"height",A()),m(c("marginRight"),Mt(n.gap)),m("width",_()),m("height",T(),!0),$=F,i(or),v!==(v=B())&&(vt(d,Ii,v),i(Ka,v)))}function H(I){var F=n.padding,P=c(I?"right":"left");return F&&Mt(F[P]||(gn(F)?0:F))||"0px"}function A(){var I="";return g&&(I=x(),pn(I,"height or heightRatio is missing."),I="calc("+I+" - "+H(!1)+" - "+H(!0)+")"),I}function x(){return Mt(n.height||et(h).width*n.heightRatio)}function _(){return n.autoWidth?null:Mt(n.fixedWidth)||(g?"":R())}function T(){return Mt(n.fixedHeight)||(g?n.autoHeight?null:R():x())}function R(){var I=Mt(n.gap);return"calc((100%"+(I&&" + "+I)+")/"+(n.perPage||1)+(I&&" - "+I)+")"}function k(){return et(h)[c("width")]}function V(I,F){var P=f(I||0);return P?et(P.slide)[c("width")]+(F?0:Y()):0}function O(I,F){var P=f(I);if(P){var N=et(P.slide)[c("right")],J=et(h)[c("left")];return Ge(N-J)+(F?0:Y())}return 0}function G(I){return O(e.length-1)-O(0)+V(0,I)}function Y(){var I=f(0);return I&&parseFloat(at(I.slide,c("marginRight")))||0}function b(I){return parseFloat(at(L,c("padding"+(I?"Right":"Left"))))||0}function B(){return e.is(Wn)||G(!0)>k()}return{mount:C,resize:M,listSize:k,slideSize:V,sliderSize:G,totalSize:O,getPadding:b,isOverflow:B}}var ms=2;function gs(e,t,n){var r=ke(e),o=r.on,s=t.Elements,i=t.Slides,a=t.Direction.resolve,c=[],u;function d(){o(Be,L),o([Ke,Qt],f),(u=$())&&(m(u),t.Layout.resize(!0))}function L(){h(),d()}function h(){Vt(c),St(c),r.destroy()}function f(){var v=$();u!==v&&(u<v||!v)&&r.emit(Be)}function m(v){var C=i.get().slice(),y=C.length;if(y){for(;C.length<v;)Kn(C,C);Kn(C.slice(-v),C.slice(0,v)).forEach(function(M,H){var A=H<v,x=g(M.slide,H);A?Vr(x,C[0].slide):Pn(s.list,x),Kn(c,x),i.register(x,H-v+(A?0:y),M.index)})}}function g(v,C){var y=v.cloneNode(!0);return mt(y,n.classes.clone),y.id=e.root.id+"-clone"+zr(C+1),y}function $(){var v=n.clones;if(!e.is(sn))v=0;else if(Ln(v)){var C=n[a("fixedWidth")]&&t.Layout.slideSize(0),y=C&&bn(et(s.track)[a("width")]/C);v=y||n[a("autoWidth")]&&e.length||n.perPage*ms}return v}return{mount:d,destroy:h}}function hs(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=e.state.set,a=t.Layout,c=a.slideSize,u=a.getPadding,d=a.totalSize,L=a.listSize,h=a.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,$=t.Elements,v=$.list,C=$.track,y;function M(){y=t.Transition,o([It,or,Ke,Be],H)}function H(){t.Controller.isBusy()||(t.Scroll.cancel(),x(e.index),t.Slides.update())}function A(P,N,J,oe){P!==N&&I(P>J)&&(k(),_(R(G(),P>J),!0)),i(on),s(wt,N,J,P),y.start(N,function(){i(Jt),s(an,N,J,P),oe&&oe()})}function x(P){_(O(P,!0))}function _(P,N){if(!e.is(Wn)){var J=N?P:T(P);at(v,"transform","translate"+m("X")+"("+J+"px)"),P!==J&&s(Ci)}}function T(P){if(e.is(sn)){var N=V(P),J=N>t.Controller.getEnd(),oe=N<0;(oe||J)&&(P=R(P,J))}return P}function R(P,N){var J=P-B(N),oe=h();return P-=g(oe*(bn(Ge(J)/oe)||1))*(N?1:-1),P}function k(){_(G(),!0),y.cancel()}function V(P){for(var N=t.Slides.get(),J=0,oe=1/0,K=0;K<N.length;K++){var le=N[K].index,D=Ge(O(le,!0)-P);if(D<=oe)oe=D,J=le;else break}return J}function O(P,N){var J=g(d(P-1)-b(P));return N?Y(J):J}function G(){var P=m("left");return et(v)[P]-et(C)[P]+g(u(!1))}function Y(P){return n.trimSpace&&e.is(en)&&(P=qt(P,0,g(h(!0)-L()))),P}function b(P){var N=n.focus;return N==="center"?(L()-c(P,!0))/2:+N*c(P)||0}function B(P){return O(P?t.Controller.getEnd():0,!!n.trimSpace)}function I(P){var N=g(R(G(),P));return P?N>=0:N<=v[m("scrollWidth")]-et(C)[m("width")]}function F(P,N){N=Ln(N)?G():N;var J=P!==!0&&g(N)<g(B(!1)),oe=P!==!1&&g(N)>g(B(!0));return J||oe}return{mount:M,move:A,jump:x,translate:_,shift:R,cancel:k,toIndex:V,toPosition:O,getPosition:G,getLimit:B,exceededLimit:F,reposition:H}}function fs(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=t.Move,a=i.getPosition,c=i.getLimit,u=i.toPosition,d=t.Slides,L=d.isEnough,h=d.getLength,f=n.omitEnd,m=e.is(sn),g=e.is(en),$=We(G,!1),v=We(G,!0),C=n.start||0,y,M=C,H,A,x;function _(){T(),o([Ke,Be,er],T),o(or,R)}function T(){H=h(!0),A=n.perMove,x=n.perPage,y=I();var D=qt(C,0,f?y:H-1);D!==C&&(C=D,i.reposition())}function R(){y!==I()&&s(er)}function k(D,ie,ve){if(!le()){var pe=O(D),Ce=B(pe);Ce>-1&&(ie||Ce!==C)&&(J(Ce),i.move(pe,Ce,M,ve))}}function V(D,ie,ve,pe){t.Scroll.scroll(D,ie,ve,function(){var Ce=B(i.toIndex(a()));J(f?At(Ce,y):Ce),pe&&pe()})}function O(D){var ie=C;if(_t(D)){var ve=D.match(/([+\-<>])(\d+)?/)||[],pe=ve[1],Ce=ve[2];pe==="+"||pe==="-"?ie=Y(C+ +(""+pe+(+Ce||1)),C):pe===">"?ie=Ce?F(+Ce):$(!0):pe==="<"&&(ie=v(!0))}else ie=m?D:qt(D,0,y);return ie}function G(D,ie){var ve=A||(K()?1:x),pe=Y(C+ve*(D?-1:1),C,!(A||K()));return pe===-1&&g&&!ai(a(),c(!D),1)?D?0:y:ie?pe:B(pe)}function Y(D,ie,ve){if(L()||K()){var pe=b(D);pe!==D&&(ie=D,D=pe,ve=!1),D<0||D>y?!A&&(qn(0,D,ie,!0)||qn(y,ie,D,!0))?D=F(P(D)):m?D=ve?D<0?-(H%x||x):H:D:n.rewind?D=D<0?y:0:D=-1:ve&&D!==ie&&(D=F(P(ie)+(D<ie?-1:1)))}else D=-1;return D}function b(D){if(g&&n.trimSpace==="move"&&D!==C)for(var ie=a();ie===u(D,!0)&&qn(D,0,e.length-1,!n.rewind);)D<C?--D:++D;return D}function B(D){return m?(D+H)%H||0:D}function I(){for(var D=H-(K()||m&&A?1:x);f&&D-- >0;)if(u(H-1,!0)!==u(D,!0)){D++;break}return qt(D,0,H-1)}function F(D){return qt(K()?D:x*D,0,y)}function P(D){return K()?At(D,y):Qn((D>=y?H-1:D)/x)}function N(D){var ie=i.toIndex(D);return g?qt(ie,0,y):ie}function J(D){D!==C&&(M=C,C=D)}function oe(D){return D?M:C}function K(){return!Ln(n.focus)||n.isNavigation}function le(){return e.state.is([on,Tn])&&!!n.waitForTransition}return{mount:_,go:k,scroll:V,getNext:$,getPrev:v,getAdjacent:G,getEnd:I,setIndex:J,getIndex:oe,toIndex:F,toPage:P,toDest:N,hasFocus:K,isBusy:le}}var ys="http://www.w3.org/2000/svg",vs="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",Hn=40;function bs(e,t,n){var r=ke(e),o=r.on,s=r.bind,i=r.emit,a=n.classes,c=n.i18n,u=t.Elements,d=t.Controller,L=u.arrows,h=u.track,f=L,m=u.prev,g=u.next,$,v,C={};function y(){H(),o(Ke,M)}function M(){A(),y()}function H(){var V=n.arrows;V&&!(m&&g)&&T(),m&&g&&(yn(C,{prev:m,next:g}),vn(f,V?"":"none"),mt(f,v=eo+"--"+n.direction),V&&(x(),k(),he([m,g],Rn,h.id),i(hi,m,g)))}function A(){r.destroy(),bt(f,v),$?(Vt(L?[m,g]:f),m=g=null):gt([m,g],Qr)}function x(){o([It,an,Be,jt,er],k),s(g,"click",We(_,">")),s(m,"click",We(_,"<"))}function _(V){d.go(V,!0)}function T(){f=L||Xt("div",a.arrows),m=R(!0),g=R(!1),$=!0,Pn(f,[m,g]),!L&&Vr(f,h)}function R(V){var O='<button class="'+a.arrow+" "+(V?a.prev:a.next)+'" type="button"><svg xmlns="'+ys+'" viewBox="0 0 '+Hn+" "+Hn+'" width="'+Hn+'" height="'+Hn+'" focusable="false"><path d="'+(n.arrowPath||vs)+'" />';return oi(O)}function k(){if(m&&g){var V=e.index,O=d.getPrev(),G=d.getNext(),Y=O>-1&&V<O?c.last:c.prev,b=G>-1&&V>G?c.first:c.next;m.disabled=O<0,g.disabled=G<0,he(m,tt,Y),he(g,tt,b),i(fi,m,g,O,G)}}return{arrows:C,mount:y,destroy:A,update:k}}var xs=jr+"-interval";function Cs(e,t,n){var r=ke(e),o=r.on,s=r.bind,i=r.emit,a=ar(n.interval,e.go.bind(e,">"),x),c=a.isPaused,u=t.Elements,d=t.Elements,L=d.root,h=d.toggle,f=n.autoplay,m,g,$=f==="pause";function v(){f&&(C(),h&&he(h,Rn,u.track.id),$||y(),A())}function C(){n.pauseOnHover&&s(L,"mouseenter mouseleave",function(T){m=T.type==="mouseenter",H()}),n.pauseOnFocus&&s(L,"focusin focusout",function(T){g=T.type==="focusin",H()}),h&&s(h,"click",function(){$?y():M(!0)}),o([wt,ir,Be],a.rewind),o(wt,_)}function y(){c()&&t.Slides.isEnough()&&(a.start(!n.resetProgress),g=m=$=!1,A(),i(Gr))}function M(T){T===void 0&&(T=!0),$=!!T,A(),c()||(a.pause(),i(Yr))}function H(){$||(m||g?M(!1):y())}function A(){h&&(vt(h,Dt,!$),he(h,tt,n.i18n[$?"play":"pause"]))}function x(T){var R=u.bar;R&&at(R,"width",T*100+"%"),i(bi,T)}function _(T){var R=t.Slides.getAt(T);a.set(R&&+st(R.slide,xs)||n.interval)}return{mount:v,destroy:a.cancel,play:y,pause:M,isPaused:c}}function Ss(e,t,n){var r=ke(e),o=r.on;function s(){n.cover&&(o(Xr,We(a,!0)),o([It,Ke,Be],We(i,!0)))}function i(c){t.Slides.forEach(function(u){var d=_n(u.container||u.slide,"img");d&&d.src&&a(c,d,u)})}function a(c,u,d){d.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),vn(u,c?"none":"")}return{mount:s,destroy:We(i,!1)}}var ws=10,$s=600,Ts=.6,Ls=1.5,Es=800;function Ps(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=e.state.set,a=t.Move,c=a.getPosition,u=a.getLimit,d=a.exceededLimit,L=a.translate,h=e.is(en),f,m,g=1;function $(){o(wt,M),o([Ke,Be],H)}function v(x,_,T,R,k){var V=c();if(M(),T&&(!h||!d())){var O=t.Layout.sliderSize(),G=Ar(x)*O*Qn(Ge(x)/O)||0;x=a.toPosition(t.Controller.toDest(x%O))+G}var Y=ai(V,x,1);g=1,_=Y?0:_||Jn(Ge(x-V)/Ls,Es),m=R,f=ar(_,C,We(y,V,x,k),1),i(Tn),s(ir),f.start()}function C(){i(Jt),m&&m(),s(jt)}function y(x,_,T,R){var k=c(),V=x+(_-x)*A(R),O=(V-k)*g;L(k+O),h&&!T&&d()&&(g*=Ts,Ge(O)<ws&&v(u(d(!0)),$s,!1,m,!0))}function M(){f&&f.cancel()}function H(){f&&!f.isPaused()&&(M(),C())}function A(x){var _=n.easingFunc;return _?_(x):1-Math.pow(1-x,4)}return{mount:$,destroy:M,scroll:v,cancel:H}}var Ut={passive:!1,capture:!0};function _s(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=r.bind,a=r.unbind,c=e.state,u=t.Move,d=t.Scroll,L=t.Controller,h=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,$=m.orient,v=u.getPosition,C=u.exceededLimit,y,M,H,A,x,_=!1,T,R,k;function V(){i(h,br,Pr,Ut),i(h,xr,Pr,Ut),i(h,ki,G,Ut),i(h,"click",B,{capture:!0}),i(h,"dragstart",yt),o([It,Ke],O)}function O(){var E=n.drag;Q(!E),A=E==="free"}function G(E){if(T=!1,!R){var S=Ce(E);pe(E.target)&&(S||!E.button)&&(L.isBusy()?yt(E,!0):(k=S?h:window,x=c.is([on,Tn]),H=null,i(k,br,Y,Ut),i(k,xr,b,Ut),u.cancel(),d.cancel(),I(E)))}}function Y(E){if(c.is(zn)||(c.set(zn),s(pi)),E.cancelable)if(x){u.translate(y+ve(K(E)));var S=le(E)>Lo,q=_!==(_=C());(S||q)&&I(E),T=!0,s(mi),yt(E)}else N(E)&&(x=P(E),yt(E))}function b(E){c.is(zn)&&(c.set(Jt),s(gi)),x&&(F(E),yt(E)),a(k,br,Y),a(k,xr,b),x=!1}function B(E){!R&&T&&yt(E,!0)}function I(E){H=M,M=E,y=v()}function F(E){var S=J(E),q=oe(S),U=n.rewind&&n.rewindByDrag;f(!1),A?L.scroll(q,0,n.snap):e.is(Wn)?L.go($(Ar(S))<0?U?"<":"-":U?">":"+"):e.is(en)&&_&&U?L.go(C(!0)?">":"<"):L.go(L.toDest(q),!0),f(!0)}function P(E){var S=n.dragMinThreshold,q=gn(S),U=q&&S.mouse||0,X=(q?S.touch:+S)||10;return Ge(K(E))>(Ce(E)?X:U)}function N(E){return Ge(K(E))>Ge(K(E,!0))}function J(E){if(e.is(sn)||!_){var S=le(E);if(S&&S<Lo)return K(E)/S}return 0}function oe(E){return v()+Ar(E)*At(Ge(E)*(n.flickPower||600),A?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function K(E,S){return ie(E,S)-ie(D(E),S)}function le(E){return _r(E)-_r(D(E))}function D(E){return M===E&&H||M}function ie(E,S){return(Ce(E)?E.changedTouches[0]:E)["page"+g(S?"Y":"X")]}function ve(E){return E/(_&&e.is(en)?ls:1)}function pe(E){var S=n.noDrag;return!hn(E,"."+_i+", ."+pr)&&(!S||!hn(E,S))}function Ce(E){return typeof TouchEvent<"u"&&E instanceof TouchEvent}function W(){return x}function Q(E){R=E}return{mount:V,disable:Q,isDragging:W}}var As={Spacebar:" ",Right:cr,Left:lr,Up:Si,Down:wi};function to(e){return e=_t(e)?e:e.key,As[e]||e}var Eo="keydown";function Rs(e,t,n){var r=ke(e),o=r.on,s=r.bind,i=r.unbind,a=e.root,c=t.Direction.resolve,u,d;function L(){h(),o(Ke,f),o(Ke,h),o(wt,g)}function h(){var v=n.keyboard;v&&(u=v==="global"?window:a,s(u,Eo,$))}function f(){i(u,Eo)}function m(v){d=v}function g(){var v=d;d=!0,Qo(function(){d=v})}function $(v){if(!d){var C=to(v);C===c(lr)?e.go("<"):C===c(cr)&&e.go(">")}}return{mount:L,destroy:f,disable:m}}var mn=jr+"-lazy",Un=mn+"-srcset",Ws="["+mn+"], ["+Un+"]";function Is(e,t,n){var r=ke(e),o=r.on,s=r.off,i=r.bind,a=r.emit,c=n.lazyLoad==="sequential",u=[an,jt],d=[];function L(){n.lazyLoad&&(h(),o(Be,h))}function h(){St(d),f(),c?v():(s(u),o(u,m),m())}function f(){t.Slides.forEach(function(C){Dr(C.slide,Ws).forEach(function(y){var M=st(y,mn),H=st(y,Un);if(M!==y.src||H!==y.srcset){var A=n.classes.spinner,x=y.parentElement,_=_n(x,"."+A)||Xt("span",A,x);d.push([y,C,_]),y.src||vn(y,"none")}})})}function m(){d=d.filter(function(C){var y=n.perPage*((n.preloadPages||1)+1)-1;return C[1].isWithin(e.index,y)?g(C):!0}),d.length||s(u)}function g(C){var y=C[0];mt(C[1].slide,kr),i(y,"load error",We($,C)),he(y,"src",st(y,mn)),he(y,"srcset",st(y,Un)),gt(y,mn),gt(y,Un)}function $(C,y){var M=C[0],H=C[1];bt(H.slide,kr),y.type!=="error"&&(Vt(C[2]),vn(M,""),a(Xr,M,H),a(Qt)),c&&v()}function v(){d.length&&g(d.shift())}return{mount:L,destroy:We(St,d),check:m}}function ks(e,t,n){var r=ke(e),o=r.on,s=r.emit,i=r.bind,a=t.Slides,c=t.Elements,u=t.Controller,d=u.hasFocus,L=u.getIndex,h=u.go,f=t.Direction.resolve,m=c.pagination,g=[],$,v;function C(){y(),o([Ke,Be,er],C);var R=n.pagination;m&&vn(m,R?"":"none"),R&&(o([wt,ir,jt],T),M(),T(),s(yi,{list:$,items:g},_(e.index)))}function y(){$&&(Vt(m?Wt($.children):$),bt($,v),St(g),$=null),r.destroy()}function M(){var R=e.length,k=n.classes,V=n.i18n,O=n.perPage,G=d()?u.getEnd()+1:bn(R/O);$=m||Xt("ul",k.pagination,c.track.parentElement),mt($,v=mr+"--"+x()),he($,xt,"tablist"),he($,tt,V.select),he($,Jr,x()===dr?"vertical":"");for(var Y=0;Y<G;Y++){var b=Xt("li",null,$),B=Xt("button",{class:k.page,type:"button"},b),I=a.getIn(Y).map(function(P){return P.slide.id}),F=!d()&&O>1?V.pageX:V.slideX;i(B,"click",We(H,Y)),n.paginationKeyboard&&i(B,"keydown",We(A,Y)),he(b,xt,"presentation"),he(B,xt,"tab"),he(B,Rn,I.join(" ")),he(B,tt,Rr(F,Y+1)),he(B,Zt,-1),g.push({li:b,button:B,page:Y})}}function H(R){h(">"+R,!0)}function A(R,k){var V=g.length,O=to(k),G=x(),Y=-1;O===f(cr,!1,G)?Y=++R%V:O===f(lr,!1,G)?Y=(--R+V)%V:O==="Home"?Y=0:O==="End"&&(Y=V-1);var b=g[Y];b&&(ri(b.button),h(">"+Y),yt(k,!0))}function x(){return n.paginationDirection||n.direction}function _(R){return g[u.toPage(R)]}function T(){var R=_(L(!0)),k=_(L());if(R){var V=R.button;bt(V,Dt),gt(V,Co),he(V,Zt,-1)}if(k){var O=k.button;mt(O,Dt),he(O,Co,!0),he(O,Zt,"")}s(vi,{list:$,items:g},R,k)}return{items:g,mount:C,destroy:y,getAt:_,update:T}}var Fs=[" ","Enter"];function Ms(e,t,n){var r=n.isNavigation,o=n.slideFocus,s=[];function i(){e.splides.forEach(function(m){m.isParent||(u(e,m.splide),u(m.splide,e))}),r&&d()}function a(){s.forEach(function(m){m.destroy()}),St(s)}function c(){a(),i()}function u(m,g){var $=ke(m);$.on(wt,function(v,C,y){g.go(g.is(sn)?y:v)}),s.push($)}function d(){var m=ke(e),g=m.on;g(Kr,h),g(xi,f),g([It,Ke],L),s.push(m),m.emit(Ur,e.splides)}function L(){he(t.Elements.list,Jr,n.direction===dr?"vertical":"")}function h(m){e.go(m.index)}function f(m,g){Or(Fs,to(g))&&(h(m),yt(g))}return{setup:We(t.Media.set,{slideFocus:Ln(o)?r:o},!0),mount:i,destroy:a,remount:c}}function Hs(e,t,n){var r=ke(e),o=r.bind,s=0;function i(){n.wheel&&o(t.Elements.track,"wheel",a,Ut)}function a(u){if(u.cancelable){var d=u.deltaY,L=d<0,h=_r(u),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;Ge(d)>f&&h-s>m&&(e.go(L?"<":">"),s=h),c(L)&&yt(u)}}function c(u){return!n.releaseWheel||e.state.is(on)||t.Controller.getAdjacent(u)!==-1}return{mount:i}}var Ns=90;function Bs(e,t,n){var r=ke(e),o=r.on,s=t.Elements.track,i=n.live&&!n.isNavigation,a=Xt("span",rs),c=ar(Ns,We(d,!1));function u(){i&&(h(!t.Autoplay.isPaused()),he(s,$o,!0),a.textContent="…",o(Gr,We(h,!0)),o(Yr,We(h,!1)),o([an,jt],We(d,!0)))}function d(f){he(s,wo,f),f?(Pn(s,a),c.start()):(Vt(a),c.cancel())}function L(){gt(s,[So,$o,wo]),Vt(a)}function h(f){i&&he(s,So,f?"off":"polite")}return{mount:u,disable:h,destroy:L}}var Os=Object.freeze({__proto__:null,Media:Ga,Direction:Ya,Elements:cs,Slides:us,Layout:ps,Clones:gs,Move:hs,Controller:fs,Arrows:bs,Autoplay:Cs,Cover:Ss,Scroll:Ps,Drag:_s,Keyboard:Rs,LazyLoad:Is,Pagination:ks,Sync:Ms,Wheel:Hs,Live:Bs}),Vs={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"},Ds={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:as,i18n:Vs,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function js(e,t,n){var r=t.Slides;function o(){ke(e).on([It,Be],s)}function s(){r.forEach(function(a){a.style("transform","translateX(-"+100*a.index+"%)")})}function i(a,c){r.style("transition","opacity "+n.speed+"ms "+n.easing),Qo(c)}return{mount:o,start:i,cancel:Pr}}function zs(e,t,n){var r=t.Move,o=t.Controller,s=t.Scroll,i=t.Elements.list,a=We(at,i,"transition"),c;function u(){ke(e).bind(i,"transitionend",function(f){f.target===i&&c&&(L(),c())})}function d(f,m){var g=r.toPosition(f,!0),$=r.getPosition(),v=h(f);Ge(g-$)>=1&&v>=1?n.useScroll?s.scroll(g,v,!1,m):(a("transform "+v+"ms "+n.easing),r.translate(g,!0),c=m):(r.jump(f),m())}function L(){a(""),s.cancel()}function h(f){var m=n.rewindSpeed;if(e.is(en)&&m){var g=o.getIndex(!0),$=o.getEnd();if(g===0&&f>=$||g>=$&&f===0)return m}return n.speed}return{mount:u,start:d,cancel:L}}var Ks=(function(){function e(n,r){this.event=ke(),this.Components={},this.state=qa(Yt),this.splides=[],this._o={},this._E={};var o=_t(n)?ii(document,n):n;pn(o,o+" is invalid."),this.root=o,r=Et({label:st(o,tt)||"",labelledby:st(o,Zr)||""},Ds,e.defaults,r||{});try{Et(r,JSON.parse(st(o,jr)))}catch{pn(!1,"Invalid JSON")}this._o=Object.create(Et({},r))}var t=e.prototype;return t.mount=function(r,o){var s=this,i=this.state,a=this.Components;pn(i.is([Yt,Zn]),"Already mounted!"),i.set(Yt),this._C=a,this._T=o||this._T||(this.is(Wn)?js:zs),this._E=r||this._E;var c=yn({},Os,this._E,{Transition:this._T});return Ot(c,function(u,d){var L=u(s,a,s._o);a[d]=L,L.setup&&L.setup()}),Ot(a,function(u){u.mount&&u.mount()}),this.emit(It),mt(this.root,os),i.set(Jt),this.emit(Wr),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(Jt)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(Wt(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),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(Be),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,s=this.state;return s.is(Yt)?ke(this).on(Wr,this.destroy.bind(this,r)):(Ot(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(qr),o.destroy(),r&&St(this.splides),s.set(Zn)),this},Va(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})(),no=Ks;no.defaults={};no.STATES=ja;var Po=[[It,"onMounted"],[Wr,"onReady"],[wt,"onMove"],[an,"onMoved"],[Kr,"onClick"],[li,"onActive"],[ci,"onInactive"],[di,"onVisible"],[ui,"onHidden"],[Be,"onRefresh"],[Ke,"onUpdated"],[Qt,"onResize"],[or,"onResized"],[pi,"onDrag"],[mi,"onDragging"],[gi,"onDragged"],[ir,"onScroll"],[jt,"onScrolled"],[qr,"onDestroy"],[hi,"onArrowsMounted"],[fi,"onArrowsUpdated"],[yi,"onPaginationMounted"],[vi,"onPaginationUpdated"],[Ur,"onNavigationMounted"],[Gr,"onAutoplayPlay"],[bi,"onAutoplayPlaying"],[Yr,"onAutoplayPause"],[Xr,"onLazyLoadLoaded"]];function ro(...e){return e.filter(Boolean).join(" ")}function tr(e){return e!==null&&typeof e=="object"}function Fr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Fr(n,t[r]));if(tr(e)&&tr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Fr(e[o],t[o]))}return e===t}function qs(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Us(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function Mr(e,t){const n=e;return Us(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():tr(r)?n[o]=Mr(tr(n[o])?n[o]:{},r):n[o]=r}),n}var Gs=({children:e,className:t,...n})=>p.createElement("div",{className:ro("splide__track",t),...n},p.createElement("ul",{className:"splide__list"},e)),oo=class extends p.Component{constructor(){super(...arguments),this.splideRef=p.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new no(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Mr({},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&&!Fr(this.options,e)&&(this.splide.options=e,this.options=Mr({},e));const t=this.getSlides();qs(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){Po.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(e,...o)})})}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,...o}=this.props;return p.createElement(t,{className:ro("splide",e),ref:this.splideRef,...this.omit(o,["options",...Po.map(s=>s[1])])},n?p.createElement(Gs,null,r):r)}},io=({children:e,className:t,...n})=>p.createElement("li",{className:ro("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 Ys="RichTextRenderer-module__link___BWeZ2",Xs={link:Ys},Zs=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))},mr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Zs(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pt(e){const{color:t,...n}=e;return n}function Ye(e,t){var o,s,i;const{fontSize:n,lineHeight:r}=e;return{fontFamily:mr(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:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(i=e.textAppearance)==null?void 0:i.fontVariant,textAlign:e.textAlign,color:e.color}}const xn=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?l.jsx("a",{className:Xs.link,href:r.value,target:r.target,children:t(r.children)},o):l.jsx("span",{style:Js(r),children:r.text},o));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const o=n.children;return l.jsx("div",{children:t(o)},r)})})};function Js(e){return{...e.fontFamily&&{fontFamily:mr(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 Qs="SvgImage-module__svg___q3xE-",el="SvgImage-module__img___VsTm-",_o={svg:Qs,img:el},tl=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},nl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Pt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[s,i]=p.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return p.useEffect(()=>{if(typeof window<"u"&&window.CSS){const a=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(a)}},[]),!tl(e)||!s?l.jsx("img",{src:e,alt:"",className:Te(_o.img,r),style:o}):l.jsx("span",{"data-supports-mask":s,className:Te(_o.svg,r),style:{"--svg":nl(e),"--fill":t,"--hover-fill":n,...o??{}}})},rl={"top-left":ae.topLeftAlignment,"top-center":ae.topCenterAlignment,"top-right":ae.topRightAlignment,"middle-left":ae.middleLeftAlignment,"middle-center":ae.middleCenterAlignment,"middle-right":ae.middleRightAlignment,"bottom-left":ae.bottomLeftAlignment,"bottom-center":ae.bottomCenterAlignment,"bottom-right":ae.bottomRightAlignment};function ol({settings:e,content:t,styles:n,isEditor:r}){const[o,s]=p.useState(null),{widthSettings:i,fontSettings:a,letterSpacing:c,textAlign:u,wordSpacing:d,fontSizeLineHeight:L,textAppearance:h,color:f}=n.imageCaption,[m,g]=p.useState(void 0),[$,v]=p.useState(null),[C,y]=p.useState(0),[M,H]=p.useState(0),{direction:A,transition:x,controls:_,pagination:T,imageCaption:R,triggers:k}=e,V=p.useRef(x.type),{x:O,y:G}=e.controls.offset,Y=b=>{o&&o.go(b)};return p.useEffect(()=>{if(!$)return;const b=new ResizeObserver(B=>{if(!o)return;const[W]=B;g({width:Math.round(W.contentRect.width),height:Math.round(W.contentRect.height)})});return b.observe($),()=>b.unobserve($)},[$]),p.useEffect(()=>{!o||V.current===x.type||(H(b=>b+1),V.current=x.type)},[x.type]),l.jsx("div",{className:Te(ae.wrapper,{[ae.editor]:r}),ref:v,children:l.jsxs("div",{className:ae.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:x.backgroundColor&&x.type==="fade in"?x.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Te(ae.captionBlock),children:l.jsx("div",{className:ae.captionTextWrapper,children:t.map((b,B)=>l.jsx("div",{className:Te(ae.captionText,rl[R.alignment],{[ae.withPointerEvents]:B===C&&r,[ae.active]:B===C}),style:{fontFamily:mr(a.fontFamily),fontWeight:a.fontWeight,fontStyle:a.fontStyle,width:i.sizing==="auto"?"max-content":w.scalingValue(i.width,r),letterSpacing:w.scalingValue(c,r),wordSpacing:w.scalingValue(d,r),textAlign:u,fontSize:w.scalingValue(L.fontSize,r),lineHeight:w.scalingValue(L.lineHeight,r),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:f,transitionDuration:x.duration?`${Math.round(parseInt(x.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:ae.captionTextInner,style:{"--link-hover-color":R.linkHoverColor,"--link-color":R.linkColor,position:"relative",top:w.scalingValue(R.offset.y,r),left:w.scalingValue(R.offset.x,r)},children:l.jsx(xn,{content:b.imageCaption})})},B))})}),l.jsx(oo,{onMove:b=>{y(b.index)},ref:s,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:A==="horiz"||x.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:x.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((b,B)=>l.jsx(io,{children:l.jsx("div",{className:ae.sliderItem,children:l.jsx("div",{className:ae.imgWrapper,children:l.jsx("img",{className:Te(ae.sliderImage,{[ae.contain]:b.image.objectFit==="contain",[ae.cover]:b.image.objectFit==="cover"}),src:b.image.url,alt:b.image.name??""})})})},B))},M),_.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Te(ae.arrow,{[ae.arrowVertical]:A==="vert",[ae.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:l.jsxs("button",{onClick:()=>{Y("-1")},className:ae.arrowInner,style:{transform:`translate(${w.scalingValue(O,r)}, ${w.scalingValue(G*(A==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&l.jsx(Pt,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Te(ae.arrowImg,ae.mirror)}),!_.arrowsImgUrl&&l.jsx(Ao,{color:_.color,className:Te(ae.arrowIcon,ae.arrowImg,ae.mirror)})]})}),l.jsx("div",{className:Te(ae.arrow,ae.nextArrow,{[ae.arrowVertical]:A==="vert",[ae.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:l.jsxs("button",{className:ae.arrowInner,onClick:()=>Y("+1"),style:{transform:`translate(${w.scalingValue(O*(A==="horiz"?-1:1),r)}, ${w.scalingValue(G,r)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&l.jsx(Pt,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:ae.arrowImg}),!_.arrowsImgUrl&&l.jsx(Ao,{color:_.color,className:Te(ae.arrowIcon,ae.arrowImg)})]})})]}),k.triggersList.click&&l.jsx("div",{className:ae.clickOverlay,onClick:()=>{o&&o.go("+1")}}),T.isActive&&l.jsx("div",{className:Te(ae.pagination,{[ae.paginationInsideBottom]:T.position==="inside-1"&&A==="horiz",[ae.paginationInsideTop]:T.position==="inside-2"&&A==="horiz",[ae.paginationOutsideBottom]:T.position==="outside-1"&&A==="horiz",[ae.paginationOutsideTop]:T.position==="outside-2"&&A==="horiz",[ae.paginationInsideLeft]:T.position==="inside-1"&&A==="vert",[ae.paginationInsideRight]:T.position==="inside-2"&&A==="vert",[ae.paginationOutsideLeft]:T.position==="outside-1"&&A==="vert",[ae.paginationOutsideRight]:T.position==="outside-2"&&A==="vert",[ae.paginationVertical]:A==="vert"}),children:l.jsx("div",{className:ae.paginationInner,style:{backgroundColor:T.colors[2],transform:`scale(${T.scale/100}) translate(${w.scalingValue(T.offset.x,r)}, ${w.scalingValue(T.offset.y,r)}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:t.map((b,B)=>l.jsx("button",{onClick:()=>{o&&o.go(B)},className:Te(ae.paginationItem),children:l.jsx("div",{className:Te(ae.dot,{[ae.activeDot]:B===C}),style:{backgroundColor:B===C?T.colors[0]:T.colors[1],"--pagination-hover-color":T.hover}})},B))})})]})})}function Ao({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 il={element:ol,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"]}},al="ImageRevealSlider-module__imageRevealSlider___UE5Ob",sl="ImageRevealSlider-module__image___Qjt-e",ll="ImageRevealSlider-module__link___N-iLG",cl="ImageRevealSlider-module__cursor___2U03d",zt={imageRevealSlider:al,image:sl,link:ll,cursor:cl};function Ro(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const s=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*s,a=s/2,c=i/2;if(e>=r.x-a&&e<=r.x+a&&t>=r.y-c&&t<=r.y+c)return!0}return!1}function xr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function dl(e,t,n,r){let o,s;if(t==="custom"){o=n;const i=await xr(e);s=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await xr(e);s=i.height/i.width*o}else{const i=await xr(e);o=i.width,s=i.height}return{width:o,height:s,finalWidth:`${o}px`}}function ul({settings:e,content:t,isEditor:n}){const[r,o]=p.useState(null),[s,i]=p.useState([]),[a,c]=p.useState(0),u=p.useRef(0),[d,L]=p.useState({x:0,y:0}),[h,f]=p.useState(1),[m,g]=p.useState("none"),$=p.useRef({x:0,y:0}),[v,C]=p.useState(!1),{sizeType:y,imageWidth:M,randomRangeImageWidth:H}=e.imageSize,{revealPosition:A,visible:x}=e.position,{cursorType:_,target:T,defaultCursorScale:R,defaultCursor:k,hoverCursorScale:V,hoverCursor:O}=e.cursor;p.useEffect(()=>{if(!r)return;const b=(F,P)=>{const N=r.getBoundingClientRect(),J=F-N.left,oe=P-N.top;if(L({x:J,y:oe}),_==="system"){g("none"),f(1);return}const K=J,le=oe,D=document.elementFromPoint(N.left+K,N.top+le);if(D&&D.closest("a")){g("none"),f(1);return}const ie=Ro(K,le,s)||T==="area"?{img:O??"none",scale:V}:{img:k??"none",scale:R};g(ie.img),f(ie.scale)},B=F=>{F.stopPropagation(),$.current={x:F.clientX,y:F.clientY},b(F.clientX,F.clientY)},W=()=>{v&&b($.current.x,$.current.y)};return r.addEventListener("mousemove",B),window.addEventListener("scroll",W,!0),()=>{r.removeEventListener("mousemove",B),window.removeEventListener("scroll",W,!0)}},[r,v,d,_,T,O,k,V,R,s]),p.useEffect(()=>{v||(g("none"),f(0))},[v]);const G=async(b,B,W,F={})=>{const{width:P,height:N,finalWidth:J}=await dl(b.image.url,y,M,H);let oe=0,K=0;A==="same"?(oe=B/2,K=W/2):(oe=F.x??Math.random()*B,K=F.y??Math.random()*W);const le=Math.min(Math.max(oe,P/2),B-P/2),D=Math.min(Math.max(K,N/2),W-N/2);return{id:u.current++,url:b.image.url,link:b.link,name:b.image.name,x:le,y:D,width:J}};p.useEffect(()=>{if(!r||t.length===0)return;const b=r.getBoundingClientRect(),B=b.width,W=b.height,F=[];(async()=>{const N=t[0],J=await G(N,B,W);F.push(J),i(F),c(1)})()},[y,M,H,A,r]),p.useEffect(()=>{x==="last One"&&i(b=>b.length>0?[b[b.length-1]]:[])},[x]);const Y=async b=>{if(!r)return;const B=r.getBoundingClientRect(),W=b.clientX-B.left,F=b.clientY-B.top;if(T==="image"&&!Ro(W,F,s))return;let P=0,N=0;A==="on Click"?(P=W,N=F):A==="same"?(P=B.width/2,N=B.height/2):(P=Math.random()*B.width,N=Math.random()*B.height);const J=t[a],oe=await G(J,B.width,B.height,{x:P,y:N});i(K=>x==="all"?[...K,oe]:[oe]),c(K=>K>=t.length-1?0:K+1)};return l.jsxs("div",{ref:o,onClick:Y,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:zt.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(b=>l.jsx("div",{className:zt.wrapper,style:{top:`${b.y}px`,left:`${b.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:b.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:T==="area"&&b.link?l.jsx("a",{href:b.link,target:"_blank",className:zt.link,children:l.jsx("img",{src:b.url,alt:b.name,className:zt.image},b.id)}):l.jsx("img",{src:b.url,alt:b.name,className:zt.image},b.id)},b.id)),v&&l.jsx("div",{className:zt.cursor,style:{left:`${d.x}px`,top:`${d.y}px`,transform:`translate(-50%, -50%) scale(${h})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const pl={element:ul,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:""}]}}}},ml="LightBox-module__hidden___9s-9x",gl="LightBox-module__heroImage___sTxNF",hl="LightBox-module__background___rm9ml",fl="LightBox-module__editor___4ACaY",yl="LightBox-module__contentStyle___Bgnsq",vl="LightBox-module__imageStyle___tLIlB",bl="LightBox-module__imgWrapper___LuFUp",xl="LightBox-module__contain___8-yaS",Cl="LightBox-module__cover___hNvOG",Sl="LightBox-module__caption___b6L2I",wl="LightBox-module__captionTextInner___rCGNH",$l="LightBox-module__lightboxSplide___XFuWC",Tl="LightBox-module__arrow___iz38X",Ll="LightBox-module__arrowVertical___Zfz81",El="LightBox-module__nextArrow___zkAQN",Pl="LightBox-module__arrowInner___p48sW",_l="LightBox-module__arrowIcon___3VaFf",Al="LightBox-module__arrowImg___pNV88",Rl="LightBox-module__mirror___pjeXc",Il="LightBox-module__thumbsWrapper___GB-nU",Wl="LightBox-module__thumbsContainerVertical___wttk5",kl="LightBox-module__thumbsContainer___osSma",Fl="LightBox-module__thumbsAlignStart___MO6tY",Ml="LightBox-module__thumbsAlignCenter___Q4sUx",Hl="LightBox-module__thumbsAlignEnd___p4y9R",Nl="LightBox-module__thumbItem___HvnF3",Bl="LightBox-module__closeButton___g2khP",Ol="LightBox-module__fadeIn___0m5GW",Vl="LightBox-module__slideInLeft___gPYwC",Dl="LightBox-module__slideInRight___S-pPp",jl="LightBox-module__slideInTop___DFdAj",zl="LightBox-module__slideInBottom___m27kZ",Kl="LightBox-module__fadeOut___55qBR",ql="LightBox-module__slideOutLeft___NvU7P",Ul="LightBox-module__slideOutRight___SK7eC",Gl="LightBox-module__slideOutTop___Vgg0z",Yl="LightBox-module__slideOutBottom___nJ0Ef",Xl="LightBox-module__scaleSlide___vZriG",Z={hidden:ml,heroImage:gl,background:hl,editor:fl,contentStyle:yl,imageStyle:vl,imgWrapper:bl,contain:xl,cover:Cl,caption:Sl,captionTextInner:wl,lightboxSplide:$l,arrow:Tl,arrowVertical:Ll,nextArrow:El,arrowInner:Pl,arrowIcon:_l,arrowImg:Al,mirror:Rl,thumbsWrapper:Il,thumbsContainerVertical:Wl,thumbsContainer:kl,thumbsAlignStart:Fl,thumbsAlignCenter:Ml,thumbsAlignEnd:Hl,thumbItem:Nl,closeButton:Bl,fadeIn:Ol,slideInLeft:Vl,slideInRight:Dl,slideInTop:jl,slideInBottom:zl,fadeOut:Kl,slideOutLeft:ql,slideOutRight:Ul,slideOutTop:Gl,slideOutBottom:Yl,scaleSlide:Xl},Hn=(e,t,n)=>{const r={},[o,s]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),s==="left"?(r.left="0",r.right="auto"):s==="center"?(r.left="50%",r.right="auto"):s==="right"&&(r.left="auto",r.right="0"),o==="middle"&&s==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:s==="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 Fi(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 Io(e){const t=e.getBoundingClientRect(),n=Fi(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,a=r/o,c=s/i;let u,d;c>a?(u=r,d=r/c):(d=o,u=o*c);const L=t.left+n.left,h=t.top+n.top,f=(r-u)/2+L,m=(o-d)/2+h;return{x:f,y:m,width:u,height:d}}function Wo(e){const t=e.getBoundingClientRect(),n=Fi(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ko(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.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 Zl(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})(),o=(()=>{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})(),s=(()=>{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:o,disappearClass:s}}const Jl=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:s,isPreviewMode:i})=>{const[a,c]=p.useState(!1),{url:u}=e.thumbnailBlock.cover;return p.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:u,alt:"Cover",className:Z.heroImage,onClick:()=>c(!0)}),l.jsx(Ql,{isOpen:a,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:s})]})},Ql=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:s,isEditor:i,metadata:a})=>{var E;const[c,u]=p.useState(0),[d,L]=p.useState(0),[h,f]=p.useState(!1),[m,g]=p.useState(!1),[$,v]=p.useState({}),C=p.useRef(null),y=p.useRef(null),M=p.useRef(null),H=p.useRef(!1),A=p.useRef(null),x=p.useRef(null),_=p.useRef(null),T=p.useRef(null),R=p.useRef(!1),k=p.useRef(null),[V,O]=p.useState(!1),{appear:G,triggers:Y,slider:b,thumbnail:B,controls:W,area:F,caption:P,layout:N}=o.lightboxBlock,{appearClass:J,backdropAppearClass:oe,backdropDisappearClass:K,disappearClass:le}=Zl(G.type,G.direction),D=(a==null?void 0:a.itemId)??null;p.useEffect(()=>{const S=()=>{setTimeout(()=>{var U,X;(X=(U=C.current)==null?void 0:U.splide)==null||X.refresh()},16)},q=()=>{L(U=>U+1)};return window.addEventListener("ArticleEditor.Layout:change",S),window.addEventListener("ArticleEditor.ComponentContent:change",q),()=>{window.removeEventListener("ArticleEditor.Layout:change",S),window.removeEventListener("ArticleEditor.ComponentContent:change",q)}},[]),p.useEffect(()=>{if(!e||!B.isActive){O(!1);return}const S=k.current;if(!S)return;const q=()=>{b.direction==="horiz"?O(S.scrollWidth>S.clientWidth):O(S.scrollHeight>S.clientHeight)};q();const U=new ResizeObserver(q);return U.observe(S),()=>U.disconnect()},[e,B.isActive,n.length,$,b.direction]);const ie=p.useCallback(()=>{const S=window.matchMedia("(max-width: 768px)").matches,q=ko(F.color);S&&!i&&q>.9&&(document.body.style.backgroundColor=""),f(!0),H.current=!0;const U=X=>{X.target===A.current&&X.animationName&&(A.current&&x.current&&A.current.removeEventListener("animationend",x.current),x.current=null,H.current&&(H.current=!1,t()),f(!1))};A.current&&(x.current=U,A.current.addEventListener("animationend",U))},[t,F.color,i]),ve=(S,q,U)=>{var X,ee;if(S){if(Y.type==="click"&&Y.switch==="image")Y.repeat==="close"&&c===n.length-1?ie():(X=C.current)==null||X.go("+1");else if(Y.type==="click"&&Y.switch==="50/50"){const re=S.getBoundingClientRect(),ne=q-re.left,ce=U-re.top,Se=re.width,de=re.height;let j;b.direction==="horiz"?j=ne<Se/2?"-1":"+1":j=ce<de/2?"-1":"+1",(ee=C.current)==null||ee.go(j)}}},pe=S=>{if(R.current){R.current=!1;return}const q=n[c],U=(q==null?void 0:q.image.objectFit)==="cover";let X,ee;if("changedTouches"in S&&S.changedTouches.length>0)X=S.changedTouches[0].clientX,ee=S.changedTouches[0].clientY;else if("clientX"in S)X=S.clientX,ee=S.clientY;else return;let re;if(U&&M.current){const ne=Wo(M.current);re=X>=ne.left&&X<=ne.right&&ee>=ne.top&&ee<=ne.bottom}else{const ne=M.current?Io(M.current):null;if(!ne){S.target===S.currentTarget&&ie();return}re=X>=ne.x&&X<=ne.x+ne.width&&ee>=ne.y&&ee<=ne.y+ne.height}re?ve(M.current,X,ee):ie()},Ce=S=>{const q=S.target;(q.classList.contains(Z.thumbsWrapper)||q.classList.contains(Z.thumbsContainer))&&pe(S)};p.useEffect(()=>{if(!e)return;const S=q=>{var U,X;if(q.key==="Escape"){ie();return}if(q.key==="ArrowRight"){u(ee=>(ee+1)%Math.max(n.length,1)),(U=C.current)==null||U.go("+1");return}q.key==="ArrowLeft"&&(u(ee=>(ee-1+Math.max(n.length,1))%Math.max(n.length,1)),(X=C.current)==null||X.go("-1"))};return window.addEventListener("keydown",S),()=>{window.removeEventListener("keydown",S)}},[e,ie,n.length]),p.useEffect(()=>{if(e){if(u(0),L(q=>q+1),H.current=!1,f(!1),g(!1),v({}),!D)return;const S=new CustomEvent("page-overlay",{detail:{itemId:D}});window.dispatchEvent(S)}return()=>{A.current&&x.current&&(A.current.removeEventListener("animationend",x.current),x.current=null),g(!1)}},[e,D]),p.useEffect(()=>{y.current!==null&&y.current!==b.type&&L(S=>S+1),y.current=b.type},[b.type]),p.useEffect(()=>{if(!e)return;const S=document.body.style.overflow,q=window.matchMedia("(max-width: 768px)").matches,U=ko(F.color);document.body.style.overflow="hidden",g(!1);const X=re=>{re.target===A.current&&!H.current&&re.animationName&&(q&&!i&&U>.9&&(document.body.style.backgroundColor=F.color),g(!0),A.current&&_.current&&A.current.removeEventListener("animationend",_.current),_.current=null)};A.current&&(_.current=X,A.current.addEventListener("animationend",X));const ee=re=>{const ne=re.target;ne&&(ne.closest(`.${Z.thumbsWrapper}`)||ne.closest(`.${Z.thumbsContainer}`))||b.type!=="slide"&&re.preventDefault()};return document.addEventListener("touchmove",ee,{passive:!1}),()=>{document.body.style.overflow=S,document.removeEventListener("touchmove",ee),A.current&&_.current&&(A.current.removeEventListener("animationend",_.current),_.current=null),g(!1)}},[e,i,F.color,b.type]),p.useEffect(()=>{if(!e)return;const S=q=>{var X,ee;if(H.current){q.stopPropagation();return}if(R.current){R.current=!1;return}const U=q.target;if(!(U&&(U.closest(`.${Z.thumbsContainer}`)||U.closest(`.${Z.thumbItem}`)||U.closest(`.${Z.arrow}`)||U.closest(`.${Z.closeButton}`)||U.closest(`.${Z.caption}`)))){if(b.type==="slide"&&Y.type==="drag"&&((ee=(X=C.current)==null?void 0:X.splide)!=null&&ee.root)){const re=C.current.splide.root;if(U&&(re.contains(U)||re===U))return}if(q.touches.length===0&&q.changedTouches.length>0){const re=n[c],ne=(re==null?void 0:re.image.objectFit)==="cover",ce=q.changedTouches[0];let Se;if(ne&&M.current){const de=Wo(M.current);Se=ce.clientX>=de.left&&ce.clientX<=de.right&&ce.clientY>=de.top&&ce.clientY<=de.bottom}else{const de=M.current?Io(M.current):null;if(!de)return;Se=ce.clientX>=de.x&&ce.clientX<=de.x+de.width&&ce.clientY>=de.y&&ce.clientY<=de.y+de.height}if(!Se){q.stopPropagation(),H.current=!0;const de=j=>{j.stopPropagation(),j.preventDefault(),document.removeEventListener("click",de,!0)};document.addEventListener("click",de,!0),ie()}}}};return document.addEventListener("touchend",S,{passive:!0}),()=>{document.removeEventListener("touchend",S)}},[e,ie,c,n]);const I=(b.type==="scale"||b.type==="fade")&&b.direction==="vert"&&Y.type==="drag";p.useEffect(()=>{var j,ue;if(!e||!I||!((ue=(j=C.current)==null?void 0:j.splide)!=null&&ue.root))return;const S=C.current.splide.root,q=30,U=(z,te)=>{if(T.current){const be=Math.abs(z-T.current.x),ye=Math.abs(te-T.current.y);(be>0||ye>0)&&(R.current=!0)}},X=z=>{T.current&&(z.preventDefault(),U(z.clientX,z.clientY))},ee=z=>{T.current&&z.touches.length>0&&(z.preventDefault(),U(z.touches[0].clientX,z.touches[0].clientY))},re=(z,te)=>{if(!T.current||!C.current){T.current=null;return}const be=Math.abs(z-T.current.x),ye=Math.abs(te-T.current.y);ye>q&&ye>be&&C.current.go(te<T.current.y?"+1":"-1"),T.current=null},ne=z=>{T.current&&re(z.clientX,z.clientY),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("pointermove",X)},ce=z=>{if(T.current){if(z.changedTouches.length>0){const te=z.changedTouches[0];re(te.clientX,te.clientY)}document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),document.removeEventListener("touchmove",ee)}},Se=z=>{T.current={x:z.clientX,y:z.clientY},R.current=!1,document.addEventListener("pointermove",X,{passive:!1}),document.addEventListener("pointerup",ne),document.addEventListener("pointercancel",ne)},de=z=>{z.touches.length>0&&(T.current={x:z.touches[0].clientX,y:z.touches[0].clientY},R.current=!1,document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",ce),document.addEventListener("touchcancel",ce))};return S.addEventListener("pointerdown",Se),S.addEventListener("touchstart",de),()=>{S.removeEventListener("pointerdown",Se),S.removeEventListener("touchstart",de),document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),T.current=null,R.current=!1}},[e,I,d]);const Q={backgroundColor:F.color,backdropFilter:`blur(${F.blur}px)`,animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Jo.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:i?null:A,className:Te(Z.background,h?K:oe,{[Z.editor]:i},{[Z.hidden]:!e}),style:{...Q,...m&&!i&&!h?{position:"absolute"}:{}}}),l.jsxs("div",{ref:i?A:null,className:Te(Z.contentStyle,h?le:J,{[Z.editor]:i},{[Z.hidden]:!e}),style:{animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(oo,{onMove:S=>u(S.index),ref:C,className:Z.lightboxSplide,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,direction:b.direction==="horiz"||b.type==="fade"||b.type==="scale"?"ltr":"ttb",pagination:!1,drag:Y.type==="drag"&&!I,perPage:1,width:"100%",height:"100%",type:b.type==="fade"||b.type==="scale"?"fade":"loop",padding:0,rewind:Y.repeat!=="close",start:0},style:{"--splide-speed":b.duration},children:n.map((S,q)=>{const U=Hn(N.position,N.offset,i),X=`${w.scalingValue(N.padding.top,i)} ${w.scalingValue(N.padding.right,i)} ${w.scalingValue(N.padding.bottom,i)} ${w.scalingValue(N.padding.left,i)}`,ee=b.type==="scale"?(()=>{const{transform:re,...ne}=U;return{...ne,position:"absolute",padding:X,boxSizing:"border-box","--position-transform":re||"none"}})():{...U,position:"absolute",padding:X,boxSizing:"border-box"};return l.jsx(io,{children:l.jsx("div",{className:Z.imgWrapper,onClick:pe,children:l.jsx("img",{ref:q===c?M:null,className:Te(Z.imageStyle,{[Z.contain]:S.image.objectFit==="contain",[Z.cover]:S.image.objectFit==="cover",[Z.scaleSlide]:b.type==="scale"}),src:S.image.url,alt:S.image.name??"",style:{...ee,pointerEvents:S.image.objectFit==="contain"?"none":"auto"}})})},q)})},d),W.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Te(Z.arrow,{[Z.arrowVertical]:b.direction==="vert"}),style:{color:W.color,"--arrow-hover-color":W.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(W.offset.x,i)}, ${w.scalingValue(W.offset.y*(b.direction==="horiz"?1:-1),i)}) scale(${W.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=C.current)==null?void 0:S.go("-1")},"aria-label":"Previous",children:[W.arrowsImgUrl&&l.jsx(Pt,{url:W.arrowsImgUrl,fill:W.color,hoverFill:W.hover,className:Te(Z.arrowImg,Z.mirror)}),!W.arrowsImgUrl&&l.jsx(Fo,{color:W.color,className:Te(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),l.jsx("div",{className:Te(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:b.direction==="vert"}),style:{color:W.color,"--arrow-hover-color":W.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(W.offset.x*(b.direction==="horiz"?-1:1),i)}, ${w.scalingValue(W.offset.y,i)}) scale(${W.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=C.current)==null?void 0:S.go("+1")},"aria-label":"Next",children:[W.arrowsImgUrl&&l.jsx(Pt,{url:W.arrowsImgUrl,fill:W.color,hoverFill:W.hover,className:Z.arrowImg}),!W.arrowsImgUrl&&l.jsx(Fo,{color:W.color,className:Te(Z.arrowIcon,Z.arrowImg)})]})})]}),F.closeIconUrl&&(()=>{const S=Hn(F.closeIconAlign,F.closeIconOffset,i),q=`scale(${F.closeIconScale})`,U=S.transform?`${S.transform} ${q}`:q;return l.jsx("button",{className:Z.closeButton,style:{...S,transform:U},onClick:ie,"aria-label":"Close lightbox",children:l.jsx(Pt,{url:F.closeIconUrl,fill:F.closeIconColor??"#000000",hoverFill:F.closeIconHover??"#cccccc"})})})(),P&&P.isActive&&r.imageCaption&&((E=n[c])==null?void 0:E.imageCaption)&&(()=>{const{widthSettings:S,fontSettings:q,letterSpacing:U,textAlign:X,wordSpacing:ee,fontSizeLineHeight:re,textAppearance:ne,color:ce}=r.imageCaption;return l.jsx("div",{className:Z.caption,style:{...Hn(P.alignment,P.offset,i),fontFamily:mr(q.fontFamily),fontWeight:q.fontWeight,fontStyle:q.fontStyle,width:S.sizing==="auto"?"max-content":w.scalingValue(S.width,i),letterSpacing:w.scalingValue(U,i),wordSpacing:w.scalingValue(ee,i),textAlign:X,fontSize:w.scalingValue(re.fontSize,i),lineHeight:w.scalingValue(re.lineHeight,i),textTransform:ne.textTransform??"none",textDecoration:ne.textDecoration??"none",fontVariant:ne.fontVariant??"normal",color:ce},onClick:Se=>Se.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-color":P.linkColor,"--link-hover-color":P.linkHoverColor},children:l.jsx(xn,{content:n[c].imageCaption})})})})(),B.isActive&&(()=>{const[S,q]=B.position.split("-"),U=b.direction==="horiz"?`${S}-left`:B.position,X=Hn(U,B.offset,i),ee=()=>{if(b.direction==="horiz"){if(q==="left")return"flex-start";if(q==="center")return"center";if(q==="right")return"flex-end"}else{if(S==="top")return"flex-start";if(S==="middle")return"center";if(S==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:k,className:Z.thumbsWrapper,onClick:re=>Ce(re),style:{position:i?"absolute":"fixed",...X,...b.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Te(Z.thumbsContainer,{[Z.thumbsContainerVertical]:b.direction==="vert",[Z.thumbsAlignStart]:B.align==="start",[Z.thumbsAlignCenter]:B.align==="center",[Z.thumbsAlignEnd]:B.align==="end"}),style:{gap:w.scalingValue(B.grid.gap,i),justifyContent:V?"flex-start":ee()},children:n.map((re,ne)=>{const ce=ne===c,Se=$[ne],j=B.grid.size*(ce?B.activeState.scale:1),ue=()=>{if(B.fit!=="fit")return{};if(!Se)return b.direction==="horiz"?{height:w.scalingValue(j,i)}:{width:w.scalingValue(j,i)};const z=Se.width/Se.height;if(b.direction==="horiz"){const te=j,be=te*z;return{width:w.scalingValue(be,i),height:w.scalingValue(te,i)}}else{const te=j,be=te/z;return{width:w.scalingValue(te,i),height:w.scalingValue(be,i)}}};return l.jsx("button",{className:Z.thumbItem,style:{...b.direction==="horiz"&&B.fit!=="fit"?{height:w.scalingValue(j,i)}:{},...b.direction==="vert"&&B.fit!=="fit"?{width:w.scalingValue(j,i)}:{},...B.fit==="cover"?{width:w.scalingValue(j,i),height:w.scalingValue(j,i)}:{},...ue(),transition:ce?"all 0.25s ease-out":"none",opacity:ce?B.activeState.opacity/100:B.opacity/100,"--thumb-hover":B.activeState.opacity/100},onClick:z=>{var te;z.stopPropagation(),u(ne),(te=C.current)==null||te.go(ne)},onMouseEnter:()=>{var z;B.triggers==="hov"&&((z=C.current)==null||z.go(ne))},children:l.jsx("img",{src:re.image.url,alt:re.image.name??"",onLoad:z=>{const te=z.currentTarget;te.naturalWidth&&te.naturalHeight&&v(be=>({...be,[ne]:{width:te.naturalWidth,height:te.naturalHeight}}))},style:{objectFit:B.fit==="cover"?"cover":"contain",...B.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...B.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${re.image.name}-${ne}`)})})})})()]})]}),document.getElementById(s))};function Fo({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 ec={element:Jl,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 Nn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function tc(e){return`
6
+ */const Ys="RichTextRenderer-module__link___BWeZ2",Xs={link:Ys},Zs=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))},gr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Zs(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pt(e){const{color:t,...n}=e;return n}function Ye(e,t){var o,s,i;const{fontSize:n,lineHeight:r}=e;return{fontFamily:gr(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:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(i=e.textAppearance)==null?void 0:i.fontVariant,textAlign:e.textAlign,color:e.color}}const Cn=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?l.jsx("a",{className:Xs.link,href:r.value,target:r.target,children:t(r.children)},o):l.jsx("span",{style:Js(r),children:r.text},o));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const o=n.children;return l.jsx("div",{children:t(o)},r)})})};function Js(e){return{...e.fontFamily&&{fontFamily:gr(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 Qs="SvgImage-module__svg___q3xE-",el="SvgImage-module__img___VsTm-",_o={svg:Qs,img:el},tl=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},nl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Pt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[s,i]=p.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return p.useEffect(()=>{if(typeof window<"u"&&window.CSS){const a=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(a)}},[]),!tl(e)||!s?l.jsx("img",{src:e,alt:"",className:Te(_o.img,r),style:o}):l.jsx("span",{"data-supports-mask":s,className:Te(_o.svg,r),style:{"--svg":nl(e),"--fill":t,"--hover-fill":n,...o??{}}})},rl={"top-left":ae.topLeftAlignment,"top-center":ae.topCenterAlignment,"top-right":ae.topRightAlignment,"middle-left":ae.middleLeftAlignment,"middle-center":ae.middleCenterAlignment,"middle-right":ae.middleRightAlignment,"bottom-left":ae.bottomLeftAlignment,"bottom-center":ae.bottomCenterAlignment,"bottom-right":ae.bottomRightAlignment};function ol({settings:e,content:t,styles:n,isEditor:r}){const[o,s]=p.useState(null),{widthSettings:i,fontSettings:a,letterSpacing:c,textAlign:u,wordSpacing:d,fontSizeLineHeight:L,textAppearance:h,color:f}=n.imageCaption,[m,g]=p.useState(void 0),[$,v]=p.useState(null),[C,y]=p.useState(0),[M,H]=p.useState(0),{direction:A,transition:x,controls:_,pagination:T,imageCaption:R,triggers:k}=e,V=p.useRef(x.type),{x:O,y:G}=e.controls.offset,Y=b=>{o&&o.go(b)};return p.useEffect(()=>{if(!$)return;const b=new ResizeObserver(B=>{if(!o)return;const[I]=B;g({width:Math.round(I.contentRect.width),height:Math.round(I.contentRect.height)})});return b.observe($),()=>b.unobserve($)},[$]),p.useEffect(()=>{!o||V.current===x.type||(H(b=>b+1),V.current=x.type)},[x.type]),l.jsx("div",{className:Te(ae.wrapper,{[ae.editor]:r}),ref:v,children:l.jsxs("div",{className:ae.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:x.backgroundColor&&x.type==="fade in"?x.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Te(ae.captionBlock),children:l.jsx("div",{className:ae.captionTextWrapper,children:t.map((b,B)=>l.jsx("div",{className:Te(ae.captionText,rl[R.alignment],{[ae.withPointerEvents]:B===C&&r,[ae.active]:B===C}),style:{fontFamily:gr(a.fontFamily),fontWeight:a.fontWeight,fontStyle:a.fontStyle,width:i.sizing==="auto"?"max-content":w.scalingValue(i.width,r),letterSpacing:w.scalingValue(c,r),wordSpacing:w.scalingValue(d,r),textAlign:u,fontSize:w.scalingValue(L.fontSize,r),lineHeight:w.scalingValue(L.lineHeight,r),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:f,transitionDuration:x.duration?`${Math.round(parseInt(x.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:ae.captionTextInner,style:{"--link-hover-color":R.linkHoverColor,"--link-color":R.linkColor,position:"relative",top:w.scalingValue(R.offset.y,r),left:w.scalingValue(R.offset.x,r)},children:l.jsx(Cn,{content:b.imageCaption})})},B))})}),l.jsx(oo,{onMove:b=>{y(b.index)},ref:s,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:A==="horiz"||x.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:x.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((b,B)=>l.jsx(io,{children:l.jsx("div",{className:ae.sliderItem,children:l.jsx("div",{className:ae.imgWrapper,children:l.jsx("img",{className:Te(ae.sliderImage,{[ae.contain]:b.image.objectFit==="contain",[ae.cover]:b.image.objectFit==="cover"}),src:b.image.url,alt:b.image.name??""})})})},B))},M),_.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Te(ae.arrow,{[ae.arrowVertical]:A==="vert",[ae.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:l.jsxs("button",{onClick:()=>{Y("-1")},className:ae.arrowInner,style:{transform:`translate(${w.scalingValue(O,r)}, ${w.scalingValue(G*(A==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&l.jsx(Pt,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Te(ae.arrowImg,ae.mirror)}),!_.arrowsImgUrl&&l.jsx(Ao,{color:_.color,className:Te(ae.arrowIcon,ae.arrowImg,ae.mirror)})]})}),l.jsx("div",{className:Te(ae.arrow,ae.nextArrow,{[ae.arrowVertical]:A==="vert",[ae.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:l.jsxs("button",{className:ae.arrowInner,onClick:()=>Y("+1"),style:{transform:`translate(${w.scalingValue(O*(A==="horiz"?-1:1),r)}, ${w.scalingValue(G,r)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&l.jsx(Pt,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:ae.arrowImg}),!_.arrowsImgUrl&&l.jsx(Ao,{color:_.color,className:Te(ae.arrowIcon,ae.arrowImg)})]})})]}),k.triggersList.click&&l.jsx("div",{className:ae.clickOverlay,onClick:()=>{o&&o.go("+1")}}),T.isActive&&l.jsx("div",{className:Te(ae.pagination,{[ae.paginationInsideBottom]:T.position==="inside-1"&&A==="horiz",[ae.paginationInsideTop]:T.position==="inside-2"&&A==="horiz",[ae.paginationOutsideBottom]:T.position==="outside-1"&&A==="horiz",[ae.paginationOutsideTop]:T.position==="outside-2"&&A==="horiz",[ae.paginationInsideLeft]:T.position==="inside-1"&&A==="vert",[ae.paginationInsideRight]:T.position==="inside-2"&&A==="vert",[ae.paginationOutsideLeft]:T.position==="outside-1"&&A==="vert",[ae.paginationOutsideRight]:T.position==="outside-2"&&A==="vert",[ae.paginationVertical]:A==="vert"}),children:l.jsx("div",{className:ae.paginationInner,style:{backgroundColor:T.colors[2],transform:`scale(${T.scale/100}) translate(${w.scalingValue(T.offset.x,r)}, ${w.scalingValue(T.offset.y,r)}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:t.map((b,B)=>l.jsx("button",{onClick:()=>{o&&o.go(B)},className:Te(ae.paginationItem),children:l.jsx("div",{className:Te(ae.dot,{[ae.activeDot]:B===C}),style:{backgroundColor:B===C?T.colors[0]:T.colors[1],"--pagination-hover-color":T.hover}})},B))})})]})})}function Ao({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 il={element:ol,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"]}},al="ImageRevealSlider-module__imageRevealSlider___UE5Ob",sl="ImageRevealSlider-module__image___Qjt-e",ll="ImageRevealSlider-module__link___N-iLG",cl="ImageRevealSlider-module__cursor___2U03d",Kt={imageRevealSlider:al,image:sl,link:ll,cursor:cl};function Ro(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const s=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*s,a=s/2,c=i/2;if(e>=r.x-a&&e<=r.x+a&&t>=r.y-c&&t<=r.y+c)return!0}return!1}function Cr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function dl(e,t,n,r){let o,s;if(t==="custom"){o=n;const i=await Cr(e);s=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await Cr(e);s=i.height/i.width*o}else{const i=await Cr(e);o=i.width,s=i.height}return{width:o,height:s,finalWidth:`${o}px`}}function ul({settings:e,content:t,isEditor:n}){const[r,o]=p.useState(null),[s,i]=p.useState([]),[a,c]=p.useState(0),u=p.useRef(0),[d,L]=p.useState({x:0,y:0}),[h,f]=p.useState(1),[m,g]=p.useState("none"),$=p.useRef({x:0,y:0}),[v,C]=p.useState(!1),{sizeType:y,imageWidth:M,randomRangeImageWidth:H}=e.imageSize,{revealPosition:A,visible:x}=e.position,{cursorType:_,target:T,defaultCursorScale:R,defaultCursor:k,hoverCursorScale:V,hoverCursor:O}=e.cursor;p.useEffect(()=>{if(!r)return;const b=(F,P)=>{const N=r.getBoundingClientRect(),J=F-N.left,oe=P-N.top;if(L({x:J,y:oe}),_==="system"){g("none"),f(1);return}const K=J,le=oe,D=document.elementFromPoint(N.left+K,N.top+le);if(D&&D.closest("a")){g("none"),f(1);return}const ie=Ro(K,le,s)||T==="area"?{img:O??"none",scale:V}:{img:k??"none",scale:R};g(ie.img),f(ie.scale)},B=F=>{F.stopPropagation(),$.current={x:F.clientX,y:F.clientY},b(F.clientX,F.clientY)},I=()=>{v&&b($.current.x,$.current.y)};return r.addEventListener("mousemove",B),window.addEventListener("scroll",I,!0),()=>{r.removeEventListener("mousemove",B),window.removeEventListener("scroll",I,!0)}},[r,v,d,_,T,O,k,V,R,s]),p.useEffect(()=>{v||(g("none"),f(0))},[v]);const G=async(b,B,I,F={})=>{const{width:P,height:N,finalWidth:J}=await dl(b.image.url,y,M,H);let oe=0,K=0;A==="same"?(oe=B/2,K=I/2):(oe=F.x??Math.random()*B,K=F.y??Math.random()*I);const le=Math.min(Math.max(oe,P/2),B-P/2),D=Math.min(Math.max(K,N/2),I-N/2);return{id:u.current++,url:b.image.url,link:b.link,name:b.image.name,x:le,y:D,width:J}};p.useEffect(()=>{if(!r||t.length===0)return;const b=r.getBoundingClientRect(),B=b.width,I=b.height,F=[];(async()=>{const N=t[0],J=await G(N,B,I);F.push(J),i(F),c(1)})()},[y,M,H,A,r]),p.useEffect(()=>{x==="last One"&&i(b=>b.length>0?[b[b.length-1]]:[])},[x]);const Y=async b=>{if(!r)return;const B=r.getBoundingClientRect(),I=b.clientX-B.left,F=b.clientY-B.top;if(T==="image"&&!Ro(I,F,s))return;let P=0,N=0;A==="on Click"?(P=I,N=F):A==="same"?(P=B.width/2,N=B.height/2):(P=Math.random()*B.width,N=Math.random()*B.height);const J=t[a],oe=await G(J,B.width,B.height,{x:P,y:N});i(K=>x==="all"?[...K,oe]:[oe]),c(K=>K>=t.length-1?0:K+1)};return l.jsxs("div",{ref:o,onClick:Y,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:Kt.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(b=>l.jsx("div",{className:Kt.wrapper,style:{top:`${b.y}px`,left:`${b.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:b.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:T==="area"&&b.link?l.jsx("a",{href:b.link,target:"_blank",className:Kt.link,children:l.jsx("img",{src:b.url,alt:b.name,className:Kt.image},b.id)}):l.jsx("img",{src:b.url,alt:b.name,className:Kt.image},b.id)},b.id)),v&&l.jsx("div",{className:Kt.cursor,style:{left:`${d.x}px`,top:`${d.y}px`,transform:`translate(-50%, -50%) scale(${h})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const pl={element:ul,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:""}]}}}},ml="LightBox-module__hidden___9s-9x",gl="LightBox-module__heroImage___sTxNF",hl="LightBox-module__background___rm9ml",fl="LightBox-module__editor___4ACaY",yl="LightBox-module__contentStyle___Bgnsq",vl="LightBox-module__imageStyle___tLIlB",bl="LightBox-module__imgWrapper___LuFUp",xl="LightBox-module__contain___8-yaS",Cl="LightBox-module__cover___hNvOG",Sl="LightBox-module__caption___b6L2I",wl="LightBox-module__captionTextInner___rCGNH",$l="LightBox-module__lightboxSplide___XFuWC",Tl="LightBox-module__arrow___iz38X",Ll="LightBox-module__arrowVertical___Zfz81",El="LightBox-module__nextArrow___zkAQN",Pl="LightBox-module__arrowInner___p48sW",_l="LightBox-module__arrowIcon___3VaFf",Al="LightBox-module__arrowImg___pNV88",Rl="LightBox-module__mirror___pjeXc",Wl="LightBox-module__thumbsWrapper___GB-nU",Il="LightBox-module__thumbsContainerVertical___wttk5",kl="LightBox-module__thumbsContainer___osSma",Fl="LightBox-module__thumbsAlignStart___MO6tY",Ml="LightBox-module__thumbsAlignCenter___Q4sUx",Hl="LightBox-module__thumbsAlignEnd___p4y9R",Nl="LightBox-module__thumbItem___HvnF3",Bl="LightBox-module__closeButton___g2khP",Ol="LightBox-module__fadeIn___0m5GW",Vl="LightBox-module__slideInLeft___gPYwC",Dl="LightBox-module__slideInRight___S-pPp",jl="LightBox-module__slideInTop___DFdAj",zl="LightBox-module__slideInBottom___m27kZ",Kl="LightBox-module__fadeOut___55qBR",ql="LightBox-module__slideOutLeft___NvU7P",Ul="LightBox-module__slideOutRight___SK7eC",Gl="LightBox-module__slideOutTop___Vgg0z",Yl="LightBox-module__slideOutBottom___nJ0Ef",Xl="LightBox-module__scaleSlide___vZriG",Z={hidden:ml,heroImage:gl,background:hl,editor:fl,contentStyle:yl,imageStyle:vl,imgWrapper:bl,contain:xl,cover:Cl,caption:Sl,captionTextInner:wl,lightboxSplide:$l,arrow:Tl,arrowVertical:Ll,nextArrow:El,arrowInner:Pl,arrowIcon:_l,arrowImg:Al,mirror:Rl,thumbsWrapper:Wl,thumbsContainerVertical:Il,thumbsContainer:kl,thumbsAlignStart:Fl,thumbsAlignCenter:Ml,thumbsAlignEnd:Hl,thumbItem:Nl,closeButton:Bl,fadeIn:Ol,slideInLeft:Vl,slideInRight:Dl,slideInTop:jl,slideInBottom:zl,fadeOut:Kl,slideOutLeft:ql,slideOutRight:Ul,slideOutTop:Gl,slideOutBottom:Yl,scaleSlide:Xl},Nn=(e,t,n)=>{const r={},[o,s]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),s==="left"?(r.left="0",r.right="auto"):s==="center"?(r.left="50%",r.right="auto"):s==="right"&&(r.left="auto",r.right="0"),o==="middle"&&s==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:s==="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 Fi(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function Wo(e){const t=e.getBoundingClientRect(),n=Fi(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,a=r/o,c=s/i;let u,d;c>a?(u=r,d=r/c):(d=o,u=o*c);const L=t.left+n.left,h=t.top+n.top,f=(r-u)/2+L,m=(o-d)/2+h;return{x:f,y:m,width:u,height:d}}function Io(e){const t=e.getBoundingClientRect(),n=Fi(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ko(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.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 Zl(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})(),o=(()=>{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})(),s=(()=>{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:o,disappearClass:s}}const Jl=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:s,isPreviewMode:i})=>{const[a,c]=p.useState(!1),{url:u}=e.thumbnailBlock.cover;return p.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:u,alt:"Cover",className:Z.heroImage,onClick:()=>c(!0)}),l.jsx(Ql,{isOpen:a,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:s})]})},Ql=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:s,isEditor:i,metadata:a})=>{var E;const[c,u]=p.useState(0),[d,L]=p.useState(0),[h,f]=p.useState(!1),[m,g]=p.useState(!1),[$,v]=p.useState({}),C=p.useRef(null),y=p.useRef(null),M=p.useRef(null),H=p.useRef(!1),A=p.useRef(null),x=p.useRef(null),_=p.useRef(null),T=p.useRef(null),R=p.useRef(!1),k=p.useRef(null),[V,O]=p.useState(!1),{appear:G,triggers:Y,slider:b,thumbnail:B,controls:I,area:F,caption:P,layout:N}=o.lightboxBlock,{appearClass:J,backdropAppearClass:oe,backdropDisappearClass:K,disappearClass:le}=Zl(G.type,G.direction),D=(a==null?void 0:a.itemId)??null;p.useEffect(()=>{const S=()=>{setTimeout(()=>{var U,X;(X=(U=C.current)==null?void 0:U.splide)==null||X.refresh()},16)},q=()=>{L(U=>U+1)};return window.addEventListener("ArticleEditor.Layout:change",S),window.addEventListener("ArticleEditor.ComponentContent:change",q),()=>{window.removeEventListener("ArticleEditor.Layout:change",S),window.removeEventListener("ArticleEditor.ComponentContent:change",q)}},[]),p.useEffect(()=>{if(!e||!B.isActive){O(!1);return}const S=k.current;if(!S)return;const q=()=>{b.direction==="horiz"?O(S.scrollWidth>S.clientWidth):O(S.scrollHeight>S.clientHeight)};q();const U=new ResizeObserver(q);return U.observe(S),()=>U.disconnect()},[e,B.isActive,n.length,$,b.direction]);const ie=p.useCallback(()=>{const S=window.matchMedia("(max-width: 768px)").matches,q=ko(F.color);S&&!i&&q>.9&&(document.body.style.backgroundColor=""),f(!0),H.current=!0;const U=X=>{X.target===A.current&&X.animationName&&(A.current&&x.current&&A.current.removeEventListener("animationend",x.current),x.current=null,H.current&&(H.current=!1,t()),f(!1))};A.current&&(x.current=U,A.current.addEventListener("animationend",U))},[t,F.color,i]),ve=(S,q,U)=>{var X,ee;if(S){if(Y.type==="click"&&Y.switch==="image")Y.repeat==="close"&&c===n.length-1?ie():(X=C.current)==null||X.go("+1");else if(Y.type==="click"&&Y.switch==="50/50"){const re=S.getBoundingClientRect(),ne=q-re.left,ce=U-re.top,Se=re.width,de=re.height;let j;b.direction==="horiz"?j=ne<Se/2?"-1":"+1":j=ce<de/2?"-1":"+1",(ee=C.current)==null||ee.go(j)}}},pe=S=>{if(R.current){R.current=!1;return}const q=n[c],U=(q==null?void 0:q.image.objectFit)==="cover";let X,ee;if("changedTouches"in S&&S.changedTouches.length>0)X=S.changedTouches[0].clientX,ee=S.changedTouches[0].clientY;else if("clientX"in S)X=S.clientX,ee=S.clientY;else return;let re;if(U&&M.current){const ne=Io(M.current);re=X>=ne.left&&X<=ne.right&&ee>=ne.top&&ee<=ne.bottom}else{const ne=M.current?Wo(M.current):null;if(!ne){S.target===S.currentTarget&&ie();return}re=X>=ne.x&&X<=ne.x+ne.width&&ee>=ne.y&&ee<=ne.y+ne.height}re?ve(M.current,X,ee):ie()},Ce=S=>{const q=S.target;(q.classList.contains(Z.thumbsWrapper)||q.classList.contains(Z.thumbsContainer))&&pe(S)};p.useEffect(()=>{if(!e)return;const S=q=>{var U,X;if(q.key==="Escape"){ie();return}if(q.key==="ArrowRight"){u(ee=>(ee+1)%Math.max(n.length,1)),(U=C.current)==null||U.go("+1");return}q.key==="ArrowLeft"&&(u(ee=>(ee-1+Math.max(n.length,1))%Math.max(n.length,1)),(X=C.current)==null||X.go("-1"))};return window.addEventListener("keydown",S),()=>{window.removeEventListener("keydown",S)}},[e,ie,n.length]),p.useEffect(()=>{if(e){if(u(0),L(q=>q+1),H.current=!1,f(!1),g(!1),v({}),!D)return;const S=new CustomEvent("page-overlay",{detail:{itemId:D}});window.dispatchEvent(S)}return()=>{A.current&&x.current&&(A.current.removeEventListener("animationend",x.current),x.current=null),g(!1)}},[e,D]),p.useEffect(()=>{y.current!==null&&y.current!==b.type&&L(S=>S+1),y.current=b.type},[b.type]),p.useEffect(()=>{if(!e)return;const S=document.body.style.overflow,q=window.matchMedia("(max-width: 768px)").matches,U=ko(F.color);document.body.style.overflow="hidden",g(!1);const X=re=>{re.target===A.current&&!H.current&&re.animationName&&(q&&!i&&U>.9&&(document.body.style.backgroundColor=F.color),g(!0),A.current&&_.current&&A.current.removeEventListener("animationend",_.current),_.current=null)};A.current&&(_.current=X,A.current.addEventListener("animationend",X));const ee=re=>{const ne=re.target;ne&&(ne.closest(`.${Z.thumbsWrapper}`)||ne.closest(`.${Z.thumbsContainer}`))||b.type!=="slide"&&re.preventDefault()};return document.addEventListener("touchmove",ee,{passive:!1}),()=>{document.body.style.overflow=S,document.removeEventListener("touchmove",ee),A.current&&_.current&&(A.current.removeEventListener("animationend",_.current),_.current=null),g(!1)}},[e,i,F.color,b.type]),p.useEffect(()=>{if(!e)return;const S=q=>{var X,ee;if(H.current){q.stopPropagation();return}if(R.current){R.current=!1;return}const U=q.target;if(!(U&&(U.closest(`.${Z.thumbsContainer}`)||U.closest(`.${Z.thumbItem}`)||U.closest(`.${Z.arrow}`)||U.closest(`.${Z.closeButton}`)||U.closest(`.${Z.caption}`)))){if(b.type==="slide"&&Y.type==="drag"&&((ee=(X=C.current)==null?void 0:X.splide)!=null&&ee.root)){const re=C.current.splide.root;if(U&&(re.contains(U)||re===U))return}if(q.touches.length===0&&q.changedTouches.length>0){const re=n[c],ne=(re==null?void 0:re.image.objectFit)==="cover",ce=q.changedTouches[0];let Se;if(ne&&M.current){const de=Io(M.current);Se=ce.clientX>=de.left&&ce.clientX<=de.right&&ce.clientY>=de.top&&ce.clientY<=de.bottom}else{const de=M.current?Wo(M.current):null;if(!de)return;Se=ce.clientX>=de.x&&ce.clientX<=de.x+de.width&&ce.clientY>=de.y&&ce.clientY<=de.y+de.height}if(!Se){q.stopPropagation(),H.current=!0;const de=j=>{j.stopPropagation(),j.preventDefault(),document.removeEventListener("click",de,!0)};document.addEventListener("click",de,!0),ie()}}}};return document.addEventListener("touchend",S,{passive:!0}),()=>{document.removeEventListener("touchend",S)}},[e,ie,c,n]);const W=(b.type==="scale"||b.type==="fade")&&b.direction==="vert"&&Y.type==="drag";p.useEffect(()=>{var j,ue;if(!e||!W||!((ue=(j=C.current)==null?void 0:j.splide)!=null&&ue.root))return;const S=C.current.splide.root,q=30,U=(z,te)=>{if(T.current){const be=Math.abs(z-T.current.x),ye=Math.abs(te-T.current.y);(be>0||ye>0)&&(R.current=!0)}},X=z=>{T.current&&(z.preventDefault(),U(z.clientX,z.clientY))},ee=z=>{T.current&&z.touches.length>0&&(z.preventDefault(),U(z.touches[0].clientX,z.touches[0].clientY))},re=(z,te)=>{if(!T.current||!C.current){T.current=null;return}const be=Math.abs(z-T.current.x),ye=Math.abs(te-T.current.y);ye>q&&ye>be&&C.current.go(te<T.current.y?"+1":"-1"),T.current=null},ne=z=>{T.current&&re(z.clientX,z.clientY),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("pointermove",X)},ce=z=>{if(T.current){if(z.changedTouches.length>0){const te=z.changedTouches[0];re(te.clientX,te.clientY)}document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),document.removeEventListener("touchmove",ee)}},Se=z=>{T.current={x:z.clientX,y:z.clientY},R.current=!1,document.addEventListener("pointermove",X,{passive:!1}),document.addEventListener("pointerup",ne),document.addEventListener("pointercancel",ne)},de=z=>{z.touches.length>0&&(T.current={x:z.touches[0].clientX,y:z.touches[0].clientY},R.current=!1,document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",ce),document.addEventListener("touchcancel",ce))};return S.addEventListener("pointerdown",Se),S.addEventListener("touchstart",de),()=>{S.removeEventListener("pointerdown",Se),S.removeEventListener("touchstart",de),document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),T.current=null,R.current=!1}},[e,W,d]);const Q={backgroundColor:F.color,backdropFilter:`blur(${F.blur}px)`,animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Jo.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:i?null:A,className:Te(Z.background,h?K:oe,{[Z.editor]:i},{[Z.hidden]:!e}),style:{...Q,...m&&!i&&!h?{position:"absolute"}:{}}}),l.jsxs("div",{ref:i?A:null,className:Te(Z.contentStyle,h?le:J,{[Z.editor]:i},{[Z.hidden]:!e}),style:{animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(oo,{onMove:S=>u(S.index),ref:C,className:Z.lightboxSplide,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,direction:b.direction==="horiz"||b.type==="fade"||b.type==="scale"?"ltr":"ttb",pagination:!1,drag:Y.type==="drag"&&!W,perPage:1,width:"100%",height:"100%",type:b.type==="fade"||b.type==="scale"?"fade":"loop",padding:0,rewind:Y.repeat!=="close",start:0},style:{"--splide-speed":b.duration},children:n.map((S,q)=>{const U=Nn(N.position,N.offset,i),X=`${w.scalingValue(N.padding.top,i)} ${w.scalingValue(N.padding.right,i)} ${w.scalingValue(N.padding.bottom,i)} ${w.scalingValue(N.padding.left,i)}`,ee=b.type==="scale"?(()=>{const{transform:re,...ne}=U;return{...ne,position:"absolute",padding:X,boxSizing:"border-box","--position-transform":re||"none"}})():{...U,position:"absolute",padding:X,boxSizing:"border-box"};return l.jsx(io,{children:l.jsx("div",{className:Z.imgWrapper,onClick:pe,children:l.jsx("img",{ref:q===c?M:null,className:Te(Z.imageStyle,{[Z.contain]:S.image.objectFit==="contain",[Z.cover]:S.image.objectFit==="cover",[Z.scaleSlide]:b.type==="scale"}),src:S.image.url,alt:S.image.name??"",style:{...ee,pointerEvents:S.image.objectFit==="contain"?"none":"auto"}})})},q)})},d),I.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Te(Z.arrow,{[Z.arrowVertical]:b.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(I.offset.x,i)}, ${w.scalingValue(I.offset.y*(b.direction==="horiz"?1:-1),i)}) scale(${I.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=C.current)==null?void 0:S.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&l.jsx(Pt,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Te(Z.arrowImg,Z.mirror)}),!I.arrowsImgUrl&&l.jsx(Fo,{color:I.color,className:Te(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),l.jsx("div",{className:Te(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:b.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(I.offset.x*(b.direction==="horiz"?-1:1),i)}, ${w.scalingValue(I.offset.y,i)}) scale(${I.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=C.current)==null?void 0:S.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&l.jsx(Pt,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Z.arrowImg}),!I.arrowsImgUrl&&l.jsx(Fo,{color:I.color,className:Te(Z.arrowIcon,Z.arrowImg)})]})})]}),F.closeIconUrl&&(()=>{const S=Nn(F.closeIconAlign,F.closeIconOffset,i),q=`scale(${F.closeIconScale})`,U=S.transform?`${S.transform} ${q}`:q;return l.jsx("button",{className:Z.closeButton,style:{...S,transform:U},onClick:ie,"aria-label":"Close lightbox",children:l.jsx(Pt,{url:F.closeIconUrl,fill:F.closeIconColor??"#000000",hoverFill:F.closeIconHover??"#cccccc"})})})(),P&&P.isActive&&r.imageCaption&&((E=n[c])==null?void 0:E.imageCaption)&&(()=>{const{widthSettings:S,fontSettings:q,letterSpacing:U,textAlign:X,wordSpacing:ee,fontSizeLineHeight:re,textAppearance:ne,color:ce}=r.imageCaption;return l.jsx("div",{className:Z.caption,style:{...Nn(P.alignment,P.offset,i),fontFamily:gr(q.fontFamily),fontWeight:q.fontWeight,fontStyle:q.fontStyle,width:S.sizing==="auto"?"max-content":w.scalingValue(S.width,i),letterSpacing:w.scalingValue(U,i),wordSpacing:w.scalingValue(ee,i),textAlign:X,fontSize:w.scalingValue(re.fontSize,i),lineHeight:w.scalingValue(re.lineHeight,i),textTransform:ne.textTransform??"none",textDecoration:ne.textDecoration??"none",fontVariant:ne.fontVariant??"normal",color:ce},onClick:Se=>Se.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-color":P.linkColor,"--link-hover-color":P.linkHoverColor},children:l.jsx(Cn,{content:n[c].imageCaption})})})})(),B.isActive&&(()=>{const[S,q]=B.position.split("-"),U=b.direction==="horiz"?`${S}-left`:B.position,X=Nn(U,B.offset,i),ee=()=>{if(b.direction==="horiz"){if(q==="left")return"flex-start";if(q==="center")return"center";if(q==="right")return"flex-end"}else{if(S==="top")return"flex-start";if(S==="middle")return"center";if(S==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:k,className:Z.thumbsWrapper,onClick:re=>Ce(re),style:{position:i?"absolute":"fixed",...X,...b.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Te(Z.thumbsContainer,{[Z.thumbsContainerVertical]:b.direction==="vert",[Z.thumbsAlignStart]:B.align==="start",[Z.thumbsAlignCenter]:B.align==="center",[Z.thumbsAlignEnd]:B.align==="end"}),style:{gap:w.scalingValue(B.grid.gap,i),justifyContent:V?"flex-start":ee()},children:n.map((re,ne)=>{const ce=ne===c,Se=$[ne],j=B.grid.size*(ce?B.activeState.scale:1),ue=()=>{if(B.fit!=="fit")return{};if(!Se)return b.direction==="horiz"?{height:w.scalingValue(j,i)}:{width:w.scalingValue(j,i)};const z=Se.width/Se.height;if(b.direction==="horiz"){const te=j,be=te*z;return{width:w.scalingValue(be,i),height:w.scalingValue(te,i)}}else{const te=j,be=te/z;return{width:w.scalingValue(te,i),height:w.scalingValue(be,i)}}};return l.jsx("button",{className:Z.thumbItem,style:{...b.direction==="horiz"&&B.fit!=="fit"?{height:w.scalingValue(j,i)}:{},...b.direction==="vert"&&B.fit!=="fit"?{width:w.scalingValue(j,i)}:{},...B.fit==="cover"?{width:w.scalingValue(j,i),height:w.scalingValue(j,i)}:{},...ue(),transition:ce?"all 0.25s ease-out":"none",opacity:ce?B.activeState.opacity/100:B.opacity/100,"--thumb-hover":B.activeState.opacity/100},onClick:z=>{var te;z.stopPropagation(),u(ne),(te=C.current)==null||te.go(ne)},onMouseEnter:()=>{var z;B.triggers==="hov"&&((z=C.current)==null||z.go(ne))},children:l.jsx("img",{src:re.image.url,alt:re.image.name??"",onLoad:z=>{const te=z.currentTarget;te.naturalWidth&&te.naturalHeight&&v(be=>({...be,[ne]:{width:te.naturalWidth,height:te.naturalHeight}}))},style:{objectFit:B.fit==="cover"?"cover":"contain",...B.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...B.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${re.image.name}-${ne}`)})})})})()]})]}),document.getElementById(s))};function Fo({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 ec={element:Jl,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 Bn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function tc(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Nn(48)};
11
+ min-height: ${Bn(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: ${Nn(4)};
35
+ gap: ${Bn(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,18 +128,18 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${Nn(8)};
131
+ margin-top: ${Bn(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${Nn(8)};
135
+ margin-top: ${Bn(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function nc({settings:e,isEditor:t,metadata:n,activeEvent:r}){const{prefix:o}=w.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:a=[],buttonLabel:c,gap:u,fieldsGap:d,buttonCorners:L,buttonStroke:h,buttonPadding:f,isButtonFullWidth:m,inputCorners:g,inputStroke:$,inputPadding:v,inputColor:C,inputTextColor:y,inputBorderColor:M,placeholderColor:H,buttonColor:A,buttonTextColor:x,buttonBorderColor:_,labelTextColor:T,successColor:R,errorColor:k,fontFamily:V,inputFontSettings:O,inputFontSize:G,inputLineHeight:Y,inputLetterSpacing:b,inputWordSpacing:B,inputTextAppearance:W,buttonFontSettings:F,buttonFontSize:P,buttonLineHeight:N,buttonLetterSpacing:J,buttonWordSpacing:oe,buttonTextAppearance:K,labelFontSettings:le,labelFontSize:D,labelLineHeight:ie,labelLetterSpacing:ve,labelWordSpacing:pe,labelTextAppearance:Ce,statusFontSettings:I,statusFontSize:Q,statusLineHeight:E,statusLetterSpacing:S,statusWordSpacing:q,statusTextAppearance:U,successMessage:X,errorMessage:ee,stateOverrides:re}=e,ne=s==="B",ce=a.slice(0,Math.min(i,a.length)),Se={fontSettings:{fontFamily:V,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:G??.01,lineHeight:Y,letterSpacing:b??0,wordSpacing:B??0,textAppearance:W,color:y},de=pt(Ye(Se,t)),j=w.scalingValue($??0,t),ue=w.scalingValue((Y??G??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(s==="C"?$??0:($??0)*2),t),z={...de,borderStyle:"solid",borderRadius:s==="C"?0:w.scalingValue(g??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:j,borderLeftWidth:0}:{borderWidth:j},paddingTop:w.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:w.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:w.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:w.scalingValue((v==null?void 0:v.left)??0,t),height:ue,minHeight:ue},te={fontSettings:{fontFamily:V,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:P??.01,lineHeight:N,letterSpacing:J??0,wordSpacing:oe??0,textAppearance:K,color:x},be=pt(Ye(te,t)),ye=w.scalingValue(h??0,t),Me={fontSettings:{fontFamily:V,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:D??.01,lineHeight:ie,letterSpacing:ve??0,wordSpacing:pe??0,textAppearance:Ce,color:T},He=Ye(Me,t),we={fontSettings:{fontFamily:V,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:E,letterSpacing:S??0,wordSpacing:q??0,textAppearance:U,color:R},Ae=pt(Ye(we,t)),Oe=w.buildColorVars(o,{inputColor:C,inputTextColor:y,inputBorderColor:M,placeholderColor:H!=null&&H.trim()?H:"#cccccc",buttonColor:A,buttonTextColor:x,buttonBorderColor:_,labelTextColor:T,successColor:R,errorColor:k},rc,oc,re),[Ee,Ve]=p.useState(()=>Object.fromEntries(ce.map(fe=>[fe.name,""]))),[ct,qe]=p.useState("idle"),[ln,ot]=p.useState(null),$t=r==="success"?"success":r==="error"?"error":ct,xe=r==="error"?ee:ln,Je=r==="filled",Xe=p.useMemo(()=>{if(!Je)return Ee;let fe=null;for(const We of ce)(Ee[We.name]??"").trim().length>0||(fe=fe??{...Ee},fe[We.name]="Filled");return fe??Ee},[Ee,Je,ce]),dt=$t==="error"?w.getFormFieldValidationError(ce,Xe):null,cn=`${r&&r!=="default"?`${o}-state-${r}`:""}`.trim(),Ft=n==null?void 0:n.submitUrl,Pe=(fe,We)=>{Ve(Fe=>({...Fe,[fe]:We}))},De=async fe=>{fe.preventDefault();const We=Object.fromEntries(ce.map(Ne=>{var it;return[Ne.name,((it=Ee[Ne.name])==null?void 0:it.trim())??""]}).filter(([,Ne])=>Ne));if(!Ft){qe("error"),ot("No integrations were found for this form.");return}if(Object.keys(We).length===0)return;const Fe=w.getFormFieldValidationError(ce,Ee);if(Fe){qe("error"),ot(Fe);return}qe("submitting"),ot(null);try{const Ne=await fetch(Ft,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(We)});if(!Ne.ok){const it=await Ne.text();throw new Error(it||`Request failed: ${Ne.status}`)}qe("success"),Ve(Object.fromEntries(ce.map(it=>[it.name,""])))}catch(Ne){qe("error"),ot(Ne instanceof Error?Ne.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${o}-type-${s} ${cn}`.trim(),style:Oe,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:tc(o)}}),l.jsxs("form",{onSubmit:De,className:`${o}-form`,style:{gap:w.scalingValue(u??0,t)},children:[l.jsx("div",{className:`${o}-fields`,style:{gap:w.scalingValue(d??0,t)},children:ce.map((fe,We)=>l.jsxs("div",{className:`${o}-field-group${ne?` ${o}-labeled`:""}`,children:[ne&&l.jsx("span",{className:`${o}-field-label`,style:He?{...He,lineHeight:He.fontSize}:void 0,children:fe.label||fe.name}),fe.type==="textarea"?l.jsx("textarea",{name:fe.name,autoComplete:"off",value:Xe[fe.name]??"",onChange:Fe=>Pe(fe.name,Fe.target.value),placeholder:fe.placeholder,className:`${o}-input`,style:z,rows:1,"data-filled":Je||(Xe[fe.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:fe.type==="phone"?"tel":fe.type==="email"?"email":"text",name:fe.name,autoComplete:"off",value:Xe[fe.name]??"",onChange:Fe=>Pe(fe.name,Fe.target.value),placeholder:fe.placeholder,required:fe.isRequired??fe.type==="email",className:`${o}-input`,style:z,"data-filled":Je||(Xe[fe.name]??"").trim().length>0})]},We))}),l.jsx("div",{className:`${o}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(L??0,t),borderWidth:ye,paddingTop:w.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:w.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:w.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:w.scalingValue((f==null?void 0:f.left)??0,t),...be,...m?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${o}-overlay-anchor`,style:m?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:ct==="submitting"?"...":c})})})]}),$t==="success"&&l.jsx("p",{className:`${o}-success`,style:{...Ae},children:X}),$t==="error"&&l.jsx("p",{className:`${o}-error`,style:{...Ae},role:"alert",children:dt??xe??ee})]})}const rc={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"},oc=["hover","focus","filled","success","error"],ic=`import React, { useMemo, useState } from 'react';\r
142
+ `}function nc({settings:e,isEditor:t,metadata:n,activeEvent:r}){const{prefix:o}=w.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:a=[],buttonLabel:c,gap:u,fieldsGap:d,buttonCorners:L,buttonStroke:h,buttonPadding:f,isButtonFullWidth:m,inputCorners:g,inputStroke:$,inputPadding:v,inputColor:C,inputTextColor:y,inputBorderColor:M,placeholderColor:H,buttonColor:A,buttonTextColor:x,buttonBorderColor:_,labelTextColor:T,successColor:R,errorColor:k,fontFamily:V,inputFontSettings:O,inputFontSize:G,inputLineHeight:Y,inputLetterSpacing:b,inputWordSpacing:B,inputTextAppearance:I,buttonFontSettings:F,buttonFontSize:P,buttonLineHeight:N,buttonLetterSpacing:J,buttonWordSpacing:oe,buttonTextAppearance:K,labelFontSettings:le,labelFontSize:D,labelLineHeight:ie,labelLetterSpacing:ve,labelWordSpacing:pe,labelTextAppearance:Ce,statusFontSettings:W,statusFontSize:Q,statusLineHeight:E,statusLetterSpacing:S,statusWordSpacing:q,statusTextAppearance:U,successMessage:X,errorMessage:ee,stateOverrides:re}=e,ne=s==="B",ce=a.slice(0,Math.min(i,a.length)),Se={fontSettings:{fontFamily:V,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:G??.01,lineHeight:Y,letterSpacing:b??0,wordSpacing:B??0,textAppearance:I,color:y},de=pt(Ye(Se,t)),j=w.scalingValue($??0,t),ue=w.scalingValue((Y??G??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(s==="C"?$??0:($??0)*2),t),z={...de,borderStyle:"solid",borderRadius:s==="C"?0:w.scalingValue(g??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:j,borderLeftWidth:0}:{borderWidth:j},paddingTop:w.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:w.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:w.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:w.scalingValue((v==null?void 0:v.left)??0,t),height:ue,minHeight:ue},te={fontSettings:{fontFamily:V,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:P??.01,lineHeight:N,letterSpacing:J??0,wordSpacing:oe??0,textAppearance:K,color:x},be=pt(Ye(te,t)),ye=w.scalingValue(h??0,t),Me={fontSettings:{fontFamily:V,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:D??.01,lineHeight:ie,letterSpacing:ve??0,wordSpacing:pe??0,textAppearance:Ce,color:T},He=Ye(Me,t),we={fontSettings:{fontFamily:V,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:E,letterSpacing:S??0,wordSpacing:q??0,textAppearance:U,color:R},Ae=pt(Ye(we,t)),Oe=w.buildColorVars(o,{inputColor:C,inputTextColor:y,inputBorderColor:M,placeholderColor:H!=null&&H.trim()?H:"#cccccc",buttonColor:A,buttonTextColor:x,buttonBorderColor:_,labelTextColor:T,successColor:R,errorColor:k},rc,oc,re),[Ee,Ve]=p.useState(()=>Object.fromEntries(ce.map(fe=>[fe.name,""]))),[ct,qe]=p.useState("idle"),[cn,ot]=p.useState(null),$t=r==="success"?"success":r==="error"?"error":ct,xe=r==="error"?ee:cn,Je=r==="filled",Xe=p.useMemo(()=>{if(!Je)return Ee;let fe=null;for(const Ie of ce)(Ee[Ie.name]??"").trim().length>0||(fe=fe??{...Ee},fe[Ie.name]="Filled");return fe??Ee},[Ee,Je,ce]),dt=$t==="error"?w.getFormFieldValidationError(ce,Xe):null,dn=`${r&&r!=="default"?`${o}-state-${r}`:""}`.trim(),Ft=n==null?void 0:n.submitUrl,Pe=(fe,Ie)=>{Ve(Fe=>({...Fe,[fe]:Ie}))},De=async fe=>{fe.preventDefault();const Ie=Object.fromEntries(ce.map(Ne=>{var it;return[Ne.name,((it=Ee[Ne.name])==null?void 0:it.trim())??""]}).filter(([,Ne])=>Ne));if(!Ft){qe("error"),ot("No integrations were found for this form.");return}if(Object.keys(Ie).length===0)return;const Fe=w.getFormFieldValidationError(ce,Ee);if(Fe){qe("error"),ot(Fe);return}qe("submitting"),ot(null);try{const Ne=await fetch(Ft,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ie)});if(!Ne.ok){const it=await Ne.text();throw new Error(it||`Request failed: ${Ne.status}`)}qe("success"),Ve(Object.fromEntries(ce.map(it=>[it.name,""])))}catch(Ne){qe("error"),ot(Ne instanceof Error?Ne.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${o}-type-${s} ${dn}`.trim(),style:Oe,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:tc(o)}}),l.jsxs("form",{onSubmit:De,className:`${o}-form`,style:{gap:w.scalingValue(u??0,t)},children:[l.jsx("div",{className:`${o}-fields`,style:{gap:w.scalingValue(d??0,t)},children:ce.map((fe,Ie)=>l.jsxs("div",{className:`${o}-field-group${ne?` ${o}-labeled`:""}`,children:[ne&&l.jsx("span",{className:`${o}-field-label`,style:He?{...He,lineHeight:He.fontSize}:void 0,children:fe.label||fe.name}),fe.type==="textarea"?l.jsx("textarea",{name:fe.name,autoComplete:"off",value:Xe[fe.name]??"",onChange:Fe=>Pe(fe.name,Fe.target.value),placeholder:fe.placeholder,className:`${o}-input`,style:z,rows:1,"data-filled":Je||(Xe[fe.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:fe.type==="phone"?"tel":fe.type==="email"?"email":"text",name:fe.name,autoComplete:"off",value:Xe[fe.name]??"",onChange:Fe=>Pe(fe.name,Fe.target.value),placeholder:fe.placeholder,required:fe.isRequired??fe.type==="email",className:`${o}-input`,style:z,"data-filled":Je||(Xe[fe.name]??"").trim().length>0})]},Ie))}),l.jsx("div",{className:`${o}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(L??0,t),borderWidth:ye,paddingTop:w.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:w.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:w.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:w.scalingValue((f==null?void 0:f.left)??0,t),...be,...m?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${o}-overlay-anchor`,style:m?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:ct==="submitting"?"...":c})})})]}),$t==="success"&&l.jsx("p",{className:`${o}-success`,style:{...Ae},children:X}),$t==="error"&&l.jsx("p",{className:`${o}-error`,style:{...Ae},role:"alert",children:dt??xe??ee})]})}const rc={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"},oc=["hover","focus","filled","success","error"],ic=`import React, { useMemo, useState } from 'react';\r
143
143
  import { CommonComponentProps } from '../props';\r
144
144
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
145
145
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -740,7 +740,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
740
740
  };\r
741
741
  \r
742
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
743
- `,ac=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Bn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},sc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],lc={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:{...Bn.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:{...Bn.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:{...Bn.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:{...Bn.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:ac,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:[{type:"group",title:"",items:["fieldsGap","inputCorners"]},{type:"group",title:"",items:["inputStroke","inputPadding"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["gap","buttonCorners"]},{type:"row",title:"",items:["buttonStroke","buttonPadding"]},{type:"row",title:"",items:["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:[...sc],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"]},cc={element:nc,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:lc,sourceCode:ic};function On(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function dc(e){return`
743
+ `,ac=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],On={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},sc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],lc={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:{...On.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:{...On.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:{...On.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:{...On.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:ac,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:[{type:"group",title:"",items:["fieldsGap","inputCorners"]},{type:"group",title:"",items:["inputStroke","inputPadding"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["gap","buttonCorners"]},{type:"row",title:"",items:["buttonStroke","buttonPadding"]},{type:"row",title:"",items:["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:[...sc],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"]},cc={element:nc,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:lc,sourceCode:ic};function Vn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function dc(e){return`
744
744
  .${e}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
@@ -922,16 +922,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
922
922
  align-items: center;
923
923
  }
924
924
  .${e}-success {
925
- margin-top: ${On(8)};
926
- font-size: ${On(14)};
925
+ margin-top: ${Vn(8)};
926
+ font-size: ${Vn(14)};
927
927
  color: var(--${e}-success-success-color, var(--${e}-success-color));
928
928
  }
929
929
  .${e}-error {
930
- margin-top: ${On(8)};
931
- font-size: ${On(14)};
930
+ margin-top: ${Vn(8)};
931
+ font-size: ${Vn(14)};
932
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const uc=({settings:e,isEditor:t,metadata:n,activeEvent:r})=>{const{prefix:o}=w.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:a,fieldsToShow:c=1,fontFamily:u,inputFontSettings:d,inputFontSize:L,inputLineHeight:h,inputLetterSpacing:f,inputWordSpacing:m,inputTextAppearance:g,buttonFontSettings:$,buttonFontSize:v,buttonLineHeight:C,buttonLetterSpacing:y,buttonWordSpacing:M,buttonTextAppearance:H,statusFontSettings:A,statusFontSize:x,statusLineHeight:_,statusLetterSpacing:T,statusWordSpacing:R,statusTextAppearance:k,iconMaxWidth:V,minHeight:O,corners:G,stroke:Y,stateOverrides:b,inputPadding:B,buttonPadding:W,successMessage:F="Thanks for subscribing!",errorMessage:P="Please, fill all required fields."}=e,N=s.slice(0,Math.min(c,s.length)),[J,oe]=p.useState(()=>Object.fromEntries(N.map(we=>[we.name,""]))),[K,le]=p.useState("idle"),[D,ie]=p.useState(null),ve=r==="success"?"success":r==="error"?"error":K,pe=r==="error"?P:D,Ce=r==="filled",I=p.useMemo(()=>{if(!Ce)return J;let we=null;for(const Ae of N)(J[Ae.name]??"").trim().length>0||(we=we??{...J},we[Ae.name]="Filled");return we??J},[Ce,J,N]),Q=ve==="error"?w.getFormFieldValidationError(N,I):null,E=r&&r!=="default"?`${o}-state-${r}`:"",S=N.some(we=>(I[we.name]??"").trim().length>0),q=E!==`${o}-state-filled`&&S?`${o}-state-filled`:"",U=`${E} ${q}`.trim(),X=n==null?void 0:n.submitUrl,ee=a??"",re=(i==null?void 0:i.icon)??"",ne=(i==null?void 0:i.mode)==="On",ce=ee||"Submit",Se={fontSettings:{fontFamily:u,fontWeight:(d==null?void 0:d.fontWeight)??400,fontStyle:(d==null?void 0:d.fontStyle)??"normal"},fontSize:L??.01,lineHeight:h,letterSpacing:f??0,wordSpacing:m??0,textAppearance:g,color:e.inputTextColor??"#111111"},de={fontSettings:{fontFamily:u,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:v??.01,lineHeight:C,letterSpacing:y??0,wordSpacing:M??0,textAppearance:H,color:e.buttonTextColor??"#ffffff"},j={fontSettings:{fontFamily:u,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:x??.01,lineHeight:_,letterSpacing:T??0,wordSpacing:R??0,textAppearance:k,color:e.successColor??"#22c55e"},ue=pt(Ye(Se,t)),z=pt(Ye(de,t)),te=pt(Ye(j,t)),be=w.buildColorVars(o,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Se==null?void 0:Se.color)??"#111111",buttonTextColor:e.buttonTextColor??(de==null?void 0:de.color)??"#ffffff"},pc,mc,b),ye={borderRadius:w.scalingValue(G,t),borderWidth:w.scalingValue(Y,t),borderStyle:"solid"},Me={borderLeftWidth:w.scalingValue(Y,t)},He=async we=>{we.preventDefault();const Ae=Object.fromEntries(N.map(Ee=>{var Ve;return[Ee.name,((Ve=J[Ee.name])==null?void 0:Ve.trim())??""]}).filter(([,Ee])=>Ee));if(!X){le("error"),ie("No integrations were found for this form.");return}if(Object.keys(Ae).length===0)return;const Oe=w.getFormFieldValidationError(N,J);if(Oe){le("error"),ie(Oe);return}le("submitting"),ie(null);try{const Ee=await fetch(X,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ae)});if(!Ee.ok){const Ve=await Ee.text();throw new Error(Ve||`Request failed: ${Ee.status}`)}le("success"),oe(Object.fromEntries(N.map(Ve=>[Ve.name,""])))}catch(Ee){le("error"),ie(Ee instanceof Error?Ee.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${U}`.trim(),style:be,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:dc(o)}}),l.jsxs("form",{onSubmit:He,className:`${o}-form`,style:{...ye,height:w.scalingValue(O,t),minHeight:w.scalingValue(O,t)},children:[l.jsx("div",{className:`${o}-inputWrap ${o}-overlayAnchor`,style:{flex:1,minWidth:0},children:N.map(we=>l.jsx("input",{type:we.type==="email"?"email":we.type==="phone"?"tel":"text",name:we.name,autoComplete:"off",value:I[we.name]??"",onChange:Ae=>oe(Oe=>({...Oe,[we.name]:Ae.target.value})),placeholder:we.placeholder,required:we.isRequired??we.type==="email",className:`${o}-input`,style:{...ue,paddingRight:w.scalingValue(B.right,t),paddingLeft:w.scalingValue(B.left,t),paddingTop:w.scalingValue(B.top,t),paddingBottom:w.scalingValue(B.bottom,t)}},we.name))}),l.jsx("div",{className:`${o}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${o}-submitBtn`,"aria-label":ce,style:{...z,...Me,paddingRight:w.scalingValue(W.right,t),paddingLeft:w.scalingValue(W.left,t),paddingTop:w.scalingValue(W.top,t),paddingBottom:w.scalingValue(W.bottom,t)},children:K==="submitting"?"...":ne?re&&l.jsx(Pt,{url:re,className:`${o}-submitBtnIcon`,style:{maxWidth:w.scalingValue(V??0,t)},fill:`var(--${o}-button-text-color)`,hoverFill:`var(--${o}-button-text-color)`}):ee})})]}),ve==="success"&&l.jsx("p",{className:`${o}-success`,style:{...te},children:F}),ve==="error"&&l.jsx("p",{className:`${o}-error`,style:{...te},role:"alert",children:Q??pe??P})]})},pc={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"},mc=["hover","focus","filled","success","error"],gc=`import React, { useMemo, useState } from 'react';\r
934
+ `}const uc=({settings:e,isEditor:t,metadata:n,activeEvent:r})=>{const{prefix:o}=w.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:a,fieldsToShow:c=1,fontFamily:u,inputFontSettings:d,inputFontSize:L,inputLineHeight:h,inputLetterSpacing:f,inputWordSpacing:m,inputTextAppearance:g,buttonFontSettings:$,buttonFontSize:v,buttonLineHeight:C,buttonLetterSpacing:y,buttonWordSpacing:M,buttonTextAppearance:H,statusFontSettings:A,statusFontSize:x,statusLineHeight:_,statusLetterSpacing:T,statusWordSpacing:R,statusTextAppearance:k,iconMaxWidth:V,minHeight:O,corners:G,stroke:Y,stateOverrides:b,inputPadding:B,buttonPadding:I,successMessage:F="Thanks for subscribing!",errorMessage:P="Please, fill all required fields."}=e,N=s.slice(0,Math.min(c,s.length)),[J,oe]=p.useState(()=>Object.fromEntries(N.map(we=>[we.name,""]))),[K,le]=p.useState("idle"),[D,ie]=p.useState(null),ve=r==="success"?"success":r==="error"?"error":K,pe=r==="error"?P:D,Ce=r==="filled",W=p.useMemo(()=>{if(!Ce)return J;let we=null;for(const Ae of N)(J[Ae.name]??"").trim().length>0||(we=we??{...J},we[Ae.name]="Filled");return we??J},[Ce,J,N]),Q=ve==="error"?w.getFormFieldValidationError(N,W):null,E=r&&r!=="default"?`${o}-state-${r}`:"",S=N.some(we=>(W[we.name]??"").trim().length>0),q=E!==`${o}-state-filled`&&S?`${o}-state-filled`:"",U=`${E} ${q}`.trim(),X=n==null?void 0:n.submitUrl,ee=a??"",re=(i==null?void 0:i.icon)??"",ne=(i==null?void 0:i.mode)==="On",ce=ee||"Submit",Se={fontSettings:{fontFamily:u,fontWeight:(d==null?void 0:d.fontWeight)??400,fontStyle:(d==null?void 0:d.fontStyle)??"normal"},fontSize:L??.01,lineHeight:h,letterSpacing:f??0,wordSpacing:m??0,textAppearance:g,color:e.inputTextColor??"#111111"},de={fontSettings:{fontFamily:u,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:v??.01,lineHeight:C,letterSpacing:y??0,wordSpacing:M??0,textAppearance:H,color:e.buttonTextColor??"#ffffff"},j={fontSettings:{fontFamily:u,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:x??.01,lineHeight:_,letterSpacing:T??0,wordSpacing:R??0,textAppearance:k,color:e.successColor??"#22c55e"},ue=pt(Ye(Se,t)),z=pt(Ye(de,t)),te=pt(Ye(j,t)),be=w.buildColorVars(o,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Se==null?void 0:Se.color)??"#111111",buttonTextColor:e.buttonTextColor??(de==null?void 0:de.color)??"#ffffff"},pc,mc,b),ye={borderRadius:w.scalingValue(G,t),borderWidth:w.scalingValue(Y,t),borderStyle:"solid"},Me={borderLeftWidth:w.scalingValue(Y,t)},He=async we=>{we.preventDefault();const Ae=Object.fromEntries(N.map(Ee=>{var Ve;return[Ee.name,((Ve=J[Ee.name])==null?void 0:Ve.trim())??""]}).filter(([,Ee])=>Ee));if(!X){le("error"),ie("No integrations were found for this form.");return}if(Object.keys(Ae).length===0)return;const Oe=w.getFormFieldValidationError(N,J);if(Oe){le("error"),ie(Oe);return}le("submitting"),ie(null);try{const Ee=await fetch(X,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ae)});if(!Ee.ok){const Ve=await Ee.text();throw new Error(Ve||`Request failed: ${Ee.status}`)}le("success"),oe(Object.fromEntries(N.map(Ve=>[Ve.name,""])))}catch(Ee){le("error"),ie(Ee instanceof Error?Ee.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${U}`.trim(),style:be,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:dc(o)}}),l.jsxs("form",{onSubmit:He,className:`${o}-form`,style:{...ye,height:w.scalingValue(O,t),minHeight:w.scalingValue(O,t)},children:[l.jsx("div",{className:`${o}-inputWrap ${o}-overlayAnchor`,style:{flex:1,minWidth:0},children:N.map(we=>l.jsx("input",{type:we.type==="email"?"email":we.type==="phone"?"tel":"text",name:we.name,autoComplete:"off",value:W[we.name]??"",onChange:Ae=>oe(Oe=>({...Oe,[we.name]:Ae.target.value})),placeholder:we.placeholder,required:we.isRequired??we.type==="email",className:`${o}-input`,style:{...ue,paddingRight:w.scalingValue(B.right,t),paddingLeft:w.scalingValue(B.left,t),paddingTop:w.scalingValue(B.top,t),paddingBottom:w.scalingValue(B.bottom,t)}},we.name))}),l.jsx("div",{className:`${o}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${o}-submitBtn`,"aria-label":ce,style:{...z,...Me,paddingRight:w.scalingValue(I.right,t),paddingLeft:w.scalingValue(I.left,t),paddingTop:w.scalingValue(I.top,t),paddingBottom:w.scalingValue(I.bottom,t)},children:K==="submitting"?"...":ne?re&&l.jsx(Pt,{url:re,className:`${o}-submitBtnIcon`,style:{maxWidth:w.scalingValue(V??0,t)},fill:`var(--${o}-button-text-color)`,hoverFill:`var(--${o}-button-text-color)`}):ee})})]}),ve==="success"&&l.jsx("p",{className:`${o}-success`,style:{...te},children:F}),ve==="error"&&l.jsx("p",{className:`${o}-error`,style:{...te},role:"alert",children:Q??pe??P})]})},pc={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"},mc=["hover","focus","filled","success","error"],gc=`import React, { useMemo, useState } from 'react';\r
935
935
  import { CommonComponentProps } from '../props';\r
936
936
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
937
937
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -1503,7 +1503,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
1503
1503
  };\r
1504
1504
  \r
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1506
- `,hc="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."}],Cr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},yc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],vc={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:{...Cr.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:{...Cr.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:{...Cr.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:hc},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:[...yc],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:uc,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:vc,sourceCode:gc};function Mo(e){return`
1506
+ `,hc="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."}],Sr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},yc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],vc={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:{...Sr.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:{...Sr.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:{...Sr.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:hc},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:[...yc],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:uc,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:vc,sourceCode:gc};function Mo(e){return`
1507
1507
  .${e}-marquee-wrapper {
1508
1508
  overflow: hidden;
1509
1509
  width: 100%;
@@ -1635,7 +1635,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1635
1635
  .${e}-image-hover-grayscale:hover img {
1636
1636
  filter: grayscale(100%);
1637
1637
  }
1638
- `}const xc=30,Cc=20,Sr=2,Sc=2,wc=(e,t)=>Array.from({length:t},()=>e).flat(),$c=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},Tc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>$c(r,e))},Lc=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:o,imageHoverClass:s,isFirstSet:i,scaled:a,onFirstSetImageDone:c})=>{var x,_,T;const u=p.useRef(null);p.useLayoutEffect(()=>{if(!i)return;const R=u.current;R!=null&&R.complete&&(c==null||c())},[i,(x=e.image)==null?void 0:x.url,c]);const d=n.display==="Cover",L=n.ratioValue??"1:1",h=n.reversed??!1,[f,m]=L.split(":").map(Number),v=(h?m:f)/(h?f:m);let C=r,y=C/v;y>o&&(y=o,C=y*v);const M=a(C),H=a(y),A=((_=e.image)==null?void 0:_.url)&&l.jsx("img",{ref:u,src:e.image.url,alt:((T=e.image)==null?void 0:T.name)??"",style:d?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:a(r),objectFit:"contain"},onLoad:i?c:void 0,onError:i?c:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...d?{width:M}:{width:"fit-content",maxWidth:a(r),minWidth:0}},children:l.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...d?{width:M,height:H,overflow:"hidden"}:{width:"fit-content",maxWidth:a(r),height:a(o)}},children:A&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Te(`${t}-marquee-link`,!d&&`${t}-marquee-link-contain`),children:A}):A})})},Ec=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:o}=w.useScopedStyles(),{speed:s,direction:i,pauseOnHover:a,gap:c,imageMaxWidth:u,imageMaxHeight:d,imageFit:L,hoverEffect:h}=e,f=!n||!!r,m=f&&h!=="off"&&h!=="randomize"?`${o}-image-hover-${h}`:void 0,g=n?!!r:!0,v=((t==null?void 0:t.length)??0)>0&&(g||!!n),C=Math.max(0,s)*xc,y=I=>w.scalingValue(I,n??!1),M=p.useRef(null),H=p.useRef(null),A=p.useRef(null),[x,_]=p.useState(0),[T,R]=p.useState(0),k=g&&a==="on",[V,O]=p.useState(!1),[G,Y]=p.useState({}),b=p.useRef(G);b.current=G;const B=p.useRef(null),W=p.useRef(0),F=p.useRef(null),P=p.useMemo(()=>(t??[]).map(I=>{var Q;return((Q=I.image)==null?void 0:Q.url)??""}).join("\0"),[t]),[N,J]=p.useState(Sr),oe=p.useMemo(()=>{const I=t??[];return!g||I.length===0?I:wc(I,N)},[t,g,N]),K=p.useMemo(()=>oe.filter(I=>{var Q;return!!((Q=I.image)!=null&&Q.url)}).length,[oe]),le=v?Sc:1;p.useLayoutEffect(()=>{W.current=0,Y({}),B.current=null,J(Sr),_(0)},[P]),p.useEffect(()=>{if(!f||h!=="randomize")return;const I=M.current;if(!I)return;const Q=U=>{Y(X=>{let ee=null;for(const re of U)re in X&&(Tc(I,re)||(ee||(ee={...X}),delete ee[re]));return ee??X})},E=new IntersectionObserver(U=>{const X=new Set;for(const ee of U){const re=ee.target.dataset.marqueeItemIndex,ne=re!==void 0?Number(re):NaN;Number.isNaN(ne)||X.add(ne)}X.size>0&&Q(X)},{root:I,threshold:0});Object.keys(G).forEach(U=>{const X=Number(U);I.querySelectorAll(`[data-marquee-item-index="${X}"]`).forEach(ee=>E.observe(ee))});let S=0;const q=()=>{const U=Object.keys(b.current);U.length!==0&&(Q(U.map(Number)),S=requestAnimationFrame(q))};return Object.keys(b.current).length>0&&(S=requestAnimationFrame(q)),()=>{cancelAnimationFrame(S),E.disconnect()}},[h,G,f]),p.useLayoutEffect(()=>{if(!v)return;const I=M.current,Q=A.current;if(!I||!Q)return;let E=0;const S=()=>{const X=I.getBoundingClientRect().width,ee=Q.getBoundingClientRect().width,re=B.current,ne=typeof re=="number"&&Math.abs(re-ee)<=.25;if(B.current=ee,g&&ee>0&&N>0){const ce=ee/N;if(ce>0&&X>0){const Se=Math.max(Sr,Math.ceil(X/ce)+1);if(Se!==N){J(Se);return}}}if(ee>0&&x<=0){_(ee);return}ne&&ee!==x?_(ee):!ne&&x<=0&&(cancelAnimationFrame(E),E=requestAnimationFrame(S))},q=()=>{cancelAnimationFrame(E),E=requestAnimationFrame(S)};F.current=q,q();const U=new ResizeObserver(q);return U.observe(I),U.observe(Q),()=>{F.current=null,cancelAnimationFrame(E),U.disconnect()}},[g,v,x,P,N]),p.useLayoutEffect(()=>{const I=H.current;if(!v||!I)return;const Q=x>0?x:0,E=Q>0&&C>0?Q/C*1e3:0,S=`${Math.max(0,E)/1e3}s`;I.style.setProperty("--marquee-distance",`${Q}px`),I.style.setProperty("--marquee-duration",S)},[g,v,C,x]),p.useLayoutEffect(()=>{if(!v){R(0);return}if(x<=0){R(0);return}const I=H.current;if(!I)return;const Q=()=>{const S=I.getBoundingClientRect().height;R(S>0?S:0)};Q();const E=new ResizeObserver(Q);return E.observe(I),()=>E.disconnect()},[v,le,oe,n,c,u,d,x,L,G]);const D=()=>{k&&O(!0)},ie=()=>{k&&O(!1)},ve=p.useCallback(()=>{var I;W.current=Math.min(K,W.current+1),(I=F.current)==null||I.call(F)},[K]),pe=p.useCallback((I,Q)=>{Y(E=>{const S=E[I]??Q,q=(t??[]).filter(X=>X!==S);if(q.length===0)return E;const U=q[Math.floor(Math.random()*q.length)];return{...E,[I]:U}})},[t]),Ce=(I,Q,E,S)=>{const q=f&&h==="randomize"&&L.display==="Cover"?G[E]??I:I,U=`max(${y(c)}, ${Cc}px)`,X=`calc(-0.5 * (${U} + ${y(c)}))`;return l.jsxs("div",{className:`${o}-marquee-card`,"data-marquee-item-index":E,onMouseEnter:f&&h==="randomize"&&L.display==="Cover"?()=>pe(E,I):void 0,children:[l.jsx(Lc,{item:q,prefix:o,imageFit:L,imageMaxWidth:u,imageMaxHeight:d,imageHoverClass:m,isEditor:n,isFirstSet:S,scaled:y,onFirstSetImageDone:ve}),n&&!r&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${o}-gap-control`,style:{position:"absolute",top:0,right:X,width:U,height:"100%"}})]},`${Q}-${E}`)};if(v){const I=g?k&&V?"paused":"running":"paused";return l.jsxs("div",{ref:M,className:Te(`${o}-wrapper`,`${o}-marquee-wrapper`),"aria-label":"Marquee",style:x>0&&T>0?{height:T}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Mo(o)}}),l.jsx("div",{ref:H,className:`${o}-marquee-track`,"data-direction":i,onMouseEnter:D,onMouseLeave:ie,style:{"--marquee-play-state":I},children:Array.from({length:le},(Q,E)=>l.jsx("div",{ref:E===0?A:void 0,className:Te(`${o}-marquee-row`,`${o}-marquee-set`),style:{gap:y(c),paddingRight:y(c)},"aria-hidden":E>0,children:oe.map((S,q)=>Ce(S,E,q,E===0))},`set-${E}`))},"marquee-track")]})}return l.jsxs("div",{ref:M,className:`${o}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Mo(o)}}),l.jsx("div",{className:Te(`${o}-marquee-row`,`${o}-marquee-static`),style:{gap:y(c),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((I,Q)=>Ce(I,0,Q))},"marquee-static")]})},Pc=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1638
+ `}const xc=30,Cc=20,wr=2,Sc=2,wc=(e,t)=>Array.from({length:t},()=>e).flat(),$c=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},Tc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>$c(r,e))},Lc=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:o,imageHoverClass:s,isFirstSet:i,scaled:a,onFirstSetImageDone:c})=>{var x,_,T;const u=p.useRef(null);p.useLayoutEffect(()=>{if(!i)return;const R=u.current;R!=null&&R.complete&&(c==null||c())},[i,(x=e.image)==null?void 0:x.url,c]);const d=n.display==="Cover",L=n.ratioValue??"1:1",h=n.reversed??!1,[f,m]=L.split(":").map(Number),v=(h?m:f)/(h?f:m);let C=r,y=C/v;y>o&&(y=o,C=y*v);const M=a(C),H=a(y),A=((_=e.image)==null?void 0:_.url)&&l.jsx("img",{ref:u,src:e.image.url,alt:((T=e.image)==null?void 0:T.name)??"",style:d?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:a(r),objectFit:"contain"},onLoad:i?c:void 0,onError:i?c:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...d?{width:M}:{width:"fit-content",maxWidth:a(r),minWidth:0}},children:l.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...d?{width:M,height:H,overflow:"hidden"}:{width:"fit-content",maxWidth:a(r),height:a(o)}},children:A&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Te(`${t}-marquee-link`,!d&&`${t}-marquee-link-contain`),children:A}):A})})},Ec=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:o}=w.useScopedStyles(),{speed:s,direction:i,pauseOnHover:a,gap:c,imageMaxWidth:u,imageMaxHeight:d,imageFit:L,hoverEffect:h}=e,f=!n||!!r,m=f&&h!=="off"&&h!=="randomize"?`${o}-image-hover-${h}`:void 0,g=n?!!r:!0,v=((t==null?void 0:t.length)??0)>0&&(g||!!n),C=Math.max(0,s)*xc,y=W=>w.scalingValue(W,n??!1),M=p.useRef(null),H=p.useRef(null),A=p.useRef(null),[x,_]=p.useState(0),[T,R]=p.useState(0),k=g&&a==="on",[V,O]=p.useState(!1),[G,Y]=p.useState({}),b=p.useRef(G);b.current=G;const B=p.useRef(null),I=p.useRef(0),F=p.useRef(null),P=p.useMemo(()=>(t??[]).map(W=>{var Q;return((Q=W.image)==null?void 0:Q.url)??""}).join("\0"),[t]),[N,J]=p.useState(wr),oe=p.useMemo(()=>{const W=t??[];return!g||W.length===0?W:wc(W,N)},[t,g,N]),K=p.useMemo(()=>oe.filter(W=>{var Q;return!!((Q=W.image)!=null&&Q.url)}).length,[oe]),le=v?Sc:1;p.useLayoutEffect(()=>{I.current=0,Y({}),B.current=null,J(wr),_(0)},[P]),p.useEffect(()=>{if(!f||h!=="randomize")return;const W=M.current;if(!W)return;const Q=U=>{Y(X=>{let ee=null;for(const re of U)re in X&&(Tc(W,re)||(ee||(ee={...X}),delete ee[re]));return ee??X})},E=new IntersectionObserver(U=>{const X=new Set;for(const ee of U){const re=ee.target.dataset.marqueeItemIndex,ne=re!==void 0?Number(re):NaN;Number.isNaN(ne)||X.add(ne)}X.size>0&&Q(X)},{root:W,threshold:0});Object.keys(G).forEach(U=>{const X=Number(U);W.querySelectorAll(`[data-marquee-item-index="${X}"]`).forEach(ee=>E.observe(ee))});let S=0;const q=()=>{const U=Object.keys(b.current);U.length!==0&&(Q(U.map(Number)),S=requestAnimationFrame(q))};return Object.keys(b.current).length>0&&(S=requestAnimationFrame(q)),()=>{cancelAnimationFrame(S),E.disconnect()}},[h,G,f]),p.useLayoutEffect(()=>{if(!v)return;const W=M.current,Q=A.current;if(!W||!Q)return;let E=0;const S=()=>{const X=W.getBoundingClientRect().width,ee=Q.getBoundingClientRect().width,re=B.current,ne=typeof re=="number"&&Math.abs(re-ee)<=.25;if(B.current=ee,g&&ee>0&&N>0){const ce=ee/N;if(ce>0&&X>0){const Se=Math.max(wr,Math.ceil(X/ce)+1);if(Se!==N){J(Se);return}}}if(ee>0&&x<=0){_(ee);return}ne&&ee!==x?_(ee):!ne&&x<=0&&(cancelAnimationFrame(E),E=requestAnimationFrame(S))},q=()=>{cancelAnimationFrame(E),E=requestAnimationFrame(S)};F.current=q,q();const U=new ResizeObserver(q);return U.observe(W),U.observe(Q),()=>{F.current=null,cancelAnimationFrame(E),U.disconnect()}},[g,v,x,P,N]),p.useLayoutEffect(()=>{const W=H.current;if(!v||!W)return;const Q=x>0?x:0,E=Q>0&&C>0?Q/C*1e3:0,S=`${Math.max(0,E)/1e3}s`;W.style.setProperty("--marquee-distance",`${Q}px`),W.style.setProperty("--marquee-duration",S)},[g,v,C,x]),p.useLayoutEffect(()=>{if(!v){R(0);return}if(x<=0){R(0);return}const W=H.current;if(!W)return;const Q=()=>{const S=W.getBoundingClientRect().height;R(S>0?S:0)};Q();const E=new ResizeObserver(Q);return E.observe(W),()=>E.disconnect()},[v,le,oe,n,c,u,d,x,L,G]);const D=()=>{k&&O(!0)},ie=()=>{k&&O(!1)},ve=p.useCallback(()=>{var W;I.current=Math.min(K,I.current+1),(W=F.current)==null||W.call(F)},[K]),pe=p.useCallback((W,Q)=>{Y(E=>{const S=E[W]??Q,q=(t??[]).filter(X=>X!==S);if(q.length===0)return E;const U=q[Math.floor(Math.random()*q.length)];return{...E,[W]:U}})},[t]),Ce=(W,Q,E,S)=>{const q=f&&h==="randomize"&&L.display==="Cover"?G[E]??W:W,U=`max(${y(c)}, ${Cc}px)`,X=`calc(-0.5 * (${U} + ${y(c)}))`;return l.jsxs("div",{className:`${o}-marquee-card`,"data-marquee-item-index":E,onMouseEnter:f&&h==="randomize"&&L.display==="Cover"?()=>pe(E,W):void 0,children:[l.jsx(Lc,{item:q,prefix:o,imageFit:L,imageMaxWidth:u,imageMaxHeight:d,imageHoverClass:m,isEditor:n,isFirstSet:S,scaled:y,onFirstSetImageDone:ve}),n&&!r&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${o}-gap-control`,style:{position:"absolute",top:0,right:X,width:U,height:"100%"}})]},`${Q}-${E}`)};if(v){const W=g?k&&V?"paused":"running":"paused";return l.jsxs("div",{ref:M,className:Te(`${o}-wrapper`,`${o}-marquee-wrapper`),"aria-label":"Marquee",style:x>0&&T>0?{height:T}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Mo(o)}}),l.jsx("div",{ref:H,className:`${o}-marquee-track`,"data-direction":i,onMouseEnter:D,onMouseLeave:ie,style:{"--marquee-play-state":W},children:Array.from({length:le},(Q,E)=>l.jsx("div",{ref:E===0?A:void 0,className:Te(`${o}-marquee-row`,`${o}-marquee-set`),style:{gap:y(c),paddingRight:y(c)},"aria-hidden":E>0,children:oe.map((S,q)=>Ce(S,E,q,E===0))},`set-${E}`))},"marquee-track")]})}return l.jsxs("div",{ref:M,className:`${o}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Mo(o)}}),l.jsx("div",{className:Te(`${o}-marquee-row`,`${o}-marquee-static`),style:{gap:y(c),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((W,Q)=>Ce(W,0,Q))},"marquee-static")]})},Pc=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1639
1639
  import cn from 'classnames';\r
1640
1640
  import { CommonComponentProps } from '../props';\r
1641
1641
  import { scalingValue } from '../utils/scalingValue';\r
@@ -2350,7 +2350,7 @@ type MarqueeProps = {\r
2350
2350
  pointer-events: auto;
2351
2351
  z-index: 10;
2352
2352
  }
2353
- `}const Rc=30,No=2,Ic=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:o}=w.useScopedStyles(),{autoplay:s,align:i,speed:a,direction:c,pauseOnHover:u,gap:d,cardWidth:L,corners:h,stroke:f,strokeColor:m,bgColor:g,padding:$,logoMarginTop:v,logoWidth:C,logoHeight:y,captionMarginTop:M}=e,H=!!(n&&!r),A=((t==null?void 0:t.length)??0)>0,x=s==="on"&&(!n||!!r),_=A&&(x||!!n),T=Math.max(0,a)*Rc,R=j=>w.scalingValue(j,n??!1),k=p.useRef(null),V=p.useRef(null),O=p.useRef(null),[G,Y]=p.useState(0),[b,B]=p.useState(0),[W,F]=p.useState(0),P=x&&u==="on",[N,J]=p.useState(!1),oe=p.useRef(null),[K,le]=p.useState(0),[D,ie]=p.useState(0),ve=p.useRef(null),pe=j=>{var z,te,be,ye,Me;return{fontSettings:{fontFamily:(e==null?void 0:e[`${j}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${j}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((te=e==null?void 0:e[`${j}FontSettings`])==null?void 0:te.fontStyle)??"normal"},textAppearance:{textTransform:((be=e==null?void 0:e[`${j}TextAppearance`])==null?void 0:be.textTransform)??"none",textDecoration:((ye=e==null?void 0:e[`${j}TextAppearance`])==null?void 0:ye.textDecoration)??"none",fontVariant:((Me=e==null?void 0:e[`${j}TextAppearance`])==null?void 0:Me.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${j}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${j}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${j}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${j}LineHeight`])??.01,color:(e==null?void 0:e[`${j}Color`])??"#000000"}},Ce=pe("text"),I=pe("caption"),Q=p.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(j=>{var ue,z;return(((ue=j.text)==null?void 0:ue.length)??0)>0||(((z=j.caption)==null?void 0:z.length)??0)>0}),[t]),E=p.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:b<=0||G<=0?No:Math.max(No,Math.ceil(G/b)+1),[_,t==null?void 0:t.length,b,G]);p.useLayoutEffect(()=>{if(!_)return;const j=k.current,ue=O.current;if(!j||!ue)return;let z=0;const te=()=>{const Me=j.getBoundingClientRect().width,He=ue.getBoundingClientRect().width,we=ve.current,Ae=typeof we=="number"&&Math.abs(we-He)<=.25;if(ve.current=He,Y(Me),typeof He=="number"&&He>0&&b<=0){B(He);return}Ae&&He!==b?B(He):!Ae&&b<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(te))},be=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(te)};be();const ye=new ResizeObserver(be);return ye.observe(j),ye.observe(ue),()=>{cancelAnimationFrame(z),ye.disconnect()}},[x,_,b]),p.useLayoutEffect(()=>{const j=V.current;if(!_||!j)return;const ue=b>0?b:0,z=ue>0&&T>0?ue/T*1e3:0,te=`${Math.max(0,z)/1e3}s`;j.style.setProperty("--marquee-distance",`${ue}px`),j.style.setProperty("--marquee-duration",te)},[x,_,T,b]),p.useLayoutEffect(()=>{if(!_){F(0);return}const j=O.current,ue=V.current;if(!j||!ue)return;const z=()=>{let be=0;for(let ye=0;ye<j.children.length;ye++){const He=j.children[ye].firstElementChild;He&&(be=Math.max(be,He.offsetHeight))}be<=0&&(be=ue.offsetHeight),F(be>0?be:0)};z();const te=new ResizeObserver(z);return te.observe(j),te.observe(ue),()=>{te.disconnect()}},[_,E,t,n,d,L,$,f,h,C,y,K,D]);const S=()=>{P&&J(!0)},q=()=>{P&&J(!1)},U=p.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),X=p.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),ee=p.useCallback((j,ue,z,te)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:U,width:"100%"},children:[l.jsx("div",{"data-controls":H?te==null?void 0:te.controlsName:void 0,"data-controls-axis":H?"y":void 0,className:H?`${o}-control`:void 0,style:{height:R((te==null?void 0:te.marginTop)??0)}}),l.jsx("div",{...te!=null&&te.dataMeasureKind?{"data-testimonial-measure":te.dataMeasureKind}:{},style:{...Ye(j,n),textAlign:X,pointerEvents:"auto",...typeof(te==null?void 0:te.minHeightPx)=="number"&&te.minHeightPx>0?{minHeight:te.minHeightPx}:{}},children:l.jsx(xn,{content:ue})})]},z),[U,X,n,H,o,R]),re=p.useCallback((j,ue,z)=>{var te,be,ye;return l.jsxs("div",{style:{padding:`${R($.top)} ${R($.right)} ${R($.bottom)} ${R($.left)}`,width:R(L+f*2),height:"100%",borderRadius:R(h),border:`${R(f)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${o}-cover`,style:{background:g}}),l.jsxs("div",{className:`${o}-elements-overlay`,style:{alignItems:U,textAlign:X},children:[j.text&&ee(Ce,j.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":H?"logoMarginTop":void 0,className:H?`${o}-control`:void 0,style:{height:R(v)}}),l.jsx("div",{style:{width:R(C),height:R(y)},children:((te=j.logo)==null?void 0:te.url)&&l.jsx("img",{src:j.logo.url,alt:((be=j.logo)==null?void 0:be.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ye=j.logo)==null?void 0:ye.objectFit)||"contain"}})})]}),j.caption&&ee(I,j.caption,"caption",{controlsName:"captionMarginTop",marginTop:M,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},ue)},[g,M,I,L,h,y,v,C,U,X,$.bottom,$.left,$.right,$.top,ee,f,m,Ce,n,H,o]),ne=p.useCallback(j=>{le(j.maxTextPx),ie(j.maxCaptionPx)},[]);p.useLayoutEffect(()=>{if(!Q){ne({maxTextPx:0,maxCaptionPx:0});return}const j=oe.current;if(!j)return;const ue=()=>{w.readTestimonialTextMeasure(j,ne)};ue();const z=new ResizeObserver(ue);return z.observe(j),()=>{z.disconnect()}},[Q,ne,t,re]);const ce=Q?{textMinHeightPx:K,captionMinHeightPx:D}:void 0,Se=Q?l.jsx("div",{ref:oe,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((j,ue)=>re(j,`measure-${ue}`,{dataMeasureAttrs:!0}))}):null,de=(j,ue)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[re(j,`card-${ue}`,ce),H&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${R(d)})`,width:R(d),height:"100%",pointerEvents:"auto",zIndex:2}})]},ue);if(_){const j=x?P&&N?"paused":"running":"paused";return l.jsxs("div",{ref:k,className:Te(`${o}-wrapper`,`${o}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...W>0?{height:W}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ho(o)}}),Se,l.jsx("div",{ref:V,className:`${o}-marquee-track`,"data-direction":c,onMouseEnter:S,onMouseLeave:q,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":j},children:Array.from({length:E},(ue,z)=>l.jsx("div",{ref:z===0?O:void 0,className:`${o}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:R(d),paddingRight:R(d)},"aria-hidden":z>0,children:t==null?void 0:t.map((te,be)=>de(te,`${z}-${be}`))},`set-${z}`))})]})}return l.jsxs("div",{className:`${o}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ho(o)}}),Se,l.jsx("div",{style:{gap:R(d),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((j,ue)=>de(j,ue))})]})},Wc=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
2353
+ `}const Rc=30,No=2,Wc=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:o}=w.useScopedStyles(),{autoplay:s,align:i,speed:a,direction:c,pauseOnHover:u,gap:d,cardWidth:L,corners:h,stroke:f,strokeColor:m,bgColor:g,padding:$,logoMarginTop:v,logoWidth:C,logoHeight:y,captionMarginTop:M}=e,H=!!(n&&!r),A=((t==null?void 0:t.length)??0)>0,x=s==="on"&&(!n||!!r),_=A&&(x||!!n),T=Math.max(0,a)*Rc,R=j=>w.scalingValue(j,n??!1),k=p.useRef(null),V=p.useRef(null),O=p.useRef(null),[G,Y]=p.useState(0),[b,B]=p.useState(0),[I,F]=p.useState(0),P=x&&u==="on",[N,J]=p.useState(!1),oe=p.useRef(null),[K,le]=p.useState(0),[D,ie]=p.useState(0),ve=p.useRef(null),pe=j=>{var z,te,be,ye,Me;return{fontSettings:{fontFamily:(e==null?void 0:e[`${j}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${j}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((te=e==null?void 0:e[`${j}FontSettings`])==null?void 0:te.fontStyle)??"normal"},textAppearance:{textTransform:((be=e==null?void 0:e[`${j}TextAppearance`])==null?void 0:be.textTransform)??"none",textDecoration:((ye=e==null?void 0:e[`${j}TextAppearance`])==null?void 0:ye.textDecoration)??"none",fontVariant:((Me=e==null?void 0:e[`${j}TextAppearance`])==null?void 0:Me.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${j}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${j}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${j}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${j}LineHeight`])??.01,color:(e==null?void 0:e[`${j}Color`])??"#000000"}},Ce=pe("text"),W=pe("caption"),Q=p.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(j=>{var ue,z;return(((ue=j.text)==null?void 0:ue.length)??0)>0||(((z=j.caption)==null?void 0:z.length)??0)>0}),[t]),E=p.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:b<=0||G<=0?No:Math.max(No,Math.ceil(G/b)+1),[_,t==null?void 0:t.length,b,G]);p.useLayoutEffect(()=>{if(!_)return;const j=k.current,ue=O.current;if(!j||!ue)return;let z=0;const te=()=>{const Me=j.getBoundingClientRect().width,He=ue.getBoundingClientRect().width,we=ve.current,Ae=typeof we=="number"&&Math.abs(we-He)<=.25;if(ve.current=He,Y(Me),typeof He=="number"&&He>0&&b<=0){B(He);return}Ae&&He!==b?B(He):!Ae&&b<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(te))},be=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(te)};be();const ye=new ResizeObserver(be);return ye.observe(j),ye.observe(ue),()=>{cancelAnimationFrame(z),ye.disconnect()}},[x,_,b]),p.useLayoutEffect(()=>{const j=V.current;if(!_||!j)return;const ue=b>0?b:0,z=ue>0&&T>0?ue/T*1e3:0,te=`${Math.max(0,z)/1e3}s`;j.style.setProperty("--marquee-distance",`${ue}px`),j.style.setProperty("--marquee-duration",te)},[x,_,T,b]),p.useLayoutEffect(()=>{if(!_){F(0);return}const j=O.current,ue=V.current;if(!j||!ue)return;const z=()=>{let be=0;for(let ye=0;ye<j.children.length;ye++){const He=j.children[ye].firstElementChild;He&&(be=Math.max(be,He.offsetHeight))}be<=0&&(be=ue.offsetHeight),F(be>0?be:0)};z();const te=new ResizeObserver(z);return te.observe(j),te.observe(ue),()=>{te.disconnect()}},[_,E,t,n,d,L,$,f,h,C,y,K,D]);const S=()=>{P&&J(!0)},q=()=>{P&&J(!1)},U=p.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),X=p.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),ee=p.useCallback((j,ue,z,te)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:U,width:"100%"},children:[l.jsx("div",{"data-controls":H?te==null?void 0:te.controlsName:void 0,"data-controls-axis":H?"y":void 0,className:H?`${o}-control`:void 0,style:{height:R((te==null?void 0:te.marginTop)??0)}}),l.jsx("div",{...te!=null&&te.dataMeasureKind?{"data-testimonial-measure":te.dataMeasureKind}:{},style:{...Ye(j,n),textAlign:X,pointerEvents:"auto",...typeof(te==null?void 0:te.minHeightPx)=="number"&&te.minHeightPx>0?{minHeight:te.minHeightPx}:{}},children:l.jsx(Cn,{content:ue})})]},z),[U,X,n,H,o,R]),re=p.useCallback((j,ue,z)=>{var te,be,ye;return l.jsxs("div",{style:{padding:`${R($.top)} ${R($.right)} ${R($.bottom)} ${R($.left)}`,width:R(L+f*2),height:"100%",borderRadius:R(h),border:`${R(f)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${o}-cover`,style:{background:g}}),l.jsxs("div",{className:`${o}-elements-overlay`,style:{alignItems:U,textAlign:X},children:[j.text&&ee(Ce,j.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":H?"logoMarginTop":void 0,className:H?`${o}-control`:void 0,style:{height:R(v)}}),l.jsx("div",{style:{width:R(C),height:R(y)},children:((te=j.logo)==null?void 0:te.url)&&l.jsx("img",{src:j.logo.url,alt:((be=j.logo)==null?void 0:be.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ye=j.logo)==null?void 0:ye.objectFit)||"contain"}})})]}),j.caption&&ee(W,j.caption,"caption",{controlsName:"captionMarginTop",marginTop:M,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},ue)},[g,M,W,L,h,y,v,C,U,X,$.bottom,$.left,$.right,$.top,ee,f,m,Ce,n,H,o]),ne=p.useCallback(j=>{le(j.maxTextPx),ie(j.maxCaptionPx)},[]);p.useLayoutEffect(()=>{if(!Q){ne({maxTextPx:0,maxCaptionPx:0});return}const j=oe.current;if(!j)return;const ue=()=>{w.readTestimonialTextMeasure(j,ne)};ue();const z=new ResizeObserver(ue);return z.observe(j),()=>{z.disconnect()}},[Q,ne,t,re]);const ce=Q?{textMinHeightPx:K,captionMinHeightPx:D}:void 0,Se=Q?l.jsx("div",{ref:oe,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((j,ue)=>re(j,`measure-${ue}`,{dataMeasureAttrs:!0}))}):null,de=(j,ue)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[re(j,`card-${ue}`,ce),H&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${R(d)})`,width:R(d),height:"100%",pointerEvents:"auto",zIndex:2}})]},ue);if(_){const j=x?P&&N?"paused":"running":"paused";return l.jsxs("div",{ref:k,className:Te(`${o}-wrapper`,`${o}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...I>0?{height:I}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ho(o)}}),Se,l.jsx("div",{ref:V,className:`${o}-marquee-track`,"data-direction":c,onMouseEnter:S,onMouseLeave:q,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":j},children:Array.from({length:E},(ue,z)=>l.jsx("div",{ref:z===0?O:void 0,className:`${o}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:R(d),paddingRight:R(d)},"aria-hidden":z>0,children:t==null?void 0:t.map((te,be)=>de(te,`${z}-${be}`))},`set-${z}`))})]})}return l.jsxs("div",{className:`${o}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ho(o)}}),Se,l.jsx("div",{style:{gap:R(d),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((j,ue)=>de(j,ue))})]})},Ic=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
2354
2354
  import cn from 'classnames';\r
2355
2355
  import { CommonComponentProps } from '../props';\r
2356
2356
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -2965,7 +2965,7 @@ type TestimonialsSettings = {\r
2965
2965
  logoHeight: number;\r
2966
2966
  captionMarginTop: number;\r
2967
2967
  };\r
2968
- `,Bo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},kc={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:{...Bo.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:{...Bo.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"}]}]}]}},Fc={element:Ic,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:kc,sourceCode:Wc,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Mc(e){return`
2968
+ `,Bo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},kc={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:{...Bo.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:{...Bo.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"}]}]}]}},Fc={element:Wc,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:kc,sourceCode:Ic,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Mc(e){return`
2969
2969
  .${e}-container {
2970
2970
  position: relative;
2971
2971
  overflow-x: clip;
@@ -3089,7 +3089,7 @@ type TestimonialsSettings = {\r
3089
3089
  width: 100%;
3090
3090
  height: 100%;
3091
3091
  }
3092
- `}const Hc=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:o}=w.useScopedStyles(),s=t||[],{autoplay:i,delay:a,align:c,width:u,imageMarginTop:d,textMarginTop:L,captionMarginTop:h,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:$,controlsHoverColor:v}=e,C=i==="on"&&r,[y,M]=p.useState(0),[H,A]=p.useState(null),[x,_]=p.useState(!1),T=p.useRef(null),R=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),k=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);p.useEffect(()=>{M(0),A(null),_(!1)},[s.length]);const V=s[y],O=H===null?null:s[H],G=I=>{var E,S,q,U,X;return{fontSettings:{fontFamily:(e==null?void 0:e[`${I}FontFamily`])??"Arial",fontWeight:((E=e==null?void 0:e[`${I}FontSettings`])==null?void 0:E.fontWeight)??400,fontStyle:((S=e==null?void 0:e[`${I}FontSettings`])==null?void 0:S.fontStyle)??"normal"},textAppearance:{textTransform:((q=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:q.textTransform)??"none",textDecoration:((U=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:U.textDecoration)??"none",fontVariant:((X=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:X.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${I}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${I}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${I}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${I}WordSpacing`])??0,color:(e==null?void 0:e[`${I}Color`])??"#000000"}},Y=G("text"),b=G("caption"),B=s.length>1&&s.some(I=>{var Q,E;return(((Q=I.text)==null?void 0:Q.length)??0)>0||(((E=I.caption)==null?void 0:E.length)??0)>0}),W=p.useRef(null),[F,P]=p.useState(0),[N,J]=p.useState(0),oe=e.controls??{mode:"Off",icon:null},K=s.length>1,le=p.useCallback((I,Q)=>!K||Q===I?I:(T.current&&window.clearTimeout(T.current),A(I),_(!0),T.current=window.setTimeout(()=>{A(null),_(!1),T.current=null},300),Q),[K]),D=p.useCallback(()=>{K&&M(I=>le(I,(I-1+s.length)%s.length))},[K,le,s.length]),ie=p.useCallback(()=>{K&&M(I=>le(I,(I+1)%s.length))},[K,le,s.length]);p.useEffect(()=>{if(!C||!K)return;const I=Math.max(300,Number.isFinite(a*1e3)?a*1e3:0),Q=window.setInterval(()=>{M(E=>le(E,(E+1)%s.length))},I);return()=>{window.clearInterval(Q)}},[C,K,le,s.length,a]),p.useEffect(()=>()=>{T.current&&window.clearTimeout(T.current)},[]);const ve=(I,Q)=>{var U,X,ee,re;const E=Q==null?void 0:Q.textMinHeightPx,S=Q==null?void 0:Q.captionMinHeightPx,q=Q==null?void 0:Q.dataMeasureAttrs;return l.jsxs(l.Fragment,{children:[I.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:R,width:"100%"},children:[l.jsx("div",{"data-controls":"textMarginTop",className:`${o}-control`,style:{height:w.scalingValue(L??0,n??!1)}}),l.jsx("div",{...q&&{"data-testimonial-measure":"text"},style:{...Ye(Y,n),...E&&E>0?{minHeight:E}:{},textAlign:k,pointerEvents:"auto"},children:l.jsx(xn,{content:I.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:R,width:"100%"},children:[l.jsx("div",{"data-controls":"imageMarginTop",className:`${o}-control`,style:{height:w.scalingValue(d??0,n??!1)}}),l.jsx("div",{style:{width:w.scalingValue(f??0,n??!1),height:w.scalingValue(m??0,n??!1)},children:((U=I.image)==null?void 0:U.url)&&l.jsx("img",{src:(X=I.image)==null?void 0:X.url,alt:((ee=I.image)==null?void 0:ee.name)??"",className:`${o}-icon`,style:{objectFit:((re=I.image)==null?void 0:re.objectFit)||"contain"}})})]}),I.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:R,width:"100%"},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:`${o}-control`,style:{height:w.scalingValue(h??0,n??!1)}}),l.jsx("div",{...q?{"data-testimonial-measure":"caption"}:{},style:{...Ye(b,n),...S&&S>0?{minHeight:S}:{},textAlign:k,pointerEvents:"auto"},children:l.jsx(xn,{content:I.caption})})]})]})},pe=p.useCallback(I=>{P(I.maxTextPx),J(I.maxCaptionPx)},[]);if(p.useLayoutEffect(()=>{if(!B){pe({maxTextPx:0,maxCaptionPx:0});return}const I=W.current;if(!I)return;const Q=()=>{w.readTestimonialTextMeasure(I,pe)};Q();const E=new ResizeObserver(Q);return E.observe(I),()=>{E.disconnect()}},[B,pe,t]),!V)return l.jsx(l.Fragment,{});const Ce=B?{textMinHeightPx:F,captionMinHeightPx:N}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${o}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Mc(o)}}),l.jsxs("div",{className:`${o}-wrapper`,style:{width:w.scalingValue(u??0,n??!1),alignItems:R},children:[B&&l.jsx("div",{ref:W,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((I,Q)=>l.jsx("div",{style:{width:"100%"},children:ve(I,{dataMeasureAttrs:!0})},Q))}),l.jsxs("div",{className:`${o}-fade-stack`,children:[O&&x&&l.jsx("div",{className:Te(`${o}-fade-item-prev`,`${o}-fade-out`),children:ve(O,Ce)}),l.jsx("div",{className:Te(`${o}-fade-item-current`,x?`${o}-fade-in`:void 0),children:ve(V,Ce)})]})]}),oe.mode==="On"&&l.jsxs("div",{className:`${o}-controls`,children:[l.jsx("div",{className:`${o}-arrow`,style:{width:w.scalingValue(g??.02,n??!1),height:w.scalingValue(g??.02,n??!1),"--arrow-hover-color":v},children:l.jsx("button",{type:"button",className:`${o}-arrow-inner`,onClick:D,disabled:!K,"aria-label":"Previous testimonial",children:oe.icon&&l.jsx(Pt,{url:oe.icon,fill:$,hoverFill:v,className:Te(`${o}-arrow-img`,`${o}-mirror`)})})}),l.jsx("div",{className:Te(`${o}-arrow`,`${o}-next-arrow`),style:{width:w.scalingValue(g??.02,n??!1),height:w.scalingValue(g??.02,n??!1),"--arrow-hover-color":v},children:l.jsx("button",{type:"button",className:`${o}-arrow-inner`,onClick:ie,disabled:!K,"aria-label":"Next testimonial",children:oe.icon&&l.jsx(Pt,{url:oe.icon,fill:$,hoverFill:v,className:`${o}-arrow-img`})})})]})]})})},Nc=`import cn from 'classnames';\r
3092
+ `}const Hc=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:o}=w.useScopedStyles(),s=t||[],{autoplay:i,delay:a,align:c,width:u,imageMarginTop:d,textMarginTop:L,captionMarginTop:h,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:$,controlsHoverColor:v}=e,C=i==="on"&&r,[y,M]=p.useState(0),[H,A]=p.useState(null),[x,_]=p.useState(!1),T=p.useRef(null),R=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),k=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);p.useEffect(()=>{M(0),A(null),_(!1)},[s.length]);const V=s[y],O=H===null?null:s[H],G=W=>{var E,S,q,U,X;return{fontSettings:{fontFamily:(e==null?void 0:e[`${W}FontFamily`])??"Arial",fontWeight:((E=e==null?void 0:e[`${W}FontSettings`])==null?void 0:E.fontWeight)??400,fontStyle:((S=e==null?void 0:e[`${W}FontSettings`])==null?void 0:S.fontStyle)??"normal"},textAppearance:{textTransform:((q=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:q.textTransform)??"none",textDecoration:((U=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:U.textDecoration)??"none",fontVariant:((X=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:X.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${W}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${W}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${W}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${W}WordSpacing`])??0,color:(e==null?void 0:e[`${W}Color`])??"#000000"}},Y=G("text"),b=G("caption"),B=s.length>1&&s.some(W=>{var Q,E;return(((Q=W.text)==null?void 0:Q.length)??0)>0||(((E=W.caption)==null?void 0:E.length)??0)>0}),I=p.useRef(null),[F,P]=p.useState(0),[N,J]=p.useState(0),oe=e.controls??{mode:"Off",icon:null},K=s.length>1,le=p.useCallback((W,Q)=>!K||Q===W?W:(T.current&&window.clearTimeout(T.current),A(W),_(!0),T.current=window.setTimeout(()=>{A(null),_(!1),T.current=null},300),Q),[K]),D=p.useCallback(()=>{K&&M(W=>le(W,(W-1+s.length)%s.length))},[K,le,s.length]),ie=p.useCallback(()=>{K&&M(W=>le(W,(W+1)%s.length))},[K,le,s.length]);p.useEffect(()=>{if(!C||!K)return;const W=Math.max(300,Number.isFinite(a*1e3)?a*1e3:0),Q=window.setInterval(()=>{M(E=>le(E,(E+1)%s.length))},W);return()=>{window.clearInterval(Q)}},[C,K,le,s.length,a]),p.useEffect(()=>()=>{T.current&&window.clearTimeout(T.current)},[]);const ve=(W,Q)=>{var U,X,ee,re;const E=Q==null?void 0:Q.textMinHeightPx,S=Q==null?void 0:Q.captionMinHeightPx,q=Q==null?void 0:Q.dataMeasureAttrs;return l.jsxs(l.Fragment,{children:[W.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:R,width:"100%"},children:[l.jsx("div",{"data-controls":"textMarginTop",className:`${o}-control`,style:{height:w.scalingValue(L??0,n??!1)}}),l.jsx("div",{...q&&{"data-testimonial-measure":"text"},style:{...Ye(Y,n),...E&&E>0?{minHeight:E}:{},textAlign:k,pointerEvents:"auto"},children:l.jsx(Cn,{content:W.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:R,width:"100%"},children:[l.jsx("div",{"data-controls":"imageMarginTop",className:`${o}-control`,style:{height:w.scalingValue(d??0,n??!1)}}),l.jsx("div",{style:{width:w.scalingValue(f??0,n??!1),height:w.scalingValue(m??0,n??!1)},children:((U=W.image)==null?void 0:U.url)&&l.jsx("img",{src:(X=W.image)==null?void 0:X.url,alt:((ee=W.image)==null?void 0:ee.name)??"",className:`${o}-icon`,style:{objectFit:((re=W.image)==null?void 0:re.objectFit)||"contain"}})})]}),W.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:R,width:"100%"},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:`${o}-control`,style:{height:w.scalingValue(h??0,n??!1)}}),l.jsx("div",{...q?{"data-testimonial-measure":"caption"}:{},style:{...Ye(b,n),...S&&S>0?{minHeight:S}:{},textAlign:k,pointerEvents:"auto"},children:l.jsx(Cn,{content:W.caption})})]})]})},pe=p.useCallback(W=>{P(W.maxTextPx),J(W.maxCaptionPx)},[]);if(p.useLayoutEffect(()=>{if(!B){pe({maxTextPx:0,maxCaptionPx:0});return}const W=I.current;if(!W)return;const Q=()=>{w.readTestimonialTextMeasure(W,pe)};Q();const E=new ResizeObserver(Q);return E.observe(W),()=>{E.disconnect()}},[B,pe,t]),!V)return l.jsx(l.Fragment,{});const Ce=B?{textMinHeightPx:F,captionMinHeightPx:N}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${o}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Mc(o)}}),l.jsxs("div",{className:`${o}-wrapper`,style:{width:w.scalingValue(u??0,n??!1),alignItems:R},children:[B&&l.jsx("div",{ref:I,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((W,Q)=>l.jsx("div",{style:{width:"100%"},children:ve(W,{dataMeasureAttrs:!0})},Q))}),l.jsxs("div",{className:`${o}-fade-stack`,children:[O&&x&&l.jsx("div",{className:Te(`${o}-fade-item-prev`,`${o}-fade-out`),children:ve(O,Ce)}),l.jsx("div",{className:Te(`${o}-fade-item-current`,x?`${o}-fade-in`:void 0),children:ve(V,Ce)})]})]}),oe.mode==="On"&&l.jsxs("div",{className:`${o}-controls`,children:[l.jsx("div",{className:`${o}-arrow`,style:{width:w.scalingValue(g??.02,n??!1),height:w.scalingValue(g??.02,n??!1),"--arrow-hover-color":v},children:l.jsx("button",{type:"button",className:`${o}-arrow-inner`,onClick:D,disabled:!K,"aria-label":"Previous testimonial",children:oe.icon&&l.jsx(Pt,{url:oe.icon,fill:$,hoverFill:v,className:Te(`${o}-arrow-img`,`${o}-mirror`)})})}),l.jsx("div",{className:Te(`${o}-arrow`,`${o}-next-arrow`),style:{width:w.scalingValue(g??.02,n??!1),height:w.scalingValue(g??.02,n??!1),"--arrow-hover-color":v},children:l.jsx("button",{type:"button",className:`${o}-arrow-inner`,onClick:ie,disabled:!K,"aria-label":"Next testimonial",children:oe.icon&&l.jsx(Pt,{url:oe.icon,fill:$,hoverFill:v,className:`${o}-arrow-img`})})})]})]})})},Nc=`import cn from 'classnames';\r
3093
3093
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
3094
3094
  import { CommonComponentProps } from '../props';\r
3095
3095
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -3673,7 +3673,7 @@ type TestimonialsSettings = {\r
3673
3673
  pointer-events: auto;
3674
3674
  z-index: 10;
3675
3675
  }
3676
- `}const Lt=500,Ht="cubic-bezier(0.22, 1, 0.36, 1)";function zc({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:s,onPrev:i,onNext:a,counterClassName:c,counterStyle:u}){const d=p.useRef(null),L=p.useRef(null),[h,f]=p.useState(null),[m,g]=p.useState(r?"opening":"open"),[$,v]=p.useState(!0),C=p.useRef(t),y=p.useCallback(()=>{const T=d.current,R=L.current;if(!T||!R)return;const k=T.getBoundingClientRect(),V=k.width,O=k.height,G=R.naturalWidth,Y=R.naturalHeight;if(!V||!O||!G||!Y)return;if(n==="Cover"){f({width:V,height:O,left:k.left,top:k.top});return}const b=G/Y,B=V/O;if(b>B){const W=V/b;f({width:V,height:W,left:k.left,top:k.top+(O-W)/2})}else{const W=O*b;f({width:W,height:O,left:k.left+(V-W)/2,top:k.top})}},[n]);p.useEffect(()=>{y();const T=d.current;if(!T)return;const R=new ResizeObserver(()=>y());return R.observe(T),()=>R.disconnect()},[y,t]),p.useEffect(()=>{if(m!=="opening"||!h)return;const T={id:0};return T.id=requestAnimationFrame(()=>{T.id=requestAnimationFrame(()=>g("open"))}),()=>cancelAnimationFrame(T.id)},[m,h]),p.useEffect(()=>{if(m!=="closing")return;const T=setTimeout(()=>s(),Lt);return()=>clearTimeout(T)},[m,s]),p.useEffect(()=>{C.current!==t&&v(!1),C.current=t},[t]);const M=()=>{m!=="closing"&&g("closing")},H=m==="open",A=m==="closing",x=A&&o&&!!r,_=m==="opening"?r??h:x?r:h;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:M,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:H?1:0,transition:`opacity ${Lt}ms ${Ht}`,pointerEvents:"none"}}),l.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},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:d,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:H?1:0,transition:`opacity ${Lt}ms ${Ht}`},children:e.length>1&&l.jsxs("p",{className:c,style:u,children:[t+1," / ",e.length]})})]}),_&&l.jsx("img",{ref:L,src:e[t],onLoad:y,style:{position:"fixed",top:_.top,left:_.left,width:_.width,height:_.height,objectFit:n==="Cover"?"cover":"contain",opacity:A&&!x?0:1,transition:A&&!x?`opacity ${Lt}ms ${Ht}`:x||$?`top ${Lt}ms ${Ht}, left ${Lt}ms ${Ht}, width ${Lt}ms ${Ht}, height ${Lt}ms ${Ht}`:"none",pointerEvents:"none",zIndex:9998}}),H&&h&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:h.top,left:h.left,width:h.width/2,height:h.height,cursor:"w-resize",zIndex:9999},onClick:T=>{T.stopPropagation(),i()}}),l.jsx("div",{style:{position:"fixed",top:h.top,left:h.left+h.width/2,width:h.width/2,height:h.height,cursor:"e-resize",zIndex:9999},onClick:T=>{T.stopPropagation(),a()}})]})]})}function Kc({settings:e,content:t,isEditor:n,isPreviewMode:r,metadata:o,activeEvent:s,layoutId:i}){const{prefix:a}=w.useScopedStyles(),{type:c="A",gridLayout:u,textBoxWidth:d,verticalGap:L,entriesCount:h,lightbox:f,imageDisplay:m,slider:g,sliderTiming:$,direction:v,transition:C,titleMarginTop:y,subtitleMarginTop:M,titleColor:H,subtitleColor:A,lightboxCounterColor:x,titleFontFamily:_,titleFontSettings:T,titleFontSize:R,titleLineHeight:k,titleLetterSpacing:V,titleWordSpacing:O,titleTextAppearance:G,subtitleFontFamily:Y,subtitleFontSettings:b,subtitleFontSize:B,subtitleLineHeight:W,subtitleLetterSpacing:F,subtitleWordSpacing:P,subtitleTextAppearance:N,lightboxCounterFontFamily:J,lightboxCounterFontSettings:oe,lightboxCounterFontSize:K,lightboxCounterLineHeight:le,lightboxCounterLetterSpacing:D,lightboxCounterWordSpacing:ie,lightboxCounterTextAppearance:ve}=e,pe={fontSettings:{fontFamily:_,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:R??.01,lineHeight:k,letterSpacing:V??0,wordSpacing:O??0,textAppearance:G,color:H},I={...pt(Ye(pe,n))},Q={fontSettings:{fontFamily:Y,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:B??.01,lineHeight:W,letterSpacing:F??0,wordSpacing:P??0,textAppearance:N,color:A},S={...pt(Ye(Q,n))},q={fontSettings:{fontFamily:J,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:K??.01,lineHeight:le,letterSpacing:D??0,wordSpacing:ie??0,textAppearance:ve,color:x},X={...pt(Ye(q,n))},ee=w.buildColorVars(a,{titleColor:H,subtitleColor:A,lightboxCounterColor:x},qc,Uc),ne=`${s&&s!=="default"?`${a}-state-${s}`:""}`.trim(),ce=h===0?1/0:h,Se=(t??[]).slice(0,ce),de=u.entryWidth??.2,j=(m==null?void 0:m.display)==="Cover",ue=(m==null?void 0:m.ratioValue)??"1:1",z=(m==null?void 0:m.reversed)??!1,[te,be]=ue.split(":").map(Number),ye=z?be:te,Me=z?te:be,He=`${ye} / ${Me}`,we=ye>=Me,Ae={objectFit:j?"cover":"contain",...j&&{aspectRatio:He,width:we?"100%":"auto",height:we?"auto":"100%"}},[Oe,Ee]=p.useState("ltr"),[Ve,ct]=p.useState(0),qe=p.useRef(null);p.useEffect(()=>{const Pe=qe.current;if(!Pe)return;const De=new ResizeObserver(fe=>{ct(Math.round(fe[0].contentRect.width))});return De.observe(Pe),()=>De.disconnect()},[]);const ln=(()=>{const Pe={...ee},De=qe.current?getComputedStyle(qe.current).getPropertyValue("--cntrl-article-width").trim():"";return De&&(Pe["--cntrl-article-width"]=De),Pe})(),[ot,$t]=p.useState(!1),[xe,Je]=p.useState([]),[Xe,dt]=p.useState(0),[In,cn]=p.useState(null),Ft=(Pe,De,fe)=>{if(f==="Off")return;const We=Pe.currentTarget.getBoundingClientRect();cn({top:We.top,left:We.left,width:We.width,height:We.height}),Je(De),dt(fe),$t(!0)};return p.useEffect(()=>{if(!ot||f!=="On"||typeof document>"u")return;const Pe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Pe}},[ot,f]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:jc(a)}}),l.jsx("div",{style:ee,children:l.jsx("div",{ref:qe,className:`${a}-wrapper ${a}-type-${c} ${ne}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:w.scalingValue(L??0,n),columnGap:w.scalingValue(u.horizontalGap??0,n),width:w.scalingValue(u.wrapperWidth??0,n)},children:Se.map((Pe,De)=>{var fe,We;return l.jsx("div",{className:`${a}-item`.trim(),children:l.jsx("div",{className:r?`${a}-item-inner`:`${a}-item-inner-hidden`,style:{width:(d??0)>100?`calc(${w.scalingValue(de??0,n)} * (${d} / 100))`:w.scalingValue(de??0,n)},children:l.jsxs("a",{href:(((fe=Pe.link)==null?void 0:fe.length)??0)>0&&f==="Off"?Pe.link:void 0,target:"_blank",className:`${a}-item-image-link`,children:[l.jsx("div",{className:`${a}-item-image-wrapper`,style:{width:w.scalingValue(de??0,n),height:w.scalingValue(de??0,n)},children:(((We=Pe.image)==null?void 0:We.length)??0)===0?null:g==="Off"?l.jsx("img",{src:Pe.image[0].url,alt:Pe.image[0].name,className:`${a}-item-image`.trim(),style:Ae,onClick:Fe=>Ft(Fe,Pe.image.map(Ne=>Ne.url),0)}):l.jsx(oo,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:500,type:C==="Fade"?"fade":"loop",rewind:C==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:C==="Fade"?"ltr":v!=="Random"?v==="Horizontal"?"ltr":"ttb":Oe},onMoved:Fe=>{if(v!=="Random"||C==="Fade")return;const Ne=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Ee(Ne),setTimeout(()=>{Fe.refresh()},0)},children:Pe.image.map((Fe,Ne)=>l.jsx(io,{children:l.jsx("img",{src:Fe.url,alt:Fe.name,className:`${a}-item-image`.trim(),style:Ae,onClick:it=>Ft(it,Pe.image.map(hr=>hr.url),Ne)})},Ne))},`${C}-${de}-${v}-${$}-${Ve}-${i}`)}),l.jsx("div",{"data-controls":"titleMarginTop",className:`${a}-control`,style:{height:w.scalingValue(y??0,n),width:w.scalingValue(de*d/100,n)}}),l.jsx("p",{className:`${a}-item-title`.trim(),style:{width:`calc(${w.scalingValue(de??0,n)} * (${d} / 100))`,...I},children:Pe.title}),c==="B"&&l.jsx("div",{"data-controls":"subtitleMarginTop",className:`${a}-control`,style:{height:w.scalingValue(M??0,n),width:w.scalingValue(de*d/100,n)}}),c==="B"&&l.jsx("p",{className:`${a}-item-subtitle`.trim(),style:{width:`calc(${w.scalingValue(de??0,n)} * (${d} / 100))`,...S},children:Pe.subtitle})]})})},De)})})}),ot&&typeof document<"u"&&f==="On"&&Jo.createPortal(l.jsx("div",{style:ln,"data-selection":"none",children:l.jsx(zc,{images:xe,index:Xe,imageDisplay:m.display,originRect:In,reverseClose:g==="Off",onClose:()=>$t(!1),onPrev:()=>dt(Pe=>(Pe-1+xe.length)%xe.length),onNext:()=>dt(Pe=>(Pe+1)%xe.length),counterClassName:`${a}-lightbox-counter`.trim(),counterStyle:X})}),document.body)]})}const qc={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Uc=["hover","focus","filled","success","error"],Gc=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3676
+ `}const Lt=500,Ht="cubic-bezier(0.22, 1, 0.36, 1)";function zc({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:s,onPrev:i,onNext:a,counterClassName:c,counterStyle:u}){const d=p.useRef(null),L=p.useRef(null),[h,f]=p.useState(null),[m,g]=p.useState(r?"opening":"open"),[$,v]=p.useState(!0),C=p.useRef(t),y=p.useCallback(()=>{const T=d.current,R=L.current;if(!T||!R)return;const k=T.getBoundingClientRect(),V=k.width,O=k.height,G=R.naturalWidth,Y=R.naturalHeight;if(!V||!O||!G||!Y)return;if(n==="Cover"){f({width:V,height:O,left:k.left,top:k.top});return}const b=G/Y,B=V/O;if(b>B){const I=V/b;f({width:V,height:I,left:k.left,top:k.top+(O-I)/2})}else{const I=O*b;f({width:I,height:O,left:k.left+(V-I)/2,top:k.top})}},[n]);p.useEffect(()=>{y();const T=d.current;if(!T)return;const R=new ResizeObserver(()=>y());return R.observe(T),()=>R.disconnect()},[y,t]),p.useEffect(()=>{if(m!=="opening"||!h)return;const T={id:0};return T.id=requestAnimationFrame(()=>{T.id=requestAnimationFrame(()=>g("open"))}),()=>cancelAnimationFrame(T.id)},[m,h]),p.useEffect(()=>{if(m!=="closing")return;const T=setTimeout(()=>s(),Lt);return()=>clearTimeout(T)},[m,s]),p.useEffect(()=>{C.current!==t&&v(!1),C.current=t},[t]);const M=()=>{m!=="closing"&&g("closing")},H=m==="open",A=m==="closing",x=A&&o&&!!r,_=m==="opening"?r??h:x?r:h;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:M,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:H?1:0,transition:`opacity ${Lt}ms ${Ht}`,pointerEvents:"none"}}),l.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},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:d,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:H?1:0,transition:`opacity ${Lt}ms ${Ht}`},children:e.length>1&&l.jsxs("p",{className:c,style:u,children:[t+1," / ",e.length]})})]}),_&&l.jsx("img",{ref:L,src:e[t],onLoad:y,style:{position:"fixed",top:_.top,left:_.left,width:_.width,height:_.height,objectFit:n==="Cover"?"cover":"contain",opacity:A&&!x?0:1,transition:A&&!x?`opacity ${Lt}ms ${Ht}`:x||$?`top ${Lt}ms ${Ht}, left ${Lt}ms ${Ht}, width ${Lt}ms ${Ht}, height ${Lt}ms ${Ht}`:"none",pointerEvents:"none",zIndex:9998}}),H&&h&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:h.top,left:h.left,width:h.width/2,height:h.height,cursor:"w-resize",zIndex:9999},onClick:T=>{T.stopPropagation(),i()}}),l.jsx("div",{style:{position:"fixed",top:h.top,left:h.left+h.width/2,width:h.width/2,height:h.height,cursor:"e-resize",zIndex:9999},onClick:T=>{T.stopPropagation(),a()}})]})]})}function Kc({settings:e,content:t,isEditor:n,isPreviewMode:r,metadata:o,activeEvent:s,layoutId:i}){const{prefix:a}=w.useScopedStyles(),{type:c="A",gridLayout:u,textBoxWidth:d,verticalGap:L,entriesCount:h,lightbox:f,imageDisplay:m,slider:g,sliderTiming:$,direction:v,transition:C,titleMarginTop:y,subtitleMarginTop:M,titleColor:H,subtitleColor:A,lightboxCounterColor:x,titleFontFamily:_,titleFontSettings:T,titleFontSize:R,titleLineHeight:k,titleLetterSpacing:V,titleWordSpacing:O,titleTextAppearance:G,subtitleFontFamily:Y,subtitleFontSettings:b,subtitleFontSize:B,subtitleLineHeight:I,subtitleLetterSpacing:F,subtitleWordSpacing:P,subtitleTextAppearance:N,lightboxCounterFontFamily:J,lightboxCounterFontSettings:oe,lightboxCounterFontSize:K,lightboxCounterLineHeight:le,lightboxCounterLetterSpacing:D,lightboxCounterWordSpacing:ie,lightboxCounterTextAppearance:ve}=e,pe={fontSettings:{fontFamily:_,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:R??.01,lineHeight:k,letterSpacing:V??0,wordSpacing:O??0,textAppearance:G,color:H},W={...pt(Ye(pe,n))},Q={fontSettings:{fontFamily:Y,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:B??.01,lineHeight:I,letterSpacing:F??0,wordSpacing:P??0,textAppearance:N,color:A},S={...pt(Ye(Q,n))},q={fontSettings:{fontFamily:J,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:K??.01,lineHeight:le,letterSpacing:D??0,wordSpacing:ie??0,textAppearance:ve,color:x},X={...pt(Ye(q,n))},ee=w.buildColorVars(a,{titleColor:H,subtitleColor:A,lightboxCounterColor:x},qc,Uc),ne=`${s&&s!=="default"?`${a}-state-${s}`:""}`.trim(),ce=h===0?1/0:h,Se=(t??[]).slice(0,ce),de=u.entryWidth??.2,j=(m==null?void 0:m.display)==="Cover",ue=(m==null?void 0:m.ratioValue)??"1:1",z=(m==null?void 0:m.reversed)??!1,[te,be]=ue.split(":").map(Number),ye=z?be:te,Me=z?te:be,He=`${ye} / ${Me}`,we=ye>=Me,Ae={objectFit:j?"cover":"contain",...j&&{aspectRatio:He,width:we?"100%":"auto",height:we?"auto":"100%"}},[Oe,Ee]=p.useState("ltr"),[Ve,ct]=p.useState(0),qe=p.useRef(null);p.useEffect(()=>{const Pe=qe.current;if(!Pe)return;const De=new ResizeObserver(fe=>{ct(Math.round(fe[0].contentRect.width))});return De.observe(Pe),()=>De.disconnect()},[]);const cn=(()=>{const Pe={...ee},De=qe.current?getComputedStyle(qe.current).getPropertyValue("--cntrl-article-width").trim():"";return De&&(Pe["--cntrl-article-width"]=De),Pe})(),[ot,$t]=p.useState(!1),[xe,Je]=p.useState([]),[Xe,dt]=p.useState(0),[In,dn]=p.useState(null),Ft=(Pe,De,fe)=>{if(f==="Off")return;const Ie=Pe.currentTarget.getBoundingClientRect();dn({top:Ie.top,left:Ie.left,width:Ie.width,height:Ie.height}),Je(De),dt(fe),$t(!0)};return p.useEffect(()=>{if(!ot||f!=="On"||typeof document>"u")return;const Pe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Pe}},[ot,f]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:jc(a)}}),l.jsx("div",{style:ee,children:l.jsx("div",{ref:qe,className:`${a}-wrapper ${a}-type-${c} ${ne}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:w.scalingValue(L??0,n),columnGap:w.scalingValue(u.horizontalGap??0,n),width:w.scalingValue(u.wrapperWidth??0,n)},children:Se.map((Pe,De)=>{var fe,Ie;return l.jsx("div",{className:`${a}-item`.trim(),children:l.jsx("div",{className:r?`${a}-item-inner`:`${a}-item-inner-hidden`,style:{width:(d??0)>100?`calc(${w.scalingValue(de??0,n)} * (${d} / 100))`:w.scalingValue(de??0,n)},children:l.jsxs("a",{href:(((fe=Pe.link)==null?void 0:fe.length)??0)>0&&f==="Off"?Pe.link:void 0,target:"_blank",className:`${a}-item-image-link`,children:[l.jsx("div",{className:`${a}-item-image-wrapper`,style:{width:w.scalingValue(de??0,n),height:w.scalingValue(de??0,n)},children:(((Ie=Pe.image)==null?void 0:Ie.length)??0)===0?null:g==="Off"?l.jsx("img",{src:Pe.image[0].url,alt:Pe.image[0].name,className:`${a}-item-image`.trim(),style:Ae,onClick:Fe=>Ft(Fe,Pe.image.map(Ne=>Ne.url),0)}):l.jsx(oo,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:500,type:C==="Fade"?"fade":"loop",rewind:C==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:C==="Fade"?"ltr":v!=="Random"?v==="Horizontal"?"ltr":"ttb":Oe},onMoved:Fe=>{if(v!=="Random"||C==="Fade")return;const Ne=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Ee(Ne),setTimeout(()=>{Fe.refresh()},0)},children:Pe.image.map((Fe,Ne)=>l.jsx(io,{children:l.jsx("img",{src:Fe.url,alt:Fe.name,className:`${a}-item-image`.trim(),style:Ae,onClick:it=>Ft(it,Pe.image.map(fr=>fr.url),Ne)})},Ne))},`${C}-${de}-${v}-${$}-${Ve}-${i}`)}),l.jsx("div",{"data-controls":"titleMarginTop",className:`${a}-control`,style:{height:w.scalingValue(y??0,n),width:w.scalingValue(de*d/100,n)}}),l.jsx("p",{className:`${a}-item-title`.trim(),style:{width:`calc(${w.scalingValue(de??0,n)} * (${d} / 100))`,...W},children:Pe.title}),c==="B"&&l.jsx("div",{"data-controls":"subtitleMarginTop",className:`${a}-control`,style:{height:w.scalingValue(M??0,n),width:w.scalingValue(de*d/100,n)}}),c==="B"&&l.jsx("p",{className:`${a}-item-subtitle`.trim(),style:{width:`calc(${w.scalingValue(de??0,n)} * (${d} / 100))`,...S},children:Pe.subtitle})]})})},De)})})}),ot&&typeof document<"u"&&f==="On"&&Jo.createPortal(l.jsx("div",{style:cn,"data-selection":"none",children:l.jsx(zc,{images:xe,index:Xe,imageDisplay:m.display,originRect:In,reverseClose:g==="Off",onClose:()=>$t(!1),onPrev:()=>dt(Pe=>(Pe-1+xe.length)%xe.length),onNext:()=>dt(Pe=>(Pe+1)%xe.length),counterClassName:`${a}-lightbox-counter`.trim(),counterStyle:X})}),document.body)]})}const qc={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Uc=["hover","focus","filled","success","error"],Gc=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3677
3677
  import '@splidejs/react-splide/css/core';
3678
3678
  import { CommonComponentProps } from '../props';
3679
3679
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
@@ -4381,11 +4381,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
4381
4381
  };
4382
4382
 
4383
4383
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
4384
- `,wr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Yc=["titleColor","subtitleColor","lightboxCounterColor"],Xc={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",rules:[{if:{name:"type",value:"A"},then:{name:"subtitle",value:!1}}]},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"},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:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},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},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"}}},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",visible:!1}},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:{...wr.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:{...wr.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:{...wr.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:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Arial",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,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:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,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:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","entriesCount","lightbox","imageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",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"]},{type:"row",title:"Image",items:["imageDisplay","lightbox"]},{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:[...Yc],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Zc={element:Kc,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:Xc,sourceCode:Gc};function Un(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Jc(e){return String(e??"").trim().length>0}function Qc(e,t,n,r,o,s,i){const a=w.scalingValue(s,i),c=w.scalingValue(0,i),u=e===0,d=e===t-1&&!o;return{borderTopWidth:u&&n?a:c,borderBottomWidth:!d||r?a:c}}function ed(e,t,n){const r=w.scalingValue(t,n),o=w.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?r:o}}const Vo=10;function td(e){return`
4384
+ `,$r={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Yc=["titleColor","subtitleColor","lightboxCounterColor"],Xc={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",rules:[{if:{name:"type",value:"A"},then:{name:"subtitle",value:!1}}]},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"},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:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},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},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"}}},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",visible:!1}},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:{...$r.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:{...$r.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:{...$r.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:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Arial",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,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:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,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:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","entriesCount","lightbox","imageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",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"]},{type:"row",title:"Image",items:["imageDisplay","lightbox"]},{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:[...Yc],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Zc={element:Kc,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:Xc,sourceCode:Gc};function Gn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Jc(e){return String(e??"").trim().length>0}function Qc(e,t,n,r,o,s,i){const a=w.scalingValue(s,i),c=w.scalingValue(0,i),u=e===0,d=e===t-1&&!o;return{borderTopWidth:u&&n?a:c,borderBottomWidth:!d||r?a:c}}function ed(e,t,n){const r=w.scalingValue(t,n),o=w.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?r:o}}const Vo=10;function td(e){return`
4385
4385
  .${e}-wrapper {
4386
4386
  display: grid;
4387
4387
  align-items: start;
4388
- min-height: ${Un(48)};
4388
+ min-height: ${Gn(48)};
4389
4389
  position: relative;
4390
4390
  overflow: visible;
4391
4391
  box-sizing: border-box;
@@ -4507,7 +4507,7 @@ a.${e}-list-item {
4507
4507
  flex-shrink: 0;
4508
4508
  overflow: visible;
4509
4509
  box-sizing: border-box;
4510
- min-width: ${Un(50)};
4510
+ min-width: ${Gn(50)};
4511
4511
  position: relative;
4512
4512
  display: flex;
4513
4513
  align-items: flex-start;
@@ -4515,7 +4515,7 @@ a.${e}-list-item {
4515
4515
 
4516
4516
  .${e}-list-col-last {
4517
4517
  flex: 1 1 auto;
4518
- min-width: ${Un(50)};
4518
+ min-width: ${Gn(50)};
4519
4519
  }
4520
4520
 
4521
4521
  .${e}-list-col-title {
@@ -4746,7 +4746,7 @@ a.${e}-list-item {
4746
4746
  overflow-wrap: anywhere;
4747
4747
  word-break: break-word;
4748
4748
  }
4749
- `}const Rt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ao=["AColumn","BColumn","CColumn","DColumn","EColumn"],Ct="cutLabel",gr=[...ao,Ct],so=["A","B","C","D","E"];function Mi(e){return`${e}ColumnVerticalAlign`}const Hr=["Top","Center","Bottom"];function nd(e){const t=String(e??"Top").trim();return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function rd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return so.includes(n)?n:null}function Hi(e,t,n){const r=rd(e);return r?r===t?!1:nd(n[Mi(r)]):!0}function Cn(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return so.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function od(e,t,n){if(Ni(e,t,n))return Cn(e);const r=Cn(e);return r.kind==="baseline"?{kind:"top"}:r}function id(e){const t=Cn(e);return t.kind==="baseline"?{kind:"top"}:t}function Ni(e,t,n){return Hi(e,n,t)?Cn(e).kind==="baseline":!1}function ad(e){const t={};let n=!1;for(const r of so){const o=Mi(r),s=e[o];if(e.type==="B"){const i=String(s??"Top").trim();i!=="Top"&&i!=="Center"&&i!=="Bottom"&&(t[o]="Top",n=!0);continue}Hi(s,r,e)||(t[o]="Top",n=!0)}return n?t:null}function sd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function ld(e){const t=Cn(e).kind;return t==="baseline"?"center":t}function cd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Do(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function dd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-r;return n.remove(),s}function $r(e,t,n,r){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const i=dd(o,r);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+i;const a=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(a.height-c)/2:e.kind==="bottom"&&(u=a.height-c),a.top-t+u+i}function ud(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${r}px`,s.style.height=`${r}px`)}),e.offsetHeight,r)}function pd(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 Le(e,t){return`${e}${t.replace(/^text/,"Text")}`}const gd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function hd(e){return[Le(e,"textFontFamily"),Le(e,"textFontSettings"),{type:"row",items:[Le(e,"textFontSize"),Le(e,"textLineHeight"),Le(e,"textLetterSpacing"),Le(e,"textWordSpacing")]},Le(e,"textTextAlign"),Le(e,"textTextAppearance"),`${e}VerticalAlign`]}function fd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(gr.map(e=>[gd[e],hd(e)]))}}function tr(e,t){const n=r=>{const o=Le(t,r);return e[o]};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===Ct?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function jo(e,t){var r,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.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 pt(Ye(n,t))}function zo(e,t,n,r){const o=tr(e,t),s=o.textFontSize??.01,i=o.textLineHeight;return i!==void 0&&i<s?`${n} ${r}`:n}function Ko(e,t,n,r){const o=tr(e,t),s=o.textFontSize??.01,i=o.textLineHeight;return i===void 0||i>=s?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((s-i)/2,r)}}const nt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],en=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],tn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],nn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],yd={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"],qo=.004,Ut=.004,Tr=Ut,Uo=12,lo=50,Sn=1440,wn=lo/Sn;function Bi(e){const t=typeof e=="number"&&e>0?e:Sn;return lo/t}function bd(e,t){const n={position:"absolute",width:Uo,height:Uo,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 ft({P:e,className:t,areaStyle:n,hitPlacement:r,...o}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...o,children:l.jsx("div",{style:bd(e,r)})})}function xd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const o=parseFloat(r);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Sn}const Oi={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Gn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Cd(e,t=1){const n=t/e;return Object.fromEntries(nt.map(r=>[r,n]))}function Sd(){return Object.fromEntries([...en.map(e=>[e,0]),...tn.map(e=>[e,0])])}function wd(){return Object.fromEntries(nn.map(e=>[e,0]))}function Vn(e){return Object.fromEntries(nt.map(t=>[t,typeof e[t]=="number"?e[t]:Oi[t]]))}function Vi(e,t,n){const r=e-wn,o=t+n;if(o<=0||o<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const s=r/o;return{paddingLeft:t*s,paddingRight:n*s}}function Yn(e,t,n){const r=co(e,t,n);if(e<=0)return[];const o=r.slice(0,e-1).reduce((s,i)=>s+i,0);return[...r.slice(0,e-1),Math.max(0,t-o)]}function $d(e,t,n){const r={};for(let o=0;o<e;o+=1){const s=en[o],i=tn[o],a=typeof n[s]=="number"?n[s]:0,c=typeof n[i]=="number"?n[i]:0,u=Vi(t[o]??0,a,c);u.paddingLeft!==a&&(r[s]=u.paddingLeft),u.paddingRight!==c&&(r[i]=u.paddingRight)}return r}function co(e,t,n){if(e<=0)return[];const r=nt.slice(0,e).map(u=>n[u]);if(e===1)return r;const o=r.slice(0,e-1),i=o.reduce((u,d)=>u+d,0)+wn;if(t>=i)return r;const a=[...o];let c=i-t;for(let u=a.length-1;u>=0&&c>0;u-=1){const d=a[u]-wn;if(d<=0)continue;const L=Math.min(c,d);a[u]-=L,c-=L}return[...a,r[e-1]]}function Td(e,t,n){if(e<=1)return{};const r=co(e,t,n),o={};for(let s=0;s<e-1;s+=1){const i=nt[s];r[s]!==n[i]&&(o[i]=r[s])}return o}function Go(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Rt]}function Ld(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Ed(e,t,n,r){const o=Math.min(r,e.length,nt.length),s={};for(let i=0;i<o;i+=1){const a=e[i],c=t.indexOf(a);if(c===-1)continue;const u=nt[c],d=en[c],L=tn[c],h=nn[c],f=nt[i],m=en[i],g=tn[i],$=nn[i],v=n[u],C=n[d],y=n[L],M=n[h];typeof v=="number"&&(s[f]=v),typeof C=="number"&&(s[m]=C),typeof y=="number"&&(s[g]=y),typeof M=="number"&&(s[$]=M)}return s}function Pd(e,t,n){const r=ad(e);r&&(e={...e,...r});const o=Bi(n==null?void 0:n.designWidth),s=e.columns,i=t.columns,a=Gn(e),c=Gn(t),u=e.type==="B"||e.type===void 0&&t.type==="B",d=typeof s=="number"?s:typeof i=="number"?i:Rt.length,L=y=>{if(u)return y;const M=Vn({...t,...y}),H=Gn(y),A=Yn(d,H,M),x=$d(d,A,{...t,...y});return Object.keys(x).length===0?y:{...y,...x}};if(typeof s=="number"&&s!==i){const y={...e,...Cd(s,a),...Sd()};if(u)for(const M of nn)typeof t[M]=="number"&&(y[M]=t[M]);else Object.assign(y,wd());return y}const h=Go(e),f=Go(t);if(!Ld(h,f))return L({...e,...Ed(h,f,t,d)});if(a<c&&typeof d=="number"&&!u){const y=Vn({...t,...e});return L({...e,...Td(d,a,y)})}if(u){const y=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(a-o)/2);return y>M?{...e,textPaddingLR:M}:e}const m=Vn({...t,...e}),g=Yn(d,c,Vn(t)),v=Yn(d,a,m).some((y,M)=>y<(g[M]??y)),C=nt.some(y=>{const M=e[y],H=t[y];return typeof M=="number"&&typeof H=="number"&&M!==H});return v||C?L(e):e}function _d(e,t,n,r){const o=t.slice(0,e).reduce((i,a)=>i+a,0),s=n.slice(e+1,t.length-1).reduce((i,a)=>i+a,0);return Math.max(wn,r-o-s-wn)}function Ad(e,t){return Math.random()*(t-e)+e}function Rd(e){return Object.fromEntries(nt.map(t=>[t,typeof e[t]=="number"?e[t]:Oi[t]]))}function Lr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function Id(e,t,n,r,o,s){return e.slice(0,t).map((i,a)=>{const c=en[a],u=tn[a],d=nn[a];return{key:i,textPrefix:md[i],widthKey:nt[a],width:n[nt[a]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:d,paddingLeft:r[c],paddingRight:o[u],paddingBottom:s[d]}})}function Wd({settings:e,content:t,isEditor:n,isPreviewMode:r,activeEvent:o,layoutId:s,onUpdateSettings:i}){const{prefix:a}=w.useScopedStyles(),c=!!(n&&!r),{columns:u,type:d,wrapperWidth:L,entriesCount:h,cellMinHeight:f,dividerWidth:m,showVisibility:g,cut:$,showCut:v,cutCellMinHeight:C,cutLabel:y,imageSize:M,imageOnHover:H,entryHoverEffect:A,rowPaddingTop:x,rowPaddingBottom:_,rowPaddingTopB:T,columnsOrder:R,textPaddingLR:k,textColor:V,backgroundColor:O,dividerColor:G,textHoverColor:Y,backgroundHoverColor:b,dividerHoverColor:B}=e,[W,F]=p.useState(void 0),[P,N]=p.useState(null),J=H==="On"&&(!n||r),oe=($??0)>0,K=d==="B",le=p.useRef(null),D=p.useRef(null),[ie,ve]=p.useState(null),[pe,Ce]=p.useState(Sn),I=Bi(pe),Q=Math.max(0,((L??0)-I)/2),E=Math.min(k??0,Q),S=Math.max(E,Ut),q=((L??0)+I)/2;p.useLayoutEffect(()=>{if(!n){Ce(Sn);return}const se=()=>{Ce(xd(le.current))};se();const me=le.current;if(!me)return;const ge=new ResizeObserver(se);ge.observe(me);let Re=me;for(;Re&&!Re.style.getPropertyValue("--cntrl-article-width");)Re=Re.parentElement;return Re&&ge.observe(Re),()=>ge.disconnect()},[n,s]),p.useEffect(()=>{F(void 0)},[$,v,t,h]);const U=w.buildColorVars(a,{textColor:V,backgroundColor:O,dividerColor:G,textHoverColor:Y,backgroundHoverColor:b,dividerHoverColor:B},yd,vd),X=o&&o!=="default"?`${a}-state-${o}`:"",re=`${A==="Default"?`${a}-entry-hover-default`:A==="Blinds"?`${a}-entry-hover-blinds`:""} ${X}`.trim(),ne=(g==null?void 0:g[0])??!1,ce=(g==null?void 0:g[1])??!1,Se=p.useRef(e),de=p.useRef(s);p.useEffect(()=>{if(!i||!n){Se.current=e,de.current=s;return}if(de.current!==s){Se.current=e,de.current=s;return}const se=Se.current;if(!(se!==e))return;const ge=Pd(e,se,{designWidth:pe});Se.current=e,ge!==e&&i(ge)},[e,i,n,s,pe]);const j=p.useMemo(()=>Rd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ue=p.useMemo(()=>Lr(e,en),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),z=p.useMemo(()=>Lr(e,tn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),te=p.useMemo(()=>Lr(e,nn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),be=p.useMemo(()=>Array.isArray(R)&&R.length>0?R:[...Rt],[R]),ye=p.useMemo(()=>Id(be,u,j,ue,z,te),[be,u,j,ue,z,te]),Me=Gn(e),He=p.useMemo(()=>nt.slice(0,u).map(se=>j[se]),[u,j]),we=p.useMemo(()=>co(u,Me,j),[u,Me,j]),Ae=p.useMemo(()=>Yn(u,Me,j),[u,Me,j]),Oe=p.useMemo(()=>ye.map((se,me)=>Vi(Ae[me]??0,se.paddingLeft,se.paddingRight)),[ye,Ae]),Ee=p.useMemo(()=>{const se=h===0?1/0:h;return(t??[]).slice(0,se).map((ge,Re)=>({id:Re,cells:Object.fromEntries(Rt.map(Ue=>[Ue,ge[Ue]??""])),image:ge.image,link:ge.link}))},[t,h]),Ve=oe?W??$:Ee.length,ct=p.useMemo(()=>oe?Ee.slice(0,Ve):Ee,[Ee,oe,Ve]),qe=oe&&Ve<Ee.length,ln=ct.length>1||qe,ot=[ne?`${a}-divider-top`:"",ce||ln?`${a}-divider-bottom`:""].filter(Boolean).join(" "),$t=()=>{const se=W??$;if(!v){F(Ee.length);return}F(Math.min(se+v,Ee.length))},xe=se=>w.scalingValue(se,n??!1),Je=K?T??0:x??0,Xe=_??0,dt=f??0,In=(Je+dt+Xe)/2,cn=Math.max(Xe,Tr),Ft=ie!=null?`${ie/2}px`:xe(In),Pe=K?"rowPaddingTopB":"rowPaddingTop",De=ye[0],fe=ye[ye.length-1],We=Oe[0],Fe=Oe[Oe.length-1],Ne=De&&We?Math.max(We.paddingLeft,Ut):0,it=fe&&Fe?Math.max(Fe.paddingRight,Ut):0,hr=Me,uo=se=>{const me=le.current;if(!me)return{x:0,y:0};const ge=me.getBoundingClientRect();return{x:se.clientX-ge.left+Vo,y:se.clientY-ge.top+Vo}},ji=(se,me)=>{if(!J)return;const ge=se.image;if(!(ge!=null&&ge.url)){N(null);return}const{x:Re,y:Ue}=uo(me),Qe=(M==null?void 0:M.min)??80,$e=(M==null?void 0:M.max)??320,je=(P==null?void 0:P.rowId)===se.id?P.widthPx:Ad(Qe,$e);N({rowId:se.id,url:ge.url,objectFit:ge.objectFit??"cover",widthPx:je,x:Re,y:Ue})},zi=se=>{if(!J||!P)return;const{x:me,y:ge}=uo(se);N(Re=>!Re||Re.x===me&&Re.y===ge?Re:{...Re,x:me,y:ge})},Ki=()=>{N(null)},qi=()=>{J&&N(null)};p.useLayoutEffect(()=>{if(!c||K){ve(null);return}const se=D.current;if(!se){ve(null);return}const me=()=>{ve(se.getBoundingClientRect().height)};me();const ge=new ResizeObserver(me);return ge.observe(se),()=>ge.disconnect()},[c,K,ct,Je,Xe,dt,t,e,ye,Ae,pe]);const po=p.useMemo(()=>!K&&ao.some(se=>{const me=se.charAt(0),ge=e[`${se}VerticalAlign`];return Ni(ge,e,me)}),[K,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return p.useLayoutEffect(()=>{var Qe;const se=le.current;if(!se)return;const me=()=>{se.querySelectorAll("[data-list-col]").forEach($e=>{$e.style.transform="";const je=$e.querySelector(`.${a}-list-col`);je&&(je.style.minHeight="",je.style.height="");const ut=$e.querySelector(`.${a}-list-col-title`);ut&&(ut.style.transform="")})};if(K||!po){me();return}const ge=()=>{se.querySelectorAll("[data-list-row]").forEach($e=>{const je=Array.from($e.querySelectorAll("[data-list-col]"));je.forEach(_e=>{_e.style.transform="";const Ze=_e.querySelector(`.${a}-list-col`);Ze&&(Ze.style.minHeight="",Ze.style.height="");const ze=_e.querySelector(`.${a}-list-col-title`);ze&&(ze.style.transform="")}),ud($e,je,`${a}-list-col`),$e.offsetHeight;const ut=$e.getBoundingClientRect().top,Tt=`${a}-baseline-probe`,jt=new Map,Wn=je.map(_e=>{const Ze=_e.querySelector(`.${a}-list-col-title`),ze={el:_e,titleEl:Ze,letter:_e.getAttribute("data-col-letter")??"",kind:_e.getAttribute("data-valign")??"top",anchor:_e.getAttribute("data-valign-anchor")};return jt.set(ze.letter,ze),ze}),dn=new Map,kn=(_e,Ze)=>{const ze=dn.get(_e.letter);if(ze!==void 0)return ze;const Fn=_e.anchor?jt.get(_e.anchor):void 0;if(_e.kind!=="baseline"||!Fn||Ze.has(_e.letter)){const go=$r(_e,ut,`${a}-list-col`,Tt);return dn.set(_e.letter,go),go}Ze.add(_e.letter);const Ui=kn(Fn,Ze);Ze.delete(_e.letter);const Gi=$r(_e,ut,`${a}-list-col`,Tt),Yi=Ui-Gi;pd(_e.titleEl,Yi);const mo=$r(_e,ut,`${a}-list-col`,Tt);return dn.set(_e.letter,mo),mo};Wn.forEach(_e=>kn(_e,new Set))})};ge();const Re=new ResizeObserver(()=>ge());Re.observe(se);let Ue=!1;return typeof document<"u"&&((Qe=document.fonts)!=null&&Qe.ready)&&document.fonts.ready.then(()=>{Ue||ge()}),()=>{Ue=!0,Re.disconnect(),me()}},[po,K,e,t,pe,ct,Ae]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:td(a)}}),l.jsx("div",{style:U,children:l.jsxs("div",{ref:le,className:`${a}-wrapper ${re}${ot?` ${ot}`:""}${K?` ${a}-type-b`:""}`.trim(),style:{width:w.scalingValue(L??0,n),...!K&&c?{[`--${a}-first-entry-handle-top`]:Ft}:{}},onMouseMove:J?zi:void 0,onMouseLeave:J?Ki:void 0,children:[l.jsxs("div",{style:{width:"100%"},children:[ct.map((se,me)=>{var Qe;const ge=(((Qe=se.link)==null?void 0:Qe.length)??0)>0,Re=ge?"a":"div",Ue=Qc(me,ct.length,ne,ce,qe,m??0,n??!1);return l.jsxs(Re,{ref:me===0?$e=>{D.current=$e}:void 0,className:`${a}-list-item${ge?` ${a}-list-item-has-link`:""}`,...ge?{href:se.link,target:"_blank"}:{},style:Ue,onMouseEnter:J?$e=>ji(se,$e):void 0,children:[Je>0&&l.jsx("div",{className:`${a}-row-padding-handle`,style:{height:xe(Je)}}),l.jsxs("div",{className:`${a}-list-cols-row${K?"":` ${a}-list-cols-row-h`}${c&&me===0&&K?` ${a}-list-cols-row-controls`:""}`,...K?{}:{"data-list-row":""},style:K?void 0:{minHeight:xe(dt)},children:[ye.map(($e,je)=>{const ut=je===ye.length-1,Tt=Oe[je],jt=$e.paddingBottom,Wn=Jc(se.cells[$e.key]),dn=K&&Wn&&jt>0,kn=K?{minHeight:xe(dt)}:{width:xe(Ae[je])},_e=K?{paddingLeft:xe(E),paddingRight:xe(E)}:{paddingLeft:xe(Tt.paddingLeft),paddingRight:xe(Tt.paddingRight)},Ze=$e.textPrefix.charAt(0),ze=K?id(e[`${$e.textPrefix}VerticalAlign`]):od(e[`${$e.textPrefix}VerticalAlign`],e,Ze),Fn=K&&Wn&&c&&me===0;return l.jsxs("div",{className:K?`${a}-list-col-wrap`:void 0,...K?{}:{"data-list-col":"","data-col-letter":Ze,"data-valign":ze.kind,...ze.kind==="baseline"?{"data-valign-anchor":ze.anchorLetter}:{}},children:[l.jsx("div",{className:`${a}-list-col${ut?` ${a}-list-col-last`:""}`,style:{..._e,...kn,...K?{justifyContent:Do(ze.kind)}:{}},"data-test":$e.width,children:l.jsx("span",{className:zo(e,$e.textPrefix,`${a}-list-col-title`,`${a}-text-tight-leading`),style:{...jo(tr(e,$e.textPrefix),n),...Ko(e,$e.textPrefix,a,n),...K?{}:sd(ze.kind)},children:se.cells[$e.key]??null})}),dn&&l.jsx("div",{className:`${a}-row-padding-handle`,style:{height:xe(jt)}}),Fn&&l.jsx(ft,{P:a,"data-controls":$e.paddingBottomKey,"data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:xe(Math.max(jt,Tr))}})]},$e.key)}),c&&me===0&&K&&l.jsxs(l.Fragment,{children:[l.jsx(ft,{P:a,"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(q),className:`${a}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:xe(S),height:"100%"}}),l.jsx(ft,{P:a,"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(q),className:`${a}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:xe(Math.max(S,Me-S)),width:xe(S),height:"100%"}})]})]}),!K&&Xe>0&&l.jsx("div",{className:`${a}-row-padding-handle`,style:{height:xe(Xe)}}),c&&me===0&&!K&&l.jsx(ft,{P:a,"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:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:xe(cn)}})]},se.id)}),qe&&(()=>{const se=tr(e,Ct),me=ld(e.cutLabelVerticalAlign),ge=se.textTextAlign==="justify"||K;return l.jsx("button",{type:"button",className:`${a}-cut-item`,style:{minHeight:xe(C??0),...ed(ce,m??0,n??!1)},onClick:$t,onMouseEnter:J?qi:void 0,children:l.jsx("div",{className:`${a}-list-cols-row`,style:{...K?{paddingLeft:xe(E),paddingRight:xe(E)}:{},justifyContent:cd(se.textTextAlign),alignItems:Do(me)},children:l.jsx("span",{className:zo(e,Ct,`${a}-cut-label`,`${a}-text-tight-leading`),style:{...jo(se,n),...Ko(e,Ct,a,n),...ge?{width:"100%"}:{}},children:y})})})})()]}),c&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(ft,{P:a,"data-controls":Pe,"data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:xe(Math.max(Je,Tr))}})},"row-padding-handles"),c&&!K&&De&&fe&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(ft,{P:a,"data-controls":De.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[0]-((We==null?void 0:We.paddingRight)??0)),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:xe(Ne),height:"100%"}}),l.jsx(ft,{P:a,"data-controls":fe.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(Ae[ye.length-1]-((Fe==null?void 0:Fe.paddingLeft)??0)),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:xe(hr-it),width:xe(it),height:"100%"}})]},"column-edge-padding-handles"),c&&!K&&ye.slice(0,-1).map((se,me)=>{const ge=ye[me+1],Re=we.slice(0,me+1).reduce((ut,Tt)=>ut+Tt,0),Ue=Oe[me],Qe=Oe[me+1],$e=Math.max(Ue.paddingRight,Ut),je=Math.max(Qe.paddingLeft,Ut);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(ft,{P:a,"data-controls":se.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(Ae[me]-Ue.paddingLeft),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:xe(Re-$e),width:xe($e),height:"100%"}}),l.jsx(ft,{P:a,"data-controls":ge.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[me+1]-Qe.paddingRight),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:xe(Re),width:xe(je),height:"100%"}})]},`${se.paddingRightKey}-padding`)}),c&&!K&&ye.slice(0,-1).map((se,me)=>{const ge=_d(me,we,He,Me),Ue=we.slice(0,me+1).reduce((Qe,$e)=>Qe+$e,0)-qo/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":se.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(lo),"data-controls-max-fraction":String(ge),"data-controls-variant":"column-width",className:`${a}-col-resize-handle`,style:{position:"absolute",top:"0px",left:xe(Ue),width:xe(qo),height:"calc(100%)",pointerEvents:"auto"}})},`${se.widthKey}-junction`)}),J&&P&&l.jsx("img",{className:`${a}-hover-image`,src:P.url,alt:"",style:{width:Un(P.widthPx),objectFit:P.objectFit,left:P.x,top:P.y}})]})})]})}const kd=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
4749
+ `}const Rt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ao=["AColumn","BColumn","CColumn","DColumn","EColumn"],Ct="cutLabel",hr=[...ao,Ct],so=["A","B","C","D","E"];function Mi(e){return`${e}ColumnVerticalAlign`}const Hr=["Top","Center","Bottom"];function nd(e){const t=String(e??"Top").trim();return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function rd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return so.includes(n)?n:null}function Hi(e,t,n){const r=rd(e);return r?r===t?!1:nd(n[Mi(r)]):!0}function Sn(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return so.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function od(e,t,n){if(Ni(e,t,n))return Sn(e);const r=Sn(e);return r.kind==="baseline"?{kind:"top"}:r}function id(e){const t=Sn(e);return t.kind==="baseline"?{kind:"top"}:t}function Ni(e,t,n){return Hi(e,n,t)?Sn(e).kind==="baseline":!1}function ad(e){const t={};let n=!1;for(const r of so){const o=Mi(r),s=e[o];if(e.type==="B"){const i=String(s??"Top").trim();i!=="Top"&&i!=="Center"&&i!=="Bottom"&&(t[o]="Top",n=!0);continue}Hi(s,r,e)||(t[o]="Top",n=!0)}return n?t:null}function sd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function ld(e){const t=Sn(e).kind;return t==="baseline"?"center":t}function cd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Do(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function dd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-r;return n.remove(),s}function Tr(e,t,n,r){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const i=dd(o,r);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+i;const a=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(a.height-c)/2:e.kind==="bottom"&&(u=a.height-c),a.top-t+u+i}function ud(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${r}px`,s.style.height=`${r}px`)}),e.offsetHeight,r)}function pd(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 Le(e,t){return`${e}${t.replace(/^text/,"Text")}`}const gd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function hd(e){return[Le(e,"textFontFamily"),Le(e,"textFontSettings"),{type:"row",items:[Le(e,"textFontSize"),Le(e,"textLineHeight"),Le(e,"textLetterSpacing"),Le(e,"textWordSpacing")]},Le(e,"textTextAlign"),Le(e,"textTextAppearance"),`${e}VerticalAlign`]}function fd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(hr.map(e=>[gd[e],hd(e)]))}}function nr(e,t){const n=r=>{const o=Le(t,r);return e[o]};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===Ct?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function jo(e,t){var r,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.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 pt(Ye(n,t))}function zo(e,t,n,r){const o=nr(e,t),s=o.textFontSize??.01,i=o.textLineHeight;return i!==void 0&&i<s?`${n} ${r}`:n}function Ko(e,t,n,r){const o=nr(e,t),s=o.textFontSize??.01,i=o.textLineHeight;return i===void 0||i>=s?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((s-i)/2,r)}}const nt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],tn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],nn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],rn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],yd={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"],qo=.004,Gt=.004,Lr=Gt,Uo=12,lo=50,wn=1440,$n=lo/wn;function Bi(e){const t=typeof e=="number"&&e>0?e:wn;return lo/t}function bd(e,t){const n={position:"absolute",width:Uo,height:Uo,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 ft({P:e,className:t,areaStyle:n,hitPlacement:r,...o}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...o,children:l.jsx("div",{style:bd(e,r)})})}function xd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const o=parseFloat(r);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return wn}const Oi={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Yn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Cd(e,t=1){const n=t/e;return Object.fromEntries(nt.map(r=>[r,n]))}function Sd(){return Object.fromEntries([...tn.map(e=>[e,0]),...nn.map(e=>[e,0])])}function wd(){return Object.fromEntries(rn.map(e=>[e,0]))}function Dn(e){return Object.fromEntries(nt.map(t=>[t,typeof e[t]=="number"?e[t]:Oi[t]]))}function Vi(e,t,n){const r=e-$n,o=t+n;if(o<=0||o<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const s=r/o;return{paddingLeft:t*s,paddingRight:n*s}}function Xn(e,t,n){const r=co(e,t,n);if(e<=0)return[];const o=r.slice(0,e-1).reduce((s,i)=>s+i,0);return[...r.slice(0,e-1),Math.max(0,t-o)]}function $d(e,t,n){const r={};for(let o=0;o<e;o+=1){const s=tn[o],i=nn[o],a=typeof n[s]=="number"?n[s]:0,c=typeof n[i]=="number"?n[i]:0,u=Vi(t[o]??0,a,c);u.paddingLeft!==a&&(r[s]=u.paddingLeft),u.paddingRight!==c&&(r[i]=u.paddingRight)}return r}function co(e,t,n){if(e<=0)return[];const r=nt.slice(0,e).map(u=>n[u]);if(e===1)return r;const o=r.slice(0,e-1),i=o.reduce((u,d)=>u+d,0)+$n;if(t>=i)return r;const a=[...o];let c=i-t;for(let u=a.length-1;u>=0&&c>0;u-=1){const d=a[u]-$n;if(d<=0)continue;const L=Math.min(c,d);a[u]-=L,c-=L}return[...a,r[e-1]]}function Td(e,t,n){if(e<=1)return{};const r=co(e,t,n),o={};for(let s=0;s<e-1;s+=1){const i=nt[s];r[s]!==n[i]&&(o[i]=r[s])}return o}function Go(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Rt]}function Ld(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Ed(e,t,n,r){const o=Math.min(r,e.length,nt.length),s={};for(let i=0;i<o;i+=1){const a=e[i],c=t.indexOf(a);if(c===-1)continue;const u=nt[c],d=tn[c],L=nn[c],h=rn[c],f=nt[i],m=tn[i],g=nn[i],$=rn[i],v=n[u],C=n[d],y=n[L],M=n[h];typeof v=="number"&&(s[f]=v),typeof C=="number"&&(s[m]=C),typeof y=="number"&&(s[g]=y),typeof M=="number"&&(s[$]=M)}return s}function Pd(e,t,n){const r=ad(e);r&&(e={...e,...r});const o=Bi(n==null?void 0:n.designWidth),s=e.columns,i=t.columns,a=Yn(e),c=Yn(t),u=e.type==="B"||e.type===void 0&&t.type==="B",d=typeof s=="number"?s:typeof i=="number"?i:Rt.length,L=y=>{if(u)return y;const M=Dn({...t,...y}),H=Yn(y),A=Xn(d,H,M),x=$d(d,A,{...t,...y});return Object.keys(x).length===0?y:{...y,...x}};if(typeof s=="number"&&s!==i){const y={...e,...Cd(s,a),...Sd()};if(u)for(const M of rn)typeof t[M]=="number"&&(y[M]=t[M]);else Object.assign(y,wd());return y}const h=Go(e),f=Go(t);if(!Ld(h,f))return L({...e,...Ed(h,f,t,d)});if(a<c&&typeof d=="number"&&!u){const y=Dn({...t,...e});return L({...e,...Td(d,a,y)})}if(u){const y=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(a-o)/2);return y>M?{...e,textPaddingLR:M}:e}const m=Dn({...t,...e}),g=Xn(d,c,Dn(t)),v=Xn(d,a,m).some((y,M)=>y<(g[M]??y)),C=nt.some(y=>{const M=e[y],H=t[y];return typeof M=="number"&&typeof H=="number"&&M!==H});return v||C?L(e):e}function _d(e,t,n,r){const o=t.slice(0,e).reduce((i,a)=>i+a,0),s=n.slice(e+1,t.length-1).reduce((i,a)=>i+a,0);return Math.max($n,r-o-s-$n)}function Ad(e,t){return Math.random()*(t-e)+e}function Rd(e){return Object.fromEntries(nt.map(t=>[t,typeof e[t]=="number"?e[t]:Oi[t]]))}function Er(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function Wd(e,t,n,r,o,s){return e.slice(0,t).map((i,a)=>{const c=tn[a],u=nn[a],d=rn[a];return{key:i,textPrefix:md[i],widthKey:nt[a],width:n[nt[a]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:d,paddingLeft:r[c],paddingRight:o[u],paddingBottom:s[d]}})}function Id({settings:e,content:t,isEditor:n,isPreviewMode:r,activeEvent:o,layoutId:s,onUpdateSettings:i}){const{prefix:a}=w.useScopedStyles(),c=!!(n&&!r),{columns:u,type:d,wrapperWidth:L,entriesCount:h,cellMinHeight:f,dividerWidth:m,showVisibility:g,cut:$,showCut:v,cutCellMinHeight:C,cutLabel:y,imageSize:M,imageOnHover:H,entryHoverEffect:A,rowPaddingTop:x,rowPaddingBottom:_,rowPaddingTopB:T,columnsOrder:R,textPaddingLR:k,textColor:V,backgroundColor:O,dividerColor:G,textHoverColor:Y,backgroundHoverColor:b,dividerHoverColor:B}=e,[I,F]=p.useState(void 0),[P,N]=p.useState(null),J=H==="On"&&(!n||r),oe=($??0)>0,K=d==="B",le=p.useRef(null),D=p.useRef(null),[ie,ve]=p.useState(null),[pe,Ce]=p.useState(wn),W=Bi(pe),Q=Math.max(0,((L??0)-W)/2),E=Math.min(k??0,Q),S=Math.max(E,Gt),q=((L??0)+W)/2;p.useLayoutEffect(()=>{if(!n){Ce(wn);return}const se=()=>{Ce(xd(le.current))};se();const me=le.current;if(!me)return;const ge=new ResizeObserver(se);ge.observe(me);let Re=me;for(;Re&&!Re.style.getPropertyValue("--cntrl-article-width");)Re=Re.parentElement;return Re&&ge.observe(Re),()=>ge.disconnect()},[n,s]),p.useEffect(()=>{F(void 0)},[$,v,t,h]);const U=w.buildColorVars(a,{textColor:V,backgroundColor:O,dividerColor:G,textHoverColor:Y,backgroundHoverColor:b,dividerHoverColor:B},yd,vd),X=o&&o!=="default"?`${a}-state-${o}`:"",re=`${A==="Default"?`${a}-entry-hover-default`:A==="Blinds"?`${a}-entry-hover-blinds`:""} ${X}`.trim(),ne=(g==null?void 0:g[0])??!1,ce=(g==null?void 0:g[1])??!1,Se=p.useRef(e),de=p.useRef(s);p.useEffect(()=>{if(!i||!n){Se.current=e,de.current=s;return}if(de.current!==s){Se.current=e,de.current=s;return}const se=Se.current;if(!(se!==e))return;const ge=Pd(e,se,{designWidth:pe});Se.current=e,ge!==e&&i(ge)},[e,i,n,s,pe]);const j=p.useMemo(()=>Rd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ue=p.useMemo(()=>Er(e,tn),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),z=p.useMemo(()=>Er(e,nn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),te=p.useMemo(()=>Er(e,rn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),be=p.useMemo(()=>Array.isArray(R)&&R.length>0?R:[...Rt],[R]),ye=p.useMemo(()=>Wd(be,u,j,ue,z,te),[be,u,j,ue,z,te]),Me=Yn(e),He=p.useMemo(()=>nt.slice(0,u).map(se=>j[se]),[u,j]),we=p.useMemo(()=>co(u,Me,j),[u,Me,j]),Ae=p.useMemo(()=>Xn(u,Me,j),[u,Me,j]),Oe=p.useMemo(()=>ye.map((se,me)=>Vi(Ae[me]??0,se.paddingLeft,se.paddingRight)),[ye,Ae]),Ee=p.useMemo(()=>{const se=h===0?1/0:h;return(t??[]).slice(0,se).map((ge,Re)=>({id:Re,cells:Object.fromEntries(Rt.map(Ue=>[Ue,ge[Ue]??""])),image:ge.image,link:ge.link}))},[t,h]),Ve=oe?I??$:Ee.length,ct=p.useMemo(()=>oe?Ee.slice(0,Ve):Ee,[Ee,oe,Ve]),qe=oe&&Ve<Ee.length,cn=ct.length>1||qe,ot=[ne?`${a}-divider-top`:"",ce||cn?`${a}-divider-bottom`:""].filter(Boolean).join(" "),$t=()=>{const se=I??$;if(!v){F(Ee.length);return}F(Math.min(se+v,Ee.length))},xe=se=>w.scalingValue(se,n??!1),Je=K?T??0:x??0,Xe=_??0,dt=f??0,In=(Je+dt+Xe)/2,dn=Math.max(Xe,Lr),Ft=ie!=null?`${ie/2}px`:xe(In),Pe=K?"rowPaddingTopB":"rowPaddingTop",De=ye[0],fe=ye[ye.length-1],Ie=Oe[0],Fe=Oe[Oe.length-1],Ne=De&&Ie?Math.max(Ie.paddingLeft,Gt):0,it=fe&&Fe?Math.max(Fe.paddingRight,Gt):0,fr=Me,uo=se=>{const me=le.current;if(!me)return{x:0,y:0};const ge=me.getBoundingClientRect();return{x:se.clientX-ge.left+Vo,y:se.clientY-ge.top+Vo}},ji=(se,me)=>{if(!J)return;const ge=se.image;if(!(ge!=null&&ge.url)){N(null);return}const{x:Re,y:Ue}=uo(me),Qe=(M==null?void 0:M.min)??80,$e=(M==null?void 0:M.max)??320,je=(P==null?void 0:P.rowId)===se.id?P.widthPx:Ad(Qe,$e);N({rowId:se.id,url:ge.url,objectFit:ge.objectFit??"cover",widthPx:je,x:Re,y:Ue})},zi=se=>{if(!J||!P)return;const{x:me,y:ge}=uo(se);N(Re=>!Re||Re.x===me&&Re.y===ge?Re:{...Re,x:me,y:ge})},Ki=()=>{N(null)},qi=()=>{J&&N(null)};p.useLayoutEffect(()=>{if(!c||K){ve(null);return}const se=D.current;if(!se){ve(null);return}const me=()=>{ve(se.getBoundingClientRect().height)};me();const ge=new ResizeObserver(me);return ge.observe(se),()=>ge.disconnect()},[c,K,ct,Je,Xe,dt,t,e,ye,Ae,pe]);const po=p.useMemo(()=>!K&&ao.some(se=>{const me=se.charAt(0),ge=e[`${se}VerticalAlign`];return Ni(ge,e,me)}),[K,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return p.useLayoutEffect(()=>{var Qe;const se=le.current;if(!se)return;const me=()=>{se.querySelectorAll("[data-list-col]").forEach($e=>{$e.style.transform="";const je=$e.querySelector(`.${a}-list-col`);je&&(je.style.minHeight="",je.style.height="");const ut=$e.querySelector(`.${a}-list-col-title`);ut&&(ut.style.transform="")})};if(K||!po){me();return}const ge=()=>{se.querySelectorAll("[data-list-row]").forEach($e=>{const je=Array.from($e.querySelectorAll("[data-list-col]"));je.forEach(_e=>{_e.style.transform="";const Ze=_e.querySelector(`.${a}-list-col`);Ze&&(Ze.style.minHeight="",Ze.style.height="");const ze=_e.querySelector(`.${a}-list-col-title`);ze&&(ze.style.transform="")}),ud($e,je,`${a}-list-col`),$e.offsetHeight;const ut=$e.getBoundingClientRect().top,Tt=`${a}-baseline-probe`,zt=new Map,kn=je.map(_e=>{const Ze=_e.querySelector(`.${a}-list-col-title`),ze={el:_e,titleEl:Ze,letter:_e.getAttribute("data-col-letter")??"",kind:_e.getAttribute("data-valign")??"top",anchor:_e.getAttribute("data-valign-anchor")};return zt.set(ze.letter,ze),ze}),un=new Map,Fn=(_e,Ze)=>{const ze=un.get(_e.letter);if(ze!==void 0)return ze;const Mn=_e.anchor?zt.get(_e.anchor):void 0;if(_e.kind!=="baseline"||!Mn||Ze.has(_e.letter)){const go=Tr(_e,ut,`${a}-list-col`,Tt);return un.set(_e.letter,go),go}Ze.add(_e.letter);const Ui=Fn(Mn,Ze);Ze.delete(_e.letter);const Gi=Tr(_e,ut,`${a}-list-col`,Tt),Yi=Ui-Gi;pd(_e.titleEl,Yi);const mo=Tr(_e,ut,`${a}-list-col`,Tt);return un.set(_e.letter,mo),mo};kn.forEach(_e=>Fn(_e,new Set))})};ge();const Re=new ResizeObserver(()=>ge());Re.observe(se);let Ue=!1;return typeof document<"u"&&((Qe=document.fonts)!=null&&Qe.ready)&&document.fonts.ready.then(()=>{Ue||ge()}),()=>{Ue=!0,Re.disconnect(),me()}},[po,K,e,t,pe,ct,Ae]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:td(a)}}),l.jsx("div",{style:U,children:l.jsxs("div",{ref:le,className:`${a}-wrapper ${re}${ot?` ${ot}`:""}${K?` ${a}-type-b`:""}`.trim(),style:{width:w.scalingValue(L??0,n),...!K&&c?{[`--${a}-first-entry-handle-top`]:Ft}:{}},onMouseMove:J?zi:void 0,onMouseLeave:J?Ki:void 0,children:[l.jsxs("div",{style:{width:"100%"},children:[ct.map((se,me)=>{var Qe;const ge=(((Qe=se.link)==null?void 0:Qe.length)??0)>0,Re=ge?"a":"div",Ue=Qc(me,ct.length,ne,ce,qe,m??0,n??!1);return l.jsxs(Re,{ref:me===0?$e=>{D.current=$e}:void 0,className:`${a}-list-item${ge?` ${a}-list-item-has-link`:""}`,...ge?{href:se.link,target:"_blank"}:{},style:Ue,onMouseEnter:J?$e=>ji(se,$e):void 0,children:[Je>0&&l.jsx("div",{className:`${a}-row-padding-handle`,style:{height:xe(Je)}}),l.jsxs("div",{className:`${a}-list-cols-row${K?"":` ${a}-list-cols-row-h`}${c&&me===0&&K?` ${a}-list-cols-row-controls`:""}`,...K?{}:{"data-list-row":""},style:K?void 0:{minHeight:xe(dt)},children:[ye.map(($e,je)=>{const ut=je===ye.length-1,Tt=Oe[je],zt=$e.paddingBottom,kn=Jc(se.cells[$e.key]),un=K&&kn&&zt>0,Fn=K?{minHeight:xe(dt)}:{width:xe(Ae[je])},_e=K?{paddingLeft:xe(E),paddingRight:xe(E)}:{paddingLeft:xe(Tt.paddingLeft),paddingRight:xe(Tt.paddingRight)},Ze=$e.textPrefix.charAt(0),ze=K?id(e[`${$e.textPrefix}VerticalAlign`]):od(e[`${$e.textPrefix}VerticalAlign`],e,Ze),Mn=K&&kn&&c&&me===0;return l.jsxs("div",{className:K?`${a}-list-col-wrap`:void 0,...K?{}:{"data-list-col":"","data-col-letter":Ze,"data-valign":ze.kind,...ze.kind==="baseline"?{"data-valign-anchor":ze.anchorLetter}:{}},children:[l.jsx("div",{className:`${a}-list-col${ut?` ${a}-list-col-last`:""}`,style:{..._e,...Fn,...K?{justifyContent:Do(ze.kind)}:{}},"data-test":$e.width,children:l.jsx("span",{className:zo(e,$e.textPrefix,`${a}-list-col-title`,`${a}-text-tight-leading`),style:{...jo(nr(e,$e.textPrefix),n),...Ko(e,$e.textPrefix,a,n),...K?{}:sd(ze.kind)},children:se.cells[$e.key]??null})}),un&&l.jsx("div",{className:`${a}-row-padding-handle`,style:{height:xe(zt)}}),Mn&&l.jsx(ft,{P:a,"data-controls":$e.paddingBottomKey,"data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:xe(Math.max(zt,Lr))}})]},$e.key)}),c&&me===0&&K&&l.jsxs(l.Fragment,{children:[l.jsx(ft,{P:a,"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(q),className:`${a}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:xe(S),height:"100%"}}),l.jsx(ft,{P:a,"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(q),className:`${a}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:xe(Math.max(S,Me-S)),width:xe(S),height:"100%"}})]})]}),!K&&Xe>0&&l.jsx("div",{className:`${a}-row-padding-handle`,style:{height:xe(Xe)}}),c&&me===0&&!K&&l.jsx(ft,{P:a,"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:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:xe(dn)}})]},se.id)}),qe&&(()=>{const se=nr(e,Ct),me=ld(e.cutLabelVerticalAlign),ge=se.textTextAlign==="justify"||K;return l.jsx("button",{type:"button",className:`${a}-cut-item`,style:{minHeight:xe(C??0),...ed(ce,m??0,n??!1)},onClick:$t,onMouseEnter:J?qi:void 0,children:l.jsx("div",{className:`${a}-list-cols-row`,style:{...K?{paddingLeft:xe(E),paddingRight:xe(E)}:{},justifyContent:cd(se.textTextAlign),alignItems:Do(me)},children:l.jsx("span",{className:zo(e,Ct,`${a}-cut-label`,`${a}-text-tight-leading`),style:{...jo(se,n),...Ko(e,Ct,a,n),...ge?{width:"100%"}:{}},children:y})})})})()]}),c&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(ft,{P:a,"data-controls":Pe,"data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:xe(Math.max(Je,Lr))}})},"row-padding-handles"),c&&!K&&De&&fe&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(ft,{P:a,"data-controls":De.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[0]-((Ie==null?void 0:Ie.paddingRight)??0)),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:xe(Ne),height:"100%"}}),l.jsx(ft,{P:a,"data-controls":fe.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(Ae[ye.length-1]-((Fe==null?void 0:Fe.paddingLeft)??0)),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:xe(fr-it),width:xe(it),height:"100%"}})]},"column-edge-padding-handles"),c&&!K&&ye.slice(0,-1).map((se,me)=>{const ge=ye[me+1],Re=we.slice(0,me+1).reduce((ut,Tt)=>ut+Tt,0),Ue=Oe[me],Qe=Oe[me+1],$e=Math.max(Ue.paddingRight,Gt),je=Math.max(Qe.paddingLeft,Gt);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(ft,{P:a,"data-controls":se.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(Ae[me]-Ue.paddingLeft),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:xe(Re-$e),width:xe($e),height:"100%"}}),l.jsx(ft,{P:a,"data-controls":ge.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[me+1]-Qe.paddingRight),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:xe(Re),width:xe(je),height:"100%"}})]},`${se.paddingRightKey}-padding`)}),c&&!K&&ye.slice(0,-1).map((se,me)=>{const ge=_d(me,we,He,Me),Ue=we.slice(0,me+1).reduce((Qe,$e)=>Qe+$e,0)-qo/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":se.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(lo),"data-controls-max-fraction":String(ge),"data-controls-variant":"column-width",className:`${a}-col-resize-handle`,style:{position:"absolute",top:"0px",left:xe(Ue),width:xe(qo),height:"calc(100%)",pointerEvents:"auto"}})},`${se.widthKey}-junction`)}),J&&P&&l.jsx("img",{className:`${a}-hover-image`,src:P.url,alt:"",style:{width:Gn(P.widthPx),objectFit:P.objectFit,left:P.x,top:P.y}})]})})]})}const kd=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
4750
4750
  import { CommonComponentProps } from '../props';
4751
4751
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
4752
4752
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -7462,4 +7462,4 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
7462
7462
  </>
7463
7463
  );
7464
7464
  }
7465
- `,sn=["A","B","C","D","E"],Yo=[...Hr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Nt={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",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Fd(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Dn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Md(){return Object.fromEntries(sn.map((e,t)=>{const n=Rt[t],r=`${e} column`;return[n,Fd(r)]}))}function Hd(){const e={};for(const t of sn)e[`${t}ColumnWidth`]=Dn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Dn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Dn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Dn(`${t} column padding bottom`);return e}function Xo(e={}){const t={columns:5,wrapperWidth:1,columnsOrder:[...Rt]};for(const n of sn)t[`${n}ColumnWidth`]=.2,t[`${n}ColumnPaddingLeft`]=0,t[`${n}ColumnPaddingRight`]=0,t[`${n}ColumnPaddingBottom`]=0;return{...t,...e}}function Nd(e){const t={};if(e===Ct)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Hr],useTabDesign:!0},enum:[...Hr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Yo],filterBaselineByTopAnchor:!0,columnLetter:n,useTabDesign:!0},enum:[...Yo]}}return t[Le(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Le(e,"textFontSettings")]={...Nt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Le(e,"textFontSize")]={...Nt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Le(e,"textLineHeight")]={...Nt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Le(e,"textLetterSpacing")]={...Nt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Le(e,"textWordSpacing")]={...Nt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Le(e,"textTextAlign")]={...Nt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Le(e,"textTextAppearance")]={...Nt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bd=gr.reduce((e,t)=>({...e,...Nd(t)}),{}),Od=gr.reduce((e,t)=>({...e,[`${t}VerticalAlign`]:t===Ct?"Center":"Top",[Le(t,"textFontFamily")]:"Arial",[Le(t,"textFontSettings")]:{fontWeight:400,fontStyle:"normal"},[Le(t,"textLetterSpacing")]:0,[Le(t,"textWordSpacing")]:0,[Le(t,"textTextAlign")]:t===Ct?"center":"left",[Le(t,"textTextAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Zo(e){const{textFontSize:t,textLineHeight:n,textTextAlign:r}=e;return gr.reduce((o,s)=>(t!==void 0&&(o[`${s}TextFontSize`]=t),n!==void 0&&(o[`${s}TextLineHeight`]=n),r!==void 0&&(o[Le(s,"textTextAlign")]=r),o),{})}const Vd=fd();function Di(e){return[Le(e,"textFontFamily"),Le(e,"textFontSettings"),Le(e,"textFontSize"),Le(e,"textLineHeight"),Le(e,"textLetterSpacing"),Le(e,"textWordSpacing"),Le(e,"textTextAlign"),Le(e,"textTextAppearance"),`${e}VerticalAlign`]}function Dd(){const e=[];return ao.forEach((t,n)=>{const r=Rt[n],o=Di(t);for(let s=1;s<Rt.length;s+=1){const i=[{name:"columns",value:s},...Array.from({length:s},(a,c)=>({name:`columnsOrder.${c}`,value:r,isNotEqual:!0}))];o.forEach(a=>{e.push({if:i,then:{name:`properties.${a}.display.visible`,value:!1}})})}}),e}const jd=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],zd=["cutLabel","cutCellMinHeight","showCut"],Kd=Di(Ct),qd=[...zd,...Kd],Ud=[...sn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"];function Er(e,t){const n=e?` ${e}`:"";return{AColumn:`AColumn${n}`,BColumnWidth:`BColumnWidth${n}`,CColumnWidth:`CColumnWidth${n}`,DColumnWidth:`DColumnWidth${n}`,EColumnWidth:`EColumnWidth${n}`,image:t,link:""}}const Gd=[Er("",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"}),Er("2",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"}),Er("3",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"})],Yd=[...sn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Xd={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:{...Md(),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:Gd},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:"Entry Hover Effect",display:{type:"toggle-cycle",enum:["None","Default","Blinds"]}},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"}},...Hd(),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"}},...Bd,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:"Off",entryHoverEffect:"None",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#767676",textHoverColor:"#767676",...Od,backgroundColor:"#FFFFFF00",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF00",dividerHoverColor:"#767676"},layoutDefaults:{m:Xo({type:"B",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.002,cut:0,showCut:0,cutCellMinHeight:.043,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...Zo({textFontSize:.043,textLineHeight:.043,textTextAlign:"center"})}),d:Xo({type:"A",textPaddingLR:.01,entriesCount:0,cellMinHeight:.03,imageSize:{min:80,max:320},dividerWidth:6e-4,cut:0,showCut:0,cutCellMinHeight:.03,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...Zo({textFontSize:.01,textLineHeight:.01})})},displayRules:[...Dd(),...qd.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}},...Ud.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}},...sn.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","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Yd]},panels:[{id:"general",icon:"cursor",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:"",items:["entryHoverEffect"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]},{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Vd]}],paletteBookmark:{items:[...jd],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Zd={element:Wd,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:Xd,sourceCode:kd},Jd=[il,pl,ec,cc,bc,Ac,Fc,Vc,Zc,Zd];exports.components=Jd;exports.isSchemaV1=Xi;
7465
+ `,ln=["A","B","C","D","E"],Yo=[...Hr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Nt={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",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Fd(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function jn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Md(){return Object.fromEntries(ln.map((e,t)=>{const n=Rt[t],r=`${e} column`;return[n,Fd(r)]}))}function Hd(){const e={};for(const t of ln)e[`${t}ColumnWidth`]=jn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=jn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=jn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=jn(`${t} column padding bottom`);return e}function Xo(e={}){const t={columns:5,wrapperWidth:1,columnsOrder:[...Rt]};for(const n of ln)t[`${n}ColumnWidth`]=.2,t[`${n}ColumnPaddingLeft`]=0,t[`${n}ColumnPaddingRight`]=0,t[`${n}ColumnPaddingBottom`]=0;return{...t,...e}}function Nd(e){const t={};if(e===Ct)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Hr],useTabDesign:!0},enum:[...Hr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Yo],filterBaselineByTopAnchor:!0,columnLetter:n,useTabDesign:!0},enum:[...Yo]}}return t[Le(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Le(e,"textFontSettings")]={...Nt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Le(e,"textFontSize")]={...Nt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Le(e,"textLineHeight")]={...Nt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Le(e,"textLetterSpacing")]={...Nt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Le(e,"textWordSpacing")]={...Nt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Le(e,"textTextAlign")]={...Nt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Le(e,"textTextAppearance")]={...Nt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bd=hr.reduce((e,t)=>({...e,...Nd(t)}),{}),Od=hr.reduce((e,t)=>({...e,[`${t}VerticalAlign`]:t===Ct?"Center":"Top",[Le(t,"textFontFamily")]:"Arial",[Le(t,"textFontSettings")]:{fontWeight:400,fontStyle:"normal"},[Le(t,"textLetterSpacing")]:0,[Le(t,"textWordSpacing")]:0,[Le(t,"textTextAlign")]:t===Ct?"center":"left",[Le(t,"textTextAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Zo(e){const{textFontSize:t,textLineHeight:n,textTextAlign:r}=e;return hr.reduce((o,s)=>(t!==void 0&&(o[`${s}TextFontSize`]=t),n!==void 0&&(o[`${s}TextLineHeight`]=n),r!==void 0&&(o[Le(s,"textTextAlign")]=r),o),{})}const Vd=fd();function Di(e){return[Le(e,"textFontFamily"),Le(e,"textFontSettings"),Le(e,"textFontSize"),Le(e,"textLineHeight"),Le(e,"textLetterSpacing"),Le(e,"textWordSpacing"),Le(e,"textTextAlign"),Le(e,"textTextAppearance"),`${e}VerticalAlign`]}function Dd(){const e=[];return ao.forEach((t,n)=>{const r=Rt[n],o=Di(t);for(let s=1;s<Rt.length;s+=1){const i=[{name:"columns",value:s},...Array.from({length:s},(a,c)=>({name:`columnsOrder.${c}`,value:r,isNotEqual:!0}))];o.forEach(a=>{e.push({if:i,then:{name:`properties.${a}.display.visible`,value:!1}})})}}),e}const jd=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],zd=["cutLabel","cutCellMinHeight","showCut"],Kd=Di(Ct),qd=[...zd,...Kd],Ud=[...ln.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Bt=[{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDBHFMF0NKJMYCGGRA.jpeg",name:"List-1.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD194E6Z49QD9GG03N.jpeg",name:"List-2.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDNZRY59Q8JJVYY92K.jpeg",name:"List-3.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDRXD5QWHB5YF8H3XM.jpeg",name:"List-4.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD3C6H5Q9QX0SX8PSP.jpeg",name:"List-5.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDM6VHTFVXVD58V0D6.jpeg",name:"List-6.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD3QT4RPG3VMM2NK5K.jpeg",name:"List-7.png"}],Gd=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Bt[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Bt[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper Constellations",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Bt[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Bt[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Bt[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Bt[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Bt[6],link:""}],Yd=[...ln.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Xd={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:{...Md(),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:Gd},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:"Entry Hover Effect",display:{type:"toggle-cycle",enum:["None","Default","Blinds"]}},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"}},...Hd(),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"}},...Bd,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:"Off",entryHoverEffect:"None",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#767676",textHoverColor:"#767676",...Od,backgroundColor:"#FFFFFF00",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF00",dividerHoverColor:"#767676"},layoutDefaults:{m:Xo({type:"B",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.002,cut:0,showCut:0,cutCellMinHeight:.043,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...Zo({textFontSize:.043,textLineHeight:.043,textTextAlign:"center"})}),d:Xo({type:"A",textPaddingLR:.01,entriesCount:0,cellMinHeight:.03,imageSize:{min:80,max:320},dividerWidth:6e-4,cut:0,showCut:0,cutCellMinHeight:.03,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...Zo({textFontSize:.01,textLineHeight:.01})})},displayRules:[...Dd(),...qd.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}},...Ud.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}},...ln.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","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Yd]},panels:[{id:"general",icon:"cursor",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:"",items:["entryHoverEffect"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]},{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Vd]}],paletteBookmark:{items:[...jd],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Zd={element:Id,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:Xd,sourceCode:kd},Jd=[il,pl,ec,cc,bc,Ac,Fc,Vc,Zc,Zd];exports.components=Jd;exports.isSchemaV1=Xi;