@cntrl-site/components 1.0.35 → 1.0.36

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 +60 -59
  2. package/dist/index.mjs +2028 -2027
  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 r=require("react/jsx-runtime"),l=require("react"),je=require("classnames"),_=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),zi=require("react-dom");function vl(e){return e.type==="object"&&e.version===1}const xl="ControlSlider-module__wrapper___sHEkd",bl="ControlSlider-module__hoverArrow___A-dOH",wl="ControlSlider-module__sliderItem___QQSkR",$l="ControlSlider-module__sliderImage___9hRl-",Sl="ControlSlider-module__arrow___05ghY",Cl="ControlSlider-module__arrowVertical___tBfVN",Tl="ControlSlider-module__nextArrow___-30Yc",Ll="ControlSlider-module__arrowInner___aEra3",Il="ControlSlider-module__arrowIcon___S4ztF",El="ControlSlider-module__arrowImg___2dwJW",Pl="ControlSlider-module__mirror___brd6U",Rl="ControlSlider-module__pagination___bicLF",Ml="ControlSlider-module__paginationInner___bT-P-",kl="ControlSlider-module__paginationVertical___zYqKw",Al="ControlSlider-module__paginationItem___nTRbk",_l="ControlSlider-module__dot___p1Qun",Fl="ControlSlider-module__activeDot___LHFaj",Wl="ControlSlider-module__paginationInsideBottom___R3FWn",Nl="ControlSlider-module__paginationInsideTop___V-qb-",Hl="ControlSlider-module__paginationOutsideBottom___14w8D",Ol="ControlSlider-module__paginationOutsideTop___SCLqB",Bl="ControlSlider-module__paginationInsideLeft___yOBRZ",zl="ControlSlider-module__paginationInsideRight___Rtt3o",jl="ControlSlider-module__paginationOutsideLeft___lahaw",Dl="ControlSlider-module__paginationOutsideRight___EtuQa",Vl="ControlSlider-module__imgWrapper___UjEgB",ql="ControlSlider-module__captionBlock___dJ6-j",Kl="ControlSlider-module__captionTextWrapper___HFlpf",Gl="ControlSlider-module__captionText___uGBVc",Ul="ControlSlider-module__active___WZK4G",Xl="ControlSlider-module__withPointerEvents___t-18M",Yl="ControlSlider-module__topLeftAlignment___zjnGM",Jl="ControlSlider-module__topCenterAlignment___gD1xW",Zl="ControlSlider-module__topRightAlignment___NMapS",Ql="ControlSlider-module__middleLeftAlignment___OnUrY",ec="ControlSlider-module__middleCenterAlignment___Tdkl0",tc="ControlSlider-module__middleRightAlignment___wEbfX",nc="ControlSlider-module__bottomLeftAlignment___cTP2-",ic="ControlSlider-module__bottomCenterAlignment___c54fB",oc="ControlSlider-module__bottomRightAlignment___kEwrz",rc="ControlSlider-module__clickOverlay___DZA28",ac="ControlSlider-module__contain___pLyq7",sc="ControlSlider-module__cover___KdDat",Pe={wrapper:xl,hoverArrow:bl,sliderItem:wl,sliderImage:$l,arrow:Sl,arrowVertical:Cl,nextArrow:Tl,arrowInner:Ll,arrowIcon:Il,arrowImg:El,mirror:Pl,pagination:Rl,paginationInner:Ml,paginationVertical:kl,paginationItem:Al,dot:_l,activeDot:Fl,paginationInsideBottom:Wl,paginationInsideTop:Nl,paginationOutsideBottom:Hl,paginationOutsideTop:Ol,paginationInsideLeft:Bl,paginationInsideRight:zl,paginationOutsideLeft:jl,paginationOutsideRight:Dl,imgWrapper:Vl,captionBlock:ql,captionTextWrapper:Kl,captionText:Gl,active:Ul,withPointerEvents:Xl,topLeftAlignment:Yl,topCenterAlignment:Jl,topRightAlignment:Zl,middleLeftAlignment:Ql,middleCenterAlignment:ec,middleRightAlignment:tc,bottomLeftAlignment:nc,bottomCenterAlignment:ic,bottomRightAlignment:oc,clickOverlay:rc,contain:ac,cover:sc};function lc(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function cc(e,t,n){return t&&lc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var la="(prefers-reduced-motion: reduce)",ri=1,dc=2,li=3,vi=4,ji=5,xo=6,Io=7,uc={CREATED:ri,MOUNTED:dc,IDLE:li,MOVING:vi,SCROLLING:ji,DRAGGING:xo,DESTROYED:Io};function xn(e){e.length=0}function kn(e,t,n){return Array.prototype.slice.call(e,t,n)}function mt(e){return e.bind.apply(e,[null].concat(kn(arguments,1)))}var fs=setTimeout,xr=function(){};function ca(e){return requestAnimationFrame(e)}function Fo(e,t){return typeof t===e}function Ri(e){return!Ar(e)&&Fo("object",e)}var kr=Array.isArray,ys=mt(Fo,"function"),Pn=mt(Fo,"string"),Di=mt(Fo,"undefined");function Ar(e){return e===null}function vs(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Vi(e){return kr(e)?e:[e]}function Gt(e,t){Vi(e).forEach(t)}function _r(e,t){return e.indexOf(t)>-1}function bo(e,t){return e.push.apply(e,Vi(t)),e}function gn(e,t,n){e&&Gt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function on(e,t){gn(e,Pn(t)?t.split(" "):t,!0)}function qi(e,t){Gt(t,e.appendChild.bind(e))}function Fr(e,t){Gt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Mi(e,t){return vs(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function xs(e,t){var n=e?kn(e.children):[];return t?n.filter(function(i){return Mi(i,t)}):n}function Ki(e,t){return t?xs(e,t)[0]:e.firstElementChild}var ki=Object.keys;function qn(e,t,n){return e&&(n?ki(e).reverse():ki(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Ai(e){return kn(arguments,1).forEach(function(t){qn(t,function(n,i){e[i]=t[i]})}),e}function En(e){return kn(arguments,1).forEach(function(t){qn(t,function(n,i){kr(n)?e[i]=n.slice():Ri(n)?e[i]=En({},Ri(e[i])?e[i]:{},n):e[i]=n})}),e}function da(e,t){Gt(t||ki(e),function(n){delete e[n]})}function rn(e,t){Gt(e,function(n){Gt(t,function(i){n&&n.removeAttribute(i)})})}function Oe(e,t,n){Ri(t)?qn(t,function(i,o){Oe(e,o,i)}):Gt(e,function(i){Ar(n)||n===""?rn(i,t):i.setAttribute(t,String(n))})}function ai(e,t,n){var i=document.createElement(e);return t&&(Pn(t)?on(i,t):Oe(i,t)),n&&qi(n,i),i}function Jt(e,t,n){if(Di(n))return getComputedStyle(e)[t];Ar(n)||(e.style[t]=""+n)}function _i(e,t){Jt(e,"display",t)}function bs(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Zt(e,t){return e.getAttribute(t)}function ua(e,t){return e&&e.classList.contains(t)}function Dt(e){return e.getBoundingClientRect()}function Kn(e){Gt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ws(e){return Ki(new DOMParser().parseFromString(e,"text/html").body)}function mn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function $s(e,t){return e&&e.querySelector(t)}function Wr(e,t){return t?kn(e.querySelectorAll(t)):[]}function hn(e,t){gn(e,t,!1)}function br(e){return e.timeStamp}function Hn(e){return Pn(e)?e:e?e+"px":""}var Gi="splide",Nr="data-"+Gi;function Ti(e,t){if(!e)throw new Error("["+Gi+"] "+(t||""))}var Rn=Math.min,Eo=Math.max,Po=Math.floor,Fi=Math.ceil,zt=Math.abs;function Ss(e,t,n){return zt(e-t)<n}function wo(e,t,n,i){var o=Rn(t,n),s=Eo(t,n);return i?o<e&&e<s:o<=e&&e<=s}function ni(e,t,n){var i=Rn(t,n),o=Eo(t,n);return Rn(Eo(i,e),o)}function wr(e){return+(e>0)-+(e<0)}function $r(e,t){return Gt(t,function(n){e=e.replace("%s",""+n)}),e}function Hr(e){return e<10?"0"+e:""+e}var pa={};function pc(e){return""+e+Hr(pa[e]=(pa[e]||0)+1)}function Cs(){var e=[];function t(a,d,c,m){o(a,d,function(p,x,$){var w="addEventListener"in p,g=w?p.removeEventListener.bind(p,x,c,m):p.removeListener.bind(p,c);w?p.addEventListener(x,c,m):p.addListener(c),e.push([p,x,$,c,g])})}function n(a,d,c){o(a,d,function(m,p,x){e=e.filter(function($){return $[0]===m&&$[1]===p&&$[2]===x&&(!c||$[3]===c)?($[4](),!1):!0})})}function i(a,d,c){var m,p=!0;return typeof CustomEvent=="function"?m=new CustomEvent(d,{bubbles:p,detail:c}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(d,p,!1,c)),a.dispatchEvent(m),m}function o(a,d,c){Gt(a,function(m){m&&Gt(d,function(p){p.split(" ").forEach(function(x){var $=x.split(".");c(m,$[0],$[1])})})})}function s(){e.forEach(function(a){a[4]()}),xn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var An="mounted",Sr="ready",bn="move",xi="moved",Or="click",Ts="active",Ls="inactive",Is="visible",Es="hidden",Tt="refresh",Nt="updated",ci="resize",Wo="resized",Ps="drag",Rs="dragging",Ms="dragged",No="scroll",Un="scrolled",mc="overflow",Br="destroy",ks="arrows:mounted",As="arrows:updated",_s="pagination:mounted",Fs="pagination:updated",zr="navigation:mounted",jr="autoplay:play",Ws="autoplay:playing",Dr="autoplay:pause",Vr="lazyload:loaded",Ns="sk",Hs="sh",Ro="ei";function xt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Cs();function i(s,a){n.bind(t,Vi(s).join(" "),function(d){a.apply(a,kr(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,kn(arguments,1))}return e&&e.event.on(Br,n.destroy),Ai(n,{bus:t,on:i,off:mt(n.unbind,t),emit:o})}function Ho(e,t,n,i){var o=Date.now,s,a=0,d,c=!0,m=0;function p(){if(!c){if(a=e?Rn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++m>=i))return $();d=ca(p)}}function x(b){b||g(),s=o()-(b?a*e:0),c=!1,d=ca(p)}function $(){c=!0}function w(){s=o(),a=0,n&&n(a)}function g(){d&&cancelAnimationFrame(d),a=0,d=0,c=!0}function y(b){e=b}function C(){return c}return{start:x,rewind:w,pause:$,cancel:g,set:y,isPaused:C}}function gc(e){var t=e;function n(o){t=o}function i(o){return _r(Vi(o),t)}return{set:n,is:i}}function hc(e,t){var n=Ho(0,e,null,1);return function(){n.isPaused()&&n.start()}}function fc(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=Cs(),d=[];function c(){var g=n.mediaQuery==="min";ki(o).sort(function(y,C){return g?+y-+C:+C-+y}).forEach(function(y){p(o[y],"("+(g?"min":"max")+"-width:"+y+"px)")}),p(s,la),x()}function m(g){g&&a.destroy()}function p(g,y){var C=matchMedia(y);a.bind(C,"change",x),d.push([g,C])}function x(){var g=i.is(Io),y=n.direction,C=d.reduce(function(b,L){return En(b,L[1].matches?L[0]:{})},{});da(n),w(C),n.destroy?e.destroy(n.destroy==="completely"):g?(m(!0),e.mount()):y!==n.direction&&e.refresh()}function $(g){matchMedia(la).matches&&(g?En(n,s):da(n,ki(s)))}function w(g,y,C){En(n,g),y&&En(Object.getPrototypeOf(n),g),(C||!i.is(ri))&&e.emit(Nt,n)}return{setup:c,destroy:m,reduce:$,set:w}}var Oo="Arrow",Bo=Oo+"Left",zo=Oo+"Right",Os=Oo+"Up",Bs=Oo+"Down",ma="rtl",jo="ttb",nr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Os,zo],ArrowRight:[Bs,Bo]};function yc(e,t,n){function i(s,a,d){d=d||n.direction;var c=d===ma&&!a?1:d===jo?0:-1;return nr[s]&&nr[s][c]||s.replace(/width|left|right/i,function(m,p){var x=nr[m.toLowerCase()][c]||m;return p>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(s){return s*(n.direction===ma?1:-1)}return{resolve:i,orient:o}}var fn="role",si="tabindex",vc="disabled",en="aria-",Ui=en+"controls",zs=en+"current",ga=en+"selected",Vt=en+"label",qr=en+"labelledby",js=en+"hidden",Kr=en+"orientation",Wi=en+"roledescription",ha=en+"live",fa=en+"busy",ya=en+"atomic",Gr=[fn,si,vc,Ui,zs,Vt,qr,js,Kr,Wi],an=Gi+"__",_n="is-",ir=Gi,va=an+"track",xc=an+"list",Do=an+"slide",Ds=Do+"--clone",bc=Do+"__container",Ur=an+"arrows",Vo=an+"arrow",Vs=Vo+"--prev",qs=Vo+"--next",qo=an+"pagination",Ks=qo+"__page",wc=an+"progress",$c=wc+"__bar",Sc=an+"toggle",Cc=an+"spinner",Tc=an+"sr",Lc=_n+"initialized",Gn=_n+"active",Gs=_n+"prev",Us=_n+"next",Cr=_n+"visible",Tr=_n+"loading",Xs=_n+"focus-in",Ys=_n+"overflow",Ic=[Gn,Cr,Gs,Us,Tr,Xs,Ys],Ec={slide:Do,clone:Ds,arrows:Ur,arrow:Vo,prev:Vs,next:qs,pagination:qo,page:Ks,spinner:Cc};function Pc(e,t){if(ys(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Mi(n,t);)n=n.parentElement;return n}var Rc=5,xa=200,Js="touchstart mousedown",or="touchmove mousemove",rr="touchend touchcancel mouseup click";function Mc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=e.root,d=n.i18n,c={},m=[],p=[],x=[],$,w,g;function y(){I(),N(),L()}function C(){o(Tt,b),o(Tt,y),o(Nt,L),s(document,Js+" keydown",function(A){g=A.type==="keydown"},{capture:!0}),s(a,"focusin",function(){gn(a,Xs,!!g)})}function b(A){var T=Gr.concat("style");xn(m),hn(a,p),hn($,x),rn([$,w],T),rn(a,A?T:["style",Wi])}function L(){hn(a,p),hn($,x),p=O(ir),x=O(va),on(a,p),on($,x),Oe(a,Vt,n.label),Oe(a,qr,n.labelledby)}function I(){$=R("."+va),w=Ki($,"."+xc),Ti($&&w,"A track/list element is missing."),bo(m,xs(w,"."+Do+":not(."+Ds+")")),qn({arrows:Ur,pagination:qo,prev:Vs,next:qs,bar:$c,toggle:Sc},function(A,T){c[T]=R("."+A)}),Ai(c,{root:a,track:$,list:w,slides:m})}function N(){var A=a.id||pc(Gi),T=n.role;a.id=A,$.id=$.id||A+"-track",w.id=w.id||A+"-list",!Zt(a,fn)&&a.tagName!=="SECTION"&&T&&Oe(a,fn,T),Oe(a,Wi,d.carousel),Oe(w,fn,"presentation")}function R(A){var T=$s(a,A);return T&&Pc(T,"."+ir)===a?T:void 0}function O(A){return[A+"--"+n.type,A+"--"+n.direction,n.drag&&A+"--draggable",n.isNavigation&&A+"--nav",A===ir&&Gn]}return Ai(c,{setup:y,mount:C,destroy:b})}var di="slide",bi="loop",Xi="fade";function kc(e,t,n,i){var o=xt(e),s=o.on,a=o.emit,d=o.bind,c=e.Components,m=e.root,p=e.options,x=p.isNavigation,$=p.updateOnMove,w=p.i18n,g=p.pagination,y=p.slideFocus,C=c.Direction.resolve,b=Zt(i,"style"),L=Zt(i,Vt),I=n>-1,N=Ki(i,"."+bc),R;function O(){I||(i.id=m.id+"-slide"+Hr(t+1),Oe(i,fn,g?"tabpanel":"group"),Oe(i,Wi,w.slide),Oe(i,Vt,L||$r(w.slideLabel,[t+1,e.length]))),A()}function A(){d(i,"click",mt(a,Or,W)),d(i,"keydown",mt(a,Ns,W)),s([xi,Hs,Un],M),s(zr,J),$&&s(bn,v)}function T(){R=!0,o.destroy(),hn(i,Ic),rn(i,Gr),Oe(i,"style",b),Oe(i,Vt,L||"")}function J(){var k=e.splides.map(function(E){var q=E.splide.Components.Slides.getAt(t);return q?q.slide.id:""}).join(" ");Oe(i,Vt,$r(w.slideX,(I?n:t)+1)),Oe(i,Ui,k),Oe(i,fn,y?"button":""),y&&rn(i,Wi)}function v(){R||M()}function M(){if(!R){var k=e.index;B(),V(),gn(i,Gs,t===k-1),gn(i,Us,t===k+1)}}function B(){var k=ce();k!==ua(i,Gn)&&(gn(i,Gn,k),Oe(i,zs,x&&k||""),a(k?Ts:Ls,W))}function V(){var k=U(),E=!k&&(!ce()||I);if(e.state.is([vi,ji])||Oe(i,js,E||""),Oe(Wr(i,p.focusableNodes||""),si,E?-1:""),y&&Oe(i,si,E?-1:0),k!==ua(i,Cr)&&(gn(i,Cr,k),a(k?Is:Es,W)),!k&&document.activeElement===i){var q=c.Slides.getAt(e.index);q&&bs(q.slide)}}function te(k,E,q){Jt(q&&N||i,k,E)}function ce(){var k=e.index;return k===t||p.cloneStatus&&k===n}function U(){if(e.is(Xi))return ce();var k=Dt(c.Elements.track),E=Dt(i),q=C("left",!0),Z=C("right",!0);return Po(k[q])<=Fi(E[q])&&Po(E[Z])<=Fi(k[Z])}function j(k,E){var q=zt(k-t);return!I&&(p.rewind||e.is(bi))&&(q=Rn(q,e.length-q)),q<=E}var W={index:t,slideIndex:n,slide:i,container:N,isClone:I,mount:O,destroy:T,update:M,style:te,isWithin:j};return W}function Ac(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=i.bind,d=t.Elements,c=d.slides,m=d.list,p=[];function x(){$(),o(Tt,w),o(Tt,$)}function $(){c.forEach(function(M,B){y(M,B,-1)})}function w(){R(function(M){M.destroy()}),xn(p)}function g(){R(function(M){M.update()})}function y(M,B,V){var te=kc(e,B,V,M);te.mount(),p.push(te),p.sort(function(ce,U){return ce.index-U.index})}function C(M){return M?O(function(B){return!B.isClone}):p}function b(M){var B=t.Controller,V=B.toIndex(M),te=B.hasFocus()?1:n.perPage;return O(function(ce){return wo(ce.index,V,V+te-1)})}function L(M){return O(M)[0]}function I(M,B){Gt(M,function(V){if(Pn(V)&&(V=ws(V)),vs(V)){var te=c[B];te?Fr(V,te):qi(m,V),on(V,n.classes.slide),T(V,mt(s,ci))}}),s(Tt)}function N(M){Kn(O(M).map(function(B){return B.slide})),s(Tt)}function R(M,B){C(B).forEach(M)}function O(M){return p.filter(ys(M)?M:function(B){return Pn(M)?Mi(B.slide,M):_r(Vi(M),B.index)})}function A(M,B,V){R(function(te){te.style(M,B,V)})}function T(M,B){var V=Wr(M,"img"),te=V.length;te?V.forEach(function(ce){a(ce,"load error",function(){--te||B()})}):B()}function J(M){return M?c.length:p.length}function v(){return p.length>n.perPage}return{mount:x,destroy:w,update:g,register:y,get:C,getIn:b,getAt:L,add:I,remove:N,forEach:R,filter:O,style:A,getLength:J,isEnough:v}}function _c(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.emit,d=t.Slides,c=t.Direction.resolve,m=t.Elements,p=m.root,x=m.track,$=m.list,w=d.getAt,g=d.style,y,C,b;function L(){I(),s(window,"resize load",hc(mt(a,ci))),o([Nt,Tt],I),o(ci,N)}function I(){y=n.direction===jo,Jt(p,"maxWidth",Hn(n.width)),Jt(x,c("paddingLeft"),R(!1)),Jt(x,c("paddingRight"),R(!0)),N(!0)}function N(W){var k=Dt(p);(W||C.width!==k.width||C.height!==k.height)&&(Jt(x,"height",O()),g(c("marginRight"),Hn(n.gap)),g("width",T()),g("height",J(),!0),C=k,a(Wo),b!==(b=j())&&(gn(p,Ys,b),a(mc,b)))}function R(W){var k=n.padding,E=c(W?"right":"left");return k&&Hn(k[E]||(Ri(k)?0:k))||"0px"}function O(){var W="";return y&&(W=A(),Ti(W,"height or heightRatio is missing."),W="calc("+W+" - "+R(!1)+" - "+R(!0)+")"),W}function A(){return Hn(n.height||Dt($).width*n.heightRatio)}function T(){return n.autoWidth?null:Hn(n.fixedWidth)||(y?"":v())}function J(){return Hn(n.fixedHeight)||(y?n.autoHeight?null:v():A())}function v(){var W=Hn(n.gap);return"calc((100%"+(W&&" + "+W)+")/"+(n.perPage||1)+(W&&" - "+W)+")"}function M(){return Dt($)[c("width")]}function B(W,k){var E=w(W||0);return E?Dt(E.slide)[c("width")]+(k?0:ce()):0}function V(W,k){var E=w(W);if(E){var q=Dt(E.slide)[c("right")],Z=Dt($)[c("left")];return zt(q-Z)+(k?0:ce())}return 0}function te(W){return V(e.length-1)-V(0)+B(0,W)}function ce(){var W=w(0);return W&&parseFloat(Jt(W.slide,c("marginRight")))||0}function U(W){return parseFloat(Jt(x,c("padding"+(W?"Right":"Left"))))||0}function j(){return e.is(Xi)||te(!0)>M()}return{mount:L,resize:N,listSize:M,slideSize:B,sliderSize:te,totalSize:V,getPadding:U,isOverflow:j}}var Fc=2;function Wc(e,t,n){var i=xt(e),o=i.on,s=t.Elements,a=t.Slides,d=t.Direction.resolve,c=[],m;function p(){o(Tt,x),o([Nt,ci],w),(m=C())&&(g(m),t.Layout.resize(!0))}function x(){$(),p()}function $(){Kn(c),xn(c),i.destroy()}function w(){var b=C();m!==b&&(m<b||!b)&&i.emit(Tt)}function g(b){var L=a.get().slice(),I=L.length;if(I){for(;L.length<b;)bo(L,L);bo(L.slice(-b),L.slice(0,b)).forEach(function(N,R){var O=R<b,A=y(N.slide,R);O?Fr(A,L[0].slide):qi(s.list,A),bo(c,A),a.register(A,R-b+(O?0:I),N.index)})}}function y(b,L){var I=b.cloneNode(!0);return on(I,n.classes.clone),I.id=e.root.id+"-clone"+Hr(L+1),I}function C(){var b=n.clones;if(!e.is(bi))b=0;else if(Di(b)){var L=n[d("fixedWidth")]&&t.Layout.slideSize(0),I=L&&Fi(Dt(s.track)[d("width")]/L);b=I||n[d("autoWidth")]&&e.length||n.perPage*Fc}return b}return{mount:p,destroy:$}}function Nc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Layout,c=d.slideSize,m=d.getPadding,p=d.totalSize,x=d.listSize,$=d.sliderSize,w=t.Direction,g=w.resolve,y=w.orient,C=t.Elements,b=C.list,L=C.track,I;function N(){I=t.Transition,o([An,Wo,Nt,Tt],R)}function R(){t.Controller.isBusy()||(t.Scroll.cancel(),A(e.index),t.Slides.update())}function O(E,q,Z,X){E!==q&&W(E>Z)&&(M(),T(v(te(),E>Z),!0)),a(vi),s(bn,q,Z,E),I.start(q,function(){a(li),s(xi,q,Z,E),X&&X()})}function A(E){T(V(E,!0))}function T(E,q){if(!e.is(Xi)){var Z=q?E:J(E);Jt(b,"transform","translate"+g("X")+"("+Z+"px)"),E!==Z&&s(Hs)}}function J(E){if(e.is(bi)){var q=B(E),Z=q>t.Controller.getEnd(),X=q<0;(X||Z)&&(E=v(E,Z))}return E}function v(E,q){var Z=E-j(q),X=$();return E-=y(X*(Fi(zt(Z)/X)||1))*(q?1:-1),E}function M(){T(te(),!0),I.cancel()}function B(E){for(var q=t.Slides.get(),Z=0,X=1/0,z=0;z<q.length;z++){var re=q[z].index,h=zt(V(re,!0)-E);if(h<=X)X=h,Z=re;else break}return Z}function V(E,q){var Z=y(p(E-1)-U(E));return q?ce(Z):Z}function te(){var E=g("left");return Dt(b)[E]-Dt(L)[E]+y(m(!1))}function ce(E){return n.trimSpace&&e.is(di)&&(E=ni(E,0,y($(!0)-x()))),E}function U(E){var q=n.focus;return q==="center"?(x()-c(E,!0))/2:+q*c(E)||0}function j(E){return V(E?t.Controller.getEnd():0,!!n.trimSpace)}function W(E){var q=y(v(te(),E));return E?q>=0:q<=b[g("scrollWidth")]-Dt(L)[g("width")]}function k(E,q){q=Di(q)?te():q;var Z=E!==!0&&y(q)<y(j(!1)),X=E!==!1&&y(q)>y(j(!0));return Z||X}return{mount:N,move:O,jump:A,translate:T,shift:v,cancel:M,toIndex:B,toPosition:V,getPosition:te,getLimit:j,exceededLimit:k,reposition:R}}function Hc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=t.Move,d=a.getPosition,c=a.getLimit,m=a.toPosition,p=t.Slides,x=p.isEnough,$=p.getLength,w=n.omitEnd,g=e.is(bi),y=e.is(di),C=mt(te,!1),b=mt(te,!0),L=n.start||0,I,N=L,R,O,A;function T(){J(),o([Nt,Tt,Ro],J),o(Wo,v)}function J(){R=$(!0),O=n.perMove,A=n.perPage,I=W();var h=ni(L,0,w?I:R-1);h!==L&&(L=h,a.reposition())}function v(){I!==W()&&s(Ro)}function M(h,le,ve){if(!re()){var he=V(h),Re=j(he);Re>-1&&(le||Re!==L)&&(Z(Re),a.move(he,Re,N,ve))}}function B(h,le,ve,he){t.Scroll.scroll(h,le,ve,function(){var Re=j(a.toIndex(d()));Z(w?Rn(Re,I):Re),he&&he()})}function V(h){var le=L;if(Pn(h)){var ve=h.match(/([+\-<>])(\d+)?/)||[],he=ve[1],Re=ve[2];he==="+"||he==="-"?le=ce(L+ +(""+he+(+Re||1)),L):he===">"?le=Re?k(+Re):C(!0):he==="<"&&(le=b(!0))}else le=g?h:ni(h,0,I);return le}function te(h,le){var ve=O||(z()?1:A),he=ce(L+ve*(h?-1:1),L,!(O||z()));return he===-1&&y&&!Ss(d(),c(!h),1)?h?0:I:le?he:j(he)}function ce(h,le,ve){if(x()||z()){var he=U(h);he!==h&&(le=h,h=he,ve=!1),h<0||h>I?!O&&(wo(0,h,le,!0)||wo(I,le,h,!0))?h=k(E(h)):g?h=ve?h<0?-(R%A||A):R:h:n.rewind?h=h<0?I:0:h=-1:ve&&h!==le&&(h=k(E(le)+(h<le?-1:1)))}else h=-1;return h}function U(h){if(y&&n.trimSpace==="move"&&h!==L)for(var le=d();le===m(h,!0)&&wo(h,0,e.length-1,!n.rewind);)h<L?--h:++h;return h}function j(h){return g?(h+R)%R||0:h}function W(){for(var h=R-(z()||g&&O?1:A);w&&h-- >0;)if(m(R-1,!0)!==m(h,!0)){h++;break}return ni(h,0,R-1)}function k(h){return ni(z()?h:A*h,0,I)}function E(h){return z()?Rn(h,I):Po((h>=I?R-1:h)/A)}function q(h){var le=a.toIndex(h);return y?ni(le,0,I):le}function Z(h){h!==L&&(N=L,L=h)}function X(h){return h?N:L}function z(){return!Di(n.focus)||n.isNavigation}function re(){return e.state.is([vi,ji])&&!!n.waitForTransition}return{mount:T,go:M,scroll:B,getNext:C,getPrev:b,getAdjacent:te,getEnd:W,setIndex:Z,getIndex:X,toIndex:k,toPage:E,toDest:q,hasFocus:z,isBusy:re}}var Oc="http://www.w3.org/2000/svg",Bc="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",no=40;function zc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.emit,d=n.classes,c=n.i18n,m=t.Elements,p=t.Controller,x=m.arrows,$=m.track,w=x,g=m.prev,y=m.next,C,b,L={};function I(){R(),o(Nt,N)}function N(){O(),I()}function R(){var B=n.arrows;B&&!(g&&y)&&J(),g&&y&&(Ai(L,{prev:g,next:y}),_i(w,B?"":"none"),on(w,b=Ur+"--"+n.direction),B&&(A(),M(),Oe([g,y],Ui,$.id),a(ks,g,y)))}function O(){i.destroy(),hn(w,b),C?(Kn(x?[g,y]:w),g=y=null):rn([g,y],Gr)}function A(){o([An,xi,Tt,Un,Ro],M),s(y,"click",mt(T,">")),s(g,"click",mt(T,"<"))}function T(B){p.go(B,!0)}function J(){w=x||ai("div",d.arrows),g=v(!0),y=v(!1),C=!0,qi(w,[g,y]),!x&&Fr(w,$)}function v(B){var V='<button class="'+d.arrow+" "+(B?d.prev:d.next)+'" type="button"><svg xmlns="'+Oc+'" viewBox="0 0 '+no+" "+no+'" width="'+no+'" height="'+no+'" focusable="false"><path d="'+(n.arrowPath||Bc)+'" />';return ws(V)}function M(){if(g&&y){var B=e.index,V=p.getPrev(),te=p.getNext(),ce=V>-1&&B<V?c.last:c.prev,U=te>-1&&B>te?c.first:c.next;g.disabled=V<0,y.disabled=te<0,Oe(g,Vt,ce),Oe(y,Vt,U),a(As,g,y,V,te)}}return{arrows:L,mount:I,destroy:O,update:M}}var jc=Nr+"-interval";function Dc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.emit,d=Ho(n.interval,e.go.bind(e,">"),A),c=d.isPaused,m=t.Elements,p=t.Elements,x=p.root,$=p.toggle,w=n.autoplay,g,y,C=w==="pause";function b(){w&&(L(),$&&Oe($,Ui,m.track.id),C||I(),O())}function L(){n.pauseOnHover&&s(x,"mouseenter mouseleave",function(J){g=J.type==="mouseenter",R()}),n.pauseOnFocus&&s(x,"focusin focusout",function(J){y=J.type==="focusin",R()}),$&&s($,"click",function(){C?I():N(!0)}),o([bn,No,Tt],d.rewind),o(bn,T)}function I(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),y=g=C=!1,O(),a(jr))}function N(J){J===void 0&&(J=!0),C=!!J,O(),c()||(d.pause(),a(Dr))}function R(){C||(g||y?N(!1):I())}function O(){$&&(gn($,Gn,!C),Oe($,Vt,n.i18n[C?"play":"pause"]))}function A(J){var v=m.bar;v&&Jt(v,"width",J*100+"%"),a(Ws,J)}function T(J){var v=t.Slides.getAt(J);d.set(v&&+Zt(v.slide,jc)||n.interval)}return{mount:b,destroy:d.cancel,play:I,pause:N,isPaused:c}}function Vc(e,t,n){var i=xt(e),o=i.on;function s(){n.cover&&(o(Vr,mt(d,!0)),o([An,Nt,Tt],mt(a,!0)))}function a(c){t.Slides.forEach(function(m){var p=Ki(m.container||m.slide,"img");p&&p.src&&d(c,p,m)})}function d(c,m,p){p.style("background",c?'center/cover no-repeat url("'+m.src+'")':"",!0),_i(m,c?"none":"")}return{mount:s,destroy:mt(a,!1)}}var qc=10,Kc=600,Gc=.6,Uc=1.5,Xc=800;function Yc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Move,c=d.getPosition,m=d.getLimit,p=d.exceededLimit,x=d.translate,$=e.is(di),w,g,y=1;function C(){o(bn,N),o([Nt,Tt],R)}function b(A,T,J,v,M){var B=c();if(N(),J&&(!$||!p())){var V=t.Layout.sliderSize(),te=wr(A)*V*Po(zt(A)/V)||0;A=d.toPosition(t.Controller.toDest(A%V))+te}var ce=Ss(B,A,1);y=1,T=ce?0:T||Eo(zt(A-B)/Uc,Xc),g=v,w=Ho(T,L,mt(I,B,A,M),1),a(ji),s(No),w.start()}function L(){a(li),g&&g(),s(Un)}function I(A,T,J,v){var M=c(),B=A+(T-A)*O(v),V=(B-M)*y;x(M+V),$&&!J&&p()&&(y*=Gc,zt(V)<qc&&b(m(p(!0)),Kc,!1,g,!0))}function N(){w&&w.cancel()}function R(){w&&!w.isPaused()&&(N(),L())}function O(A){var T=n.easingFunc;return T?T(A):1-Math.pow(1-A,4)}return{mount:C,destroy:N,scroll:b,cancel:R}}var ii={passive:!1,capture:!0};function Jc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=i.bind,d=i.unbind,c=e.state,m=t.Move,p=t.Scroll,x=t.Controller,$=t.Elements.track,w=t.Media.reduce,g=t.Direction,y=g.resolve,C=g.orient,b=m.getPosition,L=m.exceededLimit,I,N,R,O,A,T=!1,J,v,M;function B(){a($,or,xr,ii),a($,rr,xr,ii),a($,Js,te,ii),a($,"click",j,{capture:!0}),a($,"dragstart",mn),o([An,Nt],V)}function V(){var Y=n.drag;ge(!Y),O=Y==="free"}function te(Y){if(J=!1,!v){var fe=Re(Y);he(Y.target)&&(fe||!Y.button)&&(x.isBusy()?mn(Y,!0):(M=fe?$:window,A=c.is([vi,ji]),R=null,a(M,or,ce,ii),a(M,rr,U,ii),m.cancel(),p.cancel(),W(Y)))}}function ce(Y){if(c.is(xo)||(c.set(xo),s(Ps)),Y.cancelable)if(A){m.translate(I+ve(z(Y)));var fe=re(Y)>xa,ae=T!==(T=L());(fe||ae)&&W(Y),J=!0,s(Rs),mn(Y)}else q(Y)&&(A=E(Y),mn(Y))}function U(Y){c.is(xo)&&(c.set(li),s(Ms)),A&&(k(Y),mn(Y)),d(M,or,ce),d(M,rr,U),A=!1}function j(Y){!v&&J&&mn(Y,!0)}function W(Y){R=N,N=Y,I=b()}function k(Y){var fe=Z(Y),ae=X(fe),se=n.rewind&&n.rewindByDrag;w(!1),O?x.scroll(ae,0,n.snap):e.is(Xi)?x.go(C(wr(fe))<0?se?"<":"-":se?">":"+"):e.is(di)&&T&&se?x.go(L(!0)?">":"<"):x.go(x.toDest(ae),!0),w(!0)}function E(Y){var fe=n.dragMinThreshold,ae=Ri(fe),se=ae&&fe.mouse||0,ne=(ae?fe.touch:+fe)||10;return zt(z(Y))>(Re(Y)?ne:se)}function q(Y){return zt(z(Y))>zt(z(Y,!0))}function Z(Y){if(e.is(bi)||!T){var fe=re(Y);if(fe&&fe<xa)return z(Y)/fe}return 0}function X(Y){return b()+wr(Y)*Rn(zt(Y)*(n.flickPower||600),O?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function z(Y,fe){return le(Y,fe)-le(h(Y),fe)}function re(Y){return br(Y)-br(h(Y))}function h(Y){return N===Y&&R||N}function le(Y,fe){return(Re(Y)?Y.changedTouches[0]:Y)["page"+y(fe?"Y":"X")]}function ve(Y){return Y/(T&&e.is(di)?Rc:1)}function he(Y){var fe=n.noDrag;return!Mi(Y,"."+Ks+", ."+Vo)&&(!fe||!Mi(Y,fe))}function Re(Y){return typeof TouchEvent<"u"&&Y instanceof TouchEvent}function ee(){return A}function ge(Y){v=Y}return{mount:B,disable:ge,isDragging:ee}}var Zc={Spacebar:" ",Right:zo,Left:Bo,Up:Os,Down:Bs};function Xr(e){return e=Pn(e)?e:e.key,Zc[e]||e}var ba="keydown";function Qc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.unbind,d=e.root,c=t.Direction.resolve,m,p;function x(){$(),o(Nt,w),o(Nt,$),o(bn,y)}function $(){var b=n.keyboard;b&&(m=b==="global"?window:d,s(m,ba,C))}function w(){a(m,ba)}function g(b){p=b}function y(){var b=p;p=!0,fs(function(){p=b})}function C(b){if(!p){var L=Xr(b);L===c(Bo)?e.go("<"):L===c(zo)&&e.go(">")}}return{mount:x,destroy:w,disable:g}}var Li=Nr+"-lazy",$o=Li+"-srcset",ed="["+Li+"], ["+$o+"]";function td(e,t,n){var i=xt(e),o=i.on,s=i.off,a=i.bind,d=i.emit,c=n.lazyLoad==="sequential",m=[xi,Un],p=[];function x(){n.lazyLoad&&($(),o(Tt,$))}function $(){xn(p),w(),c?b():(s(m),o(m,g),g())}function w(){t.Slides.forEach(function(L){Wr(L.slide,ed).forEach(function(I){var N=Zt(I,Li),R=Zt(I,$o);if(N!==I.src||R!==I.srcset){var O=n.classes.spinner,A=I.parentElement,T=Ki(A,"."+O)||ai("span",O,A);p.push([I,L,T]),I.src||_i(I,"none")}})})}function g(){p=p.filter(function(L){var I=n.perPage*((n.preloadPages||1)+1)-1;return L[1].isWithin(e.index,I)?y(L):!0}),p.length||s(m)}function y(L){var I=L[0];on(L[1].slide,Tr),a(I,"load error",mt(C,L)),Oe(I,"src",Zt(I,Li)),Oe(I,"srcset",Zt(I,$o)),rn(I,Li),rn(I,$o)}function C(L,I){var N=L[0],R=L[1];hn(R.slide,Tr),I.type!=="error"&&(Kn(L[2]),_i(N,""),d(Vr,N,R),d(ci)),c&&b()}function b(){p.length&&y(p.shift())}return{mount:x,destroy:mt(xn,p),check:g}}function nd(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=i.bind,d=t.Slides,c=t.Elements,m=t.Controller,p=m.hasFocus,x=m.getIndex,$=m.go,w=t.Direction.resolve,g=c.pagination,y=[],C,b;function L(){I(),o([Nt,Tt,Ro],L);var v=n.pagination;g&&_i(g,v?"":"none"),v&&(o([bn,No,Un],J),N(),J(),s(_s,{list:C,items:y},T(e.index)))}function I(){C&&(Kn(g?kn(C.children):C),hn(C,b),xn(y),C=null),i.destroy()}function N(){var v=e.length,M=n.classes,B=n.i18n,V=n.perPage,te=p()?m.getEnd()+1:Fi(v/V);C=g||ai("ul",M.pagination,c.track.parentElement),on(C,b=qo+"--"+A()),Oe(C,fn,"tablist"),Oe(C,Vt,B.select),Oe(C,Kr,A()===jo?"vertical":"");for(var ce=0;ce<te;ce++){var U=ai("li",null,C),j=ai("button",{class:M.page,type:"button"},U),W=d.getIn(ce).map(function(E){return E.slide.id}),k=!p()&&V>1?B.pageX:B.slideX;a(j,"click",mt(R,ce)),n.paginationKeyboard&&a(j,"keydown",mt(O,ce)),Oe(U,fn,"presentation"),Oe(j,fn,"tab"),Oe(j,Ui,W.join(" ")),Oe(j,Vt,$r(k,ce+1)),Oe(j,si,-1),y.push({li:U,button:j,page:ce})}}function R(v){$(">"+v,!0)}function O(v,M){var B=y.length,V=Xr(M),te=A(),ce=-1;V===w(zo,!1,te)?ce=++v%B:V===w(Bo,!1,te)?ce=(--v+B)%B:V==="Home"?ce=0:V==="End"&&(ce=B-1);var U=y[ce];U&&(bs(U.button),$(">"+ce),mn(M,!0))}function A(){return n.paginationDirection||n.direction}function T(v){return y[m.toPage(v)]}function J(){var v=T(x(!0)),M=T(x());if(v){var B=v.button;hn(B,Gn),rn(B,ga),Oe(B,si,-1)}if(M){var V=M.button;on(V,Gn),Oe(V,ga,!0),Oe(V,si,"")}s(Fs,{list:C,items:y},v,M)}return{items:y,mount:L,destroy:I,getAt:T,update:J}}var id=[" ","Enter"];function od(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(g){g.isParent||(m(e,g.splide),m(g.splide,e))}),i&&p()}function d(){s.forEach(function(g){g.destroy()}),xn(s)}function c(){d(),a()}function m(g,y){var C=xt(g);C.on(bn,function(b,L,I){y.go(y.is(bi)?I:b)}),s.push(C)}function p(){var g=xt(e),y=g.on;y(Or,$),y(Ns,w),y([An,Nt],x),s.push(g),g.emit(zr,e.splides)}function x(){Oe(t.Elements.list,Kr,n.direction===jo?"vertical":"")}function $(g){e.go(g.index)}function w(g,y){_r(id,Xr(y))&&($(g),mn(y))}return{setup:mt(t.Media.set,{slideFocus:Di(o)?i:o},!0),mount:a,destroy:d,remount:c}}function rd(e,t,n){var i=xt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",d,ii)}function d(m){if(m.cancelable){var p=m.deltaY,x=p<0,$=br(m),w=n.wheelMinThreshold||0,g=n.wheelSleep||0;zt(p)>w&&$-s>g&&(e.go(x?"<":">"),s=$),c(x)&&mn(m)}}function c(m){return!n.releaseWheel||e.state.is(vi)||t.Controller.getAdjacent(m)!==-1}return{mount:a}}var ad=90;function sd(e,t,n){var i=xt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,d=ai("span",Tc),c=Ho(ad,mt(p,!1));function m(){a&&($(!t.Autoplay.isPaused()),Oe(s,ya,!0),d.textContent="…",o(jr,mt($,!0)),o(Dr,mt($,!1)),o([xi,Un],mt(p,!0)))}function p(w){Oe(s,fa,w),w?(qi(s,d),c.start()):(Kn(d),c.cancel())}function x(){rn(s,[ha,ya,fa]),Kn(d)}function $(w){a&&Oe(s,ha,w?"off":"polite")}return{mount:m,disable:$,destroy:x}}var ld=Object.freeze({__proto__:null,Media:fc,Direction:yc,Elements:Mc,Slides:Ac,Layout:_c,Clones:Wc,Move:Nc,Controller:Hc,Arrows:zc,Autoplay:Dc,Cover:Vc,Scroll:Yc,Drag:Jc,Keyboard:Qc,LazyLoad:td,Pagination:nd,Sync:od,Wheel:rd,Live:sd}),cd={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"},dd={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:Ec,i18n:cd,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ud(e,t,n){var i=t.Slides;function o(){xt(e).on([An,Tt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function a(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),fs(c)}return{mount:o,start:a,cancel:xr}}function pd(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,d=mt(Jt,a,"transition"),c;function m(){xt(e).bind(a,"transitionend",function(w){w.target===a&&c&&(x(),c())})}function p(w,g){var y=i.toPosition(w,!0),C=i.getPosition(),b=$(w);zt(y-C)>=1&&b>=1?n.useScroll?s.scroll(y,b,!1,g):(d("transform "+b+"ms "+n.easing),i.translate(y,!0),c=g):(i.jump(w),g())}function x(){d(""),s.cancel()}function $(w){var g=n.rewindSpeed;if(e.is(di)&&g){var y=o.getIndex(!0),C=o.getEnd();if(y===0&&w>=C||y>=C&&w===0)return g}return n.speed}return{mount:m,start:p,cancel:x}}var md=(function(){function e(n,i){this.event=xt(),this.Components={},this.state=gc(ri),this.splides=[],this._o={},this._E={};var o=Pn(n)?$s(document,n):n;Ti(o,o+" is invalid."),this.root=o,i=En({label:Zt(o,Vt)||"",labelledby:Zt(o,qr)||""},dd,e.defaults,i||{});try{En(i,JSON.parse(Zt(o,Nr)))}catch{Ti(!1,"Invalid JSON")}this._o=Object.create(En({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,d=this.Components;Ti(a.is([ri,Io]),"Already mounted!"),a.set(ri),this._C=d,this._T=o||this._T||(this.is(Xi)?ud:pd),this._E=i||this._E;var c=Ai({},ld,this._E,{Transition:this._T});return qn(c,function(m,p){var x=m(s,d,s._o);d[p]=x,x.setup&&x.setup()}),qn(d,function(m){m.mount&&m.mount()}),this.emit(An),on(this.root,Lc),a.set(li),this.emit(Sr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(li)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(kn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Tt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(ri)?xt(this).on(Sr,this.destroy.bind(this,i)):(qn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Br),o.destroy(),i&&xn(this.splides),s.set(Io)),this},cc(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Yr=md;Yr.defaults={};Yr.STATES=uc;var wa=[[An,"onMounted"],[Sr,"onReady"],[bn,"onMove"],[xi,"onMoved"],[Or,"onClick"],[Ts,"onActive"],[Ls,"onInactive"],[Is,"onVisible"],[Es,"onHidden"],[Tt,"onRefresh"],[Nt,"onUpdated"],[ci,"onResize"],[Wo,"onResized"],[Ps,"onDrag"],[Rs,"onDragging"],[Ms,"onDragged"],[No,"onScroll"],[Un,"onScrolled"],[Br,"onDestroy"],[ks,"onArrowsMounted"],[As,"onArrowsUpdated"],[_s,"onPaginationMounted"],[Fs,"onPaginationUpdated"],[zr,"onNavigationMounted"],[jr,"onAutoplayPlay"],[Ws,"onAutoplayPlaying"],[Dr,"onAutoplayPause"],[Vr,"onLazyLoadLoaded"]];function Jr(...e){return e.filter(Boolean).join(" ")}function Mo(e){return e!==null&&typeof e=="object"}function Lr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Lr(n,t[i]));if(Mo(e)&&Mo(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Lr(e[o],t[o]))}return e===t}function gd(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function hd(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function Ir(e,t){const n=e;return hd(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Mo(i)?n[o]=Ir(Mo(n[o])?n[o]:{},i):n[o]=i}),n}var fd=({children:e,className:t,...n})=>l.createElement("div",{className:Jr("splide__track",t),...n},l.createElement("ul",{className:"splide__list"},e)),Zr=class extends l.Component{constructor(){super(...arguments),this.splideRef=l.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Yr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ir({},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&&!Lr(this.options,e)&&(this.splide.options=e,this.options=Ir({},e));const t=this.getSlides();gd(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){wa.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(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:i,...o}=this.props;return l.createElement(t,{className:Jr("splide",e),ref:this.splideRef,...this.omit(o,["options",...wa.map(s=>s[1])])},n?l.createElement(fd,null,i):i)}},Qr=({children:e,className:t,...n})=>l.createElement("li",{className:Jr("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("react"),je=require("classnames"),_=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),ji=require("react-dom");function xl(e){return e.type==="object"&&e.version===1}const bl="ControlSlider-module__wrapper___sHEkd",wl="ControlSlider-module__hoverArrow___A-dOH",$l="ControlSlider-module__sliderItem___QQSkR",Sl="ControlSlider-module__sliderImage___9hRl-",Cl="ControlSlider-module__arrow___05ghY",Tl="ControlSlider-module__arrowVertical___tBfVN",Ll="ControlSlider-module__nextArrow___-30Yc",Il="ControlSlider-module__arrowInner___aEra3",El="ControlSlider-module__arrowIcon___S4ztF",Pl="ControlSlider-module__arrowImg___2dwJW",Rl="ControlSlider-module__mirror___brd6U",Ml="ControlSlider-module__pagination___bicLF",kl="ControlSlider-module__paginationInner___bT-P-",Al="ControlSlider-module__paginationVertical___zYqKw",_l="ControlSlider-module__paginationItem___nTRbk",Fl="ControlSlider-module__dot___p1Qun",Wl="ControlSlider-module__activeDot___LHFaj",Nl="ControlSlider-module__paginationInsideBottom___R3FWn",Hl="ControlSlider-module__paginationInsideTop___V-qb-",Ol="ControlSlider-module__paginationOutsideBottom___14w8D",Bl="ControlSlider-module__paginationOutsideTop___SCLqB",zl="ControlSlider-module__paginationInsideLeft___yOBRZ",jl="ControlSlider-module__paginationInsideRight___Rtt3o",Dl="ControlSlider-module__paginationOutsideLeft___lahaw",Vl="ControlSlider-module__paginationOutsideRight___EtuQa",ql="ControlSlider-module__imgWrapper___UjEgB",Gl="ControlSlider-module__captionBlock___dJ6-j",Kl="ControlSlider-module__captionTextWrapper___HFlpf",Ul="ControlSlider-module__captionText___uGBVc",Xl="ControlSlider-module__active___WZK4G",Yl="ControlSlider-module__withPointerEvents___t-18M",Jl="ControlSlider-module__topLeftAlignment___zjnGM",Zl="ControlSlider-module__topCenterAlignment___gD1xW",Ql="ControlSlider-module__topRightAlignment___NMapS",ec="ControlSlider-module__middleLeftAlignment___OnUrY",tc="ControlSlider-module__middleCenterAlignment___Tdkl0",nc="ControlSlider-module__middleRightAlignment___wEbfX",ic="ControlSlider-module__bottomLeftAlignment___cTP2-",oc="ControlSlider-module__bottomCenterAlignment___c54fB",rc="ControlSlider-module__bottomRightAlignment___kEwrz",ac="ControlSlider-module__clickOverlay___DZA28",sc="ControlSlider-module__contain___pLyq7",lc="ControlSlider-module__cover___KdDat",Pe={wrapper:bl,hoverArrow:wl,sliderItem:$l,sliderImage:Sl,arrow:Cl,arrowVertical:Tl,nextArrow:Ll,arrowInner:Il,arrowIcon:El,arrowImg:Pl,mirror:Rl,pagination:Ml,paginationInner:kl,paginationVertical:Al,paginationItem:_l,dot:Fl,activeDot:Wl,paginationInsideBottom:Nl,paginationInsideTop:Hl,paginationOutsideBottom:Ol,paginationOutsideTop:Bl,paginationInsideLeft:zl,paginationInsideRight:jl,paginationOutsideLeft:Dl,paginationOutsideRight:Vl,imgWrapper:ql,captionBlock:Gl,captionTextWrapper:Kl,captionText:Ul,active:Xl,withPointerEvents:Yl,topLeftAlignment:Jl,topCenterAlignment:Zl,topRightAlignment:Ql,middleLeftAlignment:ec,middleCenterAlignment:tc,middleRightAlignment:nc,bottomLeftAlignment:ic,bottomCenterAlignment:oc,bottomRightAlignment:rc,clickOverlay:ac,contain:sc,cover:lc};function cc(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function dc(e,t,n){return t&&cc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ca="(prefers-reduced-motion: reduce)",ai=1,uc=2,ci=3,xi=4,Di=5,bo=6,Eo=7,pc={CREATED:ai,MOUNTED:uc,IDLE:ci,MOVING:xi,SCROLLING:Di,DRAGGING:bo,DESTROYED:Eo};function xn(e){e.length=0}function An(e,t,n){return Array.prototype.slice.call(e,t,n)}function mt(e){return e.bind.apply(e,[null].concat(An(arguments,1)))}var ys=setTimeout,br=function(){};function da(e){return requestAnimationFrame(e)}function Wo(e,t){return typeof t===e}function Mi(e){return!_r(e)&&Wo("object",e)}var Ar=Array.isArray,vs=mt(Wo,"function"),Rn=mt(Wo,"string"),Vi=mt(Wo,"undefined");function _r(e){return e===null}function xs(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function qi(e){return Ar(e)?e:[e]}function Kt(e,t){qi(e).forEach(t)}function Fr(e,t){return e.indexOf(t)>-1}function wo(e,t){return e.push.apply(e,qi(t)),e}function gn(e,t,n){e&&Kt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function on(e,t){gn(e,Rn(t)?t.split(" "):t,!0)}function Gi(e,t){Kt(t,e.appendChild.bind(e))}function Wr(e,t){Kt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ki(e,t){return xs(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function bs(e,t){var n=e?An(e.children):[];return t?n.filter(function(i){return ki(i,t)}):n}function Ki(e,t){return t?bs(e,t)[0]:e.firstElementChild}var Ai=Object.keys;function Gn(e,t,n){return e&&(n?Ai(e).reverse():Ai(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function _i(e){return An(arguments,1).forEach(function(t){Gn(t,function(n,i){e[i]=t[i]})}),e}function Pn(e){return An(arguments,1).forEach(function(t){Gn(t,function(n,i){Ar(n)?e[i]=n.slice():Mi(n)?e[i]=Pn({},Mi(e[i])?e[i]:{},n):e[i]=n})}),e}function ua(e,t){Kt(t||Ai(e),function(n){delete e[n]})}function rn(e,t){Kt(e,function(n){Kt(t,function(i){n&&n.removeAttribute(i)})})}function Oe(e,t,n){Mi(t)?Gn(t,function(i,o){Oe(e,o,i)}):Kt(e,function(i){_r(n)||n===""?rn(i,t):i.setAttribute(t,String(n))})}function si(e,t,n){var i=document.createElement(e);return t&&(Rn(t)?on(i,t):Oe(i,t)),n&&Gi(n,i),i}function Jt(e,t,n){if(Vi(n))return getComputedStyle(e)[t];_r(n)||(e.style[t]=""+n)}function Fi(e,t){Jt(e,"display",t)}function ws(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Zt(e,t){return e.getAttribute(t)}function pa(e,t){return e&&e.classList.contains(t)}function Dt(e){return e.getBoundingClientRect()}function Kn(e){Kt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function $s(e){return Ki(new DOMParser().parseFromString(e,"text/html").body)}function mn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Ss(e,t){return e&&e.querySelector(t)}function Nr(e,t){return t?An(e.querySelectorAll(t)):[]}function hn(e,t){gn(e,t,!1)}function wr(e){return e.timeStamp}function On(e){return Rn(e)?e:e?e+"px":""}var Ui="splide",Hr="data-"+Ui;function Li(e,t){if(!e)throw new Error("["+Ui+"] "+(t||""))}var Mn=Math.min,Po=Math.max,Ro=Math.floor,Wi=Math.ceil,zt=Math.abs;function Cs(e,t,n){return zt(e-t)<n}function $o(e,t,n,i){var o=Mn(t,n),s=Po(t,n);return i?o<e&&e<s:o<=e&&e<=s}function ii(e,t,n){var i=Mn(t,n),o=Po(t,n);return Mn(Po(i,e),o)}function $r(e){return+(e>0)-+(e<0)}function Sr(e,t){return Kt(t,function(n){e=e.replace("%s",""+n)}),e}function Or(e){return e<10?"0"+e:""+e}var ma={};function mc(e){return""+e+Or(ma[e]=(ma[e]||0)+1)}function Ts(){var e=[];function t(a,d,c,m){o(a,d,function(p,x,$){var w="addEventListener"in p,g=w?p.removeEventListener.bind(p,x,c,m):p.removeListener.bind(p,c);w?p.addEventListener(x,c,m):p.addListener(c),e.push([p,x,$,c,g])})}function n(a,d,c){o(a,d,function(m,p,x){e=e.filter(function($){return $[0]===m&&$[1]===p&&$[2]===x&&(!c||$[3]===c)?($[4](),!1):!0})})}function i(a,d,c){var m,p=!0;return typeof CustomEvent=="function"?m=new CustomEvent(d,{bubbles:p,detail:c}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(d,p,!1,c)),a.dispatchEvent(m),m}function o(a,d,c){Kt(a,function(m){m&&Kt(d,function(p){p.split(" ").forEach(function(x){var $=x.split(".");c(m,$[0],$[1])})})})}function s(){e.forEach(function(a){a[4]()}),xn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var _n="mounted",Cr="ready",bn="move",bi="moved",Br="click",Ls="active",Is="inactive",Es="visible",Ps="hidden",Tt="refresh",Nt="updated",di="resize",No="resized",Rs="drag",Ms="dragging",ks="dragged",Ho="scroll",Xn="scrolled",gc="overflow",zr="destroy",As="arrows:mounted",_s="arrows:updated",Fs="pagination:mounted",Ws="pagination:updated",jr="navigation:mounted",Dr="autoplay:play",Ns="autoplay:playing",Vr="autoplay:pause",qr="lazyload:loaded",Hs="sk",Os="sh",Mo="ei";function xt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ts();function i(s,a){n.bind(t,qi(s).join(" "),function(d){a.apply(a,Ar(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,An(arguments,1))}return e&&e.event.on(zr,n.destroy),_i(n,{bus:t,on:i,off:mt(n.unbind,t),emit:o})}function Oo(e,t,n,i){var o=Date.now,s,a=0,d,c=!0,m=0;function p(){if(!c){if(a=e?Mn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++m>=i))return $();d=da(p)}}function x(b){b||g(),s=o()-(b?a*e:0),c=!1,d=da(p)}function $(){c=!0}function w(){s=o(),a=0,n&&n(a)}function g(){d&&cancelAnimationFrame(d),a=0,d=0,c=!0}function y(b){e=b}function C(){return c}return{start:x,rewind:w,pause:$,cancel:g,set:y,isPaused:C}}function hc(e){var t=e;function n(o){t=o}function i(o){return Fr(qi(o),t)}return{set:n,is:i}}function fc(e,t){var n=Oo(0,e,null,1);return function(){n.isPaused()&&n.start()}}function yc(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=Ts(),d=[];function c(){var g=n.mediaQuery==="min";Ai(o).sort(function(y,C){return g?+y-+C:+C-+y}).forEach(function(y){p(o[y],"("+(g?"min":"max")+"-width:"+y+"px)")}),p(s,ca),x()}function m(g){g&&a.destroy()}function p(g,y){var C=matchMedia(y);a.bind(C,"change",x),d.push([g,C])}function x(){var g=i.is(Eo),y=n.direction,C=d.reduce(function(b,L){return Pn(b,L[1].matches?L[0]:{})},{});ua(n),w(C),n.destroy?e.destroy(n.destroy==="completely"):g?(m(!0),e.mount()):y!==n.direction&&e.refresh()}function $(g){matchMedia(ca).matches&&(g?Pn(n,s):ua(n,Ai(s)))}function w(g,y,C){Pn(n,g),y&&Pn(Object.getPrototypeOf(n),g),(C||!i.is(ai))&&e.emit(Nt,n)}return{setup:c,destroy:m,reduce:$,set:w}}var Bo="Arrow",zo=Bo+"Left",jo=Bo+"Right",Bs=Bo+"Up",zs=Bo+"Down",ga="rtl",Do="ttb",ir={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Bs,jo],ArrowRight:[zs,zo]};function vc(e,t,n){function i(s,a,d){d=d||n.direction;var c=d===ga&&!a?1:d===Do?0:-1;return ir[s]&&ir[s][c]||s.replace(/width|left|right/i,function(m,p){var x=ir[m.toLowerCase()][c]||m;return p>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(s){return s*(n.direction===ga?1:-1)}return{resolve:i,orient:o}}var fn="role",li="tabindex",xc="disabled",en="aria-",Xi=en+"controls",js=en+"current",ha=en+"selected",Vt=en+"label",Gr=en+"labelledby",Ds=en+"hidden",Kr=en+"orientation",Ni=en+"roledescription",fa=en+"live",ya=en+"busy",va=en+"atomic",Ur=[fn,li,xc,Xi,js,Vt,Gr,Ds,Kr,Ni],an=Ui+"__",Fn="is-",or=Ui,xa=an+"track",bc=an+"list",Vo=an+"slide",Vs=Vo+"--clone",wc=Vo+"__container",Xr=an+"arrows",qo=an+"arrow",qs=qo+"--prev",Gs=qo+"--next",Go=an+"pagination",Ks=Go+"__page",$c=an+"progress",Sc=$c+"__bar",Cc=an+"toggle",Tc=an+"spinner",Lc=an+"sr",Ic=Fn+"initialized",Un=Fn+"active",Us=Fn+"prev",Xs=Fn+"next",Tr=Fn+"visible",Lr=Fn+"loading",Ys=Fn+"focus-in",Js=Fn+"overflow",Ec=[Un,Tr,Us,Xs,Lr,Ys,Js],Pc={slide:Vo,clone:Vs,arrows:Xr,arrow:qo,prev:qs,next:Gs,pagination:Go,page:Ks,spinner:Tc};function Rc(e,t){if(vs(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ki(n,t);)n=n.parentElement;return n}var Mc=5,ba=200,Zs="touchstart mousedown",rr="touchmove mousemove",ar="touchend touchcancel mouseup click";function kc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=e.root,d=n.i18n,c={},m=[],p=[],x=[],$,w,g;function y(){I(),N(),L()}function C(){o(Tt,b),o(Tt,y),o(Nt,L),s(document,Zs+" keydown",function(A){g=A.type==="keydown"},{capture:!0}),s(a,"focusin",function(){gn(a,Ys,!!g)})}function b(A){var T=Ur.concat("style");xn(m),hn(a,p),hn($,x),rn([$,w],T),rn(a,A?T:["style",Ni])}function L(){hn(a,p),hn($,x),p=O(or),x=O(xa),on(a,p),on($,x),Oe(a,Vt,n.label),Oe(a,Gr,n.labelledby)}function I(){$=R("."+xa),w=Ki($,"."+bc),Li($&&w,"A track/list element is missing."),wo(m,bs(w,"."+Vo+":not(."+Vs+")")),Gn({arrows:Xr,pagination:Go,prev:qs,next:Gs,bar:Sc,toggle:Cc},function(A,T){c[T]=R("."+A)}),_i(c,{root:a,track:$,list:w,slides:m})}function N(){var A=a.id||mc(Ui),T=n.role;a.id=A,$.id=$.id||A+"-track",w.id=w.id||A+"-list",!Zt(a,fn)&&a.tagName!=="SECTION"&&T&&Oe(a,fn,T),Oe(a,Ni,d.carousel),Oe(w,fn,"presentation")}function R(A){var T=Ss(a,A);return T&&Rc(T,"."+or)===a?T:void 0}function O(A){return[A+"--"+n.type,A+"--"+n.direction,n.drag&&A+"--draggable",n.isNavigation&&A+"--nav",A===or&&Un]}return _i(c,{setup:y,mount:C,destroy:b})}var ui="slide",wi="loop",Yi="fade";function Ac(e,t,n,i){var o=xt(e),s=o.on,a=o.emit,d=o.bind,c=e.Components,m=e.root,p=e.options,x=p.isNavigation,$=p.updateOnMove,w=p.i18n,g=p.pagination,y=p.slideFocus,C=c.Direction.resolve,b=Zt(i,"style"),L=Zt(i,Vt),I=n>-1,N=Ki(i,"."+wc),R;function O(){I||(i.id=m.id+"-slide"+Or(t+1),Oe(i,fn,g?"tabpanel":"group"),Oe(i,Ni,w.slide),Oe(i,Vt,L||Sr(w.slideLabel,[t+1,e.length]))),A()}function A(){d(i,"click",mt(a,Br,W)),d(i,"keydown",mt(a,Hs,W)),s([bi,Os,Xn],M),s(jr,J),$&&s(bn,v)}function T(){R=!0,o.destroy(),hn(i,Ec),rn(i,Ur),Oe(i,"style",b),Oe(i,Vt,L||"")}function J(){var k=e.splides.map(function(E){var q=E.splide.Components.Slides.getAt(t);return q?q.slide.id:""}).join(" ");Oe(i,Vt,Sr(w.slideX,(I?n:t)+1)),Oe(i,Xi,k),Oe(i,fn,y?"button":""),y&&rn(i,Ni)}function v(){R||M()}function M(){if(!R){var k=e.index;B(),V(),gn(i,Us,t===k-1),gn(i,Xs,t===k+1)}}function B(){var k=ce();k!==pa(i,Un)&&(gn(i,Un,k),Oe(i,js,x&&k||""),a(k?Ls:Is,W))}function V(){var k=U(),E=!k&&(!ce()||I);if(e.state.is([xi,Di])||Oe(i,Ds,E||""),Oe(Nr(i,p.focusableNodes||""),li,E?-1:""),y&&Oe(i,li,E?-1:0),k!==pa(i,Tr)&&(gn(i,Tr,k),a(k?Es:Ps,W)),!k&&document.activeElement===i){var q=c.Slides.getAt(e.index);q&&ws(q.slide)}}function te(k,E,q){Jt(q&&N||i,k,E)}function ce(){var k=e.index;return k===t||p.cloneStatus&&k===n}function U(){if(e.is(Yi))return ce();var k=Dt(c.Elements.track),E=Dt(i),q=C("left",!0),Z=C("right",!0);return Ro(k[q])<=Wi(E[q])&&Ro(E[Z])<=Wi(k[Z])}function j(k,E){var q=zt(k-t);return!I&&(p.rewind||e.is(wi))&&(q=Mn(q,e.length-q)),q<=E}var W={index:t,slideIndex:n,slide:i,container:N,isClone:I,mount:O,destroy:T,update:M,style:te,isWithin:j};return W}function _c(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=i.bind,d=t.Elements,c=d.slides,m=d.list,p=[];function x(){$(),o(Tt,w),o(Tt,$)}function $(){c.forEach(function(M,B){y(M,B,-1)})}function w(){R(function(M){M.destroy()}),xn(p)}function g(){R(function(M){M.update()})}function y(M,B,V){var te=Ac(e,B,V,M);te.mount(),p.push(te),p.sort(function(ce,U){return ce.index-U.index})}function C(M){return M?O(function(B){return!B.isClone}):p}function b(M){var B=t.Controller,V=B.toIndex(M),te=B.hasFocus()?1:n.perPage;return O(function(ce){return $o(ce.index,V,V+te-1)})}function L(M){return O(M)[0]}function I(M,B){Kt(M,function(V){if(Rn(V)&&(V=$s(V)),xs(V)){var te=c[B];te?Wr(V,te):Gi(m,V),on(V,n.classes.slide),T(V,mt(s,di))}}),s(Tt)}function N(M){Kn(O(M).map(function(B){return B.slide})),s(Tt)}function R(M,B){C(B).forEach(M)}function O(M){return p.filter(vs(M)?M:function(B){return Rn(M)?ki(B.slide,M):Fr(qi(M),B.index)})}function A(M,B,V){R(function(te){te.style(M,B,V)})}function T(M,B){var V=Nr(M,"img"),te=V.length;te?V.forEach(function(ce){a(ce,"load error",function(){--te||B()})}):B()}function J(M){return M?c.length:p.length}function v(){return p.length>n.perPage}return{mount:x,destroy:w,update:g,register:y,get:C,getIn:b,getAt:L,add:I,remove:N,forEach:R,filter:O,style:A,getLength:J,isEnough:v}}function Fc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.emit,d=t.Slides,c=t.Direction.resolve,m=t.Elements,p=m.root,x=m.track,$=m.list,w=d.getAt,g=d.style,y,C,b;function L(){I(),s(window,"resize load",fc(mt(a,di))),o([Nt,Tt],I),o(di,N)}function I(){y=n.direction===Do,Jt(p,"maxWidth",On(n.width)),Jt(x,c("paddingLeft"),R(!1)),Jt(x,c("paddingRight"),R(!0)),N(!0)}function N(W){var k=Dt(p);(W||C.width!==k.width||C.height!==k.height)&&(Jt(x,"height",O()),g(c("marginRight"),On(n.gap)),g("width",T()),g("height",J(),!0),C=k,a(No),b!==(b=j())&&(gn(p,Js,b),a(gc,b)))}function R(W){var k=n.padding,E=c(W?"right":"left");return k&&On(k[E]||(Mi(k)?0:k))||"0px"}function O(){var W="";return y&&(W=A(),Li(W,"height or heightRatio is missing."),W="calc("+W+" - "+R(!1)+" - "+R(!0)+")"),W}function A(){return On(n.height||Dt($).width*n.heightRatio)}function T(){return n.autoWidth?null:On(n.fixedWidth)||(y?"":v())}function J(){return On(n.fixedHeight)||(y?n.autoHeight?null:v():A())}function v(){var W=On(n.gap);return"calc((100%"+(W&&" + "+W)+")/"+(n.perPage||1)+(W&&" - "+W)+")"}function M(){return Dt($)[c("width")]}function B(W,k){var E=w(W||0);return E?Dt(E.slide)[c("width")]+(k?0:ce()):0}function V(W,k){var E=w(W);if(E){var q=Dt(E.slide)[c("right")],Z=Dt($)[c("left")];return zt(q-Z)+(k?0:ce())}return 0}function te(W){return V(e.length-1)-V(0)+B(0,W)}function ce(){var W=w(0);return W&&parseFloat(Jt(W.slide,c("marginRight")))||0}function U(W){return parseFloat(Jt(x,c("padding"+(W?"Right":"Left"))))||0}function j(){return e.is(Yi)||te(!0)>M()}return{mount:L,resize:N,listSize:M,slideSize:B,sliderSize:te,totalSize:V,getPadding:U,isOverflow:j}}var Wc=2;function Nc(e,t,n){var i=xt(e),o=i.on,s=t.Elements,a=t.Slides,d=t.Direction.resolve,c=[],m;function p(){o(Tt,x),o([Nt,di],w),(m=C())&&(g(m),t.Layout.resize(!0))}function x(){$(),p()}function $(){Kn(c),xn(c),i.destroy()}function w(){var b=C();m!==b&&(m<b||!b)&&i.emit(Tt)}function g(b){var L=a.get().slice(),I=L.length;if(I){for(;L.length<b;)wo(L,L);wo(L.slice(-b),L.slice(0,b)).forEach(function(N,R){var O=R<b,A=y(N.slide,R);O?Wr(A,L[0].slide):Gi(s.list,A),wo(c,A),a.register(A,R-b+(O?0:I),N.index)})}}function y(b,L){var I=b.cloneNode(!0);return on(I,n.classes.clone),I.id=e.root.id+"-clone"+Or(L+1),I}function C(){var b=n.clones;if(!e.is(wi))b=0;else if(Vi(b)){var L=n[d("fixedWidth")]&&t.Layout.slideSize(0),I=L&&Wi(Dt(s.track)[d("width")]/L);b=I||n[d("autoWidth")]&&e.length||n.perPage*Wc}return b}return{mount:p,destroy:$}}function Hc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Layout,c=d.slideSize,m=d.getPadding,p=d.totalSize,x=d.listSize,$=d.sliderSize,w=t.Direction,g=w.resolve,y=w.orient,C=t.Elements,b=C.list,L=C.track,I;function N(){I=t.Transition,o([_n,No,Nt,Tt],R)}function R(){t.Controller.isBusy()||(t.Scroll.cancel(),A(e.index),t.Slides.update())}function O(E,q,Z,X){E!==q&&W(E>Z)&&(M(),T(v(te(),E>Z),!0)),a(xi),s(bn,q,Z,E),I.start(q,function(){a(ci),s(bi,q,Z,E),X&&X()})}function A(E){T(V(E,!0))}function T(E,q){if(!e.is(Yi)){var Z=q?E:J(E);Jt(b,"transform","translate"+g("X")+"("+Z+"px)"),E!==Z&&s(Os)}}function J(E){if(e.is(wi)){var q=B(E),Z=q>t.Controller.getEnd(),X=q<0;(X||Z)&&(E=v(E,Z))}return E}function v(E,q){var Z=E-j(q),X=$();return E-=y(X*(Wi(zt(Z)/X)||1))*(q?1:-1),E}function M(){T(te(),!0),I.cancel()}function B(E){for(var q=t.Slides.get(),Z=0,X=1/0,z=0;z<q.length;z++){var re=q[z].index,h=zt(V(re,!0)-E);if(h<=X)X=h,Z=re;else break}return Z}function V(E,q){var Z=y(p(E-1)-U(E));return q?ce(Z):Z}function te(){var E=g("left");return Dt(b)[E]-Dt(L)[E]+y(m(!1))}function ce(E){return n.trimSpace&&e.is(ui)&&(E=ii(E,0,y($(!0)-x()))),E}function U(E){var q=n.focus;return q==="center"?(x()-c(E,!0))/2:+q*c(E)||0}function j(E){return V(E?t.Controller.getEnd():0,!!n.trimSpace)}function W(E){var q=y(v(te(),E));return E?q>=0:q<=b[g("scrollWidth")]-Dt(L)[g("width")]}function k(E,q){q=Vi(q)?te():q;var Z=E!==!0&&y(q)<y(j(!1)),X=E!==!1&&y(q)>y(j(!0));return Z||X}return{mount:N,move:O,jump:A,translate:T,shift:v,cancel:M,toIndex:B,toPosition:V,getPosition:te,getLimit:j,exceededLimit:k,reposition:R}}function Oc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=t.Move,d=a.getPosition,c=a.getLimit,m=a.toPosition,p=t.Slides,x=p.isEnough,$=p.getLength,w=n.omitEnd,g=e.is(wi),y=e.is(ui),C=mt(te,!1),b=mt(te,!0),L=n.start||0,I,N=L,R,O,A;function T(){J(),o([Nt,Tt,Mo],J),o(No,v)}function J(){R=$(!0),O=n.perMove,A=n.perPage,I=W();var h=ii(L,0,w?I:R-1);h!==L&&(L=h,a.reposition())}function v(){I!==W()&&s(Mo)}function M(h,le,ve){if(!re()){var he=V(h),Re=j(he);Re>-1&&(le||Re!==L)&&(Z(Re),a.move(he,Re,N,ve))}}function B(h,le,ve,he){t.Scroll.scroll(h,le,ve,function(){var Re=j(a.toIndex(d()));Z(w?Mn(Re,I):Re),he&&he()})}function V(h){var le=L;if(Rn(h)){var ve=h.match(/([+\-<>])(\d+)?/)||[],he=ve[1],Re=ve[2];he==="+"||he==="-"?le=ce(L+ +(""+he+(+Re||1)),L):he===">"?le=Re?k(+Re):C(!0):he==="<"&&(le=b(!0))}else le=g?h:ii(h,0,I);return le}function te(h,le){var ve=O||(z()?1:A),he=ce(L+ve*(h?-1:1),L,!(O||z()));return he===-1&&y&&!Cs(d(),c(!h),1)?h?0:I:le?he:j(he)}function ce(h,le,ve){if(x()||z()){var he=U(h);he!==h&&(le=h,h=he,ve=!1),h<0||h>I?!O&&($o(0,h,le,!0)||$o(I,le,h,!0))?h=k(E(h)):g?h=ve?h<0?-(R%A||A):R:h:n.rewind?h=h<0?I:0:h=-1:ve&&h!==le&&(h=k(E(le)+(h<le?-1:1)))}else h=-1;return h}function U(h){if(y&&n.trimSpace==="move"&&h!==L)for(var le=d();le===m(h,!0)&&$o(h,0,e.length-1,!n.rewind);)h<L?--h:++h;return h}function j(h){return g?(h+R)%R||0:h}function W(){for(var h=R-(z()||g&&O?1:A);w&&h-- >0;)if(m(R-1,!0)!==m(h,!0)){h++;break}return ii(h,0,R-1)}function k(h){return ii(z()?h:A*h,0,I)}function E(h){return z()?Mn(h,I):Ro((h>=I?R-1:h)/A)}function q(h){var le=a.toIndex(h);return y?ii(le,0,I):le}function Z(h){h!==L&&(N=L,L=h)}function X(h){return h?N:L}function z(){return!Vi(n.focus)||n.isNavigation}function re(){return e.state.is([xi,Di])&&!!n.waitForTransition}return{mount:T,go:M,scroll:B,getNext:C,getPrev:b,getAdjacent:te,getEnd:W,setIndex:Z,getIndex:X,toIndex:k,toPage:E,toDest:q,hasFocus:z,isBusy:re}}var Bc="http://www.w3.org/2000/svg",zc="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",io=40;function jc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.emit,d=n.classes,c=n.i18n,m=t.Elements,p=t.Controller,x=m.arrows,$=m.track,w=x,g=m.prev,y=m.next,C,b,L={};function I(){R(),o(Nt,N)}function N(){O(),I()}function R(){var B=n.arrows;B&&!(g&&y)&&J(),g&&y&&(_i(L,{prev:g,next:y}),Fi(w,B?"":"none"),on(w,b=Xr+"--"+n.direction),B&&(A(),M(),Oe([g,y],Xi,$.id),a(As,g,y)))}function O(){i.destroy(),hn(w,b),C?(Kn(x?[g,y]:w),g=y=null):rn([g,y],Ur)}function A(){o([_n,bi,Tt,Xn,Mo],M),s(y,"click",mt(T,">")),s(g,"click",mt(T,"<"))}function T(B){p.go(B,!0)}function J(){w=x||si("div",d.arrows),g=v(!0),y=v(!1),C=!0,Gi(w,[g,y]),!x&&Wr(w,$)}function v(B){var V='<button class="'+d.arrow+" "+(B?d.prev:d.next)+'" type="button"><svg xmlns="'+Bc+'" viewBox="0 0 '+io+" "+io+'" width="'+io+'" height="'+io+'" focusable="false"><path d="'+(n.arrowPath||zc)+'" />';return $s(V)}function M(){if(g&&y){var B=e.index,V=p.getPrev(),te=p.getNext(),ce=V>-1&&B<V?c.last:c.prev,U=te>-1&&B>te?c.first:c.next;g.disabled=V<0,y.disabled=te<0,Oe(g,Vt,ce),Oe(y,Vt,U),a(_s,g,y,V,te)}}return{arrows:L,mount:I,destroy:O,update:M}}var Dc=Hr+"-interval";function Vc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.emit,d=Oo(n.interval,e.go.bind(e,">"),A),c=d.isPaused,m=t.Elements,p=t.Elements,x=p.root,$=p.toggle,w=n.autoplay,g,y,C=w==="pause";function b(){w&&(L(),$&&Oe($,Xi,m.track.id),C||I(),O())}function L(){n.pauseOnHover&&s(x,"mouseenter mouseleave",function(J){g=J.type==="mouseenter",R()}),n.pauseOnFocus&&s(x,"focusin focusout",function(J){y=J.type==="focusin",R()}),$&&s($,"click",function(){C?I():N(!0)}),o([bn,Ho,Tt],d.rewind),o(bn,T)}function I(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),y=g=C=!1,O(),a(Dr))}function N(J){J===void 0&&(J=!0),C=!!J,O(),c()||(d.pause(),a(Vr))}function R(){C||(g||y?N(!1):I())}function O(){$&&(gn($,Un,!C),Oe($,Vt,n.i18n[C?"play":"pause"]))}function A(J){var v=m.bar;v&&Jt(v,"width",J*100+"%"),a(Ns,J)}function T(J){var v=t.Slides.getAt(J);d.set(v&&+Zt(v.slide,Dc)||n.interval)}return{mount:b,destroy:d.cancel,play:I,pause:N,isPaused:c}}function qc(e,t,n){var i=xt(e),o=i.on;function s(){n.cover&&(o(qr,mt(d,!0)),o([_n,Nt,Tt],mt(a,!0)))}function a(c){t.Slides.forEach(function(m){var p=Ki(m.container||m.slide,"img");p&&p.src&&d(c,p,m)})}function d(c,m,p){p.style("background",c?'center/cover no-repeat url("'+m.src+'")':"",!0),Fi(m,c?"none":"")}return{mount:s,destroy:mt(a,!1)}}var Gc=10,Kc=600,Uc=.6,Xc=1.5,Yc=800;function Jc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Move,c=d.getPosition,m=d.getLimit,p=d.exceededLimit,x=d.translate,$=e.is(ui),w,g,y=1;function C(){o(bn,N),o([Nt,Tt],R)}function b(A,T,J,v,M){var B=c();if(N(),J&&(!$||!p())){var V=t.Layout.sliderSize(),te=$r(A)*V*Ro(zt(A)/V)||0;A=d.toPosition(t.Controller.toDest(A%V))+te}var ce=Cs(B,A,1);y=1,T=ce?0:T||Po(zt(A-B)/Xc,Yc),g=v,w=Oo(T,L,mt(I,B,A,M),1),a(Di),s(Ho),w.start()}function L(){a(ci),g&&g(),s(Xn)}function I(A,T,J,v){var M=c(),B=A+(T-A)*O(v),V=(B-M)*y;x(M+V),$&&!J&&p()&&(y*=Uc,zt(V)<Gc&&b(m(p(!0)),Kc,!1,g,!0))}function N(){w&&w.cancel()}function R(){w&&!w.isPaused()&&(N(),L())}function O(A){var T=n.easingFunc;return T?T(A):1-Math.pow(1-A,4)}return{mount:C,destroy:N,scroll:b,cancel:R}}var oi={passive:!1,capture:!0};function Zc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=i.bind,d=i.unbind,c=e.state,m=t.Move,p=t.Scroll,x=t.Controller,$=t.Elements.track,w=t.Media.reduce,g=t.Direction,y=g.resolve,C=g.orient,b=m.getPosition,L=m.exceededLimit,I,N,R,O,A,T=!1,J,v,M;function B(){a($,rr,br,oi),a($,ar,br,oi),a($,Zs,te,oi),a($,"click",j,{capture:!0}),a($,"dragstart",mn),o([_n,Nt],V)}function V(){var Y=n.drag;ge(!Y),O=Y==="free"}function te(Y){if(J=!1,!v){var fe=Re(Y);he(Y.target)&&(fe||!Y.button)&&(x.isBusy()?mn(Y,!0):(M=fe?$:window,A=c.is([xi,Di]),R=null,a(M,rr,ce,oi),a(M,ar,U,oi),m.cancel(),p.cancel(),W(Y)))}}function ce(Y){if(c.is(bo)||(c.set(bo),s(Rs)),Y.cancelable)if(A){m.translate(I+ve(z(Y)));var fe=re(Y)>ba,ae=T!==(T=L());(fe||ae)&&W(Y),J=!0,s(Ms),mn(Y)}else q(Y)&&(A=E(Y),mn(Y))}function U(Y){c.is(bo)&&(c.set(ci),s(ks)),A&&(k(Y),mn(Y)),d(M,rr,ce),d(M,ar,U),A=!1}function j(Y){!v&&J&&mn(Y,!0)}function W(Y){R=N,N=Y,I=b()}function k(Y){var fe=Z(Y),ae=X(fe),se=n.rewind&&n.rewindByDrag;w(!1),O?x.scroll(ae,0,n.snap):e.is(Yi)?x.go(C($r(fe))<0?se?"<":"-":se?">":"+"):e.is(ui)&&T&&se?x.go(L(!0)?">":"<"):x.go(x.toDest(ae),!0),w(!0)}function E(Y){var fe=n.dragMinThreshold,ae=Mi(fe),se=ae&&fe.mouse||0,ne=(ae?fe.touch:+fe)||10;return zt(z(Y))>(Re(Y)?ne:se)}function q(Y){return zt(z(Y))>zt(z(Y,!0))}function Z(Y){if(e.is(wi)||!T){var fe=re(Y);if(fe&&fe<ba)return z(Y)/fe}return 0}function X(Y){return b()+$r(Y)*Mn(zt(Y)*(n.flickPower||600),O?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function z(Y,fe){return le(Y,fe)-le(h(Y),fe)}function re(Y){return wr(Y)-wr(h(Y))}function h(Y){return N===Y&&R||N}function le(Y,fe){return(Re(Y)?Y.changedTouches[0]:Y)["page"+y(fe?"Y":"X")]}function ve(Y){return Y/(T&&e.is(ui)?Mc:1)}function he(Y){var fe=n.noDrag;return!ki(Y,"."+Ks+", ."+qo)&&(!fe||!ki(Y,fe))}function Re(Y){return typeof TouchEvent<"u"&&Y instanceof TouchEvent}function ee(){return A}function ge(Y){v=Y}return{mount:B,disable:ge,isDragging:ee}}var Qc={Spacebar:" ",Right:jo,Left:zo,Up:Bs,Down:zs};function Yr(e){return e=Rn(e)?e:e.key,Qc[e]||e}var wa="keydown";function ed(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.unbind,d=e.root,c=t.Direction.resolve,m,p;function x(){$(),o(Nt,w),o(Nt,$),o(bn,y)}function $(){var b=n.keyboard;b&&(m=b==="global"?window:d,s(m,wa,C))}function w(){a(m,wa)}function g(b){p=b}function y(){var b=p;p=!0,ys(function(){p=b})}function C(b){if(!p){var L=Yr(b);L===c(zo)?e.go("<"):L===c(jo)&&e.go(">")}}return{mount:x,destroy:w,disable:g}}var Ii=Hr+"-lazy",So=Ii+"-srcset",td="["+Ii+"], ["+So+"]";function nd(e,t,n){var i=xt(e),o=i.on,s=i.off,a=i.bind,d=i.emit,c=n.lazyLoad==="sequential",m=[bi,Xn],p=[];function x(){n.lazyLoad&&($(),o(Tt,$))}function $(){xn(p),w(),c?b():(s(m),o(m,g),g())}function w(){t.Slides.forEach(function(L){Nr(L.slide,td).forEach(function(I){var N=Zt(I,Ii),R=Zt(I,So);if(N!==I.src||R!==I.srcset){var O=n.classes.spinner,A=I.parentElement,T=Ki(A,"."+O)||si("span",O,A);p.push([I,L,T]),I.src||Fi(I,"none")}})})}function g(){p=p.filter(function(L){var I=n.perPage*((n.preloadPages||1)+1)-1;return L[1].isWithin(e.index,I)?y(L):!0}),p.length||s(m)}function y(L){var I=L[0];on(L[1].slide,Lr),a(I,"load error",mt(C,L)),Oe(I,"src",Zt(I,Ii)),Oe(I,"srcset",Zt(I,So)),rn(I,Ii),rn(I,So)}function C(L,I){var N=L[0],R=L[1];hn(R.slide,Lr),I.type!=="error"&&(Kn(L[2]),Fi(N,""),d(qr,N,R),d(di)),c&&b()}function b(){p.length&&y(p.shift())}return{mount:x,destroy:mt(xn,p),check:g}}function id(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=i.bind,d=t.Slides,c=t.Elements,m=t.Controller,p=m.hasFocus,x=m.getIndex,$=m.go,w=t.Direction.resolve,g=c.pagination,y=[],C,b;function L(){I(),o([Nt,Tt,Mo],L);var v=n.pagination;g&&Fi(g,v?"":"none"),v&&(o([bn,Ho,Xn],J),N(),J(),s(Fs,{list:C,items:y},T(e.index)))}function I(){C&&(Kn(g?An(C.children):C),hn(C,b),xn(y),C=null),i.destroy()}function N(){var v=e.length,M=n.classes,B=n.i18n,V=n.perPage,te=p()?m.getEnd()+1:Wi(v/V);C=g||si("ul",M.pagination,c.track.parentElement),on(C,b=Go+"--"+A()),Oe(C,fn,"tablist"),Oe(C,Vt,B.select),Oe(C,Kr,A()===Do?"vertical":"");for(var ce=0;ce<te;ce++){var U=si("li",null,C),j=si("button",{class:M.page,type:"button"},U),W=d.getIn(ce).map(function(E){return E.slide.id}),k=!p()&&V>1?B.pageX:B.slideX;a(j,"click",mt(R,ce)),n.paginationKeyboard&&a(j,"keydown",mt(O,ce)),Oe(U,fn,"presentation"),Oe(j,fn,"tab"),Oe(j,Xi,W.join(" ")),Oe(j,Vt,Sr(k,ce+1)),Oe(j,li,-1),y.push({li:U,button:j,page:ce})}}function R(v){$(">"+v,!0)}function O(v,M){var B=y.length,V=Yr(M),te=A(),ce=-1;V===w(jo,!1,te)?ce=++v%B:V===w(zo,!1,te)?ce=(--v+B)%B:V==="Home"?ce=0:V==="End"&&(ce=B-1);var U=y[ce];U&&(ws(U.button),$(">"+ce),mn(M,!0))}function A(){return n.paginationDirection||n.direction}function T(v){return y[m.toPage(v)]}function J(){var v=T(x(!0)),M=T(x());if(v){var B=v.button;hn(B,Un),rn(B,ha),Oe(B,li,-1)}if(M){var V=M.button;on(V,Un),Oe(V,ha,!0),Oe(V,li,"")}s(Ws,{list:C,items:y},v,M)}return{items:y,mount:L,destroy:I,getAt:T,update:J}}var od=[" ","Enter"];function rd(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(g){g.isParent||(m(e,g.splide),m(g.splide,e))}),i&&p()}function d(){s.forEach(function(g){g.destroy()}),xn(s)}function c(){d(),a()}function m(g,y){var C=xt(g);C.on(bn,function(b,L,I){y.go(y.is(wi)?I:b)}),s.push(C)}function p(){var g=xt(e),y=g.on;y(Br,$),y(Hs,w),y([_n,Nt],x),s.push(g),g.emit(jr,e.splides)}function x(){Oe(t.Elements.list,Kr,n.direction===Do?"vertical":"")}function $(g){e.go(g.index)}function w(g,y){Fr(od,Yr(y))&&($(g),mn(y))}return{setup:mt(t.Media.set,{slideFocus:Vi(o)?i:o},!0),mount:a,destroy:d,remount:c}}function ad(e,t,n){var i=xt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",d,oi)}function d(m){if(m.cancelable){var p=m.deltaY,x=p<0,$=wr(m),w=n.wheelMinThreshold||0,g=n.wheelSleep||0;zt(p)>w&&$-s>g&&(e.go(x?"<":">"),s=$),c(x)&&mn(m)}}function c(m){return!n.releaseWheel||e.state.is(xi)||t.Controller.getAdjacent(m)!==-1}return{mount:a}}var sd=90;function ld(e,t,n){var i=xt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,d=si("span",Lc),c=Oo(sd,mt(p,!1));function m(){a&&($(!t.Autoplay.isPaused()),Oe(s,va,!0),d.textContent="…",o(Dr,mt($,!0)),o(Vr,mt($,!1)),o([bi,Xn],mt(p,!0)))}function p(w){Oe(s,ya,w),w?(Gi(s,d),c.start()):(Kn(d),c.cancel())}function x(){rn(s,[fa,va,ya]),Kn(d)}function $(w){a&&Oe(s,fa,w?"off":"polite")}return{mount:m,disable:$,destroy:x}}var cd=Object.freeze({__proto__:null,Media:yc,Direction:vc,Elements:kc,Slides:_c,Layout:Fc,Clones:Nc,Move:Hc,Controller:Oc,Arrows:jc,Autoplay:Vc,Cover:qc,Scroll:Jc,Drag:Zc,Keyboard:ed,LazyLoad:nd,Pagination:id,Sync:rd,Wheel:ad,Live:ld}),dd={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"},ud={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:Pc,i18n:dd,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function pd(e,t,n){var i=t.Slides;function o(){xt(e).on([_n,Tt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function a(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),ys(c)}return{mount:o,start:a,cancel:br}}function md(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,d=mt(Jt,a,"transition"),c;function m(){xt(e).bind(a,"transitionend",function(w){w.target===a&&c&&(x(),c())})}function p(w,g){var y=i.toPosition(w,!0),C=i.getPosition(),b=$(w);zt(y-C)>=1&&b>=1?n.useScroll?s.scroll(y,b,!1,g):(d("transform "+b+"ms "+n.easing),i.translate(y,!0),c=g):(i.jump(w),g())}function x(){d(""),s.cancel()}function $(w){var g=n.rewindSpeed;if(e.is(ui)&&g){var y=o.getIndex(!0),C=o.getEnd();if(y===0&&w>=C||y>=C&&w===0)return g}return n.speed}return{mount:m,start:p,cancel:x}}var gd=(function(){function e(n,i){this.event=xt(),this.Components={},this.state=hc(ai),this.splides=[],this._o={},this._E={};var o=Rn(n)?Ss(document,n):n;Li(o,o+" is invalid."),this.root=o,i=Pn({label:Zt(o,Vt)||"",labelledby:Zt(o,Gr)||""},ud,e.defaults,i||{});try{Pn(i,JSON.parse(Zt(o,Hr)))}catch{Li(!1,"Invalid JSON")}this._o=Object.create(Pn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,d=this.Components;Li(a.is([ai,Eo]),"Already mounted!"),a.set(ai),this._C=d,this._T=o||this._T||(this.is(Yi)?pd:md),this._E=i||this._E;var c=_i({},cd,this._E,{Transition:this._T});return Gn(c,function(m,p){var x=m(s,d,s._o);d[p]=x,x.setup&&x.setup()}),Gn(d,function(m){m.mount&&m.mount()}),this.emit(_n),on(this.root,Ic),a.set(ci),this.emit(Cr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(ci)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(An(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Tt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(ai)?xt(this).on(Cr,this.destroy.bind(this,i)):(Gn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(zr),o.destroy(),i&&xn(this.splides),s.set(Eo)),this},dc(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Jr=gd;Jr.defaults={};Jr.STATES=pc;var $a=[[_n,"onMounted"],[Cr,"onReady"],[bn,"onMove"],[bi,"onMoved"],[Br,"onClick"],[Ls,"onActive"],[Is,"onInactive"],[Es,"onVisible"],[Ps,"onHidden"],[Tt,"onRefresh"],[Nt,"onUpdated"],[di,"onResize"],[No,"onResized"],[Rs,"onDrag"],[Ms,"onDragging"],[ks,"onDragged"],[Ho,"onScroll"],[Xn,"onScrolled"],[zr,"onDestroy"],[As,"onArrowsMounted"],[_s,"onArrowsUpdated"],[Fs,"onPaginationMounted"],[Ws,"onPaginationUpdated"],[jr,"onNavigationMounted"],[Dr,"onAutoplayPlay"],[Ns,"onAutoplayPlaying"],[Vr,"onAutoplayPause"],[qr,"onLazyLoadLoaded"]];function Zr(...e){return e.filter(Boolean).join(" ")}function ko(e){return e!==null&&typeof e=="object"}function Ir(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Ir(n,t[i]));if(ko(e)&&ko(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Ir(e[o],t[o]))}return e===t}function hd(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function fd(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function Er(e,t){const n=e;return fd(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ko(i)?n[o]=Er(ko(n[o])?n[o]:{},i):n[o]=i}),n}var yd=({children:e,className:t,...n})=>l.createElement("div",{className:Zr("splide__track",t),...n},l.createElement("ul",{className:"splide__list"},e)),Qr=class extends l.Component{constructor(){super(...arguments),this.splideRef=l.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Jr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Er({},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&&!Ir(this.options,e)&&(this.splide.options=e,this.options=Er({},e));const t=this.getSlides();hd(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){$a.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(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:i,...o}=this.props;return l.createElement(t,{className:Zr("splide",e),ref:this.splideRef,...this.omit(o,["options",...$a.map(s=>s[1])])},n?l.createElement(yd,null,i):i)}},ea=({children:e,className:t,...n})=>l.createElement("li",{className:Zr("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 yd="RichTextRenderer-module__link___BWeZ2",vd={link:yd},xd=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Ko=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>xd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function qt(e){const{color:t,...n}=e;return n}function kt(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Ko(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:_.scalingValue(e.letterSpacing,t),wordSpacing:_.scalingValue(e.wordSpacing,t),fontSize:_.scalingValue(n,t),lineHeight:i!==void 0?_.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const ui=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:vd.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:bd(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function bd(e){return{...e.fontFamily&&{fontFamily:Ko(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 wd="SvgImage-module__svg___q3xE-",$d="SvgImage-module__img___VsTm-",$a={svg:wd,img:$d},Sd=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Cd=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Qt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=l.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return l.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(d)}},[]),!Sd(e)||!s?r.jsx("img",{src:e,alt:"",className:je($a.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:je($a.svg,i),style:{"--svg":Cd(e),"--fill":t,"--hover-fill":n,...o??{}}})},Td={"top-left":Pe.topLeftAlignment,"top-center":Pe.topCenterAlignment,"top-right":Pe.topRightAlignment,"middle-left":Pe.middleLeftAlignment,"middle-center":Pe.middleCenterAlignment,"middle-right":Pe.middleRightAlignment,"bottom-left":Pe.bottomLeftAlignment,"bottom-center":Pe.bottomCenterAlignment,"bottom-right":Pe.bottomRightAlignment};function Ld({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=l.useState(null),{widthSettings:a,fontSettings:d,letterSpacing:c,textAlign:m,wordSpacing:p,fontSizeLineHeight:x,textAppearance:$,color:w}=n.imageCaption??{},[g,y]=l.useState(void 0),[C,b]=l.useState(null),[L,I]=l.useState(0),[N,R]=l.useState(0),{direction:O,transition:A,controls:T,pagination:J,imageCaption:v,triggers:M}=e,B=l.useRef(A.type),{x:V,y:te}=e.controls.offset,ce=U=>{o&&o.go(U)};return l.useEffect(()=>{if(!C)return;const U=new ResizeObserver(j=>{if(!o)return;const[W]=j;y({width:Math.round(W.contentRect.width),height:Math.round(W.contentRect.height)})});return U.observe(C),()=>U.unobserve(C)},[C]),l.useEffect(()=>{!o||B.current===A.type||(R(U=>U+1),B.current=A.type)},[A.type]),r.jsx("div",{className:je(Pe.wrapper,{[Pe.editor]:i}),ref:b,children:r.jsxs("div",{className:Pe.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:A.backgroundColor&&A.type==="fade in"?A.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:je(Pe.captionBlock),children:r.jsx("div",{className:Pe.captionTextWrapper,children:t.map((U,j)=>r.jsx("div",{className:je(Pe.captionText,Td[v.alignment],{[Pe.withPointerEvents]:j===L&&i,[Pe.active]:j===L}),style:{fontFamily:Ko(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:a.sizing==="auto"?"max-content":_.scalingValue(a.width,i),letterSpacing:_.scalingValue(c,i),wordSpacing:_.scalingValue(p,i),textAlign:m,fontSize:_.scalingValue(x.fontSize,i),lineHeight:_.scalingValue(x.lineHeight,i),textTransform:$.textTransform??"none",textDecoration:$.textDecoration??"none",fontVariant:$.fontVariant??"normal",color:w,transitionDuration:A.duration?`${Math.round(parseInt(A.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Pe.captionTextInner,style:{"--link-hover-color":v.linkHoverColor,"--link-color":v.linkColor,position:"relative",top:_.scalingValue(v.offset.y,i),left:_.scalingValue(v.offset.x,i)},children:r.jsx(ui,{content:U.imageCaption})})},j))})}),r.jsx(Zr,{onMove:U=>{I(U.index)},ref:s,options:{arrows:!1,speed:A.duration?parseInt(A.duration):500,autoplay:M.autoPlay!==null,...M.autoPlay!==null&&{interval:parseInt(M.autoPlay)*1e3},direction:O==="horiz"||A.type==="fade in"?"ltr":"ttb",pagination:!1,drag:M.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:A.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((U,j)=>r.jsx(Qr,{children:r.jsx("div",{className:Pe.sliderItem,children:r.jsx("div",{className:Pe.imgWrapper,children:r.jsx("img",{className:je(Pe.sliderImage,{[Pe.contain]:U.image.objectFit==="contain",[Pe.cover]:U.image.objectFit==="cover"}),src:U.image.url,alt:U.image.name??""})})})},j))},N),T.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:je(Pe.arrow,{[Pe.arrowVertical]:O==="vert",[Pe.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:r.jsxs("button",{onClick:()=>{ce("-1")},className:Pe.arrowInner,style:{transform:`translate(${_.scalingValue(V,i)}, ${_.scalingValue(te*(O==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${O==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&r.jsx(Qt,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:je(Pe.arrowImg,Pe.mirror)}),!T.arrowsImgUrl&&r.jsx(Sa,{color:T.color,className:je(Pe.arrowIcon,Pe.arrowImg,Pe.mirror)})]})}),r.jsx("div",{className:je(Pe.arrow,Pe.nextArrow,{[Pe.arrowVertical]:O==="vert",[Pe.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:r.jsxs("button",{className:Pe.arrowInner,onClick:()=>ce("+1"),style:{transform:`translate(${_.scalingValue(V*(O==="horiz"?-1:1),i)}, ${_.scalingValue(te,i)}) scale(${e.controls.scale/100}) rotate(${O==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&r.jsx(Qt,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:Pe.arrowImg}),!T.arrowsImgUrl&&r.jsx(Sa,{color:T.color,className:je(Pe.arrowIcon,Pe.arrowImg)})]})})]}),M.triggersList.click&&r.jsx("div",{className:Pe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),J.isActive&&r.jsx("div",{className:je(Pe.pagination,{[Pe.paginationInsideBottom]:J.position==="inside-1"&&O==="horiz",[Pe.paginationInsideTop]:J.position==="inside-2"&&O==="horiz",[Pe.paginationOutsideBottom]:J.position==="outside-1"&&O==="horiz",[Pe.paginationOutsideTop]:J.position==="outside-2"&&O==="horiz",[Pe.paginationInsideLeft]:J.position==="inside-1"&&O==="vert",[Pe.paginationInsideRight]:J.position==="inside-2"&&O==="vert",[Pe.paginationOutsideLeft]:J.position==="outside-1"&&O==="vert",[Pe.paginationOutsideRight]:J.position==="outside-2"&&O==="vert",[Pe.paginationVertical]:O==="vert"}),children:r.jsx("div",{className:Pe.paginationInner,style:{backgroundColor:J.colors[2],transform:`scale(${J.scale/100}) translate(${_.scalingValue(J.offset.x,i)}, ${_.scalingValue(J.offset.y,i)}) rotate(${O==="horiz"?"0deg":"90deg"})`},children:t.map((U,j)=>r.jsx("button",{onClick:()=>{o&&o.go(j)},className:je(Pe.paginationItem),children:r.jsx("div",{className:je(Pe.dot,{[Pe.activeDot]:j===L}),style:{backgroundColor:j===L?J.colors[0]:J.colors[1],"--pagination-hover-color":J.hover}})},j))})})]})})}function Sa({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 Id={element:Ld,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"]}},Ed="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Pd="ImageRevealSlider-module__image___Qjt-e",Rd="ImageRevealSlider-module__link___N-iLG",Md="ImageRevealSlider-module__cursor___2U03d",Qn={imageRevealSlider:Ed,image:Pd,link:Rd,cursor:Md};function Ca(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,d=s/2,c=a/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function ar(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function kd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await ar(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await ar(e);s=a.height/a.width*o}else{const a=await ar(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function Ad({settings:e,content:t,isEditor:n}){const[i,o]=l.useState(null),[s,a]=l.useState([]),[d,c]=l.useState(0),m=l.useRef(0),[p,x]=l.useState({x:0,y:0}),[$,w]=l.useState(1),[g,y]=l.useState("none"),C=l.useRef({x:0,y:0}),[b,L]=l.useState(!1),{sizeType:I,imageWidth:N,randomRangeImageWidth:R}=e.imageSize,{revealPosition:O,visible:A}=e.position,{cursorType:T,target:J,defaultCursorScale:v,defaultCursor:M,hoverCursorScale:B,hoverCursor:V}=e.cursor;l.useEffect(()=>{if(!i)return;const U=(k,E)=>{const q=i.getBoundingClientRect(),Z=k-q.left,X=E-q.top;if(x({x:Z,y:X}),T==="system"){y("none"),w(1);return}const z=Z,re=X,h=document.elementFromPoint(q.left+z,q.top+re);if(h&&h.closest("a")){y("none"),w(1);return}const le=Ca(z,re,s)||J==="area"?{img:V??"none",scale:B}:{img:M??"none",scale:v};y(le.img),w(le.scale)},j=k=>{k.stopPropagation(),C.current={x:k.clientX,y:k.clientY},U(k.clientX,k.clientY)},W=()=>{b&&U(C.current.x,C.current.y)};return i.addEventListener("mousemove",j),window.addEventListener("scroll",W,!0),()=>{i.removeEventListener("mousemove",j),window.removeEventListener("scroll",W,!0)}},[i,b,p,T,J,V,M,B,v,s]),l.useEffect(()=>{b||(y("none"),w(0))},[b]);const te=async(U,j,W,k={})=>{const{width:E,height:q,finalWidth:Z}=await kd(U.image.url,I,N,R);let X=0,z=0;O==="same"?(X=j/2,z=W/2):(X=k.x??Math.random()*j,z=k.y??Math.random()*W);const re=Math.min(Math.max(X,E/2),j-E/2),h=Math.min(Math.max(z,q/2),W-q/2);return{id:m.current++,url:U.image.url,link:U.link,name:U.image.name,x:re,y:h,width:Z}};l.useEffect(()=>{if(!i||t.length===0)return;const U=i.getBoundingClientRect(),j=U.width,W=U.height,k=[];(async()=>{const q=t[0],Z=await te(q,j,W);k.push(Z),a(k),c(1)})()},[I,N,R,O,i]),l.useEffect(()=>{A==="last One"&&a(U=>U.length>0?[U[U.length-1]]:[])},[A]);const ce=async U=>{if(!i)return;const j=i.getBoundingClientRect(),W=U.clientX-j.left,k=U.clientY-j.top;if(J==="image"&&!Ca(W,k,s))return;let E=0,q=0;O==="on Click"?(E=W,q=k):O==="same"?(E=j.width/2,q=j.height/2):(E=Math.random()*j.width,q=Math.random()*j.height);const Z=t[d],X=await te(Z,j.width,j.height,{x:E,y:q});a(z=>A==="all"?[...z,X]:[X]),c(z=>z>=t.length-1?0:z+1)};return r.jsxs("div",{ref:o,onClick:ce,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),className:Qn.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[s.map(U=>r.jsx("div",{className:Qn.wrapper,style:{top:`${U.y}px`,left:`${U.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:U.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:J==="area"&&U.link?r.jsx("a",{href:U.link,target:"_blank",className:Qn.link,children:r.jsx("img",{src:U.url,alt:U.name,className:Qn.image},U.id)}):r.jsx("img",{src:U.url,alt:U.name,className:Qn.image},U.id)},U.id)),b&&r.jsx("div",{className:Qn.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${$})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const _d={element:Ad,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:""}]}}}},Fd="LightBox-module__hidden___9s-9x",Wd="LightBox-module__heroImage___sTxNF",Nd="LightBox-module__background___rm9ml",Hd="LightBox-module__editor___4ACaY",Od="LightBox-module__contentStyle___Bgnsq",Bd="LightBox-module__imageStyle___tLIlB",zd="LightBox-module__imgWrapper___LuFUp",jd="LightBox-module__contain___8-yaS",Dd="LightBox-module__cover___hNvOG",Vd="LightBox-module__caption___b6L2I",qd="LightBox-module__captionTextInner___rCGNH",Kd="LightBox-module__lightboxSplide___XFuWC",Gd="LightBox-module__arrow___iz38X",Ud="LightBox-module__arrowVertical___Zfz81",Xd="LightBox-module__nextArrow___zkAQN",Yd="LightBox-module__arrowInner___p48sW",Jd="LightBox-module__arrowIcon___3VaFf",Zd="LightBox-module__arrowImg___pNV88",Qd="LightBox-module__mirror___pjeXc",eu="LightBox-module__thumbsWrapper___GB-nU",tu="LightBox-module__thumbsContainerVertical___wttk5",nu="LightBox-module__thumbsContainer___osSma",iu="LightBox-module__thumbsAlignStart___MO6tY",ou="LightBox-module__thumbsAlignCenter___Q4sUx",ru="LightBox-module__thumbsAlignEnd___p4y9R",au="LightBox-module__thumbItem___HvnF3",su="LightBox-module__closeButton___g2khP",lu="LightBox-module__fadeIn___0m5GW",cu="LightBox-module__slideInLeft___gPYwC",du="LightBox-module__slideInRight___S-pPp",uu="LightBox-module__slideInTop___DFdAj",pu="LightBox-module__slideInBottom___m27kZ",mu="LightBox-module__fadeOut___55qBR",gu="LightBox-module__slideOutLeft___NvU7P",hu="LightBox-module__slideOutRight___SK7eC",fu="LightBox-module__slideOutTop___Vgg0z",yu="LightBox-module__slideOutBottom___nJ0Ef",vu="LightBox-module__scaleSlide___vZriG",xe={hidden:Fd,heroImage:Wd,background:Nd,editor:Hd,contentStyle:Od,imageStyle:Bd,imgWrapper:zd,contain:jd,cover:Dd,caption:Vd,captionTextInner:qd,lightboxSplide:Kd,arrow:Gd,arrowVertical:Ud,nextArrow:Xd,arrowInner:Yd,arrowIcon:Jd,arrowImg:Zd,mirror:Qd,thumbsWrapper:eu,thumbsContainerVertical:tu,thumbsContainer:nu,thumbsAlignStart:iu,thumbsAlignCenter:ou,thumbsAlignEnd:ru,thumbItem:au,closeButton:su,fadeIn:lu,slideInLeft:cu,slideInRight:du,slideInTop:uu,slideInBottom:pu,fadeOut:mu,slideOutLeft:gu,slideOutRight:hu,slideOutTop:fu,slideOutBottom:yu,scaleSlide:vu},io=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), calc(-50% + ${_.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${_.scalingValue(t.x,n)}, calc(-50% + ${_.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), ${_.scalingValue(t.y,n)})`:i.transform=`translate(${_.scalingValue(t.x,n)}, ${_.scalingValue(t.y,n)})`,i};function Zs(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 Ta(e){const t=e.getBoundingClientRect(),n=Zs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,d=i/o,c=s/a;let m,p;c>d?(m=i,p=i/c):(p=o,m=o*c);const x=t.left+n.left,$=t.top+n.top,w=(i-m)/2+x,g=(o-p)/2+$;return{x:w,y:g,width:m,height:p}}function La(e){const t=e.getBoundingClientRect(),n=Zs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ia(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function xu(e,t){const n=(()=>{if(e==="fade in")return xe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return xe.slideInLeft;case"right":return xe.slideInRight;case"top":return xe.slideInTop;case"bottom":return xe.slideInBottom;default:return xe.slideInRight}return xe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return xe.fadeIn;if(e==="slide in")switch(t){case"left":return xe.slideInLeft;case"right":return xe.slideInRight;case"top":return xe.slideInTop;case"bottom":return xe.slideInBottom;default:return xe.slideInRight}return xe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return xe.fadeOut;if(e==="slide in")switch(t){case"left":return xe.slideOutLeft;case"right":return xe.slideOutRight;case"top":return xe.slideOutTop;case"bottom":return xe.slideOutBottom;default:return xe.slideOutRight}return xe.fadeOut})(),s=(()=>{if(e==="fade in")return xe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return xe.slideOutLeft;case"right":return xe.slideOutRight;case"top":return xe.slideOutTop;case"bottom":return xe.slideOutBottom;default:return xe.slideOutRight}return xe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const bu=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[d,c]=l.useState(!1),{url:m}=e.thumbnailBlock.cover;return l.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:m,alt:"Cover",className:xe.heroImage,onClick:()=>c(!0)}),r.jsx(wu,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},wu=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:d})=>{var Ie;const{widthSettings:c,fontSettings:m,letterSpacing:p,textAlign:x,wordSpacing:$,fontSizeLineHeight:w,textAppearance:g,color:y}=i.imageCaption??{},[C,b]=l.useState(0),[L,I]=l.useState(0),[N,R]=l.useState(!1),[O,A]=l.useState(!1),[T,J]=l.useState({}),v=l.useRef(null),M=l.useRef(null),B=l.useRef(null),V=l.useRef(!1),te=l.useRef(null),ce=l.useRef(null),U=l.useRef(null),j=l.useRef(null),W=l.useRef(!1),k=l.useRef(null),[E,q]=l.useState(!1),{appear:Z,triggers:X,slider:z,thumbnail:re,controls:h,area:le,caption:ve,layout:he}=o.lightboxBlock,{appearClass:Re,backdropAppearClass:ee,backdropDisappearClass:ge,disappearClass:Y}=xu(Z.type,Z.direction),fe=(d==null?void 0:d.itemId)??null;l.useEffect(()=>{const F=()=>{setTimeout(()=>{var P,D;(D=(P=v.current)==null?void 0:P.splide)==null||D.refresh()},16)},Q=()=>{I(P=>P+1)};return window.addEventListener("ArticleEditor.Layout:change",F),window.addEventListener("ArticleEditor.ComponentContent:change",Q),()=>{window.removeEventListener("ArticleEditor.Layout:change",F),window.removeEventListener("ArticleEditor.ComponentContent:change",Q)}},[]),l.useEffect(()=>{if(!e||!re.isActive){q(!1);return}const F=k.current;if(!F)return;const Q=()=>{z.direction==="horiz"?q(F.scrollWidth>F.clientWidth):q(F.scrollHeight>F.clientHeight)};Q();const P=new ResizeObserver(Q);return P.observe(F),()=>P.disconnect()},[e,re.isActive,n.length,T,z.direction]);const ae=l.useCallback(()=>{const F=window.matchMedia("(max-width: 768px)").matches,Q=Ia(le.color);F&&!a&&Q>.9&&(document.body.style.backgroundColor=""),R(!0),V.current=!0;const P=D=>{D.target===te.current&&D.animationName&&(te.current&&ce.current&&te.current.removeEventListener("animationend",ce.current),ce.current=null,V.current&&(V.current=!1,t()),R(!1))};te.current&&(ce.current=P,te.current.addEventListener("animationend",P))},[t,le.color,a]),se=(F,Q,P)=>{var D,K;if(F){if(X.type==="click"&&X.switch==="image")X.repeat==="close"&&C===n.length-1?ae():(D=v.current)==null||D.go("+1");else if(X.type==="click"&&X.switch==="50/50"){const oe=F.getBoundingClientRect(),ie=Q-oe.left,ye=P-oe.top,Me=oe.width,Te=oe.height;let we;z.direction==="horiz"?we=ie<Me/2?"-1":"+1":we=ye<Te/2?"-1":"+1",(K=v.current)==null||K.go(we)}}},ne=F=>{if(W.current){W.current=!1;return}const Q=n[C],P=(Q==null?void 0:Q.image.objectFit)==="cover";let D,K;if("changedTouches"in F&&F.changedTouches.length>0)D=F.changedTouches[0].clientX,K=F.changedTouches[0].clientY;else if("clientX"in F)D=F.clientX,K=F.clientY;else return;let oe;if(P&&B.current){const ie=La(B.current);oe=D>=ie.left&&D<=ie.right&&K>=ie.top&&K<=ie.bottom}else{const ie=B.current?Ta(B.current):null;if(!ie){F.target===F.currentTarget&&ae();return}oe=D>=ie.x&&D<=ie.x+ie.width&&K>=ie.y&&K<=ie.y+ie.height}oe?se(B.current,D,K):ae()},$e=F=>{const Q=F.target;(Q.classList.contains(xe.thumbsWrapper)||Q.classList.contains(xe.thumbsContainer))&&ne(F)};l.useEffect(()=>{if(!e)return;const F=Q=>{var P,D;if(Q.key==="Escape"){ae();return}if(Q.key==="ArrowRight"){b(K=>(K+1)%Math.max(n.length,1)),(P=v.current)==null||P.go("+1");return}Q.key==="ArrowLeft"&&(b(K=>(K-1+Math.max(n.length,1))%Math.max(n.length,1)),(D=v.current)==null||D.go("-1"))};return window.addEventListener("keydown",F),()=>{window.removeEventListener("keydown",F)}},[e,ae,n.length]),l.useEffect(()=>{if(e){if(b(0),I(Q=>Q+1),V.current=!1,R(!1),A(!1),J({}),!fe)return;const F=new CustomEvent("page-overlay",{detail:{itemId:fe}});window.dispatchEvent(F)}return()=>{te.current&&ce.current&&(te.current.removeEventListener("animationend",ce.current),ce.current=null),A(!1)}},[e,fe]),l.useEffect(()=>{M.current!==null&&M.current!==z.type&&I(F=>F+1),M.current=z.type},[z.type]),l.useEffect(()=>{if(!e)return;const F=document.body.style.overflow,Q=window.matchMedia("(max-width: 768px)").matches,P=Ia(le.color);document.body.style.overflow="hidden",A(!1);const D=oe=>{oe.target===te.current&&!V.current&&oe.animationName&&(Q&&!a&&P>.9&&(document.body.style.backgroundColor=le.color),A(!0),te.current&&U.current&&te.current.removeEventListener("animationend",U.current),U.current=null)};te.current&&(U.current=D,te.current.addEventListener("animationend",D));const K=oe=>{const ie=oe.target;ie&&(ie.closest(`.${xe.thumbsWrapper}`)||ie.closest(`.${xe.thumbsContainer}`))||z.type!=="slide"&&oe.preventDefault()};return document.addEventListener("touchmove",K,{passive:!1}),()=>{document.body.style.overflow=F,document.removeEventListener("touchmove",K),te.current&&U.current&&(te.current.removeEventListener("animationend",U.current),U.current=null),A(!1)}},[e,a,le.color,z.type]),l.useEffect(()=>{if(!e)return;const F=Q=>{var D,K;if(V.current){Q.stopPropagation();return}if(W.current){W.current=!1;return}const P=Q.target;if(!(P&&(P.closest(`.${xe.thumbsContainer}`)||P.closest(`.${xe.thumbItem}`)||P.closest(`.${xe.arrow}`)||P.closest(`.${xe.closeButton}`)||P.closest(`.${xe.caption}`)))){if(z.type==="slide"&&X.type==="drag"&&((K=(D=v.current)==null?void 0:D.splide)!=null&&K.root)){const oe=v.current.splide.root;if(P&&(oe.contains(P)||oe===P))return}if(Q.touches.length===0&&Q.changedTouches.length>0){const oe=n[C],ie=(oe==null?void 0:oe.image.objectFit)==="cover",ye=Q.changedTouches[0];let Me;if(ie&&B.current){const Te=La(B.current);Me=ye.clientX>=Te.left&&ye.clientX<=Te.right&&ye.clientY>=Te.top&&ye.clientY<=Te.bottom}else{const Te=B.current?Ta(B.current):null;if(!Te)return;Me=ye.clientX>=Te.x&&ye.clientX<=Te.x+Te.width&&ye.clientY>=Te.y&&ye.clientY<=Te.y+Te.height}if(!Me){Q.stopPropagation(),V.current=!0;const Te=we=>{we.stopPropagation(),we.preventDefault(),document.removeEventListener("click",Te,!0)};document.addEventListener("click",Te,!0),ae()}}}};return document.addEventListener("touchend",F,{passive:!0}),()=>{document.removeEventListener("touchend",F)}},[e,ae,C,n]);const Ce=(z.type==="scale"||z.type==="fade")&&z.direction==="vert"&&X.type==="drag";l.useEffect(()=>{var we,qe;if(!e||!Ce||!((qe=(we=v.current)==null?void 0:we.splide)!=null&&qe.root))return;const F=v.current.splide.root,Q=30,P=(de,ke)=>{if(j.current){const Ne=Math.abs(de-j.current.x),He=Math.abs(ke-j.current.y);(Ne>0||He>0)&&(W.current=!0)}},D=de=>{j.current&&(de.preventDefault(),P(de.clientX,de.clientY))},K=de=>{j.current&&de.touches.length>0&&(de.preventDefault(),P(de.touches[0].clientX,de.touches[0].clientY))},oe=(de,ke)=>{if(!j.current||!v.current){j.current=null;return}const Ne=Math.abs(de-j.current.x),He=Math.abs(ke-j.current.y);He>Q&&He>Ne&&v.current.go(ke<j.current.y?"+1":"-1"),j.current=null},ie=de=>{j.current&&oe(de.clientX,de.clientY),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("pointermove",D)},ye=de=>{if(j.current){if(de.changedTouches.length>0){const ke=de.changedTouches[0];oe(ke.clientX,ke.clientY)}document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),document.removeEventListener("touchmove",K)}},Me=de=>{j.current={x:de.clientX,y:de.clientY},W.current=!1,document.addEventListener("pointermove",D,{passive:!1}),document.addEventListener("pointerup",ie),document.addEventListener("pointercancel",ie)},Te=de=>{de.touches.length>0&&(j.current={x:de.touches[0].clientX,y:de.touches[0].clientY},W.current=!1,document.addEventListener("touchmove",K,{passive:!1}),document.addEventListener("touchend",ye),document.addEventListener("touchcancel",ye))};return F.addEventListener("pointerdown",Me),F.addEventListener("touchstart",Te),()=>{F.removeEventListener("pointerdown",Me),F.removeEventListener("touchstart",Te),document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("touchmove",K),document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),j.current=null,W.current=!1}},[e,Ce,L]);const be={backgroundColor:le.color,backdropFilter:`blur(${le.blur}px)`,animationDuration:`${parseInt(Z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:zi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:te,className:je(xe.background,N?ge:ee,{[xe.editor]:a},{[xe.hidden]:!e}),style:{...be,...O&&!a&&!N?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?te:null,className:je(xe.contentStyle,N?Y:Re,{[xe.editor]:a},{[xe.hidden]:!e}),style:{animationDuration:`${parseInt(Z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Zr,{onMove:F=>b(F.index),ref:v,className:xe.lightboxSplide,options:{arrows:!1,speed:z.duration?parseInt(z.duration):500,direction:z.direction==="horiz"||z.type==="fade"||z.type==="scale"?"ltr":"ttb",pagination:!1,drag:X.type==="drag"&&!Ce,perPage:1,width:"100%",height:"100%",type:z.type==="fade"||z.type==="scale"?"fade":"loop",padding:0,rewind:X.repeat!=="close",start:0},style:{"--splide-speed":z.duration},children:n.map((F,Q)=>{const P=io(he.position,he.offset,a),D=`${_.scalingValue(he.padding.top,a)} ${_.scalingValue(he.padding.right,a)} ${_.scalingValue(he.padding.bottom,a)} ${_.scalingValue(he.padding.left,a)}`,K=z.type==="scale"?(()=>{const{transform:oe,...ie}=P;return{...ie,position:"absolute",padding:D,boxSizing:"border-box","--position-transform":oe||"none"}})():{...P,position:"absolute",padding:D,boxSizing:"border-box"};return r.jsx(Qr,{children:r.jsx("div",{className:xe.imgWrapper,onClick:ne,children:r.jsx("img",{ref:Q===C?B:null,className:je(xe.imageStyle,{[xe.contain]:F.image.objectFit==="contain",[xe.cover]:F.image.objectFit==="cover",[xe.scaleSlide]:z.type==="scale"}),src:F.image.url,alt:F.image.name??"",style:{...K,pointerEvents:F.image.objectFit==="contain"?"none":"auto"}})})},Q)})},L),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:je(xe.arrow,{[xe.arrowVertical]:z.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:xe.arrowInner,style:{transform:`translate(${_.scalingValue(h.offset.x,a)}, ${_.scalingValue(h.offset.y*(z.direction==="horiz"?1:-1),a)}) scale(${h.scale}) rotate(${z.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var F;return(F=v.current)==null?void 0:F.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(Qt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:je(xe.arrowImg,xe.mirror)}),!h.arrowsImgUrl&&r.jsx(Ea,{color:h.color,className:je(xe.arrowIcon,xe.arrowImg,xe.mirror)})]})}),r.jsx("div",{className:je(xe.arrow,xe.nextArrow,{[xe.arrowVertical]:z.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:xe.arrowInner,style:{transform:`translate(${_.scalingValue(h.offset.x*(z.direction==="horiz"?-1:1),a)}, ${_.scalingValue(h.offset.y,a)}) scale(${h.scale}) rotate(${z.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var F;return(F=v.current)==null?void 0:F.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(Qt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:xe.arrowImg}),!h.arrowsImgUrl&&r.jsx(Ea,{color:h.color,className:je(xe.arrowIcon,xe.arrowImg)})]})})]}),le.closeIconUrl&&(()=>{const F=io(le.closeIconAlign,le.closeIconOffset,a),Q=`scale(${le.closeIconScale})`,P=F.transform?`${F.transform} ${Q}`:Q;return r.jsx("button",{className:xe.closeButton,style:{...F,transform:P},onClick:ae,"aria-label":"Close lightbox",children:r.jsx(Qt,{url:le.closeIconUrl,fill:le.closeIconColor??"#000000",hoverFill:le.closeIconHover??"#cccccc"})})})(),ve&&ve.isActive&&i.imageCaption&&((Ie=n[C])==null?void 0:Ie.imageCaption)&&r.jsx("div",{className:xe.caption,style:{...io(ve.alignment,ve.offset,a),fontFamily:Ko(m.fontFamily),fontWeight:m.fontWeight,fontStyle:m.fontStyle,width:c.sizing==="auto"?"max-content":_.scalingValue(c.width,a),letterSpacing:_.scalingValue(p,a),wordSpacing:_.scalingValue($,a),textAlign:x,fontSize:_.scalingValue(w.fontSize,a),lineHeight:_.scalingValue(w.lineHeight,a),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:y},onClick:F=>F.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:xe.captionTextInner,style:{"--link-color":ve.linkColor,"--link-hover-color":ve.linkHoverColor},children:r.jsx(ui,{content:n[C].imageCaption})})}),re.isActive&&(()=>{const[F,Q]=re.position.split("-"),P=z.direction==="horiz"?`${F}-left`:re.position,D=io(P,re.offset,a),K=()=>{if(z.direction==="horiz"){if(Q==="left")return"flex-start";if(Q==="center")return"center";if(Q==="right")return"flex-end"}else{if(F==="top")return"flex-start";if(F==="middle")return"center";if(F==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:k,className:xe.thumbsWrapper,onClick:oe=>$e(oe),style:{position:a?"absolute":"fixed",...D,...z.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:je(xe.thumbsContainer,{[xe.thumbsContainerVertical]:z.direction==="vert",[xe.thumbsAlignStart]:re.align==="start",[xe.thumbsAlignCenter]:re.align==="center",[xe.thumbsAlignEnd]:re.align==="end"}),style:{gap:_.scalingValue(re.grid.gap,a),justifyContent:E?"flex-start":K()},children:n.map((oe,ie)=>{const ye=ie===C,Me=T[ie],we=re.grid.size*(ye?re.activeState.scale:1),qe=()=>{if(re.fit!=="fit")return{};if(!Me)return z.direction==="horiz"?{height:_.scalingValue(we,a)}:{width:_.scalingValue(we,a)};const de=Me.width/Me.height;if(z.direction==="horiz"){const ke=we,Ne=ke*de;return{width:_.scalingValue(Ne,a),height:_.scalingValue(ke,a)}}else{const ke=we,Ne=ke/de;return{width:_.scalingValue(ke,a),height:_.scalingValue(Ne,a)}}};return r.jsx("button",{className:xe.thumbItem,style:{...z.direction==="horiz"&&re.fit!=="fit"?{height:_.scalingValue(we,a)}:{},...z.direction==="vert"&&re.fit!=="fit"?{width:_.scalingValue(we,a)}:{},...re.fit==="cover"?{width:_.scalingValue(we,a),height:_.scalingValue(we,a)}:{},...qe(),transition:ye?"all 0.25s ease-out":"none",opacity:ye?re.activeState.opacity/100:re.opacity/100,"--thumb-hover":re.activeState.opacity/100},onClick:de=>{var ke;de.stopPropagation(),b(ie),(ke=v.current)==null||ke.go(ie)},onMouseEnter:()=>{var de;re.triggers==="hov"&&((de=v.current)==null||de.go(ie))},children:r.jsx("img",{src:oe.image.url,alt:oe.image.name??"",onLoad:de=>{const ke=de.currentTarget;ke.naturalWidth&&ke.naturalHeight&&J(Ne=>({...Ne,[ie]:{width:ke.naturalWidth,height:ke.naturalHeight}}))},style:{objectFit:re.fit==="cover"?"cover":"contain",...re.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...re.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${oe.image.name}-${ie}`)})})})})()]})]}),document.getElementById(s))};function Ea({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 $u={element:bu,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 oo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Su(e){return`
6
+ */const vd="RichTextRenderer-module__link___BWeZ2",xd={link:vd},bd=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Ko=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>bd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function qt(e){const{color:t,...n}=e;return n}function kt(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Ko(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:_.scalingValue(e.letterSpacing,t),wordSpacing:_.scalingValue(e.wordSpacing,t),fontSize:_.scalingValue(n,t),lineHeight:i!==void 0?_.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const pi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:xd.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:wd(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function wd(e){return{...e.fontFamily&&{fontFamily:Ko(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 $d="SvgImage-module__svg___q3xE-",Sd="SvgImage-module__img___VsTm-",Sa={svg:$d,img:Sd},Cd=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Td=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Qt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=l.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return l.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(d)}},[]),!Cd(e)||!s?r.jsx("img",{src:e,alt:"",className:je(Sa.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:je(Sa.svg,i),style:{"--svg":Td(e),"--fill":t,"--hover-fill":n,...o??{}}})},Ld={"top-left":Pe.topLeftAlignment,"top-center":Pe.topCenterAlignment,"top-right":Pe.topRightAlignment,"middle-left":Pe.middleLeftAlignment,"middle-center":Pe.middleCenterAlignment,"middle-right":Pe.middleRightAlignment,"bottom-left":Pe.bottomLeftAlignment,"bottom-center":Pe.bottomCenterAlignment,"bottom-right":Pe.bottomRightAlignment};function Id({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=l.useState(null),{widthSettings:a,fontSettings:d,letterSpacing:c,textAlign:m,wordSpacing:p,fontSizeLineHeight:x,textAppearance:$,color:w}=n.imageCaption??{},[g,y]=l.useState(void 0),[C,b]=l.useState(null),[L,I]=l.useState(0),[N,R]=l.useState(0),{direction:O,transition:A,controls:T,pagination:J,imageCaption:v,triggers:M}=e,B=l.useRef(A.type),{x:V,y:te}=e.controls.offset,ce=U=>{o&&o.go(U)};return l.useEffect(()=>{if(!C)return;const U=new ResizeObserver(j=>{if(!o)return;const[W]=j;y({width:Math.round(W.contentRect.width),height:Math.round(W.contentRect.height)})});return U.observe(C),()=>U.unobserve(C)},[C]),l.useEffect(()=>{!o||B.current===A.type||(R(U=>U+1),B.current=A.type)},[A.type]),r.jsx("div",{className:je(Pe.wrapper,{[Pe.editor]:i}),ref:b,children:r.jsxs("div",{className:Pe.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:A.backgroundColor&&A.type==="fade in"?A.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:je(Pe.captionBlock),children:r.jsx("div",{className:Pe.captionTextWrapper,children:t.map((U,j)=>r.jsx("div",{className:je(Pe.captionText,Ld[v.alignment],{[Pe.withPointerEvents]:j===L&&i,[Pe.active]:j===L}),style:{fontFamily:Ko(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:a.sizing==="auto"?"max-content":_.scalingValue(a.width,i),letterSpacing:_.scalingValue(c,i),wordSpacing:_.scalingValue(p,i),textAlign:m,fontSize:_.scalingValue(x.fontSize,i),lineHeight:_.scalingValue(x.lineHeight,i),textTransform:$.textTransform??"none",textDecoration:$.textDecoration??"none",fontVariant:$.fontVariant??"normal",color:w,transitionDuration:A.duration?`${Math.round(parseInt(A.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Pe.captionTextInner,style:{"--link-hover-color":v.linkHoverColor,"--link-color":v.linkColor,position:"relative",top:_.scalingValue(v.offset.y,i),left:_.scalingValue(v.offset.x,i)},children:r.jsx(pi,{content:U.imageCaption})})},j))})}),r.jsx(Qr,{onMove:U=>{I(U.index)},ref:s,options:{arrows:!1,speed:A.duration?parseInt(A.duration):500,autoplay:M.autoPlay!==null,...M.autoPlay!==null&&{interval:parseInt(M.autoPlay)*1e3},direction:O==="horiz"||A.type==="fade in"?"ltr":"ttb",pagination:!1,drag:M.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:A.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((U,j)=>r.jsx(ea,{children:r.jsx("div",{className:Pe.sliderItem,children:r.jsx("div",{className:Pe.imgWrapper,children:r.jsx("img",{className:je(Pe.sliderImage,{[Pe.contain]:U.image.objectFit==="contain",[Pe.cover]:U.image.objectFit==="cover"}),src:U.image.url,alt:U.image.name??""})})})},j))},N),T.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:je(Pe.arrow,{[Pe.arrowVertical]:O==="vert",[Pe.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:r.jsxs("button",{onClick:()=>{ce("-1")},className:Pe.arrowInner,style:{transform:`translate(${_.scalingValue(V,i)}, ${_.scalingValue(te*(O==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${O==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&r.jsx(Qt,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:je(Pe.arrowImg,Pe.mirror)}),!T.arrowsImgUrl&&r.jsx(Ca,{color:T.color,className:je(Pe.arrowIcon,Pe.arrowImg,Pe.mirror)})]})}),r.jsx("div",{className:je(Pe.arrow,Pe.nextArrow,{[Pe.arrowVertical]:O==="vert",[Pe.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:r.jsxs("button",{className:Pe.arrowInner,onClick:()=>ce("+1"),style:{transform:`translate(${_.scalingValue(V*(O==="horiz"?-1:1),i)}, ${_.scalingValue(te,i)}) scale(${e.controls.scale/100}) rotate(${O==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&r.jsx(Qt,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:Pe.arrowImg}),!T.arrowsImgUrl&&r.jsx(Ca,{color:T.color,className:je(Pe.arrowIcon,Pe.arrowImg)})]})})]}),M.triggersList.click&&r.jsx("div",{className:Pe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),J.isActive&&r.jsx("div",{className:je(Pe.pagination,{[Pe.paginationInsideBottom]:J.position==="inside-1"&&O==="horiz",[Pe.paginationInsideTop]:J.position==="inside-2"&&O==="horiz",[Pe.paginationOutsideBottom]:J.position==="outside-1"&&O==="horiz",[Pe.paginationOutsideTop]:J.position==="outside-2"&&O==="horiz",[Pe.paginationInsideLeft]:J.position==="inside-1"&&O==="vert",[Pe.paginationInsideRight]:J.position==="inside-2"&&O==="vert",[Pe.paginationOutsideLeft]:J.position==="outside-1"&&O==="vert",[Pe.paginationOutsideRight]:J.position==="outside-2"&&O==="vert",[Pe.paginationVertical]:O==="vert"}),children:r.jsx("div",{className:Pe.paginationInner,style:{backgroundColor:J.colors[2],transform:`scale(${J.scale/100}) translate(${_.scalingValue(J.offset.x,i)}, ${_.scalingValue(J.offset.y,i)}) rotate(${O==="horiz"?"0deg":"90deg"})`},children:t.map((U,j)=>r.jsx("button",{onClick:()=>{o&&o.go(j)},className:je(Pe.paginationItem),children:r.jsx("div",{className:je(Pe.dot,{[Pe.activeDot]:j===L}),style:{backgroundColor:j===L?J.colors[0]:J.colors[1],"--pagination-hover-color":J.hover}})},j))})})]})})}function Ca({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 Ed={element:Id,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"]}},Pd="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Rd="ImageRevealSlider-module__image___Qjt-e",Md="ImageRevealSlider-module__link___N-iLG",kd="ImageRevealSlider-module__cursor___2U03d",ei={imageRevealSlider:Pd,image:Rd,link:Md,cursor:kd};function Ta(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,d=s/2,c=a/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function sr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ad(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await sr(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await sr(e);s=a.height/a.width*o}else{const a=await sr(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function _d({settings:e,content:t,isEditor:n}){const[i,o]=l.useState(null),[s,a]=l.useState([]),[d,c]=l.useState(0),m=l.useRef(0),[p,x]=l.useState({x:0,y:0}),[$,w]=l.useState(1),[g,y]=l.useState("none"),C=l.useRef({x:0,y:0}),[b,L]=l.useState(!1),{sizeType:I,imageWidth:N,randomRangeImageWidth:R}=e.imageSize,{revealPosition:O,visible:A}=e.position,{cursorType:T,target:J,defaultCursorScale:v,defaultCursor:M,hoverCursorScale:B,hoverCursor:V}=e.cursor;l.useEffect(()=>{if(!i)return;const U=(k,E)=>{const q=i.getBoundingClientRect(),Z=k-q.left,X=E-q.top;if(x({x:Z,y:X}),T==="system"){y("none"),w(1);return}const z=Z,re=X,h=document.elementFromPoint(q.left+z,q.top+re);if(h&&h.closest("a")){y("none"),w(1);return}const le=Ta(z,re,s)||J==="area"?{img:V??"none",scale:B}:{img:M??"none",scale:v};y(le.img),w(le.scale)},j=k=>{k.stopPropagation(),C.current={x:k.clientX,y:k.clientY},U(k.clientX,k.clientY)},W=()=>{b&&U(C.current.x,C.current.y)};return i.addEventListener("mousemove",j),window.addEventListener("scroll",W,!0),()=>{i.removeEventListener("mousemove",j),window.removeEventListener("scroll",W,!0)}},[i,b,p,T,J,V,M,B,v,s]),l.useEffect(()=>{b||(y("none"),w(0))},[b]);const te=async(U,j,W,k={})=>{const{width:E,height:q,finalWidth:Z}=await Ad(U.image.url,I,N,R);let X=0,z=0;O==="same"?(X=j/2,z=W/2):(X=k.x??Math.random()*j,z=k.y??Math.random()*W);const re=Math.min(Math.max(X,E/2),j-E/2),h=Math.min(Math.max(z,q/2),W-q/2);return{id:m.current++,url:U.image.url,link:U.link,name:U.image.name,x:re,y:h,width:Z}};l.useEffect(()=>{if(!i||t.length===0)return;const U=i.getBoundingClientRect(),j=U.width,W=U.height,k=[];(async()=>{const q=t[0],Z=await te(q,j,W);k.push(Z),a(k),c(1)})()},[I,N,R,O,i]),l.useEffect(()=>{A==="last One"&&a(U=>U.length>0?[U[U.length-1]]:[])},[A]);const ce=async U=>{if(!i)return;const j=i.getBoundingClientRect(),W=U.clientX-j.left,k=U.clientY-j.top;if(J==="image"&&!Ta(W,k,s))return;let E=0,q=0;O==="on Click"?(E=W,q=k):O==="same"?(E=j.width/2,q=j.height/2):(E=Math.random()*j.width,q=Math.random()*j.height);const Z=t[d],X=await te(Z,j.width,j.height,{x:E,y:q});a(z=>A==="all"?[...z,X]:[X]),c(z=>z>=t.length-1?0:z+1)};return r.jsxs("div",{ref:o,onClick:ce,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),className:ei.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[s.map(U=>r.jsx("div",{className:ei.wrapper,style:{top:`${U.y}px`,left:`${U.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:U.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:J==="area"&&U.link?r.jsx("a",{href:U.link,target:"_blank",className:ei.link,children:r.jsx("img",{src:U.url,alt:U.name,className:ei.image},U.id)}):r.jsx("img",{src:U.url,alt:U.name,className:ei.image},U.id)},U.id)),b&&r.jsx("div",{className:ei.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${$})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Fd={element:_d,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:""}]}}}},Wd="LightBox-module__hidden___9s-9x",Nd="LightBox-module__heroImage___sTxNF",Hd="LightBox-module__background___rm9ml",Od="LightBox-module__editor___4ACaY",Bd="LightBox-module__contentStyle___Bgnsq",zd="LightBox-module__imageStyle___tLIlB",jd="LightBox-module__imgWrapper___LuFUp",Dd="LightBox-module__contain___8-yaS",Vd="LightBox-module__cover___hNvOG",qd="LightBox-module__caption___b6L2I",Gd="LightBox-module__captionTextInner___rCGNH",Kd="LightBox-module__lightboxSplide___XFuWC",Ud="LightBox-module__arrow___iz38X",Xd="LightBox-module__arrowVertical___Zfz81",Yd="LightBox-module__nextArrow___zkAQN",Jd="LightBox-module__arrowInner___p48sW",Zd="LightBox-module__arrowIcon___3VaFf",Qd="LightBox-module__arrowImg___pNV88",eu="LightBox-module__mirror___pjeXc",tu="LightBox-module__thumbsWrapper___GB-nU",nu="LightBox-module__thumbsContainerVertical___wttk5",iu="LightBox-module__thumbsContainer___osSma",ou="LightBox-module__thumbsAlignStart___MO6tY",ru="LightBox-module__thumbsAlignCenter___Q4sUx",au="LightBox-module__thumbsAlignEnd___p4y9R",su="LightBox-module__thumbItem___HvnF3",lu="LightBox-module__closeButton___g2khP",cu="LightBox-module__fadeIn___0m5GW",du="LightBox-module__slideInLeft___gPYwC",uu="LightBox-module__slideInRight___S-pPp",pu="LightBox-module__slideInTop___DFdAj",mu="LightBox-module__slideInBottom___m27kZ",gu="LightBox-module__fadeOut___55qBR",hu="LightBox-module__slideOutLeft___NvU7P",fu="LightBox-module__slideOutRight___SK7eC",yu="LightBox-module__slideOutTop___Vgg0z",vu="LightBox-module__slideOutBottom___nJ0Ef",xu="LightBox-module__scaleSlide___vZriG",xe={hidden:Wd,heroImage:Nd,background:Hd,editor:Od,contentStyle:Bd,imageStyle:zd,imgWrapper:jd,contain:Dd,cover:Vd,caption:qd,captionTextInner:Gd,lightboxSplide:Kd,arrow:Ud,arrowVertical:Xd,nextArrow:Yd,arrowInner:Jd,arrowIcon:Zd,arrowImg:Qd,mirror:eu,thumbsWrapper:tu,thumbsContainerVertical:nu,thumbsContainer:iu,thumbsAlignStart:ou,thumbsAlignCenter:ru,thumbsAlignEnd:au,thumbItem:su,closeButton:lu,fadeIn:cu,slideInLeft:du,slideInRight:uu,slideInTop:pu,slideInBottom:mu,fadeOut:gu,slideOutLeft:hu,slideOutRight:fu,slideOutTop:yu,slideOutBottom:vu,scaleSlide:xu},oo=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), calc(-50% + ${_.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${_.scalingValue(t.x,n)}, calc(-50% + ${_.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), ${_.scalingValue(t.y,n)})`:i.transform=`translate(${_.scalingValue(t.x,n)}, ${_.scalingValue(t.y,n)})`,i};function Qs(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 La(e){const t=e.getBoundingClientRect(),n=Qs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,d=i/o,c=s/a;let m,p;c>d?(m=i,p=i/c):(p=o,m=o*c);const x=t.left+n.left,$=t.top+n.top,w=(i-m)/2+x,g=(o-p)/2+$;return{x:w,y:g,width:m,height:p}}function Ia(e){const t=e.getBoundingClientRect(),n=Qs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ea(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function bu(e,t){const n=(()=>{if(e==="fade in")return xe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return xe.slideInLeft;case"right":return xe.slideInRight;case"top":return xe.slideInTop;case"bottom":return xe.slideInBottom;default:return xe.slideInRight}return xe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return xe.fadeIn;if(e==="slide in")switch(t){case"left":return xe.slideInLeft;case"right":return xe.slideInRight;case"top":return xe.slideInTop;case"bottom":return xe.slideInBottom;default:return xe.slideInRight}return xe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return xe.fadeOut;if(e==="slide in")switch(t){case"left":return xe.slideOutLeft;case"right":return xe.slideOutRight;case"top":return xe.slideOutTop;case"bottom":return xe.slideOutBottom;default:return xe.slideOutRight}return xe.fadeOut})(),s=(()=>{if(e==="fade in")return xe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return xe.slideOutLeft;case"right":return xe.slideOutRight;case"top":return xe.slideOutTop;case"bottom":return xe.slideOutBottom;default:return xe.slideOutRight}return xe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const wu=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[d,c]=l.useState(!1),{url:m}=e.thumbnailBlock.cover;return l.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:m,alt:"Cover",className:xe.heroImage,onClick:()=>c(!0)}),r.jsx($u,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},$u=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:d})=>{var Ie;const{widthSettings:c,fontSettings:m,letterSpacing:p,textAlign:x,wordSpacing:$,fontSizeLineHeight:w,textAppearance:g,color:y}=i.imageCaption??{},[C,b]=l.useState(0),[L,I]=l.useState(0),[N,R]=l.useState(!1),[O,A]=l.useState(!1),[T,J]=l.useState({}),v=l.useRef(null),M=l.useRef(null),B=l.useRef(null),V=l.useRef(!1),te=l.useRef(null),ce=l.useRef(null),U=l.useRef(null),j=l.useRef(null),W=l.useRef(!1),k=l.useRef(null),[E,q]=l.useState(!1),{appear:Z,triggers:X,slider:z,thumbnail:re,controls:h,area:le,caption:ve,layout:he}=o.lightboxBlock,{appearClass:Re,backdropAppearClass:ee,backdropDisappearClass:ge,disappearClass:Y}=bu(Z.type,Z.direction),fe=(d==null?void 0:d.itemId)??null;l.useEffect(()=>{const F=()=>{setTimeout(()=>{var P,D;(D=(P=v.current)==null?void 0:P.splide)==null||D.refresh()},16)},Q=()=>{I(P=>P+1)};return window.addEventListener("ArticleEditor.Layout:change",F),window.addEventListener("ArticleEditor.ComponentContent:change",Q),()=>{window.removeEventListener("ArticleEditor.Layout:change",F),window.removeEventListener("ArticleEditor.ComponentContent:change",Q)}},[]),l.useEffect(()=>{if(!e||!re.isActive){q(!1);return}const F=k.current;if(!F)return;const Q=()=>{z.direction==="horiz"?q(F.scrollWidth>F.clientWidth):q(F.scrollHeight>F.clientHeight)};Q();const P=new ResizeObserver(Q);return P.observe(F),()=>P.disconnect()},[e,re.isActive,n.length,T,z.direction]);const ae=l.useCallback(()=>{const F=window.matchMedia("(max-width: 768px)").matches,Q=Ea(le.color);F&&!a&&Q>.9&&(document.body.style.backgroundColor=""),R(!0),V.current=!0;const P=D=>{D.target===te.current&&D.animationName&&(te.current&&ce.current&&te.current.removeEventListener("animationend",ce.current),ce.current=null,V.current&&(V.current=!1,t()),R(!1))};te.current&&(ce.current=P,te.current.addEventListener("animationend",P))},[t,le.color,a]),se=(F,Q,P)=>{var D,G;if(F){if(X.type==="click"&&X.switch==="image")X.repeat==="close"&&C===n.length-1?ae():(D=v.current)==null||D.go("+1");else if(X.type==="click"&&X.switch==="50/50"){const oe=F.getBoundingClientRect(),ie=Q-oe.left,ye=P-oe.top,Me=oe.width,Te=oe.height;let we;z.direction==="horiz"?we=ie<Me/2?"-1":"+1":we=ye<Te/2?"-1":"+1",(G=v.current)==null||G.go(we)}}},ne=F=>{if(W.current){W.current=!1;return}const Q=n[C],P=(Q==null?void 0:Q.image.objectFit)==="cover";let D,G;if("changedTouches"in F&&F.changedTouches.length>0)D=F.changedTouches[0].clientX,G=F.changedTouches[0].clientY;else if("clientX"in F)D=F.clientX,G=F.clientY;else return;let oe;if(P&&B.current){const ie=Ia(B.current);oe=D>=ie.left&&D<=ie.right&&G>=ie.top&&G<=ie.bottom}else{const ie=B.current?La(B.current):null;if(!ie){F.target===F.currentTarget&&ae();return}oe=D>=ie.x&&D<=ie.x+ie.width&&G>=ie.y&&G<=ie.y+ie.height}oe?se(B.current,D,G):ae()},$e=F=>{const Q=F.target;(Q.classList.contains(xe.thumbsWrapper)||Q.classList.contains(xe.thumbsContainer))&&ne(F)};l.useEffect(()=>{if(!e)return;const F=Q=>{var P,D;if(Q.key==="Escape"){ae();return}if(Q.key==="ArrowRight"){b(G=>(G+1)%Math.max(n.length,1)),(P=v.current)==null||P.go("+1");return}Q.key==="ArrowLeft"&&(b(G=>(G-1+Math.max(n.length,1))%Math.max(n.length,1)),(D=v.current)==null||D.go("-1"))};return window.addEventListener("keydown",F),()=>{window.removeEventListener("keydown",F)}},[e,ae,n.length]),l.useEffect(()=>{if(e){if(b(0),I(Q=>Q+1),V.current=!1,R(!1),A(!1),J({}),!fe)return;const F=new CustomEvent("page-overlay",{detail:{itemId:fe}});window.dispatchEvent(F)}return()=>{te.current&&ce.current&&(te.current.removeEventListener("animationend",ce.current),ce.current=null),A(!1)}},[e,fe]),l.useEffect(()=>{M.current!==null&&M.current!==z.type&&I(F=>F+1),M.current=z.type},[z.type]),l.useEffect(()=>{if(!e)return;const F=document.body.style.overflow,Q=window.matchMedia("(max-width: 768px)").matches,P=Ea(le.color);document.body.style.overflow="hidden",A(!1);const D=oe=>{oe.target===te.current&&!V.current&&oe.animationName&&(Q&&!a&&P>.9&&(document.body.style.backgroundColor=le.color),A(!0),te.current&&U.current&&te.current.removeEventListener("animationend",U.current),U.current=null)};te.current&&(U.current=D,te.current.addEventListener("animationend",D));const G=oe=>{const ie=oe.target;ie&&(ie.closest(`.${xe.thumbsWrapper}`)||ie.closest(`.${xe.thumbsContainer}`))||z.type!=="slide"&&oe.preventDefault()};return document.addEventListener("touchmove",G,{passive:!1}),()=>{document.body.style.overflow=F,document.removeEventListener("touchmove",G),te.current&&U.current&&(te.current.removeEventListener("animationend",U.current),U.current=null),A(!1)}},[e,a,le.color,z.type]),l.useEffect(()=>{if(!e)return;const F=Q=>{var D,G;if(V.current){Q.stopPropagation();return}if(W.current){W.current=!1;return}const P=Q.target;if(!(P&&(P.closest(`.${xe.thumbsContainer}`)||P.closest(`.${xe.thumbItem}`)||P.closest(`.${xe.arrow}`)||P.closest(`.${xe.closeButton}`)||P.closest(`.${xe.caption}`)))){if(z.type==="slide"&&X.type==="drag"&&((G=(D=v.current)==null?void 0:D.splide)!=null&&G.root)){const oe=v.current.splide.root;if(P&&(oe.contains(P)||oe===P))return}if(Q.touches.length===0&&Q.changedTouches.length>0){const oe=n[C],ie=(oe==null?void 0:oe.image.objectFit)==="cover",ye=Q.changedTouches[0];let Me;if(ie&&B.current){const Te=Ia(B.current);Me=ye.clientX>=Te.left&&ye.clientX<=Te.right&&ye.clientY>=Te.top&&ye.clientY<=Te.bottom}else{const Te=B.current?La(B.current):null;if(!Te)return;Me=ye.clientX>=Te.x&&ye.clientX<=Te.x+Te.width&&ye.clientY>=Te.y&&ye.clientY<=Te.y+Te.height}if(!Me){Q.stopPropagation(),V.current=!0;const Te=we=>{we.stopPropagation(),we.preventDefault(),document.removeEventListener("click",Te,!0)};document.addEventListener("click",Te,!0),ae()}}}};return document.addEventListener("touchend",F,{passive:!0}),()=>{document.removeEventListener("touchend",F)}},[e,ae,C,n]);const Ce=(z.type==="scale"||z.type==="fade")&&z.direction==="vert"&&X.type==="drag";l.useEffect(()=>{var we,qe;if(!e||!Ce||!((qe=(we=v.current)==null?void 0:we.splide)!=null&&qe.root))return;const F=v.current.splide.root,Q=30,P=(de,ke)=>{if(j.current){const Ne=Math.abs(de-j.current.x),He=Math.abs(ke-j.current.y);(Ne>0||He>0)&&(W.current=!0)}},D=de=>{j.current&&(de.preventDefault(),P(de.clientX,de.clientY))},G=de=>{j.current&&de.touches.length>0&&(de.preventDefault(),P(de.touches[0].clientX,de.touches[0].clientY))},oe=(de,ke)=>{if(!j.current||!v.current){j.current=null;return}const Ne=Math.abs(de-j.current.x),He=Math.abs(ke-j.current.y);He>Q&&He>Ne&&v.current.go(ke<j.current.y?"+1":"-1"),j.current=null},ie=de=>{j.current&&oe(de.clientX,de.clientY),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("pointermove",D)},ye=de=>{if(j.current){if(de.changedTouches.length>0){const ke=de.changedTouches[0];oe(ke.clientX,ke.clientY)}document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),document.removeEventListener("touchmove",G)}},Me=de=>{j.current={x:de.clientX,y:de.clientY},W.current=!1,document.addEventListener("pointermove",D,{passive:!1}),document.addEventListener("pointerup",ie),document.addEventListener("pointercancel",ie)},Te=de=>{de.touches.length>0&&(j.current={x:de.touches[0].clientX,y:de.touches[0].clientY},W.current=!1,document.addEventListener("touchmove",G,{passive:!1}),document.addEventListener("touchend",ye),document.addEventListener("touchcancel",ye))};return F.addEventListener("pointerdown",Me),F.addEventListener("touchstart",Te),()=>{F.removeEventListener("pointerdown",Me),F.removeEventListener("touchstart",Te),document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("touchmove",G),document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),j.current=null,W.current=!1}},[e,Ce,L]);const be={backgroundColor:le.color,backdropFilter:`blur(${le.blur}px)`,animationDuration:`${parseInt(Z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:ji.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:te,className:je(xe.background,N?ge:ee,{[xe.editor]:a},{[xe.hidden]:!e}),style:{...be,...O&&!a&&!N?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?te:null,className:je(xe.contentStyle,N?Y:Re,{[xe.editor]:a},{[xe.hidden]:!e}),style:{animationDuration:`${parseInt(Z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Qr,{onMove:F=>b(F.index),ref:v,className:xe.lightboxSplide,options:{arrows:!1,speed:z.duration?parseInt(z.duration):500,direction:z.direction==="horiz"||z.type==="fade"||z.type==="scale"?"ltr":"ttb",pagination:!1,drag:X.type==="drag"&&!Ce,perPage:1,width:"100%",height:"100%",type:z.type==="fade"||z.type==="scale"?"fade":"loop",padding:0,rewind:X.repeat!=="close",start:0},style:{"--splide-speed":z.duration},children:n.map((F,Q)=>{const P=oo(he.position,he.offset,a),D=`${_.scalingValue(he.padding.top,a)} ${_.scalingValue(he.padding.right,a)} ${_.scalingValue(he.padding.bottom,a)} ${_.scalingValue(he.padding.left,a)}`,G=z.type==="scale"?(()=>{const{transform:oe,...ie}=P;return{...ie,position:"absolute",padding:D,boxSizing:"border-box","--position-transform":oe||"none"}})():{...P,position:"absolute",padding:D,boxSizing:"border-box"};return r.jsx(ea,{children:r.jsx("div",{className:xe.imgWrapper,onClick:ne,children:r.jsx("img",{ref:Q===C?B:null,className:je(xe.imageStyle,{[xe.contain]:F.image.objectFit==="contain",[xe.cover]:F.image.objectFit==="cover",[xe.scaleSlide]:z.type==="scale"}),src:F.image.url,alt:F.image.name??"",style:{...G,pointerEvents:F.image.objectFit==="contain"?"none":"auto"}})})},Q)})},L),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:je(xe.arrow,{[xe.arrowVertical]:z.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:xe.arrowInner,style:{transform:`translate(${_.scalingValue(h.offset.x,a)}, ${_.scalingValue(h.offset.y*(z.direction==="horiz"?1:-1),a)}) scale(${h.scale}) rotate(${z.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var F;return(F=v.current)==null?void 0:F.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(Qt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:je(xe.arrowImg,xe.mirror)}),!h.arrowsImgUrl&&r.jsx(Pa,{color:h.color,className:je(xe.arrowIcon,xe.arrowImg,xe.mirror)})]})}),r.jsx("div",{className:je(xe.arrow,xe.nextArrow,{[xe.arrowVertical]:z.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:xe.arrowInner,style:{transform:`translate(${_.scalingValue(h.offset.x*(z.direction==="horiz"?-1:1),a)}, ${_.scalingValue(h.offset.y,a)}) scale(${h.scale}) rotate(${z.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var F;return(F=v.current)==null?void 0:F.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(Qt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:xe.arrowImg}),!h.arrowsImgUrl&&r.jsx(Pa,{color:h.color,className:je(xe.arrowIcon,xe.arrowImg)})]})})]}),le.closeIconUrl&&(()=>{const F=oo(le.closeIconAlign,le.closeIconOffset,a),Q=`scale(${le.closeIconScale})`,P=F.transform?`${F.transform} ${Q}`:Q;return r.jsx("button",{className:xe.closeButton,style:{...F,transform:P},onClick:ae,"aria-label":"Close lightbox",children:r.jsx(Qt,{url:le.closeIconUrl,fill:le.closeIconColor??"#000000",hoverFill:le.closeIconHover??"#cccccc"})})})(),ve&&ve.isActive&&i.imageCaption&&((Ie=n[C])==null?void 0:Ie.imageCaption)&&r.jsx("div",{className:xe.caption,style:{...oo(ve.alignment,ve.offset,a),fontFamily:Ko(m.fontFamily),fontWeight:m.fontWeight,fontStyle:m.fontStyle,width:c.sizing==="auto"?"max-content":_.scalingValue(c.width,a),letterSpacing:_.scalingValue(p,a),wordSpacing:_.scalingValue($,a),textAlign:x,fontSize:_.scalingValue(w.fontSize,a),lineHeight:_.scalingValue(w.lineHeight,a),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:y},onClick:F=>F.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:xe.captionTextInner,style:{"--link-color":ve.linkColor,"--link-hover-color":ve.linkHoverColor},children:r.jsx(pi,{content:n[C].imageCaption})})}),re.isActive&&(()=>{const[F,Q]=re.position.split("-"),P=z.direction==="horiz"?`${F}-left`:re.position,D=oo(P,re.offset,a),G=()=>{if(z.direction==="horiz"){if(Q==="left")return"flex-start";if(Q==="center")return"center";if(Q==="right")return"flex-end"}else{if(F==="top")return"flex-start";if(F==="middle")return"center";if(F==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:k,className:xe.thumbsWrapper,onClick:oe=>$e(oe),style:{position:a?"absolute":"fixed",...D,...z.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:je(xe.thumbsContainer,{[xe.thumbsContainerVertical]:z.direction==="vert",[xe.thumbsAlignStart]:re.align==="start",[xe.thumbsAlignCenter]:re.align==="center",[xe.thumbsAlignEnd]:re.align==="end"}),style:{gap:_.scalingValue(re.grid.gap,a),justifyContent:E?"flex-start":G()},children:n.map((oe,ie)=>{const ye=ie===C,Me=T[ie],we=re.grid.size*(ye?re.activeState.scale:1),qe=()=>{if(re.fit!=="fit")return{};if(!Me)return z.direction==="horiz"?{height:_.scalingValue(we,a)}:{width:_.scalingValue(we,a)};const de=Me.width/Me.height;if(z.direction==="horiz"){const ke=we,Ne=ke*de;return{width:_.scalingValue(Ne,a),height:_.scalingValue(ke,a)}}else{const ke=we,Ne=ke/de;return{width:_.scalingValue(ke,a),height:_.scalingValue(Ne,a)}}};return r.jsx("button",{className:xe.thumbItem,style:{...z.direction==="horiz"&&re.fit!=="fit"?{height:_.scalingValue(we,a)}:{},...z.direction==="vert"&&re.fit!=="fit"?{width:_.scalingValue(we,a)}:{},...re.fit==="cover"?{width:_.scalingValue(we,a),height:_.scalingValue(we,a)}:{},...qe(),transition:ye?"all 0.25s ease-out":"none",opacity:ye?re.activeState.opacity/100:re.opacity/100,"--thumb-hover":re.activeState.opacity/100},onClick:de=>{var ke;de.stopPropagation(),b(ie),(ke=v.current)==null||ke.go(ie)},onMouseEnter:()=>{var de;re.triggers==="hov"&&((de=v.current)==null||de.go(ie))},children:r.jsx("img",{src:oe.image.url,alt:oe.image.name??"",onLoad:de=>{const ke=de.currentTarget;ke.naturalWidth&&ke.naturalHeight&&J(Ne=>({...Ne,[ie]:{width:ke.naturalWidth,height:ke.naturalHeight}}))},style:{objectFit:re.fit==="cover"?"cover":"contain",...re.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...re.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${oe.image.name}-${ie}`)})})})})()]})]}),document.getElementById(s))};function Pa({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 Su={element:wu,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 ro(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cu(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${oo(48)};
11
+ min-height: ${ro(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: ${oo(4)};
35
+ gap: ${ro(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,11 +128,11 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${oo(8)};
131
+ margin-top: ${ro(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${oo(8)};
135
+ margin-top: ${ro(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Cu({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,d=i&&t||!t,{prefix:c}=_.useScopedStyles(),{type:m="A",fieldsToShow:p=2,fields:x=[],buttonLabel:$,gap:w,fieldsGap:g,buttonCorners:y,buttonStroke:C,buttonPadding:b,isButtonFullWidth:L,inputCorners:I,inputStroke:N,inputPadding:R,inputColor:O,inputTextColor:A,inputBorderColor:T,placeholderColor:J,buttonColor:v,buttonTextColor:M,buttonBorderColor:B,labelTextColor:V,successColor:te,errorColor:ce,fontFamily:U,inputFontSettings:j,inputFontSize:W,inputLineHeight:k,inputLetterSpacing:E,inputWordSpacing:q,inputTextAppearance:Z,buttonFontSettings:X,buttonFontSize:z,buttonLineHeight:re,buttonLetterSpacing:h,buttonWordSpacing:le,buttonTextAppearance:ve,labelFontSettings:he,labelFontSize:Re,labelLineHeight:ee,labelLetterSpacing:ge,labelWordSpacing:Y,labelTextAppearance:fe,statusFontSettings:ae,statusFontSize:se,statusLineHeight:ne,statusLetterSpacing:$e,statusWordSpacing:Ce,statusTextAppearance:be,successMessage:Ie,errorMessage:F,stateOverrides:Q}=e,P=m==="B",D=x.slice(0,Math.min(p,x.length)),K={fontSettings:{fontFamily:U,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:W??.01,lineHeight:k,letterSpacing:E??0,wordSpacing:q??0,textAppearance:Z,color:A},oe=qt(kt(K,t)),ie=_.scalingValue(N??0,t),ye=_.scalingValue((k??W??.01)+((R==null?void 0:R.top)??0)+((R==null?void 0:R.bottom)??0)+(m==="C"?N??0:(N??0)*2),t),Me={...oe,borderStyle:"solid",borderRadius:m==="C"?0:_.scalingValue(I??0,t),...m==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ie,borderLeftWidth:0}:{borderWidth:ie},paddingTop:_.scalingValue((R==null?void 0:R.top)??0,t),paddingRight:_.scalingValue((R==null?void 0:R.right)??0,t),paddingBottom:_.scalingValue((R==null?void 0:R.bottom)??0,t),paddingLeft:_.scalingValue((R==null?void 0:R.left)??0,t),height:ye,minHeight:ye},Te={fontSettings:{fontFamily:U,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:z??.01,lineHeight:re,letterSpacing:h??0,wordSpacing:le??0,textAppearance:ve,color:M},we=qt(kt(Te,t)),qe=_.scalingValue(C??0,t),de={fontSettings:{fontFamily:U,fontWeight:(he==null?void 0:he.fontWeight)??400,fontStyle:(he==null?void 0:he.fontStyle)??"normal"},fontSize:Re??.01,lineHeight:ee,letterSpacing:ge??0,wordSpacing:Y??0,textAppearance:fe,color:V},ke=kt(de,t),Ne={fontSettings:{fontFamily:U,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:se??.01,lineHeight:ne,letterSpacing:$e??0,wordSpacing:Ce??0,textAppearance:be,color:te},He=qt(kt(Ne,t)),dt=_.buildColorVars(c,{inputColor:O,inputTextColor:A,inputBorderColor:T,placeholderColor:J!=null&&J.trim()?J:"#cccccc",buttonColor:v,buttonTextColor:M,buttonBorderColor:B,labelTextColor:V,successColor:te,errorColor:ce},Tu,Lu,Q),[ft,Et]=l.useState(()=>Object.fromEntries(D.map(ze=>[ze.name,""]))),[bt,wt]=l.useState("idle"),[Ht,Lt]=l.useState(null),Xe=s==="success"?"success":s==="error"?"error":bt,Ae=s==="error"?F:Ht,De=s==="filled",Ye=l.useMemo(()=>{if(!De)return ft;let ze=null;for(const gt of D)(ft[gt.name]??"").trim().length>0||(ze=ze??{...ft},ze[gt.name]="Filled");return ze??ft},[ft,De,D]),Be=Xe==="error"?_.getFormFieldValidationError(D,Ye):null,Pt=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Qe=o==null?void 0:o.submitUrl,At=(ze,gt)=>{Et(it=>({...it,[ze]:gt}))},Ot=async ze=>{if(ze.preventDefault(),!d)return;const gt=Object.fromEntries(D.map(Ze=>{var rt;return[Ze.name,((rt=ft[Ze.name])==null?void 0:rt.trim())??""]}).filter(([,Ze])=>Ze));if(!Qe){wt("error"),Lt("No integrations were found for this form.");return}if(Object.keys(gt).length===0)return;const it=_.getFormFieldValidationError(D,ft);if(it){wt("error"),Lt(it);return}wt("submitting"),Lt(null);try{const Ze=await fetch(Qe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)});if(!Ze.ok){const rt=await Ze.text();throw new Error(rt||`Request failed: ${Ze.status}`)}wt("success"),Et(Object.fromEntries(D.map(rt=>[rt.name,""])))}catch(Ze){wt("error"),Lt(Ze instanceof Error?Ze.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${m} ${Pt}`.trim(),style:dt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Su(c)}}),r.jsxs("form",{onSubmit:Ot,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:D.map((ze,gt)=>r.jsxs(l.Fragment,{children:[gt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${c}-control`:void 0,style:{height:_.scalingValue(g??0,t)}}),r.jsxs("div",{className:`${c}-field-group${P?` ${c}-labeled`:""}`,children:[P&&r.jsx("span",{className:`${c}-field-label`,style:ke?{...ke,lineHeight:ke.fontSize}:void 0,children:ze.label||ze.name}),ze.type==="textarea"?r.jsx("textarea",{name:ze.name,autoComplete:"off",value:Ye[ze.name]??"",onChange:it=>At(ze.name,it.target.value),placeholder:ze.placeholder,className:`${c}-input`,style:Me,rows:1,"data-filled":De||(Ye[ze.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:ze.type==="phone"?"tel":ze.type==="email"?"email":"text",name:ze.name,autoComplete:"off",value:Ye[ze.name]??"",onChange:it=>At(ze.name,it.target.value),placeholder:ze.placeholder,required:ze.isRequired??ze.type==="email",className:`${c}-input`,style:Me,"data-filled":De||(Ye[ze.name]??"").trim().length>0})]})]},gt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${c}-control`:void 0,style:{height:_.scalingValue(w??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:_.scalingValue(y??0,t),borderWidth:qe,paddingTop:_.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:_.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:_.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:_.scalingValue((b==null?void 0:b.left)??0,t),pointerEvents:d?"auto":void 0,...we,...L?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:L?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:bt==="submitting"?"...":$})})})]}),Xe==="success"&&r.jsx("p",{className:`${c}-success`,style:{...He},children:Ie}),Xe==="error"&&r.jsx("p",{className:`${c}-error`,style:{...He},role:"alert",children:Be??Ae??F})]})}const Tu={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"},Lu=["hover","focus","filled","success","error"],Iu=`import React, { useMemo, useState } from 'react';
158
+ `}function Tu({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,d=i&&t||!t,{prefix:c}=_.useScopedStyles(),{type:m="A",fieldsToShow:p=2,fields:x=[],buttonLabel:$,gap:w,fieldsGap:g,buttonCorners:y,buttonStroke:C,buttonPadding:b,isButtonFullWidth:L,inputCorners:I,inputStroke:N,inputPadding:R,inputColor:O,inputTextColor:A,inputBorderColor:T,placeholderColor:J,buttonColor:v,buttonTextColor:M,buttonBorderColor:B,labelTextColor:V,successColor:te,errorColor:ce,fontFamily:U,inputFontSettings:j,inputFontSize:W,inputLineHeight:k,inputLetterSpacing:E,inputWordSpacing:q,inputTextAppearance:Z,buttonFontSettings:X,buttonFontSize:z,buttonLineHeight:re,buttonLetterSpacing:h,buttonWordSpacing:le,buttonTextAppearance:ve,labelFontSettings:he,labelFontSize:Re,labelLineHeight:ee,labelLetterSpacing:ge,labelWordSpacing:Y,labelTextAppearance:fe,statusFontSettings:ae,statusFontSize:se,statusLineHeight:ne,statusLetterSpacing:$e,statusWordSpacing:Ce,statusTextAppearance:be,successMessage:Ie,errorMessage:F,stateOverrides:Q}=e,P=m==="B",D=x.slice(0,Math.min(p,x.length)),G={fontSettings:{fontFamily:U,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:W??.01,lineHeight:k,letterSpacing:E??0,wordSpacing:q??0,textAppearance:Z,color:A},oe=qt(kt(G,t)),ie=_.scalingValue(N??0,t),ye=_.scalingValue((k??W??.01)+((R==null?void 0:R.top)??0)+((R==null?void 0:R.bottom)??0)+(m==="C"?N??0:(N??0)*2),t),Me={...oe,borderStyle:"solid",borderRadius:m==="C"?0:_.scalingValue(I??0,t),...m==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ie,borderLeftWidth:0}:{borderWidth:ie},paddingTop:_.scalingValue((R==null?void 0:R.top)??0,t),paddingRight:_.scalingValue((R==null?void 0:R.right)??0,t),paddingBottom:_.scalingValue((R==null?void 0:R.bottom)??0,t),paddingLeft:_.scalingValue((R==null?void 0:R.left)??0,t),height:ye,minHeight:ye},Te={fontSettings:{fontFamily:U,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:z??.01,lineHeight:re,letterSpacing:h??0,wordSpacing:le??0,textAppearance:ve,color:M},we=qt(kt(Te,t)),qe=_.scalingValue(C??0,t),de={fontSettings:{fontFamily:U,fontWeight:(he==null?void 0:he.fontWeight)??400,fontStyle:(he==null?void 0:he.fontStyle)??"normal"},fontSize:Re??.01,lineHeight:ee,letterSpacing:ge??0,wordSpacing:Y??0,textAppearance:fe,color:V},ke=kt(de,t),Ne={fontSettings:{fontFamily:U,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:se??.01,lineHeight:ne,letterSpacing:$e??0,wordSpacing:Ce??0,textAppearance:be,color:te},He=qt(kt(Ne,t)),dt=_.buildColorVars(c,{inputColor:O,inputTextColor:A,inputBorderColor:T,placeholderColor:J!=null&&J.trim()?J:"#cccccc",buttonColor:v,buttonTextColor:M,buttonBorderColor:B,labelTextColor:V,successColor:te,errorColor:ce},Lu,Iu,Q),[ft,Et]=l.useState(()=>Object.fromEntries(D.map(ze=>[ze.name,""]))),[bt,wt]=l.useState("idle"),[Ht,Lt]=l.useState(null),Xe=s==="success"?"success":s==="error"?"error":bt,Ae=s==="error"?F:Ht,De=s==="filled",Ye=l.useMemo(()=>{if(!De)return ft;let ze=null;for(const gt of D)(ft[gt.name]??"").trim().length>0||(ze=ze??{...ft},ze[gt.name]="Filled");return ze??ft},[ft,De,D]),Be=Xe==="error"?_.getFormFieldValidationError(D,Ye):null,Pt=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Qe=o==null?void 0:o.submitUrl,At=(ze,gt)=>{Et(it=>({...it,[ze]:gt}))},Ot=async ze=>{if(ze.preventDefault(),!d)return;const gt=Object.fromEntries(D.map(Ze=>{var rt;return[Ze.name,((rt=ft[Ze.name])==null?void 0:rt.trim())??""]}).filter(([,Ze])=>Ze));if(!Qe){wt("error"),Lt("No integrations were found for this form.");return}if(Object.keys(gt).length===0)return;const it=_.getFormFieldValidationError(D,ft);if(it){wt("error"),Lt(it);return}wt("submitting"),Lt(null);try{const Ze=await fetch(Qe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)});if(!Ze.ok){const rt=await Ze.text();throw new Error(rt||`Request failed: ${Ze.status}`)}wt("success"),Et(Object.fromEntries(D.map(rt=>[rt.name,""])))}catch(Ze){wt("error"),Lt(Ze instanceof Error?Ze.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${m} ${Pt}`.trim(),style:dt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Cu(c)}}),r.jsxs("form",{onSubmit:Ot,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:D.map((ze,gt)=>r.jsxs(l.Fragment,{children:[gt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${c}-control`:void 0,style:{height:_.scalingValue(g??0,t)}}),r.jsxs("div",{className:`${c}-field-group${P?` ${c}-labeled`:""}`,children:[P&&r.jsx("span",{className:`${c}-field-label`,style:ke?{...ke,lineHeight:ke.fontSize}:void 0,children:ze.label||ze.name}),ze.type==="textarea"?r.jsx("textarea",{name:ze.name,autoComplete:"off",value:Ye[ze.name]??"",onChange:it=>At(ze.name,it.target.value),placeholder:ze.placeholder,className:`${c}-input`,style:Me,rows:1,"data-filled":De||(Ye[ze.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:ze.type==="phone"?"tel":ze.type==="email"?"email":"text",name:ze.name,autoComplete:"off",value:Ye[ze.name]??"",onChange:it=>At(ze.name,it.target.value),placeholder:ze.placeholder,required:ze.isRequired??ze.type==="email",className:`${c}-input`,style:Me,"data-filled":De||(Ye[ze.name]??"").trim().length>0})]})]},gt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${c}-control`:void 0,style:{height:_.scalingValue(w??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:_.scalingValue(y??0,t),borderWidth:qe,paddingTop:_.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:_.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:_.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:_.scalingValue((b==null?void 0:b.left)??0,t),pointerEvents:d?"auto":void 0,...we,...L?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:L?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:bt==="submitting"?"...":$})})})]}),Xe==="success"&&r.jsx("p",{className:`${c}-success`,style:{...He},children:Ie}),Xe==="error"&&r.jsx("p",{className:`${c}-error`,style:{...He},role:"alert",children:Be??Ae??F})]})}const Lu={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"},Iu=["hover","focus","filled","success","error"],Eu=`import React, { useMemo, useState } from 'react';
159
159
  import { CommonComponentProps } from '../props';
160
160
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
161
161
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -789,7 +789,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
789
789
  };
790
790
 
791
791
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
792
- `,Eu=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],ro={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pu=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Ru={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:{...ro.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:{...ro.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:{...ro.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:{...ro.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:Eu,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"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Pu],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"]},Mu={element:Cu,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:Ru,sourceCode:Iu,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function ao(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ku(e){return`
792
+ `,Pu=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],ao={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ru=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Mu={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:{...ao.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:{...ao.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:{...ao.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:{...ao.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:Pu,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"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Ru],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"]},ku={element:Tu,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:Mu,sourceCode:Eu,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function so(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Au(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -971,16 +971,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
971
971
  align-items: center;
972
972
  }
973
973
  .${e}-success {
974
- margin-top: ${ao(8)};
975
- font-size: ${ao(14)};
974
+ margin-top: ${so(8)};
975
+ font-size: ${so(14)};
976
976
  color: var(--${e}-success-success-color, var(--${e}-success-color));
977
977
  }
978
978
  .${e}-error {
979
- margin-top: ${ao(8)};
980
- font-size: ${ao(14)};
979
+ margin-top: ${so(8)};
980
+ font-size: ${so(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const Au=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=_.useScopedStyles(),a=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:m,fieldsToShow:p=1,fontFamily:x,inputFontSettings:$,inputFontSize:w,inputLineHeight:g,inputLetterSpacing:y,inputWordSpacing:C,inputTextAppearance:b,buttonFontSettings:L,buttonFontSize:I,buttonLineHeight:N,buttonLetterSpacing:R,buttonWordSpacing:O,buttonTextAppearance:A,statusFontSettings:T,statusFontSize:J,statusLineHeight:v,statusLetterSpacing:M,statusWordSpacing:B,statusTextAppearance:V,iconMaxWidth:te,minHeight:ce,corners:U,stroke:j,stateOverrides:W,inputPadding:k,buttonPadding:E,successMessage:q="Thanks for subscribing!",errorMessage:Z="Please, fill all required fields."}=e,X=d.slice(0,Math.min(p,d.length)),[z,re]=l.useState(()=>Object.fromEntries(X.map(de=>[de.name,""]))),[h,le]=l.useState("idle"),[ve,he]=l.useState(null),Re=o==="success"?"success":o==="error"?"error":h,ee=o==="error"?Z:ve,ge=o==="filled",Y=l.useMemo(()=>{if(!ge)return z;let de=null;for(const ke of X)(z[ke.name]??"").trim().length>0||(de=de??{...z},de[ke.name]="Filled");return de??z},[ge,z,X]),fe=Re==="error"?_.getFormFieldValidationError(X,Y):null,ae=o&&o!=="default"?`${s}-state-${o}`:"",se=X.some(de=>(Y[de.name]??"").trim().length>0),ne=ae!==`${s}-state-filled`&&se?`${s}-state-filled`:"",$e=`${ae} ${ne}`.trim(),Ce=i==null?void 0:i.submitUrl,be=m??"",Ie=(c==null?void 0:c.icon)??"",F=(c==null?void 0:c.mode)==="On",Q=be||"Submit",P={fontSettings:{fontFamily:x,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:w??.01,lineHeight:g,letterSpacing:y??0,wordSpacing:C??0,textAppearance:b,color:e.inputTextColor??"#111111"},D={fontSettings:{fontFamily:x,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:I??.01,lineHeight:N,letterSpacing:R??0,wordSpacing:O??0,textAppearance:A,color:e.buttonTextColor??"#ffffff"},K={fontSettings:{fontFamily:x,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:J??.01,lineHeight:v,letterSpacing:M??0,wordSpacing:B??0,textAppearance:V,color:e.successColor??"#22c55e"},oe=qt(kt(P,t)),ie=qt(kt(D,t)),ye=qt(kt(K,t)),Me=_.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(P==null?void 0:P.color)??"#111111",buttonTextColor:e.buttonTextColor??(D==null?void 0:D.color)??"#ffffff"},_u,Fu,W),Te={borderRadius:_.scalingValue(U,t),borderWidth:_.scalingValue(j,t),borderStyle:"solid"},we={borderLeftWidth:_.scalingValue(j,t)},qe=async de=>{if(de.preventDefault(),!a)return;const ke=Object.fromEntries(X.map(He=>{var dt;return[He.name,((dt=z[He.name])==null?void 0:dt.trim())??""]}).filter(([,He])=>He));if(!Ce){le("error"),he("No integrations were found for this form.");return}if(Object.keys(ke).length===0)return;const Ne=_.getFormFieldValidationError(X,z);if(Ne){le("error"),he(Ne);return}le("submitting"),he(null);try{const He=await fetch(Ce,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!He.ok){const dt=await He.text();throw new Error(dt||`Request failed: ${He.status}`)}le("success"),re(Object.fromEntries(X.map(dt=>[dt.name,""])))}catch(He){le("error"),he(He instanceof Error?He.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${$e}`.trim(),style:Me,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ku(s)}}),r.jsxs("form",{onSubmit:qe,className:`${s}-form`,style:{...Te,height:_.scalingValue(ce,t),minHeight:_.scalingValue(ce,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:X.map(de=>r.jsx("input",{type:de.type==="email"?"email":de.type==="phone"?"tel":"text",name:de.name,autoComplete:"off",value:Y[de.name]??"",onChange:ke=>re(Ne=>({...Ne,[de.name]:ke.target.value})),placeholder:de.placeholder,required:de.isRequired??de.type==="email",className:`${s}-input`,style:{...oe,paddingRight:_.scalingValue(k.right,t),paddingLeft:_.scalingValue(k.left,t),paddingTop:_.scalingValue(k.top,t),paddingBottom:_.scalingValue(k.bottom,t)}},de.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":Q,style:{...ie,...we,paddingRight:_.scalingValue(E.right,t),paddingLeft:_.scalingValue(E.left,t),paddingTop:_.scalingValue(E.top,t),paddingBottom:_.scalingValue(E.bottom,t),pointerEvents:a?"auto":void 0},children:h==="submitting"?"...":F?Ie&&r.jsx(Qt,{url:Ie,className:`${s}-submitBtnIcon`,style:{maxWidth:_.scalingValue(te??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):be})})]}),Re==="success"&&r.jsx("p",{className:`${s}-success`,style:{...ye},children:q}),Re==="error"&&r.jsx("p",{className:`${s}-error`,style:{...ye},role:"alert",children:fe??ee??Z})]})},_u={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"},Fu=["hover","focus","filled","success","error"],Wu=`import React, { useMemo, useState } from 'react';
983
+ `}const _u=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=_.useScopedStyles(),a=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:m,fieldsToShow:p=1,fontFamily:x,inputFontSettings:$,inputFontSize:w,inputLineHeight:g,inputLetterSpacing:y,inputWordSpacing:C,inputTextAppearance:b,buttonFontSettings:L,buttonFontSize:I,buttonLineHeight:N,buttonLetterSpacing:R,buttonWordSpacing:O,buttonTextAppearance:A,statusFontSettings:T,statusFontSize:J,statusLineHeight:v,statusLetterSpacing:M,statusWordSpacing:B,statusTextAppearance:V,iconMaxWidth:te,minHeight:ce,corners:U,stroke:j,stateOverrides:W,inputPadding:k,buttonPadding:E,successMessage:q="Thanks for subscribing!",errorMessage:Z="Please, fill all required fields."}=e,X=d.slice(0,Math.min(p,d.length)),[z,re]=l.useState(()=>Object.fromEntries(X.map(de=>[de.name,""]))),[h,le]=l.useState("idle"),[ve,he]=l.useState(null),Re=o==="success"?"success":o==="error"?"error":h,ee=o==="error"?Z:ve,ge=o==="filled",Y=l.useMemo(()=>{if(!ge)return z;let de=null;for(const ke of X)(z[ke.name]??"").trim().length>0||(de=de??{...z},de[ke.name]="Filled");return de??z},[ge,z,X]),fe=Re==="error"?_.getFormFieldValidationError(X,Y):null,ae=o&&o!=="default"?`${s}-state-${o}`:"",se=X.some(de=>(Y[de.name]??"").trim().length>0),ne=ae!==`${s}-state-filled`&&se?`${s}-state-filled`:"",$e=`${ae} ${ne}`.trim(),Ce=i==null?void 0:i.submitUrl,be=m??"",Ie=(c==null?void 0:c.icon)??"",F=(c==null?void 0:c.mode)==="On",Q=be||"Submit",P={fontSettings:{fontFamily:x,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:w??.01,lineHeight:g,letterSpacing:y??0,wordSpacing:C??0,textAppearance:b,color:e.inputTextColor??"#111111"},D={fontSettings:{fontFamily:x,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:I??.01,lineHeight:N,letterSpacing:R??0,wordSpacing:O??0,textAppearance:A,color:e.buttonTextColor??"#ffffff"},G={fontSettings:{fontFamily:x,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:J??.01,lineHeight:v,letterSpacing:M??0,wordSpacing:B??0,textAppearance:V,color:e.successColor??"#22c55e"},oe=qt(kt(P,t)),ie=qt(kt(D,t)),ye=qt(kt(G,t)),Me=_.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(P==null?void 0:P.color)??"#111111",buttonTextColor:e.buttonTextColor??(D==null?void 0:D.color)??"#ffffff"},Fu,Wu,W),Te={borderRadius:_.scalingValue(U,t),borderWidth:_.scalingValue(j,t),borderStyle:"solid"},we={borderLeftWidth:_.scalingValue(j,t)},qe=async de=>{if(de.preventDefault(),!a)return;const ke=Object.fromEntries(X.map(He=>{var dt;return[He.name,((dt=z[He.name])==null?void 0:dt.trim())??""]}).filter(([,He])=>He));if(!Ce){le("error"),he("No integrations were found for this form.");return}if(Object.keys(ke).length===0)return;const Ne=_.getFormFieldValidationError(X,z);if(Ne){le("error"),he(Ne);return}le("submitting"),he(null);try{const He=await fetch(Ce,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!He.ok){const dt=await He.text();throw new Error(dt||`Request failed: ${He.status}`)}le("success"),re(Object.fromEntries(X.map(dt=>[dt.name,""])))}catch(He){le("error"),he(He instanceof Error?He.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${$e}`.trim(),style:Me,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Au(s)}}),r.jsxs("form",{onSubmit:qe,className:`${s}-form`,style:{...Te,height:_.scalingValue(ce,t),minHeight:_.scalingValue(ce,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:X.map(de=>r.jsx("input",{type:de.type==="email"?"email":de.type==="phone"?"tel":"text",name:de.name,autoComplete:"off",value:Y[de.name]??"",onChange:ke=>re(Ne=>({...Ne,[de.name]:ke.target.value})),placeholder:de.placeholder,required:de.isRequired??de.type==="email",className:`${s}-input`,style:{...oe,paddingRight:_.scalingValue(k.right,t),paddingLeft:_.scalingValue(k.left,t),paddingTop:_.scalingValue(k.top,t),paddingBottom:_.scalingValue(k.bottom,t)}},de.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":Q,style:{...ie,...we,paddingRight:_.scalingValue(E.right,t),paddingLeft:_.scalingValue(E.left,t),paddingTop:_.scalingValue(E.top,t),paddingBottom:_.scalingValue(E.bottom,t),pointerEvents:a?"auto":void 0},children:h==="submitting"?"...":F?Ie&&r.jsx(Qt,{url:Ie,className:`${s}-submitBtnIcon`,style:{maxWidth:_.scalingValue(te??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):be})})]}),Re==="success"&&r.jsx("p",{className:`${s}-success`,style:{...ye},children:q}),Re==="error"&&r.jsx("p",{className:`${s}-error`,style:{...ye},role:"alert",children:fe??ee??Z})]})},Fu={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"},Wu=["hover","focus","filled","success","error"],Nu=`import React, { useMemo, useState } from 'react';
984
984
  import { CommonComponentProps } from '../props';
985
985
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
986
986
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1557
1557
  };
1558
1558
 
1559
1559
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1560
- `,Nu="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>'),Hu=[{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"}}}},Ou=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Bu={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:Hu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Nu},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__"]},{type:"row",items:["fieldsToShow","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:["__componentName__","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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Ou],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"]},zu={element:Au,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"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:Bu,sourceCode:Wu};function ju(e,t){const n=t>0?`${t}px`:"0px";return`
1560
+ `,Hu="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>'),Ou=[{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."}],lr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Bu=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],zu={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:{...lr.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:{...lr.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:{...lr.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:Ou,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Hu},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__"]},{type:"row",items:["fieldsToShow","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:["__componentName__","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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Bu],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"]},ju={element:_u,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"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:zu,sourceCode:Nu};function Du(e,t){const n=t>0?`${t}px`:"0px";return`
1561
1561
  .${e}-marquee-wrapper {
1562
1562
  overflow: hidden;
1563
1563
  width: 100%;
@@ -1685,7 +1685,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1685
1685
  .${e}-image-hover-grayscale:hover img {
1686
1686
  filter: grayscale(100%);
1687
1687
  }
1688
- `}const Du=30,Vu=20,lr=3,qu=12,Ku=32,Gu=3,Uu=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Xu=(e,t)=>Array.from({length:t},()=>e).flat(),Yu=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Qs=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Pa=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,a=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(a>0)return a;const d=Array.from({length:t},(m,p)=>e.children[p]),c=Qs(d);return c<=0?0:c+s*Math.max(0,t-1)},Ju=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Qs(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,a=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+a},Zu=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Qu=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Zu(i,e))},ep=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:d,onFirstSetImageDone:c})=>{var T,J,v;const m=l.useRef(null);l.useLayoutEffect(()=>{if(!a)return;const M=m.current;M!=null&&M.complete&&(c==null||c())},[a,(T=e.image)==null?void 0:T.url,c]);const p=n.display==="cover",x=n.ratioValue??"1:1",$=n.reversed??!1,[w,g]=x.split(":").map(Number),b=($?g:w)/($?w:g),L=i/b,I=L>o?o:L,N=L>o?o*b:i,R=d(N),O=d(I),A=((J=e.image)==null?void 0:J.url)&&r.jsx("img",{ref:m,src:e.image.url,alt:((v=e.image)==null?void 0:v.name)??"",style:p?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:a?c:void 0,onError:a?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...p?{width:R}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...p?{width:R,height:O,overflow:"hidden"}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:A&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:je(`${t}-marquee-link`,!p&&`${t}-marquee-link-contain`),children:A}):A})})},tp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=_.useScopedStyles(),[a,d]=l.useState(0),c=a>0?Math.round(a):0,m=l.useMemo(()=>ju(s,c),[s,c]),{speed:p,direction:x,pauseOnHover:$,gap:w,imageMaxWidth:g,imageMaxHeight:y,hoverEffect:C}=e,b=l.useMemo(()=>Yu(e.imageFit),[e.imageFit]),L=(t==null?void 0:t.length)??0,I=!!o,N=!n||!!i,R=N&&C!=="off"&&C!=="randomize"?`${s}-image-hover-${C}`:void 0,O=n?!!i:!0,T=((t==null?void 0:t.length)??0)>0&&(O||!!n),J=Math.max(0,p)*Du,v=se=>_.scalingValue(se,n??!1),M=l.useRef(null),B=l.useRef(null),V=l.useRef(null),[te,ce]=l.useState(0),U=O&&$==="on",[j,W]=l.useState(!1),[k,E]=l.useState({}),q=l.useRef(k);q.current=k;const Z=l.useRef(null),X=l.useRef(0),z=l.useRef(null),re=l.useMemo(()=>(t??[]).map(se=>{var ne;return((ne=se.image)==null?void 0:ne.url)??""}).join("\0"),[t]),[h,le]=l.useState(lr),ve=l.useMemo(()=>{const se=t??[];return se.length===0||!(O||!!n)?se:Xu(se,h)},[t,O,h,n]),he=l.useMemo(()=>(t??[]).filter(se=>{var ne;return!!((ne=se.image)!=null&&ne.url)}).length,[t]),Re=T?Gu:1;l.useLayoutEffect(()=>{X.current=0,E({}),Z.current=null,le(lr),d(0)},[re]),l.useEffect(()=>{if(!N||C!=="randomize")return;const se=M.current;if(!se)return;const ne=Ie=>{E(F=>{const Q=Array.from(Ie).filter(D=>D in F&&!Qu(se,D));if(Q.length===0)return F;const P={...F};return Q.forEach(D=>{delete P[D]}),P})},$e=new IntersectionObserver(Ie=>{const F=new Set;for(const Q of Ie){const P=Q.target.dataset.marqueeItemIndex,D=P!==void 0?Number(P):NaN;Number.isNaN(D)||F.add(D)}F.size>0&&ne(F)},{root:se,threshold:0});Object.keys(k).forEach(Ie=>{const F=Number(Ie);se.querySelectorAll(`[data-marquee-item-index="${F}"]`).forEach(Q=>$e.observe(Q))});const Ce={current:0},be=()=>{const Ie=Object.keys(q.current);Ie.length!==0&&(ne(Ie.map(Number)),Ce.current=requestAnimationFrame(be))};return Object.keys(q.current).length>0&&(Ce.current=requestAnimationFrame(be)),()=>{cancelAnimationFrame(Ce.current),$e.disconnect()}},[C,k,N]),l.useLayoutEffect(()=>{if(!T)return;const se=M.current,ne=V.current;if(!se||!ne)return;const $e={current:0},Ce=()=>{const F=se.getBoundingClientRect().width||se.offsetWidth,Q=Ju(ne),P=Z.current,D=typeof P=="number"&&Math.abs(P-Q)<=.25;if(Z.current=Q,(O||n)&&L>0&&F>0){const oe=Pa(ne,L);if(oe>=Ku){const ie=Math.min(qu,Math.max(lr,Math.ceil(F/oe)+1));ie!==h&&le(ie)}}const K=Q>0?Q:(()=>{const oe=Pa(ne,L);return oe>0?oe*h:0})();K>0?d(oe=>oe<=0?K:!D||Math.round(oe)===Math.round(K)?oe:K):!D&&a<=0&&(cancelAnimationFrame($e.current),$e.current=requestAnimationFrame(Ce))},be=()=>{cancelAnimationFrame($e.current),$e.current=requestAnimationFrame(Ce)};z.current=be,be();const Ie=new ResizeObserver(be);return Ie.observe(se),Ie.observe(ne),()=>{z.current=null,cancelAnimationFrame($e.current),Ie.disconnect()}},[O,T,a,re,h,L,n]),l.useLayoutEffect(()=>{if(!T||c<=0)return;const se=B.current;se&&Uu(se)},[T,c,x,J]),l.useLayoutEffect(()=>{if(!T||a<=0){ce(0);return}const se=B.current,ne=V.current;if(!se||!ne)return;const $e=()=>{const be=se.offsetHeight||se.getBoundingClientRect().height,Ie=Array.from(ne.children).reduce((Q,P)=>Math.max(Q,P.offsetHeight||P.getBoundingClientRect().height),0),F=be>0?be:Ie;ce(F>0?F:0)};$e();const Ce=new ResizeObserver($e);return Ce.observe(se),Ce.observe(ne),()=>Ce.disconnect()},[T,Re,ve,n,w,g,y,a,b,k]),l.useLayoutEffect(()=>{if(!n||!I||!T||typeof window>"u")return;const se=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(se)},[n,I,T,x,a,te,w,ve]);const ee=()=>{U&&W(!0)},ge=()=>{U&&W(!1)},Y=l.useCallback(()=>{var se;X.current=Math.min(he,X.current+1),(se=z.current)==null||se.call(z)},[he]),fe=l.useCallback((se,ne)=>{E($e=>{const Ce=$e[se]??ne,be=(t??[]).filter(F=>F!==Ce);if(be.length===0)return $e;const Ie=be[Math.floor(Math.random()*be.length)];return{...$e,[se]:Ie}})},[t]),ae=(se,ne,$e,Ce)=>{const be=N&&C==="randomize"&&b.display==="cover"?k[$e]??se:se,Ie=`max(${v(w)}, ${Vu}px)`,F=`calc(-0.5 * (${Ie} + ${v(w)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":$e,onMouseEnter:N&&C==="randomize"&&b.display==="cover"?()=>fe($e,se):void 0,children:[r.jsx(ep,{item:be,prefix:s,imageFit:b,imageMaxWidth:g,imageMaxHeight:y,imageHoverClass:R,isEditor:n,isFirstSet:Ce,scaled:v,onFirstSetImageDone:Y}),I&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:F,width:Ie,height:"100%"}})]},`${ne}-${$e}`)};if(T){const se=O?U&&j?"paused":"running":"paused",ne=c>0&&J>0?c/J*1e3:0,$e=`${Math.max(0,ne)/1e3}s`;return r.jsxs("div",{ref:M,className:je(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:te>0?{height:te}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:m}}),r.jsx("div",{ref:B,className:`${s}-marquee-track`,"data-direction":x,onMouseEnter:ee,onMouseLeave:ge,style:{WebkitAnimationDuration:$e,animationDuration:$e,WebkitAnimationPlayState:se,animationPlayState:se},children:Array.from({length:Re},(Ce,be)=>r.jsx("div",{ref:be===0?V:void 0,className:je(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:v(w),paddingRight:v(w)},"aria-hidden":be>0,children:ve.map((Ie,F)=>ae(Ie,be,F,be===0&&F<L))},`set-${be}`))})]})}return r.jsxs("div",{ref:M,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:m}}),r.jsx("div",{className:je(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:v(w),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((se,ne)=>ae(se,0,ne))},"marquee-static")]})},np=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1688
+ `}const Vu=30,qu=20,cr=3,Gu=12,Ku=32,Uu=3,Xu=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Yu=(e,t)=>Array.from({length:t},()=>e).flat(),Ju=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},el=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Ra=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,a=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(a>0)return a;const d=Array.from({length:t},(m,p)=>e.children[p]),c=el(d);return c<=0?0:c+s*Math.max(0,t-1)},Zu=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=el(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,a=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+a},Qu=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},ep=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Qu(i,e))},tp=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:d,onFirstSetImageDone:c})=>{var T,J,v;const m=l.useRef(null);l.useLayoutEffect(()=>{if(!a)return;const M=m.current;M!=null&&M.complete&&(c==null||c())},[a,(T=e.image)==null?void 0:T.url,c]);const p=n.display==="cover",x=n.ratioValue??"1:1",$=n.reversed??!1,[w,g]=x.split(":").map(Number),b=($?g:w)/($?w:g),L=i/b,I=L>o?o:L,N=L>o?o*b:i,R=d(N),O=d(I),A=((J=e.image)==null?void 0:J.url)&&r.jsx("img",{ref:m,src:e.image.url,alt:((v=e.image)==null?void 0:v.name)??"",style:p?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:a?c:void 0,onError:a?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...p?{width:R}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...p?{width:R,height:O,overflow:"hidden"}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:A&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:je(`${t}-marquee-link`,!p&&`${t}-marquee-link-contain`),children:A}):A})})},np=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=_.useScopedStyles(),[a,d]=l.useState(0),c=a>0?Math.round(a):0,m=l.useMemo(()=>Du(s,c),[s,c]),{speed:p,direction:x,pauseOnHover:$,gap:w,imageMaxWidth:g,imageMaxHeight:y,hoverEffect:C}=e,b=l.useMemo(()=>Ju(e.imageFit),[e.imageFit]),L=(t==null?void 0:t.length)??0,I=!!o,N=!n||!!i,R=N&&C!=="off"&&C!=="randomize"?`${s}-image-hover-${C}`:void 0,O=n?!!i:!0,T=((t==null?void 0:t.length)??0)>0&&(O||!!n),J=Math.max(0,p)*Vu,v=se=>_.scalingValue(se,n??!1),M=l.useRef(null),B=l.useRef(null),V=l.useRef(null),[te,ce]=l.useState(0),U=O&&$==="on",[j,W]=l.useState(!1),[k,E]=l.useState({}),q=l.useRef(k);q.current=k;const Z=l.useRef(null),X=l.useRef(0),z=l.useRef(null),re=l.useMemo(()=>(t??[]).map(se=>{var ne;return((ne=se.image)==null?void 0:ne.url)??""}).join("\0"),[t]),[h,le]=l.useState(cr),ve=l.useMemo(()=>{const se=t??[];return se.length===0||!(O||!!n)?se:Yu(se,h)},[t,O,h,n]),he=l.useMemo(()=>(t??[]).filter(se=>{var ne;return!!((ne=se.image)!=null&&ne.url)}).length,[t]),Re=T?Uu:1;l.useLayoutEffect(()=>{X.current=0,E({}),Z.current=null,le(cr),d(0)},[re]),l.useEffect(()=>{if(!N||C!=="randomize")return;const se=M.current;if(!se)return;const ne=Ie=>{E(F=>{const Q=Array.from(Ie).filter(D=>D in F&&!ep(se,D));if(Q.length===0)return F;const P={...F};return Q.forEach(D=>{delete P[D]}),P})},$e=new IntersectionObserver(Ie=>{const F=new Set;for(const Q of Ie){const P=Q.target.dataset.marqueeItemIndex,D=P!==void 0?Number(P):NaN;Number.isNaN(D)||F.add(D)}F.size>0&&ne(F)},{root:se,threshold:0});Object.keys(k).forEach(Ie=>{const F=Number(Ie);se.querySelectorAll(`[data-marquee-item-index="${F}"]`).forEach(Q=>$e.observe(Q))});const Ce={current:0},be=()=>{const Ie=Object.keys(q.current);Ie.length!==0&&(ne(Ie.map(Number)),Ce.current=requestAnimationFrame(be))};return Object.keys(q.current).length>0&&(Ce.current=requestAnimationFrame(be)),()=>{cancelAnimationFrame(Ce.current),$e.disconnect()}},[C,k,N]),l.useLayoutEffect(()=>{if(!T)return;const se=M.current,ne=V.current;if(!se||!ne)return;const $e={current:0},Ce=()=>{const F=se.getBoundingClientRect().width||se.offsetWidth,Q=Zu(ne),P=Z.current,D=typeof P=="number"&&Math.abs(P-Q)<=.25;if(Z.current=Q,(O||n)&&L>0&&F>0){const oe=Ra(ne,L);if(oe>=Ku){const ie=Math.min(Gu,Math.max(cr,Math.ceil(F/oe)+1));ie!==h&&le(ie)}}const G=Q>0?Q:(()=>{const oe=Ra(ne,L);return oe>0?oe*h:0})();G>0?d(oe=>oe<=0?G:!D||Math.round(oe)===Math.round(G)?oe:G):!D&&a<=0&&(cancelAnimationFrame($e.current),$e.current=requestAnimationFrame(Ce))},be=()=>{cancelAnimationFrame($e.current),$e.current=requestAnimationFrame(Ce)};z.current=be,be();const Ie=new ResizeObserver(be);return Ie.observe(se),Ie.observe(ne),()=>{z.current=null,cancelAnimationFrame($e.current),Ie.disconnect()}},[O,T,a,re,h,L,n]),l.useLayoutEffect(()=>{if(!T||c<=0)return;const se=B.current;se&&Xu(se)},[T,c,x,J]),l.useLayoutEffect(()=>{if(!T||a<=0){ce(0);return}const se=B.current,ne=V.current;if(!se||!ne)return;const $e=()=>{const be=se.offsetHeight||se.getBoundingClientRect().height,Ie=Array.from(ne.children).reduce((Q,P)=>Math.max(Q,P.offsetHeight||P.getBoundingClientRect().height),0),F=be>0?be:Ie;ce(F>0?F:0)};$e();const Ce=new ResizeObserver($e);return Ce.observe(se),Ce.observe(ne),()=>Ce.disconnect()},[T,Re,ve,n,w,g,y,a,b,k]),l.useLayoutEffect(()=>{if(!n||!I||!T||typeof window>"u")return;const se=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(se)},[n,I,T,x,a,te,w,ve]);const ee=()=>{U&&W(!0)},ge=()=>{U&&W(!1)},Y=l.useCallback(()=>{var se;X.current=Math.min(he,X.current+1),(se=z.current)==null||se.call(z)},[he]),fe=l.useCallback((se,ne)=>{E($e=>{const Ce=$e[se]??ne,be=(t??[]).filter(F=>F!==Ce);if(be.length===0)return $e;const Ie=be[Math.floor(Math.random()*be.length)];return{...$e,[se]:Ie}})},[t]),ae=(se,ne,$e,Ce)=>{const be=N&&C==="randomize"&&b.display==="cover"?k[$e]??se:se,Ie=`max(${v(w)}, ${qu}px)`,F=`calc(-0.5 * (${Ie} + ${v(w)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":$e,onMouseEnter:N&&C==="randomize"&&b.display==="cover"?()=>fe($e,se):void 0,children:[r.jsx(tp,{item:be,prefix:s,imageFit:b,imageMaxWidth:g,imageMaxHeight:y,imageHoverClass:R,isEditor:n,isFirstSet:Ce,scaled:v,onFirstSetImageDone:Y}),I&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:F,width:Ie,height:"100%"}})]},`${ne}-${$e}`)};if(T){const se=O?U&&j?"paused":"running":"paused",ne=c>0&&J>0?c/J*1e3:0,$e=`${Math.max(0,ne)/1e3}s`;return r.jsxs("div",{ref:M,className:je(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:te>0?{height:te}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:m}}),r.jsx("div",{ref:B,className:`${s}-marquee-track`,"data-direction":x,onMouseEnter:ee,onMouseLeave:ge,style:{WebkitAnimationDuration:$e,animationDuration:$e,WebkitAnimationPlayState:se,animationPlayState:se},children:Array.from({length:Re},(Ce,be)=>r.jsx("div",{ref:be===0?V:void 0,className:je(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:v(w),paddingRight:v(w)},"aria-hidden":be>0,children:ve.map((Ie,F)=>ae(Ie,be,F,be===0&&F<L))},`set-${be}`))})]})}return r.jsxs("div",{ref:M,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:m}}),r.jsx("div",{className:je(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:v(w),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((se,ne)=>ae(se,0,ne))},"marquee-static")]})},ip=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1689
1689
  import cn from 'classnames';
1690
1690
  import { CommonComponentProps } from '../props';
1691
1691
  import { scalingValue } from '../utils/scalingValue';
@@ -2407,7 +2407,7 @@ type MarqueeProps = {
2407
2407
  isPreviewMode?: boolean;
2408
2408
  isEditMode?: boolean;
2409
2409
  } & CommonComponentProps;
2410
- `,ip={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},op={element:tp,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},m:{width:390}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:ip,sourceCode:np,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Ra(e){return`
2410
+ `,op={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},rp={element:np,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},m:{width:390}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:op,sourceCode:ip,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Ma(e){return`
2411
2411
  .${e}-marquee-wrapper {
2412
2412
  overflow: hidden;
2413
2413
  width: 100%;
@@ -2494,7 +2494,7 @@ type MarqueeProps = {
2494
2494
  pointer-events: auto;
2495
2495
  z-index: 10;
2496
2496
  }
2497
- `}const rp=30,Ma=2,ap=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=_.useScopedStyles(),{align:a,speed:d,direction:c,pauseOnHover:m,gap:p,cardWidth:x,corners:$,stroke:w,strokeColor:g,bgColor:y,padding:C,logoMarginTop:b,logoWidth:L,logoHeight:I,captionMarginTop:N}=e,R=!!o,O=((t==null?void 0:t.length)??0)>0,A=d>0&&(!n||i),T=O&&(A||n),J=Math.max(0,d)*rp,v=P=>_.scalingValue(P,n??!1),M=l.useRef(null),B=l.useRef(null),V=l.useRef(null),[te,ce]=l.useState(0),[U,j]=l.useState(0),[W,k]=l.useState(0),E=A&&m==="on",[q,Z]=l.useState(!1),X=l.useRef(null),[z,re]=l.useState(0),[h,le]=l.useState(0),ve=l.useRef(null),he=P=>{var K,oe,ie,ye,Me;return{fontSettings:{fontFamily:(e==null?void 0:e[`${P}FontFamily`])??"Arial",fontWeight:((K=e==null?void 0:e[`${P}FontSettings`])==null?void 0:K.fontWeight)??400,fontStyle:((oe=e==null?void 0:e[`${P}FontSettings`])==null?void 0:oe.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${P}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((ye=e==null?void 0:e[`${P}TextAppearance`])==null?void 0:ye.textDecoration)??"none",fontVariant:((Me=e==null?void 0:e[`${P}TextAppearance`])==null?void 0:Me.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${P}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${P}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${P}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${P}LineHeight`])??.01,color:(e==null?void 0:e[`${P}Color`])??"#000000"}},Re=he("text"),ee=he("caption"),ge=l.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(P=>{var D,K;return(((D=P.text)==null?void 0:D.length)??0)>0||(((K=P.caption)==null?void 0:K.length)??0)>0}),[t]),Y=l.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:U<=0||te<=0?Ma:Math.max(Ma,Math.ceil(te/U)+1),[T,t==null?void 0:t.length,U,te]);l.useLayoutEffect(()=>{if(!T)return;const P=M.current,D=V.current;if(!P||!D)return;let K=0;const oe=()=>{const Me=P.getBoundingClientRect().width,Te=D.getBoundingClientRect().width,we=ve.current,qe=typeof we=="number"&&Math.abs(we-Te)<=.25;if(ve.current=Te,ce(Me),typeof Te=="number"&&Te>0&&U<=0){j(Te);return}qe&&Te!==U?j(Te):!qe&&U<=0&&(cancelAnimationFrame(K),K=requestAnimationFrame(oe))},ie=()=>{cancelAnimationFrame(K),K=requestAnimationFrame(oe)};ie();const ye=new ResizeObserver(ie);return ye.observe(P),ye.observe(D),()=>{cancelAnimationFrame(K),ye.disconnect()}},[A,T,U]),l.useLayoutEffect(()=>{const P=B.current;if(!T||!P)return;const D=U>0?U:0,K=D>0&&J>0?D/J*1e3:0,oe=`${Math.max(0,K)/1e3}s`;P.style.setProperty("--marquee-distance",`${D}px`),P.style.setProperty("--marquee-duration",oe)},[A,T,J,U]),l.useLayoutEffect(()=>{if(!T){k(0);return}const P=V.current,D=B.current;if(!P||!D)return;const K=()=>{let ie=0;for(let ye=0;ye<P.children.length;ye++){const Te=P.children[ye].firstElementChild;Te&&(ie=Math.max(ie,Te.offsetHeight))}ie<=0&&(ie=D.offsetHeight),k(ie>0?ie:0)};K();const oe=new ResizeObserver(K);return oe.observe(P),oe.observe(D),()=>{oe.disconnect()}},[T,Y,t,n,p,x,C,w,$,L,I,z,h]);const fe=()=>{E&&Z(!0)},ae=()=>{E&&Z(!1)},se=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),ne=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),$e=l.useCallback((P,D,K,oe)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[r.jsx("div",{"data-controls":R?oe==null?void 0:oe.controlsName:void 0,"data-controls-axis":R?"y":void 0,className:R?`${s}-control`:void 0,style:{height:v((oe==null?void 0:oe.marginTop)??0)}}),r.jsx("div",{...oe!=null&&oe.dataMeasureKind?{"data-testimonial-measure":oe.dataMeasureKind}:{},style:{...kt(P,n),textAlign:ne,pointerEvents:"auto",...typeof(oe==null?void 0:oe.minHeightPx)=="number"&&oe.minHeightPx>0?{minHeight:oe.minHeightPx}:{}},children:r.jsx(ui,{content:D})})]},K),[se,ne,n,R,s,v]),Ce=l.useCallback((P,D,K)=>{var oe,ie,ye;return r.jsxs("div",{style:{padding:`${v(C.top)} ${v(C.right)} ${v(C.bottom)} ${v(C.left)}`,width:v(x+w*2),height:"100%",borderRadius:v($),border:`${v(w)} solid ${g}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:y}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:se,textAlign:ne},children:[P.text&&$e(Re,P.text,"text",K!=null&&K.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(K==null?void 0:K.textMinHeightPx)=="number"&&K.textMinHeightPx>0?{minHeightPx:K.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[r.jsx("div",{"data-controls":R&&!(K!=null&&K.dataMeasureAttrs)?"logoMarginTop":void 0,className:R&&!(K!=null&&K.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:v(b)}}),r.jsx("div",{style:{width:v(L),height:v(I)},children:((oe=P.logo)==null?void 0:oe.url)&&r.jsx("img",{src:P.logo.url,alt:((ie=P.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ye=P.logo)==null?void 0:ye.objectFit)||"contain"}})})]}),P.caption&&$e(ee,P.caption,"caption",{...K!=null&&K.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:N,...K!=null&&K.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(K==null?void 0:K.captionMinHeightPx)=="number"&&K.captionMinHeightPx>0?{minHeightPx:K.captionMinHeightPx}:{}})]})]},D)},[y,N,ee,x,$,I,b,L,se,ne,C.bottom,C.left,C.right,C.top,$e,w,g,Re,n,R,s]),be=l.useCallback(P=>{re(P.maxTextPx),le(P.maxCaptionPx)},[]);l.useLayoutEffect(()=>{if(!ge){be({maxTextPx:0,maxCaptionPx:0});return}const P=X.current;if(!P)return;const D=()=>{_.readTestimonialTextMeasure(P,be)};D();const K=new ResizeObserver(D);return K.observe(P),()=>{K.disconnect()}},[ge,be,t,Ce]);const Ie=ge?{textMinHeightPx:z,captionMinHeightPx:h}:void 0,F=ge?r.jsx("div",{ref:X,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((P,D)=>Ce(P,`measure-${D}`,{dataMeasureAttrs:!0}))}):null,Q=(P,D)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Ce(P,`card-${D}`,Ie),R&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${v(p)})`,width:v(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},D);if(T){const P=A?E&&q?"paused":"running":"paused";return r.jsxs("div",{ref:M,className:je(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...W>0?{height:W}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ra(s)}}),F,r.jsx("div",{ref:B,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:fe,onMouseLeave:ae,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":P},children:Array.from({length:Y},(D,K)=>r.jsx("div",{ref:K===0?V:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:v(p),paddingRight:v(p)},"aria-hidden":K>0,children:t==null?void 0:t.map((oe,ie)=>Q(oe,`${K}-${ie}`))},`set-${K}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ra(s)}}),F,r.jsx("div",{style:{gap:v(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((P,D)=>Q(P,D))})]})},sp=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2497
+ `}const ap=30,ka=2,sp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=_.useScopedStyles(),{align:a,speed:d,direction:c,pauseOnHover:m,gap:p,cardWidth:x,corners:$,stroke:w,strokeColor:g,bgColor:y,padding:C,logoMarginTop:b,logoWidth:L,logoHeight:I,captionMarginTop:N}=e,R=!!o,O=((t==null?void 0:t.length)??0)>0,A=d>0&&(!n||i),T=O&&(A||n),J=Math.max(0,d)*ap,v=P=>_.scalingValue(P,n??!1),M=l.useRef(null),B=l.useRef(null),V=l.useRef(null),[te,ce]=l.useState(0),[U,j]=l.useState(0),[W,k]=l.useState(0),E=A&&m==="on",[q,Z]=l.useState(!1),X=l.useRef(null),[z,re]=l.useState(0),[h,le]=l.useState(0),ve=l.useRef(null),he=P=>{var G,oe,ie,ye,Me;return{fontSettings:{fontFamily:(e==null?void 0:e[`${P}FontFamily`])??"Arial",fontWeight:((G=e==null?void 0:e[`${P}FontSettings`])==null?void 0:G.fontWeight)??400,fontStyle:((oe=e==null?void 0:e[`${P}FontSettings`])==null?void 0:oe.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${P}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((ye=e==null?void 0:e[`${P}TextAppearance`])==null?void 0:ye.textDecoration)??"none",fontVariant:((Me=e==null?void 0:e[`${P}TextAppearance`])==null?void 0:Me.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${P}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${P}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${P}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${P}LineHeight`])??.01,color:(e==null?void 0:e[`${P}Color`])??"#000000"}},Re=he("text"),ee=he("caption"),ge=l.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(P=>{var D,G;return(((D=P.text)==null?void 0:D.length)??0)>0||(((G=P.caption)==null?void 0:G.length)??0)>0}),[t]),Y=l.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:U<=0||te<=0?ka:Math.max(ka,Math.ceil(te/U)+1),[T,t==null?void 0:t.length,U,te]);l.useLayoutEffect(()=>{if(!T)return;const P=M.current,D=V.current;if(!P||!D)return;let G=0;const oe=()=>{const Me=P.getBoundingClientRect().width,Te=D.getBoundingClientRect().width,we=ve.current,qe=typeof we=="number"&&Math.abs(we-Te)<=.25;if(ve.current=Te,ce(Me),typeof Te=="number"&&Te>0&&U<=0){j(Te);return}qe&&Te!==U?j(Te):!qe&&U<=0&&(cancelAnimationFrame(G),G=requestAnimationFrame(oe))},ie=()=>{cancelAnimationFrame(G),G=requestAnimationFrame(oe)};ie();const ye=new ResizeObserver(ie);return ye.observe(P),ye.observe(D),()=>{cancelAnimationFrame(G),ye.disconnect()}},[A,T,U]),l.useLayoutEffect(()=>{const P=B.current;if(!T||!P)return;const D=U>0?U:0,G=D>0&&J>0?D/J*1e3:0,oe=`${Math.max(0,G)/1e3}s`;P.style.setProperty("--marquee-distance",`${D}px`),P.style.setProperty("--marquee-duration",oe)},[A,T,J,U]),l.useLayoutEffect(()=>{if(!T){k(0);return}const P=V.current,D=B.current;if(!P||!D)return;const G=()=>{let ie=0;for(let ye=0;ye<P.children.length;ye++){const Te=P.children[ye].firstElementChild;Te&&(ie=Math.max(ie,Te.offsetHeight))}ie<=0&&(ie=D.offsetHeight),k(ie>0?ie:0)};G();const oe=new ResizeObserver(G);return oe.observe(P),oe.observe(D),()=>{oe.disconnect()}},[T,Y,t,n,p,x,C,w,$,L,I,z,h]);const fe=()=>{E&&Z(!0)},ae=()=>{E&&Z(!1)},se=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),ne=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),$e=l.useCallback((P,D,G,oe)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[r.jsx("div",{"data-controls":R?oe==null?void 0:oe.controlsName:void 0,"data-controls-axis":R?"y":void 0,className:R?`${s}-control`:void 0,style:{height:v((oe==null?void 0:oe.marginTop)??0)}}),r.jsx("div",{...oe!=null&&oe.dataMeasureKind?{"data-testimonial-measure":oe.dataMeasureKind}:{},style:{...kt(P,n),textAlign:ne,pointerEvents:"auto",...typeof(oe==null?void 0:oe.minHeightPx)=="number"&&oe.minHeightPx>0?{minHeight:oe.minHeightPx}:{}},children:r.jsx(pi,{content:D})})]},G),[se,ne,n,R,s,v]),Ce=l.useCallback((P,D,G)=>{var oe,ie,ye;return r.jsxs("div",{style:{padding:`${v(C.top)} ${v(C.right)} ${v(C.bottom)} ${v(C.left)}`,width:v(x+w*2),height:"100%",borderRadius:v($),border:`${v(w)} solid ${g}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:y}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:se,textAlign:ne},children:[P.text&&$e(Re,P.text,"text",G!=null&&G.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(G==null?void 0:G.textMinHeightPx)=="number"&&G.textMinHeightPx>0?{minHeightPx:G.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[r.jsx("div",{"data-controls":R&&!(G!=null&&G.dataMeasureAttrs)?"logoMarginTop":void 0,className:R&&!(G!=null&&G.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:v(b)}}),r.jsx("div",{style:{width:v(L),height:v(I)},children:((oe=P.logo)==null?void 0:oe.url)&&r.jsx("img",{src:P.logo.url,alt:((ie=P.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ye=P.logo)==null?void 0:ye.objectFit)||"contain"}})})]}),P.caption&&$e(ee,P.caption,"caption",{...G!=null&&G.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:N,...G!=null&&G.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(G==null?void 0:G.captionMinHeightPx)=="number"&&G.captionMinHeightPx>0?{minHeightPx:G.captionMinHeightPx}:{}})]})]},D)},[y,N,ee,x,$,I,b,L,se,ne,C.bottom,C.left,C.right,C.top,$e,w,g,Re,n,R,s]),be=l.useCallback(P=>{re(P.maxTextPx),le(P.maxCaptionPx)},[]);l.useLayoutEffect(()=>{if(!ge){be({maxTextPx:0,maxCaptionPx:0});return}const P=X.current;if(!P)return;const D=()=>{_.readTestimonialTextMeasure(P,be)};D();const G=new ResizeObserver(D);return G.observe(P),()=>{G.disconnect()}},[ge,be,t,Ce]);const Ie=ge?{textMinHeightPx:z,captionMinHeightPx:h}:void 0,F=ge?r.jsx("div",{ref:X,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((P,D)=>Ce(P,`measure-${D}`,{dataMeasureAttrs:!0}))}):null,Q=(P,D)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Ce(P,`card-${D}`,Ie),R&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${v(p)})`,width:v(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},D);if(T){const P=A?E&&q?"paused":"running":"paused";return r.jsxs("div",{ref:M,className:je(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...W>0?{height:W}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ma(s)}}),F,r.jsx("div",{ref:B,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:fe,onMouseLeave:ae,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":P},children:Array.from({length:Y},(D,G)=>r.jsx("div",{ref:G===0?V:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:v(p),paddingRight:v(p)},"aria-hidden":G>0,children:t==null?void 0:t.map((oe,ie)=>Q(oe,`${G}-${ie}`))},`set-${G}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ma(s)}}),F,r.jsx("div",{style:{gap:v(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((P,D)=>Q(P,D))})]})},lp=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2498
2498
  import cn from 'classnames';
2499
2499
  import { CommonComponentProps } from '../props';
2500
2500
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3109,7 +3109,7 @@ type TestimonialsSettings = {
3109
3109
  logoHeight: number;
3110
3110
  captionMarginTop: number;
3111
3111
  };
3112
- `,ka={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},lp={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,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-cycle",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:{...ka.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:{...ka.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:{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__","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__"]},{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:["__componentName__",{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"}]}]}]}},cp={element:ap,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:lp,sourceCode:sp,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function dp(e){return`
3112
+ `,Aa={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},cp={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,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-cycle",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:{...Aa.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:{...Aa.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:{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__","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__"]},{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:["__componentName__",{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"}]}]}]}},dp={element:sp,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:cp,sourceCode:lp,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function up(e){return`
3113
3113
  .${e}-container {
3114
3114
  position: relative;
3115
3115
  overflow-x: clip;
@@ -3233,7 +3233,7 @@ type TestimonialsSettings = {
3233
3233
  width: 100%;
3234
3234
  height: 100%;
3235
3235
  }
3236
- `}const up=3e3,pp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=_.useScopedStyles(),a=t||[],{speed:d,align:c,width:m,imageMarginTop:p,textMarginTop:x,captionMarginTop:$,imageWidth:w,imageHeight:g,controlsWidth:y,controlsColor:C,controlsHoverColor:b}=e,L=d>0&&(!n||!!i),[I,N]=l.useState(0),[R,O]=l.useState(null),[A,T]=l.useState(!1),J=l.useRef(null),v=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),M=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);l.useEffect(()=>{N(0),O(null),T(!1)},[a.length]);const B=a[I],V=R===null?null:a[R],te=ee=>{var Y,fe,ae,se,ne;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ee}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${ee}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((fe=e==null?void 0:e[`${ee}FontSettings`])==null?void 0:fe.fontStyle)??"normal"},textAppearance:{textTransform:((ae=e==null?void 0:e[`${ee}TextAppearance`])==null?void 0:ae.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${ee}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((ne=e==null?void 0:e[`${ee}TextAppearance`])==null?void 0:ne.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ee}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ee}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ee}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ee}WordSpacing`])??0,color:(e==null?void 0:e[`${ee}Color`])??"#000000"}},ce=te("text"),U=te("caption"),j=a.length>1&&a.some(ee=>{var ge,Y;return(((ge=ee.text)==null?void 0:ge.length)??0)>0||(((Y=ee.caption)==null?void 0:Y.length)??0)>0}),W=l.useRef(null),[k,E]=l.useState(0),[q,Z]=l.useState(0),X=e.controls??{mode:"Off",icon:null},z=a.length>1,re=l.useCallback((ee,ge)=>!z||ge===ee?ee:(J.current&&window.clearTimeout(J.current),O(ee),T(!0),J.current=window.setTimeout(()=>{O(null),T(!1),J.current=null},300),ge),[z]),h=l.useCallback(()=>{z&&N(ee=>re(ee,(ee-1+a.length)%a.length))},[z,re,a.length]),le=l.useCallback(()=>{z&&N(ee=>re(ee,(ee+1)%a.length))},[z,re,a.length]);l.useEffect(()=>{if(!L||!z)return;const ee=Math.max(300,up/d),ge=window.setInterval(()=>{N(Y=>re(Y,(Y+1)%a.length))},ee);return()=>{window.clearInterval(ge)}},[L,z,re,a.length,d]),l.useEffect(()=>()=>{J.current&&window.clearTimeout(J.current)},[]);const ve=(ee,ge)=>{var ne,$e,Ce,be;const Y=ge==null?void 0:ge.textMinHeightPx,fe=ge==null?void 0:ge.captionMinHeightPx,ae=ge==null?void 0:ge.dataMeasureAttrs,se=o&&!(ge!=null&&ge.dataMeasureAttrs)&&!(ge!=null&&ge.hideControls);return r.jsxs(r.Fragment,{children:[ee.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[r.jsx("div",{"data-controls":se?"textMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:_.scalingValue(x??0,n??!1)}}),r.jsx("div",{...ae&&{"data-testimonial-measure":"text"},style:{...kt(ce,n),...Y&&Y>0?{minHeight:Y}:{},textAlign:M,pointerEvents:"auto"},children:r.jsx(ui,{content:ee.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[r.jsx("div",{"data-controls":se?"imageMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:_.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:_.scalingValue(w??0,n??!1),height:_.scalingValue(g??0,n??!1)},children:((ne=ee.image)==null?void 0:ne.url)&&r.jsx("img",{src:($e=ee.image)==null?void 0:$e.url,alt:((Ce=ee.image)==null?void 0:Ce.name)??"",className:`${s}-icon`,style:{objectFit:((be=ee.image)==null?void 0:be.objectFit)||"contain"}})})]}),ee.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[r.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:_.scalingValue($??0,n??!1)}}),r.jsx("div",{...ae?{"data-testimonial-measure":"caption"}:{},style:{...kt(U,n),...fe&&fe>0?{minHeight:fe}:{},textAlign:M,pointerEvents:"auto"},children:r.jsx(ui,{content:ee.caption})})]})]})},he=l.useCallback(ee=>{E(ee.maxTextPx),Z(ee.maxCaptionPx)},[]);if(l.useLayoutEffect(()=>{if(!j){he({maxTextPx:0,maxCaptionPx:0});return}const ee=W.current;if(!ee)return;const ge=()=>{_.readTestimonialTextMeasure(ee,he)};ge();const Y=new ResizeObserver(ge);return Y.observe(ee),()=>{Y.disconnect()}},[j,he,t]),!B)return r.jsx(r.Fragment,{});const Re=j?{textMinHeightPx:k,captionMinHeightPx:q}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:dp(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:_.scalingValue(m??0,n??!1),alignItems:v},children:[j&&r.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:a.map((ee,ge)=>r.jsx("div",{style:{width:"100%"},children:ve(ee,{dataMeasureAttrs:!0})},ge))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[V&&A&&r.jsx("div",{className:je(`${s}-fade-item-prev`,`${s}-fade-out`),children:ve(V,{...Re,hideControls:!0})}),r.jsx("div",{className:je(`${s}-fade-item-current`,A?`${s}-fade-in`:void 0),children:ve(B,Re)})]})]}),X.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:_.scalingValue(y??.02,n??!1),height:_.scalingValue(y??.02,n??!1),"--arrow-hover-color":b},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:h,disabled:!z,"aria-label":"Previous testimonial",children:X.icon&&r.jsx(Qt,{url:X.icon,fill:C,hoverFill:b,className:je(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:je(`${s}-arrow`,`${s}-next-arrow`),style:{width:_.scalingValue(y??.02,n??!1),height:_.scalingValue(y??.02,n??!1),"--arrow-hover-color":b},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:le,disabled:!z,"aria-label":"Next testimonial",children:X.icon&&r.jsx(Qt,{url:X.icon,fill:C,hoverFill:b,className:`${s}-arrow-img`})})})]})]})})},mp=`import cn from 'classnames';
3236
+ `}const pp=3e3,mp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=_.useScopedStyles(),a=t||[],{speed:d,align:c,width:m,imageMarginTop:p,textMarginTop:x,captionMarginTop:$,imageWidth:w,imageHeight:g,controlsWidth:y,controlsColor:C,controlsHoverColor:b}=e,L=d>0&&(!n||!!i),[I,N]=l.useState(0),[R,O]=l.useState(null),[A,T]=l.useState(!1),J=l.useRef(null),v=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),M=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);l.useEffect(()=>{N(0),O(null),T(!1)},[a.length]);const B=a[I],V=R===null?null:a[R],te=ee=>{var Y,fe,ae,se,ne;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ee}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${ee}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((fe=e==null?void 0:e[`${ee}FontSettings`])==null?void 0:fe.fontStyle)??"normal"},textAppearance:{textTransform:((ae=e==null?void 0:e[`${ee}TextAppearance`])==null?void 0:ae.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${ee}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((ne=e==null?void 0:e[`${ee}TextAppearance`])==null?void 0:ne.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ee}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ee}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ee}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ee}WordSpacing`])??0,color:(e==null?void 0:e[`${ee}Color`])??"#000000"}},ce=te("text"),U=te("caption"),j=a.length>1&&a.some(ee=>{var ge,Y;return(((ge=ee.text)==null?void 0:ge.length)??0)>0||(((Y=ee.caption)==null?void 0:Y.length)??0)>0}),W=l.useRef(null),[k,E]=l.useState(0),[q,Z]=l.useState(0),X=e.controls??{mode:"Off",icon:null},z=a.length>1,re=l.useCallback((ee,ge)=>!z||ge===ee?ee:(J.current&&window.clearTimeout(J.current),O(ee),T(!0),J.current=window.setTimeout(()=>{O(null),T(!1),J.current=null},300),ge),[z]),h=l.useCallback(()=>{z&&N(ee=>re(ee,(ee-1+a.length)%a.length))},[z,re,a.length]),le=l.useCallback(()=>{z&&N(ee=>re(ee,(ee+1)%a.length))},[z,re,a.length]);l.useEffect(()=>{if(!L||!z)return;const ee=Math.max(300,pp/d),ge=window.setInterval(()=>{N(Y=>re(Y,(Y+1)%a.length))},ee);return()=>{window.clearInterval(ge)}},[L,z,re,a.length,d]),l.useEffect(()=>()=>{J.current&&window.clearTimeout(J.current)},[]);const ve=(ee,ge)=>{var ne,$e,Ce,be;const Y=ge==null?void 0:ge.textMinHeightPx,fe=ge==null?void 0:ge.captionMinHeightPx,ae=ge==null?void 0:ge.dataMeasureAttrs,se=o&&!(ge!=null&&ge.dataMeasureAttrs)&&!(ge!=null&&ge.hideControls);return r.jsxs(r.Fragment,{children:[ee.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[r.jsx("div",{"data-controls":se?"textMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:_.scalingValue(x??0,n??!1)}}),r.jsx("div",{...ae&&{"data-testimonial-measure":"text"},style:{...kt(ce,n),...Y&&Y>0?{minHeight:Y}:{},textAlign:M,pointerEvents:"auto"},children:r.jsx(pi,{content:ee.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[r.jsx("div",{"data-controls":se?"imageMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:_.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:_.scalingValue(w??0,n??!1),height:_.scalingValue(g??0,n??!1)},children:((ne=ee.image)==null?void 0:ne.url)&&r.jsx("img",{src:($e=ee.image)==null?void 0:$e.url,alt:((Ce=ee.image)==null?void 0:Ce.name)??"",className:`${s}-icon`,style:{objectFit:((be=ee.image)==null?void 0:be.objectFit)||"contain"}})})]}),ee.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[r.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:_.scalingValue($??0,n??!1)}}),r.jsx("div",{...ae?{"data-testimonial-measure":"caption"}:{},style:{...kt(U,n),...fe&&fe>0?{minHeight:fe}:{},textAlign:M,pointerEvents:"auto"},children:r.jsx(pi,{content:ee.caption})})]})]})},he=l.useCallback(ee=>{E(ee.maxTextPx),Z(ee.maxCaptionPx)},[]);if(l.useLayoutEffect(()=>{if(!j){he({maxTextPx:0,maxCaptionPx:0});return}const ee=W.current;if(!ee)return;const ge=()=>{_.readTestimonialTextMeasure(ee,he)};ge();const Y=new ResizeObserver(ge);return Y.observe(ee),()=>{Y.disconnect()}},[j,he,t]),!B)return r.jsx(r.Fragment,{});const Re=j?{textMinHeightPx:k,captionMinHeightPx:q}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:up(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:_.scalingValue(m??0,n??!1),alignItems:v},children:[j&&r.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:a.map((ee,ge)=>r.jsx("div",{style:{width:"100%"},children:ve(ee,{dataMeasureAttrs:!0})},ge))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[V&&A&&r.jsx("div",{className:je(`${s}-fade-item-prev`,`${s}-fade-out`),children:ve(V,{...Re,hideControls:!0})}),r.jsx("div",{className:je(`${s}-fade-item-current`,A?`${s}-fade-in`:void 0),children:ve(B,Re)})]})]}),X.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:_.scalingValue(y??.02,n??!1),height:_.scalingValue(y??.02,n??!1),"--arrow-hover-color":b},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:h,disabled:!z,"aria-label":"Previous testimonial",children:X.icon&&r.jsx(Qt,{url:X.icon,fill:C,hoverFill:b,className:je(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:je(`${s}-arrow`,`${s}-next-arrow`),style:{width:_.scalingValue(y??.02,n??!1),height:_.scalingValue(y??.02,n??!1),"--arrow-hover-color":b},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:le,disabled:!z,"aria-label":"Next testimonial",children:X.icon&&r.jsx(Qt,{url:X.icon,fill:C,hoverFill:b,className:`${s}-arrow-img`})})})]})]})})},gp=`import cn from 'classnames';
3237
3237
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3238
3238
  import { CommonComponentProps } from '../props';
3239
3239
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3729,11 +3729,11 @@ type TestimonialsSettings = {
3729
3729
  icon?: string | null;
3730
3730
  };
3731
3731
  };
3732
- `,gp="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),Aa={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},hp={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Aa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Aa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:gp},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},fp={element:pp,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:hp,sourceCode:mp,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function yp(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _a(e){return((e==null?void 0:e.trim().length)??0)>0}function cr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function dr(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:_.scalingValue((o-t)/2,i)}}function vp(e){return`
3732
+ `,hp="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),_a={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},fp={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{..._a.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{..._a.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:hp},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},yp={element:mp,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:fp,sourceCode:gp,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function vp(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fa(e){return((e==null?void 0:e.trim().length)??0)>0}function dr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ur(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:_.scalingValue((o-t)/2,i)}}function xp(e){return`
3733
3733
  .${e}-wrapper {
3734
3734
  display: grid;
3735
3735
  align-items: start;
3736
- min-height: ${yp(48)};
3736
+ min-height: ${vp(48)};
3737
3737
  }
3738
3738
  .${e}-item {
3739
3739
  display: flex;
@@ -4070,7 +4070,7 @@ type TestimonialsSettings = {
4070
4070
  pointer-events: auto;
4071
4071
  z-index: 10;
4072
4072
  }
4073
- `}const pn=500,xp=750,On="cubic-bezier(0.22, 1, 0.36, 1)",bp=72,wp=50;function $p(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Sp(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Cp(e){const[t]=e.media;return t!=null&&t.url?t:null}function Tp(e){return!Array.isArray(e)||e.length===0?[]:$p(e)?e.flatMap(t=>{const n=Sp(t);if(!n)return[];const i=Cp(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ii(e){return e.type==="video"}function Lp(e){e.pause(),e.removeAttribute("src"),e.load()}function Fa({media:e,className:t,style:n,onMediaClick:i}){return Ii(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function so(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ip(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ep({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:d}){return l.useEffect(()=>{const c=n.current;if(c)return()=>{Lp(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:d,style:i})}function Pp({items:e,index:t,imageDisplay:n,onClose:i,onPrev:o,onNext:s,counterClassName:a,counterStyle:d}){const c=n==="cover",m=l.useRef(null),p=l.useRef(null),x=l.useRef(null),$=l.useRef(null),w=l.useRef(0),g=l.useRef(0),y=l.useRef("none"),C=l.useRef(!1),b=l.useRef(!1),L=l.useRef(!1),I=l.useRef(null),[N,R]=l.useState(null),[O,A]=l.useState("opening"),[T,J]=l.useState(0),[v,M]=l.useState(0),[B,V]=l.useState(!1),[te,ce]=l.useState(!1),[U,j]=l.useState(!1),W=l.useRef(t),k=e[t],E=k?Ii(k):!1,q=v!==0||B,Z=l.useCallback(ne=>{L.current=ne,V(ne)},[]),X=l.useCallback(()=>{I.current!==null&&(window.clearTimeout(I.current),I.current=null)},[]),z=l.useCallback(()=>{X(),I.current=window.setTimeout(()=>{X(),Z(!1)},pn+32)},[X,Z]),re=l.useCallback(()=>{const ne=p.current,$e=x.current;if(!ne)return;const Ce=ne.getBoundingClientRect(),be=Ce.width,Ie=Ce.height;if(!be||!Ie)return;if(n==="cover"){R({width:be,height:Ie,left:Ce.left,top:Ce.top});return}if(!$e){R(so(ne));return}const{width:F,height:Q}=Ip($e);if(!F||!Q){R(so(ne));return}const P=F/Q,D=be/Ie;if(P>D){const K=be/P;R({width:be,height:K,left:Ce.left,top:Ce.top+(Ie-K)/2})}else{const K=Ie*P;R({width:K,height:Ie,left:Ce.left+(be-K)/2,top:Ce.top})}},[n]);l.useEffect(()=>{re();const ne=p.current;if(!ne)return;const $e=new ResizeObserver(()=>re());return $e.observe(ne),()=>$e.disconnect()},[re,t]),l.useEffect(()=>{O==="opening"&&N&&A("open")},[O,N]),l.useEffect(()=>{if(O!=="closing")return;const ne=setTimeout(()=>i(),pn);return()=>clearTimeout(ne)},[O,i]),l.useEffect(()=>()=>{X()},[X]),l.useLayoutEffect(()=>{if(W.current===t)return;X(),J(0),M(0),Z(!1),j(!1),ce(!1),w.current=0,g.current=0,y.current="none",C.current=!1,$.current=null,b.current=!1;const ne=p.current;ne&&R(so(ne)),W.current=t},[t,Z,X]),l.useEffect(()=>{if(O!=="open")return;const ne=()=>{const Q=P=>{P.stopPropagation(),P.preventDefault(),document.removeEventListener("click",Q,!0)};document.addEventListener("click",Q,!0)},$e=Q=>{X(),L.current=!1,V(!1),M(0),ce(!1),C.current=!1,g.current=0,y.current="none";const P=p.current;P&&R(so(P)),Q<0?s():o()},Ce=Q=>{if(Math.abs(Q)>wp&&e.length>1){$e(Q);return}Z(!0),M(0),z()},be=Q=>{if(Q.touches.length!==1||L.current)return;const P=Q.touches[0];b.current=!0,$.current={x:P.clientX,y:P.clientY},y.current="none",g.current=0,C.current=!1},Ie=Q=>{if(!$.current||Q.touches.length!==1||L.current)return;const P=Q.touches[0],D=P.clientX-$.current.x,K=P.clientY-$.current.y;if(y.current==="none"){if(Math.abs(D)<10&&Math.abs(K)<10)return;if(Math.abs(D)>Math.abs(K)){if(e.length<=1)return;y.current="horizontal"}else if(K>0)y.current="vertical";else return}if(y.current==="horizontal"){C.current=!0,ce(!0),g.current=D,M(D),Q.preventDefault();return}y.current==="vertical"&&(C.current=!0,ce(!0),w.current=K,J(K),Q.preventDefault())},F=()=>{if(!$.current)return;const Q=y.current,P=C.current;if(P&&Q==="horizontal")Ce(g.current),ne();else if(P&&Q==="vertical"){if(w.current>bp){const K=window.innerHeight;w.current=K,j(!0),J(K),A("closing")}else w.current=0,J(0);ne()}else Q==="horizontal"&&Math.abs(g.current)>0&&(Ce(g.current),ne());$.current=null,y.current="none",g.current=0,C.current=!1,ce(!1)};return document.addEventListener("touchstart",be,{passive:!0}),document.addEventListener("touchmove",Ie,{passive:!1}),document.addEventListener("touchend",F),document.addEventListener("touchcancel",F),()=>{document.removeEventListener("touchstart",be),document.removeEventListener("touchmove",Ie),document.removeEventListener("touchend",F),document.removeEventListener("touchcancel",F)}},[O,e.length,s,o,Z,z]),l.useEffect(()=>{const ne=$e=>{$e.key==="Escape"&&($e.preventDefault(),$e.stopPropagation(),O!=="closing"&&A("closing"))};return window.addEventListener("keydown",ne,!0),()=>window.removeEventListener("keydown",ne,!0)},[O]);const h=()=>{O!=="closing"&&A("closing")},le=O==="open",ve=O==="closing",he=T>0?Math.max(0,1-T/500):1,Re=T>0?Math.max(.35,1-T/500):1,ee=ne=>{if(ne.stopPropagation(),b.current){b.current=!1;return}if(e.length<=1)return;const $e=ne.currentTarget.getBoundingClientRect(),Ce=ne.clientY-$e.top,be=Math.min(52,$e.height*.2);if(!(Ce>$e.height-be)){if(ne.clientX-$e.left<$e.width/2){o();return}s()}},ge=ne=>{if(e.length<=1)return;const $e=ne.currentTarget.getBoundingClientRect(),Ce=ne.clientX-$e.left,be=ne.clientY-$e.top,Ie=Math.min(52,$e.height*.2);if(be>$e.height-Ie){ne.currentTarget.style.cursor="default";return}ne.currentTarget.style.cursor=Ce<$e.width/2?"w-resize":"e-resize"},Y=l.useCallback(ne=>{ne.propertyName!=="transform"||!L.current||(X(),Z(!1))},[X,Z]),fe=q?`translateX(${v}px)`:T>0?`translateY(${T}px)`:void 0,ae={position:"fixed",top:N==null?void 0:N.top,left:N==null?void 0:N.left,width:N==null?void 0:N.width,height:N==null?void 0:N.height,objectFit:n==="cover"?"cover":"contain",transform:fe,opacity:T>0?Re:O==="opening"||ve?0:1,transition:te&&!B?"none":B?`transform ${pn}ms ${On}`:U?`transform ${pn}ms ${On}, opacity ${pn}ms ${On}`:O==="opening"||ve?`opacity ${pn}ms ${On}`:"none",pointerEvents:E&&le&&!q?"auto":"none",touchAction:E&&le?"none":void 0,zIndex:9998},se=N?{position:"fixed",top:N.top,height:N.height,width:N.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:m,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:O==="open"?"none":void 0},onClick:h,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:le?he:0,transition:te?"none":`opacity ${pn}ms ${On}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:c?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:p,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:le?1:0,transition:`opacity ${pn}ms ${On}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:a,style:d,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:p,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:le?1:0,transition:`opacity ${pn}ms ${On}`},children:e.length>1&&r.jsxs("p",{className:a,style:d,children:[t+1," / ",e.length]})})]})}),N&&k&&(E?r.jsx(Ep,{src:k.url,phase:O,mediaRef:x,mediaStyle:ae,onLoadedMetadata:re,onClick:ee,onMouseMove:ge,onTransitionEnd:Y},`${t}-${k.url}`):r.jsx("img",{ref:x,src:k.url,alt:k.name,onLoad:re,onTransitionEnd:Y,style:ae},`${t}-${k.url}`)),le&&se&&e.length>1&&!E&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...se,left:N.left,cursor:"w-resize",pointerEvents:q?"none":"auto"},onClick:ne=>{if(b.current){b.current=!1;return}ne.stopPropagation(),o()}}),r.jsx("div",{style:{...se,left:N.left+N.width/2,cursor:"e-resize",pointerEvents:q?"none":"auto"},onClick:ne=>{if(b.current){b.current=!1;return}ne.stopPropagation(),s()}})]})]})}function Rp(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Mp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:d}){const{prefix:c}=_.useScopedStyles(),{type:m="a",gridLayout:p,textBoxWidth:x=100,verticalGap:$,entriesCount:w,lightbox:g,imageDisplay:y,lightboxImageDisplay:C,slider:b,sliderTiming:L,direction:I,transition:N,titleMarginTop:R,subtitleMarginTop:O,titleColor:A,subtitleColor:T,lightboxCounterColor:J,titleFontFamily:v,titleFontSettings:M,titleFontSize:B,titleLineHeight:V,titleLetterSpacing:te,titleWordSpacing:ce,titleTextAppearance:U,subtitleFontFamily:j,subtitleFontSettings:W,subtitleFontSize:k,subtitleLineHeight:E,subtitleLetterSpacing:q,subtitleWordSpacing:Z,subtitleTextAppearance:X,lightboxCounterFontFamily:z,lightboxCounterFontSettings:re,lightboxCounterFontSize:h,lightboxCounterLineHeight:le,lightboxCounterLetterSpacing:ve,lightboxCounterWordSpacing:he,lightboxCounterTextAppearance:Re,showText:ee="always",alignEntries:ge="off",align:Y="top"}=e,fe={fontSettings:{fontFamily:v,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:B??.01,lineHeight:V,letterSpacing:te??0,wordSpacing:ce??0,textAppearance:U,color:A},se={...qt(kt(fe,n))},ne={fontSettings:{fontFamily:j,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:k??.01,lineHeight:E,letterSpacing:q??0,wordSpacing:Z??0,textAppearance:X,color:T},Ce={...qt(kt(ne,n))},be={fontSettings:{fontFamily:z,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:h??.01,lineHeight:le,letterSpacing:ve??0,wordSpacing:he??0,textAppearance:Re,color:J},F={...qt(kt(be,n)),...dr(h,le,c,n)},Q=cr(B,V,`${c}-item-title`,`${c}-text-tight-leading`),P=cr(k,E,`${c}-item-subtitle`,`${c}-text-tight-leading`),D=dr(B,V,c,n),K=dr(k,E,c,n),oe=cr(h,le,`${c}-lightbox-counter`,`${c}-text-tight-leading`),ie=_.buildColorVars(c,{titleColor:A,subtitleColor:T,lightboxCounterColor:J},kp,Ap),Te=`${a&&a!=="default"?`${c}-state-${a}`:""}${ee==="on hover"&&(!n||i)?` ${c}-show-text-hover`:""}`.trim(),we=w===0?1/0:w,qe=(t??[]).slice(0,we),de=p.entryWidth??.2,ke=(y==null?void 0:y.display)==="cover",Ne=(y==null?void 0:y.ratioValue)??"1:1",He=(y==null?void 0:y.reversed)??!1,[dt,ft]=Ne.split(":").map(Number),wt=`${He?ft:dt} / ${He?dt:ft}`,Ht=_.scalingValue(de??0,n),Lt=!ke&&b!=="off",Xe={width:Ht,...ke?{aspectRatio:wt,height:"auto",overflow:"hidden"}:{height:"auto"}},Ae=`${c}-item-image-wrapper${Lt?` ${c}-item-image-wrapper-fit-slider`:""}`.trim(),De=m==="d"||m==="e"||m==="f",Ye=ge==="on",Be=`calc(${_.scalingValue(de??0,n)} * (${x} / 100))`,ut=_.scalingValue(de*x/100,n),Pt=ke?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Qe,At]=l.useState("ltr"),[Ot,ze]=l.useState(0),gt=l.useRef(null);l.useEffect(()=>{const Ke=gt.current;if(!Ke)return;const yt=new ResizeObserver(vt=>{ze(Math.round(vt[0].contentRect.width))});return yt.observe(Ke),()=>yt.disconnect()},[]);const it=(()=>{const Ke={...ie},yt=gt.current?getComputedStyle(gt.current).getPropertyValue("--cntrl-article-width").trim():"";return yt&&(Ke["--cntrl-article-width"]=yt),Ke})(),[Ze,rt]=l.useState(!1),[at,sn]=l.useState([]),[wn,ln]=l.useState(0),ot=g==="on"&&(!n||i),tn=(Ke,yt)=>{n&&!i||g!=="off"&&(sn(Ke),ln(yt),rt(!0))};l.useEffect(()=>{if(!Ze||g!=="on"||typeof document>"u")return;const Ke=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ke}},[Ze,g]),l.useEffect(()=>{!n||i||rt(!1)},[n,i]);const Ut=l.useMemo(()=>vp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ut}}),r.jsx("div",{style:ie,children:r.jsx("div",{ref:gt,className:`${c}-wrapper ${c}-type-${m}${Ye?` ${c}-align-entries`:""} ${c}-image-align-${Y} ${Te}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:Ye?0:_.scalingValue($??0,n),columnGap:_.scalingValue(p.horizontalGap??0,n),width:_.scalingValue(p.wrapperWidth??0,n),...Ye?{[`--${c}-align-entries-row-gap`]:_.scalingValue($??0,n)}:{}},children:qe.map((Ke,yt)=>{var Rt;const vt=_a(Ke.title),pe=_a(Ke.subtitle),Le=(((Rt=Ke.link)==null?void 0:Rt.length)??0)>0&&g==="off"?Ke.link:void 0,_e=Math.floor(yt/p.columnsCount)===Math.ceil(qe.length/p.columnsCount)-1,We=De?r.jsxs("div",{className:`${c}-item-text-block`,children:[vt&&r.jsx("p",{className:Q,style:{width:Be,...se,...D},children:Ke.title}),vt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:_.scalingValue(R??0,n),width:ut}}),pe&&r.jsx("p",{className:P,style:{width:Be,...Ce,...K},children:Ke.subtitle}),pe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:_.scalingValue(O??0,n),width:ut}})]}):null,tt=Ye?r.jsxs("div",{className:`${c}-item-title-row`,children:[!De&&r.jsx("div",{"data-controls":o&&vt?"titleMarginTop":void 0,className:o&&vt?`${c}-control`:void 0,style:{height:vt?_.scalingValue(R??0,n):0,width:ut}}),vt&&r.jsx("p",{className:Q,style:{width:Be,...se,...D},children:Ke.title}),De&&vt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:_.scalingValue(R??0,n),width:ut}})]}):null,$t=Ye?r.jsxs("div",{className:`${c}-item-subtitle-row`,children:[!De&&r.jsx("div",{"data-controls":o&&pe?"subtitleMarginTop":void 0,className:o&&pe?`${c}-control`:void 0,style:{height:pe?_.scalingValue(O??0,n):0,width:ut}}),pe&&r.jsx("p",{className:P,style:{width:Be,...Ce,...K},children:Ke.subtitle}),De&&pe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:_.scalingValue(O??0,n),width:ut}})]}):null,Ee=Le?r.jsxs("a",{href:Le,target:"_blank",className:`${c}-item-text-link`,children:[tt,$t]}):r.jsxs(r.Fragment,{children:[tt,$t]}),et=Tp(Ke.gallery),Ve=et.filter(Ge=>Ge.lightboxMedia).map(Ge=>Ge.lightboxMedia),st=r.jsx("div",{className:Ae,style:Xe,children:et.length===0?null:b==="off"?(()=>{const{displayMedia:Ge,lightboxMedia:nt}=et[0],It=nt?Ve.findIndex(St=>St.url===nt.url):-1;return r.jsx(Fa,{media:Ge,className:`${c}-item-${Ii(Ge)?"video":"image"}`.trim(),style:Pt,onMediaClick:ot&&It>=0?()=>tn(Ve,It):void 0})})():r.jsxs(r.Fragment,{children:[Lt&&Ye&&r.jsx("div",{className:`${c}-item-image-wrapper-sizer`,"aria-hidden":"true",children:et.map(({displayMedia:Ge})=>Ii(Ge)?r.jsx("video",{src:Ge.url,muted:!0,playsInline:!0},`sizer-${Ge.url}`):r.jsx("img",{src:Ge.url,alt:""},`sizer-${Ge.url}`))}),r.jsx(Zr,{className:`${c}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:L*1e3,width:"100%",height:"100%",speed:xp,type:N==="fade"?"fade":"loop",rewind:N==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:N==="fade"?"ltr":I!=="random"?I==="horizontal"?"ltr":"ttb":Qe},onMoved:Ge=>{if(I!=="random"||N==="fade")return;const nt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";At(nt),setTimeout(()=>{Ge.refresh()},0)},children:et.map(({displayMedia:Ge,lightboxMedia:nt},It)=>{const St=nt?Ve.findIndex(_t=>_t.url===nt.url):-1;return r.jsx(Qr,{children:r.jsx(Fa,{media:Ge,className:`${c}-item-${Ii(Ge)?"video":"image"}`.trim(),style:Pt,onMediaClick:ot&&St>=0?()=>tn(Ve,St):void 0})},It)})},`${N}-${de}-${I}-${L}-${Ot}-${d}`)]})}),pt=De?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&vt?"titleMarginTop":void 0,className:o&&vt?`${c}-control`:void 0,style:{height:vt?_.scalingValue(R??0,n):0,width:ut}}),r.jsx("p",{className:Q,style:{width:Be,...se,...D},children:Ke.title}),r.jsx("div",{"data-controls":o&&pe?"subtitleMarginTop":void 0,className:o&&pe?`${c}-control`:void 0,style:{height:pe?_.scalingValue(O??0,n):0,width:ut}}),r.jsx("p",{className:P,style:{width:Be,...Ce,...K},children:Ke.subtitle})]});return r.jsx("div",{className:`${c}-item`.trim(),children:r.jsx("div",{className:`${o?`${c}-item-inner`:`${c}-item-inner-hidden`}${Ye&&_e?` ${c}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${_.scalingValue(de??0,n)} * (${x} / 100))`:_.scalingValue(de??0,n)},children:Ye?r.jsx(r.Fragment,{children:De?r.jsxs(r.Fragment,{children:[Ee,r.jsx("a",{href:Le,target:"_blank",className:`${c}-item-image-link`,children:st})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:Le,target:"_blank",className:`${c}-item-image-link`,children:st}),Ee]})}):Le?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:Le,target:"_blank",className:`${c}-item-image-link`,children:[We,st]}),!De&&r.jsx("a",{href:Le,target:"_blank",className:`${c}-item-text-link`,children:pt})]}):r.jsxs(r.Fragment,{children:[We,st,pt]})})},yt)})})}),(!n||i)&&Ze&&typeof document<"u"&&g==="on"&&zi.createPortal(r.jsx("div",{style:it,"data-selection":"none",children:r.jsx(Pp,{items:at,index:wn,imageDisplay:Rp(C),onClose:()=>rt(!1),onPrev:()=>ln(Ke=>(Ke-1+at.length)%at.length),onNext:()=>ln(Ke=>(Ke+1)%at.length),counterClassName:oe,counterStyle:F})}),document.body)]})}const kp={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Ap=["hover","focus","filled","success","error"],_p=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4073
+ `}const pn=500,bp=750,Bn="cubic-bezier(0.22, 1, 0.36, 1)",wp=72,$p=50;function Sp(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Cp(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Tp(e){const[t]=e.media;return t!=null&&t.url?t:null}function Lp(e){return!Array.isArray(e)||e.length===0?[]:Sp(e)?e.flatMap(t=>{const n=Cp(t);if(!n)return[];const i=Tp(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ei(e){return e.type==="video"}function Ip(e){e.pause(),e.removeAttribute("src"),e.load()}function Wa({media:e,className:t,style:n,onMediaClick:i}){return Ei(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function lo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ep(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Pp({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:d}){return l.useEffect(()=>{const c=n.current;if(c)return()=>{Ip(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:d,style:i})}function Rp({items:e,index:t,imageDisplay:n,onClose:i,onPrev:o,onNext:s,counterClassName:a,counterStyle:d}){const c=n==="cover",m=l.useRef(null),p=l.useRef(null),x=l.useRef(null),$=l.useRef(null),w=l.useRef(0),g=l.useRef(0),y=l.useRef("none"),C=l.useRef(!1),b=l.useRef(!1),L=l.useRef(!1),I=l.useRef(null),[N,R]=l.useState(null),[O,A]=l.useState("opening"),[T,J]=l.useState(0),[v,M]=l.useState(0),[B,V]=l.useState(!1),[te,ce]=l.useState(!1),[U,j]=l.useState(!1),W=l.useRef(t),k=e[t],E=k?Ei(k):!1,q=v!==0||B,Z=l.useCallback(ne=>{L.current=ne,V(ne)},[]),X=l.useCallback(()=>{I.current!==null&&(window.clearTimeout(I.current),I.current=null)},[]),z=l.useCallback(()=>{X(),I.current=window.setTimeout(()=>{X(),Z(!1)},pn+32)},[X,Z]),re=l.useCallback(()=>{const ne=p.current,$e=x.current;if(!ne)return;const Ce=ne.getBoundingClientRect(),be=Ce.width,Ie=Ce.height;if(!be||!Ie)return;if(n==="cover"){R({width:be,height:Ie,left:Ce.left,top:Ce.top});return}if(!$e){R(lo(ne));return}const{width:F,height:Q}=Ep($e);if(!F||!Q){R(lo(ne));return}const P=F/Q,D=be/Ie;if(P>D){const G=be/P;R({width:be,height:G,left:Ce.left,top:Ce.top+(Ie-G)/2})}else{const G=Ie*P;R({width:G,height:Ie,left:Ce.left+(be-G)/2,top:Ce.top})}},[n]);l.useEffect(()=>{re();const ne=p.current;if(!ne)return;const $e=new ResizeObserver(()=>re());return $e.observe(ne),()=>$e.disconnect()},[re,t]),l.useEffect(()=>{O==="opening"&&N&&A("open")},[O,N]),l.useEffect(()=>{if(O!=="closing")return;const ne=setTimeout(()=>i(),pn);return()=>clearTimeout(ne)},[O,i]),l.useEffect(()=>()=>{X()},[X]),l.useLayoutEffect(()=>{if(W.current===t)return;X(),J(0),M(0),Z(!1),j(!1),ce(!1),w.current=0,g.current=0,y.current="none",C.current=!1,$.current=null,b.current=!1;const ne=p.current;ne&&R(lo(ne)),W.current=t},[t,Z,X]),l.useEffect(()=>{if(O!=="open")return;const ne=()=>{const Q=P=>{P.stopPropagation(),P.preventDefault(),document.removeEventListener("click",Q,!0)};document.addEventListener("click",Q,!0)},$e=Q=>{X(),L.current=!1,V(!1),M(0),ce(!1),C.current=!1,g.current=0,y.current="none";const P=p.current;P&&R(lo(P)),Q<0?s():o()},Ce=Q=>{if(Math.abs(Q)>$p&&e.length>1){$e(Q);return}Z(!0),M(0),z()},be=Q=>{if(Q.touches.length!==1||L.current)return;const P=Q.touches[0];b.current=!0,$.current={x:P.clientX,y:P.clientY},y.current="none",g.current=0,C.current=!1},Ie=Q=>{if(!$.current||Q.touches.length!==1||L.current)return;const P=Q.touches[0],D=P.clientX-$.current.x,G=P.clientY-$.current.y;if(y.current==="none"){if(Math.abs(D)<10&&Math.abs(G)<10)return;if(Math.abs(D)>Math.abs(G)){if(e.length<=1)return;y.current="horizontal"}else if(G>0)y.current="vertical";else return}if(y.current==="horizontal"){C.current=!0,ce(!0),g.current=D,M(D),Q.preventDefault();return}y.current==="vertical"&&(C.current=!0,ce(!0),w.current=G,J(G),Q.preventDefault())},F=()=>{if(!$.current)return;const Q=y.current,P=C.current;if(P&&Q==="horizontal")Ce(g.current),ne();else if(P&&Q==="vertical"){if(w.current>wp){const G=window.innerHeight;w.current=G,j(!0),J(G),A("closing")}else w.current=0,J(0);ne()}else Q==="horizontal"&&Math.abs(g.current)>0&&(Ce(g.current),ne());$.current=null,y.current="none",g.current=0,C.current=!1,ce(!1)};return document.addEventListener("touchstart",be,{passive:!0}),document.addEventListener("touchmove",Ie,{passive:!1}),document.addEventListener("touchend",F),document.addEventListener("touchcancel",F),()=>{document.removeEventListener("touchstart",be),document.removeEventListener("touchmove",Ie),document.removeEventListener("touchend",F),document.removeEventListener("touchcancel",F)}},[O,e.length,s,o,Z,z]),l.useEffect(()=>{const ne=$e=>{$e.key==="Escape"&&($e.preventDefault(),$e.stopPropagation(),O!=="closing"&&A("closing"))};return window.addEventListener("keydown",ne,!0),()=>window.removeEventListener("keydown",ne,!0)},[O]);const h=()=>{O!=="closing"&&A("closing")},le=O==="open",ve=O==="closing",he=T>0?Math.max(0,1-T/500):1,Re=T>0?Math.max(.35,1-T/500):1,ee=ne=>{if(ne.stopPropagation(),b.current){b.current=!1;return}if(e.length<=1)return;const $e=ne.currentTarget.getBoundingClientRect(),Ce=ne.clientY-$e.top,be=Math.min(52,$e.height*.2);if(!(Ce>$e.height-be)){if(ne.clientX-$e.left<$e.width/2){o();return}s()}},ge=ne=>{if(e.length<=1)return;const $e=ne.currentTarget.getBoundingClientRect(),Ce=ne.clientX-$e.left,be=ne.clientY-$e.top,Ie=Math.min(52,$e.height*.2);if(be>$e.height-Ie){ne.currentTarget.style.cursor="default";return}ne.currentTarget.style.cursor=Ce<$e.width/2?"w-resize":"e-resize"},Y=l.useCallback(ne=>{ne.propertyName!=="transform"||!L.current||(X(),Z(!1))},[X,Z]),fe=q?`translateX(${v}px)`:T>0?`translateY(${T}px)`:void 0,ae={position:"fixed",top:N==null?void 0:N.top,left:N==null?void 0:N.left,width:N==null?void 0:N.width,height:N==null?void 0:N.height,objectFit:n==="cover"?"cover":"contain",transform:fe,opacity:T>0?Re:O==="opening"||ve?0:1,transition:te&&!B?"none":B?`transform ${pn}ms ${Bn}`:U?`transform ${pn}ms ${Bn}, opacity ${pn}ms ${Bn}`:O==="opening"||ve?`opacity ${pn}ms ${Bn}`:"none",pointerEvents:E&&le&&!q?"auto":"none",touchAction:E&&le?"none":void 0,zIndex:9998},se=N?{position:"fixed",top:N.top,height:N.height,width:N.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:m,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:O==="open"?"none":void 0},onClick:h,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:le?he:0,transition:te?"none":`opacity ${pn}ms ${Bn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:c?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:p,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:le?1:0,transition:`opacity ${pn}ms ${Bn}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:a,style:d,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:p,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:le?1:0,transition:`opacity ${pn}ms ${Bn}`},children:e.length>1&&r.jsxs("p",{className:a,style:d,children:[t+1," / ",e.length]})})]})}),N&&k&&(E?r.jsx(Pp,{src:k.url,phase:O,mediaRef:x,mediaStyle:ae,onLoadedMetadata:re,onClick:ee,onMouseMove:ge,onTransitionEnd:Y},`${t}-${k.url}`):r.jsx("img",{ref:x,src:k.url,alt:k.name,onLoad:re,onTransitionEnd:Y,style:ae},`${t}-${k.url}`)),le&&se&&e.length>1&&!E&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...se,left:N.left,cursor:"w-resize",pointerEvents:q?"none":"auto"},onClick:ne=>{if(b.current){b.current=!1;return}ne.stopPropagation(),o()}}),r.jsx("div",{style:{...se,left:N.left+N.width/2,cursor:"e-resize",pointerEvents:q?"none":"auto"},onClick:ne=>{if(b.current){b.current=!1;return}ne.stopPropagation(),s()}})]})]})}function Mp(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function kp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:d}){const{prefix:c}=_.useScopedStyles(),{type:m="a",gridLayout:p,textBoxWidth:x=100,verticalGap:$,entriesCount:w,lightbox:g,imageDisplay:y,lightboxImageDisplay:C,slider:b,sliderTiming:L,direction:I,transition:N,titleMarginTop:R,subtitleMarginTop:O,titleColor:A,subtitleColor:T,lightboxCounterColor:J,titleFontFamily:v,titleFontSettings:M,titleFontSize:B,titleLineHeight:V,titleLetterSpacing:te,titleWordSpacing:ce,titleTextAppearance:U,subtitleFontFamily:j,subtitleFontSettings:W,subtitleFontSize:k,subtitleLineHeight:E,subtitleLetterSpacing:q,subtitleWordSpacing:Z,subtitleTextAppearance:X,lightboxCounterFontFamily:z,lightboxCounterFontSettings:re,lightboxCounterFontSize:h,lightboxCounterLineHeight:le,lightboxCounterLetterSpacing:ve,lightboxCounterWordSpacing:he,lightboxCounterTextAppearance:Re,showText:ee="always",alignEntries:ge="off",align:Y="top"}=e,fe={fontSettings:{fontFamily:v,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:B??.01,lineHeight:V,letterSpacing:te??0,wordSpacing:ce??0,textAppearance:U,color:A},se={...qt(kt(fe,n))},ne={fontSettings:{fontFamily:j,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:k??.01,lineHeight:E,letterSpacing:q??0,wordSpacing:Z??0,textAppearance:X,color:T},Ce={...qt(kt(ne,n))},be={fontSettings:{fontFamily:z,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:h??.01,lineHeight:le,letterSpacing:ve??0,wordSpacing:he??0,textAppearance:Re,color:J},F={...qt(kt(be,n)),...ur(h,le,c,n)},Q=dr(B,V,`${c}-item-title`,`${c}-text-tight-leading`),P=dr(k,E,`${c}-item-subtitle`,`${c}-text-tight-leading`),D=ur(B,V,c,n),G=ur(k,E,c,n),oe=dr(h,le,`${c}-lightbox-counter`,`${c}-text-tight-leading`),ie=_.buildColorVars(c,{titleColor:A,subtitleColor:T,lightboxCounterColor:J},Ap,_p),Te=`${a&&a!=="default"?`${c}-state-${a}`:""}${ee==="on hover"&&(!n||i)?` ${c}-show-text-hover`:""}`.trim(),we=w===0?1/0:w,qe=(t??[]).slice(0,we),de=p.entryWidth??.2,ke=(y==null?void 0:y.display)==="cover",Ne=(y==null?void 0:y.ratioValue)??"1:1",He=(y==null?void 0:y.reversed)??!1,[dt,ft]=Ne.split(":").map(Number),wt=`${He?ft:dt} / ${He?dt:ft}`,Ht=_.scalingValue(de??0,n),Lt=!ke&&b!=="off",Xe={width:Ht,...ke?{aspectRatio:wt,height:"auto",overflow:"hidden"}:{height:"auto"}},Ae=`${c}-item-image-wrapper${Lt?` ${c}-item-image-wrapper-fit-slider`:""}`.trim(),De=m==="d"||m==="e"||m==="f",Ye=ge==="on",Be=`calc(${_.scalingValue(de??0,n)} * (${x} / 100))`,ut=_.scalingValue(de*x/100,n),Pt=ke?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Qe,At]=l.useState("ltr"),[Ot,ze]=l.useState(0),gt=l.useRef(null);l.useEffect(()=>{const Ge=gt.current;if(!Ge)return;const yt=new ResizeObserver(vt=>{ze(Math.round(vt[0].contentRect.width))});return yt.observe(Ge),()=>yt.disconnect()},[]);const it=(()=>{const Ge={...ie},yt=gt.current?getComputedStyle(gt.current).getPropertyValue("--cntrl-article-width").trim():"";return yt&&(Ge["--cntrl-article-width"]=yt),Ge})(),[Ze,rt]=l.useState(!1),[at,sn]=l.useState([]),[wn,ln]=l.useState(0),ot=g==="on"&&(!n||i),tn=(Ge,yt)=>{n&&!i||g!=="off"&&(sn(Ge),ln(yt),rt(!0))};l.useEffect(()=>{if(!Ze||g!=="on"||typeof document>"u")return;const Ge=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ge}},[Ze,g]),l.useEffect(()=>{!n||i||rt(!1)},[n,i]);const Ut=l.useMemo(()=>xp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ut}}),r.jsx("div",{style:ie,children:r.jsx("div",{ref:gt,className:`${c}-wrapper ${c}-type-${m}${Ye?` ${c}-align-entries`:""} ${c}-image-align-${Y} ${Te}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:Ye?0:_.scalingValue($??0,n),columnGap:_.scalingValue(p.horizontalGap??0,n),width:_.scalingValue(p.wrapperWidth??0,n),...Ye?{[`--${c}-align-entries-row-gap`]:_.scalingValue($??0,n)}:{}},children:qe.map((Ge,yt)=>{var Rt;const vt=Fa(Ge.title),pe=Fa(Ge.subtitle),Le=(((Rt=Ge.link)==null?void 0:Rt.length)??0)>0&&g==="off"?Ge.link:void 0,_e=Math.floor(yt/p.columnsCount)===Math.ceil(qe.length/p.columnsCount)-1,We=De?r.jsxs("div",{className:`${c}-item-text-block`,children:[vt&&r.jsx("p",{className:Q,style:{width:Be,...se,...D},children:Ge.title}),vt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:_.scalingValue(R??0,n),width:ut}}),pe&&r.jsx("p",{className:P,style:{width:Be,...Ce,...G},children:Ge.subtitle}),pe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:_.scalingValue(O??0,n),width:ut}})]}):null,tt=Ye?r.jsxs("div",{className:`${c}-item-title-row`,children:[!De&&r.jsx("div",{"data-controls":o&&vt?"titleMarginTop":void 0,className:o&&vt?`${c}-control`:void 0,style:{height:vt?_.scalingValue(R??0,n):0,width:ut}}),vt&&r.jsx("p",{className:Q,style:{width:Be,...se,...D},children:Ge.title}),De&&vt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:_.scalingValue(R??0,n),width:ut}})]}):null,$t=Ye?r.jsxs("div",{className:`${c}-item-subtitle-row`,children:[!De&&r.jsx("div",{"data-controls":o&&pe?"subtitleMarginTop":void 0,className:o&&pe?`${c}-control`:void 0,style:{height:pe?_.scalingValue(O??0,n):0,width:ut}}),pe&&r.jsx("p",{className:P,style:{width:Be,...Ce,...G},children:Ge.subtitle}),De&&pe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:_.scalingValue(O??0,n),width:ut}})]}):null,Ee=Le?r.jsxs("a",{href:Le,target:"_blank",className:`${c}-item-text-link`,children:[tt,$t]}):r.jsxs(r.Fragment,{children:[tt,$t]}),et=Lp(Ge.gallery),Ve=et.filter(Ke=>Ke.lightboxMedia).map(Ke=>Ke.lightboxMedia),st=r.jsx("div",{className:Ae,style:Xe,children:et.length===0?null:b==="off"?(()=>{const{displayMedia:Ke,lightboxMedia:nt}=et[0],It=nt?Ve.findIndex(St=>St.url===nt.url):-1;return r.jsx(Wa,{media:Ke,className:`${c}-item-${Ei(Ke)?"video":"image"}`.trim(),style:Pt,onMediaClick:ot&&It>=0?()=>tn(Ve,It):void 0})})():r.jsxs(r.Fragment,{children:[Lt&&Ye&&r.jsx("div",{className:`${c}-item-image-wrapper-sizer`,"aria-hidden":"true",children:et.map(({displayMedia:Ke})=>Ei(Ke)?r.jsx("video",{src:Ke.url,muted:!0,playsInline:!0},`sizer-${Ke.url}`):r.jsx("img",{src:Ke.url,alt:""},`sizer-${Ke.url}`))}),r.jsx(Qr,{className:`${c}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:L*1e3,width:"100%",height:"100%",speed:bp,type:N==="fade"?"fade":"loop",rewind:N==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:N==="fade"?"ltr":I!=="random"?I==="horizontal"?"ltr":"ttb":Qe},onMoved:Ke=>{if(I!=="random"||N==="fade")return;const nt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";At(nt),setTimeout(()=>{Ke.refresh()},0)},children:et.map(({displayMedia:Ke,lightboxMedia:nt},It)=>{const St=nt?Ve.findIndex(_t=>_t.url===nt.url):-1;return r.jsx(ea,{children:r.jsx(Wa,{media:Ke,className:`${c}-item-${Ei(Ke)?"video":"image"}`.trim(),style:Pt,onMediaClick:ot&&St>=0?()=>tn(Ve,St):void 0})},It)})},`${N}-${de}-${I}-${L}-${Ot}-${d}`)]})}),pt=De?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&vt?"titleMarginTop":void 0,className:o&&vt?`${c}-control`:void 0,style:{height:vt?_.scalingValue(R??0,n):0,width:ut}}),r.jsx("p",{className:Q,style:{width:Be,...se,...D},children:Ge.title}),r.jsx("div",{"data-controls":o&&pe?"subtitleMarginTop":void 0,className:o&&pe?`${c}-control`:void 0,style:{height:pe?_.scalingValue(O??0,n):0,width:ut}}),r.jsx("p",{className:P,style:{width:Be,...Ce,...G},children:Ge.subtitle})]});return r.jsx("div",{className:`${c}-item`.trim(),children:r.jsx("div",{className:`${o?`${c}-item-inner`:`${c}-item-inner-hidden`}${Ye&&_e?` ${c}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${_.scalingValue(de??0,n)} * (${x} / 100))`:_.scalingValue(de??0,n)},children:Ye?r.jsx(r.Fragment,{children:De?r.jsxs(r.Fragment,{children:[Ee,r.jsx("a",{href:Le,target:"_blank",className:`${c}-item-image-link`,children:st})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:Le,target:"_blank",className:`${c}-item-image-link`,children:st}),Ee]})}):Le?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:Le,target:"_blank",className:`${c}-item-image-link`,children:[We,st]}),!De&&r.jsx("a",{href:Le,target:"_blank",className:`${c}-item-text-link`,children:pt})]}):r.jsxs(r.Fragment,{children:[We,st,pt]})})},yt)})})}),(!n||i)&&Ze&&typeof document<"u"&&g==="on"&&ji.createPortal(r.jsx("div",{style:it,"data-selection":"none",children:r.jsx(Rp,{items:at,index:wn,imageDisplay:Mp(C),onClose:()=>rt(!1),onPrev:()=>ln(Ge=>(Ge-1+at.length)%at.length),onNext:()=>ln(Ge=>(Ge+1)%at.length),counterClassName:oe,counterStyle:F})}),document.body)]})}const Ap={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},_p=["hover","focus","filled","success","error"],Fp=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4074
4074
  import '@splidejs/react-splide/css/core';
4075
4075
  import { CommonComponentProps } from '../props';
4076
4076
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
@@ -5847,11 +5847,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5847
5847
  };
5848
5848
 
5849
5849
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5850
- `,ur={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fp=["titleColor","subtitleColor","lightboxCounterColor"],Wp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},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:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...ur.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:{...ur.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:{...ur.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{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:[...Fp],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Np={element:Mp,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:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Wp,sourceCode:_p},Wa=12;function Hp(e,t="50%"){const n={position:"absolute",width:Wa,height:Wa,pointerEvents:"none"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Ft({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:Hp(n,i)})})}function Op(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function Bp({media:e,className:t,style:n}){const i=l.useRef(null);return l.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function So(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function zp(e){return String(e??"").trim().length>0}function Na(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Ha(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Oa(e,t,n,i,o,s,a){const d=_.scalingValue(s,a),c=_.scalingValue(0,a),m=e===0,p=e===t-1&&!o;return{borderTopWidth:m&&n?d:c,borderBottomWidth:!p||i?d:c}}function jp(e,t,n){const i=_.scalingValue(t,n),o=_.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ba=10;function Dp(e){return`
5850
+ `,pr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Wp=["titleColor","subtitleColor","lightboxCounterColor"],Np={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},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:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...pr.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:{...pr.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:{...pr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{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:[...Wp],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Hp={element:kp,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:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Np,sourceCode:Fp},Na=12;function Op(e,t="50%"){const n={position:"absolute",width:Na,height:Na,pointerEvents:"none"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Ft({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:Op(n,i)})})}function Bp(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function zp({media:e,className:t,style:n}){const i=l.useRef(null);return l.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Co(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function jp(e){return String(e??"").trim().length>0}function Ha(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Oa(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Ba(e,t,n,i,o,s,a){const d=_.scalingValue(s,a),c=_.scalingValue(0,a),m=e===0,p=e===t-1&&!o;return{borderTopWidth:m&&n?d:c,borderBottomWidth:!p||i?d:c}}function Dp(e,t,n){const i=_.scalingValue(t,n),o=_.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const za=10;function Vp(e){return`
5851
5851
  .${e}-wrapper {
5852
5852
  display: grid;
5853
5853
  align-items: start;
5854
- min-height: ${So(48)};
5854
+ min-height: ${Co(48)};
5855
5855
  position: relative;
5856
5856
  overflow: visible;
5857
5857
  box-sizing: border-box;
@@ -5973,7 +5973,7 @@ a.${e}-list-item {
5973
5973
  flex-shrink: 0;
5974
5974
  overflow: visible;
5975
5975
  box-sizing: border-box;
5976
- min-width: ${So(50)};
5976
+ min-width: ${Co(50)};
5977
5977
  position: relative;
5978
5978
  display: flex;
5979
5979
  align-items: flex-start;
@@ -5981,7 +5981,7 @@ a.${e}-list-item {
5981
5981
 
5982
5982
  .${e}-list-col-last {
5983
5983
  flex: 1 1 auto;
5984
- min-width: ${So(50)};
5984
+ min-width: ${Co(50)};
5985
5985
  }
5986
5986
 
5987
5987
  .${e}-list-col-title {
@@ -6278,7 +6278,7 @@ a.${e}-list-item {
6278
6278
  overflow-wrap: anywhere;
6279
6279
  word-break: break-word;
6280
6280
  }
6281
- `}const Mn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ea=["AColumn","BColumn","CColumn","DColumn","EColumn"],yn="cutLabel",Ni=[...ea,yn],Go=["A","B","C","D","E"];function el(e){return`${e}ColumnVerticalAlign`}const Er=["Top","Center","Bottom"];function ta(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Go.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Vp(e){const t=ta(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function qp(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Go.includes(n)?n:null}function tl(e,t,n){const i=qp(e);return i?i===t?!1:Vp(n[el(i)]):!0}function Hi(e){const t=ta(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Go.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Kp(e,t,n){if(nl(e,t,n))return Hi(e);const i=Hi(e);return i.kind==="baseline"?{kind:"top"}:i}function Gp(e){const t=Hi(e);return t.kind==="baseline"?{kind:"top"}:t}function nl(e,t,n){return tl(e,n,t)?Hi(e).kind==="baseline":!1}function Up(e){const t={};let n=!1;for(const i of Go){const o=el(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}tl(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Xp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Yp(e){const t=Hi(e).kind;return t==="baseline"?"center":t}function Jp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function za(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Zp(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function pr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=Zp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let m=0;return e.kind==="center"?m=(d.height-c)/2:e.kind==="bottom"&&(m=d.height-c),d.top-t+m+a}function Qp(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function em(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const tm={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Je(e,t){return`${e}${t.replace(/^text/,"Text")}`}const nm={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function im(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),{type:"row",items:[Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing")]},Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function om(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ni.map(e=>[nm[e],im(e)]))}}function ko(e,t){const n=i=>{const o=Je(t,i);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===yn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function ja(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.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 qt(kt(n,t))}function Da(e,t,n,i){const o=ko(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Va(e,t,n,i){const o=ko(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:_.scalingValue((s-a)/2,i)}}const Kt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],pi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],mi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],rm={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},am=["hover","focus","filled","success","error"],qa=.004,oi=.004,mr=oi,na=50,Oi=1440,Bi=na/Oi;function il(e){const t=typeof e=="number"&&e>0?e:Oi;return na/t}function sm(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 i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Oi}const ol={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ei(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function lm(e,t=1){const n=t/e;return Object.fromEntries(Kt.map(i=>[i,n]))}function cm(){return Object.fromEntries([...pi.map(e=>[e,0]),...mi.map(e=>[e,0])])}function dm(){return Object.fromEntries(gi.map(e=>[e,0]))}function lo(e){return Object.fromEntries(Kt.map(t=>[t,typeof e[t]=="number"?e[t]:ol[t]]))}function rl(e,t,n){const i=e-Bi,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function Co(e,t,n){const i=ia(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function um(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=pi[o],a=mi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[a]=="number"?n[a]:0,m=rl(t[o]??0,d,c);m.paddingLeft!==d&&(i[s]=m.paddingLeft),m.paddingRight!==c&&(i[a]=m.paddingRight)}return i}function ia(e,t,n){if(e<=0)return[];const i=Kt.slice(0,e).map(m=>n[m]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((m,p)=>m+p,0)+Bi;if(t>=a)return i;const d=[...o];let c=a-t;for(let m=d.length-1;m>=0&&c>0;m-=1){const p=d[m]-Bi;if(p<=0)continue;const x=Math.min(c,p);d[m]-=x,c-=x}return[...d,i[e-1]]}function pm(e,t,n){if(e<=1)return{};const i=ia(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Kt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function Ka(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Mn]}function mm(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function gm(e,t,n,i){const o=Math.min(i,e.length,Kt.length),s={};for(let a=0;a<o;a+=1){const d=e[a],c=t.indexOf(d);if(c===-1)continue;const m=Kt[c],p=pi[c],x=mi[c],$=gi[c],w=Kt[a],g=pi[a],y=mi[a],C=gi[a],b=n[m],L=n[p],I=n[x],N=n[$];typeof b=="number"&&(s[w]=b),typeof L=="number"&&(s[g]=L),typeof I=="number"&&(s[y]=I),typeof N=="number"&&(s[C]=N)}return s}function al(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function hm(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ei(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...lm(n,o),...cm()};if(s)for(const d of gi)typeof t[d]=="number"&&(a[d]=t[d]);else Object.assign(a,dm());return al(e,a)?a:e}function fm(e,t,n){const i=Up(e);i&&(e={...e,...i});const o=il(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,d=Ei(e),c=Ei(t),m=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof a=="number"?a:Mn.length,x=I=>{if(m)return I;const N=lo({...t,...I}),R=Ei(I),O=Co(p,R,N),A=um(p,O,{...t,...I});return Object.keys(A).length===0?I:{...I,...A}};if(typeof s=="number"&&s!==a)return e;const $=Ka(e),w=Ka(t);if(!mm($,w))return x({...e,...gm($,w,t,p)});if(d<c&&typeof p=="number"&&!m){const I=lo({...t,...e});return x({...e,...pm(p,d,I)})}if(m){const I=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,N=Math.max(0,(d-o)/2);return I>N?{...e,textPaddingLR:N}:e}const g=lo({...t,...e}),y=Co(p,c,lo(t)),b=Co(p,d,g).some((I,N)=>I<(y[N]??I)),L=Kt.some(I=>{const N=e[I],R=t[I];return typeof N=="number"&&typeof R=="number"&&N!==R});return b||L?x(e):e}function ym(e,t,n,i){const o=t.slice(0,e).reduce((a,d)=>a+d,0),s=n.slice(e+1,t.length-1).reduce((a,d)=>a+d,0);return Math.max(Bi,i-o-s-Bi)}function vm(e,t){return Math.random()*(t-e)+e}function xm(e){return Object.fromEntries(Kt.map(t=>[t,typeof e[t]=="number"?e[t]:ol[t]]))}function gr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function bm(e,t,n,i,o,s){return e.slice(0,t).map((a,d)=>{const c=pi[d],m=mi[d],p=gi[d];return{key:a,textPrefix:tm[a],widthKey:Kt[d],width:n[Kt[d]],paddingLeftKey:c,paddingRightKey:m,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[m],paddingBottom:s[p]}})}function wm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:d}){const{prefix:c}=_.useScopedStyles(),m=!!o,{columns:p,type:x,wrapperWidth:$,entriesCount:w,cellMinHeight:g,dividerWidth:y,showVisibility:C,cut:b,showCut:L,cutCellMinHeight:I,cutLabel:N,imageSize:R,imageOnHover:O,entryHoverEffect:A,entryHoverShowOption:T,rowPaddingTop:J,rowPaddingBottom:v,rowPaddingTopB:M,columnsOrder:B,textPaddingLR:V,textColor:te,backgroundColor:ce,dividerColor:U,textHoverColor:j,backgroundHoverColor:W,dividerHoverColor:k}=e,[E,q]=l.useState(void 0),[Z,X]=l.useState(null),z=O==="on"&&(!n||i),re=(b??0)>0,h=x==="b",le=l.useRef(null),ve=l.useRef(null),[he,Re]=l.useState(null),[ee,ge]=l.useState(Oi),Y=il(ee),fe=Math.max(0,(($??0)-Y)/2),ae=Math.min(V??0,fe),se=Math.max(ae,oi),ne=(($??0)+Y)/2;l.useLayoutEffect(()=>{if(!n){ge(Oi);return}const pe=()=>{ge(sm(le.current))};pe();const Le=le.current;if(!Le)return;const _e=new ResizeObserver(pe);_e.observe(Le);let We=Le;for(;We&&!We.style.getPropertyValue("--cntrl-article-width");)We=We.parentElement;return We&&_e.observe(We),()=>_e.disconnect()},[n,a]),l.useEffect(()=>{q(void 0)},[b,L,t,w]),l.useEffect(()=>{n&&!i&&q(void 0)},[n,i]);const $e=_.buildColorVars(c,{textColor:te,backgroundColor:ce,dividerColor:U,textHoverColor:j,backgroundHoverColor:W,dividerHoverColor:k},rm,am),Ce=s&&s!=="default"?`${c}-state-${s}`:"",Ie=`${!n||i?A==="default"?`${c}-entry-hover-default`:A==="blinds"?`${c}-entry-hover-blinds`:A==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Ce}`.trim(),F=A==="reveal"&&(!n||i),Q=(C==null?void 0:C[0])??!1,P=(C==null?void 0:C[1])??!1,D=l.useRef(e),K=l.useRef(a);l.useEffect(()=>{if(!d||!n){D.current=e,K.current=a;return}if(K.current!==a){D.current=e,K.current=a;return}const pe=D.current;if(!(pe!==e))return;if(typeof pe.columns=="number"&&typeof e.columns=="number"&&pe.columns!==e.columns){D.current=e;return}const _e=fm(e,pe,{designWidth:ee});D.current=e,al(e,_e)&&d(_e)},[e,d,n,a,ee]);const oe=l.useMemo(()=>xm(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ie=l.useMemo(()=>gr(e,pi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),ye=l.useMemo(()=>gr(e,mi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Me=l.useMemo(()=>gr(e,gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Te=l.useMemo(()=>Array.isArray(B)&&B.length>0?B:[...Mn],[B]),we=l.useMemo(()=>bm(Te,p,oe,ie,ye,Me),[Te,p,oe,ie,ye,Me]),qe=Ei(e),de=l.useMemo(()=>Kt.slice(0,p).map(pe=>oe[pe]),[p,oe]),ke=l.useMemo(()=>ia(p,qe,oe),[p,qe,oe]),Ne=l.useMemo(()=>Co(p,qe,oe),[p,qe,oe]),He=l.useMemo(()=>we.map((pe,Le)=>rl(Ne[Le]??0,pe.paddingLeft,pe.paddingRight)),[we,Ne]),dt=l.useMemo(()=>{const pe=w===0?1/0:w;return(t??[]).slice(0,pe).map((_e,We)=>({id:We,cells:Object.fromEntries(Mn.map(tt=>[tt,_e[tt]??""])),image:_e.image,link:_e.link}))},[t,w]),ft=re?E??b:dt.length,Et=l.useMemo(()=>re?dt.slice(0,ft):dt,[dt,re,ft]),bt=re&&ft<dt.length,wt=Et.length>1||bt,Ht=[Q?`${c}-divider-top`:"",P||wt?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Lt=!n||i,Xe=()=>{if(!Lt)return;const pe=E??b;if(!L){q(dt.length);return}q(Math.min(pe+L,dt.length))},Ae=pe=>_.scalingValue(pe,n??!1),De=h?M??0:J??0,Ye=v??0,Be=g??0,ut=De+Be/2,Pt=Math.max(Ye,mr),Qe=Oa(0,Et.length,Q,P,bt,y??0,n??!1).borderTopWidth,At=he!=null?`${he}px`:`calc(${Qe} + ${Ae(ut)})`,Ot=h?"rowPaddingTopB":"rowPaddingTop",ze=we[0],gt=we[we.length-1],it=He[0],Ze=He[He.length-1],rt=ze&&it?Math.max(it.paddingLeft,oi):0,at=gt&&Ze?Math.max(Ze.paddingRight,oi):0,sn=qe,wn=pe=>{const Le=le.current;if(!Le)return{x:0,y:0};const _e=Le.getBoundingClientRect();return{x:pe.clientX-_e.left+Ba,y:pe.clientY-_e.top+Ba}},ln=(pe,Le)=>{if(!z)return;const _e=pe.image;if(!(_e!=null&&_e.url)){X(null);return}const{x:We,y:tt}=wn(Le),$t=(R==null?void 0:R.min)??80,Ee=(R==null?void 0:R.max)??320,et=(Z==null?void 0:Z.rowId)===pe.id?Z.widthPx:vm($t,Ee);X({rowId:pe.id,url:_e.url,objectFit:"contain",isVideo:Op(_e),widthPx:et,x:We,y:tt})},ot=pe=>{if(!z||!Z)return;const{x:Le,y:_e}=wn(pe);X(We=>!We||We.x===Le&&We.y===_e?We:{...We,x:Le,y:_e})},tn=()=>{X(null)},Ut=pe=>{F&&Na(pe,c),z&&X(null)},Ke=pe=>{F&&Ha(pe,c)};l.useLayoutEffect(()=>{if(!m||h){Re(null);return}const pe=ve.current,Le=pe==null?void 0:pe.parentElement;if(!pe||!Le){Re(null);return}const _e=()=>{const tt=pe.querySelector("[data-list-row]");if(!tt){Re(null);return}const $t=Le.getBoundingClientRect(),Ee=tt.getBoundingClientRect();Re(Ee.top-$t.top+Ee.height/2)};_e();const We=new ResizeObserver(_e);return We.observe(pe),We.observe(Le),()=>We.disconnect()},[m,h,Et,De,Ye,Be,t,e,we,Ne,ee,y,Q,P,bt]);const yt=l.useMemo(()=>!h&&ea.some(pe=>{const Le=pe.charAt(0),_e=e[`${pe}VerticalAlign`];return nl(_e,e,Le)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);l.useLayoutEffect(()=>{var et;const pe=le.current;if(!pe)return;const Le=()=>{pe.querySelectorAll("[data-list-col]").forEach(Ve=>{Ve.style.transform="";const st=Ve.querySelector(`.${c}-list-col`);st&&(st.style.minHeight="",st.style.height="");const pt=Ve.querySelector(`.${c}-list-col-title`);pt&&(pt.style.transform="")})};if(h||!yt){Le();return}const _e=()=>{const Ve=Array.from(pe.querySelectorAll("[data-list-row]")),st=`${c}-list-col`,pt=`${c}-baseline-probe`;Ve.forEach(Rt=>{Rt.querySelectorAll("[data-list-col]").forEach(Ge=>{Ge.style.transform="";const nt=Ge.querySelector(`.${st}`);nt&&(nt.style.minHeight="",nt.style.height="");const It=Ge.querySelector(`.${c}-list-col-title`);It&&(It.style.transform="")})}),Ve.forEach(Rt=>{const Ge=Array.from(Rt.querySelectorAll("[data-list-col]"));Qp(Rt,Ge,st)}),pe.offsetHeight,Ve.forEach(Rt=>{const Ge=Array.from(Rt.querySelectorAll("[data-list-col]")),nt=Rt.getBoundingClientRect().top,It=new Map,St=Ge.map(ht=>{const Bt=ht.querySelector(`.${c}-list-col-title`),Wt={el:ht,titleEl:Bt,letter:ht.getAttribute("data-col-letter")??"",kind:ht.getAttribute("data-valign")??"top",anchor:ht.getAttribute("data-valign-anchor")};return It.set(Wt.letter,Wt),Wt}),_t=new Map,$n=(ht,Bt)=>{const Wt=_t.get(ht.letter);if(Wt!==void 0)return Wt;const cn=ht.anchor?It.get(ht.anchor):void 0;if(ht.kind!=="baseline"||!cn||Bt.has(ht.letter)){const Xn=pr(ht,nt,st,pt);return _t.set(ht.letter,Xn),Xn}Bt.add(ht.letter);const Sn=$n(cn,Bt);Bt.delete(ht.letter);const dn=pr(ht,nt,st,pt),jt=Sn-dn;em(ht.titleEl,jt);const Cn=pr(ht,nt,st,pt);return _t.set(ht.letter,Cn),Cn};St.forEach(ht=>$n(ht,new Set))})};let We=null;const tt=()=>{We===null&&(We=requestAnimationFrame(()=>{We=null,_e()}))};_e();const $t=new ResizeObserver(()=>tt());$t.observe(pe);let Ee=!1;return typeof document<"u"&&((et=document.fonts)!=null&&et.ready)&&document.fonts.ready.then(()=>{Ee||tt()}),()=>{Ee=!0,We!==null&&(cancelAnimationFrame(We),We=null),$t.disconnect(),Le()}},[yt,h,e,t,ee,Et,Ne]);const vt=l.useMemo(()=>Dp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:vt}}),r.jsx("div",{style:$e,children:r.jsxs("div",{ref:le,className:`${c}-wrapper ${Ie}${Ht?` ${Ht}`:""}${h?` ${c}-type-b`:""}`.trim(),style:{width:_.scalingValue($??0,n),...!h&&m?{[`--${c}-first-entry-handle-top`]:At}:{}},onMouseMove:z?ot:void 0,onMouseLeave:z?tn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Et.map((pe,Le)=>{var $t;const _e=((($t=pe.link)==null?void 0:$t.length)??0)>0,We=_e&&(!n||i)?"a":"div",tt=Oa(Le,Et.length,Q,P,bt,y??0,n??!1);return r.jsxs(We,{ref:Le===0?Ee=>{ve.current=Ee}:void 0,className:`${c}-list-item${_e||T==="always"?` ${c}-list-item-has-link`:""}`,..._e?{href:pe.link,target:"_blank"}:{},style:tt,onMouseEnter:Ee=>{F&&(_e||T==="always")&&Na(Ee,c),z&&ln(pe,Ee)},onMouseLeave:Ee=>{F&&(_e||T==="always")&&Ha(Ee,c)},children:[De>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(De)}}),r.jsxs("div",{className:`${c}-list-cols-row${h?"":` ${c}-list-cols-row-h`}${m&&Le===0&&h?` ${c}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:Ae(Be)},children:[we.map((Ee,et)=>{const Ve=et===we.length-1,st=He[et],pt=Ee.paddingBottom,Rt=zp(pe.cells[Ee.key]),Ge=h&&Rt&&pt>0,nt=h?{minHeight:Ae(Be)}:{width:Ae(Ne[et])},It=h?{paddingLeft:Ae(ae),paddingRight:Ae(ae)}:{paddingLeft:Ae(st.paddingLeft),paddingRight:Ae(st.paddingRight)},St=Ee.textPrefix.charAt(0),_t=h?Gp(e[`${Ee.textPrefix}VerticalAlign`]):Kp(e[`${Ee.textPrefix}VerticalAlign`],e,St),$n=h&&Rt&&m&&Le===0;return r.jsxs("div",{className:h?`${c}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":St,"data-valign":_t.kind,..._t.kind==="baseline"?{"data-valign-anchor":_t.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Ve?` ${c}-list-col-last`:""}`,style:{...It,...nt,...h?{justifyContent:za(_t.kind)}:{}},"data-test":Ee.width,children:r.jsx("span",{className:Da(e,Ee.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...ja(ko(e,Ee.textPrefix),n),...Va(e,Ee.textPrefix,c,n),...h?{}:Xp(_t.kind)},children:pe.cells[Ee.key]??null})}),Ge&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(pt)}}),$n&&r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ee.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ae(Math.max(pt,mr))}})]},Ee.key)}),m&&Le===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"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(ne),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ae(se),height:"100%"}}),r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"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(ne),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ae(Math.max(se,qe-se)),width:Ae(se),height:"100%"}})]})]}),!h&&Ye>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(Ye)}}),m&&Le===0&&!h&&r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"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:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ae(Pt)}})]},pe.id)}),m&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ot,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Qe,left:0,width:"100%",height:Ae(Math.max(De,mr))}})},"row-padding-handles"),m&&!h&&ze&&gt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":ze.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ne[0]-((it==null?void 0:it.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Ae(rt),height:"100%"}}),r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":gt.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(Ne[we.length-1]-((Ze==null?void 0:Ze.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ae(sn-at),width:Ae(at),height:"100%"}})]},"column-edge-padding-handles"),m&&!h&&we.slice(0,-1).map((pe,Le)=>{const _e=we[Le+1],We=ke.slice(0,Le+1).reduce((Ve,st)=>Ve+st,0),tt=He[Le],$t=He[Le+1],Ee=Math.max(tt.paddingRight,oi),et=Math.max($t.paddingLeft,oi);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":pe.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(Ne[Le]-tt.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ae(We-Ee),width:Ae(Ee),height:"100%"}}),r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":_e.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ne[Le+1]-$t.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ae(We),width:Ae(et),height:"100%"}})]},`${pe.paddingRightKey}-padding`)}),m&&!h&&we.slice(0,-1).map((pe,Le)=>{const _e=ym(Le,ke,de,qe),tt=ke.slice(0,Le+1).reduce(($t,Ee)=>$t+Ee,0)-qa/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":pe.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(na),"data-controls-max-fraction":String(_e),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ae(tt),width:Ae(qa),height:"calc(100%)",pointerEvents:"auto"}})},`${pe.widthKey}-junction`)})]}),bt&&(()=>{const pe=ko(e,yn),Le=Yp(e.cutLabelVerticalAlign),_e=pe.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ae(I??0),cursor:Lt?"pointer":"default",...jp(P,y??0,n??!1)},onClick:Lt?Xe:void 0,onMouseEnter:F||z?Ut:void 0,onMouseLeave:F?Ke:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...h?{paddingLeft:Ae(ae),paddingRight:Ae(ae)}:{},justifyContent:Jp(pe.textTextAlign),alignItems:za(Le)},children:r.jsx("span",{className:Da(e,yn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...ja(pe,n),...Va(e,yn,c,n),..._e?{width:"100%"}:{}},children:N})})})})(),z&&Z&&(()=>{const pe=So(Z.widthPx),Le={width:pe,height:"auto",maxHeight:pe,objectFit:"contain",left:Z.x,top:Z.y,position:"absolute"};return r.jsx(Bp,{media:Z,className:Z.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Le},`${Z.rowId}-${Z.url}`)})()]})})]})}const $m=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
6281
+ `}const kn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ta=["AColumn","BColumn","CColumn","DColumn","EColumn"],yn="cutLabel",Hi=[...ta,yn],Uo=["A","B","C","D","E"];function tl(e){return`${e}ColumnVerticalAlign`}const Pr=["Top","Center","Bottom"];function na(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Uo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function qp(e){const t=na(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Gp(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Uo.includes(n)?n:null}function nl(e,t,n){const i=Gp(e);return i?i===t?!1:qp(n[tl(i)]):!0}function Oi(e){const t=na(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Uo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Kp(e,t,n){if(il(e,t,n))return Oi(e);const i=Oi(e);return i.kind==="baseline"?{kind:"top"}:i}function Up(e){const t=Oi(e);return t.kind==="baseline"?{kind:"top"}:t}function il(e,t,n){return nl(e,n,t)?Oi(e).kind==="baseline":!1}function Xp(e){const t={};let n=!1;for(const i of Uo){const o=tl(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}nl(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Yp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Jp(e){const t=Oi(e).kind;return t==="baseline"?"center":t}function Zp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function ja(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Qp(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function mr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=Qp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let m=0;return e.kind==="center"?m=(d.height-c)/2:e.kind==="bottom"&&(m=d.height-c),d.top-t+m+a}function em(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function tm(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const nm={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Je(e,t){return`${e}${t.replace(/^text/,"Text")}`}const im={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function om(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),{type:"row",items:[Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing")]},Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function rm(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Hi.map(e=>[im[e],om(e)]))}}function Ao(e,t){const n=i=>{const o=Je(t,i);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===yn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Da(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.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 qt(kt(n,t))}function Va(e,t,n,i){const o=Ao(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function qa(e,t,n,i){const o=Ao(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:_.scalingValue((s-a)/2,i)}}const Gt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],mi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],gi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],hi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],am={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},sm=["hover","focus","filled","success","error"],Ga=.004,ri=.004,gr=ri,ia=50,Bi=1440,zi=ia/Bi;function ol(e){const t=typeof e=="number"&&e>0?e:Bi;return ia/t}function lm(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 i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Bi}const rl={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Pi(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function cm(e,t=1){const n=t/e;return Object.fromEntries(Gt.map(i=>[i,n]))}function dm(){return Object.fromEntries([...mi.map(e=>[e,0]),...gi.map(e=>[e,0])])}function um(){return Object.fromEntries(hi.map(e=>[e,0]))}function co(e){return Object.fromEntries(Gt.map(t=>[t,typeof e[t]=="number"?e[t]:rl[t]]))}function al(e,t,n){const i=e-zi,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function To(e,t,n){const i=oa(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function pm(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=mi[o],a=gi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[a]=="number"?n[a]:0,m=al(t[o]??0,d,c);m.paddingLeft!==d&&(i[s]=m.paddingLeft),m.paddingRight!==c&&(i[a]=m.paddingRight)}return i}function oa(e,t,n){if(e<=0)return[];const i=Gt.slice(0,e).map(m=>n[m]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((m,p)=>m+p,0)+zi;if(t>=a)return i;const d=[...o];let c=a-t;for(let m=d.length-1;m>=0&&c>0;m-=1){const p=d[m]-zi;if(p<=0)continue;const x=Math.min(c,p);d[m]-=x,c-=x}return[...d,i[e-1]]}function mm(e,t,n){if(e<=1)return{};const i=oa(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Gt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function Ka(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...kn]}function gm(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function hm(e,t,n,i){const o=Math.min(i,e.length,Gt.length),s={};for(let a=0;a<o;a+=1){const d=e[a],c=t.indexOf(d);if(c===-1)continue;const m=Gt[c],p=mi[c],x=gi[c],$=hi[c],w=Gt[a],g=mi[a],y=gi[a],C=hi[a],b=n[m],L=n[p],I=n[x],N=n[$];typeof b=="number"&&(s[w]=b),typeof L=="number"&&(s[g]=L),typeof I=="number"&&(s[y]=I),typeof N=="number"&&(s[C]=N)}return s}function sl(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function fm(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Pi(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...cm(n,o),...dm()};if(s)for(const d of hi)typeof t[d]=="number"&&(a[d]=t[d]);else Object.assign(a,um());return sl(e,a)?a:e}function ym(e,t,n){const i=Xp(e);i&&(e={...e,...i});const o=ol(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,d=Pi(e),c=Pi(t),m=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof a=="number"?a:kn.length,x=I=>{if(m)return I;const N=co({...t,...I}),R=Pi(I),O=To(p,R,N),A=pm(p,O,{...t,...I});return Object.keys(A).length===0?I:{...I,...A}};if(typeof s=="number"&&s!==a)return e;const $=Ka(e),w=Ka(t);if(!gm($,w))return x({...e,...hm($,w,t,p)});if(d<c&&typeof p=="number"&&!m){const I=co({...t,...e});return x({...e,...mm(p,d,I)})}if(m){const I=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,N=Math.max(0,(d-o)/2);return I>N?{...e,textPaddingLR:N}:e}const g=co({...t,...e}),y=To(p,c,co(t)),b=To(p,d,g).some((I,N)=>I<(y[N]??I)),L=Gt.some(I=>{const N=e[I],R=t[I];return typeof N=="number"&&typeof R=="number"&&N!==R});return b||L?x(e):e}function vm(e,t,n,i){const o=t.slice(0,e).reduce((a,d)=>a+d,0),s=n.slice(e+1,t.length-1).reduce((a,d)=>a+d,0);return Math.max(zi,i-o-s-zi)}function xm(e,t){return Math.random()*(t-e)+e}function bm(e){return Object.fromEntries(Gt.map(t=>[t,typeof e[t]=="number"?e[t]:rl[t]]))}function hr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function wm(e,t,n,i,o,s){return e.slice(0,t).map((a,d)=>{const c=mi[d],m=gi[d],p=hi[d];return{key:a,textPrefix:nm[a],widthKey:Gt[d],width:n[Gt[d]],paddingLeftKey:c,paddingRightKey:m,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[m],paddingBottom:s[p]}})}function $m({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:d}){const{prefix:c}=_.useScopedStyles(),m=!!o,{columns:p,type:x,wrapperWidth:$,entriesCount:w,cellMinHeight:g,dividerWidth:y,showVisibility:C,cut:b,showCut:L,cutCellMinHeight:I,cutLabel:N,imageSize:R,imageOnHover:O,entryHoverEffect:A,entryHoverShowOption:T,rowPaddingTop:J,rowPaddingBottom:v,rowPaddingTopB:M,columnsOrder:B,textPaddingLR:V,textColor:te,backgroundColor:ce,dividerColor:U,textHoverColor:j,backgroundHoverColor:W,dividerHoverColor:k}=e,[E,q]=l.useState(void 0),[Z,X]=l.useState(null),z=O==="on"&&(!n||i),re=(b??0)>0,h=x==="b",le=l.useRef(null),ve=l.useRef(null),[he,Re]=l.useState(null),[ee,ge]=l.useState(Bi),Y=ol(ee),fe=Math.max(0,(($??0)-Y)/2),ae=Math.min(V??0,fe),se=Math.max(ae,ri),ne=(($??0)+Y)/2;l.useLayoutEffect(()=>{if(!n){ge(Bi);return}const pe=()=>{ge(lm(le.current))};pe();const Le=le.current;if(!Le)return;const _e=new ResizeObserver(pe);_e.observe(Le);let We=Le;for(;We&&!We.style.getPropertyValue("--cntrl-article-width");)We=We.parentElement;return We&&_e.observe(We),()=>_e.disconnect()},[n,a]),l.useEffect(()=>{q(void 0)},[b,L,t,w]),l.useEffect(()=>{n&&!i&&q(void 0)},[n,i]);const $e=_.buildColorVars(c,{textColor:te,backgroundColor:ce,dividerColor:U,textHoverColor:j,backgroundHoverColor:W,dividerHoverColor:k},am,sm),Ce=s&&s!=="default"?`${c}-state-${s}`:"",Ie=`${!n||i?A==="default"?`${c}-entry-hover-default`:A==="blinds"?`${c}-entry-hover-blinds`:A==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Ce}`.trim(),F=A==="reveal"&&(!n||i),Q=(C==null?void 0:C[0])??!1,P=(C==null?void 0:C[1])??!1,D=l.useRef(e),G=l.useRef(a);l.useEffect(()=>{if(!d||!n){D.current=e,G.current=a;return}if(G.current!==a){D.current=e,G.current=a;return}const pe=D.current;if(!(pe!==e))return;if(typeof pe.columns=="number"&&typeof e.columns=="number"&&pe.columns!==e.columns){D.current=e;return}const _e=ym(e,pe,{designWidth:ee});D.current=e,sl(e,_e)&&d(_e)},[e,d,n,a,ee]);const oe=l.useMemo(()=>bm(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ie=l.useMemo(()=>hr(e,mi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),ye=l.useMemo(()=>hr(e,gi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Me=l.useMemo(()=>hr(e,hi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Te=l.useMemo(()=>Array.isArray(B)&&B.length>0?B:[...kn],[B]),we=l.useMemo(()=>wm(Te,p,oe,ie,ye,Me),[Te,p,oe,ie,ye,Me]),qe=Pi(e),de=l.useMemo(()=>Gt.slice(0,p).map(pe=>oe[pe]),[p,oe]),ke=l.useMemo(()=>oa(p,qe,oe),[p,qe,oe]),Ne=l.useMemo(()=>To(p,qe,oe),[p,qe,oe]),He=l.useMemo(()=>we.map((pe,Le)=>al(Ne[Le]??0,pe.paddingLeft,pe.paddingRight)),[we,Ne]),dt=l.useMemo(()=>{const pe=w===0?1/0:w;return(t??[]).slice(0,pe).map((_e,We)=>({id:We,cells:Object.fromEntries(kn.map(tt=>[tt,_e[tt]??""])),image:_e.image,link:_e.link}))},[t,w]),ft=re?E??b:dt.length,Et=l.useMemo(()=>re?dt.slice(0,ft):dt,[dt,re,ft]),bt=re&&ft<dt.length,wt=Et.length>1||bt,Ht=[Q?`${c}-divider-top`:"",P||wt?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Lt=!n||i,Xe=()=>{if(!Lt)return;const pe=E??b;if(!L){q(dt.length);return}q(Math.min(pe+L,dt.length))},Ae=pe=>_.scalingValue(pe,n??!1),De=h?M??0:J??0,Ye=v??0,Be=g??0,ut=De+Be/2,Pt=Math.max(Ye,gr),Qe=Ba(0,Et.length,Q,P,bt,y??0,n??!1).borderTopWidth,At=he!=null?`${he}px`:`calc(${Qe} + ${Ae(ut)})`,Ot=h?"rowPaddingTopB":"rowPaddingTop",ze=we[0],gt=we[we.length-1],it=He[0],Ze=He[He.length-1],rt=ze&&it?Math.max(it.paddingLeft,ri):0,at=gt&&Ze?Math.max(Ze.paddingRight,ri):0,sn=qe,wn=pe=>{const Le=le.current;if(!Le)return{x:0,y:0};const _e=Le.getBoundingClientRect();return{x:pe.clientX-_e.left+za,y:pe.clientY-_e.top+za}},ln=(pe,Le)=>{if(!z)return;const _e=pe.image;if(!(_e!=null&&_e.url)){X(null);return}const{x:We,y:tt}=wn(Le),$t=(R==null?void 0:R.min)??80,Ee=(R==null?void 0:R.max)??320,et=(Z==null?void 0:Z.rowId)===pe.id?Z.widthPx:xm($t,Ee);X({rowId:pe.id,url:_e.url,objectFit:"contain",isVideo:Bp(_e),widthPx:et,x:We,y:tt})},ot=pe=>{if(!z||!Z)return;const{x:Le,y:_e}=wn(pe);X(We=>!We||We.x===Le&&We.y===_e?We:{...We,x:Le,y:_e})},tn=()=>{X(null)},Ut=pe=>{F&&Ha(pe,c),z&&X(null)},Ge=pe=>{F&&Oa(pe,c)};l.useLayoutEffect(()=>{if(!m||h){Re(null);return}const pe=ve.current,Le=pe==null?void 0:pe.parentElement;if(!pe||!Le){Re(null);return}const _e=()=>{const tt=pe.querySelector("[data-list-row]");if(!tt){Re(null);return}const $t=Le.getBoundingClientRect(),Ee=tt.getBoundingClientRect();Re(Ee.top-$t.top+Ee.height/2)};_e();const We=new ResizeObserver(_e);return We.observe(pe),We.observe(Le),()=>We.disconnect()},[m,h,Et,De,Ye,Be,t,e,we,Ne,ee,y,Q,P,bt]);const yt=l.useMemo(()=>!h&&ta.some(pe=>{const Le=pe.charAt(0),_e=e[`${pe}VerticalAlign`];return il(_e,e,Le)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);l.useLayoutEffect(()=>{var et;const pe=le.current;if(!pe)return;const Le=()=>{pe.querySelectorAll("[data-list-col]").forEach(Ve=>{Ve.style.transform="";const st=Ve.querySelector(`.${c}-list-col`);st&&(st.style.minHeight="",st.style.height="");const pt=Ve.querySelector(`.${c}-list-col-title`);pt&&(pt.style.transform="")})};if(h||!yt){Le();return}const _e=()=>{const Ve=Array.from(pe.querySelectorAll("[data-list-row]")),st=`${c}-list-col`,pt=`${c}-baseline-probe`;Ve.forEach(Rt=>{Rt.querySelectorAll("[data-list-col]").forEach(Ke=>{Ke.style.transform="";const nt=Ke.querySelector(`.${st}`);nt&&(nt.style.minHeight="",nt.style.height="");const It=Ke.querySelector(`.${c}-list-col-title`);It&&(It.style.transform="")})}),Ve.forEach(Rt=>{const Ke=Array.from(Rt.querySelectorAll("[data-list-col]"));em(Rt,Ke,st)}),pe.offsetHeight,Ve.forEach(Rt=>{const Ke=Array.from(Rt.querySelectorAll("[data-list-col]")),nt=Rt.getBoundingClientRect().top,It=new Map,St=Ke.map(ht=>{const Bt=ht.querySelector(`.${c}-list-col-title`),Wt={el:ht,titleEl:Bt,letter:ht.getAttribute("data-col-letter")??"",kind:ht.getAttribute("data-valign")??"top",anchor:ht.getAttribute("data-valign-anchor")};return It.set(Wt.letter,Wt),Wt}),_t=new Map,$n=(ht,Bt)=>{const Wt=_t.get(ht.letter);if(Wt!==void 0)return Wt;const cn=ht.anchor?It.get(ht.anchor):void 0;if(ht.kind!=="baseline"||!cn||Bt.has(ht.letter)){const Yn=mr(ht,nt,st,pt);return _t.set(ht.letter,Yn),Yn}Bt.add(ht.letter);const Sn=$n(cn,Bt);Bt.delete(ht.letter);const dn=mr(ht,nt,st,pt),jt=Sn-dn;tm(ht.titleEl,jt);const Cn=mr(ht,nt,st,pt);return _t.set(ht.letter,Cn),Cn};St.forEach(ht=>$n(ht,new Set))})};let We=null;const tt=()=>{We===null&&(We=requestAnimationFrame(()=>{We=null,_e()}))};_e();const $t=new ResizeObserver(()=>tt());$t.observe(pe);let Ee=!1;return typeof document<"u"&&((et=document.fonts)!=null&&et.ready)&&document.fonts.ready.then(()=>{Ee||tt()}),()=>{Ee=!0,We!==null&&(cancelAnimationFrame(We),We=null),$t.disconnect(),Le()}},[yt,h,e,t,ee,Et,Ne]);const vt=l.useMemo(()=>Vp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:vt}}),r.jsx("div",{style:$e,children:r.jsxs("div",{ref:le,className:`${c}-wrapper ${Ie}${Ht?` ${Ht}`:""}${h?` ${c}-type-b`:""}`.trim(),style:{width:_.scalingValue($??0,n),...!h&&m?{[`--${c}-first-entry-handle-top`]:At}:{}},onMouseMove:z?ot:void 0,onMouseLeave:z?tn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Et.map((pe,Le)=>{var $t;const _e=((($t=pe.link)==null?void 0:$t.length)??0)>0,We=_e&&(!n||i)?"a":"div",tt=Ba(Le,Et.length,Q,P,bt,y??0,n??!1);return r.jsxs(We,{ref:Le===0?Ee=>{ve.current=Ee}:void 0,className:`${c}-list-item${_e||T==="always"?` ${c}-list-item-has-link`:""}`,..._e?{href:pe.link,target:"_blank"}:{},style:tt,onMouseEnter:Ee=>{F&&(_e||T==="always")&&Ha(Ee,c),z&&ln(pe,Ee)},onMouseLeave:Ee=>{F&&(_e||T==="always")&&Oa(Ee,c)},children:[De>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(De)}}),r.jsxs("div",{className:`${c}-list-cols-row${h?"":` ${c}-list-cols-row-h`}${m&&Le===0&&h?` ${c}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:Ae(Be)},children:[we.map((Ee,et)=>{const Ve=et===we.length-1,st=He[et],pt=Ee.paddingBottom,Rt=jp(pe.cells[Ee.key]),Ke=h&&Rt&&pt>0,nt=h?{minHeight:Ae(Be)}:{width:Ae(Ne[et])},It=h?{paddingLeft:Ae(ae),paddingRight:Ae(ae)}:{paddingLeft:Ae(st.paddingLeft),paddingRight:Ae(st.paddingRight)},St=Ee.textPrefix.charAt(0),_t=h?Up(e[`${Ee.textPrefix}VerticalAlign`]):Kp(e[`${Ee.textPrefix}VerticalAlign`],e,St),$n=h&&Rt&&m&&Le===0;return r.jsxs("div",{className:h?`${c}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":St,"data-valign":_t.kind,..._t.kind==="baseline"?{"data-valign-anchor":_t.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Ve?` ${c}-list-col-last`:""}`,style:{...It,...nt,...h?{justifyContent:ja(_t.kind)}:{}},"data-test":Ee.width,children:r.jsx("span",{className:Va(e,Ee.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Da(Ao(e,Ee.textPrefix),n),...qa(e,Ee.textPrefix,c,n),...h?{}:Yp(_t.kind)},children:pe.cells[Ee.key]??null})}),Ke&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(pt)}}),$n&&r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ee.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ae(Math.max(pt,gr))}})]},Ee.key)}),m&&Le===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"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(ne),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ae(se),height:"100%"}}),r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"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(ne),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ae(Math.max(se,qe-se)),width:Ae(se),height:"100%"}})]})]}),!h&&Ye>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(Ye)}}),m&&Le===0&&!h&&r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"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:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ae(Pt)}})]},pe.id)}),m&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ot,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Qe,left:0,width:"100%",height:Ae(Math.max(De,gr))}})},"row-padding-handles"),m&&!h&&ze&&gt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":ze.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ne[0]-((it==null?void 0:it.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Ae(rt),height:"100%"}}),r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":gt.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(Ne[we.length-1]-((Ze==null?void 0:Ze.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ae(sn-at),width:Ae(at),height:"100%"}})]},"column-edge-padding-handles"),m&&!h&&we.slice(0,-1).map((pe,Le)=>{const _e=we[Le+1],We=ke.slice(0,Le+1).reduce((Ve,st)=>Ve+st,0),tt=He[Le],$t=He[Le+1],Ee=Math.max(tt.paddingRight,ri),et=Math.max($t.paddingLeft,ri);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":pe.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(Ne[Le]-tt.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ae(We-Ee),width:Ae(Ee),height:"100%"}}),r.jsx(Ft,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":_e.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ne[Le+1]-$t.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ae(We),width:Ae(et),height:"100%"}})]},`${pe.paddingRightKey}-padding`)}),m&&!h&&we.slice(0,-1).map((pe,Le)=>{const _e=vm(Le,ke,de,qe),tt=ke.slice(0,Le+1).reduce(($t,Ee)=>$t+Ee,0)-Ga/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":pe.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(ia),"data-controls-max-fraction":String(_e),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ae(tt),width:Ae(Ga),height:"calc(100%)",pointerEvents:"auto"}})},`${pe.widthKey}-junction`)})]}),bt&&(()=>{const pe=Ao(e,yn),Le=Jp(e.cutLabelVerticalAlign),_e=pe.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ae(I??0),cursor:Lt?"pointer":"default",...Dp(P,y??0,n??!1)},onClick:Lt?Xe:void 0,onMouseEnter:F||z?Ut:void 0,onMouseLeave:F?Ge:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...h?{paddingLeft:Ae(ae),paddingRight:Ae(ae)}:{},justifyContent:Zp(pe.textTextAlign),alignItems:ja(Le)},children:r.jsx("span",{className:Va(e,yn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Da(pe,n),...qa(e,yn,c,n),..._e?{width:"100%"}:{}},children:N})})})})(),z&&Z&&(()=>{const pe=Co(Z.widthPx),Le={width:pe,height:"auto",maxHeight:pe,objectFit:"contain",left:Z.x,top:Z.y,position:"absolute"};return r.jsx(zp,{media:Z,className:Z.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Le},`${Z.rowId}-${Z.url}`)})()]})})]})}const Sm=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
6282
6282
  import { CommonComponentProps } from '../props';
6283
6283
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
6284
6284
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -9235,7 +9235,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
9235
9235
  </>
9236
9236
  );
9237
9237
  }
9238
- `,wi=["A","B","C","D","E"],Ga=[...Er,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Bn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Sm(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function co(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Cm(){return Object.fromEntries(wi.map((e,t)=>{const n=Mn[t],i=`${e} column`;return[n,Sm(i)]}))}function Tm(){const e={};for(const t of wi)e[`${t}ColumnWidth`]=co(`${t} column width`),e[`${t}ColumnPaddingLeft`]=co(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=co(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=co(`${t} column padding bottom`);return e}function Ua(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Mn]};for(const s of wi)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function Lm(e){const t={};if(e===yn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Er]},enum:[...Er]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ga],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Ga]}}return t[Je(e,"textFontFamily")]={type:"string",scope:"layout",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Je(e,"textFontSettings")]={...Bn.fontSettings,scope:"layout",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Je(e,"textFontSize")]={...Bn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Je(e,"textLineHeight")]={...Bn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Je(e,"textLetterSpacing")]={...Bn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Je(e,"textWordSpacing")]={...Bn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Je(e,"textTextAlign")]={...Bn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Je(e,"textTextAppearance")]={...Bn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Im=Ni.reduce((e,t)=>({...e,...Lm(t)}),{});function Em(e){return{verticalAlign:e===yn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===yn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Pm(e,t={}){var n;return{...Em(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Xa=new Set(["textFontFamily","textFontSettings"]);function Rm(e,t,n){const i=s=>n===void 0?!0:n==="common"?Xa.has(s):!Xa.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=ta(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Je(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Je(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Je(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Je(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Je(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Je(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Je(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Je(e,"textTextAppearance")]=t.textTextAppearance),o}function To(e={},t){return Ni.reduce((n,i)=>({...n,...Rm(i,Pm(i,e),t)}),{})}const Mm=To(),km=om();function sl(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing"),Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function Am(){const e=[];return ea.forEach((t,n)=>{const i=Mn[n],o=sl(t);for(let s=1;s<Mn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:a,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const _m=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];sl(yn);const Fm=[...wi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],zn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Wm=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:zn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:zn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:zn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:zn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:zn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:zn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:zn[6],link:""}],Nm=[...wi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Hm={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:{...Cm(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Wm},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:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"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:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Tm(),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"}},...Im,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Mm,...To({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ua({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...To({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ua({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...To({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Am(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Fm.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}},...wi.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Nm]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",km]}],paletteBookmark:{items:[..._m],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Om={element:wm,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>hm(e,t),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:[]},fontSettingsPaths:{content:[],parameters:[...Ni.map(e=>({path:`${Je(e,"textFontFamily")}`}))]},fontRelations:{...Ni.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Je(t,"textFontFamily")}`}),{})},schema:Hm,sourceCode:$m},Ya=300,Ln=.004,Bm={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},zm=["hover","focus","filled","success","error"];function jm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ja(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Za(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:_.scalingValue((o-t)/2,i)}}function Dm(e){return`
9238
+ `,$i=["A","B","C","D","E"],Ua=[...Pr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],zn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Cm(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function uo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Tm(){return Object.fromEntries($i.map((e,t)=>{const n=kn[t],i=`${e} column`;return[n,Cm(i)]}))}function Lm(){const e={};for(const t of $i)e[`${t}ColumnWidth`]=uo(`${t} column width`),e[`${t}ColumnPaddingLeft`]=uo(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=uo(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=uo(`${t} column padding bottom`);return e}function Xa(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...kn]};for(const s of $i)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function Im(e){const t={};if(e===yn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Pr]},enum:[...Pr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ua],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Ua]}}return t[Je(e,"textFontFamily")]={type:"string",scope:"layout",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Je(e,"textFontSettings")]={...zn.fontSettings,scope:"layout",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Je(e,"textFontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Je(e,"textLineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Je(e,"textLetterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Je(e,"textWordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Je(e,"textTextAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Je(e,"textTextAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Em=Hi.reduce((e,t)=>({...e,...Im(t)}),{});function Pm(e){return{verticalAlign:e===yn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===yn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Rm(e,t={}){var n;return{...Pm(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Ya=new Set(["textFontFamily","textFontSettings"]);function Mm(e,t,n){const i=s=>n===void 0?!0:n==="common"?Ya.has(s):!Ya.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=na(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Je(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Je(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Je(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Je(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Je(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Je(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Je(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Je(e,"textTextAppearance")]=t.textTextAppearance),o}function Lo(e={},t){return Hi.reduce((n,i)=>({...n,...Mm(i,Rm(i,e),t)}),{})}const km=Lo(),Am=rm();function ll(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing"),Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function _m(){const e=[];return ta.forEach((t,n)=>{const i=kn[n],o=ll(t);for(let s=1;s<kn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:a,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Fm=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];ll(yn);const Wm=[...$i.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],jn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Nm=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:jn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:jn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:jn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:jn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:jn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:jn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:jn[6],link:""}],Hm=[...$i.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Om={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:{...Tm(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Nm},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:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"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:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Lm(),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"}},...Em,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...km,...Lo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Xa({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...Lo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Xa({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...Lo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[..._m(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Wm.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}},...$i.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Hm]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Am]}],paletteBookmark:{items:[...Fm],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Bm={element:$m,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>fm(e,t),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:[]},fontSettingsPaths:{content:[],parameters:[...Hi.map(e=>({path:`${Je(e,"textFontFamily")}`}))]},fontRelations:{...Hi.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Je(t,"textFontFamily")}`}),{})},schema:Om,sourceCode:Sm},Ja=300,Ln=.004,zm={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},jm=["hover","focus","filled","success","error"];function Dm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Za(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Qa(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:_.scalingValue((o-t)/2,i)}}function Vm(e){return`
9239
9239
  .${e}-wrapper {
9240
9240
  box-sizing: border-box;
9241
9241
  display: flex;
@@ -9297,7 +9297,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
9297
9297
  display: flex;
9298
9298
  align-items: center;
9299
9299
  justify-content: space-between;
9300
- gap: ${jm(20)};
9300
+ gap: ${Dm(20)};
9301
9301
  width: 100%;
9302
9302
  min-width: 0;
9303
9303
  min-height: var(--${e}-question-min-height, unset);
@@ -9325,7 +9325,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
9325
9325
  width: var(--${e}-icon-max-width);
9326
9326
  height: var(--${e}-icon-max-width);
9327
9327
  position: relative;
9328
- transition: transform ${Ya}ms ease;
9328
+ transition: transform ${Ja}ms ease;
9329
9329
  }
9330
9330
  .${e}-icon-custom {
9331
9331
  display: flex;
@@ -9360,7 +9360,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
9360
9360
  .${e}-panel {
9361
9361
  display: grid;
9362
9362
  grid-template-rows: 0fr;
9363
- transition: grid-template-rows ${Ya}ms ease;
9363
+ transition: grid-template-rows ${Ja}ms ease;
9364
9364
  }
9365
9365
  .${e}-item-open .${e}-panel {
9366
9366
  grid-template-rows: 1fr;
@@ -9428,7 +9428,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
9428
9428
  left: 20px;
9429
9429
  transform: translateY(-50%);
9430
9430
  }
9431
- `}function Qa(e,t,n,i,o,s,a,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:d??"#000000"}}function Vm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=_.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:m=0,dividerWidth:p=694e-6,dividerStyle:x="solid",entryHoverEffect:$="default",autoclose:w="off",icon:g,iconMaxWidth:y=.00833,iconPaddingRight:C=0,iconAnimation:b="rotate 45",questionColor:L="#000000",answerColor:I="#000000",dividerColor:N="#0000001F",iconColor:R="#000000",questionHoverColor:O="#666666",iconHoverColor:A="#666666",iconActiveColor:T="#000000",dividerHoverColor:J="#000000",questionFontFamily:v,questionFontSettings:M,questionFontSize:B,questionLineHeight:V,questionLetterSpacing:te,questionWordSpacing:ce,questionTextAppearance:U,answerFontFamily:j,answerFontSettings:W,answerFontSize:k,answerLineHeight:E,answerLetterSpacing:q,answerWordSpacing:Z,answerTextAppearance:X,questionPaddingLeft:z=0,questionPaddingTop:re=0,questionPaddingBottom:h=0,answerPaddingLeft:le=0,answerPaddingRight:ve=0,answerPaddingTop:he=0,answerPaddingBottom:Re=0}=e,ee=t??[],[ge,Y]=l.useState(()=>new Set),fe=!n||i;l.useEffect(()=>{Y(new Set)},[w]),l.useEffect(()=>{n&&!o&&!i&&Y(new Set)},[n,o,i]);const ae=Ae=>_.scalingValue(Ae,n??!1),se=Math.max(z,Ln),ne=Math.max(re,Ln),$e=Math.max(h,Ln),Ce=Math.max(le,Ln),be=Math.max(ve,Ln),Ie=Math.max(he,Ln),F=Math.max(Re,Ln),Q=Math.max(0,(c??1)-C-y),P=Math.max(0,(c??1)-ve),D=Math.max(0,(c??1)-le),K=Math.max(C,Ln),oe=Math.max(0,(c??1)-z-y),ie=l.useMemo(()=>ge.size===0?0:Math.min(...ge),[ge]),ye=l.useCallback(Ae=>ge.has(Ae),[ge]),Me=fe&&$==="default"?`${a}-entry-hover-default`:"",Te=g??"",we=Te!=="",qe=b.replace(/^rotate /,""),de=`${a}-icon-anim-${qe}`,ke=qt(kt(Qa(v,M,B,V,te,ce,U,L),n)),Ne=qt(kt(Qa(j,W,k,E,q,Z,X,I),n)),He=Ja(B,V,`${a}-question`,`${a}-text-tight-leading`),dt=Ja(k,E,`${a}-answer-text`,`${a}-text-tight-leading`),ft=Za(B,V,a,n),Et=Za(k,E,a,n),bt=_.buildColorVars(a,{questionColor:L,answerColor:I,dividerColor:N,iconColor:R,questionHoverColor:O,iconHoverColor:A,iconActiveColor:T,dividerHoverColor:J},Bm,zm),wt=s&&s!=="default"?`${a}-state-${s}`:"",Ht=l.useCallback(Ae=>{fe&&Y(De=>{if(De.has(Ae)){const Be=new Set(De);return Be.delete(Ae),Be}if(w==="on")return new Set([Ae]);const Ye=new Set(De);return Ye.add(Ae),Ye})},[fe,w]),Lt=l.useMemo(()=>Dm(a),[a]),Xe={[`--${a}-divider-width`]:_.scalingValue(p,n??!1),[`--${a}-divider-style`]:x,[`--${a}-icon-max-width`]:_.scalingValue(y,n??!1),...m>0?{[`--${a}-question-min-height`]:_.scalingValue(m,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Lt}}),r.jsx("div",{style:bt,children:r.jsx("div",{className:je(`${a}-wrapper`,n&&!i&&`${a}-editor`,Me,wt),style:{width:_.scalingValue(c,n??!1),maxWidth:"100%",...Xe},children:ee.map((Ae,De)=>{var At;const Ye=ye(De),Be=((At=Ae.question)==null?void 0:At.trim())??"",ut=Ae.answer,Pt=((ut==null?void 0:ut.length)??0)>0,Qe=d&&De===ie;return r.jsxs("div",{className:je(`${a}-item`,Ye&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[Qe&&r.jsxs(r.Fragment,{children:[r.jsx(Ft,{"data-controls":"questionPaddingTop","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:ae(ne),zIndex:2}}),r.jsx(Ft,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Q),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ae(se),height:"100%",zIndex:2}}),r.jsx(Ft,{"data-controls":"iconPaddingRight","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(oe),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:ae(K),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Ye,style:{...ke,...ft,paddingLeft:ae(z),paddingRight:ae(C)},onClick:()=>Ht(De),children:[re>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:ae(re)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:He,children:Be}),Pt&&(we?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${de}`,"aria-hidden":"true",children:r.jsx(Qt,{url:Te,fill:R,hoverFill:A,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${de}`,"aria-hidden":"true"}))]}),h>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:ae(h)},"aria-hidden":"true"})]}),Qe&&r.jsx(Ft,{"data-controls":"questionPaddingBottom","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:ae($e),zIndex:2}})]}),Pt&&ut&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Ye,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[Qe&&Ye&&r.jsxs(r.Fragment,{children:[r.jsx(Ft,{"data-controls":"answerPaddingTop","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:ae(Ie),zIndex:2}}),r.jsx(Ft,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(P),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ae(Ce),height:"100%",zIndex:2}}),r.jsx(Ft,{"data-controls":"answerPaddingRight","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(D),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:ae(be),height:"100%",zIndex:2}})]}),he>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:ae(he)}}),r.jsx("div",{className:`${a}-answer`,style:{...Ne,...Et,paddingLeft:ae(le),paddingRight:ae(ve)},children:r.jsx("div",{className:dt,children:r.jsx(ui,{content:ut})})}),Re>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:ae(Re)}}),Qe&&Ye&&r.jsx(Ft,{"data-controls":"answerPaddingBottom","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:ae(F),zIndex:2}})]})})})]},De)})})})]})}const qm=`import { useCallback, useEffect, useMemo, useState } from 'react';
9431
+ `}function es(e,t,n,i,o,s,a,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:d??"#000000"}}function qm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=_.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:m=0,dividerWidth:p=694e-6,dividerStyle:x="solid",entryHoverEffect:$="default",autoclose:w="off",icon:g,iconMaxWidth:y=.00833,iconPaddingRight:C=0,iconAnimation:b="rotate 45",questionColor:L="#000000",answerColor:I="#000000",dividerColor:N="#0000001F",iconColor:R="#000000",questionHoverColor:O="#666666",iconHoverColor:A="#666666",iconActiveColor:T="#000000",dividerHoverColor:J="#000000",questionFontFamily:v,questionFontSettings:M,questionFontSize:B,questionLineHeight:V,questionLetterSpacing:te,questionWordSpacing:ce,questionTextAppearance:U,answerFontFamily:j,answerFontSettings:W,answerFontSize:k,answerLineHeight:E,answerLetterSpacing:q,answerWordSpacing:Z,answerTextAppearance:X,questionPaddingLeft:z=0,questionPaddingTop:re=0,questionPaddingBottom:h=0,answerPaddingLeft:le=0,answerPaddingRight:ve=0,answerPaddingTop:he=0,answerPaddingBottom:Re=0}=e,ee=t??[],[ge,Y]=l.useState(()=>new Set),fe=!n||i;l.useEffect(()=>{Y(new Set)},[w]),l.useEffect(()=>{n&&!o&&!i&&Y(new Set)},[n,o,i]);const ae=Ae=>_.scalingValue(Ae,n??!1),se=Math.max(z,Ln),ne=Math.max(re,Ln),$e=Math.max(h,Ln),Ce=Math.max(le,Ln),be=Math.max(ve,Ln),Ie=Math.max(he,Ln),F=Math.max(Re,Ln),Q=Math.max(0,(c??1)-C-y),P=Math.max(0,(c??1)-ve),D=Math.max(0,(c??1)-le),G=Math.max(C,Ln),oe=Math.max(0,(c??1)-z-y),ie=l.useMemo(()=>ge.size===0?0:Math.min(...ge),[ge]),ye=l.useCallback(Ae=>ge.has(Ae),[ge]),Me=fe&&$==="default"?`${a}-entry-hover-default`:"",Te=g??"",we=Te!=="",qe=b.replace(/^rotate /,""),de=`${a}-icon-anim-${qe}`,ke=qt(kt(es(v,M,B,V,te,ce,U,L),n)),Ne=qt(kt(es(j,W,k,E,q,Z,X,I),n)),He=Za(B,V,`${a}-question`,`${a}-text-tight-leading`),dt=Za(k,E,`${a}-answer-text`,`${a}-text-tight-leading`),ft=Qa(B,V,a,n),Et=Qa(k,E,a,n),bt=_.buildColorVars(a,{questionColor:L,answerColor:I,dividerColor:N,iconColor:R,questionHoverColor:O,iconHoverColor:A,iconActiveColor:T,dividerHoverColor:J},zm,jm),wt=s&&s!=="default"?`${a}-state-${s}`:"",Ht=l.useCallback(Ae=>{fe&&Y(De=>{if(De.has(Ae)){const Be=new Set(De);return Be.delete(Ae),Be}if(w==="on")return new Set([Ae]);const Ye=new Set(De);return Ye.add(Ae),Ye})},[fe,w]),Lt=l.useMemo(()=>Vm(a),[a]),Xe={[`--${a}-divider-width`]:_.scalingValue(p,n??!1),[`--${a}-divider-style`]:x,[`--${a}-icon-max-width`]:_.scalingValue(y,n??!1),...m>0?{[`--${a}-question-min-height`]:_.scalingValue(m,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Lt}}),r.jsx("div",{style:bt,children:r.jsx("div",{className:je(`${a}-wrapper`,n&&!i&&`${a}-editor`,Me,wt),style:{width:_.scalingValue(c,n??!1),maxWidth:"100%",...Xe},children:ee.map((Ae,De)=>{var At;const Ye=ye(De),Be=((At=Ae.question)==null?void 0:At.trim())??"",ut=Ae.answer,Pt=((ut==null?void 0:ut.length)??0)>0,Qe=d&&De===ie;return r.jsxs("div",{className:je(`${a}-item`,Ye&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[Qe&&r.jsxs(r.Fragment,{children:[r.jsx(Ft,{"data-controls":"questionPaddingTop","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:ae(ne),zIndex:2}}),r.jsx(Ft,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Q),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ae(se),height:"100%",zIndex:2}}),r.jsx(Ft,{"data-controls":"iconPaddingRight","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(oe),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:ae(G),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Ye,style:{...ke,...ft,paddingLeft:ae(z),paddingRight:ae(C)},onClick:()=>Ht(De),children:[re>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:ae(re)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:He,children:Be}),Pt&&(we?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${de}`,"aria-hidden":"true",children:r.jsx(Qt,{url:Te,fill:R,hoverFill:A,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${de}`,"aria-hidden":"true"}))]}),h>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:ae(h)},"aria-hidden":"true"})]}),Qe&&r.jsx(Ft,{"data-controls":"questionPaddingBottom","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:ae($e),zIndex:2}})]}),Pt&&ut&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Ye,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[Qe&&Ye&&r.jsxs(r.Fragment,{children:[r.jsx(Ft,{"data-controls":"answerPaddingTop","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:ae(Ie),zIndex:2}}),r.jsx(Ft,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(P),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ae(Ce),height:"100%",zIndex:2}}),r.jsx(Ft,{"data-controls":"answerPaddingRight","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(D),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:ae(be),height:"100%",zIndex:2}})]}),he>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:ae(he)}}),r.jsx("div",{className:`${a}-answer`,style:{...Ne,...Et,paddingLeft:ae(le),paddingRight:ae(ve)},children:r.jsx("div",{className:dt,children:r.jsx(pi,{content:ut})})}),Re>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:ae(Re)}}),Qe&&Ye&&r.jsx(Ft,{"data-controls":"answerPaddingBottom","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:ae(F),zIndex:2}})]})})})]},De)})})})]})}const Gm=`import { useCallback, useEffect, useMemo, useState } from 'react';
9432
9432
  import cn from 'classnames';
9433
9433
  import { CommonComponentProps } from '../props';
9434
9434
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -10225,7 +10225,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
10225
10225
  </>
10226
10226
  );
10227
10227
  }
10228
- `;function In(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const es={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Km=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Gm={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:In("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...es.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...es.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:In("Question Padding Left"),questionPaddingTop:In("Question Padding Top"),questionPaddingBottom:In("Question Padding Bottom"),answerPaddingLeft:In("Answer Padding Left"),answerPaddingRight:In("Answer Padding Right"),answerPaddingTop:In("Answer Padding Top"),answerPaddingBottom:In("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...Km],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Um={element:Vm,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:Gm,sourceCode:qm},vn=e=>e.display==="cover",Uo=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},ts=100,Xm=.2,ns=8,ll=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=l.useState(0),[a,d]=l.useState(!1),c=l.useRef(null),m=l.useRef(0);m.current=o;const p=l.useMemo(()=>typeof window>"u"?ts:Math.max(ts,window.innerHeight*Xm),[]),x=l.useCallback(v=>Math.max(0,1-v/(p*1.5)),[p]),$=l.useCallback(v=>Math.max(0,1-v/(p*.45)),[p]),w=l.useCallback(v=>{const M=typeof window<"u"?window.innerHeight:800,B=Math.max(.88,1-v/M*.12);return`translateY(${v}px) scale(${B})`},[]),g=l.useCallback(()=>{c.current=null},[]),y=l.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),g()},[n,g]),C=l.useCallback(()=>{const v=typeof window<"u"?window.innerHeight:800;d(!0),s(v),window.setTimeout(()=>{t(),g(),d(!1)},Math.min(n,200))},[n,t,g]),b=l.useCallback(v=>{!e||a||v.pointerType==="touch"&&(i!=null&&i(v.target)||(c.current={startX:v.clientX,startY:v.clientY,isLocked:null,pointerId:v.pointerId}))},[e,a,i]),L=l.useCallback(v=>{const M=c.current;if(!e||!M||v.pointerType!=="touch"||M.pointerId!==v.pointerId)return;const B=v.clientX-M.startX,V=v.clientY-M.startY;if(M.isLocked===null){if(Math.abs(B)<ns&&Math.abs(V)<ns)return;if(V>0&&V>Math.abs(B))M.isLocked=!0,v.currentTarget.setPointerCapture(v.pointerId);else{M.isLocked=!1,g();return}}if(!M.isLocked)return;v.preventDefault();const te=Math.max(0,V);m.current=te,s(te)},[e,g]),I=l.useCallback(v=>{const M=c.current;if(!e||!M||v.pointerType!=="touch"||M.pointerId!==v.pointerId)return;const B=M.isLocked===!0;if(v.currentTarget.hasPointerCapture(v.pointerId)&&v.currentTarget.releasePointerCapture(v.pointerId),!B){g();return}v.clientY-M.startY>=p?C():y()},[p,C,e,g,y]),N=l.useCallback(v=>{I(v)},[I]),R=l.useCallback(v=>{I(v)},[I]),O=o>0,A=a?`transform ${n}ms ease`:"none",T=a?`opacity ${n}ms ease`:"none",J=o>0||a;return{isSwipeDragging:O,backdropStyle:{opacity:x(o),transition:T},mediaAreaStyle:{transform:w(o),transition:A,touchAction:O?"none":void 0,willChange:O?"transform":void 0},overlayContentStyle:J?{opacity:$(o),transition:T}:void 0,swipeHandlers:e?{onPointerDown:b,onPointerMove:L,onPointerUp:N,onPointerCancel:R}:{},dismissAreaStyle:e?{touchAction:O?"none":"pan-x"}:void 0}},Ym="[data-lightbox-scrollable]",cl=()=>{l.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=d=>{const c=d.target;c instanceof Element&&c.closest(Ym)||d.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},Jm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Zm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Qm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},eg=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,d=n-a,c=a-n,m=(g,y)=>{Zm(t),e.scrollLeft=g,y&&(s==null||s())};if(Math.abs(d)<.5)return m(n,!0),()=>{};let p=!1,x=0;const $=()=>{t.removeEventListener("transitionend",w),clearTimeout(x)},w=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,$(),m(n,!0))};return t.addEventListener("transitionend",w),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{p||(p=!0,$(),m(n,!0))},i+64),()=>{p||(p=!0,$(),m(a-Qm(t),!1))}},Pi=300,tg=900,ng=1500,ig="cubic-bezier(0.16, 1, 0.3, 1)",og=3e3,rg=2,ag=16,sg=.05,lg=1,uo=.3,cg=50,dg=20,ei=.004,hi=["title1","title2","title3"],ug={title1:"1",title2:"2",title3:"3"},pg={title1:"title1Color",title2:"title2Color",title3:"title3Color"},mg={title1:.02,title2:.02,title3:.02},po=e=>`max(${e}, ${dg}px)`,gg=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},hg=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=gg(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,fg=e=>[lt(e,"fontFamily"),lt(e,"fontSettings"),{type:"row",items:[lt(e,"fontSize"),lt(e,"lineHeight"),lt(e,"letterSpacing"),lt(e,"wordSpacing")]},lt(e,"textAlign"),lt(e,"textAppearance")],yg=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(hi.map(e=>[ug[e],fg(e)]))}),oa=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...a]}},{overflow:i-1,widths:[]});return o},dl=(e,t)=>oa(e,t),mo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},is=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:oa(e.length,n),effective:dl(e.length,n)}},vg=(e,t,n,i,o,s,a)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),d},hr=(e,t)=>{const n=i=>{const o=lt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[pg[t]]}},xg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),fr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??mg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},bg=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:m,thumbnailMarginBottom:p,imageGap:x,closeIcon:$,closeIconMaxWidth:w,closeIconColor:g,closeIconHoverColor:y,thumbnailTrigger:C,thumbnailVisibility:b,thumbnailObjectFit:L,thumbnailActive:I,thumbnailActiveColor:N,title1Width:R,title2Width:O,title3Width:A,title1MarginLeft:T=0,title2MarginLeft:J=0,title3MarginLeft:v=0,titleRowMarginBottom:M=0,titleHeaderLayout:B="desktop",contentMarginTop:V,iconMarginLeft:te}=n,ce=u=>_.scalingValue(u,i??!1),U=c??n.thumnailSize??.03,j=ce(U),W=ce(m),k=ce(p??.02),E=ce(x??0),q=ce(V??0),Z=po(q),X=ce(te??0),[z,re]=l.useState(0),h=l.useRef(z);h.current=z;const le=t[z],{title1:ve,title2:he,title3:Re}=hg(le),ee=fr("title1",hr(n,"title1"),i),ge=fr("title2",hr(n,"title2"),i),Y=fr("title3",hr(n,"title3"),i),fe=B==="mobile",ae=!o&&(!i||s),se=ae,ne=ae,$e=ae,Ce=vn(L),be=Ce?{"--image-aspect-ratio":Uo(L)}:void 0,Ie=!!(ve||he||Re),F=l.useMemo(()=>vg(e,ve,he,Re,ee,ge,Y),[e,z,ve,he,Re,ee,ge,Y]),Q=l.useMemo(()=>({title1Width:R,title2Width:O,title3Width:A}),[R,O,A]),P=l.useMemo(()=>F.map(u=>Q[u.widthKey]),[F,Q]),D=l.useMemo(()=>oa(F.length,P),[F.length,P]),K=l.useMemo(()=>dl(F.length,P),[F.length,P]),oe=l.useMemo(()=>F.filter(u=>u.prefix==="title1"),[F]),ie=l.useMemo(()=>F.filter(u=>u.prefix==="title2"||u.prefix==="title3"),[F]),ye=l.useMemo(()=>is(oe,Q),[oe,Q]),Me=l.useMemo(()=>is(ie,Q),[ie,Q]),Te=l.useCallback((u,f)=>{const S=F.indexOf(u);if(!fe||f==="single-row")return{effectiveWidth:K[S]??0,resolvedWidth:D[S]??0,maxWidth:mo(S,D)};if(f==="two-row-top"){const ue=oe.indexOf(u);return{effectiveWidth:ye.effective[ue]??0,resolvedWidth:ye.resolved[ue]??0,maxWidth:mo(ue,ye.resolved)}}const G=ie.indexOf(u);return{effectiveWidth:Me.effective[G]??0,resolvedWidth:Me.resolved[G]??0,maxWidth:mo(G,Me.resolved)}},[ie,Me,K,D,F,oe,ye,fe]),we=l.useCallback(u=>_.scalingValue(u,i??!1),[i]),qe=we(M??0),de=l.useMemo(()=>({title1MarginLeft:T,title2MarginLeft:J,title3MarginLeft:v}),[T,J,v]),ke=l.useCallback(u=>F.slice(0,u+1).reduce((f,S,G)=>f+(S!=null&&S.marginLeftKey?de[S.marginLeftKey]??0:0)+(D[G]??0),0)+(fe?0:T??0),[F,de,D,fe,T]),Ne=l.useCallback(()=>fe?0:T??0,[fe,T]),He=l.useCallback(u=>ie.slice(0,u).reduce((f,S,G)=>f+(S.marginLeftKey?de[S.marginLeftKey]??0:0)+(Me.resolved[G]??0),0),[ie,Me.resolved,de]),dt=l.useCallback(u=>{const f=ie[u];return He(u)+(f.marginLeftKey?de[f.marginLeftKey]??0:0)+(Me.resolved[u]??0)},[ie,Me.resolved,He,de]),ft=(u,f)=>{const S=u.marginLeftKey?de[u.marginLeftKey]??0:0,{effectiveWidth:G,resolvedWidth:ue,maxWidth:Se}=Te(u,f),Fe=o&&f==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":u.prefix,style:{...f==="single-row"?{gridArea:u.prefix}:{},width:we(G),...S>0?{marginLeft:we(S)}:{}},children:[r.jsx("p",{className:u.className,style:u.style,children:u.text}),Fe&&u.marginLeftKey&&r.jsx("div",{"data-controls":u.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ue),style:{position:"absolute",top:0,left:we(-S),width:`max(${we(S)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Fe&&r.jsx("div",{"data-controls":u.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Se),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:we(-ei/2),width:we(ei),height:"100%",pointerEvents:"auto"}})]},u.className)},Et=()=>{const u=fe?-1:F.findIndex(G=>G.prefix==="title1"),f=!fe&&(o||(T??0)>0)?(()=>{const G=T??0,ue=u>=0?D[u]:R??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ue),style:{position:"absolute",top:0,left:0,width:`max(${we(G)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,S=F.flatMap((G,ue)=>{if(!G.marginLeftKey)return[];const Se=de[G.marginLeftKey]??0,Fe=xg(F,D,de,ue)+Ne();return r.jsx("div",{"data-controls":G.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(D[ue]),style:{position:"absolute",top:0,left:we(Fe),width:`max(${we(Se)}, 10px)`,height:"100%",pointerEvents:"auto"}},G.marginLeftKey)});return f?[f,...S]:S},bt=()=>F.map((u,f)=>{const S=mo(f,D),ue=ke(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":u.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(S),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:we(ue),width:we(ei),height:"100%",pointerEvents:"auto"}})},`${u.widthKey}-junction`)}),wt=()=>ie.flatMap((u,f)=>{if(!u.marginLeftKey)return[];const S=de[u.marginLeftKey]??0,G=He(f),{resolvedWidth:ue}=Te(u,"two-row-bottom");return r.jsx("div",{"data-controls":u.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ue),style:{position:"absolute",top:0,left:we(G),width:`max(${we(S)}, 10px)`,height:"100%",pointerEvents:"auto"}},u.marginLeftKey)}),Ht=()=>ie.map((u,f)=>{const{maxWidth:S}=Te(u,"two-row-bottom"),ue=dt(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":u.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(S),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:we(ue),width:we(ei),height:"100%",pointerEvents:"auto"}})},`${u.widthKey}-junction`)}),Lt=l.useRef(null),Xe=l.useRef(null),Ae=l.useRef(null),De=l.useRef(null),Ye=l.useRef([]),Be=l.useRef([]),ut=l.useRef(0),Pt=l.useRef(null),Qe=l.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),At=l.useRef(null),Ot=l.useRef(null),ze=l.useRef(0),gt=l.useRef("forward"),it=l.useRef(0),Ze=l.useRef(null),rt=l.useRef(!1),at=t.length>1&&(!o||!!s),sn=at?3:1,wn=l.useMemo(()=>Array.from({length:sn},()=>t).flat(),[t,sn]),[ln,ot]=l.useState(!1),[tn,Ut]=l.useState(!1),[Ke,yt]=l.useState(!0),vt=l.useRef(null),pe=l.useRef(null),Le=l.useRef(!1),_e=l.useRef(!1),We=l.useRef(null),tt=l.useRef(null),$t=se&&!Ke,Ee=l.useCallback(()=>{se&&(yt(!0),tt.current&&clearTimeout(tt.current),tt.current=setTimeout(()=>{Qe.current.isActive||yt(!1)},og))},[se]),et=l.useCallback(()=>{o||_e.current||(_e.current=!0,Ut(!1),We.current=setTimeout(()=>{a()},Pi))},[o,a]),Ve=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":$t?"true":"false",style:{width:_.scalingValue(w??0,i),height:_.scalingValue(w??0,i),marginRight:X,"--close-icon-hover-color":y},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:et,"aria-label":"Close",children:r.jsx(Qt,{url:$,fill:g,hoverFill:i&&!s?g:y,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:X,height:"100%",pointerEvents:"auto"}})]}),st=(u="two-row")=>r.jsx("div",{...u==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:we(T??0),flexShrink:0,...u==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...u==="two-row"&&o?{pointerEvents:"auto"}:{}}}),pt=()=>{const u=F.find(G=>G.prefix==="title1"),f=F.filter(G=>G.prefix==="title2"||G.prefix==="title3"),S=f.length>0||o||(M??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(T??0)>0||o?st():null,u&&ft(u,"two-row-top"),$&&Ve()]}),S?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[f.map(G=>ft(G,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[wt(),Ht()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:qe,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},Rt=()=>r.jsxs(r.Fragment,{children:[(T??0)>0||o?st("single-row"):null,F.map(u=>ft(u,"single-row")),o?r.jsxs(r.Fragment,{children:[Et(),bt()]}):null,$?Ve():null]}),Ge=l.useCallback(u=>!!(u.closest("[data-controls]")||u.closest(`.${e}-thumbnails`)||u.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:nt,backdropStyle:It,mediaAreaStyle:St,overlayContentStyle:_t,swipeHandlers:$n,dismissAreaStyle:ht}=ll({enabled:ae??!1,onClose:et,animMs:Pi,isBlockedTarget:Ge}),Bt=()=>{if(!at||t.length===0)return ut.current=0,0;const u=Be.current[0],f=Be.current[t.length];if(!u||!f)return ut.current;const S=f.offsetLeft-u.offsetLeft;return S>0&&(ut.current=S),ut.current},Wt=(u=!1)=>{if(!at)return;const f=Xe.current,S=Bt();!f||S<=0||S<f.clientWidth*.25||(f.scrollLeft<=0?(f.scrollLeft+=S,u&&(Qe.current.scrollLeft+=S),rt.current&&(it.current+=S)):f.scrollLeft>=S*2&&(f.scrollLeft-=S,u&&(Qe.current.scrollLeft-=S),rt.current&&(it.current-=S)))},cn=(u,f=(S=>(S=Xe.current)==null?void 0:S.scrollLeft)()??0)=>{if(!at)return u;let G=t.length+u,ue=1/0;for(let Se=0;Se<sn;Se++){const Fe=Se*t.length+u,Ue=Be.current[Fe];if(!Ue)continue;const Mt=Math.abs(Ue.offsetLeft-f);Mt<ue&&(ue=Mt,G=Fe)}return G},Sn=u=>{const f=Xe.current;return!u||!f?!1:u.offsetWidth>f.clientWidth+1},dn=u=>{const f=Xe.current;if(!u||!f||!Sn(u))return!1;const S=u.offsetLeft,G=S+u.offsetWidth;return f.scrollLeft>=S-1&&f.scrollLeft+f.clientWidth<=G+1},jt=(u=(f=>(f=Xe.current)==null?void 0:f.scrollLeft)()??0)=>{for(let G=0;G<Be.current.length;G+=1){const ue=Be.current[G];if(ue&&dn(ue))return G}let S={flatIndex:0,distance:1/0};return Be.current.forEach((G,ue)=>{if(!G)return;const Se=Math.abs(G.offsetLeft-u);Se<S.distance&&(S={flatIndex:ue,distance:Se})}),S.flatIndex},Cn=u=>{Xe.current&&Be.current.forEach(f=>{f&&(f.style.scrollSnapAlign=Sn(f)&&u==="backward"?"end":"start")})},Xn=(u,f,S)=>{const G=u-f,ue=jt(f),Se=Be.current[ue];if(dn(Se))return jt(u)%t.length;const Fe=Be.current[ue+1],Ue=Se?Fe?Fe.offsetLeft-Se.offsetLeft:Se.offsetWidth:0,Mt=Ue>0?G>Ue*uo?1:G<-Ue*uo?-1:0:0;return Mt===0?S:at?(S+Mt+t.length)%t.length:Math.max(0,Math.min(t.length-1,S+Mt))},Yn=l.useCallback((u=!1)=>{if(b!=="on"||o)return;const f=De.current,S=h.current,G=Ye.current[S];if(!f||!G||f.scrollWidth<=f.clientWidth)return;const ue=f.scrollLeft,Se=ue+f.clientWidth,Fe=G.offsetLeft,Ue=Fe+G.offsetWidth;if(Fe>=ue&&Ue<=Se)return;const Mt=f.scrollWidth-f.clientWidth;let Ct=ue;if(!u&&vt.current===null){const Zn=Ye.current[S-1],Si=Ye.current[S+1],to=Zn?G.offsetLeft-Zn.offsetLeft:Si?Si.offsetLeft-G.offsetLeft:G.offsetWidth;Ue>Se?Ct+=to:Fe<ue&&(Ct-=to)}else Ue>Se?Ct=Ue-f.clientWidth:Ct=Fe;f.scrollLeft=Math.max(0,Math.min(Mt,Ct))},[o,b]),$i=l.useCallback((u=!1)=>{u&&(Le.current=!0),pe.current===null&&(pe.current=requestAnimationFrame(()=>{pe.current=null;const f=Le.current;Le.current=!1,Yn(f)}))},[Yn]),Jo=l.useCallback(u=>{if(u===h.current)return;const f=h.current;h.current=u;const S=Math.abs(u-f)>1,G=at&&t.length>1&&(f===t.length-1&&u===0||f===0&&u===t.length-1);re(u),$i(S||G)},[t.length,at,$i]),Xt=()=>{if(!Xe.current||t.length===0||vt.current!==null||Qe.current.isActive&&Qe.current.hasMoved)return;const u=Xe.current.scrollLeft,f=jt(u)%t.length;f!==h.current&&Jo(f)},Yi=()=>{vt.current=null},Yt=u=>{const f=Xe.current;f&&(f.style.scrollSnapType=u?"":"none")},un=()=>{var u;(u=Ot.current)==null||u.call(Ot),Ot.current=null},Tn=()=>{Ze.current!==null&&(cancelAnimationFrame(Ze.current),Ze.current=null),rt.current=!1},Fn=()=>{const u=Xe.current;if(!u){Ze.current=null,rt.current=!1;return}const f=it.current-u.scrollLeft;if(Math.abs(f)<.5){u.scrollLeft=it.current,Wt(),Xt(),Ze.current=null,rt.current=!1;return}u.scrollLeft+=f*sg,Wt(),Xt(),Ee(),Ze.current=requestAnimationFrame(Fn)},Wn=()=>{const u=Ae.current;u&&(u.style.transition="",u.style.transform="",u.style.willChange="")},Ji=(u,f,S,G)=>{Wn(),u.scrollLeft=f,ze.current=u.scrollLeft,Wt(),S!==void 0?(h.current=S,re(S)):Xt(),Yt(!0),G==null||G()},Zi=(u,{behavior:f="smooth",activeIndex:S,onComplete:G}={})=>{const ue=Xe.current,Se=Ae.current;if(!ue||!Se)return;if(Tn(),un(),Yt(!1),f==="auto"){Ji(ue,u,S,G);return}const Fe=Math.abs(u-ue.scrollLeft),Ue=Jm(Fe,tg,ng,ue.clientWidth*.55);Ot.current=eg(ue,Se,u,{duration:Ue,easing:ig,onComplete:()=>{Ot.current=null,Ji(ue,u,S,G)}})},Zo=(u="smooth")=>{const f=Xe.current;if(!f||t.length===0)return;const S=jt()%t.length,G=cn(S,f.scrollLeft),ue=Be.current[G];ue&&Zi(ue.offsetLeft,{behavior:u,activeIndex:S})},Qo=(u,f="smooth",S,G)=>{const ue=Xe.current;if(!ue||t.length===0)return;const Se=(G??ue.scrollLeft)-u,Fe=jt(u),Ue=Be.current[Fe];if(dn(Ue)){Yt(!0),Xt();return}const Mt=Be.current[Fe+1],Ct=Ue?Mt?Mt.offsetLeft-Ue.offsetLeft:Ue.offsetWidth:0;if((Ct>0?Se>Ct*uo?1:Se<-Ct*uo?-1:0:0)!==0){const fl=S??Fe%t.length,yl=Xn(G??ue.scrollLeft,u,fl);nn(yl,f);return}const Si=G??ue.scrollLeft,to=jt(Si),sa=Be.current[to];if(sa&&Math.abs(sa.offsetLeft-Si)<1){Yt(!0),Xt();return}Zo("auto")},nn=(u,f="smooth")=>{const S=Xe.current;if(!S||t.length===0)return;const G=cn(u,S.scrollLeft),ue=Be.current[G];ue&&(f==="smooth"?vt.current=u:vt.current=null,h.current=u,re(u),$i(!0),Zi(ue.offsetLeft,{behavior:f,activeIndex:u,onComplete:f==="smooth"?Yi:void 0}))},Jn=()=>{At.current&&(window.removeEventListener("pointerup",At.current),window.removeEventListener("pointercancel",At.current),At.current=null)},Qi=(u,f,S,G,ue)=>{const Se=S-u,Fe=G-f,Ue=Math.abs(Se),Mt=Math.abs(Fe);if(Ue<cg||Ue<=Mt)return!1;const Ct=Se<0?1:-1,Zn=at?(ue+Ct+t.length)%t.length:Math.max(0,Math.min(t.length-1,ue+Ct));return Zn===ue?!1:(nn(Zn),!0)},Nn=u=>{if(!Qe.current.isActive)return;Jn();const f=Xe.current;if(!f)return;const{scrollLeft:S,startActiveIndex:G,hasMoved:ue}=Qe.current,Se=f.scrollLeft;Wt(!0),Qe.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ot(!1),u!==void 0&&f.hasPointerCapture(u)&&f.releasePointerCapture(u),ue?Qo(S,"smooth",G,Se):(Yt(!0),Xt()),Ee()},eo=(u,f)=>{const S=Pt.current;Pt.current=null,S&&(Qi(S.startX,S.startY,u,f,S.startActiveIndex),Ee())},er=u=>{if(!ne)return;if(u.pointerType==="touch"){if(Tn(),Yt(!0),Ge(u.target))return;Pt.current={startX:u.clientX,startY:u.clientY,startActiveIndex:h.current};return}if(u.pointerType!=="mouse"||u.button!==0||Ge(u.target))return;const f=Xe.current;if(!f)return;Tn(),un(),Wn(),vt.current=null,Qe.current={isActive:!0,startX:u.clientX,scrollLeft:f.scrollLeft,startActiveIndex:h.current,hasMoved:!1},Yt(!1),Ee(),f.setPointerCapture(u.pointerId),Jn();const S=G=>{G.pointerType==="mouse"&&Nn(G.pointerId)};At.current=S,window.addEventListener("pointerup",S),window.addEventListener("pointercancel",S)},tr=u=>{if(!ne||u.pointerType!=="mouse")return;const f=Xe.current;if(!f||!Qe.current.isActive)return;if(u.buttons===0){Nn(u.pointerId);return}const S=u.clientX-Qe.current.startX;Math.abs(S)>lg&&(Qe.current.hasMoved=!0,ot(!0)),Qe.current.hasMoved&&(u.preventDefault(),f.scrollLeft=Qe.current.scrollLeft-S,Wt(!0),Xt(),Ee())},H=u=>{if(ne){if(u.pointerType==="touch"){u.type==="pointerup"?eo(u.clientX,u.clientY):Pt.current=null;return}u.pointerType==="mouse"&&Nn(u.pointerId)}},me=u=>{!ne||u.pointerType!=="mouse"||Nn(u.pointerId)};return cl(),l.useEffect(()=>{const u=requestAnimationFrame(()=>Ut(!0));return()=>{cancelAnimationFrame(u),un(),Jn(),pe.current!==null&&(cancelAnimationFrame(pe.current),pe.current=null),We.current&&clearTimeout(We.current),tt.current&&clearTimeout(tt.current)}},[]),l.useEffect(()=>{if(!se){yt(!0);return}Ee();const u=Lt.current;if(!u)return;const f=()=>Ee();return u.addEventListener("pointermove",f),u.addEventListener("pointerdown",f),()=>{u.removeEventListener("pointermove",f),u.removeEventListener("pointerdown",f),tt.current&&clearTimeout(tt.current)}},[se,Ee]),l.useEffect(()=>{const u=f=>{f.key==="Escape"&&et()};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[et]),l.useLayoutEffect(()=>{Bt()},[E,t.length,at]),l.useLayoutEffect(()=>{o||nn(h.current,"auto")},[E,o]),l.useLayoutEffect(()=>{nn(0,"auto")},[t.length,at]),l.useEffect(()=>{const u=Xe.current;if(!u||o||!ae)return;const f=S=>{if(S.preventDefault(),Math.abs(S.deltaY)<=Math.abs(S.deltaX))return;const G=S.deltaMode===1?ag:S.deltaMode===2?u.clientHeight:1,ue=S.deltaY*G*rg;if(ue!==0){if(un(),rt.current||(rt.current=!0,it.current=u.scrollLeft,vt.current=null,Yt(!1)),it.current+=ue,!at){const Se=u.scrollWidth-u.clientWidth;it.current=Math.max(0,Math.min(Se,it.current))}Ee(),Ze.current===null&&(Ze.current=requestAnimationFrame(Fn))}};return u.addEventListener("wheel",f,{passive:!1}),()=>{u.removeEventListener("wheel",f),Tn()}},[o,ae,at]),l.useEffect(()=>{const u=Xe.current;if(!u)return;const f=()=>{Wt(Qe.current.isActive);const G=u.scrollLeft,ue=G-ze.current;ze.current=G;const Se=ut.current>0?ut.current*.5:1/0;if(ue!==0&&Math.abs(ue)<Se){const Fe=ue>0?"forward":"backward";Fe!==gt.current&&(gt.current=Fe,Cn(Fe))}Qe.current.isActive&&Qe.current.hasMoved||Xt()};u.addEventListener("scroll",f,{passive:!0});const S=new ResizeObserver(()=>{Bt(),Wt(Qe.current.isActive),Cn(gt.current),Xt()});return S.observe(u),()=>{un(),u.removeEventListener("scroll",f),S.disconnect()}},[t.length,at]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{nt||et()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:tn?1:0,transition:`opacity ${Pi}ms ease`,pointerEvents:tn?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...It}}),r.jsxs("div",{ref:Lt,className:`${e}-lightbox-dismiss-area`,style:ht,...$n,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:St,onClick:u=>u.stopPropagation(),children:r.jsx("div",{ref:Xe,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":ne&&t.length>0?"true":"false","data-mouse-dragging":ln?"true":"false",onPointerDown:er,onPointerMove:tr,onPointerUp:H,onPointerCancel:H,onLostPointerCapture:me,children:r.jsx("div",{ref:Ae,className:`${e}-lightbox-strip-track`,style:{gap:E},children:wn.map((u,f)=>{const S=u.image.objectFit??"contain",G=f%t.length,ue=Math.floor(f/t.length),Se=po(E),Fe=`calc(-0.5 * (${Se} + ${E}))`;return r.jsxs("div",{ref:Ue=>Be.current[f]=Ue,className:`${e}-strip-item`,style:{height:B==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:u.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:S}}),o&&G<t.length-1&&ue===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Fe,width:Se,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ue}-${u.image.url}-${G}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":$t?"true":"false",style:_t,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:q,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:Z,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${fe?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ie||$)&&r.jsx("div",{className:`${e}-header ${fe?`${e}-header-two-row`:`${e}-header-single-row`}`,children:fe?pt():Ie||$?Rt():null})})})]}),t.length>1&&b==="on"&&(()=>{const u=po(k),f=`calc(-0.5 * (${k} + ${u}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:k},children:r.jsx("div",{ref:De,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:S=>S.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":I,style:{gap:W,"--thumbnail-active-color":N},children:[t.map((S,G)=>{const ue=po(W),Se=`calc(-0.5 * (${ue} + ${W}))`;return r.jsxs("div",{ref:Fe=>{Ye.current[G]=Fe},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":z===G?"true":"false",onClick:()=>ae&&C==="click"&&nn(G),onMouseEnter:()=>$e&&C==="hover"&&nn(G),"aria-label":S.image.name?`View ${S.image.name}`:`View image ${G+1}`,"aria-current":z===G?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Ce?` ${e}-thumb-image-cover`:""}`,src:S.image.url,alt:"",draggable:!1,style:{...be,maxWidth:j,maxHeight:j,width:L.display==="cover"?"auto":"100%",height:"auto",objectFit:L.display==="cover"?"cover":"contain"}})}),o&&G<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Se,width:ue,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${S.image.url}-${G}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:f,height:u,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function wg(e){return`
10228
+ `;function In(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ts={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Km=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Um={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:In("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...ts.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...ts.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:In("Question Padding Left"),questionPaddingTop:In("Question Padding Top"),questionPaddingBottom:In("Question Padding Bottom"),answerPaddingLeft:In("Answer Padding Left"),answerPaddingRight:In("Answer Padding Right"),answerPaddingTop:In("Answer Padding Top"),answerPaddingBottom:In("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...Km],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Xm={element:qm,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:Um,sourceCode:Gm},vn=e=>e.display==="cover",Xo=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},ns=100,Ym=.2,is=8,cl=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=l.useState(0),[a,d]=l.useState(!1),c=l.useRef(null),m=l.useRef(0);m.current=o;const p=l.useMemo(()=>typeof window>"u"?ns:Math.max(ns,window.innerHeight*Ym),[]),x=l.useCallback(v=>Math.max(0,1-v/(p*1.5)),[p]),$=l.useCallback(v=>Math.max(0,1-v/(p*.45)),[p]),w=l.useCallback(v=>{const M=typeof window<"u"?window.innerHeight:800,B=Math.max(.88,1-v/M*.12);return`translateY(${v}px) scale(${B})`},[]),g=l.useCallback(()=>{c.current=null},[]),y=l.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),g()},[n,g]),C=l.useCallback(()=>{const v=typeof window<"u"?window.innerHeight:800;d(!0),s(v),window.setTimeout(()=>{t(),g(),d(!1)},Math.min(n,200))},[n,t,g]),b=l.useCallback(v=>{!e||a||v.pointerType==="touch"&&(i!=null&&i(v.target)||(c.current={startX:v.clientX,startY:v.clientY,isLocked:null,pointerId:v.pointerId}))},[e,a,i]),L=l.useCallback(v=>{const M=c.current;if(!e||!M||v.pointerType!=="touch"||M.pointerId!==v.pointerId)return;const B=v.clientX-M.startX,V=v.clientY-M.startY;if(M.isLocked===null){if(Math.abs(B)<is&&Math.abs(V)<is)return;if(V>0&&V>Math.abs(B))M.isLocked=!0,v.currentTarget.setPointerCapture(v.pointerId);else{M.isLocked=!1,g();return}}if(!M.isLocked)return;v.preventDefault();const te=Math.max(0,V);m.current=te,s(te)},[e,g]),I=l.useCallback(v=>{const M=c.current;if(!e||!M||v.pointerType!=="touch"||M.pointerId!==v.pointerId)return;const B=M.isLocked===!0;if(v.currentTarget.hasPointerCapture(v.pointerId)&&v.currentTarget.releasePointerCapture(v.pointerId),!B){g();return}v.clientY-M.startY>=p?C():y()},[p,C,e,g,y]),N=l.useCallback(v=>{I(v)},[I]),R=l.useCallback(v=>{I(v)},[I]),O=o>0,A=a?`transform ${n}ms ease`:"none",T=a?`opacity ${n}ms ease`:"none",J=o>0||a;return{isSwipeDragging:O,backdropStyle:{opacity:x(o),transition:T},mediaAreaStyle:{transform:w(o),transition:A,touchAction:O?"none":void 0,willChange:O?"transform":void 0},overlayContentStyle:J?{opacity:$(o),transition:T}:void 0,swipeHandlers:e?{onPointerDown:b,onPointerMove:L,onPointerUp:N,onPointerCancel:R}:{},dismissAreaStyle:e?{touchAction:O?"none":"pan-x"}:void 0}},Jm="[data-lightbox-scrollable]",dl=()=>{l.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=d=>{const c=d.target;c instanceof Element&&c.closest(Jm)||d.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},Zm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Qm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},eg=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},tg=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,d=n-a,c=a-n,m=(g,y)=>{Qm(t),e.scrollLeft=g,y&&(s==null||s())};if(Math.abs(d)<.5)return m(n,!0),()=>{};let p=!1,x=0;const $=()=>{t.removeEventListener("transitionend",w),clearTimeout(x)},w=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,$(),m(n,!0))};return t.addEventListener("transitionend",w),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{p||(p=!0,$(),m(n,!0))},i+64),()=>{p||(p=!0,$(),m(a-eg(t),!1))}},Ri=300,ng=900,ig=1500,og="cubic-bezier(0.16, 1, 0.3, 1)",rg=3e3,ag=2,sg=16,lg=.05,cg=1,po=.3,dg=50,ug=20,ti=.004,fi=["title1","title2","title3"],pg={title1:"1",title2:"2",title3:"3"},mg={title1:"title1Color",title2:"title2Color",title3:"title3Color"},gg={title1:.02,title2:.02,title3:.02},mo=e=>`max(${e}, ${ug}px)`,hg=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},fg=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=hg(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,yg=e=>[lt(e,"fontFamily"),lt(e,"fontSettings"),{type:"row",items:[lt(e,"fontSize"),lt(e,"lineHeight"),lt(e,"letterSpacing"),lt(e,"wordSpacing")]},lt(e,"textAlign"),lt(e,"textAppearance")],vg=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(fi.map(e=>[pg[e],yg(e)]))}),ra=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...a]}},{overflow:i-1,widths:[]});return o},ul=(e,t)=>ra(e,t),go=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},os=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ra(e.length,n),effective:ul(e.length,n)}},xg=(e,t,n,i,o,s,a)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),d},fr=(e,t)=>{const n=i=>{const o=lt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[mg[t]]}},bg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),yr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??gg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},wg=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:m,thumbnailMarginBottom:p,imageGap:x,closeIcon:$,closeIconMaxWidth:w,closeIconColor:g,closeIconHoverColor:y,thumbnailTrigger:C,thumbnailVisibility:b,thumbnailObjectFit:L,thumbnailActive:I,thumbnailActiveColor:N,title1Width:R,title2Width:O,title3Width:A,title1MarginLeft:T=0,title2MarginLeft:J=0,title3MarginLeft:v=0,titleRowMarginBottom:M=0,titleHeaderLayout:B="desktop",contentMarginTop:V,iconMarginLeft:te}=n,ce=u=>_.scalingValue(u,i??!1),U=c??n.thumnailSize??.03,j=ce(U),W=ce(m),k=ce(p??.02),E=ce(x??0),q=ce(V??0),Z=mo(q),X=ce(te??0),[z,re]=l.useState(0),h=l.useRef(z);h.current=z;const le=t[z],{title1:ve,title2:he,title3:Re}=fg(le),ee=yr("title1",fr(n,"title1"),i),ge=yr("title2",fr(n,"title2"),i),Y=yr("title3",fr(n,"title3"),i),fe=B==="mobile",ae=!o&&(!i||s),se=ae,ne=ae,$e=ae,Ce=vn(L),be=Ce?{"--image-aspect-ratio":Xo(L)}:void 0,Ie=!!(ve||he||Re),F=l.useMemo(()=>xg(e,ve,he,Re,ee,ge,Y),[e,z,ve,he,Re,ee,ge,Y]),Q=l.useMemo(()=>({title1Width:R,title2Width:O,title3Width:A}),[R,O,A]),P=l.useMemo(()=>F.map(u=>Q[u.widthKey]),[F,Q]),D=l.useMemo(()=>ra(F.length,P),[F.length,P]),G=l.useMemo(()=>ul(F.length,P),[F.length,P]),oe=l.useMemo(()=>F.filter(u=>u.prefix==="title1"),[F]),ie=l.useMemo(()=>F.filter(u=>u.prefix==="title2"||u.prefix==="title3"),[F]),ye=l.useMemo(()=>os(oe,Q),[oe,Q]),Me=l.useMemo(()=>os(ie,Q),[ie,Q]),Te=l.useCallback((u,f)=>{const S=F.indexOf(u);if(!fe||f==="single-row")return{effectiveWidth:G[S]??0,resolvedWidth:D[S]??0,maxWidth:go(S,D)};if(f==="two-row-top"){const ue=oe.indexOf(u);return{effectiveWidth:ye.effective[ue]??0,resolvedWidth:ye.resolved[ue]??0,maxWidth:go(ue,ye.resolved)}}const K=ie.indexOf(u);return{effectiveWidth:Me.effective[K]??0,resolvedWidth:Me.resolved[K]??0,maxWidth:go(K,Me.resolved)}},[ie,Me,G,D,F,oe,ye,fe]),we=l.useCallback(u=>_.scalingValue(u,i??!1),[i]),qe=we(M??0),de=l.useMemo(()=>({title1MarginLeft:T,title2MarginLeft:J,title3MarginLeft:v}),[T,J,v]),ke=l.useCallback(u=>F.slice(0,u+1).reduce((f,S,K)=>f+(S!=null&&S.marginLeftKey?de[S.marginLeftKey]??0:0)+(D[K]??0),0)+(fe?0:T??0),[F,de,D,fe,T]),Ne=l.useCallback(()=>fe?0:T??0,[fe,T]),He=l.useCallback(u=>ie.slice(0,u).reduce((f,S,K)=>f+(S.marginLeftKey?de[S.marginLeftKey]??0:0)+(Me.resolved[K]??0),0),[ie,Me.resolved,de]),dt=l.useCallback(u=>{const f=ie[u];return He(u)+(f.marginLeftKey?de[f.marginLeftKey]??0:0)+(Me.resolved[u]??0)},[ie,Me.resolved,He,de]),ft=(u,f)=>{const S=u.marginLeftKey?de[u.marginLeftKey]??0:0,{effectiveWidth:K,resolvedWidth:ue,maxWidth:Se}=Te(u,f),Fe=o&&f==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":u.prefix,style:{...f==="single-row"?{gridArea:u.prefix}:{},width:we(K),...S>0?{marginLeft:we(S)}:{}},children:[r.jsx("p",{className:u.className,style:u.style,children:u.text}),Fe&&u.marginLeftKey&&r.jsx("div",{"data-controls":u.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ue),style:{position:"absolute",top:0,left:we(-S),width:`max(${we(S)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Fe&&r.jsx("div",{"data-controls":u.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Se),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:we(-ti/2),width:we(ti),height:"100%",pointerEvents:"auto"}})]},u.className)},Et=()=>{const u=fe?-1:F.findIndex(K=>K.prefix==="title1"),f=!fe&&(o||(T??0)>0)?(()=>{const K=T??0,ue=u>=0?D[u]:R??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ue),style:{position:"absolute",top:0,left:0,width:`max(${we(K)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,S=F.flatMap((K,ue)=>{if(!K.marginLeftKey)return[];const Se=de[K.marginLeftKey]??0,Fe=bg(F,D,de,ue)+Ne();return r.jsx("div",{"data-controls":K.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(D[ue]),style:{position:"absolute",top:0,left:we(Fe),width:`max(${we(Se)}, 10px)`,height:"100%",pointerEvents:"auto"}},K.marginLeftKey)});return f?[f,...S]:S},bt=()=>F.map((u,f)=>{const S=go(f,D),ue=ke(f)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":u.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(S),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:we(ue),width:we(ti),height:"100%",pointerEvents:"auto"}})},`${u.widthKey}-junction`)}),wt=()=>ie.flatMap((u,f)=>{if(!u.marginLeftKey)return[];const S=de[u.marginLeftKey]??0,K=He(f),{resolvedWidth:ue}=Te(u,"two-row-bottom");return r.jsx("div",{"data-controls":u.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ue),style:{position:"absolute",top:0,left:we(K),width:`max(${we(S)}, 10px)`,height:"100%",pointerEvents:"auto"}},u.marginLeftKey)}),Ht=()=>ie.map((u,f)=>{const{maxWidth:S}=Te(u,"two-row-bottom"),ue=dt(f)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":u.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(S),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:we(ue),width:we(ti),height:"100%",pointerEvents:"auto"}})},`${u.widthKey}-junction`)}),Lt=l.useRef(null),Xe=l.useRef(null),Ae=l.useRef(null),De=l.useRef(null),Ye=l.useRef([]),Be=l.useRef([]),ut=l.useRef(0),Pt=l.useRef(null),Qe=l.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),At=l.useRef(null),Ot=l.useRef(null),ze=l.useRef(0),gt=l.useRef("forward"),it=l.useRef(0),Ze=l.useRef(null),rt=l.useRef(!1),at=t.length>1&&(!o||!!s),sn=at?3:1,wn=l.useMemo(()=>Array.from({length:sn},()=>t).flat(),[t,sn]),[ln,ot]=l.useState(!1),[tn,Ut]=l.useState(!1),[Ge,yt]=l.useState(!0),vt=l.useRef(null),pe=l.useRef(null),Le=l.useRef(!1),_e=l.useRef(!1),We=l.useRef(null),tt=l.useRef(null),$t=se&&!Ge,Ee=l.useCallback(()=>{se&&(yt(!0),tt.current&&clearTimeout(tt.current),tt.current=setTimeout(()=>{Qe.current.isActive||yt(!1)},rg))},[se]),et=l.useCallback(()=>{o||_e.current||(_e.current=!0,Ut(!1),We.current=setTimeout(()=>{a()},Ri))},[o,a]),Ve=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":$t?"true":"false",style:{width:_.scalingValue(w??0,i),height:_.scalingValue(w??0,i),marginRight:X,"--close-icon-hover-color":y},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:et,"aria-label":"Close",children:r.jsx(Qt,{url:$,fill:g,hoverFill:i&&!s?g:y,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:X,height:"100%",pointerEvents:"auto"}})]}),st=(u="two-row")=>r.jsx("div",{...u==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:we(T??0),flexShrink:0,...u==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...u==="two-row"&&o?{pointerEvents:"auto"}:{}}}),pt=()=>{const u=F.find(K=>K.prefix==="title1"),f=F.filter(K=>K.prefix==="title2"||K.prefix==="title3"),S=f.length>0||o||(M??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(T??0)>0||o?st():null,u&&ft(u,"two-row-top"),$&&Ve()]}),S?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[f.map(K=>ft(K,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[wt(),Ht()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:qe,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},Rt=()=>r.jsxs(r.Fragment,{children:[(T??0)>0||o?st("single-row"):null,F.map(u=>ft(u,"single-row")),o?r.jsxs(r.Fragment,{children:[Et(),bt()]}):null,$?Ve():null]}),Ke=l.useCallback(u=>!!(u.closest("[data-controls]")||u.closest(`.${e}-thumbnails`)||u.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:nt,backdropStyle:It,mediaAreaStyle:St,overlayContentStyle:_t,swipeHandlers:$n,dismissAreaStyle:ht}=cl({enabled:ae??!1,onClose:et,animMs:Ri,isBlockedTarget:Ke}),Bt=()=>{if(!at||t.length===0)return ut.current=0,0;const u=Be.current[0],f=Be.current[t.length];if(!u||!f)return ut.current;const S=f.offsetLeft-u.offsetLeft;return S>0&&(ut.current=S),ut.current},Wt=(u=!1)=>{if(!at)return;const f=Xe.current,S=Bt();!f||S<=0||S<f.clientWidth*.25||(f.scrollLeft<=0?(f.scrollLeft+=S,u&&(Qe.current.scrollLeft+=S),rt.current&&(it.current+=S)):f.scrollLeft>=S*2&&(f.scrollLeft-=S,u&&(Qe.current.scrollLeft-=S),rt.current&&(it.current-=S)))},cn=(u,f=(S=>(S=Xe.current)==null?void 0:S.scrollLeft)()??0)=>{if(!at)return u;let K=t.length+u,ue=1/0;for(let Se=0;Se<sn;Se++){const Fe=Se*t.length+u,Ue=Be.current[Fe];if(!Ue)continue;const Mt=Math.abs(Ue.offsetLeft-f);Mt<ue&&(ue=Mt,K=Fe)}return K},Sn=u=>{const f=Xe.current;return!u||!f?!1:u.offsetWidth>f.clientWidth+1},dn=u=>{const f=Xe.current;if(!u||!f||!Sn(u))return!1;const S=u.offsetLeft,K=S+u.offsetWidth;return f.scrollLeft>=S-1&&f.scrollLeft+f.clientWidth<=K+1},jt=(u=(f=>(f=Xe.current)==null?void 0:f.scrollLeft)()??0)=>{for(let K=0;K<Be.current.length;K+=1){const ue=Be.current[K];if(ue&&dn(ue))return K}let S={flatIndex:0,distance:1/0};return Be.current.forEach((K,ue)=>{if(!K)return;const Se=Math.abs(K.offsetLeft-u);Se<S.distance&&(S={flatIndex:ue,distance:Se})}),S.flatIndex},Cn=u=>{Xe.current&&Be.current.forEach(f=>{f&&(f.style.scrollSnapAlign=Sn(f)&&u==="backward"?"end":"start")})},Yn=(u,f,S)=>{const K=u-f,ue=jt(f),Se=Be.current[ue];if(dn(Se))return jt(u)%t.length;const Fe=Be.current[ue+1],Ue=Se?Fe?Fe.offsetLeft-Se.offsetLeft:Se.offsetWidth:0,Mt=Ue>0?K>Ue*po?1:K<-Ue*po?-1:0:0;return Mt===0?S:at?(S+Mt+t.length)%t.length:Math.max(0,Math.min(t.length-1,S+Mt))},Jn=l.useCallback((u=!1)=>{if(b!=="on"||o)return;const f=De.current,S=h.current,K=Ye.current[S];if(!f||!K||f.scrollWidth<=f.clientWidth)return;const ue=f.scrollLeft,Se=ue+f.clientWidth,Fe=K.offsetLeft,Ue=Fe+K.offsetWidth;if(Fe>=ue&&Ue<=Se)return;const Mt=f.scrollWidth-f.clientWidth;let Ct=ue;if(!u&&vt.current===null){const Qn=Ye.current[S-1],Ci=Ye.current[S+1],no=Qn?K.offsetLeft-Qn.offsetLeft:Ci?Ci.offsetLeft-K.offsetLeft:K.offsetWidth;Ue>Se?Ct+=no:Fe<ue&&(Ct-=no)}else Ue>Se?Ct=Ue-f.clientWidth:Ct=Fe;f.scrollLeft=Math.max(0,Math.min(Mt,Ct))},[o,b]),Si=l.useCallback((u=!1)=>{u&&(Le.current=!0),pe.current===null&&(pe.current=requestAnimationFrame(()=>{pe.current=null;const f=Le.current;Le.current=!1,Jn(f)}))},[Jn]),Zo=l.useCallback(u=>{if(u===h.current)return;const f=h.current;h.current=u;const S=Math.abs(u-f)>1,K=at&&t.length>1&&(f===t.length-1&&u===0||f===0&&u===t.length-1);re(u),Si(S||K)},[t.length,at,Si]),Xt=()=>{if(!Xe.current||t.length===0||vt.current!==null||Qe.current.isActive&&Qe.current.hasMoved)return;const u=Xe.current.scrollLeft,f=jt(u)%t.length;f!==h.current&&Zo(f)},Ji=()=>{vt.current=null},Yt=u=>{const f=Xe.current;f&&(f.style.scrollSnapType=u?"":"none")},un=()=>{var u;(u=Ot.current)==null||u.call(Ot),Ot.current=null},Tn=()=>{Ze.current!==null&&(cancelAnimationFrame(Ze.current),Ze.current=null),rt.current=!1},Wn=()=>{const u=Xe.current;if(!u){Ze.current=null,rt.current=!1;return}const f=it.current-u.scrollLeft;if(Math.abs(f)<.5){u.scrollLeft=it.current,Wt(),Xt(),Ze.current=null,rt.current=!1;return}u.scrollLeft+=f*lg,Wt(),Xt(),Ee(),Ze.current=requestAnimationFrame(Wn)},Nn=()=>{const u=Ae.current;u&&(u.style.transition="",u.style.transform="",u.style.willChange="")},Zi=(u,f,S,K)=>{Nn(),u.scrollLeft=f,ze.current=u.scrollLeft,Wt(),S!==void 0?(h.current=S,re(S)):Xt(),Yt(!0),K==null||K()},Qi=(u,{behavior:f="smooth",activeIndex:S,onComplete:K}={})=>{const ue=Xe.current,Se=Ae.current;if(!ue||!Se)return;if(Tn(),un(),Yt(!1),f==="auto"){Zi(ue,u,S,K);return}const Fe=Math.abs(u-ue.scrollLeft),Ue=Zm(Fe,ng,ig,ue.clientWidth*.55);Ot.current=tg(ue,Se,u,{duration:Ue,easing:og,onComplete:()=>{Ot.current=null,Zi(ue,u,S,K)}})},Qo=(u="smooth")=>{const f=Xe.current;if(!f||t.length===0)return;const S=jt()%t.length,K=cn(S,f.scrollLeft),ue=Be.current[K];ue&&Qi(ue.offsetLeft,{behavior:u,activeIndex:S})},er=(u,f="smooth",S,K)=>{const ue=Xe.current;if(!ue||t.length===0)return;const Se=(K??ue.scrollLeft)-u,Fe=jt(u),Ue=Be.current[Fe];if(dn(Ue)){Yt(!0),Xt();return}const Mt=Be.current[Fe+1],Ct=Ue?Mt?Mt.offsetLeft-Ue.offsetLeft:Ue.offsetWidth:0;if((Ct>0?Se>Ct*po?1:Se<-Ct*po?-1:0:0)!==0){const yl=S??Fe%t.length,vl=Yn(K??ue.scrollLeft,u,yl);nn(vl,f);return}const Ci=K??ue.scrollLeft,no=jt(Ci),la=Be.current[no];if(la&&Math.abs(la.offsetLeft-Ci)<1){Yt(!0),Xt();return}Qo("auto")},nn=(u,f="smooth")=>{const S=Xe.current;if(!S||t.length===0)return;const K=cn(u,S.scrollLeft),ue=Be.current[K];ue&&(f==="smooth"?vt.current=u:vt.current=null,h.current=u,re(u),Si(!0),Qi(ue.offsetLeft,{behavior:f,activeIndex:u,onComplete:f==="smooth"?Ji:void 0}))},Zn=()=>{At.current&&(window.removeEventListener("pointerup",At.current),window.removeEventListener("pointercancel",At.current),At.current=null)},eo=(u,f,S,K,ue)=>{const Se=S-u,Fe=K-f,Ue=Math.abs(Se),Mt=Math.abs(Fe);if(Ue<dg||Ue<=Mt)return!1;const Ct=Se<0?1:-1,Qn=at?(ue+Ct+t.length)%t.length:Math.max(0,Math.min(t.length-1,ue+Ct));return Qn===ue?!1:(nn(Qn),!0)},Hn=u=>{if(!Qe.current.isActive)return;Zn();const f=Xe.current;if(!f)return;const{scrollLeft:S,startActiveIndex:K,hasMoved:ue}=Qe.current,Se=f.scrollLeft;Wt(!0),Qe.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ot(!1),u!==void 0&&f.hasPointerCapture(u)&&f.releasePointerCapture(u),ue?er(S,"smooth",K,Se):(Yt(!0),Xt()),Ee()},to=(u,f)=>{const S=Pt.current;Pt.current=null,S&&(eo(S.startX,S.startY,u,f,S.startActiveIndex),Ee())},tr=u=>{if(!ne)return;if(u.pointerType==="touch"){if(Tn(),Yt(!0),Ke(u.target))return;Pt.current={startX:u.clientX,startY:u.clientY,startActiveIndex:h.current};return}if(u.pointerType!=="mouse"||u.button!==0||Ke(u.target))return;const f=Xe.current;if(!f)return;Tn(),un(),Nn(),vt.current=null,Qe.current={isActive:!0,startX:u.clientX,scrollLeft:f.scrollLeft,startActiveIndex:h.current,hasMoved:!1},Yt(!1),Ee(),f.setPointerCapture(u.pointerId),Zn();const S=K=>{K.pointerType==="mouse"&&Hn(K.pointerId)};At.current=S,window.addEventListener("pointerup",S),window.addEventListener("pointercancel",S)},nr=u=>{if(!ne||u.pointerType!=="mouse")return;const f=Xe.current;if(!f||!Qe.current.isActive)return;if(u.buttons===0){Hn(u.pointerId);return}const S=u.clientX-Qe.current.startX;Math.abs(S)>cg&&(Qe.current.hasMoved=!0,ot(!0)),Qe.current.hasMoved&&(u.preventDefault(),f.scrollLeft=Qe.current.scrollLeft-S,Wt(!0),Xt(),Ee())},H=u=>{if(ne){if(u.pointerType==="touch"){u.type==="pointerup"?to(u.clientX,u.clientY):Pt.current=null;return}u.pointerType==="mouse"&&Hn(u.pointerId)}},me=u=>{!ne||u.pointerType!=="mouse"||Hn(u.pointerId)};return dl(),l.useEffect(()=>{const u=requestAnimationFrame(()=>Ut(!0));return()=>{cancelAnimationFrame(u),un(),Zn(),pe.current!==null&&(cancelAnimationFrame(pe.current),pe.current=null),We.current&&clearTimeout(We.current),tt.current&&clearTimeout(tt.current)}},[]),l.useEffect(()=>{if(!se){yt(!0);return}Ee();const u=Lt.current;if(!u)return;const f=()=>Ee();return u.addEventListener("pointermove",f),u.addEventListener("pointerdown",f),()=>{u.removeEventListener("pointermove",f),u.removeEventListener("pointerdown",f),tt.current&&clearTimeout(tt.current)}},[se,Ee]),l.useEffect(()=>{const u=f=>{f.key==="Escape"&&et()};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[et]),l.useLayoutEffect(()=>{Bt()},[E,t.length,at]),l.useLayoutEffect(()=>{o||nn(h.current,"auto")},[E,o]),l.useLayoutEffect(()=>{nn(0,"auto")},[t.length,at]),l.useEffect(()=>{const u=Xe.current;if(!u||o||!ae)return;const f=S=>{if(S.preventDefault(),Math.abs(S.deltaY)<=Math.abs(S.deltaX))return;const K=S.deltaMode===1?sg:S.deltaMode===2?u.clientHeight:1,ue=S.deltaY*K*ag;if(ue!==0){if(un(),rt.current||(rt.current=!0,it.current=u.scrollLeft,vt.current=null,Yt(!1)),it.current+=ue,!at){const Se=u.scrollWidth-u.clientWidth;it.current=Math.max(0,Math.min(Se,it.current))}Ee(),Ze.current===null&&(Ze.current=requestAnimationFrame(Wn))}};return u.addEventListener("wheel",f,{passive:!1}),()=>{u.removeEventListener("wheel",f),Tn()}},[o,ae,at]),l.useEffect(()=>{const u=Xe.current;if(!u)return;const f=()=>{Wt(Qe.current.isActive);const K=u.scrollLeft,ue=K-ze.current;ze.current=K;const Se=ut.current>0?ut.current*.5:1/0;if(ue!==0&&Math.abs(ue)<Se){const Fe=ue>0?"forward":"backward";Fe!==gt.current&&(gt.current=Fe,Cn(Fe))}Qe.current.isActive&&Qe.current.hasMoved||Xt()};u.addEventListener("scroll",f,{passive:!0});const S=new ResizeObserver(()=>{Bt(),Wt(Qe.current.isActive),Cn(gt.current),Xt()});return S.observe(u),()=>{un(),u.removeEventListener("scroll",f),S.disconnect()}},[t.length,at]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{nt||et()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:tn?1:0,transition:`opacity ${Ri}ms ease`,pointerEvents:tn?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...It}}),r.jsxs("div",{ref:Lt,className:`${e}-lightbox-dismiss-area`,style:ht,...$n,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:St,onClick:u=>u.stopPropagation(),children:r.jsx("div",{ref:Xe,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":ne&&t.length>0?"true":"false","data-mouse-dragging":ln?"true":"false",onPointerDown:tr,onPointerMove:nr,onPointerUp:H,onPointerCancel:H,onLostPointerCapture:me,children:r.jsx("div",{ref:Ae,className:`${e}-lightbox-strip-track`,style:{gap:E},children:wn.map((u,f)=>{const S=u.image.objectFit??"contain",K=f%t.length,ue=Math.floor(f/t.length),Se=mo(E),Fe=`calc(-0.5 * (${Se} + ${E}))`;return r.jsxs("div",{ref:Ue=>Be.current[f]=Ue,className:`${e}-strip-item`,style:{height:B==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:u.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:S}}),o&&K<t.length-1&&ue===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Fe,width:Se,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ue}-${u.image.url}-${K}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":$t?"true":"false",style:_t,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:q,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:Z,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${fe?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ie||$)&&r.jsx("div",{className:`${e}-header ${fe?`${e}-header-two-row`:`${e}-header-single-row`}`,children:fe?pt():Ie||$?Rt():null})})})]}),t.length>1&&b==="on"&&(()=>{const u=mo(k),f=`calc(-0.5 * (${k} + ${u}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:k},children:r.jsx("div",{ref:De,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:S=>S.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":I,style:{gap:W,"--thumbnail-active-color":N},children:[t.map((S,K)=>{const ue=mo(W),Se=`calc(-0.5 * (${ue} + ${W}))`;return r.jsxs("div",{ref:Fe=>{Ye.current[K]=Fe},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":z===K?"true":"false",onClick:()=>ae&&C==="click"&&nn(K),onMouseEnter:()=>$e&&C==="hover"&&nn(K),"aria-label":S.image.name?`View ${S.image.name}`:`View image ${K+1}`,"aria-current":z===K?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Ce?` ${e}-thumb-image-cover`:""}`,src:S.image.url,alt:"",draggable:!1,style:{...be,maxWidth:j,maxHeight:j,width:L.display==="cover"?"auto":"100%",height:"auto",objectFit:L.display==="cover"?"cover":"contain"}})}),o&&K<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Se,width:ue,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${S.image.url}-${K}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:f,height:u,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function $g(e){return`
10229
10229
  .${e}-wrapper {
10230
10230
  position: relative;
10231
10231
  width: 100%;
@@ -10451,7 +10451,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
10451
10451
  background-color: transparent;
10452
10452
  padding: 0;
10453
10453
  opacity: 1;
10454
- transition: opacity ${Pi}ms ease;
10454
+ transition: opacity ${Ri}ms ease;
10455
10455
  }
10456
10456
 
10457
10457
  .${e}-close-icon[data-overlay-content-hidden="true"] {
@@ -10576,7 +10576,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
10576
10576
  display: flex;
10577
10577
  flex-direction: column;
10578
10578
  opacity: 1;
10579
- transition: opacity ${Pi}ms ease;
10579
+ transition: opacity ${Ri}ms ease;
10580
10580
  }
10581
10581
 
10582
10582
  .${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
@@ -10617,7 +10617,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
10617
10617
  pointer-events: auto;
10618
10618
  z-index: 10;
10619
10619
  }
10620
- `}const $g=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=_.useScopedStyles(),{cover:d,coverFit:c}=e,m=l.useRef(null),[p,x]=l.useState(!1),$=t??[],w=p&&$.length>0,g=()=>{$.length!==0&&x(!0)};return l.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:m,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:wg(a)}}),d&&r.jsx("div",{className:`${a}-cover ${vn(c)?`${a}-ratio-wrapper-cover`:`${a}-ratio-wrapper-fit`}`,onClick:()=>g(),style:{...vn(c)?{"--image-aspect-ratio":Uo(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${a}-cover-image ${vn(c)?`${a}-cover-image-cover`:`${a}-cover-image-fit`}`,src:d,alt:"cover"})})]}),w&&typeof document<"u"&&(()=>{const y=(s?document.getElementById(s):null)??document.body;return zi.createPortal(r.jsx(bg,{prefix:a,images:$,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),y)})()]})},Sg=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
10620
+ `}const Sg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=_.useScopedStyles(),{cover:d,coverFit:c}=e,m=l.useRef(null),[p,x]=l.useState(!1),$=t??[],w=p&&$.length>0,g=()=>{$.length!==0&&x(!0)};return l.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:m,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$g(a)}}),d&&r.jsx("div",{className:`${a}-cover ${vn(c)?`${a}-ratio-wrapper-cover`:`${a}-ratio-wrapper-fit`}`,onClick:()=>g(),style:{...vn(c)?{"--image-aspect-ratio":Xo(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${a}-cover-image ${vn(c)?`${a}-cover-image-cover`:`${a}-cover-image-fit`}`,src:d,alt:"cover"})})]}),w&&typeof document<"u"&&(()=>{const y=(s?document.getElementById(s):null)??document.body;return ji.createPortal(r.jsx(wg,{prefix:a,images:$,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),y)})()]})},Cg=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
10621
10621
  import { createPortal } from 'react-dom';
10622
10622
  import { CommonComponentProps } from '../props';
10623
10623
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -11171,7 +11171,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11171
11171
  </>
11172
11172
  );
11173
11173
  };
11174
- `,Cg="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),jn={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 Tg(e){const t={};return t[lt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSettings")]={...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSize")]={...jn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[lt(e,"lineHeight")]={...jn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[lt(e,"letterSpacing")]={...jn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[lt(e,"wordSpacing")]={...jn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[lt(e,"textAlign")]={...jn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[lt(e,"textAppearance")]={...jn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Lg=hi.reduce((e,t)=>({...e,...Tg(t)}),{}),Ig=hi.reduce((e,t)=>({...e,[lt(t,"fontFamily")]:"Goudy Bookletter 1911",[lt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[lt(t,"letterSpacing")]:0,[lt(t,"wordSpacing")]:0,[lt(t,"textAlign")]:"left",[lt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function os(e){return hi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[lt(n,"fontSize")]=i),o!==void 0&&(t[lt(n,"lineHeight")]=o),t},{})}const Eg=yg(),Pg={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{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"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{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"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...Lg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Cg,closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...Ig},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"#FFFFFF",contentMarginTop:.08,iconMarginLeft:.02,...os({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"#FFFFFF",contentMarginTop:.015,iconMarginLeft:.02,...os({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Eg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},Rg={element:$g,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Pg,sourceCode:Sg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...hi.map(e=>({path:`${lt(e,"fontFamily")}`}))]},fontRelations:{...hi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${lt(t,"fontFamily")}`}),{})}},Mg=50,rs=10,ra="cntrl-lightbox-journal",Xo=ra,Pr=`${ra}-`,Yo=e=>`${ra}-${e}`,aa=e=>e===Xo||e.startsWith(Pr),as=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},ss=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=as(t.get(Yo(e)));if(i)return i}const n=as(t.get(Xo));if(n)return n;for(const[i]of t){if(!i.startsWith(Pr))continue;const o=i.slice(Pr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},ls=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},ul=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{aa(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Yo(t),String(e)):i.searchParams.set(Xo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},kg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Yo(e)||i===Xo:aa(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},pl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Yo(e)):[...t.keys()].some(n=>aa(n))},Ag=(e,t)=>{if(pl(t)){if(e){window.history.back();return}kg(t)}},_g=20,Fg=2,yr=e=>`max(${e}, ${_g}px)`,fi=e=>((e==null?void 0:e.image)??[]).slice(0,Fg),ml=e=>e.reduce((t,n)=>t+fi(n).length,0),Wg=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+fi(s).length,1),i=fi(e[t]).length;return{start:n,end:n+i-1}},Ng=(e,t)=>{const n=ml(e),{start:i,end:o}=Wg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Lo=(e,t)=>t==="B"?e.flatMap((n,i)=>fi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:fi(n)})),Hg=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Ng(i,o)},cs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Og=(e,t,n)=>e==="B"?t.length>1:ml(n)>1,ti=.004,go=.004,vr={title1Width:.13,title2Width:.13,title3Width:.14},ho=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Ao=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...a]}},{overflow:i-1,widths:[]});return o},Rr=(e,t)=>Ao(e,t),Dn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},fo=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ao(e.length,n),effective:Rr(e.length,n)}},Bg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),zg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),yi=["title1","title2","title3","count"],ct=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,jg={title1:"1",title2:"2",title3:"3",count:"Count"},Dg=e=>[ct(e,"fontFamily"),ct(e,"fontSettings"),{type:"row",items:[ct(e,"fontSize"),ct(e,"lineHeight"),ct(e,"letterSpacing"),ct(e,"wordSpacing")]},ct(e,"textAlign"),ct(e,"textAppearance")],Vg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(yi.map(e=>[jg[e],Dg(e)]))}),qg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Kg={title1:.02,title2:.02,title3:.02,count:.017},yo=(e,t)=>{const n=i=>{const o=ct(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[qg[t]]}},vo=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Kg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},Gg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:m,onClose:p})=>{const{type:x,coverFit:$,backgroundColor:w,imageGap:g,maxWidth:y,maxHeight:C,textTransition:b,title1Width:L,title2Width:I,title3Width:N,title1MarginLeft:R=0,title2MarginLeft:O=0,title3MarginLeft:A=0,titleRowMarginBottom:T=0,titleHeaderLayout:J="single-row",countCloseGap:v=0,closeIcon:M,closeIconMaxWidth:B,closeIconColor:V,closeIconHoverColor:te,contentMarginTop:ce=0,iconMarginRight:U=0}=n,j=l.useCallback(H=>_.scalingValue(H,i??!1),[i]),W=j(g??0),k=`${y}%`,E=`${C}%`,q=j(v),Z=j(ce),X=j(U),z=vo("title1",yo(n,"title1"),i),re=vo("title2",yo(n,"title2"),i),h=vo("title3",yo(n,"title3"),i),le=vo("count",yo(n,"count"),i),ve=J==="mobile",he=!i||!!s,Re=!o&&(!i||!!s),ee=l.useMemo(()=>Lo(t,x),[t,x]),[ge,Y]=l.useState(a),fe=ee[ge],ae=fe==null?void 0:fe.entry,[se,ne]=l.useState(!1),[$e,Ce]=l.useState(null),[be,Ie]=l.useState(!1),[F,Q]=l.useState(null),[P,D]=l.useState(!1),[K,oe]=l.useState(0),[ie,ye]=l.useState(),[Me,Te]=l.useState(),[we,qe]=l.useState(null),de=l.useRef(null),ke=l.useRef(0),Ne=l.useRef(0),He=l.useRef(0),dt=l.useRef(!1),ft=l.useRef(null),Et=l.useRef(null),bt=l.useRef(null),wt=l.useRef(null),Ht=l.useRef(null),Lt=l.useRef(null),Xe=l.useRef(null),Ae=l.useCallback(()=>{const H=Et.current;if(!H)return;const me=H.closest(`.${e}-lightbox-content-area`);if(!me)return H.getBoundingClientRect().width;const u=Array.from(me.children).reduce((f,S)=>!(S instanceof HTMLElement)||S.contains(H)?f:f+S.getBoundingClientRect().width,0);return me.getBoundingClientRect().width-u},[e]),De=l.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Ye=l.useCallback(H=>{H===ke.current&&(Q(null),D(!1))},[]),Be=l.useCallback(()=>{o||dt.current||(dt.current=!0,m==null||m(),ne(!1),ft.current=setTimeout(()=>{p()},300))},[o,m,p]),ut=l.useCallback(H=>!!(H.closest("[data-controls]")||H.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Pt,backdropStyle:Qe,mediaAreaStyle:At,overlayContentStyle:Ot,swipeHandlers:ze,dismissAreaStyle:gt}=ll({enabled:Re,onClose:Be,animMs:300,isBlockedTarget:ut}),it=l.useCallback(H=>{d&&ul(H+1,c,!0)},[d,c]),Ze=l.useCallback(H=>{if(H)return H.getBoundingClientRect().height},[]),rt=l.useCallback(H=>{if(ee.length===0)return;const me=(H%ee.length+ee.length)%ee.length;if(me===ge)return;const u=ee[ge],f=ee[me];ke.current+=1;const S=ke.current,G=b==="fade"&&cs(u==null?void 0:u.entry)!==cs(f==null?void 0:f.entry),ue=Ze(bt.current),Se=G?(()=>{const Ue=Ae();zi.flushSync(()=>{qe(f.entry)}),bt.current&&Ue&&(bt.current.style.width=`${Ue}px`);const Mt=Ze(bt.current);return bt.current&&(bt.current.style.width=""),{measuredIncomingTitlesHeight:Mt,incomingTitlesMeasureWidth:Ue}})():void 0,Fe=Math.max(ue??0,(Se==null?void 0:Se.measuredIncomingTitlesHeight)??0)||void 0;oe(S),Q(ge),D(!0),Y(me),it(me),He.current=me,G?(De(),Fe&&ye(Fe),Se!=null&&Se.incomingTitlesMeasureWidth&&Te(Se.incomingTitlesMeasureWidth),Ce((u==null?void 0:u.entryIndex)??null),Ie(!0),Ne.current=f.entryIndex,de.current=setTimeout(()=>{Ce(null),Ie(!1),ye(void 0),Te(void 0),qe(null),de.current=null},400)):(De(),Ce(null),Ie(!1),ye(void 0),Te(void 0),qe(null),Ne.current=f.entryIndex)},[ge,De,Ae,Ze,ee,it,b]),at=l.useCallback(()=>{Xe.current=null},[]),sn=l.useCallback(H=>{!he||ee.length<=1||H.pointerType==="mouse"&&H.button!==0||H.target.closest("[data-controls]")||(Xe.current={startX:H.clientX,startY:H.clientY,pointerId:H.pointerId})},[he,ee.length]),wn=l.useCallback(H=>{var Ue;if(!he||ee.length<=1||H.pointerType==="mouse"&&H.button!==0)return;if(Pt){at();return}const me=Xe.current;if(!me||me.pointerId!==H.pointerId||(at(),H.target.closest("[data-controls]")))return;const f=H.clientX-me.startX,S=H.clientY-me.startY,G=Math.abs(f),ue=Math.abs(S);if(G>=Mg&&G>ue){rt(f>0?ge-1:ge+1);return}if(G>rs||ue>rs)return;const Se=(Ue=wt.current)==null?void 0:Ue.getBoundingClientRect(),Fe=Se?Se.left+Se.width/2:window.innerWidth/2;rt(H.clientX<Fe?ge-1:ge+1)},[ge,he,rt,Pt,at,ee.length]),ln=l.useCallback(H=>{const me=Xe.current;(me==null?void 0:me.pointerId)===H.pointerId&&at()},[at]);cl(),l.useEffect(()=>{Lt.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const H=requestAnimationFrame(()=>{ne(!0),requestAnimationFrame(()=>{Ht.current?Ht.current.focus():wt.current&&wt.current.focus()})});return()=>{cancelAnimationFrame(H),ft.current&&clearTimeout(ft.current),de.current&&clearTimeout(de.current);const me=Lt.current;me&&document.contains(me)&&me.focus()}},[]),l.useEffect(()=>{var H;b!=="fade"&&(Ne.current=((H=ee[ge])==null?void 0:H.entryIndex)??0,De(),Ce(null),Ie(!1),ye(void 0),Te(void 0))},[ge,De,ee,b]),l.useEffect(()=>{const H=me=>{if(me.key==="Escape"){Be();return}if(me.key==="ArrowLeft"&&ee.length>1){rt(ge-1);return}if(me.key==="ArrowRight"&&ee.length>1){rt(ge+1);return}if(me.key==="Tab"&&wt.current){const u=wt.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),f=Array.from(u).filter(Se=>!Se.closest('[aria-hidden="true"]'));if(f.length===0)return;const S=f[0],G=f[f.length-1],ue=document.activeElement;me.shiftKey?(ue===S||!wt.current.contains(ue))&&(me.preventDefault(),G.focus()):(ue===G||!wt.current.contains(ue))&&(me.preventDefault(),S.focus())}};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[rt,Be,ge,ee.length]),l.useLayoutEffect(()=>{De(),ke.current=0,oe(0),Q(null),D(!1),Ce(null),Ie(!1),ye(void 0),Te(void 0),qe(null),Y(H=>{const me=Math.max(0,ee.length-1);return Math.min(H,me)})},[De,t.length,x,ee.length]),l.useLayoutEffect(()=>{var u;const H=Math.max(0,ee.length-1),me=Math.min(Math.max(0,a),H);He.current=me,Ne.current=((u=ee[me])==null?void 0:u.entryIndex)??0,Y(me)},[a]);const ot=$e!==null?t[$e]:null,tn=F!==null?ee[F]:null,Ut=(ae==null?void 0:ae.title1)||(ae==null?void 0:ae.title2)||(ae==null?void 0:ae.title3)||(ot==null?void 0:ot.title1)||(ot==null?void 0:ot.title2)||(ot==null?void 0:ot.title3),Ke=Og(x,ee,t),yt=M!==null,vt=Ut||Ke||yt,pe=Ke&&yt?{gap:q}:void 0,Le=`${e}-titles-stack${ve?` ${e}-titles-stack-stacked`:""}`,_e=`${e}-titles-layer-out${ve?` ${e}-titles-layer-out-stacked`:""}`,We=`${e}-titles-layer-out`,tt=(R??0)>0||o,$t=j(T),Ee=l.useMemo(()=>({title1Width:L??vr.title1Width,title2Width:I??vr.title2Width,title3Width:N??vr.title3Width}),[L,I,N]),et=l.useMemo(()=>({title2MarginLeft:O,title3MarginLeft:A}),[O,A]),Ve=l.useMemo(()=>ae?ho(e,ae,z,re,h):[],[e,ae,z,re,h]),st=l.useMemo(()=>Ve.map(H=>Ee[H.widthKey]),[Ve,Ee]),pt=l.useMemo(()=>Ao(Ve.length,st),[Ve.length,st]),Rt=l.useMemo(()=>Rr(Ve.length,st),[Ve.length,st]),Ge=l.useMemo(()=>Ve.filter(H=>H.prefix==="title1"),[Ve]),nt=l.useMemo(()=>Ve.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[Ve]),It=l.useMemo(()=>fo(Ge,Ee),[Ge,Ee]),St=l.useMemo(()=>fo(nt,Ee),[nt,Ee]),_t=l.useCallback((H,me)=>{const u=Ve.findIndex(S=>S.prefix===H.prefix);if(!ve||me==="single-row")return{effectiveWidth:Rt[u]??0,resolvedWidth:pt[u]??0,maxWidth:Dn(u,pt)};if(me==="two-row-top"){const S=Ge.findIndex(G=>G.prefix===H.prefix);return{effectiveWidth:It.effective[S]??0,resolvedWidth:It.resolved[S]??0,maxWidth:Dn(S,It.resolved)}}const f=nt.findIndex(S=>S.prefix===H.prefix);return{effectiveWidth:St.effective[f]??0,resolvedWidth:St.resolved[f]??0,maxWidth:Dn(f,St.resolved)}},[Ve,nt,St,Rt,pt,Ge,It,ve]),$n=l.useCallback(H=>zg(Ve,pt,et,H)+(ve?0:R??0),[Ve,pt,et,ve,R]),ht=l.useCallback(()=>ve?0:R??0,[ve,R]),Bt=l.useCallback(H=>nt.slice(0,H).reduce((me,u,f)=>me+(u.marginLeftKey?et[u.marginLeftKey]??0:0)+(St.resolved[f]??0),0),[nt,St.resolved,et]),Wt=l.useCallback(H=>{const me=nt[H];return Bt(H)+(me.marginLeftKey?et[me.marginLeftKey]??0:0)+(St.resolved[H]??0)},[nt,St.resolved,Bt,et]),cn=l.useCallback((H,me,u)=>{if(!ve||u==="single-row"){const Se=H.findIndex(Ct=>Ct.prefix===me.prefix),Fe=H.map(Ct=>Ee[Ct.widthKey]),Ue=Ao(H.length,Fe);return{effectiveWidth:Rr(H.length,Fe)[Se]??0,resolvedWidth:Ue[Se]??0,maxWidth:Dn(Se,Ue)}}if(u==="two-row-top"){const Se=H.filter(Ct=>Ct.prefix==="title1"),Fe=Se.findIndex(Ct=>Ct.prefix===me.prefix),{resolved:Ue,effective:Mt}=fo(Se,Ee);return{effectiveWidth:Mt[Fe]??0,resolvedWidth:Ue[Fe]??0,maxWidth:Dn(Fe,Ue)}}const f=H.filter(Se=>Se.prefix==="title2"||Se.prefix==="title3"),S=f.findIndex(Se=>Se.prefix===me.prefix),{resolved:G,effective:ue}=fo(f,Ee);return{effectiveWidth:ue[S]??0,resolvedWidth:G[S]??0,maxWidth:Dn(S,G)}},[Ee,ve]),Sn=(H,me,u)=>{const f=H.marginLeftKey?et[H.marginLeftKey]??0:0,{effectiveWidth:S,resolvedWidth:G,maxWidth:ue}=u??_t(H,me),Se=Math.max(f,go),Fe=o&&me==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:j(S),...f>0?{marginLeft:j(f)}:{}},children:[r.jsx("p",{className:H.className,style:H.style,children:H.text}),Fe&&H.marginLeftKey?r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(G),style:{position:"absolute",top:0,left:j(-f),width:j(Se),height:"100%",pointerEvents:"auto"}}):null,Fe?r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:j(-ti/2),width:j(ti),height:"100%",pointerEvents:"auto"}}):null]},H.className)},dn=(H="two-row")=>{const me=Ve.findIndex(S=>S.prefix==="title1"),u=me>=0?pt[me]:Ee.title1Width,f=H==="two-row"&&o;return r.jsx("div",{...f?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(u)}:{},style:{width:j(R??0),flexShrink:0,alignSelf:"stretch",...f?{pointerEvents:"auto"}:{}}})},jt=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:z,"aria-hidden":"true",children:" "}),Cn=()=>r.jsx("span",{className:`${e}-entry-counter`,style:le,"aria-live":"polite","aria-atomic":"true",children:Hg(ee,ge,x,t)}),Xn=()=>Ke?o&&yt?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Cn(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${yr(q)} + ${q}))`,width:yr(q),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Cn():null,Yn=()=>!Ke&&!yt?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:pe,children:[Xn(),yt?Xt():null]}),$i=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ke||Ut?jt():null,tt?dn("single-row"):null,Yt(ae),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Yn(),nn()]}),Jo=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ke||Ut?jt():null,tt?dn("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:be&&ie?{minHeight:ie}:void 0,children:[r.jsx("div",{ref:bt,className:Le,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Wn(we||ae)}),r.jsxs("div",{ref:Et,className:Le,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%",...be&&Me?{width:Me,maxWidth:"100%"}:void 0},children:[ot&&be?r.jsx("div",{className:`${_e} ${e}-titles-fade-out`,children:Wn(ot)}):null,r.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Wn(ae)})]})]}),Yn(),nn()]}),Xt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:_.scalingValue(B??0,i),height:_.scalingValue(B??0,i),marginRight:X,"--close-icon-hover-color":te},children:[r.jsx("button",{ref:Ht,type:"button",className:`${e}-close-icon-inner`,onClick:Be,"aria-label":"Close",children:r.jsx(Qt,{url:M??"",fill:V,hoverFill:i&&!s?V:te,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:X,height:"100%",pointerEvents:"auto"}})]}),Yi=(H,me)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Ke||Ut?jt():null,tt?dn("two-row"):null,me!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:me},children:H}):r.jsxs(r.Fragment,{children:[H,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Yn()]}),Yt=H=>{if(!H)return null;const me=ho(e,H,z,re,h);return r.jsx(r.Fragment,{children:me.map(u=>Sn(u,"single-row",cn(me,u,"single-row")))})},un=H=>{if(!H)return null;const me=ho(e,H,z,re,h),u=me.find(f=>f.prefix==="title1");return u?Sn(u,"two-row-top",cn(me,u,"two-row-top")):null},Tn=(H,me=!1)=>{const u=H?ho(e,H,z,re,h):[],f=u.filter(ue=>ue.prefix==="title2"||ue.prefix==="title3"),S=o&&me;return f.length>0||S||(T??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[f.map(ue=>Sn(ue,"two-row-bottom",cn(u,ue,"two-row-bottom"))),me&&o?r.jsxs(r.Fragment,{children:[Zo(),Qo()]}):null]}):null,(T??0)>0||S?r.jsx("div",{"data-controls":S?"titleRowMarginBottom":void 0,"data-controls-axis":S?"y":void 0,"data-controls-reverse":S?"":void 0,className:S?`${e}-control`:void 0,style:{height:$t,width:"100%",flexShrink:0,pointerEvents:S?"auto":"none"}}):null]}):null},Fn=(H,me=!1)=>r.jsxs(r.Fragment,{children:[Yi(un(H)),Tn(H,me)]}),Wn=H=>ve?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Fn(H)}):H?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Yt(H)}):null,Ji=()=>{const H=ve?-1:Ve.findIndex(f=>f.prefix==="title1"),me=!ve&&(o||(R??0)>0)?(()=>{const f=R??0,S=H>=0?pt[H]:Ee.title1Width,G=Math.max(f,go);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(S),style:{position:"absolute",top:0,left:0,width:j(G),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,u=Ve.flatMap((f,S)=>{if(!f.marginLeftKey)return[];const G=et[f.marginLeftKey]??0,ue=Bg(Ve,pt,et,S)+ht(),Se=Math.max(G,go);return r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pt[S]),style:{position:"absolute",top:0,left:j(ue),width:j(Se),height:"100%",pointerEvents:"auto"}},f.marginLeftKey)});return me?[me,...u]:u},Zi=()=>Ve.map((H,me)=>{const u=Dn(me,pt),S=$n(me)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(u),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:j(S),width:j(ti),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),Zo=()=>nt.flatMap((H,me)=>{if(!H.marginLeftKey)return[];const u=et[H.marginLeftKey]??0,f=Bt(me),S=Math.max(u,go),{resolvedWidth:G}=_t(H,"two-row-bottom");return r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(G),style:{position:"absolute",top:0,left:j(f),width:j(S),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),Qo=()=>nt.map((H,me)=>{const{maxWidth:u}=_t(H,"two-row-bottom"),S=Wt(me)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(u),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:j(S),width:j(ti),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),nn=()=>!o||ve?null:r.jsxs(r.Fragment,{children:[Ji(),Zi()]}),Jn=H=>{const me=!H.objectFit&&vn($);return{className:`${e}-slide-image-cell${me?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:k,maxHeight:E,...me?{"--image-aspect-ratio":Uo($)}:{}}}},Qi=H=>H.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":H.objectFit}}:vn($)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Nn=H=>{if(H.length===0)return null;const me=H.length>1,u=yr(W),f=`calc(-0.5 * (${u} + ${W}))`;if(H.length===1){const S=H[0];return r.jsx("div",{...Jn(S),children:r.jsx("img",{...Qi(S),src:S.url,alt:S.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:me?{gap:W}:void 0,children:H.map((S,G)=>r.jsxs("div",{...Jn(S),children:[r.jsx("img",{...Qi(S),src:S.url,alt:S.name??"",draggable:!1}),o&&me&&G<H.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:f,width:u,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${S.url}-${G}`))})},eo=!!(ae!=null&&ae.title2||ae!=null&&ae.title3||ot!=null&&ot.title2||ot!=null&&ot.title3||(T??0)>0||o),er=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:bt,className:Le,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Fn(we||ae)}),r.jsxs("div",{ref:Et,className:`${e}-titles-row-two-row`,style:{...be&&ie?{minHeight:ie}:void 0,...be&&Me?{width:Me,maxWidth:"100%"}:void 0},children:[Yi(r.jsxs("div",{className:Le,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%"},children:[ot&&be?r.jsx("div",{className:`${We} ${e}-titles-fade-out`,children:un(ot)}):null,r.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:un(ae)})]}),be&&ie?ie:void 0),eo?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ot&&be?r.jsx("div",{className:`${_e} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(ot)}):null,r.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ve?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(ae,!0)})]}):null]})]}),tr=()=>{const H=eo;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...H?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:H?void 0:{flex:"0 0 auto",height:"auto"},children:Fn(ae,!0)}),nn()]})};return r.jsxs("div",{ref:wt,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Pt||Be()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:yt?void 0:-1,style:{opacity:se?1:0,transition:"opacity 300ms ease",pointerEvents:se?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:w,...Qe}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:gt,...ze,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:H=>H.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":he&&ee.length>1?"true":"false",onPointerDown:he?sn:void 0,onPointerUp:he?wn:void 0,onPointerCancel:he?ln:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[tn&&P?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:H=>{H.target===H.currentTarget&&Ye(K)},children:r.jsx("div",{className:`${e}-slide-area`,children:Nn(tn.images)})},`slide-out-${K}`):null,r.jsx("div",{className:`${e}-slide-layer-in${P?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:fe?Nn(fe.images):null})},`slide-in-${K}-${ge}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ot,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:Z,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...ve?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${ve?` ${e}-lightbox-content-area-stacked`:""}`,children:vt&&r.jsx("div",{className:`${e}-text-bar-cell${ve?` ${e}-text-bar-cell-stacked`:""}`,style:ve?void 0:{flex:1,minWidth:0,width:"100%"},children:ve?b==="fade"?er():tr():b==="fade"?Jo():$i()})})})]})]})]})};function Ug(e){return`
11174
+ `,Tg="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Dn={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 Lg(e){const t={};return t[lt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[lt(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[lt(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[lt(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[lt(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[lt(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ig=fi.reduce((e,t)=>({...e,...Lg(t)}),{}),Eg=fi.reduce((e,t)=>({...e,[lt(t,"fontFamily")]:"Goudy Bookletter 1911",[lt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[lt(t,"letterSpacing")]:0,[lt(t,"wordSpacing")]:0,[lt(t,"textAlign")]:"left",[lt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function rs(e){return fi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[lt(n,"fontSize")]=i),o!==void 0&&(t[lt(n,"lineHeight")]=o),t},{})}const Pg=vg(),Rg={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{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"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{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"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...Ig,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Tg,closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...Eg},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"#FFFFFF",contentMarginTop:.08,iconMarginLeft:.02,...rs({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"#FFFFFF",contentMarginTop:.015,iconMarginLeft:.02,...rs({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Pg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},Mg={element:Sg,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Rg,sourceCode:Cg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...fi.map(e=>({path:`${lt(e,"fontFamily")}`}))]},fontRelations:{...fi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${lt(t,"fontFamily")}`}),{})}},kg=50,as=10,aa="cntrl-lightbox-journal",Yo=aa,Rr=`${aa}-`,Jo=e=>`${aa}-${e}`,sa=e=>e===Yo||e.startsWith(Rr),ss=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},ls=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=ss(t.get(Jo(e)));if(i)return i}const n=ss(t.get(Yo));if(n)return n;for(const[i]of t){if(!i.startsWith(Rr))continue;const o=i.slice(Rr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},cs=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},pl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{sa(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Jo(t),String(e)):i.searchParams.set(Yo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Ag=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Jo(e)||i===Yo:sa(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},ml=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Jo(e)):[...t.keys()].some(n=>sa(n))},_g=(e,t)=>{if(ml(t)){if(e){window.history.back();return}Ag(t)}},Fg=20,Wg=2,vr=e=>`max(${e}, ${Fg}px)`,yi=e=>((e==null?void 0:e.image)??[]).slice(0,Wg),gl=e=>e.reduce((t,n)=>t+yi(n).length,0),Ng=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+yi(s).length,1),i=yi(e[t]).length;return{start:n,end:n+i-1}},Hg=(e,t)=>{const n=gl(e),{start:i,end:o}=Ng(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Io=(e,t)=>t==="B"?e.flatMap((n,i)=>yi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:yi(n)})),Og=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Hg(i,o)},ds=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Bg=(e,t,n)=>e==="B"?t.length>1:gl(n)>1,ni=.004,ho=.004,xr={title1Width:.13,title2Width:.13,title3Width:.14},fo=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},_o=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...a]}},{overflow:i-1,widths:[]});return o},Mr=(e,t)=>_o(e,t),Vn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},yo=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:_o(e.length,n),effective:Mr(e.length,n)}},zg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),jg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),vi=["title1","title2","title3","count"],ct=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Dg={title1:"1",title2:"2",title3:"3",count:"Count"},Vg=e=>[ct(e,"fontFamily"),ct(e,"fontSettings"),{type:"row",items:[ct(e,"fontSize"),ct(e,"lineHeight"),ct(e,"letterSpacing"),ct(e,"wordSpacing")]},ct(e,"textAlign"),ct(e,"textAppearance")],qg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(vi.map(e=>[Dg[e],Vg(e)]))}),Gg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Kg={title1:.02,title2:.02,title3:.02,count:.017},vo=(e,t)=>{const n=i=>{const o=ct(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Gg[t]]}},xo=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Kg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},Ug=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:m,onClose:p})=>{const{type:x,coverFit:$,backgroundColor:w,imageGap:g,maxWidth:y,maxHeight:C,textTransition:b,title1Width:L,title2Width:I,title3Width:N,title1MarginLeft:R=0,title2MarginLeft:O=0,title3MarginLeft:A=0,titleRowMarginBottom:T=0,titleHeaderLayout:J="single-row",countCloseGap:v=0,closeIcon:M,closeIconMaxWidth:B,closeIconColor:V,closeIconHoverColor:te,contentMarginTop:ce=0,iconMarginRight:U=0}=n,j=l.useCallback(H=>_.scalingValue(H,i??!1),[i]),W=j(g??0),k=`${y}%`,E=`${C}%`,q=j(v),Z=j(ce),X=j(U),z=xo("title1",vo(n,"title1"),i),re=xo("title2",vo(n,"title2"),i),h=xo("title3",vo(n,"title3"),i),le=xo("count",vo(n,"count"),i),ve=J==="mobile",he=!i||!!s,Re=!o&&(!i||!!s),ee=l.useMemo(()=>Io(t,x),[t,x]),[ge,Y]=l.useState(a),fe=ee[ge],ae=fe==null?void 0:fe.entry,[se,ne]=l.useState(!1),[$e,Ce]=l.useState(null),[be,Ie]=l.useState(!1),[F,Q]=l.useState(null),[P,D]=l.useState(!1),[G,oe]=l.useState(0),[ie,ye]=l.useState(),[Me,Te]=l.useState(),[we,qe]=l.useState(null),de=l.useRef(null),ke=l.useRef(0),Ne=l.useRef(0),He=l.useRef(0),dt=l.useRef(!1),ft=l.useRef(null),Et=l.useRef(null),bt=l.useRef(null),wt=l.useRef(null),Ht=l.useRef(null),Lt=l.useRef(null),Xe=l.useRef(null),Ae=l.useCallback(()=>{const H=Et.current;if(!H)return;const me=H.closest(`.${e}-lightbox-content-area`);if(!me)return H.getBoundingClientRect().width;const u=Array.from(me.children).reduce((f,S)=>!(S instanceof HTMLElement)||S.contains(H)?f:f+S.getBoundingClientRect().width,0);return me.getBoundingClientRect().width-u},[e]),De=l.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Ye=l.useCallback(H=>{H===ke.current&&(Q(null),D(!1))},[]),Be=l.useCallback(()=>{o||dt.current||(dt.current=!0,m==null||m(),ne(!1),ft.current=setTimeout(()=>{p()},300))},[o,m,p]),ut=l.useCallback(H=>!!(H.closest("[data-controls]")||H.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Pt,backdropStyle:Qe,mediaAreaStyle:At,overlayContentStyle:Ot,swipeHandlers:ze,dismissAreaStyle:gt}=cl({enabled:Re,onClose:Be,animMs:300,isBlockedTarget:ut}),it=l.useCallback(H=>{d&&pl(H+1,c,!0)},[d,c]),Ze=l.useCallback(H=>{if(H)return H.getBoundingClientRect().height},[]),rt=l.useCallback(H=>{if(ee.length===0)return;const me=(H%ee.length+ee.length)%ee.length;if(me===ge)return;const u=ee[ge],f=ee[me];ke.current+=1;const S=ke.current,K=b==="fade"&&ds(u==null?void 0:u.entry)!==ds(f==null?void 0:f.entry),ue=Ze(bt.current),Se=K?(()=>{const Ue=Ae();ji.flushSync(()=>{qe(f.entry)}),bt.current&&Ue&&(bt.current.style.width=`${Ue}px`);const Mt=Ze(bt.current);return bt.current&&(bt.current.style.width=""),{measuredIncomingTitlesHeight:Mt,incomingTitlesMeasureWidth:Ue}})():void 0,Fe=Math.max(ue??0,(Se==null?void 0:Se.measuredIncomingTitlesHeight)??0)||void 0;oe(S),Q(ge),D(!0),Y(me),it(me),He.current=me,K?(De(),Fe&&ye(Fe),Se!=null&&Se.incomingTitlesMeasureWidth&&Te(Se.incomingTitlesMeasureWidth),Ce((u==null?void 0:u.entryIndex)??null),Ie(!0),Ne.current=f.entryIndex,de.current=setTimeout(()=>{Ce(null),Ie(!1),ye(void 0),Te(void 0),qe(null),de.current=null},400)):(De(),Ce(null),Ie(!1),ye(void 0),Te(void 0),qe(null),Ne.current=f.entryIndex)},[ge,De,Ae,Ze,ee,it,b]),at=l.useCallback(()=>{Xe.current=null},[]),sn=l.useCallback(H=>{!he||ee.length<=1||H.pointerType==="mouse"&&H.button!==0||H.target.closest("[data-controls]")||(Xe.current={startX:H.clientX,startY:H.clientY,pointerId:H.pointerId})},[he,ee.length]),wn=l.useCallback(H=>{var Ue;if(!he||ee.length<=1||H.pointerType==="mouse"&&H.button!==0)return;if(Pt){at();return}const me=Xe.current;if(!me||me.pointerId!==H.pointerId||(at(),H.target.closest("[data-controls]")))return;const f=H.clientX-me.startX,S=H.clientY-me.startY,K=Math.abs(f),ue=Math.abs(S);if(K>=kg&&K>ue){rt(f>0?ge-1:ge+1);return}if(K>as||ue>as)return;const Se=(Ue=wt.current)==null?void 0:Ue.getBoundingClientRect(),Fe=Se?Se.left+Se.width/2:window.innerWidth/2;rt(H.clientX<Fe?ge-1:ge+1)},[ge,he,rt,Pt,at,ee.length]),ln=l.useCallback(H=>{const me=Xe.current;(me==null?void 0:me.pointerId)===H.pointerId&&at()},[at]);dl(),l.useEffect(()=>{Lt.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const H=requestAnimationFrame(()=>{ne(!0),requestAnimationFrame(()=>{Ht.current?Ht.current.focus():wt.current&&wt.current.focus()})});return()=>{cancelAnimationFrame(H),ft.current&&clearTimeout(ft.current),de.current&&clearTimeout(de.current);const me=Lt.current;me&&document.contains(me)&&me.focus()}},[]),l.useEffect(()=>{var H;b!=="fade"&&(Ne.current=((H=ee[ge])==null?void 0:H.entryIndex)??0,De(),Ce(null),Ie(!1),ye(void 0),Te(void 0))},[ge,De,ee,b]),l.useEffect(()=>{const H=me=>{if(me.key==="Escape"){Be();return}if(me.key==="ArrowLeft"&&ee.length>1){rt(ge-1);return}if(me.key==="ArrowRight"&&ee.length>1){rt(ge+1);return}if(me.key==="Tab"&&wt.current){const u=wt.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),f=Array.from(u).filter(Se=>!Se.closest('[aria-hidden="true"]'));if(f.length===0)return;const S=f[0],K=f[f.length-1],ue=document.activeElement;me.shiftKey?(ue===S||!wt.current.contains(ue))&&(me.preventDefault(),K.focus()):(ue===K||!wt.current.contains(ue))&&(me.preventDefault(),S.focus())}};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[rt,Be,ge,ee.length]),l.useLayoutEffect(()=>{De(),ke.current=0,oe(0),Q(null),D(!1),Ce(null),Ie(!1),ye(void 0),Te(void 0),qe(null),Y(H=>{const me=Math.max(0,ee.length-1);return Math.min(H,me)})},[De,t.length,x,ee.length]),l.useLayoutEffect(()=>{var u;const H=Math.max(0,ee.length-1),me=Math.min(Math.max(0,a),H);He.current=me,Ne.current=((u=ee[me])==null?void 0:u.entryIndex)??0,Y(me)},[a]);const ot=$e!==null?t[$e]:null,tn=F!==null?ee[F]:null,Ut=(ae==null?void 0:ae.title1)||(ae==null?void 0:ae.title2)||(ae==null?void 0:ae.title3)||(ot==null?void 0:ot.title1)||(ot==null?void 0:ot.title2)||(ot==null?void 0:ot.title3),Ge=Bg(x,ee,t),yt=M!==null,vt=Ut||Ge||yt,pe=Ge&&yt?{gap:q}:void 0,Le=`${e}-titles-stack${ve?` ${e}-titles-stack-stacked`:""}`,_e=`${e}-titles-layer-out${ve?` ${e}-titles-layer-out-stacked`:""}`,We=`${e}-titles-layer-out`,tt=(R??0)>0||o,$t=j(T),Ee=l.useMemo(()=>({title1Width:L??xr.title1Width,title2Width:I??xr.title2Width,title3Width:N??xr.title3Width}),[L,I,N]),et=l.useMemo(()=>({title2MarginLeft:O,title3MarginLeft:A}),[O,A]),Ve=l.useMemo(()=>ae?fo(e,ae,z,re,h):[],[e,ae,z,re,h]),st=l.useMemo(()=>Ve.map(H=>Ee[H.widthKey]),[Ve,Ee]),pt=l.useMemo(()=>_o(Ve.length,st),[Ve.length,st]),Rt=l.useMemo(()=>Mr(Ve.length,st),[Ve.length,st]),Ke=l.useMemo(()=>Ve.filter(H=>H.prefix==="title1"),[Ve]),nt=l.useMemo(()=>Ve.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[Ve]),It=l.useMemo(()=>yo(Ke,Ee),[Ke,Ee]),St=l.useMemo(()=>yo(nt,Ee),[nt,Ee]),_t=l.useCallback((H,me)=>{const u=Ve.findIndex(S=>S.prefix===H.prefix);if(!ve||me==="single-row")return{effectiveWidth:Rt[u]??0,resolvedWidth:pt[u]??0,maxWidth:Vn(u,pt)};if(me==="two-row-top"){const S=Ke.findIndex(K=>K.prefix===H.prefix);return{effectiveWidth:It.effective[S]??0,resolvedWidth:It.resolved[S]??0,maxWidth:Vn(S,It.resolved)}}const f=nt.findIndex(S=>S.prefix===H.prefix);return{effectiveWidth:St.effective[f]??0,resolvedWidth:St.resolved[f]??0,maxWidth:Vn(f,St.resolved)}},[Ve,nt,St,Rt,pt,Ke,It,ve]),$n=l.useCallback(H=>jg(Ve,pt,et,H)+(ve?0:R??0),[Ve,pt,et,ve,R]),ht=l.useCallback(()=>ve?0:R??0,[ve,R]),Bt=l.useCallback(H=>nt.slice(0,H).reduce((me,u,f)=>me+(u.marginLeftKey?et[u.marginLeftKey]??0:0)+(St.resolved[f]??0),0),[nt,St.resolved,et]),Wt=l.useCallback(H=>{const me=nt[H];return Bt(H)+(me.marginLeftKey?et[me.marginLeftKey]??0:0)+(St.resolved[H]??0)},[nt,St.resolved,Bt,et]),cn=l.useCallback((H,me,u)=>{if(!ve||u==="single-row"){const Se=H.findIndex(Ct=>Ct.prefix===me.prefix),Fe=H.map(Ct=>Ee[Ct.widthKey]),Ue=_o(H.length,Fe);return{effectiveWidth:Mr(H.length,Fe)[Se]??0,resolvedWidth:Ue[Se]??0,maxWidth:Vn(Se,Ue)}}if(u==="two-row-top"){const Se=H.filter(Ct=>Ct.prefix==="title1"),Fe=Se.findIndex(Ct=>Ct.prefix===me.prefix),{resolved:Ue,effective:Mt}=yo(Se,Ee);return{effectiveWidth:Mt[Fe]??0,resolvedWidth:Ue[Fe]??0,maxWidth:Vn(Fe,Ue)}}const f=H.filter(Se=>Se.prefix==="title2"||Se.prefix==="title3"),S=f.findIndex(Se=>Se.prefix===me.prefix),{resolved:K,effective:ue}=yo(f,Ee);return{effectiveWidth:ue[S]??0,resolvedWidth:K[S]??0,maxWidth:Vn(S,K)}},[Ee,ve]),Sn=(H,me,u)=>{const f=H.marginLeftKey?et[H.marginLeftKey]??0:0,{effectiveWidth:S,resolvedWidth:K,maxWidth:ue}=u??_t(H,me),Se=Math.max(f,ho),Fe=o&&me==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:j(S),...f>0?{marginLeft:j(f)}:{}},children:[r.jsx("p",{className:H.className,style:H.style,children:H.text}),Fe&&H.marginLeftKey?r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(K),style:{position:"absolute",top:0,left:j(-f),width:j(Se),height:"100%",pointerEvents:"auto"}}):null,Fe?r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:j(-ni/2),width:j(ni),height:"100%",pointerEvents:"auto"}}):null]},H.className)},dn=(H="two-row")=>{const me=Ve.findIndex(S=>S.prefix==="title1"),u=me>=0?pt[me]:Ee.title1Width,f=H==="two-row"&&o;return r.jsx("div",{...f?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(u)}:{},style:{width:j(R??0),flexShrink:0,alignSelf:"stretch",...f?{pointerEvents:"auto"}:{}}})},jt=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:z,"aria-hidden":"true",children:" "}),Cn=()=>r.jsx("span",{className:`${e}-entry-counter`,style:le,"aria-live":"polite","aria-atomic":"true",children:Og(ee,ge,x,t)}),Yn=()=>Ge?o&&yt?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Cn(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${vr(q)} + ${q}))`,width:vr(q),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Cn():null,Jn=()=>!Ge&&!yt?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:pe,children:[Yn(),yt?Xt():null]}),Si=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ge||Ut?jt():null,tt?dn("single-row"):null,Yt(ae),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Jn(),nn()]}),Zo=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ge||Ut?jt():null,tt?dn("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:be&&ie?{minHeight:ie}:void 0,children:[r.jsx("div",{ref:bt,className:Le,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Nn(we||ae)}),r.jsxs("div",{ref:Et,className:Le,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%",...be&&Me?{width:Me,maxWidth:"100%"}:void 0},children:[ot&&be?r.jsx("div",{className:`${_e} ${e}-titles-fade-out`,children:Nn(ot)}):null,r.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Nn(ae)})]})]}),Jn(),nn()]}),Xt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:_.scalingValue(B??0,i),height:_.scalingValue(B??0,i),marginRight:X,"--close-icon-hover-color":te},children:[r.jsx("button",{ref:Ht,type:"button",className:`${e}-close-icon-inner`,onClick:Be,"aria-label":"Close",children:r.jsx(Qt,{url:M??"",fill:V,hoverFill:i&&!s?V:te,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:X,height:"100%",pointerEvents:"auto"}})]}),Ji=(H,me)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Ge||Ut?jt():null,tt?dn("two-row"):null,me!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:me},children:H}):r.jsxs(r.Fragment,{children:[H,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Jn()]}),Yt=H=>{if(!H)return null;const me=fo(e,H,z,re,h);return r.jsx(r.Fragment,{children:me.map(u=>Sn(u,"single-row",cn(me,u,"single-row")))})},un=H=>{if(!H)return null;const me=fo(e,H,z,re,h),u=me.find(f=>f.prefix==="title1");return u?Sn(u,"two-row-top",cn(me,u,"two-row-top")):null},Tn=(H,me=!1)=>{const u=H?fo(e,H,z,re,h):[],f=u.filter(ue=>ue.prefix==="title2"||ue.prefix==="title3"),S=o&&me;return f.length>0||S||(T??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[f.map(ue=>Sn(ue,"two-row-bottom",cn(u,ue,"two-row-bottom"))),me&&o?r.jsxs(r.Fragment,{children:[Qo(),er()]}):null]}):null,(T??0)>0||S?r.jsx("div",{"data-controls":S?"titleRowMarginBottom":void 0,"data-controls-axis":S?"y":void 0,"data-controls-reverse":S?"":void 0,className:S?`${e}-control`:void 0,style:{height:$t,width:"100%",flexShrink:0,pointerEvents:S?"auto":"none"}}):null]}):null},Wn=(H,me=!1)=>r.jsxs(r.Fragment,{children:[Ji(un(H)),Tn(H,me)]}),Nn=H=>ve?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Wn(H)}):H?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Yt(H)}):null,Zi=()=>{const H=ve?-1:Ve.findIndex(f=>f.prefix==="title1"),me=!ve&&(o||(R??0)>0)?(()=>{const f=R??0,S=H>=0?pt[H]:Ee.title1Width,K=Math.max(f,ho);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(S),style:{position:"absolute",top:0,left:0,width:j(K),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,u=Ve.flatMap((f,S)=>{if(!f.marginLeftKey)return[];const K=et[f.marginLeftKey]??0,ue=zg(Ve,pt,et,S)+ht(),Se=Math.max(K,ho);return r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pt[S]),style:{position:"absolute",top:0,left:j(ue),width:j(Se),height:"100%",pointerEvents:"auto"}},f.marginLeftKey)});return me?[me,...u]:u},Qi=()=>Ve.map((H,me)=>{const u=Vn(me,pt),S=$n(me)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(u),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:j(S),width:j(ni),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),Qo=()=>nt.flatMap((H,me)=>{if(!H.marginLeftKey)return[];const u=et[H.marginLeftKey]??0,f=Bt(me),S=Math.max(u,ho),{resolvedWidth:K}=_t(H,"two-row-bottom");return r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(K),style:{position:"absolute",top:0,left:j(f),width:j(S),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),er=()=>nt.map((H,me)=>{const{maxWidth:u}=_t(H,"two-row-bottom"),S=Wt(me)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(u),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:j(S),width:j(ni),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),nn=()=>!o||ve?null:r.jsxs(r.Fragment,{children:[Zi(),Qi()]}),Zn=H=>{const me=!H.objectFit&&vn($);return{className:`${e}-slide-image-cell${me?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:k,maxHeight:E,...me?{"--image-aspect-ratio":Xo($)}:{}}}},eo=H=>H.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":H.objectFit}}:vn($)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Hn=H=>{if(H.length===0)return null;const me=H.length>1,u=vr(W),f=`calc(-0.5 * (${u} + ${W}))`;if(H.length===1){const S=H[0];return r.jsx("div",{...Zn(S),children:r.jsx("img",{...eo(S),src:S.url,alt:S.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:me?{gap:W}:void 0,children:H.map((S,K)=>r.jsxs("div",{...Zn(S),children:[r.jsx("img",{...eo(S),src:S.url,alt:S.name??"",draggable:!1}),o&&me&&K<H.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:f,width:u,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${S.url}-${K}`))})},to=!!(ae!=null&&ae.title2||ae!=null&&ae.title3||ot!=null&&ot.title2||ot!=null&&ot.title3||(T??0)>0||o),tr=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:bt,className:Le,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Wn(we||ae)}),r.jsxs("div",{ref:Et,className:`${e}-titles-row-two-row`,style:{...be&&ie?{minHeight:ie}:void 0,...be&&Me?{width:Me,maxWidth:"100%"}:void 0},children:[Ji(r.jsxs("div",{className:Le,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%"},children:[ot&&be?r.jsx("div",{className:`${We} ${e}-titles-fade-out`,children:un(ot)}):null,r.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:un(ae)})]}),be&&ie?ie:void 0),to?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ot&&be?r.jsx("div",{className:`${_e} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(ot)}):null,r.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ve?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(ae,!0)})]}):null]})]}),nr=()=>{const H=to;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...H?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:H?void 0:{flex:"0 0 auto",height:"auto"},children:Wn(ae,!0)}),nn()]})};return r.jsxs("div",{ref:wt,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Pt||Be()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:yt?void 0:-1,style:{opacity:se?1:0,transition:"opacity 300ms ease",pointerEvents:se?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:w,...Qe}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:gt,...ze,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:H=>H.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":he&&ee.length>1?"true":"false",onPointerDown:he?sn:void 0,onPointerUp:he?wn:void 0,onPointerCancel:he?ln:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[tn&&P?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:H=>{H.target===H.currentTarget&&Ye(G)},children:r.jsx("div",{className:`${e}-slide-area`,children:Hn(tn.images)})},`slide-out-${G}`):null,r.jsx("div",{className:`${e}-slide-layer-in${P?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:fe?Hn(fe.images):null})},`slide-in-${G}-${ge}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ot,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:Z,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...ve?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${ve?` ${e}-lightbox-content-area-stacked`:""}`,children:vt&&r.jsx("div",{className:`${e}-text-bar-cell${ve?` ${e}-text-bar-cell-stacked`:""}`,style:ve?void 0:{flex:1,minWidth:0,width:"100%"},children:ve?b==="fade"?tr():nr():b==="fade"?Zo():Si()})})})]})]})]})};function Xg(e){return`
11175
11175
  .${e}-wrapper {
11176
11176
  position: relative;
11177
11177
  width: 100%;
@@ -11705,7 +11705,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11705
11705
  pointer-events: auto;
11706
11706
  z-index: 10;
11707
11707
  }
11708
- `}const Xg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:d}=_.useScopedStyles(),c=(a==null?void 0:a.itemId)??null,{cover:m,coverFit:p,type:x}=e,$=l.useRef(null),[w,g]=l.useState(!1),[y,C]=l.useState(0),b=l.useRef(!1),L=l.useRef(!1),I=l.useRef(!1),N=l.useMemo(()=>(t??[]).filter(v=>fi(v).length>0),[t]),R=w&&N.length>0,O=!n,A=l.useCallback(()=>{O&&(I.current=!0,Ag(L.current,c),L.current=!1)},[O,c]),T=(v=0)=>{if(N.length===0||n&&!i&&!o)return;const M=Lo(N,x),B=Math.max(0,Math.min(v,M.length-1));if(C(B),O){const V=pl();ul(B+1,c,V),L.current=!V}g(!0)},J=l.useCallback(()=>{g(!1),I.current=!1},[]);return l.useEffect(()=>{!n||i||o||g(!1)},[n,i,o]),l.useEffect(()=>{if(!O||b.current)return;b.current=!0;const v=ss(c);if(!v)return;const M=ls(v,Lo(N,x).length);M<0||(C(M),g(!0))},[N,c,O,x]),l.useEffect(()=>{if(!O)return;const v=()=>{if(I.current){I.current=!1,g(!1);return}const M=ss(c);if(!M){g(!1);return}const B=ls(M,Lo(N,x).length);if(B<0){g(!1);return}L.current=!1,C(B),g(!0)};return window.addEventListener("popstate",v),()=>window.removeEventListener("popstate",v)},[N,c,O,x]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:$,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ug(d)}}),m?r.jsx("button",{type:"button",className:`${d}-cover ${vn(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>T(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...vn(p)?{"--image-aspect-ratio":Uo(p)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${vn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:m,alt:"cover"})}):null]}),R&&typeof document<"u"&&(()=>{const v=(s?document.getElementById(s):null)??document.body;return zi.createPortal(r.jsx(Gg,{prefix:d,entries:N,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:y,enableUrlSync:O,journalItemId:c,onBeforeClose:A,onClose:J}),v)})()]})},Yg=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
11708
+ `}const Yg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:d}=_.useScopedStyles(),c=(a==null?void 0:a.itemId)??null,{cover:m,coverFit:p,type:x}=e,$=l.useRef(null),[w,g]=l.useState(!1),[y,C]=l.useState(0),b=l.useRef(!1),L=l.useRef(!1),I=l.useRef(!1),N=l.useMemo(()=>(t??[]).filter(v=>yi(v).length>0),[t]),R=w&&N.length>0,O=!n,A=l.useCallback(()=>{O&&(I.current=!0,_g(L.current,c),L.current=!1)},[O,c]),T=(v=0)=>{if(N.length===0||n&&!i&&!o)return;const M=Io(N,x),B=Math.max(0,Math.min(v,M.length-1));if(C(B),O){const V=ml();pl(B+1,c,V),L.current=!V}g(!0)},J=l.useCallback(()=>{g(!1),I.current=!1},[]);return l.useEffect(()=>{!n||i||o||g(!1)},[n,i,o]),l.useEffect(()=>{if(!O||b.current)return;b.current=!0;const v=ls(c);if(!v)return;const M=cs(v,Io(N,x).length);M<0||(C(M),g(!0))},[N,c,O,x]),l.useEffect(()=>{if(!O)return;const v=()=>{if(I.current){I.current=!1,g(!1);return}const M=ls(c);if(!M){g(!1);return}const B=cs(M,Io(N,x).length);if(B<0){g(!1);return}L.current=!1,C(B),g(!0)};return window.addEventListener("popstate",v),()=>window.removeEventListener("popstate",v)},[N,c,O,x]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:$,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Xg(d)}}),m?r.jsx("button",{type:"button",className:`${d}-cover ${vn(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>T(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...vn(p)?{"--image-aspect-ratio":Xo(p)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${vn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:m,alt:"cover"})}):null]}),R&&typeof document<"u"&&(()=>{const v=(s?document.getElementById(s):null)??document.body;return ji.createPortal(r.jsx(Ug,{prefix:d,entries:N,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:y,enableUrlSync:O,journalItemId:c,onBeforeClose:A,onClose:J}),v)})()]})},Jg=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
11709
11709
  import { createPortal } from 'react-dom';
11710
11710
  import { CommonComponentProps } from '../props';
11711
11711
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -12473,7 +12473,7 @@ export type LightboxJournalSettings = {
12473
12473
  closeIconColor: string;
12474
12474
  closeIconHoverColor: string;
12475
12475
  };
12476
- `,Jg="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Vn={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 Zg(e){const t={};return t[ct(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSettings")]={...Vn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSize")]={...Vn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ct(e,"lineHeight")]={...Vn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ct(e,"letterSpacing")]={...Vn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ct(e,"wordSpacing")]={...Vn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ct(e,"textAlign")]={...Vn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ct(e,"textAppearance")]={...Vn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Qg=yi.reduce((e,t)=>({...e,...Zg(t)}),{}),eh=yi.reduce((e,t)=>({...e,[ct(t,"fontFamily")]:"Goudy Bookletter 1911",[ct(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ct(t,"letterSpacing")]:0,[ct(t,"wordSpacing")]:0,[ct(t,"textAlign")]:"left",[ct(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ds(e){return yi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ct(n,"fontSize")]=i),o!==void 0&&(t[ct(n,"lineHeight")]=o),t},{})}const th=Vg(),nh={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{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"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...Qg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Jg,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...eh,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...ds({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...ds({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[th]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Dorothy Manners & Julanne Johnston",title2:"by Evans Studio",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Inez Nadeau",title2:"Melbourne Spurr",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_4.jpg",name:"",objectFit:"contain"}]},{title1:"Colleen Moore",title2:"Clarence S. Bull",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Gloria Swanson",title2:"Donald Biddle Keyes",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_6.jpg",name:"",objectFit:"contain"}]}]}},ih={element:Xg,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:nh,sourceCode:Yg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...yi.map(e=>({path:`${ct(e,"fontFamily")}`}))]},fontRelations:{...yi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ct(t,"fontFamily")}`}),{})}},oh={sizeType:"custom",value:700,min:400,max:700};function _o(e,t){return{widthPx:e,heightPx:e*t}}function Mr(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function us(e,t,n,i){const{heightPx:o}=_o(n,i);return Mr(e/2,t/2,e,t,n,o)}function gl(e,t,n){for(const i of n){const{heightPx:o}=_o(i.widthPx,i.aspectRatio),s=i.widthPx/2,a=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-a&&t<=i.y+a)return!0}return!1}function rh(e,t,n,i,o,s,a,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),m=document.elementFromPoint(c.left+e,c.top+t);return m&&m.closest("a")?"none":gl(e,t,n)||s==="area"?a??"none":d??"none"}function ps(e,t,n){var d;const{sizeType:i,value:o,min:s,max:a}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(a-s)+s)}function ah(e){return`
12476
+ `,Zg="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),qn={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 Qg(e){const t={};return t[ct(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSettings")]={...qn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSize")]={...qn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ct(e,"lineHeight")]={...qn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ct(e,"letterSpacing")]={...qn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ct(e,"wordSpacing")]={...qn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ct(e,"textAlign")]={...qn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ct(e,"textAppearance")]={...qn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const eh=vi.reduce((e,t)=>({...e,...Qg(t)}),{}),th=vi.reduce((e,t)=>({...e,[ct(t,"fontFamily")]:"Goudy Bookletter 1911",[ct(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ct(t,"letterSpacing")]:0,[ct(t,"wordSpacing")]:0,[ct(t,"textAlign")]:"left",[ct(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function us(e){return vi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ct(n,"fontSize")]=i),o!==void 0&&(t[ct(n,"lineHeight")]=o),t},{})}const nh=qg(),ih={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{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"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...eh,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Zg,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...th,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...us({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...us({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[nh]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Dorothy Manners & Julanne Johnston",title2:"by Evans Studio",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Inez Nadeau",title2:"Melbourne Spurr",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_4.jpg",name:"",objectFit:"contain"}]},{title1:"Colleen Moore",title2:"Clarence S. Bull",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Gloria Swanson",title2:"Donald Biddle Keyes",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_6.jpg",name:"",objectFit:"contain"}]}]}},oh={element:Yg,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:ih,sourceCode:Jg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...vi.map(e=>({path:`${ct(e,"fontFamily")}`}))]},fontRelations:{...vi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ct(t,"fontFamily")}`}),{})}},rh={sizeType:"custom",value:700,min:400,max:700};function Fo(e,t){return{widthPx:e,heightPx:e*t}}function kr(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function ps(e,t,n,i){const{heightPx:o}=Fo(n,i);return kr(e/2,t/2,e,t,n,o)}function hl(e,t,n){for(const i of n){const{heightPx:o}=Fo(i.widthPx,i.aspectRatio),s=i.widthPx/2,a=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-a&&t<=i.y+a)return!0}return!1}function ah(e,t,n,i,o,s,a,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),m=document.elementFromPoint(c.left+e,c.top+t);return m&&m.closest("a")?"none":hl(e,t,n)||s==="area"?a??"none":d??"none"}function ms(e,t,n){var d;const{sizeType:i,value:o,min:s,max:a}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(a-s)+s)}function sh(e){return`
12477
12477
  .${e}-root {
12478
12478
  position: absolute;
12479
12479
  top: 0;
@@ -12508,7 +12508,7 @@ export type LightboxJournalSettings = {
12508
12508
  width: 32px;
12509
12509
  height: 32px;
12510
12510
  }
12511
- `}function sh(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function lh(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await sh(i)]));return new Map(n)}function ch({settings:e,content:t=[],isEditor:n}){const{prefix:i}=_.useScopedStyles(),[o,s]=l.useState(null),[a,d]=l.useState([]),[c,m]=l.useState(0),p=l.useRef(0),[x,$]=l.useState({x:0,y:0}),[w,g]=l.useState("none"),y=l.useRef({x:0,y:0}),[C,b]=l.useState(!1),[L,I]=l.useState(!1),N=l.useRef(new Map),{imageSize:R=oh,cursor:O="system",target:A="area",position:T="random",visible:J="all",defaultCursor:v=null,hoverCursor:M=null}=e,B=l.useMemo(()=>ah(i),[i]),V=l.useCallback((W,k,E=a)=>{if(!o)return;const q=o.getBoundingClientRect(),Z=W-q.left,X=k-q.top;$({x:Z,y:X}),g(rh(Z,X,E,o,O,A,M,v))},[o,a,O,A,M,v]);l.useEffect(()=>{const W=[...t.map(E=>E.image.url),v,M].filter(E=>!!E);if(W.length===0){N.current=new Map,I(!0);return}let k=!1;return I(!1),lh(W).then(E=>{k||(N.current=E,I(!0))}),()=>{k=!0}},[t,v,M]),l.useEffect(()=>{if(!o)return;const W=E=>{E.stopPropagation(),y.current={x:E.clientX,y:E.clientY},V(E.clientX,E.clientY)},k=()=>{C&&V(y.current.x,y.current.y)};return o.addEventListener("mousemove",W),window.addEventListener("scroll",k,!0),()=>{o.removeEventListener("mousemove",W),window.removeEventListener("scroll",k,!0)}},[o,C,V]),l.useEffect(()=>{!o||!C||V(y.current.x,y.current.y)},[a,o,C,V]),l.useEffect(()=>{C||g("none")},[C]);const te=(W,k,E,q={})=>{var le;const Z=((le=N.current.get(W.image.url))==null?void 0:le.aspectRatio)??1,X=ps(W.image.url,R,N.current),{heightPx:z}=_o(X,Z);let re=0,h=0;return T==="same"?{x:re,y:h}=us(k,E,X,Z):(re=q.x??Math.random()*k,h=q.y??Math.random()*E,{x:re,y:h}=Mr(re,h,k,E,X,z)),{id:p.current++,url:W.image.url,link:W.link,name:W.image.name,x:re,y:h,xRatio:re/k,yRatio:h/E,aspectRatio:Z,widthPx:X}},ce=()=>{if(!o)return;const W=o.getBoundingClientRect(),k=W.width,E=W.height;k===0||E===0||d(q=>q.length===0?q:q.map(Z=>{const X=R.sizeType==="random"?Z.widthPx:ps(Z.url,R,N.current),{heightPx:z}=_o(X,Z.aspectRatio);if(T==="same"){const{x:le,y:ve}=us(k,E,X,Z.aspectRatio);return{...Z,x:le,y:ve,widthPx:X}}const{x:re,y:h}=Mr(Z.xRatio*k,Z.yRatio*E,k,E,X,z);return{...Z,x:re,y:h,widthPx:X}}))};l.useEffect(()=>{if(!o||t.length===0||!L)return;const W=o.getBoundingClientRect(),k=W.width,E=W.height,q=te(t[0],k,E);d([q]),m(1)},[R,T,o,t,L]),l.useEffect(()=>{if(!o)return;ce();const W=new ResizeObserver(ce);return W.observe(o),window.addEventListener("resize",ce),()=>{W.disconnect(),window.removeEventListener("resize",ce)}},[o,T,R,a.length]),l.useEffect(()=>{J==="last One"&&d(W=>W.length>0?[W[W.length-1]]:[])},[J]);const U=W=>{if(!o||t.length===0||!L)return;const k=o.getBoundingClientRect(),E=W.clientX-k.left,q=W.clientY-k.top;if(A==="image"&&!gl(E,q,a))return;let Z=0,X=0;T==="on Click"?(Z=E,X=q):T==="same"?(Z=k.width/2,X=k.height/2):(Z=Math.random()*k.width,X=Math.random()*k.height);const z=t[c],re=te(z,k.width,k.height,{x:Z,y:X}),h=J==="all"?[...a,re]:[re];d(h),m(le=>le>=t.length-1?0:le+1),V(W.clientX,W.clientY,h)},j=O==="custom"&&w!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),r.jsxs("div",{ref:s,onClick:U,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:`${i}-root`,style:{cursor:j?"none":"default"},children:[a.map(W=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${W.y}px`,left:`${W.x}px`,width:`${W.widthPx}px`,cursor:j?"none":"default"},children:A==="area"&&W.link?r.jsx("a",{href:W.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:W.url,alt:W.name,className:`${i}-image`})}):r.jsx("img",{src:W.url,alt:W.name,className:`${i}-image`})},W.id)),C&&j&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${w}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const dh=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
12511
+ `}function lh(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function ch(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await lh(i)]));return new Map(n)}function dh({settings:e,content:t=[],isEditor:n}){const{prefix:i}=_.useScopedStyles(),[o,s]=l.useState(null),[a,d]=l.useState([]),[c,m]=l.useState(0),p=l.useRef(0),[x,$]=l.useState({x:0,y:0}),[w,g]=l.useState("none"),y=l.useRef({x:0,y:0}),[C,b]=l.useState(!1),[L,I]=l.useState(!1),N=l.useRef(new Map),{imageSize:R=rh,cursor:O="system",target:A="area",position:T="random",visible:J="all",defaultCursor:v=null,hoverCursor:M=null}=e,B=l.useMemo(()=>sh(i),[i]),V=l.useCallback((W,k,E=a)=>{if(!o)return;const q=o.getBoundingClientRect(),Z=W-q.left,X=k-q.top;$({x:Z,y:X}),g(ah(Z,X,E,o,O,A,M,v))},[o,a,O,A,M,v]);l.useEffect(()=>{const W=[...t.map(E=>E.image.url),v,M].filter(E=>!!E);if(W.length===0){N.current=new Map,I(!0);return}let k=!1;return I(!1),ch(W).then(E=>{k||(N.current=E,I(!0))}),()=>{k=!0}},[t,v,M]),l.useEffect(()=>{if(!o)return;const W=E=>{E.stopPropagation(),y.current={x:E.clientX,y:E.clientY},V(E.clientX,E.clientY)},k=()=>{C&&V(y.current.x,y.current.y)};return o.addEventListener("mousemove",W),window.addEventListener("scroll",k,!0),()=>{o.removeEventListener("mousemove",W),window.removeEventListener("scroll",k,!0)}},[o,C,V]),l.useEffect(()=>{!o||!C||V(y.current.x,y.current.y)},[a,o,C,V]),l.useEffect(()=>{C||g("none")},[C]);const te=(W,k,E,q={})=>{var le;const Z=((le=N.current.get(W.image.url))==null?void 0:le.aspectRatio)??1,X=ms(W.image.url,R,N.current),{heightPx:z}=Fo(X,Z);let re=0,h=0;return T==="same"?{x:re,y:h}=ps(k,E,X,Z):(re=q.x??Math.random()*k,h=q.y??Math.random()*E,{x:re,y:h}=kr(re,h,k,E,X,z)),{id:p.current++,url:W.image.url,link:W.link,name:W.image.name,x:re,y:h,xRatio:re/k,yRatio:h/E,aspectRatio:Z,widthPx:X}},ce=()=>{if(!o)return;const W=o.getBoundingClientRect(),k=W.width,E=W.height;k===0||E===0||d(q=>q.length===0?q:q.map(Z=>{const X=R.sizeType==="random"?Z.widthPx:ms(Z.url,R,N.current),{heightPx:z}=Fo(X,Z.aspectRatio);if(T==="same"){const{x:le,y:ve}=ps(k,E,X,Z.aspectRatio);return{...Z,x:le,y:ve,widthPx:X}}const{x:re,y:h}=kr(Z.xRatio*k,Z.yRatio*E,k,E,X,z);return{...Z,x:re,y:h,widthPx:X}}))};l.useEffect(()=>{if(!o||t.length===0||!L)return;const W=o.getBoundingClientRect(),k=W.width,E=W.height,q=te(t[0],k,E);d([q]),m(1)},[R,T,o,t,L]),l.useEffect(()=>{if(!o)return;ce();const W=new ResizeObserver(ce);return W.observe(o),window.addEventListener("resize",ce),()=>{W.disconnect(),window.removeEventListener("resize",ce)}},[o,T,R,a.length]),l.useEffect(()=>{J==="last One"&&d(W=>W.length>0?[W[W.length-1]]:[])},[J]);const U=W=>{if(!o||t.length===0||!L)return;const k=o.getBoundingClientRect(),E=W.clientX-k.left,q=W.clientY-k.top;if(A==="image"&&!hl(E,q,a))return;let Z=0,X=0;T==="on Click"?(Z=E,X=q):T==="same"?(Z=k.width/2,X=k.height/2):(Z=Math.random()*k.width,X=Math.random()*k.height);const z=t[c],re=te(z,k.width,k.height,{x:Z,y:X}),h=J==="all"?[...a,re]:[re];d(h),m(le=>le>=t.length-1?0:le+1),V(W.clientX,W.clientY,h)},j=O==="custom"&&w!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),r.jsxs("div",{ref:s,onClick:U,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:`${i}-root`,style:{cursor:j?"none":"default"},children:[a.map(W=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${W.y}px`,left:`${W.x}px`,width:`${W.widthPx}px`,cursor:j?"none":"default"},children:A==="area"&&W.link?r.jsx("a",{href:W.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:W.url,alt:W.name,className:`${i}-image`})}):r.jsx("img",{src:W.url,alt:W.name,className:`${i}-image`})},W.id)),C&&j&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${w}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const uh=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
12512
12512
  import { CommonComponentProps } from '../props';
12513
12513
  import { useScopedStyles } from '../utils/index';
12514
12514
 
@@ -13029,7 +13029,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
13029
13029
  </>
13030
13030
  );
13031
13031
  }
13032
- `,uh={type:"object",version:1,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"}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},ph={element:ch,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:uh,sourceCode:dh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.defaultCursor"},{path:"settings.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},mh=100,gh=70;function hh(e){return`
13032
+ `,ph={type:"object",version:1,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"}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},mh={element:dh,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:ph,sourceCode:uh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.defaultCursor"},{path:"settings.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},gh=100,hh=70,En="cubic-bezier(0.86, 0, 0.07, 1)";function fh(e){return`
13033
13033
  .${e}-wrapper {
13034
13034
  position: relative;
13035
13035
  width: 100%;
@@ -13064,34 +13064,34 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
13064
13064
  }
13065
13065
  .${e}-incoming-next {
13066
13066
  z-index: 4;
13067
- transition: transform var(--${e}-transition-ms) ease-out;
13067
+ transition: transform var(--${e}-transition-ms) ${En};
13068
13068
  }
13069
13069
  .${e}-incoming-prev {
13070
13070
  z-index: 4;
13071
- transition: transform var(--${e}-transition-ms) ease-out;
13071
+ transition: transform var(--${e}-transition-ms) ${En};
13072
13072
  }
13073
13073
  .${e}-outgoing {
13074
13074
  will-change: transform;
13075
13075
  }
13076
13076
  .${e}-outgoing-next {
13077
13077
  z-index: 3;
13078
- transition: transform var(--${e}-transition-ms) ease-out;
13078
+ transition: transform var(--${e}-transition-ms) ${En};
13079
13079
  }
13080
13080
  .${e}-outgoing-prev {
13081
13081
  z-index: 3;
13082
- transition: transform var(--${e}-transition-ms) ease-out;
13082
+ transition: transform var(--${e}-transition-ms) ${En};
13083
13083
  }
13084
13084
  .${e}-outgoing-next .${e}-effect-image {
13085
- transition: filter var(--${e}-transition-ms) ease-out;
13085
+ transition: filter var(--${e}-transition-ms) ${En};
13086
13086
  }
13087
13087
  .${e}-outgoing-prev .${e}-effect-image {
13088
- transition: filter var(--${e}-transition-ms) ease-out;
13088
+ transition: filter var(--${e}-transition-ms) ${En};
13089
13089
  }
13090
13090
  .${e}-incoming .${e}-effect-image {
13091
- transition: filter var(--${e}-transition-ms) ease-out;
13091
+ transition: filter var(--${e}-transition-ms) ${En};
13092
13092
  }
13093
13093
  .${e}-background .${e}-effect-image {
13094
- transition: filter var(--${e}-transition-ms) ease;
13094
+ transition: filter var(--${e}-transition-ms) ${En};
13095
13095
  }
13096
13096
  .${e}-snap .${e}-incoming,
13097
13097
  .${e}-snap .${e}-outgoing,
@@ -13139,7 +13139,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
13139
13139
  display: block;
13140
13140
  pointer-events: none;
13141
13141
  }
13142
- `}function fh(e){return e==="blur"?gh:e==="greyscale"?mh:0}function Ci(e,t=1,n=1){const i=fh(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function ms(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function yh(e,t){return t<=1?0:(e-1+t)%t}function vh(e,t=1){return!e||e.height===0?t:e.width/e.height}function xh(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,a=t*o/100;let d=s,c=d/n;return c>a&&(c=a,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function gs(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function hl(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function hs(e,t,n){return{...hl(e),[`--${n}-stage-scale`]:t}}function bh(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function wh({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Ie,F,Q,P,D,K,oe;const{prefix:o}=_.useScopedStyles(),s=l.useMemo(()=>hh(o),[o]),{imageSize:a,maxWidth:d,maxHeight:c,transition:m=1e3,bgImage:p="greyscale"}=e,x=t??[],$=ms(x.length),[w,g]=l.useState($.activeIndex),[y,C]=l.useState($.backgroundIndex),[b,L]=l.useState(!1),[I,N]=l.useState(!1),[R,O]=l.useState(null),[A,T]=l.useState(null),[J,v]=l.useState(0),[M,B]=l.useState(1),[V,te]=l.useState("none"),[ce,U]=l.useState("next"),[j,W]=l.useState({}),[k,E]=l.useState({width:0,height:0}),q=l.useRef(null),Z=l.useRef(null),X=!n||!!i,z=a??60,re=Math.max(10,Math.min(100,d??z)),h=Math.max(10,Math.min(100,c??z)),le=Math.max(100,m),ve=Ci(p),he=l.useCallback(ie=>{const ye=vh(ie?j[ie]:void 0);return xh(k.width,k.height,ye,re,h)},[k.height,k.width,j,h,re]);l.useEffect(()=>{const ie=Z.current;if(!ie)return;const ye=new ResizeObserver(([Me])=>{const{width:Te,height:we}=Me.contentRect;E({width:Te,height:we})});return ye.observe(ie),()=>ye.disconnect()},[]),l.useEffect(()=>{const ie=(t??[]).map(ye=>{var Me;return(Me=ye.image)==null?void 0:Me.url}).filter(ye=>!!ye);bh(ie,(ye,Me)=>{W(Te=>{var we,qe;return((we=Te[ye])==null?void 0:we.width)===Me.width&&((qe=Te[ye])==null?void 0:qe.height)===Me.height?Te:{...Te,[ye]:Me}})})},[t]),l.useEffect(()=>{const{backgroundIndex:ie,activeIndex:ye}=ms(x.length);g(ye),C(ie),L(!1),N(!1),O(null),T(null),v(0),B(1),te("none"),U("next")},[x.length,t]),l.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]);const Re=l.useCallback(ie=>{var de,ke,Ne,He;if(!X||b||x.length<=1)return;const ye=ie==="next"?(w+1)%x.length:(w-1+x.length)%x.length,Me=he((ke=(de=x[w])==null?void 0:de.image)==null?void 0:ke.url),Te=he((He=(Ne=x[ye])==null?void 0:Ne.image)==null?void 0:He.url),we=gs(k.width,k.height,Me),qe=gs(k.width,k.height,Te);q.current&&clearTimeout(q.current),U(ie),N(!0),L(!0),ie==="next"?(O(w),T(ye),v(0),B(1),te(Ci(p,0,1))):(C(yh(ye,x.length)),O(ye),T(w),v(1),B(qe),te(Ci(p,1,qe))),requestAnimationFrame(()=>{N(!1),requestAnimationFrame(()=>{ie==="next"?(v(1),B(we),te(Ci(p,1,we))):(v(0),B(1),te(Ci(p,0,1)))})}),q.current=setTimeout(()=>{ie==="next"&&C(w),g(ye),O(null),T(null),L(!1)},le)},[w,p,k.height,k.width,he,b,X,x,le]),ee=x[w],ge=y!==null?x[y]:null,Y=R!==null?x[R]:null,fe=A!==null?x[A]:null,ae=x.length<=1?0:(w-1+x.length)%x.length,se=x.length<=1?0:(w+1)%x.length,ne=he((Ie=ee==null?void 0:ee.image)==null?void 0:Ie.url),$e=he((F=Y==null?void 0:Y.image)==null?void 0:F.url),Ce=he((Q=fe==null?void 0:fe.image)==null?void 0:Q.url),be={[`--${o}-transition-ms`]:`${le}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:Z,className:je(`${o}-wrapper`,I&&`${o}-snap`,n&&!i&&`${o}-editor`),style:be,"aria-label":"Zoom gallery",children:[((P=ge==null?void 0:ge.image)==null?void 0:P.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:ge.image.url,alt:"",style:{filter:ve}})}),b&&((D=Y==null?void 0:Y.image)==null?void 0:D.url)&&r.jsx("div",{className:je(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${ce}`),style:hs($e,M,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:Y.image.url,alt:"",style:{filter:V}})}),b&&((K=fe==null?void 0:fe.image)==null?void 0:K.url)&&r.jsx("div",{className:je(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${ce}`),style:hs(Ce,J,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:fe.image.url,alt:""})}),!b&&((oe=ee==null?void 0:ee.image)==null?void 0:oe.url)&&r.jsx("div",{className:je(`${o}-stage`,`${o}-foreground`),style:hl(ne),children:r.jsx("img",{className:`${o}-image`,src:ee.image.url,alt:ee.image.name??""})}),X&&x.length>1&&!b&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:je(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Re("prev"),"aria-label":`Show previous image (${ae+1} of ${x.length})`}),r.jsx("button",{type:"button",className:je(`${o}-nav`,`${o}-nav-next`),onClick:()=>Re("next"),"aria-label":`Show next image (${se+1} of ${x.length})`})]})]})]})}const $h=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
13142
+ `}function yh(e){return e==="blur"?hh:e==="greyscale"?gh:0}function Ti(e,t=1,n=1){const i=yh(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function gs(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function vh(e,t){return t<=1?0:(e-1+t)%t}function xh(e,t=1){return!e||e.height===0?t:e.width/e.height}function bh(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,a=t*o/100;let d=s,c=d/n;return c>a&&(c=a,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function hs(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function fl(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function fs(e,t,n){return{...fl(e),[`--${n}-stage-scale`]:t}}function wh(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function $h({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Ie,F,Q,P,D,G,oe;const{prefix:o}=_.useScopedStyles(),s=l.useMemo(()=>fh(o),[o]),{imageSize:a,maxWidth:d,maxHeight:c,transition:m=1e3,bgImage:p="greyscale"}=e,x=t??[],$=gs(x.length),[w,g]=l.useState($.activeIndex),[y,C]=l.useState($.backgroundIndex),[b,L]=l.useState(!1),[I,N]=l.useState(!1),[R,O]=l.useState(null),[A,T]=l.useState(null),[J,v]=l.useState(0),[M,B]=l.useState(1),[V,te]=l.useState("none"),[ce,U]=l.useState("next"),[j,W]=l.useState({}),[k,E]=l.useState({width:0,height:0}),q=l.useRef(null),Z=l.useRef(null),X=!n||!!i,z=a??60,re=Math.max(10,Math.min(100,d??z)),h=Math.max(10,Math.min(100,c??z)),le=Math.max(100,m),ve=Ti(p),he=l.useCallback(ie=>{const ye=xh(ie?j[ie]:void 0);return bh(k.width,k.height,ye,re,h)},[k.height,k.width,j,h,re]);l.useEffect(()=>{const ie=Z.current;if(!ie)return;const ye=new ResizeObserver(([Me])=>{const{width:Te,height:we}=Me.contentRect;E({width:Te,height:we})});return ye.observe(ie),()=>ye.disconnect()},[]),l.useEffect(()=>{const ie=(t??[]).map(ye=>{var Me;return(Me=ye.image)==null?void 0:Me.url}).filter(ye=>!!ye);wh(ie,(ye,Me)=>{W(Te=>{var we,qe;return((we=Te[ye])==null?void 0:we.width)===Me.width&&((qe=Te[ye])==null?void 0:qe.height)===Me.height?Te:{...Te,[ye]:Me}})})},[t]),l.useEffect(()=>{const{backgroundIndex:ie,activeIndex:ye}=gs(x.length);g(ye),C(ie),L(!1),N(!1),O(null),T(null),v(0),B(1),te("none"),U("next")},[x.length,t]),l.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]);const Re=l.useCallback(ie=>{var de,ke,Ne,He;if(!X||b||x.length<=1)return;const ye=ie==="next"?(w+1)%x.length:(w-1+x.length)%x.length,Me=he((ke=(de=x[w])==null?void 0:de.image)==null?void 0:ke.url),Te=he((He=(Ne=x[ye])==null?void 0:Ne.image)==null?void 0:He.url),we=hs(k.width,k.height,Me),qe=hs(k.width,k.height,Te);q.current&&clearTimeout(q.current),U(ie),N(!0),L(!0),ie==="next"?(O(w),T(ye),v(0),B(1),te(Ti(p,0,1))):(C(vh(ye,x.length)),O(ye),T(w),v(1),B(qe),te(Ti(p,1,qe))),requestAnimationFrame(()=>{N(!1),requestAnimationFrame(()=>{ie==="next"?(v(1),B(we),te(Ti(p,1,we))):(v(0),B(1),te(Ti(p,0,1)))})}),q.current=setTimeout(()=>{ie==="next"&&C(w),g(ye),O(null),T(null),L(!1)},le)},[w,p,k.height,k.width,he,b,X,x,le]),ee=x[w],ge=y!==null?x[y]:null,Y=R!==null?x[R]:null,fe=A!==null?x[A]:null,ae=x.length<=1?0:(w-1+x.length)%x.length,se=x.length<=1?0:(w+1)%x.length,ne=he((Ie=ee==null?void 0:ee.image)==null?void 0:Ie.url),$e=he((F=Y==null?void 0:Y.image)==null?void 0:F.url),Ce=he((Q=fe==null?void 0:fe.image)==null?void 0:Q.url),be={[`--${o}-transition-ms`]:`${le}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:Z,className:je(`${o}-wrapper`,I&&`${o}-snap`,n&&!i&&`${o}-editor`),style:be,"aria-label":"Zoom gallery",children:[((P=ge==null?void 0:ge.image)==null?void 0:P.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:ge.image.url,alt:"",style:{filter:ve}})}),b&&((D=Y==null?void 0:Y.image)==null?void 0:D.url)&&r.jsx("div",{className:je(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${ce}`),style:fs($e,M,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:Y.image.url,alt:"",style:{filter:V}})}),b&&((G=fe==null?void 0:fe.image)==null?void 0:G.url)&&r.jsx("div",{className:je(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${ce}`),style:fs(Ce,J,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:fe.image.url,alt:""})}),!b&&((oe=ee==null?void 0:ee.image)==null?void 0:oe.url)&&r.jsx("div",{className:je(`${o}-stage`,`${o}-foreground`),style:fl(ne),children:r.jsx("img",{className:`${o}-image`,src:ee.image.url,alt:ee.image.name??""})}),X&&x.length>1&&!b&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:je(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Re("prev"),"aria-label":`Show previous image (${ae+1} of ${x.length})`}),r.jsx("button",{type:"button",className:je(`${o}-nav`,`${o}-nav-next`),onClick:()=>Re("next"),"aria-label":`Show next image (${se+1} of ${x.length})`})]})]})]})}const Sh=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
13143
13143
  import cn from 'classnames';
13144
13144
  import { CommonComponentProps } from '../props';
13145
13145
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -13161,6 +13161,7 @@ type ScaleSettings = {
13161
13161
 
13162
13162
  const GREYSCALE_EFFECT_AMOUNT = 100;
13163
13163
  const BLUR_EFFECT_AMOUNT = 70;
13164
+ const TRANSITION_TIMING_FUNCTION = 'cubic-bezier(0.86, 0, 0.07, 1)';
13164
13165
 
13165
13166
  type ImageDimensions = {
13166
13167
  width: number;
@@ -13215,34 +13216,34 @@ function getCSS(P: string): string {
13215
13216
  }
13216
13217
  .\${P}-incoming-next {
13217
13218
  z-index: 4;
13218
- transition: transform var(--\${P}-transition-ms) ease-out;
13219
+ transition: transform var(--\${P}-transition-ms) \${TRANSITION_TIMING_FUNCTION};
13219
13220
  }
13220
13221
  .\${P}-incoming-prev {
13221
13222
  z-index: 4;
13222
- transition: transform var(--\${P}-transition-ms) ease-out;
13223
+ transition: transform var(--\${P}-transition-ms) \${TRANSITION_TIMING_FUNCTION};
13223
13224
  }
13224
13225
  .\${P}-outgoing {
13225
13226
  will-change: transform;
13226
13227
  }
13227
13228
  .\${P}-outgoing-next {
13228
13229
  z-index: 3;
13229
- transition: transform var(--\${P}-transition-ms) ease-out;
13230
+ transition: transform var(--\${P}-transition-ms) \${TRANSITION_TIMING_FUNCTION};
13230
13231
  }
13231
13232
  .\${P}-outgoing-prev {
13232
13233
  z-index: 3;
13233
- transition: transform var(--\${P}-transition-ms) ease-out;
13234
+ transition: transform var(--\${P}-transition-ms) \${TRANSITION_TIMING_FUNCTION};
13234
13235
  }
13235
13236
  .\${P}-outgoing-next .\${P}-effect-image {
13236
- transition: filter var(--\${P}-transition-ms) ease-out;
13237
+ transition: filter var(--\${P}-transition-ms) \${TRANSITION_TIMING_FUNCTION};
13237
13238
  }
13238
13239
  .\${P}-outgoing-prev .\${P}-effect-image {
13239
- transition: filter var(--\${P}-transition-ms) ease-out;
13240
+ transition: filter var(--\${P}-transition-ms) \${TRANSITION_TIMING_FUNCTION};
13240
13241
  }
13241
13242
  .\${P}-incoming .\${P}-effect-image {
13242
- transition: filter var(--\${P}-transition-ms) ease-out;
13243
+ transition: filter var(--\${P}-transition-ms) \${TRANSITION_TIMING_FUNCTION};
13243
13244
  }
13244
13245
  .\${P}-background .\${P}-effect-image {
13245
- transition: filter var(--\${P}-transition-ms) ease;
13246
+ transition: filter var(--\${P}-transition-ms) \${TRANSITION_TIMING_FUNCTION};
13246
13247
  }
13247
13248
  .\${P}-snap .\${P}-incoming,
13248
13249
  .\${P}-snap .\${P}-outgoing,
@@ -13657,4 +13658,4 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
13657
13658
  </>
13658
13659
  );
13659
13660
  }
13660
- `,Sh={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:1e3,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_1.jpg ",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_6.jpg",name:""}}]}},Ch={element:wh,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:Sh,sourceCode:$h,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Th=[Id,_d,ph,$u,Mu,zu,op,cp,fp,Np,Om,Um,Rg,ih,Ch];exports.components=Th;exports.isSchemaV1=vl;
13661
+ `,Ch={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_1.jpg ",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/scale_component_6.jpg",name:""}}]}},Th={element:$h,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:Ch,sourceCode:Sh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Lh=[Ed,Fd,mh,Su,ku,ju,rp,dp,yp,Hp,Bm,Xm,Mg,oh,Th];exports.components=Lh;exports.isSchemaV1=xl;