@cntrl-site/components 1.0.40 → 1.0.41-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),it=require("classnames"),L=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Wi=require("react-dom");function Gl(e){return e.type==="object"&&e.version===1}const Kl="ControlSlider-module__wrapper___sHEkd",Ul="ControlSlider-module__hoverArrow___A-dOH",Xl="ControlSlider-module__sliderItem___QQSkR",Yl="ControlSlider-module__sliderImage___9hRl-",Jl="ControlSlider-module__arrow___05ghY",Zl="ControlSlider-module__arrowVertical___tBfVN",Ql="ControlSlider-module__nextArrow___-30Yc",ec="ControlSlider-module__arrowInner___aEra3",tc="ControlSlider-module__arrowIcon___S4ztF",nc="ControlSlider-module__arrowImg___2dwJW",ic="ControlSlider-module__mirror___brd6U",oc="ControlSlider-module__pagination___bicLF",rc="ControlSlider-module__paginationInner___bT-P-",ac="ControlSlider-module__paginationVertical___zYqKw",sc="ControlSlider-module__paginationItem___nTRbk",lc="ControlSlider-module__dot___p1Qun",cc="ControlSlider-module__activeDot___LHFaj",dc="ControlSlider-module__paginationInsideBottom___R3FWn",uc="ControlSlider-module__paginationInsideTop___V-qb-",pc="ControlSlider-module__paginationOutsideBottom___14w8D",mc="ControlSlider-module__paginationOutsideTop___SCLqB",gc="ControlSlider-module__paginationInsideLeft___yOBRZ",hc="ControlSlider-module__paginationInsideRight___Rtt3o",fc="ControlSlider-module__paginationOutsideLeft___lahaw",yc="ControlSlider-module__paginationOutsideRight___EtuQa",vc="ControlSlider-module__imgWrapper___UjEgB",xc="ControlSlider-module__captionBlock___dJ6-j",bc="ControlSlider-module__captionTextWrapper___HFlpf",wc="ControlSlider-module__captionText___uGBVc",Sc="ControlSlider-module__active___WZK4G",$c="ControlSlider-module__withPointerEvents___t-18M",Cc="ControlSlider-module__topLeftAlignment___zjnGM",Tc="ControlSlider-module__topCenterAlignment___gD1xW",Lc="ControlSlider-module__topRightAlignment___NMapS",Ic="ControlSlider-module__middleLeftAlignment___OnUrY",Rc="ControlSlider-module__middleCenterAlignment___Tdkl0",Ec="ControlSlider-module__middleRightAlignment___wEbfX",Mc="ControlSlider-module__bottomLeftAlignment___cTP2-",Pc="ControlSlider-module__bottomCenterAlignment___c54fB",kc="ControlSlider-module__bottomRightAlignment___kEwrz",Ac="ControlSlider-module__clickOverlay___DZA28",Wc="ControlSlider-module__contain___pLyq7",Fc="ControlSlider-module__cover___KdDat",je={wrapper:Kl,hoverArrow:Ul,sliderItem:Xl,sliderImage:Yl,arrow:Jl,arrowVertical:Zl,nextArrow:Ql,arrowInner:ec,arrowIcon:tc,arrowImg:nc,mirror:ic,pagination:oc,paginationInner:rc,paginationVertical:ac,paginationItem:sc,dot:lc,activeDot:cc,paginationInsideBottom:dc,paginationInsideTop:uc,paginationOutsideBottom:pc,paginationOutsideTop:mc,paginationInsideLeft:gc,paginationInsideRight:hc,paginationOutsideLeft:fc,paginationOutsideRight:yc,imgWrapper:vc,captionBlock:xc,captionTextWrapper:bc,captionText:wc,active:Sc,withPointerEvents:$c,topLeftAlignment:Cc,topCenterAlignment:Tc,topRightAlignment:Lc,middleLeftAlignment:Ic,middleCenterAlignment:Rc,middleRightAlignment:Ec,bottomLeftAlignment:Mc,bottomCenterAlignment:Pc,bottomRightAlignment:kc,clickOverlay:Ac,contain:Wc,cover:Fc};function _c(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 Nc(e,t,n){return t&&_c(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ra="(prefers-reduced-motion: reduce)",vi=1,Hc=2,Si=3,Fi=4,so=5,Wo=6,zo=7,Oc={CREATED:vi,MOUNTED:Hc,IDLE:Si,MOVING:Fi,SCROLLING:so,DRAGGING:Wo,DESTROYED:zo};function An(e){e.length=0}function qn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Mt(e){return e.bind.apply(e,[null].concat(qn(arguments,1)))}var _s=setTimeout,_r=function(){};function Ea(e){return requestAnimationFrame(e)}function Yo(e,t){return typeof t===e}function Xi(e){return!Jr(e)&&Yo("object",e)}var Yr=Array.isArray,Ns=Mt(Yo,"function"),zn=Mt(Yo,"string"),lo=Mt(Yo,"undefined");function Jr(e){return e===null}function Hs(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function co(e){return Yr(e)?e:[e]}function hn(e,t){co(e).forEach(t)}function Zr(e,t){return e.indexOf(t)>-1}function Fo(e,t){return e.push.apply(e,co(t)),e}function Rn(e,t,n){e&&hn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function $n(e,t){Rn(e,zn(t)?t.split(" "):t,!0)}function uo(e,t){hn(t,e.appendChild.bind(e))}function Qr(e,t){hn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Yi(e,t){return Hs(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Os(e,t){var n=e?qn(e.children):[];return t?n.filter(function(i){return Yi(i,t)}):n}function po(e,t){return t?Os(e,t)[0]:e.firstElementChild}var Ji=Object.keys;function ai(e,t,n){return e&&(n?Ji(e).reverse():Ji(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Zi(e){return qn(arguments,1).forEach(function(t){ai(t,function(n,i){e[i]=t[i]})}),e}function Hn(e){return qn(arguments,1).forEach(function(t){ai(t,function(n,i){Yr(n)?e[i]=n.slice():Xi(n)?e[i]=Hn({},Xi(e[i])?e[i]:{},n):e[i]=n})}),e}function Ma(e,t){hn(t||Ji(e),function(n){delete e[n]})}function Cn(e,t){hn(e,function(n){hn(t,function(i){n&&n.removeAttribute(i)})})}function nt(e,t,n){Xi(t)?ai(t,function(i,o){nt(e,o,i)}):hn(e,function(i){Jr(n)||n===""?Cn(i,t):i.setAttribute(t,String(n))})}function xi(e,t,n){var i=document.createElement(e);return t&&(zn(t)?$n(i,t):nt(i,t)),n&&uo(n,i),i}function yn(e,t,n){if(lo(n))return getComputedStyle(e)[t];Jr(n)||(e.style[t]=""+n)}function Qi(e,t){yn(e,"display",t)}function js(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function vn(e,t){return e.getAttribute(t)}function Pa(e,t){return e&&e.classList.contains(t)}function cn(e){return e.getBoundingClientRect()}function si(e){hn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Bs(e){return po(new DOMParser().parseFromString(e,"text/html").body)}function In(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function zs(e,t){return e&&e.querySelector(t)}function ea(e,t){return t?qn(e.querySelectorAll(t)):[]}function En(e,t){Rn(e,t,!1)}function Nr(e){return e.timeStamp}function Jn(e){return zn(e)?e:e?e+"px":""}var mo="splide",ta="data-"+mo;function Vi(e,t){if(!e)throw new Error("["+mo+"] "+(t||""))}var Dn=Math.min,Do=Math.max,Vo=Math.floor,eo=Math.ceil,rn=Math.abs;function Ds(e,t,n){return rn(e-t)<n}function _o(e,t,n,i){var o=Dn(t,n),l=Do(t,n);return i?o<e&&e<l:o<=e&&e<=l}function hi(e,t,n){var i=Dn(t,n),o=Do(t,n);return Dn(Do(i,e),o)}function Hr(e){return+(e>0)-+(e<0)}function Or(e,t){return hn(t,function(n){e=e.replace("%s",""+n)}),e}function na(e){return e<10?"0"+e:""+e}var ka={};function jc(e){return""+e+na(ka[e]=(ka[e]||0)+1)}function Vs(){var e=[];function t(s,d,c,u){o(s,d,function(m,y,w){var $="addEventListener"in m,h=$?m.removeEventListener.bind(m,y,c,u):m.removeListener.bind(m,c);$?m.addEventListener(y,c,u):m.addListener(c),e.push([m,y,w,c,h])})}function n(s,d,c){o(s,d,function(u,m,y){e=e.filter(function(w){return w[0]===u&&w[1]===m&&w[2]===y&&(!c||w[3]===c)?(w[4](),!1):!0})})}function i(s,d,c){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:m,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,m,!1,c)),s.dispatchEvent(u),u}function o(s,d,c){hn(s,function(u){u&&hn(d,function(m){m.split(" ").forEach(function(y){var w=y.split(".");c(u,w[0],w[1])})})})}function l(){e.forEach(function(s){s[4]()}),An(e)}return{bind:t,unbind:n,dispatch:i,destroy:l}}var Gn="mounted",jr="ready",Wn="move",_i="moved",ia="click",qs="active",Gs="inactive",Ks="visible",Us="hidden",Vt="refresh",nn="updated",$i="resize",Jo="resized",Xs="drag",Ys="dragging",Js="dragged",Zo="scroll",di="scrolled",Bc="overflow",oa="destroy",Zs="arrows:mounted",Qs="arrows:updated",el="pagination:mounted",tl="pagination:updated",ra="navigation:mounted",aa="autoplay:play",nl="autoplay:playing",sa="autoplay:pause",la="lazyload:loaded",il="sk",ol="sh",qo="ei";function Nt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Vs();function i(l,s){n.bind(t,co(l).join(" "),function(d){s.apply(s,Yr(d.detail)?d.detail:[])})}function o(l){n.dispatch(t,l,qn(arguments,1))}return e&&e.event.on(oa,n.destroy),Zi(n,{bus:t,on:i,off:Mt(n.unbind,t),emit:o})}function Qo(e,t,n,i){var o=Date.now,l,s=0,d,c=!0,u=0;function m(){if(!c){if(s=e?Dn((o()-l)/e,1):1,n&&n(s),s>=1&&(t(),l=o(),i&&++u>=i))return w();d=Ea(m)}}function y(T){T||h(),l=o()-(T?s*e:0),c=!1,d=Ea(m)}function w(){c=!0}function $(){l=o(),s=0,n&&n(s)}function h(){d&&cancelAnimationFrame(d),s=0,d=0,c=!0}function v(T){e=T}function S(){return c}return{start:y,rewind:$,pause:w,cancel:h,set:v,isPaused:S}}function zc(e){var t=e;function n(o){t=o}function i(o){return Zr(co(o),t)}return{set:n,is:i}}function Dc(e,t){var n=Qo(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Vc(e,t,n){var i=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},s=Vs(),d=[];function c(){var h=n.mediaQuery==="min";Ji(o).sort(function(v,S){return h?+v-+S:+S-+v}).forEach(function(v){m(o[v],"("+(h?"min":"max")+"-width:"+v+"px)")}),m(l,Ra),y()}function u(h){h&&s.destroy()}function m(h,v){var S=matchMedia(v);s.bind(S,"change",y),d.push([h,S])}function y(){var h=i.is(zo),v=n.direction,S=d.reduce(function(T,R){return Hn(T,R[1].matches?R[0]:{})},{});Ma(n),$(S),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):v!==n.direction&&e.refresh()}function w(h){matchMedia(Ra).matches&&(h?Hn(n,l):Ma(n,Ji(l)))}function $(h,v,S){Hn(n,h),v&&Hn(Object.getPrototypeOf(n),h),(S||!i.is(vi))&&e.emit(nn,n)}return{setup:c,destroy:u,reduce:w,set:$}}var er="Arrow",tr=er+"Left",nr=er+"Right",rl=er+"Up",al=er+"Down",Aa="rtl",ir="ttb",fr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[rl,nr],ArrowRight:[al,tr]};function qc(e,t,n){function i(l,s,d){d=d||n.direction;var c=d===Aa&&!s?1:d===ir?0:-1;return fr[l]&&fr[l][c]||l.replace(/width|left|right/i,function(u,m){var y=fr[u.toLowerCase()][c]||u;return m>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(l){return l*(n.direction===Aa?1:-1)}return{resolve:i,orient:o}}var Mn="role",bi="tabindex",Gc="disabled",xn="aria-",go=xn+"controls",sl=xn+"current",Wa=xn+"selected",un=xn+"label",ca=xn+"labelledby",ll=xn+"hidden",da=xn+"orientation",to=xn+"roledescription",Fa=xn+"live",_a=xn+"busy",Na=xn+"atomic",ua=[Mn,bi,Gc,go,sl,un,ca,ll,da,to],Tn=mo+"__",Kn="is-",yr=mo,Ha=Tn+"track",Kc=Tn+"list",or=Tn+"slide",cl=or+"--clone",Uc=or+"__container",pa=Tn+"arrows",rr=Tn+"arrow",dl=rr+"--prev",ul=rr+"--next",ar=Tn+"pagination",pl=ar+"__page",Xc=Tn+"progress",Yc=Xc+"__bar",Jc=Tn+"toggle",Zc=Tn+"spinner",Qc=Tn+"sr",ed=Kn+"initialized",li=Kn+"active",ml=Kn+"prev",gl=Kn+"next",Br=Kn+"visible",zr=Kn+"loading",hl=Kn+"focus-in",fl=Kn+"overflow",td=[li,Br,ml,gl,zr,hl,fl],nd={slide:or,clone:cl,arrows:pa,arrow:rr,prev:dl,next:ul,pagination:ar,page:pl,spinner:Zc};function id(e,t){if(Ns(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Yi(n,t);)n=n.parentElement;return n}var od=5,Oa=200,yl="touchstart mousedown",vr="touchmove mousemove",xr="touchend touchcancel mouseup click";function rd(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=e.root,d=n.i18n,c={},u=[],m=[],y=[],w,$,h;function v(){P(),H(),R()}function S(){o(Vt,T),o(Vt,v),o(nn,R),l(document,yl+" keydown",function(k){h=k.type==="keydown"},{capture:!0}),l(s,"focusin",function(){Rn(s,hl,!!h)})}function T(k){var x=ua.concat("style");An(u),En(s,m),En(w,y),Cn([w,$],x),Cn(s,k?x:["style",to])}function R(){En(s,m),En(w,y),m=j(yr),y=j(Ha),$n(s,m),$n(w,y),nt(s,un,n.label),nt(s,ca,n.labelledby)}function P(){w=E("."+Ha),$=po(w,"."+Kc),Vi(w&&$,"A track/list element is missing."),Fo(u,Os($,"."+or+":not(."+cl+")")),ai({arrows:pa,pagination:ar,prev:dl,next:ul,bar:Yc,toggle:Jc},function(k,x){c[x]=E("."+k)}),Zi(c,{root:s,track:w,list:$,slides:u})}function H(){var k=s.id||jc(mo),x=n.role;s.id=k,w.id=w.id||k+"-track",$.id=$.id||k+"-list",!vn(s,Mn)&&s.tagName!=="SECTION"&&x&&nt(s,Mn,x),nt(s,to,d.carousel),nt($,Mn,"presentation")}function E(k){var x=zs(s,k);return x&&id(x,"."+yr)===s?x:void 0}function j(k){return[k+"--"+n.type,k+"--"+n.direction,n.drag&&k+"--draggable",n.isNavigation&&k+"--nav",k===yr&&li]}return Zi(c,{setup:v,mount:S,destroy:T})}var Ci="slide",Ni="loop",ho="fade";function ad(e,t,n,i){var o=Nt(e),l=o.on,s=o.emit,d=o.bind,c=e.Components,u=e.root,m=e.options,y=m.isNavigation,w=m.updateOnMove,$=m.i18n,h=m.pagination,v=m.slideFocus,S=c.Direction.resolve,T=vn(i,"style"),R=vn(i,un),P=n>-1,H=po(i,"."+Uc),E;function j(){P||(i.id=u.id+"-slide"+na(t+1),nt(i,Mn,h?"tabpanel":"group"),nt(i,to,$.slide),nt(i,un,R||Or($.slideLabel,[t+1,e.length]))),k()}function k(){d(i,"click",Mt(s,ia,N)),d(i,"keydown",Mt(s,il,N)),l([_i,ol,di],A),l(ra,Y),w&&l(Wn,f)}function x(){E=!0,o.destroy(),En(i,td),Cn(i,ua),nt(i,"style",T),nt(i,un,R||"")}function Y(){var C=e.splides.map(function(I){var V=I.splide.Components.Slides.getAt(t);return V?V.slide.id:""}).join(" ");nt(i,un,Or($.slideX,(P?n:t)+1)),nt(i,go,C),nt(i,Mn,v?"button":""),v&&Cn(i,to)}function f(){E||A()}function A(){if(!E){var C=e.index;W(),z(),Rn(i,ml,t===C-1),Rn(i,gl,t===C+1)}}function W(){var C=le();C!==Pa(i,li)&&(Rn(i,li,C),nt(i,sl,y&&C||""),s(C?qs:Gs,N))}function z(){var C=J(),I=!C&&(!le()||P);if(e.state.is([Fi,so])||nt(i,ll,I||""),nt(ea(i,m.focusableNodes||""),bi,I?-1:""),v&&nt(i,bi,I?-1:0),C!==Pa(i,Br)&&(Rn(i,Br,C),s(C?Ks:Us,N)),!C&&document.activeElement===i){var V=c.Slides.getAt(e.index);V&&js(V.slide)}}function G(C,I,V){yn(V&&H||i,C,I)}function le(){var C=e.index;return C===t||m.cloneStatus&&C===n}function J(){if(e.is(ho))return le();var C=cn(c.Elements.track),I=cn(i),V=S("left",!0),K=S("right",!0);return Vo(C[V])<=eo(I[V])&&Vo(I[K])<=eo(C[K])}function D(C,I){var V=rn(C-t);return!P&&(m.rewind||e.is(Ni))&&(V=Dn(V,e.length-V)),V<=I}var N={index:t,slideIndex:n,slide:i,container:H,isClone:P,mount:j,destroy:x,update:A,style:G,isWithin:D};return N}function sd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=i.bind,d=t.Elements,c=d.slides,u=d.list,m=[];function y(){w(),o(Vt,$),o(Vt,w)}function w(){c.forEach(function(A,W){v(A,W,-1)})}function $(){E(function(A){A.destroy()}),An(m)}function h(){E(function(A){A.update()})}function v(A,W,z){var G=ad(e,W,z,A);G.mount(),m.push(G),m.sort(function(le,J){return le.index-J.index})}function S(A){return A?j(function(W){return!W.isClone}):m}function T(A){var W=t.Controller,z=W.toIndex(A),G=W.hasFocus()?1:n.perPage;return j(function(le){return _o(le.index,z,z+G-1)})}function R(A){return j(A)[0]}function P(A,W){hn(A,function(z){if(zn(z)&&(z=Bs(z)),Hs(z)){var G=c[W];G?Qr(z,G):uo(u,z),$n(z,n.classes.slide),x(z,Mt(l,$i))}}),l(Vt)}function H(A){si(j(A).map(function(W){return W.slide})),l(Vt)}function E(A,W){S(W).forEach(A)}function j(A){return m.filter(Ns(A)?A:function(W){return zn(A)?Yi(W.slide,A):Zr(co(A),W.index)})}function k(A,W,z){E(function(G){G.style(A,W,z)})}function x(A,W){var z=ea(A,"img"),G=z.length;G?z.forEach(function(le){s(le,"load error",function(){--G||W()})}):W()}function Y(A){return A?c.length:m.length}function f(){return m.length>n.perPage}return{mount:y,destroy:$,update:h,register:v,get:S,getIn:T,getAt:R,add:P,remove:H,forEach:E,filter:j,style:k,getLength:Y,isEnough:f}}function ld(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,m=u.root,y=u.track,w=u.list,$=d.getAt,h=d.style,v,S,T;function R(){P(),l(window,"resize load",Dc(Mt(s,$i))),o([nn,Vt],P),o($i,H)}function P(){v=n.direction===ir,yn(m,"maxWidth",Jn(n.width)),yn(y,c("paddingLeft"),E(!1)),yn(y,c("paddingRight"),E(!0)),H(!0)}function H(N){var C=cn(m);(N||S.width!==C.width||S.height!==C.height)&&(yn(y,"height",j()),h(c("marginRight"),Jn(n.gap)),h("width",x()),h("height",Y(),!0),S=C,s(Jo),T!==(T=D())&&(Rn(m,fl,T),s(Bc,T)))}function E(N){var C=n.padding,I=c(N?"right":"left");return C&&Jn(C[I]||(Xi(C)?0:C))||"0px"}function j(){var N="";return v&&(N=k(),Vi(N,"height or heightRatio is missing."),N="calc("+N+" - "+E(!1)+" - "+E(!0)+")"),N}function k(){return Jn(n.height||cn(w).width*n.heightRatio)}function x(){return n.autoWidth?null:Jn(n.fixedWidth)||(v?"":f())}function Y(){return Jn(n.fixedHeight)||(v?n.autoHeight?null:f():k())}function f(){var N=Jn(n.gap);return"calc((100%"+(N&&" + "+N)+")/"+(n.perPage||1)+(N&&" - "+N)+")"}function A(){return cn(w)[c("width")]}function W(N,C){var I=$(N||0);return I?cn(I.slide)[c("width")]+(C?0:le()):0}function z(N,C){var I=$(N);if(I){var V=cn(I.slide)[c("right")],K=cn(w)[c("left")];return rn(V-K)+(C?0:le())}return 0}function G(N){return z(e.length-1)-z(0)+W(0,N)}function le(){var N=$(0);return N&&parseFloat(yn(N.slide,c("marginRight")))||0}function J(N){return parseFloat(yn(y,c("padding"+(N?"Right":"Left"))))||0}function D(){return e.is(ho)||G(!0)>A()}return{mount:R,resize:H,listSize:A,slideSize:W,sliderSize:G,totalSize:z,getPadding:J,isOverflow:D}}var cd=2;function dd(e,t,n){var i=Nt(e),o=i.on,l=t.Elements,s=t.Slides,d=t.Direction.resolve,c=[],u;function m(){o(Vt,y),o([nn,$i],$),(u=S())&&(h(u),t.Layout.resize(!0))}function y(){w(),m()}function w(){si(c),An(c),i.destroy()}function $(){var T=S();u!==T&&(u<T||!T)&&i.emit(Vt)}function h(T){var R=s.get().slice(),P=R.length;if(P){for(;R.length<T;)Fo(R,R);Fo(R.slice(-T),R.slice(0,T)).forEach(function(H,E){var j=E<T,k=v(H.slide,E);j?Qr(k,R[0].slide):uo(l.list,k),Fo(c,k),s.register(k,E-T+(j?0:P),H.index)})}}function v(T,R){var P=T.cloneNode(!0);return $n(P,n.classes.clone),P.id=e.root.id+"-clone"+na(R+1),P}function S(){var T=n.clones;if(!e.is(Ni))T=0;else if(lo(T)){var R=n[d("fixedWidth")]&&t.Layout.slideSize(0),P=R&&eo(cn(l.track)[d("width")]/R);T=P||n[d("autoWidth")]&&e.length||n.perPage*cd}return T}return{mount:m,destroy:w}}function ud(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,m=d.totalSize,y=d.listSize,w=d.sliderSize,$=t.Direction,h=$.resolve,v=$.orient,S=t.Elements,T=S.list,R=S.track,P;function H(){P=t.Transition,o([Gn,Jo,nn,Vt],E)}function E(){t.Controller.isBusy()||(t.Scroll.cancel(),k(e.index),t.Slides.update())}function j(I,V,K,ee){I!==V&&N(I>K)&&(A(),x(f(G(),I>K),!0)),s(Fi),l(Wn,V,K,I),P.start(V,function(){s(Si),l(_i,V,K,I),ee&&ee()})}function k(I){x(z(I,!0))}function x(I,V){if(!e.is(ho)){var K=V?I:Y(I);yn(T,"transform","translate"+h("X")+"("+K+"px)"),I!==K&&l(ol)}}function Y(I){if(e.is(Ni)){var V=W(I),K=V>t.Controller.getEnd(),ee=V<0;(ee||K)&&(I=f(I,K))}return I}function f(I,V){var K=I-D(V),ee=w();return I-=v(ee*(eo(rn(K)/ee)||1))*(V?1:-1),I}function A(){x(G(),!0),P.cancel()}function W(I){for(var V=t.Slides.get(),K=0,ee=1/0,O=0;O<V.length;O++){var ge=V[O].index,g=rn(z(ge,!0)-I);if(g<=ee)ee=g,K=ge;else break}return K}function z(I,V){var K=v(m(I-1)-J(I));return V?le(K):K}function G(){var I=h("left");return cn(T)[I]-cn(R)[I]+v(u(!1))}function le(I){return n.trimSpace&&e.is(Ci)&&(I=hi(I,0,v(w(!0)-y()))),I}function J(I){var V=n.focus;return V==="center"?(y()-c(I,!0))/2:+V*c(I)||0}function D(I){return z(I?t.Controller.getEnd():0,!!n.trimSpace)}function N(I){var V=v(f(G(),I));return I?V>=0:V<=T[h("scrollWidth")]-cn(R)[h("width")]}function C(I,V){V=lo(V)?G():V;var K=I!==!0&&v(V)<v(D(!1)),ee=I!==!1&&v(V)>v(D(!0));return K||ee}return{mount:H,move:j,jump:k,translate:x,shift:f,cancel:A,toIndex:W,toPosition:z,getPosition:G,getLimit:D,exceededLimit:C,reposition:E}}function pd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=t.Move,d=s.getPosition,c=s.getLimit,u=s.toPosition,m=t.Slides,y=m.isEnough,w=m.getLength,$=n.omitEnd,h=e.is(Ni),v=e.is(Ci),S=Mt(G,!1),T=Mt(G,!0),R=n.start||0,P,H=R,E,j,k;function x(){Y(),o([nn,Vt,qo],Y),o(Jo,f)}function Y(){E=w(!0),j=n.perMove,k=n.perPage,P=N();var g=hi(R,0,$?P:E-1);g!==R&&(R=g,s.reposition())}function f(){P!==N()&&l(qo)}function A(g,he,re){if(!ge()){var be=z(g),ke=D(be);ke>-1&&(he||ke!==R)&&(K(ke),s.move(be,ke,H,re))}}function W(g,he,re,be){t.Scroll.scroll(g,he,re,function(){var ke=D(s.toIndex(d()));K($?Dn(ke,P):ke),be&&be()})}function z(g){var he=R;if(zn(g)){var re=g.match(/([+\-<>])(\d+)?/)||[],be=re[1],ke=re[2];be==="+"||be==="-"?he=le(R+ +(""+be+(+ke||1)),R):be===">"?he=ke?C(+ke):S(!0):be==="<"&&(he=T(!0))}else he=h?g:hi(g,0,P);return he}function G(g,he){var re=j||(O()?1:k),be=le(R+re*(g?-1:1),R,!(j||O()));return be===-1&&v&&!Ds(d(),c(!g),1)?g?0:P:he?be:D(be)}function le(g,he,re){if(y()||O()){var be=J(g);be!==g&&(he=g,g=be,re=!1),g<0||g>P?!j&&(_o(0,g,he,!0)||_o(P,he,g,!0))?g=C(I(g)):h?g=re?g<0?-(E%k||k):E:g:n.rewind?g=g<0?P:0:g=-1:re&&g!==he&&(g=C(I(he)+(g<he?-1:1)))}else g=-1;return g}function J(g){if(v&&n.trimSpace==="move"&&g!==R)for(var he=d();he===u(g,!0)&&_o(g,0,e.length-1,!n.rewind);)g<R?--g:++g;return g}function D(g){return h?(g+E)%E||0:g}function N(){for(var g=E-(O()||h&&j?1:k);$&&g-- >0;)if(u(E-1,!0)!==u(g,!0)){g++;break}return hi(g,0,E-1)}function C(g){return hi(O()?g:k*g,0,P)}function I(g){return O()?Dn(g,P):Vo((g>=P?E-1:g)/k)}function V(g){var he=s.toIndex(g);return v?hi(he,0,P):he}function K(g){g!==R&&(H=R,R=g)}function ee(g){return g?H:R}function O(){return!lo(n.focus)||n.isNavigation}function ge(){return e.state.is([Fi,so])&&!!n.waitForTransition}return{mount:x,go:A,scroll:W,getNext:S,getPrev:T,getAdjacent:G,getEnd:N,setIndex:K,getIndex:ee,toIndex:C,toPage:I,toDest:V,hasFocus:O,isBusy:ge}}var md="http://www.w3.org/2000/svg",gd="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",wo=40;function hd(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.emit,d=n.classes,c=n.i18n,u=t.Elements,m=t.Controller,y=u.arrows,w=u.track,$=y,h=u.prev,v=u.next,S,T,R={};function P(){E(),o(nn,H)}function H(){j(),P()}function E(){var W=n.arrows;W&&!(h&&v)&&Y(),h&&v&&(Zi(R,{prev:h,next:v}),Qi($,W?"":"none"),$n($,T=pa+"--"+n.direction),W&&(k(),A(),nt([h,v],go,w.id),s(Zs,h,v)))}function j(){i.destroy(),En($,T),S?(si(y?[h,v]:$),h=v=null):Cn([h,v],ua)}function k(){o([Gn,_i,Vt,di,qo],A),l(v,"click",Mt(x,">")),l(h,"click",Mt(x,"<"))}function x(W){m.go(W,!0)}function Y(){$=y||xi("div",d.arrows),h=f(!0),v=f(!1),S=!0,uo($,[h,v]),!y&&Qr($,w)}function f(W){var z='<button class="'+d.arrow+" "+(W?d.prev:d.next)+'" type="button"><svg xmlns="'+md+'" viewBox="0 0 '+wo+" "+wo+'" width="'+wo+'" height="'+wo+'" focusable="false"><path d="'+(n.arrowPath||gd)+'" />';return Bs(z)}function A(){if(h&&v){var W=e.index,z=m.getPrev(),G=m.getNext(),le=z>-1&&W<z?c.last:c.prev,J=G>-1&&W>G?c.first:c.next;h.disabled=z<0,v.disabled=G<0,nt(h,un,le),nt(v,un,J),s(Qs,h,v,z,G)}}return{arrows:R,mount:P,destroy:j,update:A}}var fd=ta+"-interval";function yd(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.emit,d=Qo(n.interval,e.go.bind(e,">"),k),c=d.isPaused,u=t.Elements,m=t.Elements,y=m.root,w=m.toggle,$=n.autoplay,h,v,S=$==="pause";function T(){$&&(R(),w&&nt(w,go,u.track.id),S||P(),j())}function R(){n.pauseOnHover&&l(y,"mouseenter mouseleave",function(Y){h=Y.type==="mouseenter",E()}),n.pauseOnFocus&&l(y,"focusin focusout",function(Y){v=Y.type==="focusin",E()}),w&&l(w,"click",function(){S?P():H(!0)}),o([Wn,Zo,Vt],d.rewind),o(Wn,x)}function P(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),v=h=S=!1,j(),s(aa))}function H(Y){Y===void 0&&(Y=!0),S=!!Y,j(),c()||(d.pause(),s(sa))}function E(){S||(h||v?H(!1):P())}function j(){w&&(Rn(w,li,!S),nt(w,un,n.i18n[S?"play":"pause"]))}function k(Y){var f=u.bar;f&&yn(f,"width",Y*100+"%"),s(nl,Y)}function x(Y){var f=t.Slides.getAt(Y);d.set(f&&+vn(f.slide,fd)||n.interval)}return{mount:T,destroy:d.cancel,play:P,pause:H,isPaused:c}}function vd(e,t,n){var i=Nt(e),o=i.on;function l(){n.cover&&(o(la,Mt(d,!0)),o([Gn,nn,Vt],Mt(s,!0)))}function s(c){t.Slides.forEach(function(u){var m=po(u.container||u.slide,"img");m&&m.src&&d(c,m,u)})}function d(c,u,m){m.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),Qi(u,c?"none":"")}return{mount:l,destroy:Mt(s,!1)}}var xd=10,bd=600,wd=.6,Sd=1.5,$d=800;function Cd(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,m=d.exceededLimit,y=d.translate,w=e.is(Ci),$,h,v=1;function S(){o(Wn,H),o([nn,Vt],E)}function T(k,x,Y,f,A){var W=c();if(H(),Y&&(!w||!m())){var z=t.Layout.sliderSize(),G=Hr(k)*z*Vo(rn(k)/z)||0;k=d.toPosition(t.Controller.toDest(k%z))+G}var le=Ds(W,k,1);v=1,x=le?0:x||Do(rn(k-W)/Sd,$d),h=f,$=Qo(x,R,Mt(P,W,k,A),1),s(so),l(Zo),$.start()}function R(){s(Si),h&&h(),l(di)}function P(k,x,Y,f){var A=c(),W=k+(x-k)*j(f),z=(W-A)*v;y(A+z),w&&!Y&&m()&&(v*=wd,rn(z)<xd&&T(u(m(!0)),bd,!1,h,!0))}function H(){$&&$.cancel()}function E(){$&&!$.isPaused()&&(H(),R())}function j(k){var x=n.easingFunc;return x?x(k):1-Math.pow(1-k,4)}return{mount:S,destroy:H,scroll:T,cancel:E}}var fi={passive:!1,capture:!0};function Td(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=i.bind,d=i.unbind,c=e.state,u=t.Move,m=t.Scroll,y=t.Controller,w=t.Elements.track,$=t.Media.reduce,h=t.Direction,v=h.resolve,S=h.orient,T=u.getPosition,R=u.exceededLimit,P,H,E,j,k,x=!1,Y,f,A;function W(){s(w,vr,_r,fi),s(w,xr,_r,fi),s(w,yl,G,fi),s(w,"click",D,{capture:!0}),s(w,"dragstart",In),o([Gn,nn],z)}function z(){var U=n.drag;ve(!U),j=U==="free"}function G(U){if(Y=!1,!f){var xe=ke(U);be(U.target)&&(xe||!U.button)&&(y.isBusy()?In(U,!0):(A=xe?w:window,k=c.is([Fi,so]),E=null,s(A,vr,le,fi),s(A,xr,J,fi),u.cancel(),m.cancel(),N(U)))}}function le(U){if(c.is(Wo)||(c.set(Wo),l(Xs)),U.cancelable)if(k){u.translate(P+re(O(U)));var xe=ge(U)>Oa,me=x!==(x=R());(xe||me)&&N(U),Y=!0,l(Ys),In(U)}else V(U)&&(k=I(U),In(U))}function J(U){c.is(Wo)&&(c.set(Si),l(Js)),k&&(C(U),In(U)),d(A,vr,le),d(A,xr,J),k=!1}function D(U){!f&&Y&&In(U,!0)}function N(U){E=H,H=U,P=T()}function C(U){var xe=K(U),me=ee(xe),pe=n.rewind&&n.rewindByDrag;$(!1),j?y.scroll(me,0,n.snap):e.is(ho)?y.go(S(Hr(xe))<0?pe?"<":"-":pe?">":"+"):e.is(Ci)&&x&&pe?y.go(R(!0)?">":"<"):y.go(y.toDest(me),!0),$(!0)}function I(U){var xe=n.dragMinThreshold,me=Xi(xe),pe=me&&xe.mouse||0,se=(me?xe.touch:+xe)||10;return rn(O(U))>(ke(U)?se:pe)}function V(U){return rn(O(U))>rn(O(U,!0))}function K(U){if(e.is(Ni)||!x){var xe=ge(U);if(xe&&xe<Oa)return O(U)/xe}return 0}function ee(U){return T()+Hr(U)*Dn(rn(U)*(n.flickPower||600),j?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function O(U,xe){return he(U,xe)-he(g(U),xe)}function ge(U){return Nr(U)-Nr(g(U))}function g(U){return H===U&&E||H}function he(U,xe){return(ke(U)?U.changedTouches[0]:U)["page"+v(xe?"Y":"X")]}function re(U){return U/(x&&e.is(Ci)?od:1)}function be(U){var xe=n.noDrag;return!Yi(U,"."+pl+", ."+rr)&&(!xe||!Yi(U,xe))}function ke(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function ae(){return k}function ve(U){f=U}return{mount:W,disable:ve,isDragging:ae}}var Ld={Spacebar:" ",Right:nr,Left:tr,Up:rl,Down:al};function ma(e){return e=zn(e)?e:e.key,Ld[e]||e}var ja="keydown";function Id(e,t,n){var i=Nt(e),o=i.on,l=i.bind,s=i.unbind,d=e.root,c=t.Direction.resolve,u,m;function y(){w(),o(nn,$),o(nn,w),o(Wn,v)}function w(){var T=n.keyboard;T&&(u=T==="global"?window:d,l(u,ja,S))}function $(){s(u,ja)}function h(T){m=T}function v(){var T=m;m=!0,_s(function(){m=T})}function S(T){if(!m){var R=ma(T);R===c(tr)?e.go("<"):R===c(nr)&&e.go(">")}}return{mount:y,destroy:$,disable:h}}var qi=ta+"-lazy",No=qi+"-srcset",Rd="["+qi+"], ["+No+"]";function Ed(e,t,n){var i=Nt(e),o=i.on,l=i.off,s=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[_i,di],m=[];function y(){n.lazyLoad&&(w(),o(Vt,w))}function w(){An(m),$(),c?T():(l(u),o(u,h),h())}function $(){t.Slides.forEach(function(R){ea(R.slide,Rd).forEach(function(P){var H=vn(P,qi),E=vn(P,No);if(H!==P.src||E!==P.srcset){var j=n.classes.spinner,k=P.parentElement,x=po(k,"."+j)||xi("span",j,k);m.push([P,R,x]),P.src||Qi(P,"none")}})})}function h(){m=m.filter(function(R){var P=n.perPage*((n.preloadPages||1)+1)-1;return R[1].isWithin(e.index,P)?v(R):!0}),m.length||l(u)}function v(R){var P=R[0];$n(R[1].slide,zr),s(P,"load error",Mt(S,R)),nt(P,"src",vn(P,qi)),nt(P,"srcset",vn(P,No)),Cn(P,qi),Cn(P,No)}function S(R,P){var H=R[0],E=R[1];En(E.slide,zr),P.type!=="error"&&(si(R[2]),Qi(H,""),d(la,H,E),d($i)),c&&T()}function T(){m.length&&v(m.shift())}return{mount:y,destroy:Mt(An,m),check:h}}function Md(e,t,n){var i=Nt(e),o=i.on,l=i.emit,s=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,m=u.hasFocus,y=u.getIndex,w=u.go,$=t.Direction.resolve,h=c.pagination,v=[],S,T;function R(){P(),o([nn,Vt,qo],R);var f=n.pagination;h&&Qi(h,f?"":"none"),f&&(o([Wn,Zo,di],Y),H(),Y(),l(el,{list:S,items:v},x(e.index)))}function P(){S&&(si(h?qn(S.children):S),En(S,T),An(v),S=null),i.destroy()}function H(){var f=e.length,A=n.classes,W=n.i18n,z=n.perPage,G=m()?u.getEnd()+1:eo(f/z);S=h||xi("ul",A.pagination,c.track.parentElement),$n(S,T=ar+"--"+k()),nt(S,Mn,"tablist"),nt(S,un,W.select),nt(S,da,k()===ir?"vertical":"");for(var le=0;le<G;le++){var J=xi("li",null,S),D=xi("button",{class:A.page,type:"button"},J),N=d.getIn(le).map(function(I){return I.slide.id}),C=!m()&&z>1?W.pageX:W.slideX;s(D,"click",Mt(E,le)),n.paginationKeyboard&&s(D,"keydown",Mt(j,le)),nt(J,Mn,"presentation"),nt(D,Mn,"tab"),nt(D,go,N.join(" ")),nt(D,un,Or(C,le+1)),nt(D,bi,-1),v.push({li:J,button:D,page:le})}}function E(f){w(">"+f,!0)}function j(f,A){var W=v.length,z=ma(A),G=k(),le=-1;z===$(nr,!1,G)?le=++f%W:z===$(tr,!1,G)?le=(--f+W)%W:z==="Home"?le=0:z==="End"&&(le=W-1);var J=v[le];J&&(js(J.button),w(">"+le),In(A,!0))}function k(){return n.paginationDirection||n.direction}function x(f){return v[u.toPage(f)]}function Y(){var f=x(y(!0)),A=x(y());if(f){var W=f.button;En(W,li),Cn(W,Wa),nt(W,bi,-1)}if(A){var z=A.button;$n(z,li),nt(z,Wa,!0),nt(z,bi,"")}l(tl,{list:S,items:v},f,A)}return{items:v,mount:R,destroy:P,getAt:x,update:Y}}var Pd=[" ","Enter"];function kd(e,t,n){var i=n.isNavigation,o=n.slideFocus,l=[];function s(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&m()}function d(){l.forEach(function(h){h.destroy()}),An(l)}function c(){d(),s()}function u(h,v){var S=Nt(h);S.on(Wn,function(T,R,P){v.go(v.is(Ni)?P:T)}),l.push(S)}function m(){var h=Nt(e),v=h.on;v(ia,w),v(il,$),v([Gn,nn],y),l.push(h),h.emit(ra,e.splides)}function y(){nt(t.Elements.list,da,n.direction===ir?"vertical":"")}function w(h){e.go(h.index)}function $(h,v){Zr(Pd,ma(v))&&(w(h),In(v))}return{setup:Mt(t.Media.set,{slideFocus:lo(o)?i:o},!0),mount:s,destroy:d,remount:c}}function Ad(e,t,n){var i=Nt(e),o=i.bind,l=0;function s(){n.wheel&&o(t.Elements.track,"wheel",d,fi)}function d(u){if(u.cancelable){var m=u.deltaY,y=m<0,w=Nr(u),$=n.wheelMinThreshold||0,h=n.wheelSleep||0;rn(m)>$&&w-l>h&&(e.go(y?"<":">"),l=w),c(y)&&In(u)}}function c(u){return!n.releaseWheel||e.state.is(Fi)||t.Controller.getAdjacent(u)!==-1}return{mount:s}}var Wd=90;function Fd(e,t,n){var i=Nt(e),o=i.on,l=t.Elements.track,s=n.live&&!n.isNavigation,d=xi("span",Qc),c=Qo(Wd,Mt(m,!1));function u(){s&&(w(!t.Autoplay.isPaused()),nt(l,Na,!0),d.textContent="…",o(aa,Mt(w,!0)),o(sa,Mt(w,!1)),o([_i,di],Mt(m,!0)))}function m($){nt(l,_a,$),$?(uo(l,d),c.start()):(si(d),c.cancel())}function y(){Cn(l,[Fa,Na,_a]),si(d)}function w($){s&&nt(l,Fa,$?"off":"polite")}return{mount:u,disable:w,destroy:y}}var _d=Object.freeze({__proto__:null,Media:Vc,Direction:qc,Elements:rd,Slides:sd,Layout:ld,Clones:dd,Move:ud,Controller:pd,Arrows:hd,Autoplay:yd,Cover:vd,Scroll:Cd,Drag:Td,Keyboard:Id,LazyLoad:Ed,Pagination:Md,Sync:kd,Wheel:Ad,Live:Fd}),Nd={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"},Hd={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:nd,i18n:Nd,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Od(e,t,n){var i=t.Slides;function o(){Nt(e).on([Gn,Vt],l)}function l(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function s(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),_s(c)}return{mount:o,start:s,cancel:_r}}function jd(e,t,n){var i=t.Move,o=t.Controller,l=t.Scroll,s=t.Elements.list,d=Mt(yn,s,"transition"),c;function u(){Nt(e).bind(s,"transitionend",function($){$.target===s&&c&&(y(),c())})}function m($,h){var v=i.toPosition($,!0),S=i.getPosition(),T=w($);rn(v-S)>=1&&T>=1?n.useScroll?l.scroll(v,T,!1,h):(d("transform "+T+"ms "+n.easing),i.translate(v,!0),c=h):(i.jump($),h())}function y(){d(""),l.cancel()}function w($){var h=n.rewindSpeed;if(e.is(Ci)&&h){var v=o.getIndex(!0),S=o.getEnd();if(v===0&&$>=S||v>=S&&$===0)return h}return n.speed}return{mount:u,start:m,cancel:y}}var Bd=(function(){function e(n,i){this.event=Nt(),this.Components={},this.state=zc(vi),this.splides=[],this._o={},this._E={};var o=zn(n)?zs(document,n):n;Vi(o,o+" is invalid."),this.root=o,i=Hn({label:vn(o,un)||"",labelledby:vn(o,ca)||""},Hd,e.defaults,i||{});try{Hn(i,JSON.parse(vn(o,ta)))}catch{Vi(!1,"Invalid JSON")}this._o=Object.create(Hn({},i))}var t=e.prototype;return t.mount=function(i,o){var l=this,s=this.state,d=this.Components;Vi(s.is([vi,zo]),"Already mounted!"),s.set(vi),this._C=d,this._T=o||this._T||(this.is(ho)?Od:jd),this._E=i||this._E;var c=Zi({},_d,this._E,{Transition:this._T});return ai(c,function(u,m){var y=u(l,d,l._o);d[m]=y,y.setup&&y.setup()}),ai(d,function(u){u.mount&&u.mount()}),this.emit(Gn),$n(this.root,ed),s.set(Si),this.emit(jr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Si)&&(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(qn(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(Vt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,l=this.state;return l.is(vi)?Nt(this).on(jr,this.destroy.bind(this,i)):(ai(this._C,function(s){s.destroy&&s.destroy(i)},!0),o.emit(oa),o.destroy(),i&&An(this.splides),l.set(zo)),this},Nc(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})(),ga=Bd;ga.defaults={};ga.STATES=Oc;var Ba=[[Gn,"onMounted"],[jr,"onReady"],[Wn,"onMove"],[_i,"onMoved"],[ia,"onClick"],[qs,"onActive"],[Gs,"onInactive"],[Ks,"onVisible"],[Us,"onHidden"],[Vt,"onRefresh"],[nn,"onUpdated"],[$i,"onResize"],[Jo,"onResized"],[Xs,"onDrag"],[Ys,"onDragging"],[Js,"onDragged"],[Zo,"onScroll"],[di,"onScrolled"],[oa,"onDestroy"],[Zs,"onArrowsMounted"],[Qs,"onArrowsUpdated"],[el,"onPaginationMounted"],[tl,"onPaginationUpdated"],[ra,"onNavigationMounted"],[aa,"onAutoplayPlay"],[nl,"onAutoplayPlaying"],[sa,"onAutoplayPause"],[la,"onLazyLoadLoaded"]];function ha(...e){return e.filter(Boolean).join(" ")}function Go(e){return e!==null&&typeof e=="object"}function Dr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Dr(n,t[i]));if(Go(e)&&Go(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Dr(e[o],t[o]))}return e===t}function zd(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Dd(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 Vr(e,t){const n=e;return Dd(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Go(i)?n[o]=Vr(Go(n[o])?n[o]:{},i):n[o]=i}),n}var Vd=({children:e,className:t,...n})=>a.createElement("div",{className:ha("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),fa=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new ga(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Vr({},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&&!Dr(this.options,e)&&(this.splide.options=e,this.options=Vr({},e));const t=this.getSlides();zd(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){Ba.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 a.createElement(t,{className:ha("splide",e),ref:this.splideRef,...this.omit(o,["options",...Ba.map(l=>l[1])])},n?a.createElement(Vd,null,i):i)}},ya=({children:e,className:t,...n})=>a.createElement("li",{className:ha("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),pt=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),mi=require("react-dom");function mc(e){return e.type==="object"&&e.version===1}const gc="ControlSlider-module__wrapper___sHEkd",hc="ControlSlider-module__hoverArrow___A-dOH",fc="ControlSlider-module__sliderItem___QQSkR",yc="ControlSlider-module__sliderImage___9hRl-",vc="ControlSlider-module__arrow___05ghY",xc="ControlSlider-module__arrowVertical___tBfVN",bc="ControlSlider-module__nextArrow___-30Yc",wc="ControlSlider-module__arrowInner___aEra3",Sc="ControlSlider-module__arrowIcon___S4ztF",$c="ControlSlider-module__arrowImg___2dwJW",Cc="ControlSlider-module__mirror___brd6U",Tc="ControlSlider-module__pagination___bicLF",Lc="ControlSlider-module__paginationInner___bT-P-",Ic="ControlSlider-module__paginationVertical___zYqKw",Rc="ControlSlider-module__paginationItem___nTRbk",Ec="ControlSlider-module__dot___p1Qun",Mc="ControlSlider-module__activeDot___LHFaj",kc="ControlSlider-module__paginationInsideBottom___R3FWn",Pc="ControlSlider-module__paginationInsideTop___V-qb-",Ac="ControlSlider-module__paginationOutsideBottom___14w8D",Wc="ControlSlider-module__paginationOutsideTop___SCLqB",Fc="ControlSlider-module__paginationInsideLeft___yOBRZ",_c="ControlSlider-module__paginationInsideRight___Rtt3o",Hc="ControlSlider-module__paginationOutsideLeft___lahaw",Nc="ControlSlider-module__paginationOutsideRight___EtuQa",Oc="ControlSlider-module__imgWrapper___UjEgB",jc="ControlSlider-module__captionBlock___dJ6-j",Bc="ControlSlider-module__captionTextWrapper___HFlpf",zc="ControlSlider-module__captionText___uGBVc",Dc="ControlSlider-module__active___WZK4G",Vc="ControlSlider-module__withPointerEvents___t-18M",Gc="ControlSlider-module__topLeftAlignment___zjnGM",qc="ControlSlider-module__topCenterAlignment___gD1xW",Kc="ControlSlider-module__topRightAlignment___NMapS",Uc="ControlSlider-module__middleLeftAlignment___OnUrY",Xc="ControlSlider-module__middleCenterAlignment___Tdkl0",Yc="ControlSlider-module__middleRightAlignment___wEbfX",Jc="ControlSlider-module__bottomLeftAlignment___cTP2-",Zc="ControlSlider-module__bottomCenterAlignment___c54fB",Qc="ControlSlider-module__bottomRightAlignment___kEwrz",ed="ControlSlider-module__clickOverlay___DZA28",td="ControlSlider-module__contain___pLyq7",nd="ControlSlider-module__cover___KdDat",Xe={wrapper:gc,hoverArrow:hc,sliderItem:fc,sliderImage:yc,arrow:vc,arrowVertical:xc,nextArrow:bc,arrowInner:wc,arrowIcon:Sc,arrowImg:$c,mirror:Cc,pagination:Tc,paginationInner:Lc,paginationVertical:Ic,paginationItem:Rc,dot:Ec,activeDot:Mc,paginationInsideBottom:kc,paginationInsideTop:Pc,paginationOutsideBottom:Ac,paginationOutsideTop:Wc,paginationInsideLeft:Fc,paginationInsideRight:_c,paginationOutsideLeft:Hc,paginationOutsideRight:Nc,imgWrapper:Oc,captionBlock:jc,captionTextWrapper:Bc,captionText:zc,active:Dc,withPointerEvents:Vc,topLeftAlignment:Gc,topCenterAlignment:qc,topRightAlignment:Kc,middleLeftAlignment:Uc,middleCenterAlignment:Xc,middleRightAlignment:Yc,bottomLeftAlignment:Jc,bottomCenterAlignment:Zc,bottomRightAlignment:Qc,clickOverlay:ed,contain:td,cover:nd};function id(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 od(e,t,n){return t&&id(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ga="(prefers-reduced-motion: reduce)",Si=1,rd=2,Li=3,ji=4,ho=5,Vo=6,Zo=7,ad={CREATED:Si,MOUNTED:rd,IDLE:Li,MOVING:ji,SCROLLING:ho,DRAGGING:Vo,DESTROYED:Zo};function Fn(e){e.length=0}function Xn(e,t,n){return Array.prototype.slice.call(e,t,n)}function jt(e){return e.bind.apply(e,[null].concat(Xn(arguments,1)))}var tl=setTimeout,Jr=function(){};function qa(e){return requestAnimationFrame(e)}function lr(e,t){return typeof t===e}function no(e){return!pa(e)&&lr("object",e)}var ua=Array.isArray,nl=jt(lr,"function"),Gn=jt(lr,"string"),fo=jt(lr,"undefined");function pa(e){return e===null}function il(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function yo(e){return ua(e)?e:[e]}function vn(e,t){yo(e).forEach(t)}function ma(e,t){return e.indexOf(t)>-1}function Go(e,t){return e.push.apply(e,yo(t)),e}function Mn(e,t,n){e&&vn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){Mn(e,Gn(t)?t.split(" "):t,!0)}function vo(e,t){vn(t,e.appendChild.bind(e))}function ga(e,t){vn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function io(e,t){return il(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ol(e,t){var n=e?Xn(e.children):[];return t?n.filter(function(i){return io(i,t)}):n}function xo(e,t){return t?ol(e,t)[0]:e.firstElementChild}var oo=Object.keys;function di(e,t,n){return e&&(n?oo(e).reverse():oo(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function ro(e){return Xn(arguments,1).forEach(function(t){di(t,function(n,i){e[i]=t[i]})}),e}function Bn(e){return Xn(arguments,1).forEach(function(t){di(t,function(n,i){ua(n)?e[i]=n.slice():no(n)?e[i]=Bn({},no(e[i])?e[i]:{},n):e[i]=n})}),e}function Ka(e,t){vn(t||oo(e),function(n){delete e[n]})}function Ln(e,t){vn(e,function(n){vn(t,function(i){n&&n.removeAttribute(i)})})}function lt(e,t,n){no(t)?di(t,function(i,o){lt(e,o,i)}):vn(e,function(i){pa(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function $i(e,t,n){var i=document.createElement(e);return t&&(Gn(t)?Tn(i,t):lt(i,t)),n&&vo(n,i),i}function xn(e,t,n){if(fo(n))return getComputedStyle(e)[t];pa(n)||(e.style[t]=""+n)}function ao(e,t){xn(e,"display",t)}function rl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function Ua(e,t){return e&&e.classList.contains(t)}function pn(e){return e.getBoundingClientRect()}function ui(e){vn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function al(e){return xo(new DOMParser().parseFromString(e,"text/html").body)}function En(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function sl(e,t){return e&&e.querySelector(t)}function ha(e,t){return t?Xn(e.querySelectorAll(t)):[]}function kn(e,t){Mn(e,t,!1)}function Zr(e){return e.timeStamp}function ti(e){return Gn(e)?e:e?e+"px":""}var bo="splide",fa="data-"+bo;function Ji(e,t){if(!e)throw new Error("["+bo+"] "+(t||""))}var qn=Math.min,Qo=Math.max,er=Math.floor,so=Math.ceil,sn=Math.abs;function ll(e,t,n){return sn(e-t)<n}function qo(e,t,n,i){var o=qn(t,n),s=Qo(t,n);return i?o<e&&e<s:o<=e&&e<=s}function xi(e,t,n){var i=qn(t,n),o=Qo(t,n);return qn(Qo(i,e),o)}function Qr(e){return+(e>0)-+(e<0)}function ea(e,t){return vn(t,function(n){e=e.replace("%s",""+n)}),e}function ya(e){return e<10?"0"+e:""+e}var Xa={};function sd(e){return""+e+ya(Xa[e]=(Xa[e]||0)+1)}function cl(){var e=[];function t(l,d,c,u){o(l,d,function(m,v,b){var S="addEventListener"in m,y=S?m.removeEventListener.bind(m,v,c,u):m.removeListener.bind(m,c);S?m.addEventListener(v,c,u):m.addListener(c),e.push([m,v,b,c,y])})}function n(l,d,c){o(l,d,function(u,m,v){e=e.filter(function(b){return b[0]===u&&b[1]===m&&b[2]===v&&(!c||b[3]===c)?(b[4](),!1):!0})})}function i(l,d,c){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:m,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,m,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){vn(l,function(u){u&&vn(d,function(m){m.split(" ").forEach(function(v){var b=v.split(".");c(u,b[0],b[1])})})})}function s(){e.forEach(function(l){l[4]()}),Fn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Yn="mounted",ta="ready",_n="move",Bi="moved",va="click",dl="active",ul="inactive",pl="visible",ml="hidden",Yt="refresh",rn="updated",Ii="resize",cr="resized",gl="drag",hl="dragging",fl="dragged",dr="scroll",gi="scrolled",ld="overflow",xa="destroy",yl="arrows:mounted",vl="arrows:updated",xl="pagination:mounted",bl="pagination:updated",ba="navigation:mounted",wa="autoplay:play",wl="autoplay:playing",Sa="autoplay:pause",$a="lazyload:loaded",Sl="sk",$l="sh",tr="ei";function qt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=cl();function i(s,l){n.bind(t,yo(s).join(" "),function(d){l.apply(l,ua(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Xn(arguments,1))}return e&&e.event.on(xa,n.destroy),ro(n,{bus:t,on:i,off:jt(n.unbind,t),emit:o})}function ur(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function m(){if(!c){if(l=e?qn((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return b();d=qa(m)}}function v(L){L||y(),s=o()-(L?l*e:0),c=!1,d=qa(m)}function b(){c=!0}function S(){s=o(),l=0,n&&n(l)}function y(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function w(L){e=L}function C(){return c}return{start:v,rewind:S,pause:b,cancel:y,set:w,isPaused:C}}function cd(e){var t=e;function n(o){t=o}function i(o){return ma(yo(o),t)}return{set:n,is:i}}function dd(e,t){var n=ur(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ud(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=cl(),d=[];function c(){var y=n.mediaQuery==="min";oo(o).sort(function(w,C){return y?+w-+C:+C-+w}).forEach(function(w){m(o[w],"("+(y?"min":"max")+"-width:"+w+"px)")}),m(s,Ga),v()}function u(y){y&&l.destroy()}function m(y,w){var C=matchMedia(w);l.bind(C,"change",v),d.push([y,C])}function v(){var y=i.is(Zo),w=n.direction,C=d.reduce(function(L,k){return Bn(L,k[1].matches?k[0]:{})},{});Ka(n),S(C),n.destroy?e.destroy(n.destroy==="completely"):y?(u(!0),e.mount()):w!==n.direction&&e.refresh()}function b(y){matchMedia(Ga).matches&&(y?Bn(n,s):Ka(n,oo(s)))}function S(y,w,C){Bn(n,y),w&&Bn(Object.getPrototypeOf(n),y),(C||!i.is(Si))&&e.emit(rn,n)}return{setup:c,destroy:u,reduce:b,set:S}}var pr="Arrow",mr=pr+"Left",gr=pr+"Right",Cl=pr+"Up",Tl=pr+"Down",Ya="rtl",hr="ttb",Er={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Cl,gr],ArrowRight:[Tl,mr]};function pd(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===Ya&&!l?1:d===hr?0:-1;return Er[s]&&Er[s][c]||s.replace(/width|left|right/i,function(u,m){var v=Er[u.toLowerCase()][c]||u;return m>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(s){return s*(n.direction===Ya?1:-1)}return{resolve:i,orient:o}}var Pn="role",Ci="tabindex",md="disabled",wn="aria-",wo=wn+"controls",Ll=wn+"current",Ja=wn+"selected",gn=wn+"label",Ca=wn+"labelledby",Il=wn+"hidden",Ta=wn+"orientation",lo=wn+"roledescription",Za=wn+"live",Qa=wn+"busy",es=wn+"atomic",La=[Pn,Ci,md,wo,Ll,gn,Ca,Il,Ta,lo],In=bo+"__",Jn="is-",Mr=bo,ts=In+"track",gd=In+"list",fr=In+"slide",Rl=fr+"--clone",hd=fr+"__container",Ia=In+"arrows",yr=In+"arrow",El=yr+"--prev",Ml=yr+"--next",vr=In+"pagination",kl=vr+"__page",fd=In+"progress",yd=fd+"__bar",vd=In+"toggle",xd=In+"spinner",bd=In+"sr",wd=Jn+"initialized",pi=Jn+"active",Pl=Jn+"prev",Al=Jn+"next",na=Jn+"visible",ia=Jn+"loading",Wl=Jn+"focus-in",Fl=Jn+"overflow",Sd=[pi,na,Pl,Al,ia,Wl,Fl],$d={slide:fr,clone:Rl,arrows:Ia,arrow:yr,prev:El,next:Ml,pagination:vr,page:kl,spinner:xd};function Cd(e,t){if(nl(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!io(n,t);)n=n.parentElement;return n}var Td=5,ns=200,_l="touchstart mousedown",kr="touchmove mousemove",Pr="touchend touchcancel mouseup click";function Ld(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],m=[],v=[],b,S,y;function w(){A(),O(),k()}function C(){o(Yt,L),o(Yt,w),o(rn,k),s(document,_l+" keydown",function(R){y=R.type==="keydown"},{capture:!0}),s(l,"focusin",function(){Mn(l,Wl,!!y)})}function L(R){var x=La.concat("style");Fn(u),kn(l,m),kn(b,v),Ln([b,S],x),Ln(l,R?x:["style",lo])}function k(){kn(l,m),kn(b,v),m=D(Mr),v=D(ts),Tn(l,m),Tn(b,v),lt(l,gn,n.label),lt(l,Ca,n.labelledby)}function A(){b=P("."+ts),S=xo(b,"."+gd),Ji(b&&S,"A track/list element is missing."),Go(u,ol(S,"."+fr+":not(."+Rl+")")),di({arrows:Ia,pagination:vr,prev:El,next:Ml,bar:yd,toggle:vd},function(R,x){c[x]=P("."+R)}),ro(c,{root:l,track:b,list:S,slides:u})}function O(){var R=l.id||sd(bo),x=n.role;l.id=R,b.id=b.id||R+"-track",S.id=S.id||R+"-list",!bn(l,Pn)&&l.tagName!=="SECTION"&&x&&lt(l,Pn,x),lt(l,lo,d.carousel),lt(S,Pn,"presentation")}function P(R){var x=sl(l,R);return x&&Cd(x,"."+Mr)===l?x:void 0}function D(R){return[R+"--"+n.type,R+"--"+n.direction,n.drag&&R+"--draggable",n.isNavigation&&R+"--nav",R===Mr&&pi]}return ro(c,{setup:w,mount:C,destroy:L})}var Ri="slide",zi="loop",So="fade";function Id(e,t,n,i){var o=qt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,m=e.options,v=m.isNavigation,b=m.updateOnMove,S=m.i18n,y=m.pagination,w=m.slideFocus,C=c.Direction.resolve,L=bn(i,"style"),k=bn(i,gn),A=n>-1,O=xo(i,"."+hd),P;function D(){A||(i.id=u.id+"-slide"+ya(t+1),lt(i,Pn,y?"tabpanel":"group"),lt(i,lo,S.slide),lt(i,gn,k||ea(S.slideLabel,[t+1,e.length]))),R()}function R(){d(i,"click",jt(l,va,H)),d(i,"keydown",jt(l,Sl,H)),s([Bi,$l,gi],I),s(ba,U),b&&s(_n,h)}function x(){P=!0,o.destroy(),kn(i,Sd),Ln(i,La),lt(i,"style",L),lt(i,gn,k||"")}function U(){var $=e.splides.map(function(M){var q=M.splide.Components.Slides.getAt(t);return q?q.slide.id:""}).join(" ");lt(i,gn,ea(S.slideX,(A?n:t)+1)),lt(i,wo,$),lt(i,Pn,w?"button":""),w&&Ln(i,lo)}function h(){P||I()}function I(){if(!P){var $=e.index;W(),V(),Mn(i,Pl,t===$-1),Mn(i,Al,t===$+1)}}function W(){var $=ae();$!==Ua(i,pi)&&(Mn(i,pi,$),lt(i,Ll,v&&$||""),l($?dl:ul,H))}function V(){var $=Z(),M=!$&&(!ae()||A);if(e.state.is([ji,ho])||lt(i,Il,M||""),lt(ha(i,m.focusableNodes||""),Ci,M?-1:""),w&&lt(i,Ci,M?-1:0),$!==Ua(i,na)&&(Mn(i,na,$),l($?pl:ml,H)),!$&&document.activeElement===i){var q=c.Slides.getAt(e.index);q&&rl(q.slide)}}function Y($,M,q){xn(q&&O||i,$,M)}function ae(){var $=e.index;return $===t||m.cloneStatus&&$===n}function Z(){if(e.is(So))return ae();var $=pn(c.Elements.track),M=pn(i),q=C("left",!0),z=C("right",!0);return er($[q])<=so(M[q])&&er(M[z])<=so($[z])}function G($,M){var q=sn($-t);return!A&&(m.rewind||e.is(zi))&&(q=qn(q,e.length-q)),q<=M}var H={index:t,slideIndex:n,slide:i,container:O,isClone:A,mount:D,destroy:x,update:I,style:Y,isWithin:G};return H}function Rd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,m=[];function v(){b(),o(Yt,S),o(Yt,b)}function b(){c.forEach(function(I,W){w(I,W,-1)})}function S(){P(function(I){I.destroy()}),Fn(m)}function y(){P(function(I){I.update()})}function w(I,W,V){var Y=Id(e,W,V,I);Y.mount(),m.push(Y),m.sort(function(ae,Z){return ae.index-Z.index})}function C(I){return I?D(function(W){return!W.isClone}):m}function L(I){var W=t.Controller,V=W.toIndex(I),Y=W.hasFocus()?1:n.perPage;return D(function(ae){return qo(ae.index,V,V+Y-1)})}function k(I){return D(I)[0]}function A(I,W){vn(I,function(V){if(Gn(V)&&(V=al(V)),il(V)){var Y=c[W];Y?ga(V,Y):vo(u,V),Tn(V,n.classes.slide),x(V,jt(s,Ii))}}),s(Yt)}function O(I){ui(D(I).map(function(W){return W.slide})),s(Yt)}function P(I,W){C(W).forEach(I)}function D(I){return m.filter(nl(I)?I:function(W){return Gn(I)?io(W.slide,I):ma(yo(I),W.index)})}function R(I,W,V){P(function(Y){Y.style(I,W,V)})}function x(I,W){var V=ha(I,"img"),Y=V.length;Y?V.forEach(function(ae){l(ae,"load error",function(){--Y||W()})}):W()}function U(I){return I?c.length:m.length}function h(){return m.length>n.perPage}return{mount:v,destroy:S,update:y,register:w,get:C,getIn:L,getAt:k,add:A,remove:O,forEach:P,filter:D,style:R,getLength:U,isEnough:h}}function Ed(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,m=u.root,v=u.track,b=u.list,S=d.getAt,y=d.style,w,C,L;function k(){A(),s(window,"resize load",dd(jt(l,Ii))),o([rn,Yt],A),o(Ii,O)}function A(){w=n.direction===hr,xn(m,"maxWidth",ti(n.width)),xn(v,c("paddingLeft"),P(!1)),xn(v,c("paddingRight"),P(!0)),O(!0)}function O(H){var $=pn(m);(H||C.width!==$.width||C.height!==$.height)&&(xn(v,"height",D()),y(c("marginRight"),ti(n.gap)),y("width",x()),y("height",U(),!0),C=$,l(cr),L!==(L=G())&&(Mn(m,Fl,L),l(ld,L)))}function P(H){var $=n.padding,M=c(H?"right":"left");return $&&ti($[M]||(no($)?0:$))||"0px"}function D(){var H="";return w&&(H=R(),Ji(H,"height or heightRatio is missing."),H="calc("+H+" - "+P(!1)+" - "+P(!0)+")"),H}function R(){return ti(n.height||pn(b).width*n.heightRatio)}function x(){return n.autoWidth?null:ti(n.fixedWidth)||(w?"":h())}function U(){return ti(n.fixedHeight)||(w?n.autoHeight?null:h():R())}function h(){var H=ti(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function I(){return pn(b)[c("width")]}function W(H,$){var M=S(H||0);return M?pn(M.slide)[c("width")]+($?0:ae()):0}function V(H,$){var M=S(H);if(M){var q=pn(M.slide)[c("right")],z=pn(b)[c("left")];return sn(q-z)+($?0:ae())}return 0}function Y(H){return V(e.length-1)-V(0)+W(0,H)}function ae(){var H=S(0);return H&&parseFloat(xn(H.slide,c("marginRight")))||0}function Z(H){return parseFloat(xn(v,c("padding"+(H?"Right":"Left"))))||0}function G(){return e.is(So)||Y(!0)>I()}return{mount:k,resize:O,listSize:I,slideSize:W,sliderSize:Y,totalSize:V,getPadding:Z,isOverflow:G}}var Md=2;function kd(e,t,n){var i=qt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function m(){o(Yt,v),o([rn,Ii],S),(u=C())&&(y(u),t.Layout.resize(!0))}function v(){b(),m()}function b(){ui(c),Fn(c),i.destroy()}function S(){var L=C();u!==L&&(u<L||!L)&&i.emit(Yt)}function y(L){var k=l.get().slice(),A=k.length;if(A){for(;k.length<L;)Go(k,k);Go(k.slice(-L),k.slice(0,L)).forEach(function(O,P){var D=P<L,R=w(O.slide,P);D?ga(R,k[0].slide):vo(s.list,R),Go(c,R),l.register(R,P-L+(D?0:A),O.index)})}}function w(L,k){var A=L.cloneNode(!0);return Tn(A,n.classes.clone),A.id=e.root.id+"-clone"+ya(k+1),A}function C(){var L=n.clones;if(!e.is(zi))L=0;else if(fo(L)){var k=n[d("fixedWidth")]&&t.Layout.slideSize(0),A=k&&so(pn(s.track)[d("width")]/k);L=A||n[d("autoWidth")]&&e.length||n.perPage*Md}return L}return{mount:m,destroy:b}}function Pd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,m=d.totalSize,v=d.listSize,b=d.sliderSize,S=t.Direction,y=S.resolve,w=S.orient,C=t.Elements,L=C.list,k=C.track,A;function O(){A=t.Transition,o([Yn,cr,rn,Yt],P)}function P(){t.Controller.isBusy()||(t.Scroll.cancel(),R(e.index),t.Slides.update())}function D(M,q,z,ee){M!==q&&H(M>z)&&(I(),x(h(Y(),M>z),!0)),l(ji),s(_n,q,z,M),A.start(q,function(){l(Li),s(Bi,q,z,M),ee&&ee()})}function R(M){x(V(M,!0))}function x(M,q){if(!e.is(So)){var z=q?M:U(M);xn(L,"transform","translate"+y("X")+"("+z+"px)"),M!==z&&s($l)}}function U(M){if(e.is(zi)){var q=W(M),z=q>t.Controller.getEnd(),ee=q<0;(ee||z)&&(M=h(M,z))}return M}function h(M,q){var z=M-G(q),ee=b();return M-=w(ee*(so(sn(z)/ee)||1))*(q?1:-1),M}function I(){x(Y(),!0),A.cancel()}function W(M){for(var q=t.Slides.get(),z=0,ee=1/0,_=0;_<q.length;_++){var ye=q[_].index,f=sn(V(ye,!0)-M);if(f<=ee)ee=f,z=ye;else break}return z}function V(M,q){var z=w(m(M-1)-Z(M));return q?ae(z):z}function Y(){var M=y("left");return pn(L)[M]-pn(k)[M]+w(u(!1))}function ae(M){return n.trimSpace&&e.is(Ri)&&(M=xi(M,0,w(b(!0)-v()))),M}function Z(M){var q=n.focus;return q==="center"?(v()-c(M,!0))/2:+q*c(M)||0}function G(M){return V(M?t.Controller.getEnd():0,!!n.trimSpace)}function H(M){var q=w(h(Y(),M));return M?q>=0:q<=L[y("scrollWidth")]-pn(k)[y("width")]}function $(M,q){q=fo(q)?Y():q;var z=M!==!0&&w(q)<w(G(!1)),ee=M!==!1&&w(q)>w(G(!0));return z||ee}return{mount:O,move:D,jump:R,translate:x,shift:h,cancel:I,toIndex:W,toPosition:V,getPosition:Y,getLimit:G,exceededLimit:$,reposition:P}}function Ad(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,m=t.Slides,v=m.isEnough,b=m.getLength,S=n.omitEnd,y=e.is(zi),w=e.is(Ri),C=jt(Y,!1),L=jt(Y,!0),k=n.start||0,A,O=k,P,D,R;function x(){U(),o([rn,Yt,tr],U),o(cr,h)}function U(){P=b(!0),D=n.perMove,R=n.perPage,A=H();var f=xi(k,0,S?A:P-1);f!==k&&(k=f,l.reposition())}function h(){A!==H()&&s(tr)}function I(f,ve,K){if(!ye()){var le=V(f),$e=G(le);$e>-1&&(ve||$e!==k)&&(z($e),l.move(le,$e,O,K))}}function W(f,ve,K,le){t.Scroll.scroll(f,ve,K,function(){var $e=G(l.toIndex(d()));z(S?qn($e,A):$e),le&&le()})}function V(f){var ve=k;if(Gn(f)){var K=f.match(/([+\-<>])(\d+)?/)||[],le=K[1],$e=K[2];le==="+"||le==="-"?ve=ae(k+ +(""+le+(+$e||1)),k):le===">"?ve=$e?$(+$e):C(!0):le==="<"&&(ve=L(!0))}else ve=y?f:xi(f,0,A);return ve}function Y(f,ve){var K=D||(_()?1:R),le=ae(k+K*(f?-1:1),k,!(D||_()));return le===-1&&w&&!ll(d(),c(!f),1)?f?0:A:ve?le:G(le)}function ae(f,ve,K){if(v()||_()){var le=Z(f);le!==f&&(ve=f,f=le,K=!1),f<0||f>A?!D&&(qo(0,f,ve,!0)||qo(A,ve,f,!0))?f=$(M(f)):y?f=K?f<0?-(P%R||R):P:f:n.rewind?f=f<0?A:0:f=-1:K&&f!==ve&&(f=$(M(ve)+(f<ve?-1:1)))}else f=-1;return f}function Z(f){if(w&&n.trimSpace==="move"&&f!==k)for(var ve=d();ve===u(f,!0)&&qo(f,0,e.length-1,!n.rewind);)f<k?--f:++f;return f}function G(f){return y?(f+P)%P||0:f}function H(){for(var f=P-(_()||y&&D?1:R);S&&f-- >0;)if(u(P-1,!0)!==u(f,!0)){f++;break}return xi(f,0,P-1)}function $(f){return xi(_()?f:R*f,0,A)}function M(f){return _()?qn(f,A):er((f>=A?P-1:f)/R)}function q(f){var ve=l.toIndex(f);return w?xi(ve,0,A):ve}function z(f){f!==k&&(O=k,k=f)}function ee(f){return f?O:k}function _(){return!fo(n.focus)||n.isNavigation}function ye(){return e.state.is([ji,ho])&&!!n.waitForTransition}return{mount:x,go:I,scroll:W,getNext:C,getPrev:L,getAdjacent:Y,getEnd:H,setIndex:z,getIndex:ee,toIndex:$,toPage:M,toDest:q,hasFocus:_,isBusy:ye}}var Wd="http://www.w3.org/2000/svg",Fd="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",Ro=40;function _d(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,m=t.Controller,v=u.arrows,b=u.track,S=v,y=u.prev,w=u.next,C,L,k={};function A(){P(),o(rn,O)}function O(){D(),A()}function P(){var W=n.arrows;W&&!(y&&w)&&U(),y&&w&&(ro(k,{prev:y,next:w}),ao(S,W?"":"none"),Tn(S,L=Ia+"--"+n.direction),W&&(R(),I(),lt([y,w],wo,b.id),l(yl,y,w)))}function D(){i.destroy(),kn(S,L),C?(ui(v?[y,w]:S),y=w=null):Ln([y,w],La)}function R(){o([Yn,Bi,Yt,gi,tr],I),s(w,"click",jt(x,">")),s(y,"click",jt(x,"<"))}function x(W){m.go(W,!0)}function U(){S=v||$i("div",d.arrows),y=h(!0),w=h(!1),C=!0,vo(S,[y,w]),!v&&ga(S,b)}function h(W){var V='<button class="'+d.arrow+" "+(W?d.prev:d.next)+'" type="button"><svg xmlns="'+Wd+'" viewBox="0 0 '+Ro+" "+Ro+'" width="'+Ro+'" height="'+Ro+'" focusable="false"><path d="'+(n.arrowPath||Fd)+'" />';return al(V)}function I(){if(y&&w){var W=e.index,V=m.getPrev(),Y=m.getNext(),ae=V>-1&&W<V?c.last:c.prev,Z=Y>-1&&W>Y?c.first:c.next;y.disabled=V<0,w.disabled=Y<0,lt(y,gn,ae),lt(w,gn,Z),l(vl,y,w,V,Y)}}return{arrows:k,mount:A,destroy:D,update:I}}var Hd=fa+"-interval";function Nd(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.emit,d=ur(n.interval,e.go.bind(e,">"),R),c=d.isPaused,u=t.Elements,m=t.Elements,v=m.root,b=m.toggle,S=n.autoplay,y,w,C=S==="pause";function L(){S&&(k(),b&&lt(b,wo,u.track.id),C||A(),D())}function k(){n.pauseOnHover&&s(v,"mouseenter mouseleave",function(U){y=U.type==="mouseenter",P()}),n.pauseOnFocus&&s(v,"focusin focusout",function(U){w=U.type==="focusin",P()}),b&&s(b,"click",function(){C?A():O(!0)}),o([_n,dr,Yt],d.rewind),o(_n,x)}function A(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),w=y=C=!1,D(),l(wa))}function O(U){U===void 0&&(U=!0),C=!!U,D(),c()||(d.pause(),l(Sa))}function P(){C||(y||w?O(!1):A())}function D(){b&&(Mn(b,pi,!C),lt(b,gn,n.i18n[C?"play":"pause"]))}function R(U){var h=u.bar;h&&xn(h,"width",U*100+"%"),l(wl,U)}function x(U){var h=t.Slides.getAt(U);d.set(h&&+bn(h.slide,Hd)||n.interval)}return{mount:L,destroy:d.cancel,play:A,pause:O,isPaused:c}}function Od(e,t,n){var i=qt(e),o=i.on;function s(){n.cover&&(o($a,jt(d,!0)),o([Yn,rn,Yt],jt(l,!0)))}function l(c){t.Slides.forEach(function(u){var m=xo(u.container||u.slide,"img");m&&m.src&&d(c,m,u)})}function d(c,u,m){m.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),ao(u,c?"none":"")}return{mount:s,destroy:jt(l,!1)}}var jd=10,Bd=600,zd=.6,Dd=1.5,Vd=800;function Gd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,m=d.exceededLimit,v=d.translate,b=e.is(Ri),S,y,w=1;function C(){o(_n,O),o([rn,Yt],P)}function L(R,x,U,h,I){var W=c();if(O(),U&&(!b||!m())){var V=t.Layout.sliderSize(),Y=Qr(R)*V*er(sn(R)/V)||0;R=d.toPosition(t.Controller.toDest(R%V))+Y}var ae=ll(W,R,1);w=1,x=ae?0:x||Qo(sn(R-W)/Dd,Vd),y=h,S=ur(x,k,jt(A,W,R,I),1),l(ho),s(dr),S.start()}function k(){l(Li),y&&y(),s(gi)}function A(R,x,U,h){var I=c(),W=R+(x-R)*D(h),V=(W-I)*w;v(I+V),b&&!U&&m()&&(w*=zd,sn(V)<jd&&L(u(m(!0)),Bd,!1,y,!0))}function O(){S&&S.cancel()}function P(){S&&!S.isPaused()&&(O(),k())}function D(R){var x=n.easingFunc;return x?x(R):1-Math.pow(1-R,4)}return{mount:C,destroy:O,scroll:L,cancel:P}}var bi={passive:!1,capture:!0};function qd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,m=t.Scroll,v=t.Controller,b=t.Elements.track,S=t.Media.reduce,y=t.Direction,w=y.resolve,C=y.orient,L=u.getPosition,k=u.exceededLimit,A,O,P,D,R,x=!1,U,h,I;function W(){l(b,kr,Jr,bi),l(b,Pr,Jr,bi),l(b,_l,Y,bi),l(b,"click",G,{capture:!0}),l(b,"dragstart",En),o([Yn,rn],V)}function V(){var X=n.drag;fe(!X),D=X==="free"}function Y(X){if(U=!1,!h){var be=$e(X);le(X.target)&&(be||!X.button)&&(v.isBusy()?En(X,!0):(I=be?b:window,R=c.is([ji,ho]),P=null,l(I,kr,ae,bi),l(I,Pr,Z,bi),u.cancel(),m.cancel(),H(X)))}}function ae(X){if(c.is(Vo)||(c.set(Vo),s(gl)),X.cancelable)if(R){u.translate(A+K(_(X)));var be=ye(X)>ns,xe=x!==(x=k());(be||xe)&&H(X),U=!0,s(hl),En(X)}else q(X)&&(R=M(X),En(X))}function Z(X){c.is(Vo)&&(c.set(Li),s(fl)),R&&($(X),En(X)),d(I,kr,ae),d(I,Pr,Z),R=!1}function G(X){!h&&U&&En(X,!0)}function H(X){P=O,O=X,A=L()}function $(X){var be=z(X),xe=ee(be),pe=n.rewind&&n.rewindByDrag;S(!1),D?v.scroll(xe,0,n.snap):e.is(So)?v.go(C(Qr(be))<0?pe?"<":"-":pe?">":"+"):e.is(Ri)&&x&&pe?v.go(k(!0)?">":"<"):v.go(v.toDest(xe),!0),S(!0)}function M(X){var be=n.dragMinThreshold,xe=no(be),pe=xe&&be.mouse||0,se=(xe?be.touch:+be)||10;return sn(_(X))>($e(X)?se:pe)}function q(X){return sn(_(X))>sn(_(X,!0))}function z(X){if(e.is(zi)||!x){var be=ye(X);if(be&&be<ns)return _(X)/be}return 0}function ee(X){return L()+Qr(X)*qn(sn(X)*(n.flickPower||600),D?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function _(X,be){return ve(X,be)-ve(f(X),be)}function ye(X){return Zr(X)-Zr(f(X))}function f(X){return O===X&&P||O}function ve(X,be){return($e(X)?X.changedTouches[0]:X)["page"+w(be?"Y":"X")]}function K(X){return X/(x&&e.is(Ri)?Td:1)}function le(X){var be=n.noDrag;return!io(X,"."+kl+", ."+yr)&&(!be||!io(X,be))}function $e(X){return typeof TouchEvent<"u"&&X instanceof TouchEvent}function oe(){return R}function fe(X){h=X}return{mount:W,disable:fe,isDragging:oe}}var Kd={Spacebar:" ",Right:gr,Left:mr,Up:Cl,Down:Tl};function Ra(e){return e=Gn(e)?e:e.key,Kd[e]||e}var is="keydown";function Ud(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,m;function v(){b(),o(rn,S),o(rn,b),o(_n,w)}function b(){var L=n.keyboard;L&&(u=L==="global"?window:d,s(u,is,C))}function S(){l(u,is)}function y(L){m=L}function w(){var L=m;m=!0,tl(function(){m=L})}function C(L){if(!m){var k=Ra(L);k===c(mr)?e.go("<"):k===c(gr)&&e.go(">")}}return{mount:v,destroy:S,disable:y}}var Zi=fa+"-lazy",Ko=Zi+"-srcset",Xd="["+Zi+"], ["+Ko+"]";function Yd(e,t,n){var i=qt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Bi,gi],m=[];function v(){n.lazyLoad&&(b(),o(Yt,b))}function b(){Fn(m),S(),c?L():(s(u),o(u,y),y())}function S(){t.Slides.forEach(function(k){ha(k.slide,Xd).forEach(function(A){var O=bn(A,Zi),P=bn(A,Ko);if(O!==A.src||P!==A.srcset){var D=n.classes.spinner,R=A.parentElement,x=xo(R,"."+D)||$i("span",D,R);m.push([A,k,x]),A.src||ao(A,"none")}})})}function y(){m=m.filter(function(k){var A=n.perPage*((n.preloadPages||1)+1)-1;return k[1].isWithin(e.index,A)?w(k):!0}),m.length||s(u)}function w(k){var A=k[0];Tn(k[1].slide,ia),l(A,"load error",jt(C,k)),lt(A,"src",bn(A,Zi)),lt(A,"srcset",bn(A,Ko)),Ln(A,Zi),Ln(A,Ko)}function C(k,A){var O=k[0],P=k[1];kn(P.slide,ia),A.type!=="error"&&(ui(k[2]),ao(O,""),d($a,O,P),d(Ii)),c&&L()}function L(){m.length&&w(m.shift())}return{mount:v,destroy:jt(Fn,m),check:y}}function Jd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,m=u.hasFocus,v=u.getIndex,b=u.go,S=t.Direction.resolve,y=c.pagination,w=[],C,L;function k(){A(),o([rn,Yt,tr],k);var h=n.pagination;y&&ao(y,h?"":"none"),h&&(o([_n,dr,gi],U),O(),U(),s(xl,{list:C,items:w},x(e.index)))}function A(){C&&(ui(y?Xn(C.children):C),kn(C,L),Fn(w),C=null),i.destroy()}function O(){var h=e.length,I=n.classes,W=n.i18n,V=n.perPage,Y=m()?u.getEnd()+1:so(h/V);C=y||$i("ul",I.pagination,c.track.parentElement),Tn(C,L=vr+"--"+R()),lt(C,Pn,"tablist"),lt(C,gn,W.select),lt(C,Ta,R()===hr?"vertical":"");for(var ae=0;ae<Y;ae++){var Z=$i("li",null,C),G=$i("button",{class:I.page,type:"button"},Z),H=d.getIn(ae).map(function(M){return M.slide.id}),$=!m()&&V>1?W.pageX:W.slideX;l(G,"click",jt(P,ae)),n.paginationKeyboard&&l(G,"keydown",jt(D,ae)),lt(Z,Pn,"presentation"),lt(G,Pn,"tab"),lt(G,wo,H.join(" ")),lt(G,gn,ea($,ae+1)),lt(G,Ci,-1),w.push({li:Z,button:G,page:ae})}}function P(h){b(">"+h,!0)}function D(h,I){var W=w.length,V=Ra(I),Y=R(),ae=-1;V===S(gr,!1,Y)?ae=++h%W:V===S(mr,!1,Y)?ae=(--h+W)%W:V==="Home"?ae=0:V==="End"&&(ae=W-1);var Z=w[ae];Z&&(rl(Z.button),b(">"+ae),En(I,!0))}function R(){return n.paginationDirection||n.direction}function x(h){return w[u.toPage(h)]}function U(){var h=x(v(!0)),I=x(v());if(h){var W=h.button;kn(W,pi),Ln(W,Ja),lt(W,Ci,-1)}if(I){var V=I.button;Tn(V,pi),lt(V,Ja,!0),lt(V,Ci,"")}s(bl,{list:C,items:w},h,I)}return{items:w,mount:k,destroy:A,getAt:x,update:U}}var Zd=[" ","Enter"];function Qd(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(y){y.isParent||(u(e,y.splide),u(y.splide,e))}),i&&m()}function d(){s.forEach(function(y){y.destroy()}),Fn(s)}function c(){d(),l()}function u(y,w){var C=qt(y);C.on(_n,function(L,k,A){w.go(w.is(zi)?A:L)}),s.push(C)}function m(){var y=qt(e),w=y.on;w(va,b),w(Sl,S),w([Yn,rn],v),s.push(y),y.emit(ba,e.splides)}function v(){lt(t.Elements.list,Ta,n.direction===hr?"vertical":"")}function b(y){e.go(y.index)}function S(y,w){ma(Zd,Ra(w))&&(b(y),En(w))}return{setup:jt(t.Media.set,{slideFocus:fo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function eu(e,t,n){var i=qt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,bi)}function d(u){if(u.cancelable){var m=u.deltaY,v=m<0,b=Zr(u),S=n.wheelMinThreshold||0,y=n.wheelSleep||0;sn(m)>S&&b-s>y&&(e.go(v?"<":">"),s=b),c(v)&&En(u)}}function c(u){return!n.releaseWheel||e.state.is(ji)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var tu=90;function nu(e,t,n){var i=qt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=$i("span",bd),c=ur(tu,jt(m,!1));function u(){l&&(b(!t.Autoplay.isPaused()),lt(s,es,!0),d.textContent="…",o(wa,jt(b,!0)),o(Sa,jt(b,!1)),o([Bi,gi],jt(m,!0)))}function m(S){lt(s,Qa,S),S?(vo(s,d),c.start()):(ui(d),c.cancel())}function v(){Ln(s,[Za,es,Qa]),ui(d)}function b(S){l&&lt(s,Za,S?"off":"polite")}return{mount:u,disable:b,destroy:v}}var iu=Object.freeze({__proto__:null,Media:ud,Direction:pd,Elements:Ld,Slides:Rd,Layout:Ed,Clones:kd,Move:Pd,Controller:Ad,Arrows:_d,Autoplay:Nd,Cover:Od,Scroll:Gd,Drag:qd,Keyboard:Ud,LazyLoad:Yd,Pagination:Jd,Sync:Qd,Wheel:eu,Live:nu}),ou={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"},ru={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:$d,i18n:ou,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function au(e,t,n){var i=t.Slides;function o(){qt(e).on([Yn,Yt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),tl(c)}return{mount:o,start:l,cancel:Jr}}function su(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=jt(xn,l,"transition"),c;function u(){qt(e).bind(l,"transitionend",function(S){S.target===l&&c&&(v(),c())})}function m(S,y){var w=i.toPosition(S,!0),C=i.getPosition(),L=b(S);sn(w-C)>=1&&L>=1?n.useScroll?s.scroll(w,L,!1,y):(d("transform "+L+"ms "+n.easing),i.translate(w,!0),c=y):(i.jump(S),y())}function v(){d(""),s.cancel()}function b(S){var y=n.rewindSpeed;if(e.is(Ri)&&y){var w=o.getIndex(!0),C=o.getEnd();if(w===0&&S>=C||w>=C&&S===0)return y}return n.speed}return{mount:u,start:m,cancel:v}}var lu=(function(){function e(n,i){this.event=qt(),this.Components={},this.state=cd(Si),this.splides=[],this._o={},this._E={};var o=Gn(n)?sl(document,n):n;Ji(o,o+" is invalid."),this.root=o,i=Bn({label:bn(o,gn)||"",labelledby:bn(o,Ca)||""},ru,e.defaults,i||{});try{Bn(i,JSON.parse(bn(o,fa)))}catch{Ji(!1,"Invalid JSON")}this._o=Object.create(Bn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;Ji(l.is([Si,Zo]),"Already mounted!"),l.set(Si),this._C=d,this._T=o||this._T||(this.is(So)?au:su),this._E=i||this._E;var c=ro({},iu,this._E,{Transition:this._T});return di(c,function(u,m){var v=u(s,d,s._o);d[m]=v,v.setup&&v.setup()}),di(d,function(u){u.mount&&u.mount()}),this.emit(Yn),Tn(this.root,wd),l.set(Li),this.emit(ta),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(Xn(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(Yt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Si)?qt(this).on(ta,this.destroy.bind(this,i)):(di(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(xa),o.destroy(),i&&Fn(this.splides),s.set(Zo)),this},od(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})(),Ea=lu;Ea.defaults={};Ea.STATES=ad;var os=[[Yn,"onMounted"],[ta,"onReady"],[_n,"onMove"],[Bi,"onMoved"],[va,"onClick"],[dl,"onActive"],[ul,"onInactive"],[pl,"onVisible"],[ml,"onHidden"],[Yt,"onRefresh"],[rn,"onUpdated"],[Ii,"onResize"],[cr,"onResized"],[gl,"onDrag"],[hl,"onDragging"],[fl,"onDragged"],[dr,"onScroll"],[gi,"onScrolled"],[xa,"onDestroy"],[yl,"onArrowsMounted"],[vl,"onArrowsUpdated"],[xl,"onPaginationMounted"],[bl,"onPaginationUpdated"],[ba,"onNavigationMounted"],[wa,"onAutoplayPlay"],[wl,"onAutoplayPlaying"],[Sa,"onAutoplayPause"],[$a,"onLazyLoadLoaded"]];function Ma(...e){return e.filter(Boolean).join(" ")}function nr(e){return e!==null&&typeof e=="object"}function oa(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!oa(n,t[i]));if(nr(e)&&nr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!oa(e[o],t[o]))}return e===t}function cu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function du(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 ra(e,t){const n=e;return du(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():nr(i)?n[o]=ra(nr(n[o])?n[o]:{},i):n[o]=i}),n}var uu=({children:e,className:t,...n})=>a.createElement("div",{className:Ma("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),ka=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Ea(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ra({},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&&!oa(this.options,e)&&(this.splide.options=e,this.options=ra({},e));const t=this.getSlides();cu(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){os.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 a.createElement(t,{className:Ma("splide",e),ref:this.splideRef,...this.omit(o,["options",...os.map(s=>s[1])])},n?a.createElement(uu,null,i):i)}},Pa=({children:e,className:t,...n})=>a.createElement("li",{className:Ma("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 qd="RichTextRenderer-module__link___BWeZ2",Gd={link:qd},Kd=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))},sr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Kd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,l,s;const{fontSize:n,lineHeight:i}=e;return{fontFamily:sr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:L.scalingValue(e.letterSpacing,t),wordSpacing:L.scalingValue(e.wordSpacing,t),fontSize:L.scalingValue(n,t),lineHeight:i!==void 0?L.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const Ti=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Gd.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Ud(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 Ud(e){return{...e.fontFamily&&{fontFamily:sr(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 Xd="SvgImage-module__svg___q3xE-",Yd="SvgImage-module__img___VsTm-",za={svg:Xd,img:Yd},Jd=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Zd=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,mn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[l,s]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(d)}},[]),!Jd(e)||!l?r.jsx("img",{src:e,alt:"",className:it(za.img,i),style:o}):r.jsx("span",{"data-supports-mask":l,className:it(za.svg,i),style:{"--svg":Zd(e),"--fill":t,"--hover-fill":n,...o??{}}})},Qd={"top-left":je.topLeftAlignment,"top-center":je.topCenterAlignment,"top-right":je.topRightAlignment,"middle-left":je.middleLeftAlignment,"middle-center":je.middleCenterAlignment,"middle-right":je.middleRightAlignment,"bottom-left":je.bottomLeftAlignment,"bottom-center":je.bottomCenterAlignment,"bottom-right":je.bottomRightAlignment};function eu({settings:e,content:t,styles:n,isEditor:i}){const[o,l]=a.useState(null),{widthSettings:s,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:m,fontSizeLineHeight:y,textAppearance:w,color:$}=n.imageCaption??{},[h,v]=a.useState(void 0),[S,T]=a.useState(null),[R,P]=a.useState(0),[H,E]=a.useState(0),{direction:j,transition:k,controls:x,pagination:Y,imageCaption:f,triggers:A}=e,W=a.useRef(k.type),{x:z,y:G}=e.controls.offset,le=J=>{o&&o.go(J)};return a.useEffect(()=>{if(!S)return;const J=new ResizeObserver(D=>{if(!o)return;const[N]=D;v({width:Math.round(N.contentRect.width),height:Math.round(N.contentRect.height)})});return J.observe(S),()=>J.unobserve(S)},[S]),a.useEffect(()=>{!o||W.current===k.type||(E(J=>J+1),W.current=k.type)},[k.type]),r.jsx("div",{className:it(je.wrapper,{[je.editor]:i}),ref:T,children:r.jsxs("div",{className:je.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:k.backgroundColor&&k.type==="fade in"?k.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:it(je.captionBlock),children:r.jsx("div",{className:je.captionTextWrapper,children:t.map((J,D)=>r.jsx("div",{className:it(je.captionText,Qd[f.alignment],{[je.withPointerEvents]:D===R&&i,[je.active]:D===R}),style:{fontFamily:sr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:s.sizing==="auto"?"max-content":L.scalingValue(s.width,i),letterSpacing:L.scalingValue(c,i),wordSpacing:L.scalingValue(m,i),textAlign:u,fontSize:L.scalingValue(y.fontSize,i),lineHeight:L.scalingValue(y.lineHeight,i),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:$,transitionDuration:k.duration?`${Math.round(parseInt(k.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:je.captionTextInner,style:{"--link-hover-color":f.linkHoverColor,"--link-color":f.linkColor,position:"relative",top:L.scalingValue(f.offset.y,i),left:L.scalingValue(f.offset.x,i)},children:r.jsx(Ti,{content:J.imageCaption})})},D))})}),r.jsx(fa,{onMove:J=>{P(J.index)},ref:l,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,autoplay:A.autoPlay!==null,...A.autoPlay!==null&&{interval:parseInt(A.autoPlay)*1e3},direction:j==="horiz"||k.type==="fade in"?"ltr":"ttb",pagination:!1,drag:A.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:k.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((J,D)=>r.jsx(ya,{children:r.jsx("div",{className:je.sliderItem,children:r.jsx("div",{className:je.imgWrapper,children:r.jsx("img",{className:it(je.sliderImage,{[je.contain]:J.image.objectFit==="contain",[je.cover]:J.image.objectFit==="cover"}),src:J.image.url,alt:J.image.name??""})})})},D))},H),x.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:it(je.arrow,{[je.arrowVertical]:j==="vert",[je.hoverArrow]:x.show==="on hover"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:r.jsxs("button",{onClick:()=>{le("-1")},className:je.arrowInner,style:{transform:`translate(${L.scalingValue(z,i)}, ${L.scalingValue(G*(j==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${j==="horiz"?"0deg":"90deg"})`},children:[x.arrowsImgUrl&&r.jsx(mn,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:it(je.arrowImg,je.mirror)}),!x.arrowsImgUrl&&r.jsx(Da,{color:x.color,className:it(je.arrowIcon,je.arrowImg,je.mirror)})]})}),r.jsx("div",{className:it(je.arrow,je.nextArrow,{[je.arrowVertical]:j==="vert",[je.hoverArrow]:x.show==="on hover"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:r.jsxs("button",{className:je.arrowInner,onClick:()=>le("+1"),style:{transform:`translate(${L.scalingValue(z*(j==="horiz"?-1:1),i)}, ${L.scalingValue(G,i)}) scale(${e.controls.scale/100}) rotate(${j==="horiz"?"0deg":"90deg"})`},children:[x.arrowsImgUrl&&r.jsx(mn,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:je.arrowImg}),!x.arrowsImgUrl&&r.jsx(Da,{color:x.color,className:it(je.arrowIcon,je.arrowImg)})]})})]}),A.triggersList.click&&r.jsx("div",{className:je.clickOverlay,onClick:()=>{o&&o.go("+1")}}),Y.isActive&&r.jsx("div",{className:it(je.pagination,{[je.paginationInsideBottom]:Y.position==="inside-1"&&j==="horiz",[je.paginationInsideTop]:Y.position==="inside-2"&&j==="horiz",[je.paginationOutsideBottom]:Y.position==="outside-1"&&j==="horiz",[je.paginationOutsideTop]:Y.position==="outside-2"&&j==="horiz",[je.paginationInsideLeft]:Y.position==="inside-1"&&j==="vert",[je.paginationInsideRight]:Y.position==="inside-2"&&j==="vert",[je.paginationOutsideLeft]:Y.position==="outside-1"&&j==="vert",[je.paginationOutsideRight]:Y.position==="outside-2"&&j==="vert",[je.paginationVertical]:j==="vert"}),children:r.jsx("div",{className:je.paginationInner,style:{backgroundColor:Y.colors[2],transform:`scale(${Y.scale/100}) translate(${L.scalingValue(Y.offset.x,i)}, ${L.scalingValue(Y.offset.y,i)}) rotate(${j==="horiz"?"0deg":"90deg"})`},children:t.map((J,D)=>r.jsx("button",{onClick:()=>{o&&o.go(D)},className:it(je.paginationItem),children:r.jsx("div",{className:it(je.dot,{[je.activeDot]:D===R}),style:{backgroundColor:D===R?Y.colors[0]:Y.colors[1],"--pagination-hover-color":Y.hover}})},D))})})]})})}function Da({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 tu={element:eu,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"]}},nu="ImageRevealSlider-module__imageRevealSlider___UE5Ob",iu="ImageRevealSlider-module__image___Qjt-e",ou="ImageRevealSlider-module__link___N-iLG",ru="ImageRevealSlider-module__cursor___2U03d",mi={imageRevealSlider:nu,image:iu,link:ou,cursor:ru};function Va(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const l=i.width?Number.parseFloat(i.width):o.naturalWidth,s=o.naturalHeight/o.naturalWidth*l,d=l/2,c=s/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function br(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function au(e,t,n,i){let o,l;if(t==="custom"){o=n;const s=await br(e);l=s.height/s.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const s=await br(e);l=s.height/s.width*o}else{const s=await br(e);o=s.width,l=s.height}return{width:o,height:l,finalWidth:`${o}px`}}function su({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[l,s]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[m,y]=a.useState({x:0,y:0}),[w,$]=a.useState(1),[h,v]=a.useState("none"),S=a.useRef({x:0,y:0}),[T,R]=a.useState(!1),{sizeType:P,imageWidth:H,randomRangeImageWidth:E}=e.imageSize,{revealPosition:j,visible:k}=e.position,{cursorType:x,target:Y,defaultCursorScale:f,defaultCursor:A,hoverCursorScale:W,hoverCursor:z}=e.cursor;a.useEffect(()=>{if(!i)return;const J=(C,I)=>{const V=i.getBoundingClientRect(),K=C-V.left,ee=I-V.top;if(y({x:K,y:ee}),x==="system"){v("none"),$(1);return}const O=K,ge=ee,g=document.elementFromPoint(V.left+O,V.top+ge);if(g&&g.closest("a")){v("none"),$(1);return}const he=Va(O,ge,l)||Y==="area"?{img:z??"none",scale:W}:{img:A??"none",scale:f};v(he.img),$(he.scale)},D=C=>{C.stopPropagation(),S.current={x:C.clientX,y:C.clientY},J(C.clientX,C.clientY)},N=()=>{T&&J(S.current.x,S.current.y)};return i.addEventListener("mousemove",D),window.addEventListener("scroll",N,!0),()=>{i.removeEventListener("mousemove",D),window.removeEventListener("scroll",N,!0)}},[i,T,m,x,Y,z,A,W,f,l]),a.useEffect(()=>{T||(v("none"),$(0))},[T]);const G=async(J,D,N,C={})=>{const{width:I,height:V,finalWidth:K}=await au(J.image.url,P,H,E);let ee=0,O=0;j==="same"?(ee=D/2,O=N/2):(ee=C.x??Math.random()*D,O=C.y??Math.random()*N);const ge=Math.min(Math.max(ee,I/2),D-I/2),g=Math.min(Math.max(O,V/2),N-V/2);return{id:u.current++,url:J.image.url,link:J.link,name:J.image.name,x:ge,y:g,width:K}};a.useEffect(()=>{if(!i||t.length===0)return;const J=i.getBoundingClientRect(),D=J.width,N=J.height,C=[];(async()=>{const V=t[0],K=await G(V,D,N);C.push(K),s(C),c(1)})()},[P,H,E,j,i]),a.useEffect(()=>{k==="last One"&&s(J=>J.length>0?[J[J.length-1]]:[])},[k]);const le=async J=>{if(!i)return;const D=i.getBoundingClientRect(),N=J.clientX-D.left,C=J.clientY-D.top;if(Y==="image"&&!Va(N,C,l))return;let I=0,V=0;j==="on Click"?(I=N,V=C):j==="same"?(I=D.width/2,V=D.height/2):(I=Math.random()*D.width,V=Math.random()*D.height);const K=t[d],ee=await G(K,D.width,D.height,{x:I,y:V});s(O=>k==="all"?[...O,ee]:[ee]),c(O=>O>=t.length-1?0:O+1)};return r.jsxs("div",{ref:o,onClick:le,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:mi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[l.map(J=>r.jsx("div",{className:mi.wrapper,style:{top:`${J.y}px`,left:`${J.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:J.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:Y==="area"&&J.link?r.jsx("a",{href:J.link,target:"_blank",className:mi.link,children:r.jsx("img",{src:J.url,alt:J.name,className:mi.image},J.id)}):r.jsx("img",{src:J.url,alt:J.name,className:mi.image},J.id)},J.id)),T&&r.jsx("div",{className:mi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${w})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const lu={element:su,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:""}]}}}},cu="LightBox-module__hidden___9s-9x",du="LightBox-module__heroImage___sTxNF",uu="LightBox-module__background___rm9ml",pu="LightBox-module__editor___4ACaY",mu="LightBox-module__contentStyle___Bgnsq",gu="LightBox-module__imageStyle___tLIlB",hu="LightBox-module__imgWrapper___LuFUp",fu="LightBox-module__contain___8-yaS",yu="LightBox-module__cover___hNvOG",vu="LightBox-module__caption___b6L2I",xu="LightBox-module__captionTextInner___rCGNH",bu="LightBox-module__lightboxSplide___XFuWC",wu="LightBox-module__arrow___iz38X",Su="LightBox-module__arrowVertical___Zfz81",$u="LightBox-module__nextArrow___zkAQN",Cu="LightBox-module__arrowInner___p48sW",Tu="LightBox-module__arrowIcon___3VaFf",Lu="LightBox-module__arrowImg___pNV88",Iu="LightBox-module__mirror___pjeXc",Ru="LightBox-module__thumbsWrapper___GB-nU",Eu="LightBox-module__thumbsContainerVertical___wttk5",Mu="LightBox-module__thumbsContainer___osSma",Pu="LightBox-module__thumbsAlignStart___MO6tY",ku="LightBox-module__thumbsAlignCenter___Q4sUx",Au="LightBox-module__thumbsAlignEnd___p4y9R",Wu="LightBox-module__thumbItem___HvnF3",Fu="LightBox-module__closeButton___g2khP",_u="LightBox-module__fadeIn___0m5GW",Nu="LightBox-module__slideInLeft___gPYwC",Hu="LightBox-module__slideInRight___S-pPp",Ou="LightBox-module__slideInTop___DFdAj",ju="LightBox-module__slideInBottom___m27kZ",Bu="LightBox-module__fadeOut___55qBR",zu="LightBox-module__slideOutLeft___NvU7P",Du="LightBox-module__slideOutRight___SK7eC",Vu="LightBox-module__slideOutTop___Vgg0z",qu="LightBox-module__slideOutBottom___nJ0Ef",Gu="LightBox-module__scaleSlide___vZriG",Re={hidden:cu,heroImage:du,background:uu,editor:pu,contentStyle:mu,imageStyle:gu,imgWrapper:hu,contain:fu,cover:yu,caption:vu,captionTextInner:xu,lightboxSplide:bu,arrow:wu,arrowVertical:Su,nextArrow:$u,arrowInner:Cu,arrowIcon:Tu,arrowImg:Lu,mirror:Iu,thumbsWrapper:Ru,thumbsContainerVertical:Eu,thumbsContainer:Mu,thumbsAlignStart:Pu,thumbsAlignCenter:ku,thumbsAlignEnd:Au,thumbItem:Wu,closeButton:Fu,fadeIn:_u,slideInLeft:Nu,slideInRight:Hu,slideInTop:Ou,slideInBottom:ju,fadeOut:Bu,slideOutLeft:zu,slideOutRight:Du,slideOutTop:Vu,slideOutBottom:qu,scaleSlide:Gu},So=(e,t,n)=>{const i={},[o,l]=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"),l==="left"?(i.left="0",i.right="auto"):l==="center"?(i.left="50%",i.right="auto"):l==="right"&&(i.left="auto",i.right="0"),o==="middle"&&l==="center"?i.transform=`translate(calc(-50% + ${L.scalingValue(t.x,n)}), calc(-50% + ${L.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${L.scalingValue(t.x,n)}, calc(-50% + ${L.scalingValue(t.y,n)}))`:l==="center"?i.transform=`translate(calc(-50% + ${L.scalingValue(t.x,n)}), ${L.scalingValue(t.y,n)})`:i.transform=`translate(${L.scalingValue(t.x,n)}, ${L.scalingValue(t.y,n)})`,i};function vl(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 qr(e){const t=e.getBoundingClientRect(),n=vl(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,s=e.naturalHeight,d=i/o,c=l/s;let u,m;c>d?(u=i,m=i/c):(m=o,u=o*c);const y=t.left+n.left,w=t.top+n.top,$=(i-u)/2+y,h=(o-m)/2+w;return{x:$,y:h,width:u,height:m}}function qa(e){const t=e.getBoundingClientRect(),n=vl(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ga(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 Ku(e,t){const n=(()=>{if(e==="fade in")return Re.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Re.slideInLeft;case"right":return Re.slideInRight;case"top":return Re.slideInTop;case"bottom":return Re.slideInBottom;default:return Re.slideInRight}return Re.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Re.fadeIn;if(e==="slide in")switch(t){case"left":return Re.slideInLeft;case"right":return Re.slideInRight;case"top":return Re.slideInTop;case"bottom":return Re.slideInBottom;default:return Re.slideInRight}return Re.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Re.fadeOut;if(e==="slide in")switch(t){case"left":return Re.slideOutLeft;case"right":return Re.slideOutRight;case"top":return Re.slideOutTop;case"bottom":return Re.slideOutBottom;default:return Re.slideOutRight}return Re.fadeOut})(),l=(()=>{if(e==="fade in")return Re.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Re.slideOutLeft;case"right":return Re.slideOutRight;case"top":return Re.slideOutTop;case"bottom":return Re.slideOutBottom;default:return Re.slideOutRight}return Re.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:l}}const Uu=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:l,isPreviewMode:s})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:Re.heroImage,onClick:()=>c(!0)}),r.jsx(Xu,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:l})]})},Xu=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:l,isEditor:s,metadata:d})=>{var Se;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:y,wordSpacing:w,fontSizeLineHeight:$,textAppearance:h,color:v}=i.imageCaption??{},[S,T]=a.useState(0),[R,P]=a.useState(0),[H,E]=a.useState(!1),[j,k]=a.useState(!1),[x,Y]=a.useState({}),f=a.useRef(null),A=a.useRef(null),W=a.useRef(null),z=a.useRef(!1),G=a.useRef(null),le=a.useRef(null),J=a.useRef(null),D=a.useRef(null),N=a.useRef(!1),C=a.useRef(null),[I,V]=a.useState(!1),{appear:K,triggers:ee,slider:O,thumbnail:ge,controls:g,area:he,caption:re,layout:be}=o.lightboxBlock,{appearClass:ke,backdropAppearClass:ae,backdropDisappearClass:ve,disappearClass:U}=Ku(K.type,K.direction),xe=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const _=()=>{setTimeout(()=>{var M,X;(X=(M=f.current)==null?void 0:M.splide)==null||X.refresh()},16)},te=()=>{P(M=>M+1)};return window.addEventListener("ArticleEditor.Layout:change",_),window.addEventListener("ArticleEditor.ComponentContent:change",te),()=>{window.removeEventListener("ArticleEditor.Layout:change",_),window.removeEventListener("ArticleEditor.ComponentContent:change",te)}},[]),a.useEffect(()=>{if(!e||!ge.isActive){V(!1);return}const _=C.current;if(!_)return;const te=()=>{O.direction==="horiz"?V(_.scrollWidth>_.clientWidth):V(_.scrollHeight>_.clientHeight)};te();const M=new ResizeObserver(te);return M.observe(_),()=>M.disconnect()},[e,ge.isActive,n.length,x,O.direction]);const me=a.useCallback(()=>{const _=window.matchMedia("(max-width: 768px)").matches,te=Ga(he.color);_&&!s&&te>.9&&(document.body.style.backgroundColor=""),E(!0),z.current=!0;const M=X=>{X.target===G.current&&X.animationName&&(G.current&&le.current&&G.current.removeEventListener("animationend",le.current),le.current=null,z.current&&(z.current=!1,t()),E(!1))};G.current&&(le.current=M,G.current.addEventListener("animationend",M))},[t,he.color,s]),pe=(_,te,M)=>{var X,Z;if(_){if(ee.type==="click"&&ee.switch==="image")ee.repeat==="close"&&S===n.length-1?me():(X=f.current)==null||X.go("+1");else if(ee.type==="click"&&ee.switch==="50/50"){const ce=_.getBoundingClientRect(),ue=te-ce.left,ye=M-ce.top,Le=ce.width,q=ce.height;let de;O.direction==="horiz"?de=ue<Le/2?"-1":"+1":de=ye<q/2?"-1":"+1",(Z=f.current)==null||Z.go(de)}}},se=_=>{if(N.current){N.current=!1;return}const te=n[S],M=(te==null?void 0:te.image.objectFit)==="cover";let X,Z;if("changedTouches"in _&&_.changedTouches.length>0)X=_.changedTouches[0].clientX,Z=_.changedTouches[0].clientY;else if("clientX"in _)X=_.clientX,Z=_.clientY;else return;let ce;if(M&&W.current){const ue=qa(W.current);ce=X>=ue.left&&X<=ue.right&&Z>=ue.top&&Z<=ue.bottom}else{const ue=W.current?qr(W.current):null;if(!ue){_.target===_.currentTarget&&me();return}ce=X>=ue.x&&X<=ue.x+ue.width&&Z>=ue.y&&Z<=ue.y+ue.height}ce?pe(W.current,X,Z):me()},Te=_=>{const te=_.target;(te.classList.contains(Re.thumbsWrapper)||te.classList.contains(Re.thumbsContainer))&&se(_)};a.useEffect(()=>{if(!e)return;const _=te=>{var M,X;if(te.key==="Escape"){me();return}if(te.key==="ArrowRight"){T(Z=>(Z+1)%Math.max(n.length,1)),(M=f.current)==null||M.go("+1");return}te.key==="ArrowLeft"&&(T(Z=>(Z-1+Math.max(n.length,1))%Math.max(n.length,1)),(X=f.current)==null||X.go("-1"))};return window.addEventListener("keydown",_),()=>{window.removeEventListener("keydown",_)}},[e,me,n.length]),a.useEffect(()=>{if(e){if(T(0),P(te=>te+1),z.current=!1,E(!1),k(!1),Y({}),!xe)return;const _=new CustomEvent("page-overlay",{detail:{itemId:xe}});window.dispatchEvent(_)}return()=>{G.current&&le.current&&(G.current.removeEventListener("animationend",le.current),le.current=null),k(!1)}},[e,xe]),a.useEffect(()=>{A.current!==null&&A.current!==O.type&&P(_=>_+1),A.current=O.type},[O.type]),a.useEffect(()=>{if(!e)return;const _=document.body.style.overflow,te=window.matchMedia("(max-width: 768px)").matches,M=Ga(he.color);document.body.style.overflow="hidden",k(!1);const X=ce=>{ce.target===G.current&&!z.current&&ce.animationName&&(te&&!s&&M>.9&&(document.body.style.backgroundColor=he.color),k(!0),G.current&&J.current&&G.current.removeEventListener("animationend",J.current),J.current=null)};G.current&&(J.current=X,G.current.addEventListener("animationend",X));const Z=ce=>{const ue=ce.target;ue&&(ue.closest(`.${Re.thumbsWrapper}`)||ue.closest(`.${Re.thumbsContainer}`))||O.type!=="slide"&&ce.preventDefault()};return document.addEventListener("touchmove",Z,{passive:!1}),()=>{document.body.style.overflow=_,document.removeEventListener("touchmove",Z),G.current&&J.current&&(G.current.removeEventListener("animationend",J.current),J.current=null),k(!1)}},[e,s,he.color,O.type]),a.useEffect(()=>{if(!e)return;const _=te=>{var X,Z;if(z.current){te.stopPropagation();return}if(N.current){N.current=!1;return}const M=te.target;if(!(M&&(M.closest(`.${Re.thumbsContainer}`)||M.closest(`.${Re.thumbItem}`)||M.closest(`.${Re.arrow}`)||M.closest(`.${Re.closeButton}`)||M.closest(`.${Re.caption}`)))){if(O.type==="slide"&&ee.type==="drag"&&((Z=(X=f.current)==null?void 0:X.splide)!=null&&Z.root)){const ce=f.current.splide.root;if(M&&(ce.contains(M)||ce===M))return}if(te.touches.length===0&&te.changedTouches.length>0){const ce=n[S],ue=(ce==null?void 0:ce.image.objectFit)==="cover",ye=te.changedTouches[0];let Le;if(ue&&W.current){const q=qa(W.current);Le=ye.clientX>=q.left&&ye.clientX<=q.right&&ye.clientY>=q.top&&ye.clientY<=q.bottom}else{const q=W.current?qr(W.current):null;if(!q)return;Le=ye.clientX>=q.x&&ye.clientX<=q.x+q.width&&ye.clientY>=q.y&&ye.clientY<=q.y+q.height}if(!Le){te.stopPropagation(),z.current=!0;const q=de=>{de.stopPropagation(),de.preventDefault(),document.removeEventListener("click",q,!0)};document.addEventListener("click",q,!0),me()}}}};return document.addEventListener("touchend",_,{passive:!0}),()=>{document.removeEventListener("touchend",_)}},[e,me,S,n]);const Ie=(O.type==="scale"||O.type==="fade")&&O.direction==="vert"&&ee.type==="drag";a.useEffect(()=>{var de,Ee;if(!e||!Ie||!((Ee=(de=f.current)==null?void 0:de.splide)!=null&&Ee.root))return;const _=f.current.splide.root,te=30,M=(Q,ne)=>{if(D.current){const Fe=Math.abs(Q-D.current.x),We=Math.abs(ne-D.current.y);(Fe>0||We>0)&&(N.current=!0)}},X=Q=>{D.current&&(Q.preventDefault(),M(Q.clientX,Q.clientY))},Z=Q=>{D.current&&Q.touches.length>0&&(Q.preventDefault(),M(Q.touches[0].clientX,Q.touches[0].clientY))},ce=(Q,ne)=>{if(!D.current||!f.current){D.current=null;return}const Fe=Math.abs(Q-D.current.x),We=Math.abs(ne-D.current.y);We>te&&We>Fe&&f.current.go(ne<D.current.y?"+1":"-1"),D.current=null},ue=Q=>{D.current&&ce(Q.clientX,Q.clientY),document.removeEventListener("pointerup",ue),document.removeEventListener("pointercancel",ue),document.removeEventListener("pointermove",X)},ye=Q=>{if(D.current){if(Q.changedTouches.length>0){const ne=Q.changedTouches[0];ce(ne.clientX,ne.clientY)}document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),document.removeEventListener("touchmove",Z)}},Le=Q=>{D.current={x:Q.clientX,y:Q.clientY},N.current=!1,document.addEventListener("pointermove",X,{passive:!1}),document.addEventListener("pointerup",ue),document.addEventListener("pointercancel",ue)},q=Q=>{Q.touches.length>0&&(D.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",Z,{passive:!1}),document.addEventListener("touchend",ye),document.addEventListener("touchcancel",ye))};return _.addEventListener("pointerdown",Le),_.addEventListener("touchstart",q),()=>{_.removeEventListener("pointerdown",Le),_.removeEventListener("touchstart",q),document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",ue),document.removeEventListener("pointercancel",ue),document.removeEventListener("touchmove",Z),document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),D.current=null,N.current=!1}},[e,Ie,R]);const fe={backgroundColor:he.color,backdropFilter:`blur(${he.blur}px)`,animationDuration:`${parseInt(K.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Wi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:s?null:G,className:it(Re.background,H?ve:ae,{[Re.editor]:s},{[Re.hidden]:!e}),style:{...fe,...j&&!s&&!H?{position:"absolute"}:{}}}),r.jsxs("div",{ref:s?G:null,className:it(Re.contentStyle,H?U:ke,{[Re.editor]:s},{[Re.hidden]:!e}),style:{animationDuration:`${parseInt(K.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(fa,{onMove:_=>T(_.index),ref:f,className:Re.lightboxSplide,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,direction:O.direction==="horiz"||O.type==="fade"||O.type==="scale"?"ltr":"ttb",pagination:!1,drag:ee.type==="drag"&&!Ie,perPage:1,width:"100%",height:"100%",type:O.type==="fade"||O.type==="scale"?"fade":"loop",padding:0,rewind:ee.repeat!=="close",start:0},style:{"--splide-speed":O.duration},children:n.map((_,te)=>{const M=So(be.position,be.offset,s),X=`${L.scalingValue(be.padding.top,s)} ${L.scalingValue(be.padding.right,s)} ${L.scalingValue(be.padding.bottom,s)} ${L.scalingValue(be.padding.left,s)}`,Z=O.type==="scale"?(()=>{const{transform:ce,...ue}=M;return{...ue,position:"absolute",padding:X,boxSizing:"border-box","--position-transform":ce||"none"}})():{...M,position:"absolute",padding:X,boxSizing:"border-box"};return r.jsx(ya,{children:r.jsx("div",{className:Re.imgWrapper,onClick:se,children:r.jsx("img",{ref:te===S?W:null,className:it(Re.imageStyle,{[Re.contain]:_.image.objectFit==="contain",[Re.cover]:_.image.objectFit==="cover",[Re.scaleSlide]:O.type==="scale"}),src:_.image.url,alt:_.image.name??"",style:{...Z,pointerEvents:_.image.objectFit==="contain"?"none":"auto"}})})},te)})},R),g.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:it(Re.arrow,{[Re.arrowVertical]:O.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:r.jsxs("button",{className:Re.arrowInner,style:{transform:`translate(${L.scalingValue(g.offset.x,s)}, ${L.scalingValue(g.offset.y*(O.direction==="horiz"?1:-1),s)}) scale(${g.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var _;return(_=f.current)==null?void 0:_.go("-1")},"aria-label":"Previous",children:[g.arrowsImgUrl&&r.jsx(mn,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:it(Re.arrowImg,Re.mirror)}),!g.arrowsImgUrl&&r.jsx(Ka,{color:g.color,className:it(Re.arrowIcon,Re.arrowImg,Re.mirror)})]})}),r.jsx("div",{className:it(Re.arrow,Re.nextArrow,{[Re.arrowVertical]:O.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:r.jsxs("button",{className:Re.arrowInner,style:{transform:`translate(${L.scalingValue(g.offset.x*(O.direction==="horiz"?-1:1),s)}, ${L.scalingValue(g.offset.y,s)}) scale(${g.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var _;return(_=f.current)==null?void 0:_.go("+1")},"aria-label":"Next",children:[g.arrowsImgUrl&&r.jsx(mn,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:Re.arrowImg}),!g.arrowsImgUrl&&r.jsx(Ka,{color:g.color,className:it(Re.arrowIcon,Re.arrowImg)})]})})]}),he.closeIconUrl&&(()=>{const _=So(he.closeIconAlign,he.closeIconOffset,s),te=`scale(${he.closeIconScale})`,M=_.transform?`${_.transform} ${te}`:te;return r.jsx("button",{className:Re.closeButton,style:{..._,transform:M},onClick:me,"aria-label":"Close lightbox",children:r.jsx(mn,{url:he.closeIconUrl,fill:he.closeIconColor??"#000000",hoverFill:he.closeIconHover??"#cccccc"})})})(),re&&re.isActive&&i.imageCaption&&((Se=n[S])==null?void 0:Se.imageCaption)&&r.jsx("div",{className:Re.caption,style:{...So(re.alignment,re.offset,s),fontFamily:sr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":L.scalingValue(c.width,s),letterSpacing:L.scalingValue(m,s),wordSpacing:L.scalingValue(w,s),textAlign:y,fontSize:L.scalingValue($.fontSize,s),lineHeight:L.scalingValue($.lineHeight,s),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:v},onClick:_=>_.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Re.captionTextInner,style:{"--link-color":re.linkColor,"--link-hover-color":re.linkHoverColor},children:r.jsx(Ti,{content:n[S].imageCaption})})}),ge.isActive&&(()=>{const[_,te]=ge.position.split("-"),M=O.direction==="horiz"?`${_}-left`:ge.position,X=So(M,ge.offset,s),Z=()=>{if(O.direction==="horiz"){if(te==="left")return"flex-start";if(te==="center")return"center";if(te==="right")return"flex-end"}else{if(_==="top")return"flex-start";if(_==="middle")return"center";if(_==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:C,className:Re.thumbsWrapper,onClick:ce=>Te(ce),style:{position:s?"absolute":"fixed",...X,...O.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:it(Re.thumbsContainer,{[Re.thumbsContainerVertical]:O.direction==="vert",[Re.thumbsAlignStart]:ge.align==="start",[Re.thumbsAlignCenter]:ge.align==="center",[Re.thumbsAlignEnd]:ge.align==="end"}),style:{gap:L.scalingValue(ge.grid.gap,s),justifyContent:I?"flex-start":Z()},children:n.map((ce,ue)=>{const ye=ue===S,Le=x[ue],de=ge.grid.size*(ye?ge.activeState.scale:1),Ee=()=>{if(ge.fit!=="fit")return{};if(!Le)return O.direction==="horiz"?{height:L.scalingValue(de,s)}:{width:L.scalingValue(de,s)};const Q=Le.width/Le.height;if(O.direction==="horiz"){const ne=de,Fe=ne*Q;return{width:L.scalingValue(Fe,s),height:L.scalingValue(ne,s)}}else{const ne=de,Fe=ne/Q;return{width:L.scalingValue(ne,s),height:L.scalingValue(Fe,s)}}};return r.jsx("button",{className:Re.thumbItem,style:{...O.direction==="horiz"&&ge.fit!=="fit"?{height:L.scalingValue(de,s)}:{},...O.direction==="vert"&&ge.fit!=="fit"?{width:L.scalingValue(de,s)}:{},...ge.fit==="cover"?{width:L.scalingValue(de,s),height:L.scalingValue(de,s)}:{},...Ee(),transition:ye?"all 0.25s ease-out":"none",opacity:ye?ge.activeState.opacity/100:ge.opacity/100,"--thumb-hover":ge.activeState.opacity/100},onClick:Q=>{var ne;Q.stopPropagation(),T(ue),(ne=f.current)==null||ne.go(ue)},onMouseEnter:()=>{var Q;ge.triggers==="hov"&&((Q=f.current)==null||Q.go(ue))},children:r.jsx("img",{src:ce.image.url,alt:ce.image.name??"",onLoad:Q=>{const ne=Q.currentTarget;ne.naturalWidth&&ne.naturalHeight&&Y(Fe=>({...Fe,[ue]:{width:ne.naturalWidth,height:ne.naturalHeight}}))},style:{objectFit:ge.fit==="cover"?"cover":"contain",...ge.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ge.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ce.image.name}-${ue}`)})})})})()]})]}),document.getElementById(l))};function Ka({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 Yu={element:Uu,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 $o(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ju(e){return`
6
+ */const pu="RichTextRenderer-module__link___BWeZ2",mu={link:pu},gu=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))},xr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>gu(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function hn(e){const{color:t,...n}=e;return n}function Qt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:xr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(n,t),lineHeight:i!==void 0?E.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const Ei=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:mu.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:hu(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 hu(e){return{...e.fontFamily&&{fontFamily:xr(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 fu="SvgImage-module__svg___q3xE-",yu="SvgImage-module__img___VsTm-",rs={svg:fu,img:yu},vu=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},xu=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,fn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,l]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!vu(e)||!s?r.jsx("img",{src:e,alt:"",className:pt(rs.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:pt(rs.svg,i),style:{"--svg":xu(e),"--fill":t,"--hover-fill":n,...o??{}}})},bu={"top-left":Xe.topLeftAlignment,"top-center":Xe.topCenterAlignment,"top-right":Xe.topRightAlignment,"middle-left":Xe.middleLeftAlignment,"middle-center":Xe.middleCenterAlignment,"middle-right":Xe.middleRightAlignment,"bottom-left":Xe.bottomLeftAlignment,"bottom-center":Xe.bottomCenterAlignment,"bottom-right":Xe.bottomRightAlignment};function wu({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:m,fontSizeLineHeight:v,textAppearance:b,color:S}=n.imageCaption??{},[y,w]=a.useState(void 0),[C,L]=a.useState(null),[k,A]=a.useState(0),[O,P]=a.useState(0),{direction:D,transition:R,controls:x,pagination:U,imageCaption:h,triggers:I}=e,W=a.useRef(R.type),{x:V,y:Y}=e.controls.offset,ae=Z=>{o&&o.go(Z)};return a.useEffect(()=>{if(!C)return;const Z=new ResizeObserver(G=>{if(!o)return;const[H]=G;w({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return Z.observe(C),()=>Z.unobserve(C)},[C]),a.useEffect(()=>{!o||W.current===R.type||(P(Z=>Z+1),W.current=R.type)},[R.type]),r.jsx("div",{className:pt(Xe.wrapper,{[Xe.editor]:i}),ref:L,children:r.jsxs("div",{className:Xe.sliderInner,style:{width:y?y.width:"100%",height:y?y.height:"100%",backgroundColor:R.backgroundColor&&R.type==="fade in"?R.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:pt(Xe.captionBlock),children:r.jsx("div",{className:Xe.captionTextWrapper,children:t.map((Z,G)=>r.jsx("div",{className:pt(Xe.captionText,bu[h.alignment],{[Xe.withPointerEvents]:G===k&&i,[Xe.active]:G===k}),style:{fontFamily:xr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":E.scalingValue(l.width,i),letterSpacing:E.scalingValue(c,i),wordSpacing:E.scalingValue(m,i),textAlign:u,fontSize:E.scalingValue(v.fontSize,i),lineHeight:E.scalingValue(v.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:S,transitionDuration:R.duration?`${Math.round(parseInt(R.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Xe.captionTextInner,style:{"--link-hover-color":h.linkHoverColor,"--link-color":h.linkColor,position:"relative",top:E.scalingValue(h.offset.y,i),left:E.scalingValue(h.offset.x,i)},children:r.jsx(Ei,{content:Z.imageCaption})})},G))})}),r.jsx(ka,{onMove:Z=>{A(Z.index)},ref:s,options:{arrows:!1,speed:R.duration?parseInt(R.duration):500,autoplay:I.autoPlay!==null,...I.autoPlay!==null&&{interval:parseInt(I.autoPlay)*1e3},direction:D==="horiz"||R.type==="fade in"?"ltr":"ttb",pagination:!1,drag:I.triggersList.drag,perPage:1,width:y?y.width:"100%",height:y?y.height:"100%",type:R.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((Z,G)=>r.jsx(Pa,{children:r.jsx("div",{className:Xe.sliderItem,children:r.jsx("div",{className:Xe.imgWrapper,children:r.jsx("img",{className:pt(Xe.sliderImage,{[Xe.contain]:Z.image.objectFit==="contain",[Xe.cover]:Z.image.objectFit==="cover"}),src:Z.image.url,alt:Z.image.name??""})})})},G))},O),x.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:pt(Xe.arrow,{[Xe.arrowVertical]:D==="vert",[Xe.hoverArrow]:x.show==="on hover"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:r.jsxs("button",{onClick:()=>{ae("-1")},className:Xe.arrowInner,style:{transform:`translate(${E.scalingValue(V,i)}, ${E.scalingValue(Y*(D==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${D==="horiz"?"0deg":"90deg"})`},children:[x.arrowsImgUrl&&r.jsx(fn,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:pt(Xe.arrowImg,Xe.mirror)}),!x.arrowsImgUrl&&r.jsx(as,{color:x.color,className:pt(Xe.arrowIcon,Xe.arrowImg,Xe.mirror)})]})}),r.jsx("div",{className:pt(Xe.arrow,Xe.nextArrow,{[Xe.arrowVertical]:D==="vert",[Xe.hoverArrow]:x.show==="on hover"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:r.jsxs("button",{className:Xe.arrowInner,onClick:()=>ae("+1"),style:{transform:`translate(${E.scalingValue(V*(D==="horiz"?-1:1),i)}, ${E.scalingValue(Y,i)}) scale(${e.controls.scale/100}) rotate(${D==="horiz"?"0deg":"90deg"})`},children:[x.arrowsImgUrl&&r.jsx(fn,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:Xe.arrowImg}),!x.arrowsImgUrl&&r.jsx(as,{color:x.color,className:pt(Xe.arrowIcon,Xe.arrowImg)})]})})]}),I.triggersList.click&&r.jsx("div",{className:Xe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),U.isActive&&r.jsx("div",{className:pt(Xe.pagination,{[Xe.paginationInsideBottom]:U.position==="inside-1"&&D==="horiz",[Xe.paginationInsideTop]:U.position==="inside-2"&&D==="horiz",[Xe.paginationOutsideBottom]:U.position==="outside-1"&&D==="horiz",[Xe.paginationOutsideTop]:U.position==="outside-2"&&D==="horiz",[Xe.paginationInsideLeft]:U.position==="inside-1"&&D==="vert",[Xe.paginationInsideRight]:U.position==="inside-2"&&D==="vert",[Xe.paginationOutsideLeft]:U.position==="outside-1"&&D==="vert",[Xe.paginationOutsideRight]:U.position==="outside-2"&&D==="vert",[Xe.paginationVertical]:D==="vert"}),children:r.jsx("div",{className:Xe.paginationInner,style:{backgroundColor:U.colors[2],transform:`scale(${U.scale/100}) translate(${E.scalingValue(U.offset.x,i)}, ${E.scalingValue(U.offset.y,i)}) rotate(${D==="horiz"?"0deg":"90deg"})`},children:t.map((Z,G)=>r.jsx("button",{onClick:()=>{o&&o.go(G)},className:pt(Xe.paginationItem),children:r.jsx("div",{className:pt(Xe.dot,{[Xe.activeDot]:G===k}),style:{backgroundColor:G===k?U.colors[0]:U.colors[1],"--pagination-hover-color":U.hover}})},G))})})]})})}function as({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:"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"]}},$u="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Cu="ImageRevealSlider-module__image___Qjt-e",Tu="ImageRevealSlider-module__link___N-iLG",Lu="ImageRevealSlider-module__cursor___2U03d",yi={imageRevealSlider:$u,image:Cu,link:Tu,cursor:Lu};function ss(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,l=o.naturalHeight/o.naturalWidth*s,d=s/2,c=l/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 Iu(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await Ar(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Ar(e);s=l.height/l.width*o}else{const l=await Ar(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function Ru({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[s,l]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[m,v]=a.useState({x:0,y:0}),[b,S]=a.useState(1),[y,w]=a.useState("none"),C=a.useRef({x:0,y:0}),[L,k]=a.useState(!1),{sizeType:A,imageWidth:O,randomRangeImageWidth:P}=e.imageSize,{revealPosition:D,visible:R}=e.position,{cursorType:x,target:U,defaultCursorScale:h,defaultCursor:I,hoverCursorScale:W,hoverCursor:V}=e.cursor;a.useEffect(()=>{if(!i)return;const Z=($,M)=>{const q=i.getBoundingClientRect(),z=$-q.left,ee=M-q.top;if(v({x:z,y:ee}),x==="system"){w("none"),S(1);return}const _=z,ye=ee,f=document.elementFromPoint(q.left+_,q.top+ye);if(f&&f.closest("a")){w("none"),S(1);return}const ve=ss(_,ye,s)||U==="area"?{img:V??"none",scale:W}:{img:I??"none",scale:h};w(ve.img),S(ve.scale)},G=$=>{$.stopPropagation(),C.current={x:$.clientX,y:$.clientY},Z($.clientX,$.clientY)},H=()=>{L&&Z(C.current.x,C.current.y)};return i.addEventListener("mousemove",G),window.addEventListener("scroll",H,!0),()=>{i.removeEventListener("mousemove",G),window.removeEventListener("scroll",H,!0)}},[i,L,m,x,U,V,I,W,h,s]),a.useEffect(()=>{L||(w("none"),S(0))},[L]);const Y=async(Z,G,H,$={})=>{const{width:M,height:q,finalWidth:z}=await Iu(Z.image.url,A,O,P);let ee=0,_=0;D==="same"?(ee=G/2,_=H/2):(ee=$.x??Math.random()*G,_=$.y??Math.random()*H);const ye=Math.min(Math.max(ee,M/2),G-M/2),f=Math.min(Math.max(_,q/2),H-q/2);return{id:u.current++,url:Z.image.url,link:Z.link,name:Z.image.name,x:ye,y:f,width:z}};a.useEffect(()=>{if(!i||t.length===0)return;const Z=i.getBoundingClientRect(),G=Z.width,H=Z.height,$=[];(async()=>{const q=t[0],z=await Y(q,G,H);$.push(z),l($),c(1)})()},[A,O,P,D,i]),a.useEffect(()=>{R==="last One"&&l(Z=>Z.length>0?[Z[Z.length-1]]:[])},[R]);const ae=async Z=>{if(!i)return;const G=i.getBoundingClientRect(),H=Z.clientX-G.left,$=Z.clientY-G.top;if(U==="image"&&!ss(H,$,s))return;let M=0,q=0;D==="on Click"?(M=H,q=$):D==="same"?(M=G.width/2,q=G.height/2):(M=Math.random()*G.width,q=Math.random()*G.height);const z=t[d],ee=await Y(z,G.width,G.height,{x:M,y:q});l(_=>R==="all"?[..._,ee]:[ee]),c(_=>_>=t.length-1?0:_+1)};return r.jsxs("div",{ref:o,onClick:ae,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),className:yi.imageRevealSlider,style:{cursor:y==="none"?"default":"none"},children:[s.map(Z=>r.jsx("div",{className:yi.wrapper,style:{top:`${Z.y}px`,left:`${Z.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:Z.width??"auto",height:"auto",cursor:y==="none"?"default":"none"},children:U==="area"&&Z.link?r.jsx("a",{href:Z.link,target:"_blank",className:yi.link,children:r.jsx("img",{src:Z.url,alt:Z.name,className:yi.image},Z.id)}):r.jsx("img",{src:Z.url,alt:Z.name,className:yi.image},Z.id)},Z.id)),L&&r.jsx("div",{className:yi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${y}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Eu={element:Ru,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:""}]}}}},Mu="LightBox-module__hidden___9s-9x",ku="LightBox-module__heroImage___sTxNF",Pu="LightBox-module__background___rm9ml",Au="LightBox-module__editor___4ACaY",Wu="LightBox-module__contentStyle___Bgnsq",Fu="LightBox-module__imageStyle___tLIlB",_u="LightBox-module__imgWrapper___LuFUp",Hu="LightBox-module__contain___8-yaS",Nu="LightBox-module__cover___hNvOG",Ou="LightBox-module__caption___b6L2I",ju="LightBox-module__captionTextInner___rCGNH",Bu="LightBox-module__lightboxSplide___XFuWC",zu="LightBox-module__arrow___iz38X",Du="LightBox-module__arrowVertical___Zfz81",Vu="LightBox-module__nextArrow___zkAQN",Gu="LightBox-module__arrowInner___p48sW",qu="LightBox-module__arrowIcon___3VaFf",Ku="LightBox-module__arrowImg___pNV88",Uu="LightBox-module__mirror___pjeXc",Xu="LightBox-module__thumbsWrapper___GB-nU",Yu="LightBox-module__thumbsContainerVertical___wttk5",Ju="LightBox-module__thumbsContainer___osSma",Zu="LightBox-module__thumbsAlignStart___MO6tY",Qu="LightBox-module__thumbsAlignCenter___Q4sUx",ep="LightBox-module__thumbsAlignEnd___p4y9R",tp="LightBox-module__thumbItem___HvnF3",np="LightBox-module__closeButton___g2khP",ip="LightBox-module__fadeIn___0m5GW",op="LightBox-module__slideInLeft___gPYwC",rp="LightBox-module__slideInRight___S-pPp",ap="LightBox-module__slideInTop___DFdAj",sp="LightBox-module__slideInBottom___m27kZ",lp="LightBox-module__fadeOut___55qBR",cp="LightBox-module__slideOutLeft___NvU7P",dp="LightBox-module__slideOutRight___SK7eC",up="LightBox-module__slideOutTop___Vgg0z",pp="LightBox-module__slideOutBottom___nJ0Ef",mp="LightBox-module__scaleSlide___vZriG",We={hidden:Mu,heroImage:ku,background:Pu,editor:Au,contentStyle:Wu,imageStyle:Fu,imgWrapper:_u,contain:Hu,cover:Nu,caption:Ou,captionTextInner:ju,lightboxSplide:Bu,arrow:zu,arrowVertical:Du,nextArrow:Vu,arrowInner:Gu,arrowIcon:qu,arrowImg:Ku,mirror:Uu,thumbsWrapper:Xu,thumbsContainerVertical:Yu,thumbsContainer:Ju,thumbsAlignStart:Zu,thumbsAlignCenter:Qu,thumbsAlignEnd:ep,thumbItem:tp,closeButton:np,fadeIn:ip,slideInLeft:op,slideInRight:rp,slideInTop:ap,slideInBottom:sp,fadeOut:lp,slideOutLeft:cp,slideOutRight:dp,slideOutTop:up,slideOutBottom:pp,scaleSlide:mp},Eo=(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% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:i.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,i};function Hl(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 ir(e){const t=e.getBoundingClientRect(),n=Hl(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,l=e.naturalHeight,d=i/o,c=s/l;let u,m;c>d?(u=i,m=i/c):(m=o,u=o*c);const v=t.left+n.left,b=t.top+n.top,S=(i-u)/2+v,y=(o-m)/2+b;return{x:S,y,width:u,height:m}}function ls(e){const t=e.getBoundingClientRect(),n=Hl(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function cs(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 gp(e,t){const n=(()=>{if(e==="fade in")return We.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return We.slideInLeft;case"right":return We.slideInRight;case"top":return We.slideInTop;case"bottom":return We.slideInBottom;default:return We.slideInRight}return We.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return We.fadeIn;if(e==="slide in")switch(t){case"left":return We.slideInLeft;case"right":return We.slideInRight;case"top":return We.slideInTop;case"bottom":return We.slideInBottom;default:return We.slideInRight}return We.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return We.fadeOut;if(e==="slide in")switch(t){case"left":return We.slideOutLeft;case"right":return We.slideOutRight;case"top":return We.slideOutTop;case"bottom":return We.slideOutBottom;default:return We.slideOutRight}return We.fadeOut})(),s=(()=>{if(e==="fade in")return We.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return We.slideOutLeft;case"right":return We.slideOutRight;case"top":return We.slideOutTop;case"bottom":return We.slideOutBottom;default:return We.slideOutRight}return We.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const hp=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:l})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:We.heroImage,onClick:()=>c(!0)}),r.jsx(fp,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},fp=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var Se;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:v,wordSpacing:b,fontSizeLineHeight:S,textAppearance:y,color:w}=i.imageCaption??{},[C,L]=a.useState(0),[k,A]=a.useState(0),[O,P]=a.useState(!1),[D,R]=a.useState(!1),[x,U]=a.useState({}),h=a.useRef(null),I=a.useRef(null),W=a.useRef(null),V=a.useRef(!1),Y=a.useRef(null),ae=a.useRef(null),Z=a.useRef(null),G=a.useRef(null),H=a.useRef(!1),$=a.useRef(null),[M,q]=a.useState(!1),{appear:z,triggers:ee,slider:_,thumbnail:ye,controls:f,area:ve,caption:K,layout:le}=o.lightboxBlock,{appearClass:$e,backdropAppearClass:oe,backdropDisappearClass:fe,disappearClass:X}=gp(z.type,z.direction),be=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const B=()=>{setTimeout(()=>{var F,te;(te=(F=h.current)==null?void 0:F.splide)==null||te.refresh()},16)},re=()=>{A(F=>F+1)};return window.addEventListener("ArticleEditor.Layout:change",B),window.addEventListener("ArticleEditor.ComponentContent:change",re),()=>{window.removeEventListener("ArticleEditor.Layout:change",B),window.removeEventListener("ArticleEditor.ComponentContent:change",re)}},[]),a.useEffect(()=>{if(!e||!ye.isActive){q(!1);return}const B=$.current;if(!B)return;const re=()=>{_.direction==="horiz"?q(B.scrollWidth>B.clientWidth):q(B.scrollHeight>B.clientHeight)};re();const F=new ResizeObserver(re);return F.observe(B),()=>F.disconnect()},[e,ye.isActive,n.length,x,_.direction]);const xe=a.useCallback(()=>{const B=window.matchMedia("(max-width: 768px)").matches,re=cs(ve.color);B&&!l&&re>.9&&(document.body.style.backgroundColor=""),P(!0),V.current=!0;const F=te=>{te.target===Y.current&&te.animationName&&(Y.current&&ae.current&&Y.current.removeEventListener("animationend",ae.current),ae.current=null,V.current&&(V.current=!1,t()),P(!1))};Y.current&&(ae.current=F,Y.current.addEventListener("animationend",F))},[t,ve.color,l]),pe=(B,re,F)=>{var te,ne;if(B){if(ee.type==="click"&&ee.switch==="image")ee.repeat==="close"&&C===n.length-1?xe():(te=h.current)==null||te.go("+1");else if(ee.type==="click"&&ee.switch==="50/50"){const ue=B.getBoundingClientRect(),me=re-ue.left,he=F-ue.top,Le=ue.width,Q=ue.height;let ge;_.direction==="horiz"?ge=me<Le/2?"-1":"+1":ge=he<Q/2?"-1":"+1",(ne=h.current)==null||ne.go(ge)}}},se=B=>{if(H.current){H.current=!1;return}const re=n[C],F=(re==null?void 0:re.image.objectFit)==="cover";let te,ne;if("changedTouches"in B&&B.changedTouches.length>0)te=B.changedTouches[0].clientX,ne=B.changedTouches[0].clientY;else if("clientX"in B)te=B.clientX,ne=B.clientY;else return;let ue;if(F&&W.current){const me=ls(W.current);ue=te>=me.left&&te<=me.right&&ne>=me.top&&ne<=me.bottom}else{const me=W.current?ir(W.current):null;if(!me){B.target===B.currentTarget&&xe();return}ue=te>=me.x&&te<=me.x+me.width&&ne>=me.y&&ne<=me.y+me.height}ue?pe(W.current,te,ne):xe()},Re=B=>{const re=B.target;(re.classList.contains(We.thumbsWrapper)||re.classList.contains(We.thumbsContainer))&&se(B)};a.useEffect(()=>{if(!e)return;const B=re=>{var F,te;if(re.key==="Escape"){xe();return}if(re.key==="ArrowRight"){L(ne=>(ne+1)%Math.max(n.length,1)),(F=h.current)==null||F.go("+1");return}re.key==="ArrowLeft"&&(L(ne=>(ne-1+Math.max(n.length,1))%Math.max(n.length,1)),(te=h.current)==null||te.go("-1"))};return window.addEventListener("keydown",B),()=>{window.removeEventListener("keydown",B)}},[e,xe,n.length]),a.useEffect(()=>{if(e){if(L(0),A(re=>re+1),V.current=!1,P(!1),R(!1),U({}),!be)return;const B=new CustomEvent("page-overlay",{detail:{itemId:be}});window.dispatchEvent(B)}return()=>{Y.current&&ae.current&&(Y.current.removeEventListener("animationend",ae.current),ae.current=null),R(!1)}},[e,be]),a.useEffect(()=>{I.current!==null&&I.current!==_.type&&A(B=>B+1),I.current=_.type},[_.type]),a.useEffect(()=>{if(!e)return;const B=document.body.style.overflow,re=window.matchMedia("(max-width: 768px)").matches,F=cs(ve.color);document.body.style.overflow="hidden",R(!1);const te=ue=>{ue.target===Y.current&&!V.current&&ue.animationName&&(re&&!l&&F>.9&&(document.body.style.backgroundColor=ve.color),R(!0),Y.current&&Z.current&&Y.current.removeEventListener("animationend",Z.current),Z.current=null)};Y.current&&(Z.current=te,Y.current.addEventListener("animationend",te));const ne=ue=>{const me=ue.target;me&&(me.closest(`.${We.thumbsWrapper}`)||me.closest(`.${We.thumbsContainer}`))||_.type!=="slide"&&ue.preventDefault()};return document.addEventListener("touchmove",ne,{passive:!1}),()=>{document.body.style.overflow=B,document.removeEventListener("touchmove",ne),Y.current&&Z.current&&(Y.current.removeEventListener("animationend",Z.current),Z.current=null),R(!1)}},[e,l,ve.color,_.type]),a.useEffect(()=>{if(!e)return;const B=re=>{var te,ne;if(V.current){re.stopPropagation();return}if(H.current){H.current=!1;return}const F=re.target;if(!(F&&(F.closest(`.${We.thumbsContainer}`)||F.closest(`.${We.thumbItem}`)||F.closest(`.${We.arrow}`)||F.closest(`.${We.closeButton}`)||F.closest(`.${We.caption}`)))){if(_.type==="slide"&&ee.type==="drag"&&((ne=(te=h.current)==null?void 0:te.splide)!=null&&ne.root)){const ue=h.current.splide.root;if(F&&(ue.contains(F)||ue===F))return}if(re.touches.length===0&&re.changedTouches.length>0){const ue=n[C],me=(ue==null?void 0:ue.image.objectFit)==="cover",he=re.changedTouches[0];let Le;if(me&&W.current){const Q=ls(W.current);Le=he.clientX>=Q.left&&he.clientX<=Q.right&&he.clientY>=Q.top&&he.clientY<=Q.bottom}else{const Q=W.current?ir(W.current):null;if(!Q)return;Le=he.clientX>=Q.x&&he.clientX<=Q.x+Q.width&&he.clientY>=Q.y&&he.clientY<=Q.y+Q.height}if(!Le){re.stopPropagation(),V.current=!0;const Q=ge=>{ge.stopPropagation(),ge.preventDefault(),document.removeEventListener("click",Q,!0)};document.addEventListener("click",Q,!0),xe()}}}};return document.addEventListener("touchend",B,{passive:!0}),()=>{document.removeEventListener("touchend",B)}},[e,xe,C,n]);const ke=(_.type==="scale"||_.type==="fade")&&_.direction==="vert"&&ee.type==="drag";a.useEffect(()=>{var ge,Ae;if(!e||!ke||!((Ae=(ge=h.current)==null?void 0:ge.splide)!=null&&Ae.root))return;const B=h.current.splide.root,re=30,F=(ie,j)=>{if(G.current){const Oe=Math.abs(ie-G.current.x),Fe=Math.abs(j-G.current.y);(Oe>0||Fe>0)&&(H.current=!0)}},te=ie=>{G.current&&(ie.preventDefault(),F(ie.clientX,ie.clientY))},ne=ie=>{G.current&&ie.touches.length>0&&(ie.preventDefault(),F(ie.touches[0].clientX,ie.touches[0].clientY))},ue=(ie,j)=>{if(!G.current||!h.current){G.current=null;return}const Oe=Math.abs(ie-G.current.x),Fe=Math.abs(j-G.current.y);Fe>re&&Fe>Oe&&h.current.go(j<G.current.y?"+1":"-1"),G.current=null},me=ie=>{G.current&&ue(ie.clientX,ie.clientY),document.removeEventListener("pointerup",me),document.removeEventListener("pointercancel",me),document.removeEventListener("pointermove",te)},he=ie=>{if(G.current){if(ie.changedTouches.length>0){const j=ie.changedTouches[0];ue(j.clientX,j.clientY)}document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),document.removeEventListener("touchmove",ne)}},Le=ie=>{G.current={x:ie.clientX,y:ie.clientY},H.current=!1,document.addEventListener("pointermove",te,{passive:!1}),document.addEventListener("pointerup",me),document.addEventListener("pointercancel",me)},Q=ie=>{ie.touches.length>0&&(G.current={x:ie.touches[0].clientX,y:ie.touches[0].clientY},H.current=!1,document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",he),document.addEventListener("touchcancel",he))};return B.addEventListener("pointerdown",Le),B.addEventListener("touchstart",Q),()=>{B.removeEventListener("pointerdown",Le),B.removeEventListener("touchstart",Q),document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",me),document.removeEventListener("pointercancel",me),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),G.current=null,H.current=!1}},[e,ke,k]);const we={backgroundColor:ve.color,backdropFilter:`blur(${ve.blur}px)`,animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:mi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:Y,className:pt(We.background,O?fe:oe,{[We.editor]:l},{[We.hidden]:!e}),style:{...we,...D&&!l&&!O?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?Y:null,className:pt(We.contentStyle,O?X:$e,{[We.editor]:l},{[We.hidden]:!e}),style:{animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(ka,{onMove:B=>L(B.index),ref:h,className:We.lightboxSplide,options:{arrows:!1,speed:_.duration?parseInt(_.duration):500,direction:_.direction==="horiz"||_.type==="fade"||_.type==="scale"?"ltr":"ttb",pagination:!1,drag:ee.type==="drag"&&!ke,perPage:1,width:"100%",height:"100%",type:_.type==="fade"||_.type==="scale"?"fade":"loop",padding:0,rewind:ee.repeat!=="close",start:0},style:{"--splide-speed":_.duration},children:n.map((B,re)=>{const F=Eo(le.position,le.offset,l),te=`${E.scalingValue(le.padding.top,l)} ${E.scalingValue(le.padding.right,l)} ${E.scalingValue(le.padding.bottom,l)} ${E.scalingValue(le.padding.left,l)}`,ne=_.type==="scale"?(()=>{const{transform:ue,...me}=F;return{...me,position:"absolute",padding:te,boxSizing:"border-box","--position-transform":ue||"none"}})():{...F,position:"absolute",padding:te,boxSizing:"border-box"};return r.jsx(Pa,{children:r.jsx("div",{className:We.imgWrapper,onClick:se,children:r.jsx("img",{ref:re===C?W:null,className:pt(We.imageStyle,{[We.contain]:B.image.objectFit==="contain",[We.cover]:B.image.objectFit==="cover",[We.scaleSlide]:_.type==="scale"}),src:B.image.url,alt:B.image.name??"",style:{...ne,pointerEvents:B.image.objectFit==="contain"?"none":"auto"}})})},re)})},k),f.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:pt(We.arrow,{[We.arrowVertical]:_.direction==="vert"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:r.jsxs("button",{className:We.arrowInner,style:{transform:`translate(${E.scalingValue(f.offset.x,l)}, ${E.scalingValue(f.offset.y*(_.direction==="horiz"?1:-1),l)}) scale(${f.scale}) rotate(${_.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=h.current)==null?void 0:B.go("-1")},"aria-label":"Previous",children:[f.arrowsImgUrl&&r.jsx(fn,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:pt(We.arrowImg,We.mirror)}),!f.arrowsImgUrl&&r.jsx(ds,{color:f.color,className:pt(We.arrowIcon,We.arrowImg,We.mirror)})]})}),r.jsx("div",{className:pt(We.arrow,We.nextArrow,{[We.arrowVertical]:_.direction==="vert"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:r.jsxs("button",{className:We.arrowInner,style:{transform:`translate(${E.scalingValue(f.offset.x*(_.direction==="horiz"?-1:1),l)}, ${E.scalingValue(f.offset.y,l)}) scale(${f.scale}) rotate(${_.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=h.current)==null?void 0:B.go("+1")},"aria-label":"Next",children:[f.arrowsImgUrl&&r.jsx(fn,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:We.arrowImg}),!f.arrowsImgUrl&&r.jsx(ds,{color:f.color,className:pt(We.arrowIcon,We.arrowImg)})]})})]}),ve.closeIconUrl&&(()=>{const B=Eo(ve.closeIconAlign,ve.closeIconOffset,l),re=`scale(${ve.closeIconScale})`,F=B.transform?`${B.transform} ${re}`:re;return r.jsx("button",{className:We.closeButton,style:{...B,transform:F},onClick:xe,"aria-label":"Close lightbox",children:r.jsx(fn,{url:ve.closeIconUrl,fill:ve.closeIconColor??"#000000",hoverFill:ve.closeIconHover??"#cccccc"})})})(),K&&K.isActive&&i.imageCaption&&((Se=n[C])==null?void 0:Se.imageCaption)&&r.jsx("div",{className:We.caption,style:{...Eo(K.alignment,K.offset,l),fontFamily:xr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":E.scalingValue(c.width,l),letterSpacing:E.scalingValue(m,l),wordSpacing:E.scalingValue(b,l),textAlign:v,fontSize:E.scalingValue(S.fontSize,l),lineHeight:E.scalingValue(S.lineHeight,l),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:w},onClick:B=>B.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:We.captionTextInner,style:{"--link-color":K.linkColor,"--link-hover-color":K.linkHoverColor},children:r.jsx(Ei,{content:n[C].imageCaption})})}),ye.isActive&&(()=>{const[B,re]=ye.position.split("-"),F=_.direction==="horiz"?`${B}-left`:ye.position,te=Eo(F,ye.offset,l),ne=()=>{if(_.direction==="horiz"){if(re==="left")return"flex-start";if(re==="center")return"center";if(re==="right")return"flex-end"}else{if(B==="top")return"flex-start";if(B==="middle")return"center";if(B==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:$,className:We.thumbsWrapper,onClick:ue=>Re(ue),style:{position:l?"absolute":"fixed",...te,..._.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:pt(We.thumbsContainer,{[We.thumbsContainerVertical]:_.direction==="vert",[We.thumbsAlignStart]:ye.align==="start",[We.thumbsAlignCenter]:ye.align==="center",[We.thumbsAlignEnd]:ye.align==="end"}),style:{gap:E.scalingValue(ye.grid.gap,l),justifyContent:M?"flex-start":ne()},children:n.map((ue,me)=>{const he=me===C,Le=x[me],ge=ye.grid.size*(he?ye.activeState.scale:1),Ae=()=>{if(ye.fit!=="fit")return{};if(!Le)return _.direction==="horiz"?{height:E.scalingValue(ge,l)}:{width:E.scalingValue(ge,l)};const ie=Le.width/Le.height;if(_.direction==="horiz"){const j=ge,Oe=j*ie;return{width:E.scalingValue(Oe,l),height:E.scalingValue(j,l)}}else{const j=ge,Oe=j/ie;return{width:E.scalingValue(j,l),height:E.scalingValue(Oe,l)}}};return r.jsx("button",{className:We.thumbItem,style:{..._.direction==="horiz"&&ye.fit!=="fit"?{height:E.scalingValue(ge,l)}:{},..._.direction==="vert"&&ye.fit!=="fit"?{width:E.scalingValue(ge,l)}:{},...ye.fit==="cover"?{width:E.scalingValue(ge,l),height:E.scalingValue(ge,l)}:{},...Ae(),transition:he?"all 0.25s ease-out":"none",opacity:he?ye.activeState.opacity/100:ye.opacity/100,"--thumb-hover":ye.activeState.opacity/100},onClick:ie=>{var j;ie.stopPropagation(),L(me),(j=h.current)==null||j.go(me)},onMouseEnter:()=>{var ie;ye.triggers==="hov"&&((ie=h.current)==null||ie.go(me))},children:r.jsx("img",{src:ue.image.url,alt:ue.image.name??"",onLoad:ie=>{const j=ie.currentTarget;j.naturalWidth&&j.naturalHeight&&U(Oe=>({...Oe,[me]:{width:j.naturalWidth,height:j.naturalHeight}}))},style:{objectFit:ye.fit==="cover"?"cover":"contain",...ye.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ye.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ue.image.name}-${me}`)})})})})()]})]}),document.getElementById(s))};function ds({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 yp={element:hp,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 Mo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function vp(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${$o(48)};
11
+ min-height: ${Mo(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: ${$o(4)};
35
+ gap: ${Mo(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: ${$o(8)};
131
+ margin-top: ${Mo(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${$o(8)};
135
+ margin-top: ${Mo(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 Zu({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:l}){const s=!!n,d=i&&t||!t,{prefix:c}=L.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:y=[],buttonLabel:w,gap:$,fieldsGap:h,buttonCorners:v,buttonStroke:S,buttonPadding:T,isButtonFullWidth:R,inputCorners:P,inputStroke:H,inputPadding:E,inputColor:j,inputTextColor:k,inputBorderColor:x,placeholderColor:Y,buttonColor:f,buttonTextColor:A,buttonBorderColor:W,labelTextColor:z,successColor:G,errorColor:le,fontFamily:J,inputFontSettings:D,inputFontSize:N,inputLineHeight:C,inputLetterSpacing:I,inputWordSpacing:V,inputTextAppearance:K,buttonFontSettings:ee,buttonFontSize:O,buttonLineHeight:ge,buttonLetterSpacing:g,buttonWordSpacing:he,buttonTextAppearance:re,labelFontSettings:be,labelFontSize:ke,labelLineHeight:ae,labelLetterSpacing:ve,labelWordSpacing:U,labelTextAppearance:xe,statusFontSettings:me,statusFontSize:pe,statusLineHeight:se,statusLetterSpacing:Te,statusWordSpacing:Ie,statusTextAppearance:fe,successMessage:Se,errorMessage:_,stateOverrides:te}=e,M=u==="B",X=y.slice(0,Math.min(m,y.length)),Z={fontSettings:{fontFamily:J,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:N??.01,lineHeight:C,letterSpacing:I??0,wordSpacing:V??0,textAppearance:K,color:k},ce=pn(Xt(Z,t)),ue=L.scalingValue(H??0,t),ye=L.scalingValue((C??N??.01)+((E==null?void 0:E.top)??0)+((E==null?void 0:E.bottom)??0)+(u==="C"?H??0:(H??0)*2),t),Le={...ce,borderStyle:"solid",borderRadius:u==="C"?0:L.scalingValue(P??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ue,borderLeftWidth:0}:{borderWidth:ue},paddingTop:L.scalingValue((E==null?void 0:E.top)??0,t),paddingRight:L.scalingValue((E==null?void 0:E.right)??0,t),paddingBottom:L.scalingValue((E==null?void 0:E.bottom)??0,t),paddingLeft:L.scalingValue((E==null?void 0:E.left)??0,t),height:ye,minHeight:ye},q={fontSettings:{fontFamily:J,fontWeight:(ee==null?void 0:ee.fontWeight)??400,fontStyle:(ee==null?void 0:ee.fontStyle)??"normal"},fontSize:O??.01,lineHeight:ge,letterSpacing:g??0,wordSpacing:he??0,textAppearance:re,color:A},de=pn(Xt(q,t)),Ee=L.scalingValue(S??0,t),Q={fontSettings:{fontFamily:J,fontWeight:(be==null?void 0:be.fontWeight)??400,fontStyle:(be==null?void 0:be.fontStyle)??"normal"},fontSize:ke??.01,lineHeight:ae,letterSpacing:ve??0,wordSpacing:U??0,textAppearance:xe,color:z},ne=Xt(Q,t),Fe={fontSettings:{fontFamily:J,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:pe??.01,lineHeight:se,letterSpacing:Te??0,wordSpacing:Ie??0,textAppearance:fe,color:G},We=pn(Xt(Fe,t)),Ge=L.buildColorVars(c,{inputColor:j,inputTextColor:k,inputBorderColor:x,placeholderColor:Y!=null&&Y.trim()?Y:"#cccccc",buttonColor:f,buttonTextColor:A,buttonBorderColor:W,labelTextColor:z,successColor:G,errorColor:le},Qu,ep,te),[Ze,ct]=a.useState(()=>Object.fromEntries(X.map(ze=>[ze.name,""]))),[pt,Xe]=a.useState("idle"),[vt,St]=a.useState(null),et=l==="success"?"success":l==="error"?"error":pt,Be=l==="error"?_:vt,dt=l==="filled",mt=a.useMemo(()=>{if(!dt)return Ze;let ze=null;for(const Qe of X)(Ze[Qe.name]??"").trim().length>0||(ze=ze??{...Ze},ze[Qe.name]="Filled");return ze??Ze},[Ze,dt,X]),ot=et==="error"?L.getFormFieldValidationError(X,mt):null,Ht=`${l&&l!=="default"?`${c}-state-${l}`:""}`.trim(),tt=o==null?void 0:o.submitUrl,At=(ze,Qe)=>{ct(He=>({...He,[ze]:Qe}))},It=async ze=>{if(ze.preventDefault(),!d)return;const Qe=Object.fromEntries(X.map(st=>{var $t;return[st.name,(($t=Ze[st.name])==null?void 0:$t.trim())??""]}).filter(([,st])=>st));if(!tt){Xe("error"),St("No integrations were found for this form.");return}if(Object.keys(Qe).length===0)return;const He=L.getFormFieldValidationError(X,Ze);if(He){Xe("error"),St(He);return}Xe("submitting"),St(null);try{const st=await fetch(tt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe)});if(!st.ok){const $t=await st.text();throw new Error($t||`Request failed: ${st.status}`)}Xe("success"),ct(Object.fromEntries(X.map($t=>[$t.name,""])))}catch(st){Xe("error"),St(st instanceof Error?st.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Ht}`.trim(),style:Ge,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ju(c)}}),r.jsxs("form",{onSubmit:It,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:X.map((ze,Qe)=>r.jsxs(a.Fragment,{children:[Qe>0&&r.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${c}-control`:void 0,style:{height:L.scalingValue(h??0,t)}}),r.jsxs("div",{className:`${c}-field-group${M?` ${c}-labeled`:""}`,children:[M&&r.jsx("span",{className:`${c}-field-label`,style:ne?{...ne,lineHeight:ne.fontSize}:void 0,children:ze.label||ze.name}),ze.type==="textarea"?r.jsx("textarea",{name:ze.name,autoComplete:"off",value:mt[ze.name]??"",onChange:He=>At(ze.name,He.target.value),placeholder:ze.placeholder,className:`${c}-input`,style:Le,rows:1,"data-filled":dt||(mt[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:mt[ze.name]??"",onChange:He=>At(ze.name,He.target.value),placeholder:ze.placeholder,required:ze.isRequired??ze.type==="email",className:`${c}-input`,style:Le,"data-filled":dt||(mt[ze.name]??"").trim().length>0})]})]},Qe))}),r.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${c}-control`:void 0,style:{height:L.scalingValue($??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:L.scalingValue(v??0,t),borderWidth:Ee,paddingTop:L.scalingValue((T==null?void 0:T.top)??0,t),paddingRight:L.scalingValue((T==null?void 0:T.right)??0,t),paddingBottom:L.scalingValue((T==null?void 0:T.bottom)??0,t),paddingLeft:L.scalingValue((T==null?void 0:T.left)??0,t),pointerEvents:d?"auto":void 0,...de,...R?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:R?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:pt==="submitting"?"...":w})})})]}),et==="success"&&r.jsx("p",{className:`${c}-success`,style:{...We},children:Se}),et==="error"&&r.jsx("p",{className:`${c}-error`,style:{...We},role:"alert",children:ot??Be??_})]})}const Qu={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"},ep=["hover","focus","filled","success","error"],tp=`import React, { useMemo, useState } from 'react';
158
+ `}function xp({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=E.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:v=[],buttonLabel:b,gap:S,fieldsGap:y,buttonCorners:w,buttonStroke:C,buttonPadding:L,isButtonFullWidth:k,inputCorners:A,inputStroke:O,inputPadding:P,inputColor:D,inputTextColor:R,inputBorderColor:x,placeholderColor:U,buttonColor:h,buttonTextColor:I,buttonBorderColor:W,labelTextColor:V,successColor:Y,errorColor:ae,fontFamily:Z,inputFontSettings:G,inputFontSize:H,inputLineHeight:$,inputLetterSpacing:M,inputWordSpacing:q,inputTextAppearance:z,buttonFontSettings:ee,buttonFontSize:_,buttonLineHeight:ye,buttonLetterSpacing:f,buttonWordSpacing:ve,buttonTextAppearance:K,labelFontSettings:le,labelFontSize:$e,labelLineHeight:oe,labelLetterSpacing:fe,labelWordSpacing:X,labelTextAppearance:be,statusFontSettings:xe,statusFontSize:pe,statusLineHeight:se,statusLetterSpacing:Re,statusWordSpacing:ke,statusTextAppearance:we,successMessage:Se,errorMessage:B,stateOverrides:re}=e,F=u==="B",te=v.slice(0,Math.min(m,v.length)),ne={fontSettings:{fontFamily:Z,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:H??.01,lineHeight:$,letterSpacing:M??0,wordSpacing:q??0,textAppearance:z,color:R},ue=hn(Qt(ne,t)),me=E.scalingValue(O??0,t),he=E.scalingValue(($??H??.01)+((P==null?void 0:P.top)??0)+((P==null?void 0:P.bottom)??0)+(u==="C"?O??0:(O??0)*2),t),Le={...ue,borderStyle:"solid",borderRadius:u==="C"?0:E.scalingValue(A??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:me,borderLeftWidth:0}:{borderWidth:me},paddingTop:E.scalingValue((P==null?void 0:P.top)??0,t),paddingRight:E.scalingValue((P==null?void 0:P.right)??0,t),paddingBottom:E.scalingValue((P==null?void 0:P.bottom)??0,t),paddingLeft:E.scalingValue((P==null?void 0:P.left)??0,t),height:he,minHeight:he},Q={fontSettings:{fontFamily:Z,fontWeight:(ee==null?void 0:ee.fontWeight)??400,fontStyle:(ee==null?void 0:ee.fontStyle)??"normal"},fontSize:_??.01,lineHeight:ye,letterSpacing:f??0,wordSpacing:ve??0,textAppearance:K,color:I},ge=hn(Qt(Q,t)),Ae=E.scalingValue(C??0,t),ie={fontSettings:{fontFamily:Z,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:oe,letterSpacing:fe??0,wordSpacing:X??0,textAppearance:be,color:V},j=Qt(ie,t),Oe={fontSettings:{fontFamily:Z,fontWeight:(xe==null?void 0:xe.fontWeight)??400,fontStyle:(xe==null?void 0:xe.fontStyle)??"normal"},fontSize:pe??.01,lineHeight:se,letterSpacing:Re??0,wordSpacing:ke??0,textAppearance:we,color:Y},Fe=hn(Qt(Oe,t)),et=E.buildColorVars(c,{inputColor:D,inputTextColor:R,inputBorderColor:x,placeholderColor:U!=null&&U.trim()?U:"#cccccc",buttonColor:h,buttonTextColor:I,buttonBorderColor:W,labelTextColor:V,successColor:Y,errorColor:ae},bp,wp,re),[Ye,at]=a.useState(()=>Object.fromEntries(te.map(Ge=>[Ge.name,""]))),[mt,De]=a.useState("idle"),[it,$t]=a.useState(null),ot=s==="success"?"success":s==="error"?"error":mt,Ue=s==="error"?B:it,ht=s==="filled",xt=a.useMemo(()=>{if(!ht)return Ye;let Ge=null;for(const qe of te)(Ye[qe.name]??"").trim().length>0||(Ge=Ge??{...Ye},Ge[qe.name]="Filled");return Ge??Ye},[Ye,ht,te]),ct=ot==="error"?E.getFormFieldValidationError(te,xt):null,_t=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Qe=o==null?void 0:o.submitUrl,Tt=(Ge,qe)=>{at(Pe=>({...Pe,[Ge]:qe}))},Lt=async Ge=>{if(Ge.preventDefault(),!d)return;const qe=Object.fromEntries(te.map(gt=>{var It;return[gt.name,((It=Ye[gt.name])==null?void 0:It.trim())??""]}).filter(([,gt])=>gt));if(!Qe){De("error"),$t("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const Pe=E.getFormFieldValidationError(te,Ye);if(Pe){De("error"),$t(Pe);return}De("submitting"),$t(null);try{const gt=await fetch(Qe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!gt.ok){const It=await gt.text();throw new Error(It||`Request failed: ${gt.status}`)}De("success"),at(Object.fromEntries(te.map(It=>[It.name,""])))}catch(gt){De("error"),$t(gt instanceof Error?gt.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${_t}`.trim(),style:et,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:vp(c)}}),r.jsxs("form",{onSubmit:Lt,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:te.map((Ge,qe)=>r.jsxs(a.Fragment,{children:[qe>0&&r.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:E.scalingValue(y??0,t)}}),r.jsxs("div",{className:`${c}-field-group${F?` ${c}-labeled`:""}`,children:[F&&r.jsx("span",{className:`${c}-field-label`,style:j?{...j,lineHeight:j.fontSize}:void 0,children:Ge.label||Ge.name}),Ge.type==="textarea"?r.jsx("textarea",{name:Ge.name,autoComplete:"off",value:xt[Ge.name]??"",onChange:Pe=>Tt(Ge.name,Pe.target.value),placeholder:Ge.placeholder,className:`${c}-input`,style:Le,rows:1,"data-filled":ht||(xt[Ge.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Ge.type==="phone"?"tel":Ge.type==="email"?"email":"text",name:Ge.name,autoComplete:"off",value:xt[Ge.name]??"",onChange:Pe=>Tt(Ge.name,Pe.target.value),placeholder:Ge.placeholder,required:Ge.isRequired??Ge.type==="email",className:`${c}-input`,style:Le,"data-filled":ht||(xt[Ge.name]??"").trim().length>0})]})]},qe))}),r.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:E.scalingValue(S??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(w??0,t),borderWidth:Ae,paddingTop:E.scalingValue((L==null?void 0:L.top)??0,t),paddingRight:E.scalingValue((L==null?void 0:L.right)??0,t),paddingBottom:E.scalingValue((L==null?void 0:L.bottom)??0,t),paddingLeft:E.scalingValue((L==null?void 0:L.left)??0,t),pointerEvents:d?"auto":void 0,...ge,...k?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:k?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:mt==="submitting"?"...":b})})})]}),ot==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Fe},children:Se}),ot==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Fe},role:"alert",children:ct??Ue??B})]})}const bp={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"},wp=["hover","focus","filled","success","error"],Sp=`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
- `,np=[{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"}],Co={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ip=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],op={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:{...Co.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:{...Co.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:{...Co.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:{...Co.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:np,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",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:!0,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:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},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:[...ip],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"]},rp={element:Zu,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:op,sourceCode:tp,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function To(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ap(e){return`
792
+ `,$p=[{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"}],ko={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Cp=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Tp={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:{...ko.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:{...ko.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:{...ko.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:{...ko.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:$p,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",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:!0,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:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},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:[...Cp],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"]},Lp={element:xp,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:Tp,sourceCode:Sp,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Po(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ip(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: ${To(8)};
975
- font-size: ${To(14)};
974
+ margin-top: ${Po(8)};
975
+ font-size: ${Po(14)};
976
976
  color: var(--${e}-success-success-color, var(--${e}-success-color));
977
977
  }
978
978
  .${e}-error {
979
- margin-top: ${To(8)};
980
- font-size: ${To(14)};
979
+ margin-top: ${Po(8)};
980
+ font-size: ${Po(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const sp=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:l}=L.useScopedStyles(),s=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:m=1,fontFamily:y,inputFontSettings:w,inputFontSize:$,inputLineHeight:h,inputLetterSpacing:v,inputWordSpacing:S,inputTextAppearance:T,buttonFontSettings:R,buttonFontSize:P,buttonLineHeight:H,buttonLetterSpacing:E,buttonWordSpacing:j,buttonTextAppearance:k,statusFontSettings:x,statusFontSize:Y,statusLineHeight:f,statusLetterSpacing:A,statusWordSpacing:W,statusTextAppearance:z,iconMaxWidth:G,minHeight:le,corners:J,stroke:D,stateOverrides:N,inputPadding:C,buttonPadding:I,successMessage:V="Thanks for subscribing!",errorMessage:K="Please, fill all required fields."}=e,ee=d.slice(0,Math.min(m,d.length)),[O,ge]=a.useState(()=>Object.fromEntries(ee.map(Q=>[Q.name,""]))),[g,he]=a.useState("idle"),[re,be]=a.useState(null),ke=o==="success"?"success":o==="error"?"error":g,ae=o==="error"?K:re,ve=o==="filled",U=a.useMemo(()=>{if(!ve)return O;let Q=null;for(const ne of ee)(O[ne.name]??"").trim().length>0||(Q=Q??{...O},Q[ne.name]="Filled");return Q??O},[ve,O,ee]),xe=ke==="error"?L.getFormFieldValidationError(ee,U):null,me=o&&o!=="default"?`${l}-state-${o}`:"",pe=ee.some(Q=>(U[Q.name]??"").trim().length>0),se=me!==`${l}-state-filled`&&pe?`${l}-state-filled`:"",Te=`${me} ${se}`.trim(),Ie=i==null?void 0:i.submitUrl,fe=u??"",Se=(c==null?void 0:c.icon)??"",_=(c==null?void 0:c.mode)==="On",te=fe||"Submit",M={fontSettings:{fontFamily:y,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:$??.01,lineHeight:h,letterSpacing:v??0,wordSpacing:S??0,textAppearance:T,color:e.inputTextColor??"#111111"},X={fontSettings:{fontFamily:y,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:P??.01,lineHeight:H,letterSpacing:E??0,wordSpacing:j??0,textAppearance:k,color:e.buttonTextColor??"#ffffff"},Z={fontSettings:{fontFamily:y,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:Y??.01,lineHeight:f,letterSpacing:A??0,wordSpacing:W??0,textAppearance:z,color:e.successColor??"#22c55e"},ce=pn(Xt(M,t)),ue=pn(Xt(X,t)),ye=pn(Xt(Z,t)),Le=L.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(M==null?void 0:M.color)??"#111111",buttonTextColor:e.buttonTextColor??(X==null?void 0:X.color)??"#ffffff"},lp,cp,N),q={borderRadius:L.scalingValue(J,t),borderWidth:L.scalingValue(D,t),borderStyle:"solid"},de={borderLeftWidth:L.scalingValue(D,t)},Ee=async Q=>{if(Q.preventDefault(),!s)return;const ne=Object.fromEntries(ee.map(We=>{var Ge;return[We.name,((Ge=O[We.name])==null?void 0:Ge.trim())??""]}).filter(([,We])=>We));if(!Ie){he("error"),be("No integrations were found for this form.");return}if(Object.keys(ne).length===0)return;const Fe=L.getFormFieldValidationError(ee,O);if(Fe){he("error"),be(Fe);return}he("submitting"),be(null);try{const We=await fetch(Ie,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ne)});if(!We.ok){const Ge=await We.text();throw new Error(Ge||`Request failed: ${We.status}`)}he("success"),ge(Object.fromEntries(ee.map(Ge=>[Ge.name,""])))}catch(We){he("error"),be(We instanceof Error?We.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${Te}`.trim(),style:Le,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ap(l)}}),r.jsxs("form",{onSubmit:Ee,className:`${l}-form`,style:{...q,height:L.scalingValue(le,t),minHeight:L.scalingValue(le,t)},children:[r.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:ee.map(Q=>r.jsx("input",{type:Q.type==="email"?"email":Q.type==="phone"?"tel":"text",name:Q.name,autoComplete:"off",value:U[Q.name]??"",onChange:ne=>ge(Fe=>({...Fe,[Q.name]:ne.target.value})),placeholder:Q.placeholder,required:Q.isRequired??Q.type==="email",className:`${l}-input`,style:{...ce,paddingRight:L.scalingValue(C.right,t),paddingLeft:L.scalingValue(C.left,t),paddingTop:L.scalingValue(C.top,t),paddingBottom:L.scalingValue(C.bottom,t)}},Q.name))}),r.jsx("div",{className:`${l}-overlayAnchor`,children:r.jsx("button",{type:s?"submit":"button",className:`${l}-submitBtn`,"aria-label":te,style:{...ue,...de,paddingRight:L.scalingValue(I.right,t),paddingLeft:L.scalingValue(I.left,t),paddingTop:L.scalingValue(I.top,t),paddingBottom:L.scalingValue(I.bottom,t),pointerEvents:s?"auto":void 0},children:g==="submitting"?"...":_?Se&&r.jsx(mn,{url:Se,className:`${l}-submitBtnIcon`,style:{maxWidth:L.scalingValue(G??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):fe})})]}),ke==="success"&&r.jsx("p",{className:`${l}-success`,style:{...ye},children:V}),ke==="error"&&r.jsx("p",{className:`${l}-error`,style:{...ye},role:"alert",children:xe??ae??K})]})},lp={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"},cp=["hover","focus","filled","success","error"],dp=`import React, { useMemo, useState } from 'react';
983
+ `}const Rp=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=E.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:m=1,fontFamily:v,inputFontSettings:b,inputFontSize:S,inputLineHeight:y,inputLetterSpacing:w,inputWordSpacing:C,inputTextAppearance:L,buttonFontSettings:k,buttonFontSize:A,buttonLineHeight:O,buttonLetterSpacing:P,buttonWordSpacing:D,buttonTextAppearance:R,statusFontSettings:x,statusFontSize:U,statusLineHeight:h,statusLetterSpacing:I,statusWordSpacing:W,statusTextAppearance:V,iconMaxWidth:Y,minHeight:ae,corners:Z,stroke:G,stateOverrides:H,inputPadding:$,buttonPadding:M,successMessage:q="Thanks for subscribing!",errorMessage:z="Please, fill all required fields."}=e,ee=d.slice(0,Math.min(m,d.length)),[_,ye]=a.useState(()=>Object.fromEntries(ee.map(ie=>[ie.name,""]))),[f,ve]=a.useState("idle"),[K,le]=a.useState(null),$e=o==="success"?"success":o==="error"?"error":f,oe=o==="error"?z:K,fe=o==="filled",X=a.useMemo(()=>{if(!fe)return _;let ie=null;for(const j of ee)(_[j.name]??"").trim().length>0||(ie=ie??{..._},ie[j.name]="Filled");return ie??_},[fe,_,ee]),be=$e==="error"?E.getFormFieldValidationError(ee,X):null,xe=o&&o!=="default"?`${s}-state-${o}`:"",pe=ee.some(ie=>(X[ie.name]??"").trim().length>0),se=xe!==`${s}-state-filled`&&pe?`${s}-state-filled`:"",Re=`${xe} ${se}`.trim(),ke=i==null?void 0:i.submitUrl,we=u??"",Se=(c==null?void 0:c.icon)??"",B=(c==null?void 0:c.mode)==="On",re=we||"Submit",F={fontSettings:{fontFamily:v,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:S??.01,lineHeight:y,letterSpacing:w??0,wordSpacing:C??0,textAppearance:L,color:e.inputTextColor??"#111111"},te={fontSettings:{fontFamily:v,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:A??.01,lineHeight:O,letterSpacing:P??0,wordSpacing:D??0,textAppearance:R,color:e.buttonTextColor??"#ffffff"},ne={fontSettings:{fontFamily:v,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:U??.01,lineHeight:h,letterSpacing:I??0,wordSpacing:W??0,textAppearance:V,color:e.successColor??"#22c55e"},ue=hn(Qt(F,t)),me=hn(Qt(te,t)),he=hn(Qt(ne,t)),Le=E.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(F==null?void 0:F.color)??"#111111",buttonTextColor:e.buttonTextColor??(te==null?void 0:te.color)??"#ffffff"},Ep,Mp,H),Q={borderRadius:E.scalingValue(Z,t),borderWidth:E.scalingValue(G,t),borderStyle:"solid"},ge={borderLeftWidth:E.scalingValue(G,t)},Ae=async ie=>{if(ie.preventDefault(),!l)return;const j=Object.fromEntries(ee.map(Fe=>{var et;return[Fe.name,((et=_[Fe.name])==null?void 0:et.trim())??""]}).filter(([,Fe])=>Fe));if(!ke){ve("error"),le("No integrations were found for this form.");return}if(Object.keys(j).length===0)return;const Oe=E.getFormFieldValidationError(ee,_);if(Oe){ve("error"),le(Oe);return}ve("submitting"),le(null);try{const Fe=await fetch(ke,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(!Fe.ok){const et=await Fe.text();throw new Error(et||`Request failed: ${Fe.status}`)}ve("success"),ye(Object.fromEntries(ee.map(et=>[et.name,""])))}catch(Fe){ve("error"),le(Fe instanceof Error?Fe.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Re}`.trim(),style:Le,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ip(s)}}),r.jsxs("form",{onSubmit:Ae,className:`${s}-form`,style:{...Q,height:E.scalingValue(ae,t),minHeight:E.scalingValue(ae,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:ee.map(ie=>r.jsx("input",{type:ie.type==="email"?"email":ie.type==="phone"?"tel":"text",name:ie.name,autoComplete:"off",value:X[ie.name]??"",onChange:j=>ye(Oe=>({...Oe,[ie.name]:j.target.value})),placeholder:ie.placeholder,required:ie.isRequired??ie.type==="email",className:`${s}-input`,style:{...ue,paddingRight:E.scalingValue($.right,t),paddingLeft:E.scalingValue($.left,t),paddingTop:E.scalingValue($.top,t),paddingBottom:E.scalingValue($.bottom,t)}},ie.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":re,style:{...me,...ge,paddingRight:E.scalingValue(M.right,t),paddingLeft:E.scalingValue(M.left,t),paddingTop:E.scalingValue(M.top,t),paddingBottom:E.scalingValue(M.bottom,t),pointerEvents:l?"auto":void 0},children:f==="submitting"?"...":B?Se&&r.jsx(fn,{url:Se,className:`${s}-submitBtnIcon`,style:{maxWidth:E.scalingValue(Y??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):we})})]}),$e==="success"&&r.jsx("p",{className:`${s}-success`,style:{...he},children:q}),$e==="error"&&r.jsx("p",{className:`${s}-error`,style:{...he},role:"alert",children:be??oe??z})]})},Ep={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"},Mp=["hover","focus","filled","success","error"],kp=`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
- `,up="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>'),pp=[{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."}],wr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},mp=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],gp={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:{...wr.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:{...wr.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:{...wr.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:pp,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:up},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:.0053,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},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,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:[...mp],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"]},hp={element:sp,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},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:gp,sourceCode:dp};function fp(e,t){const n=t>0?`${t}px`:"0px";return`
1560
+ `,Pp="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>'),Ap=[{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."}],Wr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Wp=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Fp={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:{...Wr.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:{...Wr.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:{...Wr.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:Ap,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Pp},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:.0053,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},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,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:[...Wp],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"]},_p={element:Rp,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},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:Fp,sourceCode:kp};function Hp(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 yp=30,vp=20,Sr=3,xp=12,bp=32,wp=3,Sp=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")},$p=(e,t)=>Array.from({length:t},()=>e).flat(),Cp=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},xl=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Ua=(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),l=Number.parseFloat(o.columnGap||o.gap||"0")||0,s=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(s>0)return s;const d=Array.from({length:t},(u,m)=>e.children[m]),c=xl(d);return c<=0?0:c+l*Math.max(0,t-1)},Tp=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=xl(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),l=Number.parseFloat(o.columnGap||o.gap||"0")||0,s=Number.parseFloat(o.paddingRight)||0;return i+l*Math.max(0,e.children.length-1)+s},Lp=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Ip=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Lp(i,e))},Rp=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:l,isFirstSet:s,scaled:d,onFirstSetImageDone:c})=>{var x,Y,f;const u=a.useRef(null);a.useLayoutEffect(()=>{if(!s)return;const A=u.current;A!=null&&A.complete&&(c==null||c())},[s,(x=e.image)==null?void 0:x.url,c]);const m=n.display==="cover",y=n.ratioValue??"1:1",w=n.reversed??!1,[$,h]=y.split(":").map(Number),T=(w?h:$)/(w?$:h),R=i/T,P=R>o?o:R,H=R>o?o*T:i,E=d(H),j=d(P),k=((Y=e.image)==null?void 0:Y.url)&&r.jsx("img",{ref:u,src:e.image.url,alt:((f=e.image)==null?void 0:f.name)??"",style:m?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:s?c:void 0,onError:s?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...m?{width:E}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...m?{width:E,height:j,overflow:"hidden"}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:k&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:it(`${t}-marquee-link`,!m&&`${t}-marquee-link-contain`),children:k}):k})})},Ep=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=L.useScopedStyles(),[s,d]=a.useState(0),c=s>0?Math.round(s):0,u=a.useMemo(()=>fp(l,c),[l,c]),{speed:m,direction:y,pauseOnHover:w,gap:$,imageMaxWidth:h,imageMaxHeight:v,hoverEffect:S}=e,T=a.useMemo(()=>Cp(e.imageFit),[e.imageFit]),R=(t==null?void 0:t.length)??0,P=!!o,H=!n||!!i,E=H&&S!=="off"&&S!=="randomize"?`${l}-image-hover-${S}`:void 0,j=n?!!i:!0,x=((t==null?void 0:t.length)??0)>0&&(j||!!n),Y=Math.max(0,m)*yp,f=pe=>L.scalingValue(pe,n??!1),A=a.useRef(null),W=a.useRef(null),z=a.useRef(null),[G,le]=a.useState(0),J=j&&w==="on",[D,N]=a.useState(!1),[C,I]=a.useState({}),V=a.useRef(C);V.current=C;const K=a.useRef(null),ee=a.useRef(0),O=a.useRef(null),ge=a.useMemo(()=>(t??[]).map(pe=>{var se;return((se=pe.image)==null?void 0:se.url)??""}).join("\0"),[t]),[g,he]=a.useState(Sr),re=a.useMemo(()=>{const pe=t??[];return pe.length===0||!(j||!!n)?pe:$p(pe,g)},[t,j,g,n]),be=a.useMemo(()=>(t??[]).filter(pe=>{var se;return!!((se=pe.image)!=null&&se.url)}).length,[t]),ke=x?wp:1;a.useLayoutEffect(()=>{ee.current=0,I({}),K.current=null,he(Sr),d(0)},[ge]),a.useEffect(()=>{if(!H||S!=="randomize")return;const pe=A.current;if(!pe)return;const se=Se=>{I(_=>{const te=Array.from(Se).filter(X=>X in _&&!Ip(pe,X));if(te.length===0)return _;const M={..._};return te.forEach(X=>{delete M[X]}),M})},Te=new IntersectionObserver(Se=>{const _=new Set;for(const te of Se){const M=te.target.dataset.marqueeItemIndex,X=M!==void 0?Number(M):NaN;Number.isNaN(X)||_.add(X)}_.size>0&&se(_)},{root:pe,threshold:0});Object.keys(C).forEach(Se=>{const _=Number(Se);pe.querySelectorAll(`[data-marquee-item-index="${_}"]`).forEach(te=>Te.observe(te))});const Ie={current:0},fe=()=>{const Se=Object.keys(V.current);Se.length!==0&&(se(Se.map(Number)),Ie.current=requestAnimationFrame(fe))};return Object.keys(V.current).length>0&&(Ie.current=requestAnimationFrame(fe)),()=>{cancelAnimationFrame(Ie.current),Te.disconnect()}},[S,C,H]),a.useLayoutEffect(()=>{if(!x)return;const pe=A.current,se=z.current;if(!pe||!se)return;const Te={current:0},Ie=()=>{const _=pe.getBoundingClientRect().width||pe.offsetWidth,te=Tp(se),M=K.current,X=typeof M=="number"&&Math.abs(M-te)<=.25;K.current=te;let Z=g,ce=0;if((j||n)&&R>0&&_>0){const Le=Ua(se,R);if(Le>=bp){ce=Le;const q=Math.min(xp,Math.max(Sr,Math.ceil(_/Le)+1));Z=q,q!==g&&he(q)}}const ye=Z!==g&&ce>0?ce*Z:te>0?te:ce>0?ce*Z:(()=>{const Le=Ua(se,R);return Le>0?Le*Z:0})();ye>0?d(Le=>Le<=0?ye:!X||Math.round(Le)===Math.round(ye)?Le:ye):!X&&s<=0&&(cancelAnimationFrame(Te.current),Te.current=requestAnimationFrame(Ie))},fe=()=>{cancelAnimationFrame(Te.current),Te.current=requestAnimationFrame(Ie)};O.current=fe,fe();const Se=new ResizeObserver(fe);return Se.observe(pe),Se.observe(se),()=>{O.current=null,cancelAnimationFrame(Te.current),Se.disconnect()}},[j,x,s,ge,g,R,n]),a.useLayoutEffect(()=>{if(!x||c<=0)return;const pe=W.current;pe&&Sp(pe)},[x,c,y,Y]),a.useLayoutEffect(()=>{if(!x||s<=0){le(0);return}const pe=W.current,se=z.current;if(!pe||!se)return;const Te=()=>{const fe=pe.offsetHeight||pe.getBoundingClientRect().height,Se=Array.from(se.children).reduce((te,M)=>Math.max(te,M.offsetHeight||M.getBoundingClientRect().height),0),_=fe>0?fe:Se;le(_>0?_:0)};Te();const Ie=new ResizeObserver(Te);return Ie.observe(pe),Ie.observe(se),()=>Ie.disconnect()},[x,ke,re,n,$,h,v,s,T,C]),a.useLayoutEffect(()=>{if(!n||!P||!x||typeof window>"u")return;const pe=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(pe)},[n,P,x,y,s,G,$,re]);const ae=()=>{J&&N(!0)},ve=()=>{J&&N(!1)},U=a.useCallback(()=>{var pe;ee.current=Math.min(be,ee.current+1),(pe=O.current)==null||pe.call(O)},[be]),xe=a.useCallback((pe,se)=>{I(Te=>{const Ie=Te[pe]??se,fe=(t??[]).filter(_=>_!==Ie);if(fe.length===0)return Te;const Se=fe[Math.floor(Math.random()*fe.length)];return{...Te,[pe]:Se}})},[t]),me=(pe,se,Te,Ie)=>{const fe=H&&S==="randomize"&&T.display==="cover"?C[Te]??pe:pe,Se=`max(${f($)}, ${vp}px)`,_=`calc(-0.5 * (${Se} + ${f($)}))`;return r.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":Te,onMouseEnter:H&&S==="randomize"&&T.display==="cover"?()=>xe(Te,pe):void 0,children:[r.jsx(Rp,{item:fe,prefix:l,imageFit:T,imageMaxWidth:h,imageMaxHeight:v,imageHoverClass:E,isEditor:n,isFirstSet:Ie,scaled:f,onFirstSetImageDone:U}),P&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:_,width:Se,height:"100%"}})]},`${se}-${Te}`)};if(x){const pe=j?J&&D?"paused":"running":"paused",se=c>0&&Y>0?c/Y*1e3:0,Te=`${Math.max(0,se)/1e3}s`;return r.jsxs("div",{ref:A,className:it(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:G>0?{height:G}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:W,className:`${l}-marquee-track`,"data-direction":y,onMouseEnter:ae,onMouseLeave:ve,style:{WebkitAnimationDuration:Te,animationDuration:Te,WebkitAnimationPlayState:pe,animationPlayState:pe},children:Array.from({length:ke},(Ie,fe)=>r.jsx("div",{ref:fe===0?z:void 0,className:it(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:f($),paddingRight:f($)},"aria-hidden":fe>0,children:re.map((Se,_)=>me(Se,fe,_,fe===0&&_<R))},`set-${fe}`))})]})}return r.jsxs("div",{ref:A,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:it(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:f($),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((pe,se)=>me(pe,0,se))},"marquee-static")]})},Mp=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1688
+ `}const Np=30,Op=20,Fr=3,jp=12,Bp=32,zp=3,Dp=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")},Vp=(e,t)=>Array.from({length:t},()=>e).flat(),Gp=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},Nl=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),us=(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,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,m)=>e.children[m]),c=Nl(d);return c<=0?0:c+s*Math.max(0,t-1)},qp=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Nl(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+l},Kp=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Up=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Kp(i,e))},Xp=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:l,scaled:d,onFirstSetImageDone:c})=>{var x,U,h;const u=a.useRef(null);a.useLayoutEffect(()=>{if(!l)return;const I=u.current;I!=null&&I.complete&&(c==null||c())},[l,(x=e.image)==null?void 0:x.url,c]);const m=n.display==="cover",v=n.ratioValue??"1:1",b=n.reversed??!1,[S,y]=v.split(":").map(Number),L=(b?y:S)/(b?S:y),k=i/L,A=k>o?o:k,O=k>o?o*L:i,P=d(O),D=d(A),R=((U=e.image)==null?void 0:U.url)&&r.jsx("img",{ref:u,src:e.image.url,alt:((h=e.image)==null?void 0:h.name)??"",style:m?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:l?c:void 0,onError:l?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...m?{width:P}:{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,...m?{width:P,height:D,overflow:"hidden"}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:R&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:pt(`${t}-marquee-link`,!m&&`${t}-marquee-link-contain`),children:R}):R})})},Yp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>Hp(s,c),[s,c]),{speed:m,direction:v,pauseOnHover:b,gap:S,imageMaxWidth:y,imageMaxHeight:w,hoverEffect:C}=e,L=a.useMemo(()=>Gp(e.imageFit),[e.imageFit]),k=(t==null?void 0:t.length)??0,A=!!o,O=!n||!!i,P=O&&C!=="off"&&C!=="randomize"?`${s}-image-hover-${C}`:void 0,D=n?!!i:!0,x=((t==null?void 0:t.length)??0)>0&&(D||!!n),U=Math.max(0,m)*Np,h=pe=>E.scalingValue(pe,n??!1),I=a.useRef(null),W=a.useRef(null),V=a.useRef(null),[Y,ae]=a.useState(0),Z=D&&b==="on",[G,H]=a.useState(!1),[$,M]=a.useState({}),q=a.useRef($);q.current=$;const z=a.useRef(null),ee=a.useRef(0),_=a.useRef(null),ye=a.useMemo(()=>(t??[]).map(pe=>{var se;return((se=pe.image)==null?void 0:se.url)??""}).join("\0"),[t]),[f,ve]=a.useState(Fr),K=a.useMemo(()=>{const pe=t??[];return pe.length===0||!(D||!!n)?pe:Vp(pe,f)},[t,D,f,n]),le=a.useMemo(()=>(t??[]).filter(pe=>{var se;return!!((se=pe.image)!=null&&se.url)}).length,[t]),$e=x?zp:1;a.useLayoutEffect(()=>{ee.current=0,M({}),z.current=null,ve(Fr),d(0)},[ye]),a.useEffect(()=>{if(!O||C!=="randomize")return;const pe=I.current;if(!pe)return;const se=Se=>{M(B=>{const re=Array.from(Se).filter(te=>te in B&&!Up(pe,te));if(re.length===0)return B;const F={...B};return re.forEach(te=>{delete F[te]}),F})},Re=new IntersectionObserver(Se=>{const B=new Set;for(const re of Se){const F=re.target.dataset.marqueeItemIndex,te=F!==void 0?Number(F):NaN;Number.isNaN(te)||B.add(te)}B.size>0&&se(B)},{root:pe,threshold:0});Object.keys($).forEach(Se=>{const B=Number(Se);pe.querySelectorAll(`[data-marquee-item-index="${B}"]`).forEach(re=>Re.observe(re))});const ke={current:0},we=()=>{const Se=Object.keys(q.current);Se.length!==0&&(se(Se.map(Number)),ke.current=requestAnimationFrame(we))};return Object.keys(q.current).length>0&&(ke.current=requestAnimationFrame(we)),()=>{cancelAnimationFrame(ke.current),Re.disconnect()}},[C,$,O]),a.useLayoutEffect(()=>{if(!x)return;const pe=I.current,se=V.current;if(!pe||!se)return;const Re={current:0},ke=()=>{const B=pe.getBoundingClientRect().width||pe.offsetWidth,re=qp(se),F=z.current,te=typeof F=="number"&&Math.abs(F-re)<=.25;z.current=re;let ne=f,ue=0;if((D||n)&&k>0&&B>0){const Le=us(se,k);if(Le>=Bp){ue=Le;const Q=Math.min(jp,Math.max(Fr,Math.ceil(B/Le)+1));ne=Q,Q!==f&&ve(Q)}}const he=ne!==f&&ue>0?ue*ne:re>0?re:ue>0?ue*ne:(()=>{const Le=us(se,k);return Le>0?Le*ne:0})();he>0?d(Le=>Le<=0?he:!te||Math.round(Le)===Math.round(he)?Le:he):!te&&l<=0&&(cancelAnimationFrame(Re.current),Re.current=requestAnimationFrame(ke))},we=()=>{cancelAnimationFrame(Re.current),Re.current=requestAnimationFrame(ke)};_.current=we,we();const Se=new ResizeObserver(we);return Se.observe(pe),Se.observe(se),()=>{_.current=null,cancelAnimationFrame(Re.current),Se.disconnect()}},[D,x,l,ye,f,k,n]),a.useLayoutEffect(()=>{if(!x||c<=0)return;const pe=W.current;pe&&Dp(pe)},[x,c,v,U]),a.useLayoutEffect(()=>{if(!x||l<=0){ae(0);return}const pe=W.current,se=V.current;if(!pe||!se)return;const Re=()=>{const we=pe.offsetHeight||pe.getBoundingClientRect().height,Se=Array.from(se.children).reduce((re,F)=>Math.max(re,F.offsetHeight||F.getBoundingClientRect().height),0),B=we>0?we:Se;ae(B>0?B:0)};Re();const ke=new ResizeObserver(Re);return ke.observe(pe),ke.observe(se),()=>ke.disconnect()},[x,$e,K,n,S,y,w,l,L,$]),a.useLayoutEffect(()=>{if(!n||!A||!x||typeof window>"u")return;const pe=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(pe)},[n,A,x,v,l,Y,S,K]);const oe=()=>{Z&&H(!0)},fe=()=>{Z&&H(!1)},X=a.useCallback(()=>{var pe;ee.current=Math.min(le,ee.current+1),(pe=_.current)==null||pe.call(_)},[le]),be=a.useCallback((pe,se)=>{M(Re=>{const ke=Re[pe]??se,we=(t??[]).filter(B=>B!==ke);if(we.length===0)return Re;const Se=we[Math.floor(Math.random()*we.length)];return{...Re,[pe]:Se}})},[t]),xe=(pe,se,Re,ke)=>{const we=O&&C==="randomize"&&L.display==="cover"?$[Re]??pe:pe,Se=`max(${h(S)}, ${Op}px)`,B=`calc(-0.5 * (${Se} + ${h(S)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":Re,onMouseEnter:O&&C==="randomize"&&L.display==="cover"?()=>be(Re,pe):void 0,children:[r.jsx(Xp,{item:we,prefix:s,imageFit:L,imageMaxWidth:y,imageMaxHeight:w,imageHoverClass:P,isEditor:n,isFirstSet:ke,scaled:h,onFirstSetImageDone:X}),A&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:B,width:Se,height:"100%"}})]},`${se}-${Re}`)};if(x){const pe=D?Z&&G?"paused":"running":"paused",se=c>0&&U>0?c/U*1e3:0,Re=`${Math.max(0,se)/1e3}s`;return r.jsxs("div",{ref:I,className:pt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:Y>0?{height:Y}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:W,className:`${s}-marquee-track`,"data-direction":v,onMouseEnter:oe,onMouseLeave:fe,style:{WebkitAnimationDuration:Re,animationDuration:Re,WebkitAnimationPlayState:pe,animationPlayState:pe},children:Array.from({length:$e},(ke,we)=>r.jsx("div",{ref:we===0?V:void 0,className:pt(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:h(S),paddingRight:h(S)},"aria-hidden":we>0,children:K.map((Se,B)=>xe(Se,we,B,we===0&&B<k))},`set-${we}`))})]})}return r.jsxs("div",{ref:I,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:pt(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:h(S),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((pe,se)=>xe(pe,0,se))},"marquee-static")]})},Jp=`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';
@@ -2411,7 +2411,7 @@ type MarqueeProps = {
2411
2411
  isPreviewMode?: boolean;
2412
2412
  isEditMode?: boolean;
2413
2413
  } & CommonComponentProps;
2414
- `,Pp={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:.8},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208},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:""}]}},kp={element:Ep,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Pp,sourceCode:Mp,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Xa(e){return`
2414
+ `,Zp={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:.8},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208},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:""}]}},Qp={element:Yp,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Zp,sourceCode:Jp,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ps(e){return`
2415
2415
  .${e}-marquee-wrapper {
2416
2416
  overflow: hidden;
2417
2417
  width: 100%;
@@ -2498,7 +2498,7 @@ type MarqueeProps = {
2498
2498
  pointer-events: auto;
2499
2499
  z-index: 10;
2500
2500
  }
2501
- `}const Ap=30,Ya=2,Wp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=L.useScopedStyles(),{align:s,speed:d,direction:c,pauseOnHover:u,gap:m,cardWidth:y,corners:w,stroke:$,strokeColor:h,bgColor:v,padding:S,logoMarginTop:T,logoWidth:R,logoHeight:P,captionMarginTop:H}=e,E=!!o,j=((t==null?void 0:t.length)??0)>0,k=d>0&&(!n||i),x=j&&(k||n),Y=Math.max(0,d)*Ap,f=M=>L.scalingValue(M,n??!1),A=a.useRef(null),W=a.useRef(null),z=a.useRef(null),[G,le]=a.useState(0),[J,D]=a.useState(0),[N,C]=a.useState(0),I=k&&u==="on",[V,K]=a.useState(!1),ee=a.useRef(null),[O,ge]=a.useState(0),[g,he]=a.useState(0),re=a.useRef(null),be=M=>{var Z,ce,ue,ye,Le;return{fontSettings:{fontFamily:(e==null?void 0:e[`${M}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${M}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((ce=e==null?void 0:e[`${M}FontSettings`])==null?void 0:ce.fontStyle)??"normal"},textAppearance:{textTransform:((ue=e==null?void 0:e[`${M}TextAppearance`])==null?void 0:ue.textTransform)??"none",textDecoration:((ye=e==null?void 0:e[`${M}TextAppearance`])==null?void 0:ye.textDecoration)??"none",fontVariant:((Le=e==null?void 0:e[`${M}TextAppearance`])==null?void 0:Le.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${M}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${M}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${M}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${M}LineHeight`])??.01,color:(e==null?void 0:e[`${M}Color`])??"#000000"}},ke=be("text"),ae=be("caption"),ve=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(M=>{var X,Z;return(((X=M.text)==null?void 0:X.length)??0)>0||(((Z=M.caption)==null?void 0:Z.length)??0)>0}),[t]),U=a.useMemo(()=>!x||(t==null?void 0:t.length)===0?1:J<=0||G<=0?Ya:Math.max(Ya,Math.ceil(G/J)+1),[x,t==null?void 0:t.length,J,G]);a.useLayoutEffect(()=>{if(!x)return;const M=A.current,X=z.current;if(!M||!X)return;let Z=0;const ce=()=>{const Le=M.getBoundingClientRect().width,q=X.getBoundingClientRect().width,de=re.current,Ee=typeof de=="number"&&Math.abs(de-q)<=.25;if(re.current=q,le(Le),typeof q=="number"&&q>0&&J<=0){D(q);return}Ee&&q!==J?D(q):!Ee&&J<=0&&(cancelAnimationFrame(Z),Z=requestAnimationFrame(ce))},ue=()=>{cancelAnimationFrame(Z),Z=requestAnimationFrame(ce)};ue();const ye=new ResizeObserver(ue);return ye.observe(M),ye.observe(X),()=>{cancelAnimationFrame(Z),ye.disconnect()}},[k,x,J]),a.useLayoutEffect(()=>{const M=W.current;if(!x||!M)return;const X=J>0?J:0,Z=X>0&&Y>0?X/Y*1e3:0,ce=`${Math.max(0,Z)/1e3}s`;M.style.setProperty("--marquee-distance",`${X}px`),M.style.setProperty("--marquee-duration",ce)},[k,x,Y,J]),a.useLayoutEffect(()=>{if(!x){C(0);return}const M=z.current,X=W.current;if(!M||!X)return;const Z=()=>{let ue=0;for(let ye=0;ye<M.children.length;ye++){const q=M.children[ye].firstElementChild;q&&(ue=Math.max(ue,q.offsetHeight))}ue<=0&&(ue=X.offsetHeight),C(ue>0?ue:0)};Z();const ce=new ResizeObserver(Z);return ce.observe(M),ce.observe(X),()=>{ce.disconnect()}},[x,U,t,n,m,y,S,$,w,R,P,O,g]);const xe=()=>{I&&K(!0)},me=()=>{I&&K(!1)},pe=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),se=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),Te=a.useCallback((M,X,Z,ce)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:pe,width:"100%"},children:[r.jsx("div",{"data-controls":E?ce==null?void 0:ce.controlsName:void 0,"data-controls-axis":E?"y":void 0,className:E?`${l}-control`:void 0,style:{height:f((ce==null?void 0:ce.marginTop)??0)}}),r.jsx("div",{...ce!=null&&ce.dataMeasureKind?{"data-testimonial-measure":ce.dataMeasureKind}:{},style:{...Xt(M,n),textAlign:se,pointerEvents:"auto",...typeof(ce==null?void 0:ce.minHeightPx)=="number"&&ce.minHeightPx>0?{minHeight:ce.minHeightPx}:{}},children:r.jsx(Ti,{content:X})})]},Z),[pe,se,n,E,l,f]),Ie=a.useCallback((M,X,Z)=>{var ce,ue,ye;return r.jsxs("div",{style:{padding:`${f(S.top)} ${f(S.right)} ${f(S.bottom)} ${f(S.left)}`,width:f(y+$*2),height:"100%",borderRadius:f(w),border:`${f($)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${l}-cover`,style:{background:v}}),r.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:pe,textAlign:se},children:[M.text&&Te(ke,M.text,"text",Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Z==null?void 0:Z.textMinHeightPx)=="number"&&Z.textMinHeightPx>0?{minHeightPx:Z.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:pe,width:"100%"},children:[r.jsx("div",{"data-controls":E&&!(Z!=null&&Z.dataMeasureAttrs)?"logoMarginTop":void 0,className:E&&!(Z!=null&&Z.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:f(T)}}),r.jsx("div",{style:{width:f(R),height:f(P)},children:((ce=M.logo)==null?void 0:ce.url)&&r.jsx("img",{src:M.logo.url,alt:((ue=M.logo)==null?void 0:ue.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ye=M.logo)==null?void 0:ye.objectFit)||"contain"}})})]}),M.caption&&Te(ae,M.caption,"caption",{...Z!=null&&Z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:H,...Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Z==null?void 0:Z.captionMinHeightPx)=="number"&&Z.captionMinHeightPx>0?{minHeightPx:Z.captionMinHeightPx}:{}})]})]},X)},[v,H,ae,y,w,P,T,R,pe,se,S.bottom,S.left,S.right,S.top,Te,$,h,ke,n,E,l]),fe=a.useCallback(M=>{ge(M.maxTextPx),he(M.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!ve){fe({maxTextPx:0,maxCaptionPx:0});return}const M=ee.current;if(!M)return;const X=()=>{L.readTestimonialTextMeasure(M,fe)};X();const Z=new ResizeObserver(X);return Z.observe(M),()=>{Z.disconnect()}},[ve,fe,t,Ie]);const Se=ve?{textMinHeightPx:O,captionMinHeightPx:g}:void 0,_=ve?r.jsx("div",{ref:ee,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((M,X)=>Ie(M,`measure-${X}`,{dataMeasureAttrs:!0}))}):null,te=(M,X)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Ie(M,`card-${X}`,Se),E&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(m)})`,width:f(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},X);if(x){const M=k?I&&V?"paused":"running":"paused";return r.jsxs("div",{ref:A,className:it(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...N>0?{height:N}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Xa(l)}}),_,r.jsx("div",{ref:W,className:`${l}-marquee-track`,"data-direction":c,onMouseEnter:xe,onMouseLeave:me,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":M},children:Array.from({length:U},(X,Z)=>r.jsx("div",{ref:Z===0?z:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:f(m),paddingRight:f(m)},"aria-hidden":Z>0,children:t==null?void 0:t.map((ce,ue)=>te(ce,`${Z}-${ue}`))},`set-${Z}`))})]})}return r.jsxs("div",{className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Xa(l)}}),_,r.jsx("div",{style:{gap:f(m),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((M,X)=>te(M,X))})]})},Fp=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2501
+ `}const em=30,ms=2,tm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:m,cardWidth:v,corners:b,stroke:S,strokeColor:y,bgColor:w,padding:C,logoMarginTop:L,logoWidth:k,logoHeight:A,captionMarginTop:O}=e,P=!!o,D=((t==null?void 0:t.length)??0)>0,R=d>0&&(!n||i),x=D&&(R||n),U=Math.max(0,d)*em,h=F=>E.scalingValue(F,n??!1),I=a.useRef(null),W=a.useRef(null),V=a.useRef(null),[Y,ae]=a.useState(0),[Z,G]=a.useState(0),[H,$]=a.useState(0),M=R&&u==="on",[q,z]=a.useState(!1),ee=a.useRef(null),[_,ye]=a.useState(0),[f,ve]=a.useState(0),K=a.useRef(null),le=F=>{var ne,ue,me,he,Le;return{fontSettings:{fontFamily:(e==null?void 0:e[`${F}FontFamily`])??"Arial",fontWeight:((ne=e==null?void 0:e[`${F}FontSettings`])==null?void 0:ne.fontWeight)??400,fontStyle:((ue=e==null?void 0:e[`${F}FontSettings`])==null?void 0:ue.fontStyle)??"normal"},textAppearance:{textTransform:((me=e==null?void 0:e[`${F}TextAppearance`])==null?void 0:me.textTransform)??"none",textDecoration:((he=e==null?void 0:e[`${F}TextAppearance`])==null?void 0:he.textDecoration)??"none",fontVariant:((Le=e==null?void 0:e[`${F}TextAppearance`])==null?void 0:Le.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${F}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${F}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${F}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${F}LineHeight`])??.01,color:(e==null?void 0:e[`${F}Color`])??"#000000"}},$e=le("text"),oe=le("caption"),fe=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(F=>{var te,ne;return(((te=F.text)==null?void 0:te.length)??0)>0||(((ne=F.caption)==null?void 0:ne.length)??0)>0}),[t]),X=a.useMemo(()=>!x||(t==null?void 0:t.length)===0?1:Z<=0||Y<=0?ms:Math.max(ms,Math.ceil(Y/Z)+1),[x,t==null?void 0:t.length,Z,Y]);a.useLayoutEffect(()=>{if(!x)return;const F=I.current,te=V.current;if(!F||!te)return;let ne=0;const ue=()=>{const Le=F.getBoundingClientRect().width,Q=te.getBoundingClientRect().width,ge=K.current,Ae=typeof ge=="number"&&Math.abs(ge-Q)<=.25;if(K.current=Q,ae(Le),typeof Q=="number"&&Q>0&&Z<=0){G(Q);return}Ae&&Q!==Z?G(Q):!Ae&&Z<=0&&(cancelAnimationFrame(ne),ne=requestAnimationFrame(ue))},me=()=>{cancelAnimationFrame(ne),ne=requestAnimationFrame(ue)};me();const he=new ResizeObserver(me);return he.observe(F),he.observe(te),()=>{cancelAnimationFrame(ne),he.disconnect()}},[R,x,Z]),a.useLayoutEffect(()=>{const F=W.current;if(!x||!F)return;const te=Z>0?Z:0,ne=te>0&&U>0?te/U*1e3:0,ue=`${Math.max(0,ne)/1e3}s`;F.style.setProperty("--marquee-distance",`${te}px`),F.style.setProperty("--marquee-duration",ue)},[R,x,U,Z]),a.useLayoutEffect(()=>{if(!x){$(0);return}const F=V.current,te=W.current;if(!F||!te)return;const ne=()=>{let me=0;for(let he=0;he<F.children.length;he++){const Q=F.children[he].firstElementChild;Q&&(me=Math.max(me,Q.offsetHeight))}me<=0&&(me=te.offsetHeight),$(me>0?me:0)};ne();const ue=new ResizeObserver(ne);return ue.observe(F),ue.observe(te),()=>{ue.disconnect()}},[x,X,t,n,m,v,C,S,b,k,A,_,f]);const be=()=>{M&&z(!0)},xe=()=>{M&&z(!1)},pe=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),se=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),Re=a.useCallback((F,te,ne,ue)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:pe,width:"100%"},children:[r.jsx("div",{"data-controls":P?ue==null?void 0:ue.controlsName:void 0,"data-controls-axis":P?"y":void 0,className:P?`${s}-control`:void 0,style:{height:h((ue==null?void 0:ue.marginTop)??0)}}),r.jsx("div",{...ue!=null&&ue.dataMeasureKind?{"data-testimonial-measure":ue.dataMeasureKind}:{},style:{...Qt(F,n),textAlign:se,pointerEvents:"auto",...typeof(ue==null?void 0:ue.minHeightPx)=="number"&&ue.minHeightPx>0?{minHeight:ue.minHeightPx}:{}},children:r.jsx(Ei,{content:te})})]},ne),[pe,se,n,P,s,h]),ke=a.useCallback((F,te,ne)=>{var ue,me,he;return r.jsxs("div",{style:{padding:`${h(C.top)} ${h(C.right)} ${h(C.bottom)} ${h(C.left)}`,width:h(v+S*2),height:"100%",borderRadius:h(b),border:`${h(S)} solid ${y}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:w}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:pe,textAlign:se},children:[F.text&&Re($e,F.text,"text",ne!=null&&ne.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ne==null?void 0:ne.textMinHeightPx)=="number"&&ne.textMinHeightPx>0?{minHeightPx:ne.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:pe,width:"100%"},children:[r.jsx("div",{"data-controls":P&&!(ne!=null&&ne.dataMeasureAttrs)?"logoMarginTop":void 0,className:P&&!(ne!=null&&ne.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:h(L)}}),r.jsx("div",{style:{width:h(k),height:h(A)},children:((ue=F.logo)==null?void 0:ue.url)&&r.jsx("img",{src:F.logo.url,alt:((me=F.logo)==null?void 0:me.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((he=F.logo)==null?void 0:he.objectFit)||"contain"}})})]}),F.caption&&Re(oe,F.caption,"caption",{...ne!=null&&ne.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:O,...ne!=null&&ne.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ne==null?void 0:ne.captionMinHeightPx)=="number"&&ne.captionMinHeightPx>0?{minHeightPx:ne.captionMinHeightPx}:{}})]})]},te)},[w,O,oe,v,b,A,L,k,pe,se,C.bottom,C.left,C.right,C.top,Re,S,y,$e,n,P,s]),we=a.useCallback(F=>{ye(F.maxTextPx),ve(F.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!fe){we({maxTextPx:0,maxCaptionPx:0});return}const F=ee.current;if(!F)return;const te=()=>{E.readTestimonialTextMeasure(F,we)};te();const ne=new ResizeObserver(te);return ne.observe(F),()=>{ne.disconnect()}},[fe,we,t,ke]);const Se=fe?{textMinHeightPx:_,captionMinHeightPx:f}:void 0,B=fe?r.jsx("div",{ref:ee,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((F,te)=>ke(F,`measure-${te}`,{dataMeasureAttrs:!0}))}):null,re=(F,te)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[ke(F,`card-${te}`,Se),P&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${h(m)})`,width:h(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},te);if(x){const F=R?M&&q?"paused":"running":"paused";return r.jsxs("div",{ref:I,className:pt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...H>0?{height:H}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ps(s)}}),B,r.jsx("div",{ref:W,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:be,onMouseLeave:xe,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":F},children:Array.from({length:X},(te,ne)=>r.jsx("div",{ref:ne===0?V:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:h(m),paddingRight:h(m)},"aria-hidden":ne>0,children:t==null?void 0:t.map((ue,me)=>re(ue,`${ne}-${me}`))},`set-${ne}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ps(s)}}),B,r.jsx("div",{style:{gap:h(m),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((F,te)=>re(F,te))})]})},nm=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2502
2502
  import cn from 'classnames';
2503
2503
  import { CommonComponentProps } from '../props';
2504
2504
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3113,7 +3113,7 @@ type TestimonialsSettings = {
3113
3113
  logoHeight: number;
3114
3114
  captionMarginTop: number;
3115
3115
  };
3116
- `,Ja={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},_p={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:{...Ja.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:{...Ja.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:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},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"}]}]}]}},Np={element:Wp,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:_p,sourceCode:Fp,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Hp(e){return`
3116
+ `,gs={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},im={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:"Text Fill",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Fill",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:{...gs.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:{...gs.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:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},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"}]}]}]}},om={element:tm,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:im,sourceCode:nm,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function rm(e){return`
3117
3117
  .${e}-container {
3118
3118
  position: relative;
3119
3119
  overflow-x: clip;
@@ -3237,7 +3237,7 @@ type TestimonialsSettings = {
3237
3237
  width: 100%;
3238
3238
  height: 100%;
3239
3239
  }
3240
- `}const Op=3e3,jp=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=L.useScopedStyles(),s=t||[],{speed:d,align:c,width:u,imageMarginTop:m,textMarginTop:y,captionMarginTop:w,imageWidth:$,imageHeight:h,controlsWidth:v,controlsColor:S,controlsHoverColor:T}=e,R=d>0&&(!n||!!i),[P,H]=a.useState(0),[E,j]=a.useState(null),[k,x]=a.useState(!1),Y=a.useRef(null),f=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),A=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{H(0),j(null),x(!1)},[s.length]);const W=s[P],z=E===null?null:s[E],G=ae=>{var U,xe,me,pe,se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ae}FontFamily`])??"Arial",fontWeight:((U=e==null?void 0:e[`${ae}FontSettings`])==null?void 0:U.fontWeight)??400,fontStyle:((xe=e==null?void 0:e[`${ae}FontSettings`])==null?void 0:xe.fontStyle)??"normal"},textAppearance:{textTransform:((me=e==null?void 0:e[`${ae}TextAppearance`])==null?void 0:me.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${ae}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((se=e==null?void 0:e[`${ae}TextAppearance`])==null?void 0:se.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ae}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ae}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ae}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ae}WordSpacing`])??0,color:(e==null?void 0:e[`${ae}Color`])??"#000000"}},le=G("text"),J=G("caption"),D=s.length>1&&s.some(ae=>{var ve,U;return(((ve=ae.text)==null?void 0:ve.length)??0)>0||(((U=ae.caption)==null?void 0:U.length)??0)>0}),N=a.useRef(null),[C,I]=a.useState(0),[V,K]=a.useState(0),ee=e.controls??{mode:"Off",icon:null},O=s.length>1,ge=a.useCallback((ae,ve)=>!O||ve===ae?ae:(Y.current&&window.clearTimeout(Y.current),j(ae),x(!0),Y.current=window.setTimeout(()=>{j(null),x(!1),Y.current=null},300),ve),[O]),g=a.useCallback(()=>{O&&H(ae=>ge(ae,(ae-1+s.length)%s.length))},[O,ge,s.length]),he=a.useCallback(()=>{O&&H(ae=>ge(ae,(ae+1)%s.length))},[O,ge,s.length]);a.useEffect(()=>{if(!R||!O)return;const ae=Math.max(300,Op/d),ve=window.setInterval(()=>{H(U=>ge(U,(U+1)%s.length))},ae);return()=>{window.clearInterval(ve)}},[R,O,ge,s.length,d]),a.useEffect(()=>()=>{Y.current&&window.clearTimeout(Y.current)},[]);const re=(ae,ve)=>{var se,Te,Ie,fe;const U=ve==null?void 0:ve.textMinHeightPx,xe=ve==null?void 0:ve.captionMinHeightPx,me=ve==null?void 0:ve.dataMeasureAttrs,pe=o&&!(ve!=null&&ve.dataMeasureAttrs)&&!(ve!=null&&ve.hideControls);return r.jsxs(r.Fragment,{children:[ae.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":pe?"textMarginTop":void 0,className:pe?`${l}-control`:void 0,style:{height:L.scalingValue(y??0,n??!1)}}),r.jsx("div",{...me&&{"data-testimonial-measure":"text"},style:{...Xt(le,n),...U&&U>0?{minHeight:U}:{},textAlign:A,pointerEvents:"auto"},children:r.jsx(Ti,{content:ae.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":pe?"imageMarginTop":void 0,className:pe?`${l}-control`:void 0,style:{height:L.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:L.scalingValue($??0,n??!1),height:L.scalingValue(h??0,n??!1)},children:((se=ae.image)==null?void 0:se.url)&&r.jsx("img",{src:(Te=ae.image)==null?void 0:Te.url,alt:((Ie=ae.image)==null?void 0:Ie.name)??"",className:`${l}-icon`,style:{objectFit:((fe=ae.image)==null?void 0:fe.objectFit)||"contain"}})})]}),ae.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":pe?"captionMarginTop":void 0,className:pe?`${l}-control`:void 0,style:{height:L.scalingValue(w??0,n??!1)}}),r.jsx("div",{...me?{"data-testimonial-measure":"caption"}:{},style:{...Xt(J,n),...xe&&xe>0?{minHeight:xe}:{},textAlign:A,pointerEvents:"auto"},children:r.jsx(Ti,{content:ae.caption})})]})]})},be=a.useCallback(ae=>{I(ae.maxTextPx),K(ae.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!D){be({maxTextPx:0,maxCaptionPx:0});return}const ae=N.current;if(!ae)return;const ve=()=>{L.readTestimonialTextMeasure(ae,be)};ve();const U=new ResizeObserver(ve);return U.observe(ae),()=>{U.disconnect()}},[D,be,t]),!W)return r.jsx(r.Fragment,{});const ke=D?{textMinHeightPx:C,captionMinHeightPx:V}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${l}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Hp(l)}}),r.jsxs("div",{className:`${l}-wrapper`,style:{width:L.scalingValue(u??0,n??!1),alignItems:f},children:[D&&r.jsx("div",{ref:N,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((ae,ve)=>r.jsx("div",{style:{width:"100%"},children:re(ae,{dataMeasureAttrs:!0})},ve))}),r.jsxs("div",{className:`${l}-fade-stack`,children:[z&&k&&r.jsx("div",{className:it(`${l}-fade-item-prev`,`${l}-fade-out`),children:re(z,{...ke,hideControls:!0})}),r.jsx("div",{className:it(`${l}-fade-item-current`,k?`${l}-fade-in`:void 0),children:re(W,ke)})]})]}),ee.mode==="On"&&r.jsxs("div",{className:`${l}-controls`,children:[r.jsx("div",{className:`${l}-arrow`,style:{width:L.scalingValue(v??.02,n??!1),height:L.scalingValue(v??.02,n??!1),"--arrow-hover-color":T},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:g,disabled:!O,"aria-label":"Previous testimonial",children:ee.icon&&r.jsx(mn,{url:ee.icon,fill:S,hoverFill:T,className:it(`${l}-arrow-img`,`${l}-mirror`)})})}),r.jsx("div",{className:it(`${l}-arrow`,`${l}-next-arrow`),style:{width:L.scalingValue(v??.02,n??!1),height:L.scalingValue(v??.02,n??!1),"--arrow-hover-color":T},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:he,disabled:!O,"aria-label":"Next testimonial",children:ee.icon&&r.jsx(mn,{url:ee.icon,fill:S,hoverFill:T,className:`${l}-arrow-img`})})})]})]})})},Bp=`import cn from 'classnames';
3240
+ `}const am=3e3,sm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:m,textMarginTop:v,captionMarginTop:b,imageWidth:S,imageHeight:y,controlsWidth:w,controlsColor:C,controlsHoverColor:L}=e,k=d>0&&(!n||!!i),[A,O]=a.useState(0),[P,D]=a.useState(null),[R,x]=a.useState(!1),U=a.useRef(null),h=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),I=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{O(0),D(null),x(!1)},[l.length]);const W=l[A],V=P===null?null:l[P],Y=oe=>{var X,be,xe,pe,se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${oe}FontFamily`])??"Arial",fontWeight:((X=e==null?void 0:e[`${oe}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((be=e==null?void 0:e[`${oe}FontSettings`])==null?void 0:be.fontStyle)??"normal"},textAppearance:{textTransform:((xe=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:xe.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((se=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:se.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${oe}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${oe}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${oe}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${oe}WordSpacing`])??0,color:(e==null?void 0:e[`${oe}Color`])??"#000000"}},ae=Y("text"),Z=Y("caption"),G=l.length>1&&l.some(oe=>{var fe,X;return(((fe=oe.text)==null?void 0:fe.length)??0)>0||(((X=oe.caption)==null?void 0:X.length)??0)>0}),H=a.useRef(null),[$,M]=a.useState(0),[q,z]=a.useState(0),ee=e.controls??{mode:"Off",icon:null},_=l.length>1,ye=a.useCallback((oe,fe)=>!_||fe===oe?oe:(U.current&&window.clearTimeout(U.current),D(oe),x(!0),U.current=window.setTimeout(()=>{D(null),x(!1),U.current=null},300),fe),[_]),f=a.useCallback(()=>{_&&O(oe=>ye(oe,(oe-1+l.length)%l.length))},[_,ye,l.length]),ve=a.useCallback(()=>{_&&O(oe=>ye(oe,(oe+1)%l.length))},[_,ye,l.length]);a.useEffect(()=>{if(!k||!_)return;const oe=Math.max(300,am/d),fe=window.setInterval(()=>{O(X=>ye(X,(X+1)%l.length))},oe);return()=>{window.clearInterval(fe)}},[k,_,ye,l.length,d]),a.useEffect(()=>()=>{U.current&&window.clearTimeout(U.current)},[]);const K=(oe,fe)=>{var se,Re,ke,we;const X=fe==null?void 0:fe.textMinHeightPx,be=fe==null?void 0:fe.captionMinHeightPx,xe=fe==null?void 0:fe.dataMeasureAttrs,pe=o&&!(fe!=null&&fe.dataMeasureAttrs)&&!(fe!=null&&fe.hideControls);return r.jsxs(r.Fragment,{children:[oe.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":pe?"textMarginTop":void 0,className:pe?`${s}-control`:void 0,style:{height:E.scalingValue(v??0,n??!1)}}),r.jsx("div",{...xe&&{"data-testimonial-measure":"text"},style:{...Qt(ae,n),...X&&X>0?{minHeight:X}:{},textAlign:I,pointerEvents:"auto"},children:r.jsx(Ei,{content:oe.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":pe?"imageMarginTop":void 0,className:pe?`${s}-control`:void 0,style:{height:E.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:E.scalingValue(S??0,n??!1),height:E.scalingValue(y??0,n??!1)},children:((se=oe.image)==null?void 0:se.url)&&r.jsx("img",{src:(Re=oe.image)==null?void 0:Re.url,alt:((ke=oe.image)==null?void 0:ke.name)??"",className:`${s}-icon`,style:{objectFit:((we=oe.image)==null?void 0:we.objectFit)||"contain"}})})]}),oe.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":pe?"captionMarginTop":void 0,className:pe?`${s}-control`:void 0,style:{height:E.scalingValue(b??0,n??!1)}}),r.jsx("div",{...xe?{"data-testimonial-measure":"caption"}:{},style:{...Qt(Z,n),...be&&be>0?{minHeight:be}:{},textAlign:I,pointerEvents:"auto"},children:r.jsx(Ei,{content:oe.caption})})]})]})},le=a.useCallback(oe=>{M(oe.maxTextPx),z(oe.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!G){le({maxTextPx:0,maxCaptionPx:0});return}const oe=H.current;if(!oe)return;const fe=()=>{E.readTestimonialTextMeasure(oe,le)};fe();const X=new ResizeObserver(fe);return X.observe(oe),()=>{X.disconnect()}},[G,le,t]),!W)return r.jsx(r.Fragment,{});const $e=G?{textMinHeightPx:$,captionMinHeightPx:q}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:rm(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:E.scalingValue(u??0,n??!1),alignItems:h},children:[G&&r.jsx("div",{ref:H,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((oe,fe)=>r.jsx("div",{style:{width:"100%"},children:K(oe,{dataMeasureAttrs:!0})},fe))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[V&&R&&r.jsx("div",{className:pt(`${s}-fade-item-prev`,`${s}-fade-out`),children:K(V,{...$e,hideControls:!0})}),r.jsx("div",{className:pt(`${s}-fade-item-current`,R?`${s}-fade-in`:void 0),children:K(W,$e)})]})]}),ee.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:E.scalingValue(w??.02,n??!1),height:E.scalingValue(w??.02,n??!1),"--arrow-hover-color":L},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:f,disabled:!_,"aria-label":"Previous testimonial",children:ee.icon&&r.jsx(fn,{url:ee.icon,fill:C,hoverFill:L,className:pt(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:pt(`${s}-arrow`,`${s}-next-arrow`),style:{width:E.scalingValue(w??.02,n??!1),height:E.scalingValue(w??.02,n??!1),"--arrow-hover-color":L},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:ve,disabled:!_,"aria-label":"Next testimonial",children:ee.icon&&r.jsx(fn,{url:ee.icon,fill:C,hoverFill:L,className:`${s}-arrow-img`})})})]})]})})},lm=`import cn from 'classnames';
3241
3241
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3242
3242
  import { CommonComponentProps } from '../props';
3243
3243
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3733,12 +3733,12 @@ type TestimonialsSettings = {
3733
3733
  icon?: string | null;
3734
3734
  };
3735
3735
  };
3736
- `,zp="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>'),Za={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Dp={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:{...Za.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:{...Za.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:zp},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},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},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"}]}]}]}},Vp={element:jp,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},t:{width:700},m:{width:334}},schema:Dp,sourceCode:Bp,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function qp(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Qa(e){return((e==null?void 0:e.trim().length)??0)>0}function $r(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Cr(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:L.scalingValue((o-t)/2,i)}}function Gp(e){return`
3736
+ `,cm="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>'),hs={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},dm={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:{...hs.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:{...hs.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:cm},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},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},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"}]}]}]}},um={element:sm,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},t:{width:700},m:{width:334}},schema:dm,sourceCode:lm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function pm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function fs(e){return((e==null?void 0:e.trim().length)??0)>0}function _r(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Hr(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((o-t)/2,i)}}function mm(e){return`
3737
3737
  .${e}-wrapper {
3738
3738
  display: grid;
3739
3739
  align-items: start;
3740
3740
  justify-content: center;
3741
- min-height: ${qp(48)};
3741
+ min-height: ${pm(48)};
3742
3742
  }
3743
3743
  .${e}-item {
3744
3744
  display: flex;
@@ -4057,25 +4057,12 @@ type TestimonialsSettings = {
4057
4057
  margin: 0;
4058
4058
  color: var(--${e}-lightbox-counter-color);
4059
4059
  }
4060
-
4061
4060
  .${e}-control {
4062
4061
  position: relative;
4063
4062
  z-index: 2;
4064
4063
  width: 100%;
4065
4064
  }
4066
-
4067
- .${e}-control::before {
4068
- content: "";
4069
- position: absolute;
4070
- top: 0;
4071
- left: 0;
4072
- width: 100%;
4073
- height: 100%;
4074
- min-height: 20px;
4075
- pointer-events: auto;
4076
- z-index: 10;
4077
- }
4078
- `}const Ln=500,Kp=750,Zn="cubic-bezier(0.22, 1, 0.36, 1)",Up=72,Xp=50;function Yp(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 Jp(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Zp(e){const[t]=e.media;return t!=null&&t.url?t:null}function Qp(e){return!Array.isArray(e)||e.length===0?[]:Yp(e)?e.flatMap(t=>{const n=Jp(t);if(!n)return[];const i=Zp(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 Gi(e){return e.type==="video"}function em(e){e.pause(),e.removeAttribute("src"),e.load()}function es({media:e,className:t,style:n,onMediaClick:i}){return Gi(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 tm(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function nm({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:l,onMouseMove:s,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{em(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:l,onMouseMove:s,onTransitionEnd:d,style:i})}function im({items:e,index:t,imageDisplay:n,onClose:i,onPrev:o,onNext:l,counterClassName:s,counterStyle:d}){const c=n==="cover",u=a.useRef(null),m=a.useRef(null),y=a.useRef(null),w=a.useRef(null),$=a.useRef(0),h=a.useRef(0),v=a.useRef("none"),S=a.useRef(!1),T=a.useRef(!1),R=a.useRef(!1),P=a.useRef(null),[H,E]=a.useState(null),[j,k]=a.useState("opening"),[x,Y]=a.useState(0),[f,A]=a.useState(0),[W,z]=a.useState(!1),[G,le]=a.useState(!1),[J,D]=a.useState(!1),N=a.useRef(t),C=e[t],I=C?Gi(C):!1,V=f!==0||W,K=a.useCallback(se=>{R.current=se,z(se)},[]),ee=a.useCallback(()=>{P.current!==null&&(window.clearTimeout(P.current),P.current=null)},[]),O=a.useCallback(()=>{ee(),P.current=window.setTimeout(()=>{ee(),K(!1)},Ln+32)},[ee,K]),ge=a.useCallback(()=>{const se=m.current,Te=y.current;if(!se)return;const Ie=se.getBoundingClientRect(),fe=Ie.width,Se=Ie.height;if(!fe||!Se)return;if(n==="cover"){E({width:fe,height:Se,left:Ie.left,top:Ie.top});return}if(!Te){E(Lo(se));return}const{width:_,height:te}=tm(Te);if(!_||!te){E(Lo(se));return}const M=_/te,X=fe/Se;if(M>X){const Z=fe/M;E({width:fe,height:Z,left:Ie.left,top:Ie.top+(Se-Z)/2})}else{const Z=Se*M;E({width:Z,height:Se,left:Ie.left+(fe-Z)/2,top:Ie.top})}},[n]);a.useEffect(()=>{ge();const se=m.current;if(!se)return;const Te=new ResizeObserver(()=>ge());return Te.observe(se),()=>Te.disconnect()},[ge,t]),a.useEffect(()=>{j==="opening"&&H&&k("open")},[j,H]),a.useEffect(()=>{if(j!=="closing")return;const se=setTimeout(()=>i(),Ln);return()=>clearTimeout(se)},[j,i]),a.useEffect(()=>()=>{ee()},[ee]),a.useLayoutEffect(()=>{if(N.current===t)return;ee(),Y(0),A(0),K(!1),D(!1),le(!1),$.current=0,h.current=0,v.current="none",S.current=!1,w.current=null,T.current=!1;const se=m.current;se&&E(Lo(se)),N.current=t},[t,K,ee]),a.useEffect(()=>{if(j!=="open")return;const se=()=>{const te=M=>{M.stopPropagation(),M.preventDefault(),document.removeEventListener("click",te,!0)};document.addEventListener("click",te,!0)},Te=te=>{ee(),R.current=!1,z(!1),A(0),le(!1),S.current=!1,h.current=0,v.current="none";const M=m.current;M&&E(Lo(M)),te<0?l():o()},Ie=te=>{if(Math.abs(te)>Xp&&e.length>1){Te(te);return}K(!0),A(0),O()},fe=te=>{if(te.touches.length!==1||R.current)return;const M=te.touches[0];T.current=!0,w.current={x:M.clientX,y:M.clientY},v.current="none",h.current=0,S.current=!1},Se=te=>{if(!w.current||te.touches.length!==1||R.current)return;const M=te.touches[0],X=M.clientX-w.current.x,Z=M.clientY-w.current.y;if(v.current==="none"){if(Math.abs(X)<10&&Math.abs(Z)<10)return;if(Math.abs(X)>Math.abs(Z)){if(e.length<=1)return;v.current="horizontal"}else if(Z>0)v.current="vertical";else return}if(v.current==="horizontal"){S.current=!0,le(!0),h.current=X,A(X),te.preventDefault();return}v.current==="vertical"&&(S.current=!0,le(!0),$.current=Z,Y(Z),te.preventDefault())},_=()=>{if(!w.current)return;const te=v.current,M=S.current;if(M&&te==="horizontal")Ie(h.current),se();else if(M&&te==="vertical"){if($.current>Up){const Z=window.innerHeight;$.current=Z,D(!0),Y(Z),k("closing")}else $.current=0,Y(0);se()}else te==="horizontal"&&Math.abs(h.current)>0&&(Ie(h.current),se());w.current=null,v.current="none",h.current=0,S.current=!1,le(!1)};return document.addEventListener("touchstart",fe,{passive:!0}),document.addEventListener("touchmove",Se,{passive:!1}),document.addEventListener("touchend",_),document.addEventListener("touchcancel",_),()=>{document.removeEventListener("touchstart",fe),document.removeEventListener("touchmove",Se),document.removeEventListener("touchend",_),document.removeEventListener("touchcancel",_)}},[j,e.length,l,o,K,O]),a.useEffect(()=>{const se=Te=>{Te.key==="Escape"&&(Te.preventDefault(),Te.stopPropagation(),j!=="closing"&&k("closing"))};return window.addEventListener("keydown",se,!0),()=>window.removeEventListener("keydown",se,!0)},[j]);const g=()=>{j!=="closing"&&k("closing")},he=j==="open",re=j==="closing",be=x>0?Math.max(0,1-x/500):1,ke=x>0?Math.max(.35,1-x/500):1,ae=se=>{if(se.stopPropagation(),T.current){T.current=!1;return}if(e.length<=1)return;const Te=se.currentTarget.getBoundingClientRect(),Ie=se.clientY-Te.top,fe=Math.min(52,Te.height*.2);if(!(Ie>Te.height-fe)){if(se.clientX-Te.left<Te.width/2){o();return}l()}},ve=se=>{if(e.length<=1)return;const Te=se.currentTarget.getBoundingClientRect(),Ie=se.clientX-Te.left,fe=se.clientY-Te.top,Se=Math.min(52,Te.height*.2);if(fe>Te.height-Se){se.currentTarget.style.cursor="default";return}se.currentTarget.style.cursor=Ie<Te.width/2?"w-resize":"e-resize"},U=a.useCallback(se=>{se.propertyName!=="transform"||!R.current||(ee(),K(!1))},[ee,K]),xe=V?`translateX(${f}px)`:x>0?`translateY(${x}px)`:void 0,me={position:"fixed",top:H==null?void 0:H.top,left:H==null?void 0:H.left,width:H==null?void 0:H.width,height:H==null?void 0:H.height,objectFit:n==="cover"?"cover":"contain",transform:xe,opacity:x>0?ke:j==="opening"||re?0:1,transition:G&&!W?"none":W?`transform ${Ln}ms ${Zn}`:J?`transform ${Ln}ms ${Zn}, opacity ${Ln}ms ${Zn}`:j==="opening"||re?`opacity ${Ln}ms ${Zn}`:"none",pointerEvents:I&&he&&!V?"auto":"none",touchAction:I&&he?"none":void 0,zIndex:9998},pe=H?{position:"fixed",top:H.top,height:H.height,width:H.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:u,style:{position:"fixed",top:"var(--cntrl-article-top, 0)",left:"var(--cntrl-article-left, 0)",width:"var(--cntrl-article-width, 100vw) !important",height:"var(--cntrl-viewport-height, 100vh) !important",zIndex:9997,touchAction:j==="open"?"none":void 0},onClick:g,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:he?be:0,transition:G?"none":`opacity ${Ln}ms ${Zn}`,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:m,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:he?1:0,transition:`opacity ${Ln}ms ${Zn}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:s,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:m,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:he?1:0,transition:`opacity ${Ln}ms ${Zn}`},children:e.length>1&&r.jsxs("p",{className:s,style:d,children:[t+1," / ",e.length]})})]})}),H&&C&&(I?r.jsx(nm,{src:C.url,phase:j,mediaRef:y,mediaStyle:me,onLoadedMetadata:ge,onClick:ae,onMouseMove:ve,onTransitionEnd:U},`${t}-${C.url}`):r.jsx("img",{ref:y,src:C.url,alt:C.name,onLoad:ge,onTransitionEnd:U,style:me},`${t}-${C.url}`)),he&&pe&&e.length>1&&!I&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...pe,left:H.left,cursor:"w-resize",pointerEvents:V?"none":"auto"},onClick:se=>{if(T.current){T.current=!1;return}se.stopPropagation(),o()}}),r.jsx("div",{style:{...pe,left:H.left+H.width/2,cursor:"e-resize",pointerEvents:V?"none":"auto"},onClick:se=>{if(T.current){T.current=!1;return}se.stopPropagation(),l()}})]})]})}function om(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function rm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:l,activeEvent:s,layoutId:d,portalId:c}){const{prefix:u}=L.useScopedStyles(),{type:m="a",gridLayout:y,textBoxWidth:w=100,verticalGap:$,entriesCount:h,lightbox:v,imageDisplay:S,lightboxImageDisplay:T,slider:R,sliderTiming:P,direction:H,transition:E,titleMarginTop:j,subtitleMarginTop:k,titleColor:x,subtitleColor:Y,lightboxCounterColor:f,titleFontFamily:A,titleFontSettings:W,titleFontSize:z,titleLineHeight:G,titleLetterSpacing:le,titleWordSpacing:J,titleTextAppearance:D,subtitleFontFamily:N,subtitleFontSettings:C,subtitleFontSize:I,subtitleLineHeight:V,subtitleLetterSpacing:K,subtitleWordSpacing:ee,subtitleTextAppearance:O,lightboxCounterFontFamily:ge,lightboxCounterFontSettings:g,lightboxCounterFontSize:he,lightboxCounterLineHeight:re,lightboxCounterLetterSpacing:be,lightboxCounterWordSpacing:ke,lightboxCounterTextAppearance:ae,showText:ve="always",alignEntries:U="off",align:xe="top"}=e,me={fontSettings:{fontFamily:A,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:z??.01,lineHeight:G,letterSpacing:le??0,wordSpacing:J??0,textAppearance:D,color:x},se={...pn(Xt(me,n))},Te={fontSettings:{fontFamily:N,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:I??.01,lineHeight:V,letterSpacing:K??0,wordSpacing:ee??0,textAppearance:O,color:Y},fe={...pn(Xt(Te,n))},Se={fontSettings:{fontFamily:ge,fontWeight:(g==null?void 0:g.fontWeight)??400,fontStyle:(g==null?void 0:g.fontStyle)??"normal"},fontSize:he??.01,lineHeight:re,letterSpacing:be??0,wordSpacing:ke??0,textAppearance:ae,color:f},te={...pn(Xt(Se,n)),...Cr(he,re,u,n)},M=$r(z,G,`${u}-item-title`,`${u}-text-tight-leading`),X=$r(I,V,`${u}-item-subtitle`,`${u}-text-tight-leading`),Z=Cr(z,G,u,n),ce=Cr(I,V,u,n),ue=$r(he,re,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ye=L.buildColorVars(u,{titleColor:x,subtitleColor:Y,lightboxCounterColor:f},am,sm),de=`${s&&s!=="default"?`${u}-state-${s}`:""}${ve==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Ee=h===0?1/0:h,Q=(t??[]).slice(0,Ee),ne=y.entryWidth??.2,Fe=(S==null?void 0:S.display)==="cover",We=(S==null?void 0:S.ratioValue)??"1:1",Ge=(S==null?void 0:S.reversed)??!1,[Ze,ct]=We.split(":").map(Number),vt=`${Ge?ct:Ze} / ${Ge?Ze:ct}`,St=y.columnsCount,et=L.scalingValue(ne??0,n),Be=et,dt=!Fe&&R!=="off",mt=Q.length%St||St,ot=mt<St&&Q.length>0,Pt=Q.length-mt,Ht=ot?Math.floor((St-mt)/2)+1:1,tt={width:Be,...Fe?{aspectRatio:vt,height:"auto",overflow:"hidden"}:{height:"auto"}},At=`${u}-item-image-wrapper${dt?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),It=m==="d"||m==="e"||m==="f",ze=U==="on",Qe=`calc(${L.scalingValue(ne??0,n)} * (${w} / 100))`,He=L.scalingValue(ne*w/100,n),st=Fe?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[$t,Ct]=a.useState("ltr"),[Zt,an]=a.useState(0),sn=a.useRef(null);a.useEffect(()=>{const Ne=sn.current;if(!Ne)return;const rt=new ResizeObserver(Me=>{an(Math.round(Me[0].contentRect.width))});return rt.observe(Ne),()=>rt.disconnect()},[]);const ht=(()=>{const Ne={...ye},rt=sn.current?getComputedStyle(sn.current).getPropertyValue("--cntrl-article-width").trim():"";return rt&&(Ne["--cntrl-article-width"]=rt),Ne})(),[jt,Yt]=a.useState(!1),[qt,Rt]=a.useState([]),[Qt,Ce]=a.useState(0),_e=v==="on"&&(!n||i),De=(Ne,rt)=>{n&&!i||v!=="off"&&(Rt(Ne),Ce(rt),Yt(!0))};a.useEffect(()=>{if(!jt||v!=="on"||typeof document>"u")return;const Ne=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ne}},[jt,v]),a.useEffect(()=>{!n||i||Yt(!1)},[n,i]);const Oe=a.useMemo(()=>Gp(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Oe}}),r.jsx("div",{style:ye,children:r.jsx("div",{ref:sn,className:`${u}-wrapper ${u}-type-${m}${ze?` ${u}-align-entries`:""} ${u}-image-align-${xe} ${de}`.trim(),style:{gridTemplateColumns:`repeat(${St}, ${et})`,rowGap:ze?0:L.scalingValue($??0,n),columnGap:L.scalingValue(y.horizontalGap??0,n),width:L.scalingValue(y.wrapperWidth??0,n),...ze?{[`--${u}-align-entries-row-gap`]:L.scalingValue($??0,n)}:{}},children:Q.map((Ne,rt)=>{var zt;const Me=Qa(Ne.title),Ye=Qa(Ne.subtitle),Ke=(((zt=Ne.link)==null?void 0:zt.length)??0)>0&&v==="off"?Ne.link:void 0,Et=Math.floor(rt/St)===Math.ceil(Q.length/St)-1,xt=ot&&rt>=Pt?`${Ht+(rt-Pt)}`:void 0,ft=It?r.jsxs("div",{className:`${u}-item-text-block`,children:[Me&&r.jsx("p",{className:M,style:{width:Qe,...se,...Z},children:Ne.title}),Me&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:L.scalingValue(j??0,n),width:He}}),Ye&&r.jsx("p",{className:X,style:{width:Qe,...fe,...ce},children:Ne.subtitle}),Ye&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:L.scalingValue(k??0,n),width:He}})]}):null,Wt=ze?r.jsxs("div",{className:`${u}-item-title-row`,children:[!It&&r.jsx("div",{"data-controls":o&&Me?"titleMarginTop":void 0,className:o&&Me?`${u}-control`:void 0,style:{height:Me?L.scalingValue(j??0,n):0,width:He}}),Me&&r.jsx("p",{className:M,style:{width:Qe,...se,...Z},children:Ne.title}),It&&Me&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:L.scalingValue(j??0,n),width:He}})]}):null,Tt=ze?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!It&&r.jsx("div",{"data-controls":o&&Ye?"subtitleMarginTop":void 0,className:o&&Ye?`${u}-control`:void 0,style:{height:Ye?L.scalingValue(k??0,n):0,width:He}}),Ye&&r.jsx("p",{className:X,style:{width:Qe,...fe,...ce},children:Ne.subtitle}),It&&Ye&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:L.scalingValue(k??0,n),width:He}})]}):null,Bt=Ke?r.jsxs("a",{href:Ke,target:"_blank",className:`${u}-item-text-link`,children:[Wt,Tt]}):r.jsxs(r.Fragment,{children:[Wt,Tt]}),Ft=Qp(Ne.gallery),kt=Ft.filter(at=>at.lightboxMedia).map(at=>at.lightboxMedia),en=r.jsx("div",{className:At,style:tt,children:Ft.length===0?null:R==="off"?(()=>{const{displayMedia:at,lightboxMedia:_t}=Ft[0],Gt=_t?kt.findIndex(ie=>ie.url===_t.url):-1;return r.jsx(es,{media:at,className:`${u}-item-${Gi(at)?"video":"image"}`.trim(),style:st,onMediaClick:_e&&Gt>=0?()=>De(kt,Gt):void 0})})():r.jsxs(r.Fragment,{children:[dt&&ze&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ft.map(({displayMedia:at})=>Gi(at)?r.jsx("video",{src:at.url,muted:!0,playsInline:!0},`sizer-${at.url}`):r.jsx("img",{src:at.url,alt:""},`sizer-${at.url}`))}),r.jsx(fa,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:P*1e3,width:"100%",height:"100%",speed:Kp,type:E==="fade"?"fade":"loop",rewind:E==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:E==="fade"?"ltr":H!=="random"?H==="horizontal"?"ltr":"ttb":$t},onMoved:at=>{if(H!=="random"||E==="fade")return;const _t=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Ct(_t),setTimeout(()=>{at.refresh()},0)},children:Ft.map(({displayMedia:at,lightboxMedia:_t},Gt)=>{const ie=_t?kt.findIndex(Ae=>Ae.url===_t.url):-1;return r.jsx(ya,{children:r.jsx(es,{media:at,className:`${u}-item-${Gi(at)?"video":"image"}`.trim(),style:st,onMediaClick:_e&&ie>=0?()=>De(kt,ie):void 0})},Gt)})},`${E}-${ne}-${H}-${P}-${Zt}-${d}`)]})}),yt=It?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Me?"titleMarginTop":void 0,className:o&&Me?`${u}-control`:void 0,style:{height:Me?L.scalingValue(j??0,n):0,width:He}}),r.jsx("p",{className:M,style:{width:Qe,...se,...Z},children:Ne.title}),r.jsx("div",{"data-controls":o&&Ye?"subtitleMarginTop":void 0,className:o&&Ye?`${u}-control`:void 0,style:{height:Ye?L.scalingValue(k??0,n):0,width:He}}),r.jsx("p",{className:X,style:{width:Qe,...fe,...ce},children:Ne.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:xt&&!ze?{gridColumn:xt}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${ze&&Et?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${et} * (${w} / 100))`:et,...xt&&ze?{gridColumn:xt}:{}},children:ze?r.jsx(r.Fragment,{children:It?r.jsxs(r.Fragment,{children:[Bt,r.jsx("a",{href:Ke,target:"_blank",className:`${u}-item-image-link`,children:en})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:Ke,target:"_blank",className:`${u}-item-image-link`,children:en}),Bt]})}):Ke?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:Ke,target:"_blank",className:`${u}-item-image-link`,children:[ft,en]}),!It&&r.jsx("a",{href:Ke,target:"_blank",className:`${u}-item-text-link`,children:yt})]}):r.jsxs(r.Fragment,{children:[ft,en,yt]})})},rt)})})}),(!n||i)&&jt&&typeof document<"u"&&v==="on"&&(()=>{const Ne=(c?document.getElementById(c):null)??document.body;return Wi.createPortal(r.jsx("div",{style:ht,"data-selection":"none",children:r.jsx(im,{items:qt,index:Qt,imageDisplay:om(T),onClose:()=>Yt(!1),onPrev:()=>Ce(rt=>(rt-1+qt.length)%qt.length),onNext:()=>Ce(rt=>(rt+1)%qt.length),counterClassName:ue,counterStyle:te})}),Ne)})()]})}const am={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},sm=["hover","focus","filled","success","error"],lm=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4065
+ `}const Rn=500,gm=750,ni="cubic-bezier(0.22, 1, 0.36, 1)",hm=72,fm=50;function ym(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 vm(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function xm(e){const[t]=e.media;return t!=null&&t.url?t:null}function bm(e){return!Array.isArray(e)||e.length===0?[]:ym(e)?e.flatMap(t=>{const n=vm(t);if(!n)return[];const i=xm(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 Qi(e){return e.type==="video"}function wm(e){e.pause(),e.removeAttribute("src"),e.load()}function ys({media:e,className:t,style:n,onMediaClick:i}){return Qi(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 Ao(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Sm(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function $m({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{wm(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d,style:i})}function Cm({items:e,index:t,imageDisplay:n,onClose:i,onPrev:o,onNext:s,counterClassName:l,counterStyle:d}){const c=n==="cover",u=a.useRef(null),m=a.useRef(null),v=a.useRef(null),b=a.useRef(null),S=a.useRef(0),y=a.useRef(0),w=a.useRef("none"),C=a.useRef(!1),L=a.useRef(!1),k=a.useRef(!1),A=a.useRef(null),[O,P]=a.useState(null),[D,R]=a.useState("opening"),[x,U]=a.useState(0),[h,I]=a.useState(0),[W,V]=a.useState(!1),[Y,ae]=a.useState(!1),[Z,G]=a.useState(!1),H=a.useRef(t),$=e[t],M=$?Qi($):!1,q=h!==0||W,z=a.useCallback(se=>{k.current=se,V(se)},[]),ee=a.useCallback(()=>{A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),_=a.useCallback(()=>{ee(),A.current=window.setTimeout(()=>{ee(),z(!1)},Rn+32)},[ee,z]),ye=a.useCallback(()=>{const se=m.current,Re=v.current;if(!se)return;const ke=se.getBoundingClientRect(),we=ke.width,Se=ke.height;if(!we||!Se)return;if(n==="cover"){P({width:we,height:Se,left:ke.left,top:ke.top});return}if(!Re){P(Ao(se));return}const{width:B,height:re}=Sm(Re);if(!B||!re){P(Ao(se));return}const F=B/re,te=we/Se;if(F>te){const ne=we/F;P({width:we,height:ne,left:ke.left,top:ke.top+(Se-ne)/2})}else{const ne=Se*F;P({width:ne,height:Se,left:ke.left+(we-ne)/2,top:ke.top})}},[n]);a.useEffect(()=>{ye();const se=m.current;if(!se)return;const Re=new ResizeObserver(()=>ye());return Re.observe(se),()=>Re.disconnect()},[ye,t]),a.useEffect(()=>{D==="opening"&&O&&R("open")},[D,O]),a.useEffect(()=>{if(D!=="closing")return;const se=setTimeout(()=>i(),Rn);return()=>clearTimeout(se)},[D,i]),a.useEffect(()=>()=>{ee()},[ee]),a.useLayoutEffect(()=>{if(H.current===t)return;ee(),U(0),I(0),z(!1),G(!1),ae(!1),S.current=0,y.current=0,w.current="none",C.current=!1,b.current=null,L.current=!1;const se=m.current;se&&P(Ao(se)),H.current=t},[t,z,ee]),a.useEffect(()=>{if(D!=="open")return;const se=()=>{const re=F=>{F.stopPropagation(),F.preventDefault(),document.removeEventListener("click",re,!0)};document.addEventListener("click",re,!0)},Re=re=>{ee(),k.current=!1,V(!1),I(0),ae(!1),C.current=!1,y.current=0,w.current="none";const F=m.current;F&&P(Ao(F)),re<0?s():o()},ke=re=>{if(Math.abs(re)>fm&&e.length>1){Re(re);return}z(!0),I(0),_()},we=re=>{if(re.touches.length!==1||k.current)return;const F=re.touches[0];L.current=!0,b.current={x:F.clientX,y:F.clientY},w.current="none",y.current=0,C.current=!1},Se=re=>{if(!b.current||re.touches.length!==1||k.current)return;const F=re.touches[0],te=F.clientX-b.current.x,ne=F.clientY-b.current.y;if(w.current==="none"){if(Math.abs(te)<10&&Math.abs(ne)<10)return;if(Math.abs(te)>Math.abs(ne)){if(e.length<=1)return;w.current="horizontal"}else if(ne>0)w.current="vertical";else return}if(w.current==="horizontal"){C.current=!0,ae(!0),y.current=te,I(te),re.preventDefault();return}w.current==="vertical"&&(C.current=!0,ae(!0),S.current=ne,U(ne),re.preventDefault())},B=()=>{if(!b.current)return;const re=w.current,F=C.current;if(F&&re==="horizontal")ke(y.current),se();else if(F&&re==="vertical"){if(S.current>hm){const ne=window.innerHeight;S.current=ne,G(!0),U(ne),R("closing")}else S.current=0,U(0);se()}else re==="horizontal"&&Math.abs(y.current)>0&&(ke(y.current),se());b.current=null,w.current="none",y.current=0,C.current=!1,ae(!1)};return document.addEventListener("touchstart",we,{passive:!0}),document.addEventListener("touchmove",Se,{passive:!1}),document.addEventListener("touchend",B),document.addEventListener("touchcancel",B),()=>{document.removeEventListener("touchstart",we),document.removeEventListener("touchmove",Se),document.removeEventListener("touchend",B),document.removeEventListener("touchcancel",B)}},[D,e.length,s,o,z,_]),a.useEffect(()=>{const se=Re=>{Re.key==="Escape"&&(Re.preventDefault(),Re.stopPropagation(),D!=="closing"&&R("closing"))};return window.addEventListener("keydown",se,!0),()=>window.removeEventListener("keydown",se,!0)},[D]);const f=()=>{D!=="closing"&&R("closing")},ve=D==="open",K=D==="closing",le=x>0?Math.max(0,1-x/500):1,$e=x>0?Math.max(.35,1-x/500):1,oe=se=>{if(se.stopPropagation(),L.current){L.current=!1;return}if(e.length<=1)return;const Re=se.currentTarget.getBoundingClientRect(),ke=se.clientY-Re.top,we=Math.min(52,Re.height*.2);if(!(ke>Re.height-we)){if(se.clientX-Re.left<Re.width/2){o();return}s()}},fe=se=>{if(e.length<=1)return;const Re=se.currentTarget.getBoundingClientRect(),ke=se.clientX-Re.left,we=se.clientY-Re.top,Se=Math.min(52,Re.height*.2);if(we>Re.height-Se){se.currentTarget.style.cursor="default";return}se.currentTarget.style.cursor=ke<Re.width/2?"w-resize":"e-resize"},X=a.useCallback(se=>{se.propertyName!=="transform"||!k.current||(ee(),z(!1))},[ee,z]),be=q?`translateX(${h}px)`:x>0?`translateY(${x}px)`:void 0,xe={position:"fixed",top:O==null?void 0:O.top,left:O==null?void 0:O.left,width:O==null?void 0:O.width,height:O==null?void 0:O.height,objectFit:n==="cover"?"cover":"contain",transform:be,opacity:x>0?$e:D==="opening"||K?0:1,transition:Y&&!W?"none":W?`transform ${Rn}ms ${ni}`:Z?`transform ${Rn}ms ${ni}, opacity ${Rn}ms ${ni}`:D==="opening"||K?`opacity ${Rn}ms ${ni}`:"none",pointerEvents:M&&ve&&!q?"auto":"none",touchAction:M&&ve?"none":void 0,zIndex:9998},pe=O?{position:"fixed",top:O.top,height:O.height,width:O.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:u,style:{position:"fixed",top:"var(--cntrl-article-top, 0)",left:"var(--cntrl-article-left, 0)",width:"var(--cntrl-article-width, 100vw) !important",height:"var(--cntrl-viewport-height, 100vh) !important",zIndex:9997,touchAction:D==="open"?"none":void 0},onClick:f,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:ve?le:0,transition:Y?"none":`opacity ${Rn}ms ${ni}`,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:m,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:ve?1:0,transition:`opacity ${Rn}ms ${ni}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:l,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:m,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ve?1:0,transition:`opacity ${Rn}ms ${ni}`},children:e.length>1&&r.jsxs("p",{className:l,style:d,children:[t+1," / ",e.length]})})]})}),O&&$&&(M?r.jsx($m,{src:$.url,phase:D,mediaRef:v,mediaStyle:xe,onLoadedMetadata:ye,onClick:oe,onMouseMove:fe,onTransitionEnd:X},`${t}-${$.url}`):r.jsx("img",{ref:v,src:$.url,alt:$.name,onLoad:ye,onTransitionEnd:X,style:xe},`${t}-${$.url}`)),ve&&pe&&e.length>1&&!M&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...pe,left:O.left,cursor:"w-resize",pointerEvents:q?"none":"auto"},onClick:se=>{if(L.current){L.current=!1;return}se.stopPropagation(),o()}}),r.jsx("div",{style:{...pe,left:O.left+O.width/2,cursor:"e-resize",pointerEvents:q?"none":"auto"},onClick:se=>{if(L.current){L.current=!1;return}se.stopPropagation(),s()}})]})]})}function Tm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Lm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=E.useScopedStyles(),{type:m="a",gridLayout:v,textBoxWidth:b=100,verticalGap:S,entriesCount:y,lightbox:w,imageDisplay:C,lightboxImageDisplay:L,slider:k,sliderTiming:A,direction:O,transition:P,titleMarginTop:D,subtitleMarginTop:R,titleColor:x,subtitleColor:U,lightboxCounterColor:h,titleFontFamily:I,titleFontSettings:W,titleFontSize:V,titleLineHeight:Y,titleLetterSpacing:ae,titleWordSpacing:Z,titleTextAppearance:G,subtitleFontFamily:H,subtitleFontSettings:$,subtitleFontSize:M,subtitleLineHeight:q,subtitleLetterSpacing:z,subtitleWordSpacing:ee,subtitleTextAppearance:_,lightboxCounterFontFamily:ye,lightboxCounterFontSettings:f,lightboxCounterFontSize:ve,lightboxCounterLineHeight:K,lightboxCounterLetterSpacing:le,lightboxCounterWordSpacing:$e,lightboxCounterTextAppearance:oe,showText:fe="always",alignEntries:X="off",align:be="top"}=e,xe={fontSettings:{fontFamily:I,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:V??.01,lineHeight:Y,letterSpacing:ae??0,wordSpacing:Z??0,textAppearance:G,color:x},se={...hn(Qt(xe,n))},Re={fontSettings:{fontFamily:H,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:M??.01,lineHeight:q,letterSpacing:z??0,wordSpacing:ee??0,textAppearance:_,color:U},we={...hn(Qt(Re,n))},Se={fontSettings:{fontFamily:ye,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:ve??.01,lineHeight:K,letterSpacing:le??0,wordSpacing:$e??0,textAppearance:oe,color:h},re={...hn(Qt(Se,n)),...Hr(ve,K,u,n)},F=_r(V,Y,`${u}-item-title`,`${u}-text-tight-leading`),te=_r(M,q,`${u}-item-subtitle`,`${u}-text-tight-leading`),ne=Hr(V,Y,u,n),ue=Hr(M,q,u,n),me=_r(ve,K,`${u}-lightbox-counter`,`${u}-text-tight-leading`),he=E.buildColorVars(u,{titleColor:x,subtitleColor:U,lightboxCounterColor:h},Im,Rm),ge=`${l&&l!=="default"?`${u}-state-${l}`:""}${fe==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Ae=y===0?1/0:y,ie=(t??[]).slice(0,Ae),j=v.entryWidth??.2,Oe=(C==null?void 0:C.display)==="cover",Fe=(C==null?void 0:C.ratioValue)??"1:1",et=(C==null?void 0:C.reversed)??!1,[Ye,at]=Fe.split(":").map(Number),it=`${et?at:Ye} / ${et?Ye:at}`,$t=v.columnsCount,ot=E.scalingValue(j??0,n),Ue=ot,ht=!Oe&&k!=="off",xt=ie.length%$t||$t,ct=xt<$t&&ie.length>0,Mt=ie.length-xt,_t=ct?Math.floor(($t-xt)/2)+1:1,Qe={width:Ue,...Oe?{aspectRatio:it,height:"auto",overflow:"hidden"}:{height:"auto"}},Tt=`${u}-item-image-wrapper${ht?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Lt=m==="d"||m==="e"||m==="f",Ge=X==="on",qe=`calc(${E.scalingValue(j??0,n)} * (${b} / 100))`,Pe=E.scalingValue(j*b/100,n),gt=Oe?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[It,kt]=a.useState("ltr"),[Dt,en]=a.useState(0),on=a.useRef(null);a.useEffect(()=>{const Be=on.current;if(!Be)return;const dt=new ResizeObserver(_e=>{en(Math.round(_e[0].contentRect.width))});return dt.observe(Be),()=>dt.disconnect()},[]);const bt=(()=>{const Be={...he},dt=on.current?getComputedStyle(on.current).getPropertyValue("--cntrl-article-width").trim():"";return dt&&(Be["--cntrl-article-width"]=dt),Be})(),[Rt,Ut]=a.useState(!1),[Kt,ft]=a.useState([]),[Jt,Ce]=a.useState(0),je=w==="on"&&(!n||i),Ke=(Be,dt)=>{n&&!i||w!=="off"&&(ft(Be),Ce(dt),Ut(!0))};a.useEffect(()=>{if(!Rt||w!=="on"||typeof document>"u")return;const Be=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Be}},[Rt,w]),a.useEffect(()=>{!n||i||Ut(!1)},[n,i]);const He=a.useMemo(()=>mm(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:He}}),r.jsx("div",{style:he,children:r.jsx("div",{ref:on,className:`${u}-wrapper ${u}-type-${m}${Ge?` ${u}-align-entries`:""} ${u}-image-align-${be} ${ge}`.trim(),style:{gridTemplateColumns:`repeat(${$t}, ${ot})`,rowGap:Ge?0:E.scalingValue(S??0,n),columnGap:E.scalingValue(v.horizontalGap??0,n),width:E.scalingValue(v.wrapperWidth??0,n),...Ge?{[`--${u}-align-entries-row-gap`]:E.scalingValue(S??0,n)}:{}},children:ie.map((Be,dt)=>{var Gt;const _e=fs(Be.title),Ze=fs(Be.subtitle),tt=(((Gt=Be.link)==null?void 0:Gt.length)??0)>0&&w==="off"?Be.link:void 0,Ft=Math.floor(dt/$t)===Math.ceil(ie.length/$t)-1,Ct=ct&&dt>=Mt?`${_t+(dt-Mt)}`:void 0,st=Lt?r.jsxs("div",{className:`${u}-item-text-block`,children:[_e&&r.jsx("p",{className:F,style:{width:qe,...se,...ne},children:Be.title}),_e&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(D??0,n),width:Pe}}),Ze&&r.jsx("p",{className:te,style:{width:qe,...we,...ue},children:Be.subtitle}),Ze&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(R??0,n),width:Pe}})]}):null,Ht=Ge?r.jsxs("div",{className:`${u}-item-title-row`,children:[!Lt&&r.jsx("div",{"data-controls":o&&_e?"titleMarginTop":void 0,className:o&&_e?`${u}-control`:void 0,style:{height:_e?E.scalingValue(D??0,n):0,width:Pe}}),_e&&r.jsx("p",{className:F,style:{width:qe,...se,...ne},children:Be.title}),Lt&&_e&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(D??0,n),width:Pe}})]}):null,At=Ge?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Lt&&r.jsx("div",{"data-controls":o&&Ze?"subtitleMarginTop":void 0,className:o&&Ze?`${u}-control`:void 0,style:{height:Ze?E.scalingValue(R??0,n):0,width:Pe}}),Ze&&r.jsx("p",{className:te,style:{width:qe,...we,...ue},children:Be.subtitle}),Lt&&Ze&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:E.scalingValue(R??0,n),width:Pe}})]}):null,Vt=tt?r.jsxs("a",{href:tt,target:"_blank",className:`${u}-item-text-link`,children:[Ht,At]}):r.jsxs(r.Fragment,{children:[Ht,At]}),Bt=bm(Be.gallery),Pt=Bt.filter(ut=>ut.lightboxMedia).map(ut=>ut.lightboxMedia),Zt=r.jsx("div",{className:Tt,style:Qe,children:Bt.length===0?null:k==="off"?(()=>{const{displayMedia:ut,lightboxMedia:Wt}=Bt[0],zt=Wt?Pt.findIndex(g=>g.url===Wt.url):-1;return r.jsx(ys,{media:ut,className:`${u}-item-${Qi(ut)?"video":"image"}`.trim(),style:gt,onMediaClick:je&&zt>=0?()=>Ke(Pt,zt):void 0})})():r.jsxs(r.Fragment,{children:[ht&&Ge&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Bt.map(({displayMedia:ut})=>Qi(ut)?r.jsx("video",{src:ut.url,muted:!0,playsInline:!0},`sizer-${ut.url}`):r.jsx("img",{src:ut.url,alt:""},`sizer-${ut.url}`))}),r.jsx(ka,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:A*1e3,width:"100%",height:"100%",speed:gm,type:P==="fade"?"fade":"loop",rewind:P==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:P==="fade"?"ltr":O!=="random"?O==="horizontal"?"ltr":"ttb":It},onMoved:ut=>{if(O!=="random"||P==="fade")return;const Wt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";kt(Wt),setTimeout(()=>{ut.refresh()},0)},children:Bt.map(({displayMedia:ut,lightboxMedia:Wt},zt)=>{const g=Wt?Pt.findIndex(ce=>ce.url===Wt.url):-1;return r.jsx(Pa,{children:r.jsx(ys,{media:ut,className:`${u}-item-${Qi(ut)?"video":"image"}`.trim(),style:gt,onMediaClick:je&&g>=0?()=>Ke(Pt,g):void 0})},zt)})},`${P}-${j}-${O}-${A}-${Dt}-${d}`)]})}),wt=Lt?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&_e?"titleMarginTop":void 0,className:o&&_e?`${u}-control`:void 0,style:{height:_e?E.scalingValue(D??0,n):0,width:Pe}}),r.jsx("p",{className:F,style:{width:qe,...se,...ne},children:Be.title}),r.jsx("div",{"data-controls":o&&Ze?"subtitleMarginTop":void 0,className:o&&Ze?`${u}-control`:void 0,style:{height:Ze?E.scalingValue(R??0,n):0,width:Pe}}),r.jsx("p",{className:te,style:{width:qe,...we,...ue},children:Be.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:Ct&&!Ge?{gridColumn:Ct}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Ge&&Ft?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(b??0)>100?`calc(${ot} * (${b} / 100))`:ot,...Ct&&Ge?{gridColumn:Ct}:{}},children:Ge?r.jsx(r.Fragment,{children:Lt?r.jsxs(r.Fragment,{children:[Vt,r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:Zt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:Zt}),Vt]})}):tt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:[st,Zt]}),!Lt&&r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-text-link`,children:wt})]}):r.jsxs(r.Fragment,{children:[st,Zt,wt]})})},dt)})})}),(!n||i)&&Rt&&typeof document<"u"&&w==="on"&&(()=>{const Be=(c?document.getElementById(c):null)??document.body;return mi.createPortal(r.jsx("div",{style:bt,"data-selection":"none",children:r.jsx(Cm,{items:Kt,index:Jt,imageDisplay:Tm(L),onClose:()=>Ut(!1),onPrev:()=>Ce(dt=>(dt-1+Kt.length)%Kt.length),onNext:()=>Ce(dt=>(dt+1)%Kt.length),counterClassName:me,counterStyle:re})}),Be)})()]})}const Im={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Rm=["hover","focus","filled","success","error"],Em=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4079
4066
  import '@splidejs/react-splide/css/core';
4080
4067
  import { CommonComponentProps } from '../props';
4081
4068
  import {
@@ -4452,24 +4439,11 @@ function getCSS(P: string): string {
4452
4439
  margin: 0;
4453
4440
  color: var(--\${P}-lightbox-counter-color);
4454
4441
  }
4455
-
4456
4442
  .\${P}-control {
4457
4443
  position: relative;
4458
4444
  z-index: 2;
4459
4445
  width: 100%;
4460
4446
  }
4461
-
4462
- .\${P}-control::before {
4463
- content: "";
4464
- position: absolute;
4465
- top: 0;
4466
- left: 0;
4467
- width: 100%;
4468
- height: 100%;
4469
- min-height: 20px;
4470
- pointer-events: auto;
4471
- z-index: 10;
4472
- }
4473
4447
  \`;
4474
4448
  }
4475
4449
 
@@ -5877,12 +5851,12 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5877
5851
  };
5878
5852
 
5879
5853
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5880
- `,Tr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},cm=["titleColor","subtitleColor","lightboxCounterColor"],dm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!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:{...Tr.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:{...Tr.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:{...Tr.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:"off",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:"b",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},t:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,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:.015625,subtitleLineHeight:.018229166666666668,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,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:[...cm],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},um={element:rm,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:dm,sourceCode:lm},pm=50,ts=10,va="cntrl-lightbox-journal",lr=va,Gr=`${va}-`,cr=e=>`${va}-${e}`,xa=e=>e===lr||e.startsWith(Gr),ns=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},is=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=ns(t.get(cr(e)));if(i)return i}const n=ns(t.get(lr));if(n)return n;for(const[i]of t){if(!i.startsWith(Gr))continue;const o=i.slice(Gr.length);if(!/^\d+$/.test(o))continue;const l=Number.parseInt(o,10);if(Number.isFinite(l)&&l>=1)return l}return null},os=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},bl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(s=>{xa(s)&&i.searchParams.delete(s)}),t?i.searchParams.set(cr(t),String(e)):i.searchParams.set(lr,String(e));const o=n?"replaceState":"pushState",l=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",l)},mm=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===cr(e)||i===lr:xa(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)}},wl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(cr(e)):[...t.keys()].some(n=>xa(n))},gm=(e,t)=>{if(wl(t)){if(e){window.history.back();return}mm(t)}},hm=20,fm=2,Lr=e=>`max(${e}, ${hm}px)`,Li=e=>((e==null?void 0:e.image)??[]).slice(0,fm),Sl=e=>e.reduce((t,n)=>t+Li(n).length,0),ym=(e,t)=>{const n=e.slice(0,t).reduce((o,l)=>o+Li(l).length,1),i=Li(e[t]).length;return{start:n,end:n+i-1}},vm=(e,t)=>{const n=Sl(e),{start:i,end:o}=ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Ho=(e,t)=>t==="B"?e.flatMap((n,i)=>Li(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Li(n)})),xm=(e,t,n,i)=>{var l;if(n==="B")return`${t+1} / ${e.length}`;const o=((l=e[t])==null?void 0:l.entryIndex)??0;return vm(i,o)},rs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",bm=(e,t,n)=>e==="B"?t.length>1:Sl(n)>1,dn=.004,On=.004,wi={title1Width:.13,title2Width:.13,title3Width:.14},jn=(e,t,n,i,o)=>{const l=[];return t.title1&&l.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&l.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&l.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),l},Ii=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const c=Math.min(l,d);return{overflow:l-c,widths:[d-c,...s]}},{overflow:i-1,widths:[]});return o},no=(e,t)=>Ii(e,t),on=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Bn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ii(e.length,n),effective:no(e.length,n)}},$l=(e,t,n,i)=>e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),Cl=(e,t,n,i)=>e.slice(0,i+1).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),ci=["title1","title2","title3","count"],Je=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Tl={title1:"1",title2:"2",title3:"3",count:"Count"},Ll=e=>[Je(e,"fontFamily"),Je(e,"fontSettings"),{type:"row",items:[Je(e,"fontSize"),Je(e,"lineHeight"),Je(e,"letterSpacing"),Je(e,"wordSpacing")]},Je(e,"textAlign"),Je(e,"textAppearance")],wm=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ci.map(e=>[Tl[e],Ll(e)]))}),Sm={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},$m={title1:.02,title2:.02,title3:.02,count:.017},oi=(e,t)=>{const n=i=>{const o=Je(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[Sm[t]]}},ri=(e,t,n)=>{var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??$m[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)};function Cm({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:y=0,title3MarginLeft:w=0,titleRowMarginBottom:$=0,titleHeaderLayout:h="desktop",contentMarginTop:v=0,iconMarginRight:S=0,closeIcon:T=null,closeIconMaxWidth:R=0,closeIconColor:P="#000000",closeIconHoverColor:H="#cccccc"}=n,E=L.scalingValue(v,i),j=L.scalingValue(S,i),k=L.scalingValue($,i),x=h==="mobile",Y=ri("title1",oi(n,"title1"),i),f=ri("title2",oi(n,"title2"),i),A=ri("title3",oi(n,"title3"),i),W=a.useMemo(()=>({title1Width:d??wi.title1Width,title2Width:c??wi.title2Width,title3Width:u??wi.title3Width}),[d,c,u]),z=a.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:w}),[y,w]),G=a.useMemo(()=>jn(e,t,Y,f,A),[e,t,Y,f,A]),le=a.useMemo(()=>G.map(q=>W[q.widthKey]),[G,W]),J=a.useMemo(()=>Ii(G.length,le),[G.length,le]),D=a.useMemo(()=>no(G.length,le),[G.length,le]),N=a.useMemo(()=>G.filter(q=>q.prefix==="title1"),[G]),C=a.useMemo(()=>G.filter(q=>q.prefix==="title2"||q.prefix==="title3"),[G]),I=a.useMemo(()=>Bn(N,W),[N,W]),V=a.useMemo(()=>Bn(C,W),[C,W]),K=!!(t.title1||t.title2||t.title3),ee=T!==null;if(!(K||ee))return null;const ge=(m??0)>0||o,g=(q,de)=>{const Ee=G.findIndex(ne=>ne.prefix===q.prefix);if(!x||de==="single-row")return{effectiveWidth:D[Ee]??0,resolvedWidth:J[Ee]??0,maxWidth:on(Ee,J)};if(de==="two-row-top"){const ne=N.findIndex(Fe=>Fe.prefix===q.prefix);return{effectiveWidth:I.effective[ne]??0,resolvedWidth:I.resolved[ne]??0,maxWidth:on(ne,I.resolved)}}const Q=C.findIndex(ne=>ne.prefix===q.prefix);return{effectiveWidth:V.effective[Q]??0,resolvedWidth:V.resolved[Q]??0,maxWidth:on(Q,V.resolved)}},he=(q,de,Ee)=>{if(!x||Ee==="single-row"){const Ge=q.findIndex(Xe=>Xe.prefix===de.prefix),Ze=q.map(Xe=>W[Xe.widthKey]),ct=Ii(q.length,Ze);return{effectiveWidth:no(q.length,Ze)[Ge]??0,resolvedWidth:ct[Ge]??0,maxWidth:on(Ge,ct)}}if(Ee==="two-row-top"){const Ge=q.filter(Xe=>Xe.prefix==="title1"),Ze=Ge.findIndex(Xe=>Xe.prefix===de.prefix),{resolved:ct,effective:pt}=Bn(Ge,W);return{effectiveWidth:pt[Ze]??0,resolvedWidth:ct[Ze]??0,maxWidth:on(Ze,ct)}}const Q=q.filter(Ge=>Ge.prefix==="title2"||Ge.prefix==="title3"),ne=Q.findIndex(Ge=>Ge.prefix===de.prefix),{resolved:Fe,effective:We}=Bn(Q,W);return{effectiveWidth:We[ne]??0,resolvedWidth:Fe[ne]??0,maxWidth:on(ne,Fe)}},re=q=>Cl(G,J,z,q)+(x?0:m??0),be=()=>x?0:m??0,ke=q=>C.slice(0,q).reduce((de,Ee,Q)=>de+(Ee.marginLeftKey?z[Ee.marginLeftKey]??0:0)+(V.resolved[Q]??0),0),ae=q=>{const de=C[q];return ke(q)+(de.marginLeftKey?z[de.marginLeftKey]??0:0)+(V.resolved[q]??0)},ve=(q,de,Ee)=>{const Q=q.marginLeftKey?z[q.marginLeftKey]??0:0,{effectiveWidth:ne,resolvedWidth:Fe,maxWidth:We}=Ee??g(q,de),Ge=Math.max(Q,On),Ze=o&&de==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":q.prefix,style:{width:L.scalingValue(ne,i),...Q>0?{marginLeft:L.scalingValue(Q,i)}:{}},children:[r.jsx("p",{className:q.className,style:q.style,children:q.text}),Ze&&q.marginLeftKey?r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe),style:{position:"absolute",top:0,left:L.scalingValue(-Q,i),width:L.scalingValue(Ge,i),height:"100%",pointerEvents:"auto"}}):null,Ze?r.jsx("div",{"data-controls":q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(We),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:L.scalingValue(-dn/2,i),width:L.scalingValue(dn,i),height:"100%",pointerEvents:"auto"}}):null]},q.className)},U=(q="two-row")=>{const de=G.findIndex(ne=>ne.prefix==="title1"),Ee=de>=0?J[de]:W.title1Width,Q=q==="two-row"&&o;return r.jsx("div",{...Q?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee)}:{},style:{width:L.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...Q?{pointerEvents:"auto"}:{}}})},xe=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:Y,"aria-hidden":"true",children:" "}),me=q=>{const de=jn(e,q,Y,f,A);return r.jsx(r.Fragment,{children:de.map(Ee=>ve(Ee,"single-row",he(de,Ee,"single-row")))})},pe=q=>{const de=jn(e,q,Y,f,A),Ee=de.find(Q=>Q.prefix==="title1");return Ee?ve(Ee,"two-row-top",he(de,Ee,"two-row-top")):null},se=(q,de=!1)=>{const Ee=jn(e,q,Y,f,A),Q=Ee.filter(We=>We.prefix==="title2"||We.prefix==="title3"),ne=o&&de;return Q.length>0||ne||($??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Q.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:Q.map(We=>ve(We,"two-row-bottom",he(Ee,We,"two-row-bottom")))}),de&&o?r.jsxs(r.Fragment,{children:[X(),Z()]}):null]}):null,($??0)>0||ne?r.jsx("div",{"data-controls":ne?"titleRowMarginBottom":void 0,"data-controls-axis":ne?"y":void 0,"data-controls-reverse":ne?"":void 0,className:ne?`${e}-control`:void 0,style:{height:k,width:"100%",flexShrink:0,pointerEvents:ne?"auto":"none"}}):null]}):null},Te=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:L.scalingValue(R??0,i),height:L.scalingValue(R??0,i),marginRight:j,"--close-icon-hover-color":H},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:q=>{q.stopPropagation(),s==null||s()},"aria-label":"Close",children:r.jsx(mn,{url:T??"",fill:P,hoverFill:i&&!l?P:H,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:j,height:"100%",pointerEvents:"auto"}})]}),Ie=()=>ee?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Te()}):null,fe=q=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:q})}),Se=q=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[ee||K?xe():null,ge?U("two-row"):null,fe(q),Ie()]}),_=(q,de=!1)=>r.jsxs(r.Fragment,{children:[Se(pe(q)),se(q,de)]}),te=()=>{const q=x?-1:G.findIndex(Q=>Q.prefix==="title1"),de=!x&&(o||(m??0)>0)?(()=>{const Q=m??0,ne=q>=0?J[q]:W.title1Width,Fe=Math.max(Q,On);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ne),style:{position:"absolute",top:0,left:0,width:L.scalingValue(Fe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ee=G.flatMap((Q,ne)=>{if(!Q.marginLeftKey)return[];const Fe=z[Q.marginLeftKey]??0,We=$l(G,J,z,ne)+be(),Ge=Math.max(Fe,On);return r.jsx("div",{"data-controls":Q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(J[ne]),style:{position:"absolute",top:0,left:L.scalingValue(We,i),width:L.scalingValue(Ge,i),height:"100%",pointerEvents:"auto"}},Q.marginLeftKey)});return de?[de,...Ee]:Ee},M=()=>G.map((q,de)=>{const Ee=on(de,J),ne=re(de)-dn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ee),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:L.scalingValue(ne,i),width:L.scalingValue(dn,i),height:"100%",pointerEvents:"auto"}})},`${q.widthKey}-junction`)}),X=()=>C.flatMap((q,de)=>{if(!q.marginLeftKey)return[];const Ee=z[q.marginLeftKey]??0,Q=ke(de),ne=Math.max(Ee,On),{resolvedWidth:Fe}=g(q,"two-row-bottom");return r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe),style:{position:"absolute",top:0,left:L.scalingValue(Q,i),width:L.scalingValue(ne,i),height:"100%",pointerEvents:"auto"}},q.marginLeftKey)}),Z=()=>C.map((q,de)=>{const{maxWidth:Ee}=g(q,"two-row-bottom"),ne=ae(de)-dn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ee),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:L.scalingValue(ne,i),width:L.scalingValue(dn,i),height:"100%",pointerEvents:"auto"}})},`${q.widthKey}-junction`)}),ce=()=>!o||x?null:r.jsxs(r.Fragment,{children:[te(),M()]}),ue=!!(t.title2||t.title3||($??0)>0||o),ye=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[ee||K?xe():null,ge?U("single-row"):null,K?fe(me(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Ie(),ce()]}),Le=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ue?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:ue?void 0:{flex:"0 0 auto",height:"auto"},children:_(t,!0)}),ce()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:E,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...x?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${x?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${x?` ${e}-text-bar-cell-stacked`:""}`,style:x?void 0:{flex:1,minWidth:0,width:"100%"},children:x?Le():ye()})})})]})}function Tm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Lm(e){return`
5854
+ `,Nr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Mm=["titleColor","subtitleColor","lightboxCounterColor"],km={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!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:{...Nr.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:{...Nr.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:{...Nr.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:"off",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:"b",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},t:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,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:.015625,subtitleLineHeight:.018229166666666668,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,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:[...Mm],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Pm={element:Lm,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:km,sourceCode:Em},Am=50,vs=10,Aa="cntrl-lightbox-journal",br=Aa,aa=`${Aa}-`,wr=e=>`${Aa}-${e}`,Wa=e=>e===br||e.startsWith(aa),xs=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},bs=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=xs(t.get(wr(e)));if(i)return i}const n=xs(t.get(br));if(n)return n;for(const[i]of t){if(!i.startsWith(aa))continue;const o=i.slice(aa.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},ws=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ol=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Wa(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(wr(t),String(e)):i.searchParams.set(br,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Wm=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===wr(e)||i===br:Wa(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)}},jl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(wr(e)):[...t.keys()].some(n=>Wa(n))},Fm=(e,t)=>{if(jl(t)){if(e){window.history.back();return}Wm(t)}},_m=20,Hm=2,Or=e=>`max(${e}, ${_m}px)`,Mi=e=>((e==null?void 0:e.image)??[]).slice(0,Hm),Bl=e=>e.reduce((t,n)=>t+Mi(n).length,0),Nm=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+Mi(s).length,1),i=Mi(e[t]).length;return{start:n,end:n+i-1}},Om=(e,t)=>{const n=Bl(e),{start:i,end:o}=Nm(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Uo=(e,t)=>t==="B"?e.flatMap((n,i)=>Mi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Mi(n)})),jm=(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 Om(i,o)},Ss=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Bm=(e,t,n)=>e==="B"?t.length>1:Bl(n)>1,mn=.004,zn=.004,Ti={title1Width:.13,title2Width:.13,title3Width:.14},Dn=(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},ki=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},co=(e,t)=>ki(e,t),an=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Vn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ki(e.length,n),effective:co(e.length,n)}},zl=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Dl=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Kn=["title1","title2","title3","count"],ze=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Fa={title1:"1",title2:"2",title3:"3",count:"Count"},_a=e=>[ze(e,"fontFamily"),ze(e,"fontSettings"),{type:"row",items:[ze(e,"fontSize"),ze(e,"lineHeight"),ze(e,"letterSpacing"),ze(e,"wordSpacing")]},ze(e,"textAlign"),ze(e,"textAppearance")],zm=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Kn.map(e=>[Fa[e],_a(e)]))}),Dm={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Vm={title1:.02,title2:.02,title3:.02,count:.017},li=(e,t)=>{const n=i=>{const o=ze(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[Dm[t]]}},ci=(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??Vm[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)};function Vl({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:v=0,title3MarginLeft:b=0,titleRowMarginBottom:S=0,titleHeaderLayout:y="desktop",contentMarginTop:w=0,iconMarginRight:C=0,closeIcon:L=null,closeIconMaxWidth:k=0,closeIconColor:A="#000000",closeIconHoverColor:O="#cccccc"}=n,P=E.scalingValue(w,i),D=E.scalingValue(C,i),R=E.scalingValue(S,i),x=y==="mobile",U=ci("title1",li(n,"title1"),i),h=ci("title2",li(n,"title2"),i),I=ci("title3",li(n,"title3"),i),W=a.useMemo(()=>({title1Width:d??Ti.title1Width,title2Width:c??Ti.title2Width,title3Width:u??Ti.title3Width}),[d,c,u]),V=a.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:b}),[v,b]),Y=a.useMemo(()=>Dn(e,t,U,h,I),[e,t,U,h,I]),ae=a.useMemo(()=>Y.map(Q=>W[Q.widthKey]),[Y,W]),Z=a.useMemo(()=>ki(Y.length,ae),[Y.length,ae]),G=a.useMemo(()=>co(Y.length,ae),[Y.length,ae]),H=a.useMemo(()=>Y.filter(Q=>Q.prefix==="title1"),[Y]),$=a.useMemo(()=>Y.filter(Q=>Q.prefix==="title2"||Q.prefix==="title3"),[Y]),M=a.useMemo(()=>Vn(H,W),[H,W]),q=a.useMemo(()=>Vn($,W),[$,W]),z=!!(t.title1||t.title2||t.title3),ee=L!==null;if(!(z||ee))return null;const ye=(m??0)>0||o,f=(Q,ge)=>{const Ae=Y.findIndex(j=>j.prefix===Q.prefix);if(!x||ge==="single-row")return{effectiveWidth:G[Ae]??0,resolvedWidth:Z[Ae]??0,maxWidth:an(Ae,Z)};if(ge==="two-row-top"){const j=H.findIndex(Oe=>Oe.prefix===Q.prefix);return{effectiveWidth:M.effective[j]??0,resolvedWidth:M.resolved[j]??0,maxWidth:an(j,M.resolved)}}const ie=$.findIndex(j=>j.prefix===Q.prefix);return{effectiveWidth:q.effective[ie]??0,resolvedWidth:q.resolved[ie]??0,maxWidth:an(ie,q.resolved)}},ve=(Q,ge,Ae)=>{if(!x||Ae==="single-row"){const et=Q.findIndex(De=>De.prefix===ge.prefix),Ye=Q.map(De=>W[De.widthKey]),at=ki(Q.length,Ye);return{effectiveWidth:co(Q.length,Ye)[et]??0,resolvedWidth:at[et]??0,maxWidth:an(et,at)}}if(Ae==="two-row-top"){const et=Q.filter(De=>De.prefix==="title1"),Ye=et.findIndex(De=>De.prefix===ge.prefix),{resolved:at,effective:mt}=Vn(et,W);return{effectiveWidth:mt[Ye]??0,resolvedWidth:at[Ye]??0,maxWidth:an(Ye,at)}}const ie=Q.filter(et=>et.prefix==="title2"||et.prefix==="title3"),j=ie.findIndex(et=>et.prefix===ge.prefix),{resolved:Oe,effective:Fe}=Vn(ie,W);return{effectiveWidth:Fe[j]??0,resolvedWidth:Oe[j]??0,maxWidth:an(j,Oe)}},K=Q=>Dl(Y,Z,V,Q)+(x?0:m??0),le=()=>x?0:m??0,$e=Q=>$.slice(0,Q).reduce((ge,Ae,ie)=>ge+(Ae.marginLeftKey?V[Ae.marginLeftKey]??0:0)+(q.resolved[ie]??0),0),oe=Q=>{const ge=$[Q];return $e(Q)+(ge.marginLeftKey?V[ge.marginLeftKey]??0:0)+(q.resolved[Q]??0)},fe=(Q,ge,Ae)=>{const ie=Q.marginLeftKey?V[Q.marginLeftKey]??0:0,{effectiveWidth:j,resolvedWidth:Oe,maxWidth:Fe}=Ae??f(Q,ge),et=Math.max(ie,zn),Ye=o&&ge==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":Q.prefix,style:{width:E.scalingValue(j,i),...ie>0?{marginLeft:E.scalingValue(ie,i)}:{}},children:[r.jsx("p",{className:Q.className,style:Q.style,children:Q.text}),Ye&&Q.marginLeftKey?r.jsx("div",{"data-controls":Q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:E.scalingValue(-ie,i),width:E.scalingValue(et,i),height:"100%",pointerEvents:"auto"}}):null,Ye?r.jsx("div",{"data-controls":Q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:E.scalingValue(-mn/2,i),width:E.scalingValue(mn,i),height:"100%",pointerEvents:"auto"}}):null]},Q.className)},X=(Q="two-row")=>{const ge=Y.findIndex(j=>j.prefix==="title1"),Ae=ge>=0?Z[ge]:W.title1Width,ie=Q==="two-row"&&o;return r.jsx("div",{...ie?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae)}:{},style:{width:E.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...ie?{pointerEvents:"auto"}:{}}})},be=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:U,"aria-hidden":"true",children:" "}),xe=Q=>{const ge=Dn(e,Q,U,h,I);return r.jsx(r.Fragment,{children:ge.map(Ae=>fe(Ae,"single-row",ve(ge,Ae,"single-row")))})},pe=Q=>{const ge=Dn(e,Q,U,h,I),Ae=ge.find(ie=>ie.prefix==="title1");return Ae?fe(Ae,"two-row-top",ve(ge,Ae,"two-row-top")):null},se=(Q,ge=!1)=>{const Ae=Dn(e,Q,U,h,I),ie=Ae.filter(Fe=>Fe.prefix==="title2"||Fe.prefix==="title3"),j=o&&ge;return ie.length>0||j||(S??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ie.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:ie.map(Fe=>fe(Fe,"two-row-bottom",ve(Ae,Fe,"two-row-bottom")))}),ge&&o?r.jsxs(r.Fragment,{children:[te(),ne()]}):null]}):null,(S??0)>0||j?r.jsx("div",{"data-controls":j?"titleRowMarginBottom":void 0,"data-controls-axis":j?"y":void 0,"data-controls-reverse":j?"":void 0,className:j?`${e}-control`:void 0,style:{height:R,width:"100%",flexShrink:0,pointerEvents:j?"auto":"none"}}):null]}):null},Re=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(k??0,i),height:E.scalingValue(k??0,i),marginRight:D,"--close-icon-hover-color":O},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Q=>{Q.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(fn,{url:L??"",fill:A,hoverFill:i&&!s?A:O,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:D,height:"100%",pointerEvents:"auto"}})]}),ke=()=>ee?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Re()}):null,we=Q=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:Q})}),Se=Q=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[ee||z?be():null,ye?X("two-row"):null,we(Q),ke()]}),B=(Q,ge=!1)=>r.jsxs(r.Fragment,{children:[Se(pe(Q)),se(Q,ge)]}),re=()=>{const Q=x?-1:Y.findIndex(ie=>ie.prefix==="title1"),ge=!x&&(o||(m??0)>0)?(()=>{const ie=m??0,j=Q>=0?Z[Q]:W.title1Width,Oe=Math.max(ie,zn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(j),style:{position:"absolute",top:0,left:0,width:E.scalingValue(Oe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ae=Y.flatMap((ie,j)=>{if(!ie.marginLeftKey)return[];const Oe=V[ie.marginLeftKey]??0,Fe=zl(Y,Z,V,j)+le(),et=Math.max(Oe,zn);return r.jsx("div",{"data-controls":ie.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Z[j]),style:{position:"absolute",top:0,left:E.scalingValue(Fe,i),width:E.scalingValue(et,i),height:"100%",pointerEvents:"auto"}},ie.marginLeftKey)});return ge?[ge,...Ae]:Ae},F=()=>Y.map((Q,ge)=>{const Ae=an(ge,Z),j=K(ge)-mn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:E.scalingValue(j,i),width:E.scalingValue(mn,i),height:"100%",pointerEvents:"auto"}})},`${Q.widthKey}-junction`)}),te=()=>$.flatMap((Q,ge)=>{if(!Q.marginLeftKey)return[];const Ae=V[Q.marginLeftKey]??0,ie=$e(ge),j=Math.max(Ae,zn),{resolvedWidth:Oe}=f(Q,"two-row-bottom");return r.jsx("div",{"data-controls":Q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:E.scalingValue(ie,i),width:E.scalingValue(j,i),height:"100%",pointerEvents:"auto"}},Q.marginLeftKey)}),ne=()=>$.map((Q,ge)=>{const{maxWidth:Ae}=f(Q,"two-row-bottom"),j=oe(ge)-mn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:E.scalingValue(j,i),width:E.scalingValue(mn,i),height:"100%",pointerEvents:"auto"}})},`${Q.widthKey}-junction`)}),ue=()=>!o||x?null:r.jsxs(r.Fragment,{children:[re(),F()]}),me=!!(t.title2||t.title3||(S??0)>0||o),he=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[ee||z?be():null,ye?X("single-row"):null,z?we(xe(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ke(),ue()]}),Le=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...me?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:me?void 0:{flex:"0 0 auto",height:"auto"},children:B(t,!0)}),ue()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:P,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...x?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${x?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${x?` ${e}-text-bar-cell-stacked`:""}`,style:x?void 0:{flex:1,minWidth:0,width:"100%"},children:x?Le():he()})})})]})}function Gm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function qm(e){return`
5881
5855
  .${e}-wrapper {
5882
5856
  display: grid;
5883
5857
  align-items: start;
5884
5858
  justify-content: center;
5885
- min-height: ${Tm(48)};
5859
+ min-height: ${Gm(48)};
5886
5860
  }
5887
5861
  .${e}-item {
5888
5862
  display: flex;
@@ -6208,7 +6182,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
6208
6182
  pointer-events: auto;
6209
6183
  flex-shrink: 0;
6210
6184
  }
6211
- `}const as={url:"",name:"",objectFit:"cover"},Sn=500,Bi=650,ln="cubic-bezier(0.22, 1, 0.36, 1)",Im=72,Rm=50,Em=1e4,Mm=650,Pm=500;function km(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,l=e.top-t.top;return`translate(${o}px, ${l}px) scale(${n}, ${i})`}function Il(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=qr(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Am(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Il(i,n):null}function Wm(e){return e.reduce((t,n,i)=>{const o=ba(n.gallery),s=wa(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return s.length===0||t.push({gridIndex:i,items:s,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Di(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function ss(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Di(e,i,n)}const Fm=.03;function Rl(e){return e.width*Fm}const Ir={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Io(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function ls(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function _m(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Kr(e,t,n){const i=e.getBoundingClientRect(),o=i.width,l=i.height,s=t/n,d=o/l;if(s>d){const u=o/s;return{width:o,height:u,left:i.left,top:i.top+(l-u)/2}}const c=l*s;return{width:c,height:l,left:i.left+(o-c)/2,top:i.top}}function Nm(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Kr(e,t.width,t.height)}function Hm(e,t){if(Hi(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Om(e){const t=new Set,n=[];for(const i of e){const o=ba(i.gallery),l=wa(o);for(const s of l)for(const d of[s.displayMedia,s.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function jm({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Hi(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Ri(e,t,n){const{width:i,height:o,top:l}=e,{left:s,width:d}=n,c=Rl(n);return t==="left"?{left:s+c-i,top:l,width:i,height:o}:{left:s+d-c,top:l,width:i,height:o}}function Ko(e,t,n){const i=Ri(e,t,n);return{...i,left:2*i.left-e.left}}function Bm(e,t,n){const{left:i,width:o}=n,l=Rl(n);return t==="left"?{left:i,top:e.top,width:l,height:e.height}:{left:i+o-l,top:e.top,width:l,height:e.height}}function El(e,t,n,i){const o=Ri(e,"left",i),l=Ri(e,"right",i),s=Ko(e,"left",i),d=Ko(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:l,end:e};case"left-adjacent":return{start:o,end:s};case"far-right":return{start:d,end:l};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:l};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:l,end:d};case"far-left":return{start:s,end:o};default:return{start:e,end:e}}}function zm(e,t,n,i){const{start:o,end:l}=El(e,t,n,i);return{x:l.left-o.left,y:l.top-o.top}}function Dm(e,t,n){const i=Ri(e,t,n),o=Ko(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ml(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 ba(e){if(!e)return;if(Ml(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??as,i??o??as]}]}function Vm(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function qm(e){const[t]=e.media;return t!=null&&t.url?t:null}function wa(e){if(!Array.isArray(e)||e.length===0)return[];if(Ml(e)){const t=[];for(const n of e){const i=Vm(n);if(!i)continue;const o=qm(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Hi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Gm({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Hi(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Km({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:l,onTransitionEnd:s}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:s,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:l,onClick:c=>c.stopPropagation(),style:o},e)})}function Ro({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Hi(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const l=o.currentTarget;l.videoWidth>0&&l.videoHeight>0&&(i==null||i(e.url,l.videoWidth,l.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const l=o.currentTarget;l.naturalWidth>0&&l.naturalHeight>0&&(i==null||i(e.url,l.naturalWidth,l.naturalHeight))},onTransitionEnd:n})}function Um({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:y,sourceRect:w,resolveCloseSourceRect:$,onClose:h,onPrev:v,onNext:S}){const T=a.useRef(null),R=a.useRef(null),P=a.useRef(null),H=a.useRef(new Map),[E,j]=a.useState(0),k=a.useRef(null),x=a.useRef(0),Y=a.useRef(0),f=a.useRef("none"),A=a.useRef(!1),W=a.useRef(!1),z=a.useRef(!1),G=a.useRef(null),le=a.useRef(null),J=a.useRef(null),D=a.useRef(()=>{}),N=a.useRef(null),C=a.useRef(null),I=a.useRef(null),V=a.useRef(!1),[K,ee]=a.useState(null),[O,ge]=a.useState(Ir),[g,he]=a.useState(0),[re,be]=a.useState("opening"),[ke,ae]=a.useState(0),[ve,U]=a.useState(0),[xe,me]=a.useState(!1),[pe,se]=a.useState(null),[Te,Ie]=a.useState(null),[fe,Se]=a.useState(null),[_,te]=a.useState(!1),[M,X]=a.useState(null),[Z,ce]=a.useState(!1),ue=a.useRef(!1),[ye,Le]=a.useState(!1),[q,de]=a.useState(!1),Ee=a.useRef(n),Q=a.useRef(void 0),ne=t[n],Fe=ne?Hi(ne):!1,We=ve!==0||xe,Ge=!s&&(!l||!!d),Ze=c&&!s,ct=u.length>1,pt=a.useCallback((ie,Ae)=>t.length<=1?null:t[(ie+Ae+t.length)%t.length]??null,[t]),Xe=ct?Di(u,m,-1):pt(n,-1),vt=ct?Di(u,m,1):pt(n,1),St=pe===-1&&We?ct&&Te!==null?Di(u,Te,-1):fe!==null?pt(fe,-1):null:null,et=pe===1&&We?ct&&Te!==null?Di(u,Te,1):fe!==null?pt(fe,1):null:null,Be=St&&St.url!==(Xe==null?void 0:Xe.url)?St:null,dt=et&&et.url!==(vt==null?void 0:vt.url)?et:null,mt=Xe&&Ze?(()=>{const ie=ct?ss(u,m,-1):t.length>2?pt((n-1+t.length)%t.length,-1):null;return ie&&ie.url!==Xe.url?ie:null})():null,ot=vt&&Ze?(()=>{const ie=ct?ss(u,m,1):t.length>2?pt((n+1)%t.length,1):null;return ie&&ie.url!==vt.url?ie:null})():null,Pt=Be??mt,Ht=dt??ot,tt=a.useCallback((ie,Ae,Ve)=>{if(!ie||!Ae||!Ve)return;const qe=H.current,bt=qe.get(ie);(bt==null?void 0:bt.width)===Ae&&(bt==null?void 0:bt.height)===Ve||(qe.set(ie,{width:Ae,height:Ve}),j(Kt=>Kt+1))},[]),At=a.useCallback(ie=>{if(!(ie!=null&&ie.url))return null;const Ae=H.current.get(ie.url);return Nm(R.current,Ae)},[E,g]),It=a.useCallback(()=>{if(!ne)return;const ie=At(ne);if(ie){ee(ie);return}const Ae=R.current;Ae&&ee(ls(Ae))},[ne,At]),ze=a.useCallback(ie=>{if(ct){const Ae=u.length;Ie((m+ie+Ae)%Ae),Se(null);return}t.length>1&&(Se((n+ie+t.length)%t.length),Ie(null))},[ct,u.length,m,t.length,n]),Qe=a.useCallback(ie=>{z.current=ie,me(ie)},[]),He=a.useCallback(()=>{G.current!==null&&(window.clearTimeout(G.current),G.current=null)},[]),st=a.useCallback(()=>{He(),G.current=window.setTimeout(()=>{He(),Qe(!1)},Bi+32)},[He,Qe]),$t=a.useCallback(()=>{const ie=T.current;if(!ie){ge({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ir.width,height:typeof window<"u"?window.innerHeight:Ir.height});return}const Ae=ie.getBoundingClientRect();ge({left:Ae.left,top:Ae.top,width:Ae.width,height:Ae.height})},[]),Ct=a.useCallback((ie,Ae)=>{if(We){if(ye&&!xe)return`translate(${ve}px, 0px)`;if(xe&&pe!==null){const Ve=At(ie);if(!Ve)return;const{x:qe,y:bt}=zm(Ve,Ae,pe,O);return`translate(${qe}px, ${bt}px)`}if(xe)return"translate(0px, 0px)"}},[We,ye,xe,ve,pe,O,At]),Zt=a.useCallback(()=>{const ie=le.current;le.current=null,He(),Qe(!1),se(null),Ie(null),Se(null),U(0),Le(!1),A.current=!1,Y.current=0,f.current="none",ie===-1?v():ie===1&&S()},[He,Qe,v,S]),an=a.useCallback(()=>{He(),G.current=window.setTimeout(()=>{le.current!==null&&Zt()},Bi+32)},[He,Zt]),sn=a.useCallback(()=>{He(),le.current=null,Qe(!1),se(null),Ie(null),Se(null),U(0),Le(!1),A.current=!1,Y.current=0,f.current="none"},[He,Qe]),ht=a.useCallback(ie=>{if(!(!Ze||!K)){if(z.current){if(le.current===ie){J.current=ie,Zt();return}sn()}He(),ze(ie),le.current=ie,se(ie),Qe(!0),an()}},[Ze,K,Zt,sn,He,ze,Qe,an]);D.current=ht;const jt=a.useCallback(()=>{N.current=null,V.current=!1,C.current!==null&&(window.clearInterval(C.current),C.current=null),I.current!==null&&(window.clearTimeout(I.current),I.current=null)},[]),Yt=a.useCallback(ie=>{C.current!==null&&window.clearInterval(C.current);const Ae=V.current?Pm:Mm;C.current=window.setInterval(()=>{D.current(ie)},Ae)},[]),qt=a.useCallback(ie=>{N.current!==ie&&(jt(),N.current=ie,V.current=!1,D.current(ie),Yt(ie),I.current=window.setTimeout(()=>{I.current=null,N.current===ie&&(V.current=!0,Yt(ie))},Em))},[jt,Yt]),Rt=a.useCallback(()=>{const ie=R.current;if(!ie)return;const Ae=ne==null?void 0:ne.url,Ve=Ae?H.current.get(Ae):void 0;if(Ve!=null&&Ve.width&&(Ve!=null&&Ve.height)){ee(Kr(ie,Ve.width,Ve.height));return}const qe=P.current;if(qe&&Ae&&(qe.src===Ae||qe.currentSrc===Ae)){const{width:Kt,height:gt}=_m(qe);if(Kt&&gt){tt(Ae,Kt,gt),ee(Kr(ie,Kt,gt));return}}const bt=ls(ie);!bt.width||!bt.height||ee(bt)},[ne==null?void 0:ne.url,tt]),Qt=a.useCallback(ie=>{if(P.current=ie,!!ie){if(ie instanceof HTMLVideoElement){ie.readyState>=1&&ie.videoWidth>0&&Rt();return}ie.complete&&ie.naturalWidth>0&&Rt()}},[Rt]),Ce=a.useCallback(()=>{$t(),Rt(),he(ie=>ie+1)},[$t,Rt]);a.useEffect(()=>{Ce();const ie=R.current,Ae=T.current,Ve=new ResizeObserver(()=>Ce());return ie&&Ve.observe(ie),Ae&&Ve.observe(Ae),window.addEventListener("resize",Ce),()=>{Ve.disconnect(),window.removeEventListener("resize",Ce)}},[Ce,n,y]),a.useLayoutEffect(()=>{if(!ne)return;const ie=P.current;if(ie){if(ie instanceof HTMLImageElement&&ie.complete&&ie.naturalWidth>0){Rt();return}ie instanceof HTMLVideoElement&&ie.readyState>=1&&ie.videoWidth>0&&Rt()}},[ne==null?void 0:ne.url,n,Rt]),a.useEffect(()=>{It()},[It,E]),a.useEffect(()=>{const ie=new Set,Ae=[],Ve=qe=>{!(qe!=null&&qe.url)||ie.has(qe.url)||(ie.add(qe.url),Ae.push(qe))};t.forEach(Ve),u.forEach(qe=>qe.items.forEach(Ve)),Ae.forEach(qe=>{H.current.has(qe.url)||Hm(qe,tt)})},[t,u,tt]),a.useEffect(()=>{if(re!=="opening"||!K)return;if(!w){be("open");return}te(!1);const ie=requestAnimationFrame(()=>{requestAnimationFrame(()=>{te(!0),be("open")})});return()=>cancelAnimationFrame(ie)},[re,K,w]),a.useEffect(()=>{if(re!=="closing")return;const ie=setTimeout(()=>h(),Sn);return()=>clearTimeout(ie)},[re,h]),a.useEffect(()=>()=>{He()},[He]),a.useLayoutEffect(()=>{Ee.current===n&&Q.current===(ne==null?void 0:ne.url)||(He(),le.current=null,se(null),Ie(null),Se(null),ae(0),U(0),Qe(!1),de(!1),Le(!1),x.current=0,Y.current=0,f.current="none",A.current=!1,k.current=null,W.current=!1,P.current=null,It(),Ee.current=n,Q.current=ne==null?void 0:ne.url)},[n,ne==null?void 0:ne.url,Qe,He,It]),a.useLayoutEffect(()=>{const ie=J.current;ie!==null&&(J.current=null,requestAnimationFrame(()=>{D.current(ie)}))},[n,m,ne==null?void 0:ne.url]),a.useLayoutEffect(()=>{if(re==="opening"){ue.current=!1,ce(!1);return}if(re!=="open"||ue.current)return;if(!Xe&&!vt){ue.current=!0;return}ce(!1);const ie=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(!0),ue.current=!0})});return()=>cancelAnimationFrame(ie)},[re,Xe==null?void 0:Xe.url,vt==null?void 0:vt.url]),a.useEffect(()=>{if(re!=="open")return;const ie=()=>{const gt=wt=>{wt.stopPropagation(),wt.preventDefault(),document.removeEventListener("click",gt,!0)};document.addEventListener("click",gt,!0)},Ae=gt=>{const wt=gt<0?1:-1;He(),ze(wt),le.current=wt,se(wt),Qe(!0),an()},Ve=gt=>{if(Math.abs(gt)>Rm&&Ze){Ae(gt);return}le.current=null,se(null),Ie(null),Se(null),Qe(!0),U(0),st()},qe=gt=>{if(gt.touches.length!==1||z.current)return;const wt=gt.touches[0];W.current=!0,k.current={x:wt.clientX,y:wt.clientY},f.current="none",Y.current=0,A.current=!1},bt=gt=>{if(!k.current||gt.touches.length!==1||z.current)return;const wt=gt.touches[0],tn=wt.clientX-k.current.x,Ot=wt.clientY-k.current.y;if(f.current==="none"){if(Math.abs(tn)<10&&Math.abs(Ot)<10)return;if(Math.abs(tn)>Math.abs(Ot)){if(!Ze)return;f.current="horizontal"}else if(Ot>0){if(!Ge)return;f.current="vertical"}else return}if(f.current==="horizontal"){A.current=!0,Le(!0),Y.current=tn,U(tn),gt.preventDefault();return}f.current==="vertical"&&(A.current=!0,Le(!0),x.current=Ot,ae(Ot),gt.preventDefault())},Kt=()=>{if(!k.current)return;const gt=f.current,wt=A.current;if(wt&&gt==="horizontal")Ve(Y.current),ie();else if(wt&&gt==="vertical"){const tn=x.current;if(Ge&&tn>Im){const Ot=window.innerHeight;x.current=Ot,de(!0),ae(Ot),be("closing")}else x.current=0,ae(0);ie()}else gt==="horizontal"&&Math.abs(Y.current)>0&&(Ve(Y.current),ie());k.current=null,f.current="none",Y.current=0,A.current=!1,Le(!1)};return document.addEventListener("touchstart",qe,{passive:!0}),document.addEventListener("touchmove",bt,{passive:!1}),document.addEventListener("touchend",Kt),document.addEventListener("touchcancel",Kt),()=>{document.removeEventListener("touchstart",qe),document.removeEventListener("touchmove",bt),document.removeEventListener("touchend",Kt),document.removeEventListener("touchcancel",Kt)}},[re,Ze,Qe,st,He,Ge,an,ze]);const _e=a.useCallback(()=>{const ie=($==null?void 0:$())??w??null;ie&&K&&(X(ie),te(!0)),be("closing")},[$,w,K]);a.useEffect(()=>{const ie=qe=>{if(qe.key==="Escape"){if(l&&d||re==="closing")return;jt(),_e();return}if(qe.key!=="ArrowLeft"&&qe.key!=="ArrowRight"||re!=="open"||!Ze)return;qe.preventDefault();const bt=qe.key==="ArrowLeft"?-1:1;qe.repeat&&N.current===bt||qt(bt)},Ae=qe=>{if(qe.key!=="ArrowLeft"&&qe.key!=="ArrowRight")return;const bt=qe.key==="ArrowLeft"?-1:1;N.current===bt&&jt()},Ve=()=>{jt()};return window.addEventListener("keydown",ie),window.addEventListener("keyup",Ae),window.addEventListener("blur",Ve),()=>{window.removeEventListener("keydown",ie),window.removeEventListener("keyup",Ae),window.removeEventListener("blur",Ve),jt()}},[re,l,d,_e,Ze,qt,jt]),a.useEffect(()=>{re!=="open"&&jt()},[re,jt]);const De=()=>{re==="closing"||s||_e()},Oe=re==="open",Ne=re==="closing",rt=ke>0?Math.max(0,1-ke/500):1,Me=ke>0?Math.max(.35,1-ke/500):1,Ye=a.useCallback(ie=>{if(!(ie.propertyName!=="transform"||!z.current)){if(le.current!==null){Zt();return}He(),Qe(!1)}},[He,Qe,Zt]),Ke=re==="closing"?M??w:w,Et=Ke&&K&&(re==="opening"||Ne)?km(Ke,K):void 0,xt=We&&ne?Ct(ne,"center"):ke>0?`translateY(${ke}px)`:Et,ft=K?Io(K,O):null,Wt=!!(Ke&&K),Tt=Wt&&(re==="closing"||re==="open"&&_),Bt={position:"absolute",top:ft==null?void 0:ft.top,left:ft==null?void 0:ft.left,width:ft==null?void 0:ft.width,height:ft==null?void 0:ft.height,objectFit:"contain",transformOrigin:"top left",transform:xt,opacity:ke>0?Me:Wt?1:re==="opening"||Ne?0:1,transition:ye&&!xe?"none":xe?`transform ${Bi}ms ${ln}`:q?`transform ${Sn}ms ${ln}, opacity ${Sn}ms ${ln}`:Tt?`transform ${Sn}ms ${ln}`:re==="opening"||Ne?`opacity ${Sn}ms ${ln}`:"none",pointerEvents:Fe&&Oe&&!We?"auto":"none",touchAction:Fe&&Oe?"none":void 0,zIndex:1,overflow:Fe?"hidden":void 0},Ft={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Oe&&!We?"auto":"none"},kt=(ie,Ae,Ve="adjacent")=>{const qe=At(ie);if(!qe)return{display:"none"};const bt=Ve==="far"?Ae==="left"?"far-left":"far-right":Ae==="left"?"left-adjacent":"right-adjacent",{start:Kt}=pe!==null?El(qe,bt,pe,O):{start:Ve==="far"?Ko(qe,Ae,O):Ri(qe,Ae,O)},gt=Io(Kt,O),wt=Ct(ie,bt),tn=!We&&Ve==="adjacent"&&Oe&&!Z?Dm(qe,Ae,O):null,Ot=Ve==="far"&&We&&pe===(Ae==="left"?-1:1),fn=ye&&!xe?!1:xe,bn=Ve==="adjacent"&&Oe&&Z&&!We;return{position:"absolute",top:gt.top,left:gt.left,width:gt.width,height:gt.height,objectFit:"contain",transform:wt??(tn?`translate(${tn.x}px, ${tn.y}px)`:void 0),opacity:Ve==="far"?Oe&&Ot?1:0:Oe?1:0,transition:fn?Ve==="far"?`transform ${Bi}ms ${ln}`:`transform ${Bi}ms ${ln}, opacity ${Sn}ms ${ln}`:bn?`transform ${Sn}ms ${ln}`:re==="opening"||Ne?`opacity ${Sn}ms ${ln}`:"none",pointerEvents:"none",zIndex:1}},en=(ie,Ae)=>{const Ve=At(ie);return Ve?Bm(Ri(Ve,Ae,O),Ae,O):null},yt=ie=>Ae=>{if(!s){if(W.current){W.current=!1;return}Ae.stopPropagation(),ht(ie)}},zt=Xe?en(Xe,"left"):null,at=vt?en(vt,"right"):null,_t=zt?Io(zt,O):null,Gt=at?Io(at,O):null;return r.jsxs("div",{ref:T,className:[`${e}-lightbox`,l?`${e}-lightbox-editor`:"",s?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:re==="open"?"none":void 0},onClick:De,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Oe?rt:0,transition:ye?"none":`opacity ${Sn}ms ${ln}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},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:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Oe?1:0,transition:ye?"none":`opacity ${Sn}ms ${ln}`,pointerEvents:"none"},children:r.jsx(Cm,{prefix:e,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,onClose:De})})]}),Oe&&Pt&&r.jsx(Ro,{media:Pt,style:kt(Pt,"left","far"),onMeasure:tt,onTransitionEnd:Ye},`far-prev-${Pt.url}`),Oe&&Xe&&r.jsxs(r.Fragment,{children:[r.jsx(Ro,{media:Xe,style:kt(Xe,"left"),onMeasure:tt,onTransitionEnd:Ye},`prev-${Xe.url}`),_t&&r.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:s||ye?"default":"pointer",pointerEvents:s||ye?"none":"auto",zIndex:3},onClick:yt(-1)})]}),Oe&&vt&&r.jsxs(r.Fragment,{children:[r.jsx(Ro,{media:vt,style:kt(vt,"right"),onMeasure:tt,onTransitionEnd:Ye},`next-${vt.url}`),Gt&&r.jsx("div",{style:{position:"absolute",top:Gt.top,left:Gt.left,width:Gt.width,height:Gt.height,cursor:s||ye?"default":"pointer",pointerEvents:s||ye?"none":"auto",zIndex:3},onClick:yt(1)})]}),Oe&&Ht&&r.jsx(Ro,{media:Ht,style:kt(Ht,"right","far"),onMeasure:tt,onTransitionEnd:Ye},`far-next-${Ht.url}`),K&&ne&&(Fe?r.jsx(Km,{src:ne.url,phase:re,onMediaElement:Qt,wrapperStyle:Bt,videoStyle:Ft,onLoadedMetadata:Rt,onTransitionEnd:Ye},`${n}-${ne.url}`):r.jsx("img",{ref:Qt,src:ne.url,alt:ne.name,onLoad:Rt,onTransitionEnd:Ye,style:Bt},`${n}-${ne.url}`))]})}function Xm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:l,portalId:s}){const{prefix:d}=L.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:y}=e,w=(y==null?void 0:y.display)==="cover",$=(y==null?void 0:y.ratioValue)??"1:1",h=(y==null?void 0:y.reversed)??!1,[v,S]=$.split(":").map(Number),P=`${h?S:v} / ${h?v:S}`,H=c.entryWidth??.2,E=c.columnsCount,j=L.scalingValue(H,n),k=L.scalingValue(c.horizontalGap??0,n),x=j,Y=j,f={width:x,...w?{aspectRatio:P,height:"auto",overflow:"hidden"}:{height:"auto"}},A=w?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},W=a.useRef(null),[z,G]=a.useState(!1),[le,J]=a.useState([]),[D,N]=a.useState(0),[C,I]=a.useState(0),[V,K]=a.useState(null),[ee,O]=a.useState({title1:"",title2:"",title3:""}),ge=(()=>{const fe={},Se=W.current?getComputedStyle(W.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(fe["--cntrl-article-width"]=Se),fe})(),g=!n||i||o,he=a.useMemo(()=>Lm(d),[d]),re=t??[],be=re.length%E||E,ke=be<E&&re.length>0,ae=re.length-be,ve=ke?Math.floor((E-be)/2)+1:1,U=a.useMemo(()=>Wm(re),[re]),xe=a.useMemo(()=>Om(re),[re]),me=(fe,Se,_)=>{if(n&&!o&&!i)return;const te=U.findIndex(X=>X.gridIndex===fe);if(te<0)return;const M=U[te];I(te),J(M.items),N(Se),O(M.entry),K(_??null),G(!0)},pe=a.useCallback(()=>{G(!1),K(null)},[]),se=a.useCallback(()=>{const fe=U[C];return!fe||!W.current?V:Am(W.current,fe.gridIndex,w?"cover":"contain")??V},[U,C,V,w]),Te=a.useCallback(fe=>{if(U.length>1){const Se=U.length,_=(C+fe+Se)%Se,te=U[_],M=Math.min(D,te.items.length-1);I(_),J(te.items),N(M),O(te.entry);return}N(Se=>(Se+fe+le.length)%le.length)},[U,C,D,le.length]),Ie=U.length>1||le.length>1;return a.useEffect(()=>{if(!z||typeof document>"u")return;const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=fe}},[z]),a.useEffect(()=>{!n||o||i||G(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:he}}),r.jsx(jm,{mediaList:xe}),r.jsx("div",{ref:W,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${E}, ${j})`,rowGap:0,columnGap:k,width:L.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:L.scalingValue(u??0,n)},children:re.map((fe,Se)=>{const _=ba(fe.gallery),te=wa(_),M=te.filter(Le=>Le.lightboxMedia).map(Le=>Le.lightboxMedia),X=Math.floor(Se/E)===Math.ceil(re.length/E)-1,Z=ke&&Se>=ae?`${ve+(Se-ae)}`:void 0,ce=te[0],ue=ce!=null&&ce.lightboxMedia?M.findIndex(Le=>Le.url===ce.lightboxMedia.url):-1,ye=r.jsx("div",{className:`${d}-item-image-wrapper`,style:f,children:te.length>0&&r.jsx(Gm,{media:ce.displayMedia,gridIndex:Se,className:`${d}-item-${Hi(ce.displayMedia)?"video":"image"}`.trim(),style:A,onMediaClick:g&&ue>=0?Le=>me(Se,ue,Il(Le.currentTarget,w?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,X?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:j,...Z?{gridColumn:Z}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:Y}})}),r.jsx("a",{className:`${d}-item-image-link`,children:ye}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:Y}})})]})},Se)})}),z&&typeof document<"u"&&(()=>{const fe=(s?document.getElementById(s):null)??document.body;return Wi.createPortal(r.jsx("div",{style:ge,"data-selection":"none",children:r.jsx(Um,{prefix:d,items:le,index:D,entry:ee,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Ie,lightboxEntries:U,entryIdx:C,layoutId:l,sourceRect:V,resolveCloseSourceRect:se,onClose:pe,onPrev:()=>Te(-1),onNext:()=>Te(1)})}),fe)})()]})}const Ym=`import { CommonComponentProps } from '../props';
6185
+ `}const $s={url:"",name:"",objectFit:"cover"},$n=500,qi=650,dn="cubic-bezier(0.22, 1, 0.36, 1)",Km=72,Um=50,Xm=1e4,Ym=650,Jm=500;function Zm(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function Gl(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ir(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Qm(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Gl(i,n):null}function eg(e){return e.reduce((t,n,i)=>{const o=Ha(n.gallery),l=Na(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Xi(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Cs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Xi(e,i,n)}const tg=.03;function ql(e){return e.width*tg}const jr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Wo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Ts(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function ng(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function sa(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function ig(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:sa(e,t.width,t.height)}function og(e,t){if(Di(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function rg(e){const t=new Set,n=[];for(const i of e){const o=Ha(i.gallery),s=Na(o);for(const l of s)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function ag({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Di(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Pi(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=ql(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function or(e,t,n){const i=Pi(e,t,n);return{...i,left:2*i.left-e.left}}function sg(e,t,n){const{left:i,width:o}=n,s=ql(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function Kl(e,t,n,i){const o=Pi(e,"left",i),s=Pi(e,"right",i),l=or(e,"left",i),d=or(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function lg(e,t,n,i){const{start:o,end:s}=Kl(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function cg(e,t,n){const i=Pi(e,t,n),o=or(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ul(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 Ha(e){if(!e)return;if(Ul(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??$s,i??o??$s]}]}function dg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function ug(e){const[t]=e.media;return t!=null&&t.url?t:null}function Na(e){if(!Array.isArray(e)||e.length===0)return[];if(Ul(e)){const t=[];for(const n of e){const i=dg(n);if(!i)continue;const o=ug(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Di(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function pg({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Di(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function mg({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function Fo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Di(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function gg({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:v,sourceRect:b,resolveCloseSourceRect:S,onClose:y,onPrev:w,onNext:C}){const L=a.useRef(null),k=a.useRef(null),A=a.useRef(null),O=a.useRef(new Map),[P,D]=a.useState(0),R=a.useRef(null),x=a.useRef(0),U=a.useRef(0),h=a.useRef("none"),I=a.useRef(!1),W=a.useRef(!1),V=a.useRef(!1),Y=a.useRef(null),ae=a.useRef(null),Z=a.useRef(null),G=a.useRef(()=>{}),H=a.useRef(null),$=a.useRef(null),M=a.useRef(null),q=a.useRef(!1),[z,ee]=a.useState(null),[_,ye]=a.useState(jr),[f,ve]=a.useState(0),[K,le]=a.useState("opening"),[$e,oe]=a.useState(0),[fe,X]=a.useState(0),[be,xe]=a.useState(!1),[pe,se]=a.useState(null),[Re,ke]=a.useState(null),[we,Se]=a.useState(null),[B,re]=a.useState(!1),[F,te]=a.useState(null),[ne,ue]=a.useState(!1),me=a.useRef(!1),[he,Le]=a.useState(!1),[Q,ge]=a.useState(!1),Ae=a.useRef(n),ie=a.useRef(void 0),j=t[n],Oe=j?Di(j):!1,Fe=fe!==0||be,et=!l&&(!s||!!d),Ye=c&&!l,at=u.length>1,mt=a.useCallback((g,ce)=>t.length<=1?null:t[(g+ce+t.length)%t.length]??null,[t]),De=at?Xi(u,m,-1):mt(n,-1),it=at?Xi(u,m,1):mt(n,1),$t=pe===-1&&Fe?at&&Re!==null?Xi(u,Re,-1):we!==null?mt(we,-1):null:null,ot=pe===1&&Fe?at&&Re!==null?Xi(u,Re,1):we!==null?mt(we,1):null:null,Ue=$t&&$t.url!==(De==null?void 0:De.url)?$t:null,ht=ot&&ot.url!==(it==null?void 0:it.url)?ot:null,xt=De&&Ye?(()=>{const g=at?Cs(u,m,-1):t.length>2?mt((n-1+t.length)%t.length,-1):null;return g&&g.url!==De.url?g:null})():null,ct=it&&Ye?(()=>{const g=at?Cs(u,m,1):t.length>2?mt((n+1)%t.length,1):null;return g&&g.url!==it.url?g:null})():null,Mt=Ue??xt,_t=ht??ct,Qe=a.useCallback((g,ce,Ee)=>{if(!g||!ce||!Ee)return;const Ie=O.current,Je=Ie.get(g);(Je==null?void 0:Je.width)===ce&&(Je==null?void 0:Je.height)===Ee||(Ie.set(g,{width:ce,height:Ee}),D(Et=>Et+1))},[]),Tt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const ce=O.current.get(g.url);return ig(k.current,ce)},[P,f]),Lt=a.useCallback(()=>{if(!j)return;const g=Tt(j);if(g){ee(g);return}const ce=k.current;ce&&ee(Ts(ce))},[j,Tt]),Ge=a.useCallback(g=>{if(at){const ce=u.length;ke((m+g+ce)%ce),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),ke(null))},[at,u.length,m,t.length,n]),qe=a.useCallback(g=>{V.current=g,xe(g)},[]),Pe=a.useCallback(()=>{Y.current!==null&&(window.clearTimeout(Y.current),Y.current=null)},[]),gt=a.useCallback(()=>{Pe(),Y.current=window.setTimeout(()=>{Pe(),qe(!1)},qi+32)},[Pe,qe]),It=a.useCallback(()=>{const g=L.current;if(!g){ye({left:0,top:0,width:typeof window<"u"?window.innerWidth:jr.width,height:typeof window<"u"?window.innerHeight:jr.height});return}const ce=g.getBoundingClientRect();ye({left:ce.left,top:ce.top,width:ce.width,height:ce.height})},[]),kt=a.useCallback((g,ce)=>{if(Fe){if(he&&!be)return`translate(${fe}px, 0px)`;if(be&&pe!==null){const Ee=Tt(g);if(!Ee)return;const{x:Ie,y:Je}=lg(Ee,ce,pe,_);return`translate(${Ie}px, ${Je}px)`}if(be)return"translate(0px, 0px)"}},[Fe,he,be,fe,pe,_,Tt]),Dt=a.useCallback(()=>{const g=ae.current;ae.current=null,Pe(),qe(!1),se(null),ke(null),Se(null),X(0),Le(!1),I.current=!1,U.current=0,h.current="none",g===-1?w():g===1&&C()},[Pe,qe,w,C]),en=a.useCallback(()=>{Pe(),Y.current=window.setTimeout(()=>{ae.current!==null&&Dt()},qi+32)},[Pe,Dt]),on=a.useCallback(()=>{Pe(),ae.current=null,qe(!1),se(null),ke(null),Se(null),X(0),Le(!1),I.current=!1,U.current=0,h.current="none"},[Pe,qe]),bt=a.useCallback(g=>{if(!(!Ye||!z)){if(V.current){if(ae.current===g){Z.current=g,Dt();return}on()}Pe(),Ge(g),ae.current=g,se(g),qe(!0),en()}},[Ye,z,Dt,on,Pe,Ge,qe,en]);G.current=bt;const Rt=a.useCallback(()=>{H.current=null,q.current=!1,$.current!==null&&(window.clearInterval($.current),$.current=null),M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),Ut=a.useCallback(g=>{$.current!==null&&window.clearInterval($.current);const ce=q.current?Jm:Ym;$.current=window.setInterval(()=>{G.current(g)},ce)},[]),Kt=a.useCallback(g=>{H.current!==g&&(Rt(),H.current=g,q.current=!1,G.current(g),Ut(g),M.current=window.setTimeout(()=>{M.current=null,H.current===g&&(q.current=!0,Ut(g))},Xm))},[Rt,Ut]),ft=a.useCallback(()=>{const g=k.current;if(!g)return;const ce=j==null?void 0:j.url,Ee=ce?O.current.get(ce):void 0;if(Ee!=null&&Ee.width&&(Ee!=null&&Ee.height)){ee(sa(g,Ee.width,Ee.height));return}const Ie=A.current;if(Ie&&ce&&(Ie.src===ce||Ie.currentSrc===ce)){const{width:Et,height:Ve}=ng(Ie);if(Et&&Ve){Qe(ce,Et,Ve),ee(sa(g,Et,Ve));return}}const Je=Ts(g);!Je.width||!Je.height||ee(Je)},[j==null?void 0:j.url,Qe]),Jt=a.useCallback(g=>{if(A.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&ft();return}g.complete&&g.naturalWidth>0&&ft()}},[ft]),Ce=a.useCallback(()=>{It(),ft(),ve(g=>g+1)},[It,ft]);a.useEffect(()=>{Ce();const g=k.current,ce=L.current,Ee=new ResizeObserver(()=>Ce());return g&&Ee.observe(g),ce&&Ee.observe(ce),window.addEventListener("resize",Ce),()=>{Ee.disconnect(),window.removeEventListener("resize",Ce)}},[Ce,n,v]),a.useLayoutEffect(()=>{if(!j)return;const g=A.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){ft();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&ft()}},[j==null?void 0:j.url,n,ft]),a.useEffect(()=>{Lt()},[Lt,P]),a.useEffect(()=>{const g=new Set,ce=[],Ee=Ie=>{!(Ie!=null&&Ie.url)||g.has(Ie.url)||(g.add(Ie.url),ce.push(Ie))};t.forEach(Ee),u.forEach(Ie=>Ie.items.forEach(Ee)),ce.forEach(Ie=>{O.current.has(Ie.url)||og(Ie,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(K!=="opening"||!z)return;if(!b){le("open");return}re(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{re(!0),le("open")})});return()=>cancelAnimationFrame(g)},[K,z,b]),a.useEffect(()=>{if(K!=="closing")return;const g=setTimeout(()=>y(),$n);return()=>clearTimeout(g)},[K,y]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{Ae.current===n&&ie.current===(j==null?void 0:j.url)||(Pe(),ae.current=null,se(null),ke(null),Se(null),oe(0),X(0),qe(!1),ge(!1),Le(!1),x.current=0,U.current=0,h.current="none",I.current=!1,R.current=null,W.current=!1,A.current=null,Lt(),Ae.current=n,ie.current=j==null?void 0:j.url)},[n,j==null?void 0:j.url,qe,Pe,Lt]),a.useLayoutEffect(()=>{const g=Z.current;g!==null&&(Z.current=null,requestAnimationFrame(()=>{G.current(g)}))},[n,m,j==null?void 0:j.url]),a.useLayoutEffect(()=>{if(K==="opening"){me.current=!1,ue(!1);return}if(K!=="open"||me.current)return;if(!De&&!it){me.current=!0;return}ue(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ue(!0),me.current=!0})});return()=>cancelAnimationFrame(g)},[K,De==null?void 0:De.url,it==null?void 0:it.url]),a.useEffect(()=>{if(K!=="open")return;const g=()=>{const Ve=nt=>{nt.stopPropagation(),nt.preventDefault(),document.removeEventListener("click",Ve,!0)};document.addEventListener("click",Ve,!0)},ce=Ve=>{const nt=Ve<0?1:-1;Pe(),Ge(nt),ae.current=nt,se(nt),qe(!0),en()},Ee=Ve=>{if(Math.abs(Ve)>Um&&Ye){ce(Ve);return}ae.current=null,se(null),ke(null),Se(null),qe(!0),X(0),gt()},Ie=Ve=>{if(Ve.touches.length!==1||V.current)return;const nt=Ve.touches[0];W.current=!0,R.current={x:nt.clientX,y:nt.clientY},h.current="none",U.current=0,I.current=!1},Je=Ve=>{if(!R.current||Ve.touches.length!==1||V.current)return;const nt=Ve.touches[0],Ot=nt.clientX-R.current.x,St=nt.clientY-R.current.y;if(h.current==="none"){if(Math.abs(Ot)<10&&Math.abs(St)<10)return;if(Math.abs(Ot)>Math.abs(St)){if(!Ye)return;h.current="horizontal"}else if(St>0){if(!et)return;h.current="vertical"}else return}if(h.current==="horizontal"){I.current=!0,Le(!0),U.current=Ot,X(Ot),Ve.preventDefault();return}h.current==="vertical"&&(I.current=!0,Le(!0),x.current=St,oe(St),Ve.preventDefault())},Et=()=>{if(!R.current)return;const Ve=h.current,nt=I.current;if(nt&&Ve==="horizontal")Ee(U.current),g();else if(nt&&Ve==="vertical"){const Ot=x.current;if(et&&Ot>Km){const St=window.innerHeight;x.current=St,ge(!0),oe(St),le("closing")}else x.current=0,oe(0);g()}else Ve==="horizontal"&&Math.abs(U.current)>0&&(Ee(U.current),g());R.current=null,h.current="none",U.current=0,I.current=!1,Le(!1)};return document.addEventListener("touchstart",Ie,{passive:!0}),document.addEventListener("touchmove",Je,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Ie),document.removeEventListener("touchmove",Je),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[K,Ye,qe,gt,Pe,et,en,Ge]);const je=a.useCallback(()=>{const g=(S==null?void 0:S())??b??null;g&&z&&(te(g),re(!0)),le("closing")},[S,b,z]);a.useEffect(()=>{const g=Ie=>{if(Ie.key==="Escape"){if(s&&d||K==="closing")return;Rt(),je();return}if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight"||K!=="open"||!Ye)return;Ie.preventDefault();const Je=Ie.key==="ArrowLeft"?-1:1;Ie.repeat&&H.current===Je||Kt(Je)},ce=Ie=>{if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight")return;const Je=Ie.key==="ArrowLeft"?-1:1;H.current===Je&&Rt()},Ee=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",ce),window.addEventListener("blur",Ee),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",ce),window.removeEventListener("blur",Ee),Rt()}},[K,s,d,je,Ye,Kt,Rt]),a.useEffect(()=>{K!=="open"&&Rt()},[K,Rt]);const Ke=()=>{K==="closing"||l||je()},He=K==="open",Be=K==="closing",dt=$e>0?Math.max(0,1-$e/500):1,_e=$e>0?Math.max(.35,1-$e/500):1,Ze=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!V.current)){if(ae.current!==null){Dt();return}Pe(),qe(!1)}},[Pe,qe,Dt]),tt=K==="closing"?F??b:b,Ft=tt&&z&&(K==="opening"||Be)?Zm(tt,z):void 0,Ct=Fe&&j?kt(j,"center"):$e>0?`translateY(${$e}px)`:Ft,st=z?Wo(z,_):null,Ht=!!(tt&&z),At=Ht&&(K==="closing"||K==="open"&&B),Vt={position:"absolute",top:st==null?void 0:st.top,left:st==null?void 0:st.left,width:st==null?void 0:st.width,height:st==null?void 0:st.height,objectFit:"contain",transformOrigin:"top left",transform:Ct,opacity:$e>0?_e:Ht?1:K==="opening"||Be?0:1,transition:he&&!be?"none":be?`transform ${qi}ms ${dn}`:Q?`transform ${$n}ms ${dn}, opacity ${$n}ms ${dn}`:At?`transform ${$n}ms ${dn}`:K==="opening"||Be?`opacity ${$n}ms ${dn}`:"none",pointerEvents:Oe&&He&&!Fe?"auto":"none",touchAction:Oe&&He?"none":void 0,zIndex:1,overflow:Oe?"hidden":void 0},Bt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:He&&!Fe?"auto":"none"},Pt=(g,ce,Ee="adjacent")=>{const Ie=Tt(g);if(!Ie)return{display:"none"};const Je=Ee==="far"?ce==="left"?"far-left":"far-right":ce==="left"?"left-adjacent":"right-adjacent",{start:Et}=pe!==null?Kl(Ie,Je,pe,_):{start:Ee==="far"?or(Ie,ce,_):Pi(Ie,ce,_)},Ve=Wo(Et,_),nt=kt(g,Je),Ot=!Fe&&Ee==="adjacent"&&He&&!ne?cg(Ie,ce,_):null,St=Ee==="far"&&Fe&&pe===(ce==="left"?-1:1),ln=he&&!be?!1:be,cn=Ee==="adjacent"&&He&&ne&&!Fe;return{position:"absolute",top:Ve.top,left:Ve.left,width:Ve.width,height:Ve.height,objectFit:"contain",transform:nt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Ee==="far"?He&&St?1:0:He?1:0,transition:ln?Ee==="far"?`transform ${qi}ms ${dn}`:`transform ${qi}ms ${dn}, opacity ${$n}ms ${dn}`:cn?`transform ${$n}ms ${dn}`:K==="opening"||Be?`opacity ${$n}ms ${dn}`:"none",pointerEvents:"none",zIndex:1}},Zt=(g,ce)=>{const Ee=Tt(g);return Ee?sg(Pi(Ee,ce,_),ce,_):null},wt=g=>ce=>{if(!l){if(W.current){W.current=!1;return}ce.stopPropagation(),bt(g)}},Gt=De?Zt(De,"left"):null,ut=it?Zt(it,"right"):null,Wt=Gt?Wo(Gt,_):null,zt=ut?Wo(ut,_):null;return r.jsxs("div",{ref:L,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:K==="open"?"none":void 0},onClick:Ke,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:He?dt:0,transition:he?"none":`opacity ${$n}ms ${dn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},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:k,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:He?1:0,transition:he?"none":`opacity ${$n}ms ${dn}`,pointerEvents:"none"},children:r.jsx(Vl,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Ke})})]}),He&&Mt&&r.jsx(Fo,{media:Mt,style:Pt(Mt,"left","far"),onMeasure:Qe,onTransitionEnd:Ze},`far-prev-${Mt.url}`),He&&De&&r.jsxs(r.Fragment,{children:[r.jsx(Fo,{media:De,style:Pt(De,"left"),onMeasure:Qe,onTransitionEnd:Ze},`prev-${De.url}`),Wt&&r.jsx("div",{style:{position:"absolute",top:Wt.top,left:Wt.left,width:Wt.width,height:Wt.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:wt(-1)})]}),He&&it&&r.jsxs(r.Fragment,{children:[r.jsx(Fo,{media:it,style:Pt(it,"right"),onMeasure:Qe,onTransitionEnd:Ze},`next-${it.url}`),zt&&r.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:wt(1)})]}),He&&_t&&r.jsx(Fo,{media:_t,style:Pt(_t,"right","far"),onMeasure:Qe,onTransitionEnd:Ze},`far-next-${_t.url}`),z&&j&&(Oe?r.jsx(mg,{src:j.url,phase:K,onMediaElement:Jt,wrapperStyle:Vt,videoStyle:Bt,onLoadedMetadata:ft,onTransitionEnd:Ze},`${n}-${j.url}`):r.jsx("img",{ref:Jt,src:j.url,alt:j.name,onLoad:ft,onTransitionEnd:Ze,style:Vt},`${n}-${j.url}`))]})}function hg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=E.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:v}=e,b=(v==null?void 0:v.display)==="cover",S=(v==null?void 0:v.ratioValue)??"1:1",y=(v==null?void 0:v.reversed)??!1,[w,C]=S.split(":").map(Number),A=`${y?C:w} / ${y?w:C}`,O=c.entryWidth??.2,P=c.columnsCount,D=E.scalingValue(O,n),R=E.scalingValue(c.horizontalGap??0,n),x=D,U=D,h={width:x,...b?{aspectRatio:A,height:"auto",overflow:"hidden"}:{height:"auto"}},I=b?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},W=a.useRef(null),[V,Y]=a.useState(!1),[ae,Z]=a.useState([]),[G,H]=a.useState(0),[$,M]=a.useState(0),[q,z]=a.useState(null),[ee,_]=a.useState({title1:"",title2:"",title3:""}),ye=(()=>{const we={},Se=W.current?getComputedStyle(W.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(we["--cntrl-article-width"]=Se),we})(),f=!n||i||o,ve=a.useMemo(()=>qm(d),[d]),K=t??[],le=K.length%P||P,$e=le<P&&K.length>0,oe=K.length-le,fe=$e?Math.floor((P-le)/2)+1:1,X=a.useMemo(()=>eg(K),[K]),be=a.useMemo(()=>rg(K),[K]),xe=(we,Se,B)=>{if(n&&!o&&!i)return;const re=X.findIndex(te=>te.gridIndex===we);if(re<0)return;const F=X[re];M(re),Z(F.items),H(Se),_(F.entry),z(B??null),Y(!0)},pe=a.useCallback(()=>{Y(!1),z(null)},[]),se=a.useCallback(()=>{const we=X[$];return!we||!W.current?q:Qm(W.current,we.gridIndex,b?"cover":"contain")??q},[X,$,q,b]),Re=a.useCallback(we=>{if(X.length>1){const Se=X.length,B=($+we+Se)%Se,re=X[B],F=Math.min(G,re.items.length-1);M(B),Z(re.items),H(F),_(re.entry);return}H(Se=>(Se+we+ae.length)%ae.length)},[X,$,G,ae.length]),ke=X.length>1||ae.length>1;return a.useEffect(()=>{if(!V||typeof document>"u")return;const we=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=we}},[V]),a.useEffect(()=>{!n||o||i||Y(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ve}}),r.jsx(ag,{mediaList:be}),r.jsx("div",{ref:W,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${P}, ${D})`,rowGap:0,columnGap:R,width:E.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:E.scalingValue(u??0,n)},children:K.map((we,Se)=>{const B=Ha(we.gallery),re=Na(B),F=re.filter(Le=>Le.lightboxMedia).map(Le=>Le.lightboxMedia),te=Math.floor(Se/P)===Math.ceil(K.length/P)-1,ne=$e&&Se>=oe?`${fe+(Se-oe)}`:void 0,ue=re[0],me=ue!=null&&ue.lightboxMedia?F.findIndex(Le=>Le.url===ue.lightboxMedia.url):-1,he=r.jsx("div",{className:`${d}-item-image-wrapper`,style:h,children:re.length>0&&r.jsx(pg,{media:ue.displayMedia,gridIndex:Se,className:`${d}-item-${Di(ue.displayMedia)?"video":"image"}`.trim(),style:I,onMediaClick:f&&me>=0?Le=>xe(Se,me,Gl(Le.currentTarget,b?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,te?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:D,...ne?{gridColumn:ne}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:U}})}),r.jsx("a",{className:`${d}-item-image-link`,children:he}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:U}})})]})},Se)})}),V&&typeof document<"u"&&(()=>{const we=(l?document.getElementById(l):null)??document.body;return mi.createPortal(r.jsx("div",{style:ye,"data-selection":"none",children:r.jsx(gg,{prefix:d,items:ae,index:G,entry:ee,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ke,lightboxEntries:X,entryIdx:$,layoutId:s,sourceRect:q,resolveCloseSourceRect:se,onClose:pe,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),we)})()]})}const fg=`import { CommonComponentProps } from '../props';
6212
6186
  import { scalingValue, useScopedStyles } from '../utils/index';
6213
6187
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
6214
6188
  import { createPortal } from 'react-dom';
@@ -8562,11 +8536,11 @@ export function Hive({
8562
8536
  </>
8563
8537
  );
8564
8538
  }
8565
- `,Jm="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 Zm(e){const t={};return t[Je(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Je(e,"fontSettings")]={...Qn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Je(e,"fontSize")]={...Qn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Je(e,"lineHeight")]={...Qn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Je(e,"letterSpacing")]={...Qn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Je(e,"wordSpacing")]={...Qn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Je(e,"textAlign")]={...Qn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Je(e,"textAppearance")]={...Qn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ei=ci.filter(e=>e!=="count"),Qm=Ei.reduce((e,t)=>({...e,...Zm(t)}),{}),eg=Ei.reduce((e,t)=>({...e,[Je(t,"fontFamily")]:"Arial",[Je(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Je(t,"letterSpacing")]:0,[Je(t,"wordSpacing")]:0,[Je(t,"textAlign")]:"left",[Je(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Rr(e){return Ei.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Je(n,"fontSize")]=i),o!==void 0&&(t[Je(n,"lineHeight")]=o),t},{})}const tg={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ei.map(e=>[Tl[e],Ll(e)]))},ng={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},ig=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...ng,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),og={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},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"}},gallery:{type:"array",label:"Gallery",max:1,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"]}}}}}}}},required:["gallery"]},default:ig},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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"}}},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"}},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"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",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"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Qm},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Jm,closeIconColor:"#000000",closeIconHoverColor:"#999999",...eg},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Rr({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Rr({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Rr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[tg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},rg={element:Xm,id:"hive",name:"Hive",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Ei.map(e=>({path:`${Je(e,"fontFamily")}`}))]},fontRelations:{...Ei.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Je(t,"fontFamily")}`}),{})},schema:og,sourceCode:Ym},cs=12;function ag(e,t="50%"){const n={position:"absolute",width:cs,height:cs,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 Jt({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:ag(n,i)})})}function sg(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 lg({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const l=o.play();l&&l.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 Oo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function cg(e){return String(e??"").trim().length>0}function ds(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 us(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 ps(e,t,n,i,o,l,s){const d=L.scalingValue(l,s),c=L.scalingValue(0,s),u=e===0,m=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!m||i?d:c}}function dg(e,t,n){const i=L.scalingValue(t,n),o=L.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const ms=10;function ug(e){return`
8539
+ `,yg="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>'),ii={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 vg(e){const t={};return t[ze(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSettings")]={...ii.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSize")]={...ii.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ze(e,"lineHeight")]={...ii.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ze(e,"letterSpacing")]={...ii.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ze(e,"wordSpacing")]={...ii.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ze(e,"textAlign")]={...ii.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ze(e,"textAppearance")]={...ii.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ai=Kn.filter(e=>e!=="count"),xg=Ai.reduce((e,t)=>({...e,...vg(t)}),{}),bg=Ai.reduce((e,t)=>({...e,[ze(t,"fontFamily")]:"Arial",[ze(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ze(t,"letterSpacing")]:0,[ze(t,"wordSpacing")]:0,[ze(t,"textAlign")]:"left",[ze(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Br(e){return Ai.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ze(n,"fontSize")]=i),o!==void 0&&(t[ze(n,"lineHeight")]=o),t},{})}const wg={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ai.map(e=>[Fa[e],_a(e)]))},Sg={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},$g=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Sg,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Cg={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},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"}},gallery:{type:"array",label:"Gallery",max:1,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"]}}}}}}}},required:["gallery"]},default:$g},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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"}}},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"}},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"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",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"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...xg},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:yg,closeIconColor:"#000000",closeIconHoverColor:"#999999",...bg},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Br({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Br({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Br({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[wg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Tg={element:hg,id:"hive",name:"Hive",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Ai.map(e=>({path:`${ze(e,"fontFamily")}`}))]},fontRelations:{...Ai.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ze(t,"fontFamily")}`}),{})},schema:Cg,sourceCode:fg},Ls=12;function Lg(e,t="50%"){const n={position:"absolute",width:Ls,height:Ls,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 nn({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:Lg(n,i)})})}function Ig(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 Rg({media:e,className:t,style:n}){const i=a.useRef(null);return a.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 Xo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Eg(e){return String(e??"").trim().length>0}function Is(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 Rs(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 Es(e,t,n,i,o,s,l){const d=E.scalingValue(s,l),c=E.scalingValue(0,l),u=e===0,m=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!m||i?d:c}}function Mg(e,t,n){const i=E.scalingValue(t,n),o=E.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ms=10;function kg(e){return`
8566
8540
  .${e}-wrapper {
8567
8541
  display: grid;
8568
8542
  align-items: start;
8569
- min-height: ${Oo(48)};
8543
+ min-height: ${Xo(48)};
8570
8544
  position: relative;
8571
8545
  overflow: visible;
8572
8546
  box-sizing: border-box;
@@ -8688,7 +8662,7 @@ a.${e}-list-item {
8688
8662
  flex-shrink: 0;
8689
8663
  overflow: visible;
8690
8664
  box-sizing: border-box;
8691
- min-width: ${Oo(50)};
8665
+ min-width: ${Xo(50)};
8692
8666
  position: relative;
8693
8667
  display: flex;
8694
8668
  align-items: flex-start;
@@ -8696,7 +8670,7 @@ a.${e}-list-item {
8696
8670
 
8697
8671
  .${e}-list-col-last {
8698
8672
  flex: 1 1 auto;
8699
- min-width: ${Oo(50)};
8673
+ min-width: ${Xo(50)};
8700
8674
  }
8701
8675
 
8702
8676
  .${e}-list-col-title {
@@ -8993,7 +8967,7 @@ a.${e}-list-item {
8993
8967
  overflow-wrap: anywhere;
8994
8968
  word-break: break-word;
8995
8969
  }
8996
- `}const Vn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Sa=["AColumn","BColumn","CColumn","DColumn","EColumn"],Pn="cutLabel",io=[...Sa,Pn],dr=["A","B","C","D","E"];function Pl(e){return`${e}ColumnVerticalAlign`}const Ur=["Top","Center","Bottom"];function $a(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return dr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function pg(e){const t=$a(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function mg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return dr.includes(n)?n:null}function kl(e,t,n){const i=mg(e);return i?i===t?!1:pg(n[Pl(i)]):!0}function oo(e){const t=$a(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return dr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function gg(e,t,n){if(Al(e,t,n))return oo(e);const i=oo(e);return i.kind==="baseline"?{kind:"top"}:i}function hg(e){const t=oo(e);return t.kind==="baseline"?{kind:"top"}:t}function Al(e,t,n){return kl(e,n,t)?oo(e).kind==="baseline":!1}function fg(e){const t={};let n=!1;for(const i of dr){const o=Pl(i),l=e[o];if(e.type==="b"){const s=String(l??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[o]="Top",n=!0);continue}kl(l,i,e)||(t[o]="Top",n=!0)}return n?t:null}function yg(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function vg(e){const t=oo(e).kind;return t==="baseline"?"center":t}function xg(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function gs(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function bg(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(),l=o-i;return n.remove(),l}function Er(e,t,n,i){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const s=bg(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+s;const d=l.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+s}function wg(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${i}px`,l.style.height=`${i}px`)}),i)}function Sg(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const $g={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function ut(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Cg={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Tg(e){return[ut(e,"textFontFamily"),ut(e,"textFontSettings"),{type:"row",items:[ut(e,"textFontSize"),ut(e,"textLineHeight"),ut(e,"textLetterSpacing"),ut(e,"textWordSpacing")]},ut(e,"textTextAlign"),ut(e,"textTextAppearance"),`${e}VerticalAlign`]}function Lg(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(io.map(e=>[Cg[e],Tg(e)]))}}function Uo(e,t){const n=i=>{const o=ut(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===Pn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function hs(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 pn(Xt(n,t))}function fs(e,t,n,i){const o=Uo(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s!==void 0&&s<l?`${n} ${i}`:n}function ys(e,t,n,i){const o=Uo(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s===void 0||s>=l?{}:{[`--${n}-title-leading-gap`]:L.scalingValue((l-s)/2,i)}}const gn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Mi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Pi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],ki=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Ig={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Rg=["hover","focus","filled","success","error"],vs=.004,yi=.004,Mr=yi,Ca=50,ro=1440,ao=Ca/ro;function Wl(e){const t=typeof e=="number"&&e>0?e:ro;return Ca/t}function Eg(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 ro}const Fl={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ki(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Mg(e,t=1){const n=t/e;return Object.fromEntries(gn.map(i=>[i,n]))}function Pg(){return Object.fromEntries([...Mi.map(e=>[e,0]),...Pi.map(e=>[e,0])])}function kg(){return Object.fromEntries(ki.map(e=>[e,0]))}function Eo(e){return Object.fromEntries(gn.map(t=>[t,typeof e[t]=="number"?e[t]:Fl[t]]))}function _l(e,t,n){const i=e-ao,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const l=i/o;return{paddingLeft:t*l,paddingRight:n*l}}function jo(e,t,n){const i=Ta(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((l,s)=>l+s,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Ag(e,t,n){const i={};for(let o=0;o<e;o+=1){const l=Mi[o],s=Pi[o],d=typeof n[l]=="number"?n[l]:0,c=typeof n[s]=="number"?n[s]:0,u=_l(t[o]??0,d,c);u.paddingLeft!==d&&(i[l]=u.paddingLeft),u.paddingRight!==c&&(i[s]=u.paddingRight)}return i}function Ta(e,t,n){if(e<=0)return[];const i=gn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),s=o.reduce((u,m)=>u+m,0)+ao;if(t>=s)return i;const d=[...o];let c=s-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const m=d[u]-ao;if(m<=0)continue;const y=Math.min(c,m);d[u]-=y,c-=y}return[...d,i[e-1]]}function Wg(e,t,n){if(e<=1)return{};const i=Ta(e,t,n),o={};for(let l=0;l<e-1;l+=1){const s=gn[l];i[l]!==n[s]&&(o[s]=i[l])}return o}function xs(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Vn]}function Fg(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function _g(e,t,n,i){const o=Math.min(i,e.length,gn.length),l={};for(let s=0;s<o;s+=1){const d=e[s],c=t.indexOf(d);if(c===-1)continue;const u=gn[c],m=Mi[c],y=Pi[c],w=ki[c],$=gn[s],h=Mi[s],v=Pi[s],S=ki[s],T=n[u],R=n[m],P=n[y],H=n[w];typeof T=="number"&&(l[$]=T),typeof R=="number"&&(l[h]=R),typeof P=="number"&&(l[v]=P),typeof H=="number"&&(l[S]=H)}return l}function Nl(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 Ng(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ki(e),l=e.type==="b"||e.type===void 0&&t.type==="b",s={...e,...Mg(n,o),...Pg()};if(l)for(const d of ki)typeof t[d]=="number"&&(s[d]=t[d]);else Object.assign(s,kg());return Nl(e,s)?s:e}function Hg(e,t,n){const i=fg(e);i&&(e={...e,...i});const o=Wl(n==null?void 0:n.designWidth),l=e.columns,s=t.columns,d=Ki(e),c=Ki(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof l=="number"?l:typeof s=="number"?s:Vn.length,y=P=>{if(u)return P;const H=Eo({...t,...P}),E=Ki(P),j=jo(m,E,H),k=Ag(m,j,{...t,...P});return Object.keys(k).length===0?P:{...P,...k}};if(typeof l=="number"&&l!==s)return e;const w=xs(e),$=xs(t);if(!Fg(w,$))return y({...e,..._g(w,$,t,m)});if(d<c&&typeof m=="number"&&!u){const P=Eo({...t,...e});return y({...e,...Wg(m,d,P)})}if(u){const P=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,H=Math.max(0,(d-o)/2);return P>H?{...e,textPaddingLR:H}:e}const h=Eo({...t,...e}),v=jo(m,c,Eo(t)),T=jo(m,d,h).some((P,H)=>P<(v[H]??P)),R=gn.some(P=>{const H=e[P],E=t[P];return typeof H=="number"&&typeof E=="number"&&H!==E});return T||R?y(e):e}function Og(e,t,n,i){const o=t.slice(0,e).reduce((s,d)=>s+d,0),l=n.slice(e+1,t.length-1).reduce((s,d)=>s+d,0);return Math.max(ao,i-o-l-ao)}function jg(e,t){return Math.random()*(t-e)+e}function Bg(e){return Object.fromEntries(gn.map(t=>[t,typeof e[t]=="number"?e[t]:Fl[t]]))}function Pr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function zg(e,t,n,i,o,l){return e.slice(0,t).map((s,d)=>{const c=Mi[d],u=Pi[d],m=ki[d];return{key:s,textPrefix:$g[s],widthKey:gn[d],width:n[gn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:l[m]}})}function Dg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l,layoutId:s,onUpdateSettings:d}){const{prefix:c}=L.useScopedStyles(),u=!!o,{columns:m,type:y,wrapperWidth:w,entriesCount:$,cellMinHeight:h,dividerWidth:v,showVisibility:S,cut:T,showCut:R,cutCellMinHeight:P,cutLabel:H,imageSize:E,imageOnHover:j,entryHoverEffect:k,entryHoverShowOption:x,rowPaddingTop:Y,rowPaddingBottom:f,rowPaddingTopB:A,columnsOrder:W,textPaddingLR:z,textColor:G,backgroundColor:le,dividerColor:J,textHoverColor:D,backgroundHoverColor:N,dividerHoverColor:C}=e,[I,V]=a.useState(void 0),[K,ee]=a.useState(null),O=j==="on"&&(!n||i),ge=(T??0)>0,g=y==="b",he=a.useRef(null),re=a.useRef(null),[be,ke]=a.useState(null),[ae,ve]=a.useState(ro),U=Wl(ae),xe=Math.max(0,((w??0)-U)/2),me=Math.min(z??0,xe),pe=Math.max(me,yi),se=((w??0)+U)/2;a.useLayoutEffect(()=>{if(!n){ve(ro);return}const Ce=()=>{ve(Eg(he.current))};Ce();const _e=he.current;if(!_e)return;const De=new ResizeObserver(Ce);De.observe(_e);let Oe=_e;for(;Oe&&!Oe.style.getPropertyValue("--cntrl-article-width");)Oe=Oe.parentElement;return Oe&&De.observe(Oe),()=>De.disconnect()},[n,s]),a.useEffect(()=>{V(void 0)},[T,R,t,$]),a.useEffect(()=>{n&&!i&&V(void 0)},[n,i]);const Te=L.buildColorVars(c,{textColor:G,backgroundColor:le,dividerColor:J,textHoverColor:D,backgroundHoverColor:N,dividerHoverColor:C},Ig,Rg),Ie=l&&l!=="default"?`${c}-state-${l}`:"",Se=`${!n||i?k==="default"?`${c}-entry-hover-default`:k==="blinds"?`${c}-entry-hover-blinds`:k==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Ie}`.trim(),_=k==="reveal"&&(!n||i),te=(S==null?void 0:S[0])??!1,M=(S==null?void 0:S[1])??!1,X=a.useRef(e),Z=a.useRef(s);a.useEffect(()=>{if(!d||!n){X.current=e,Z.current=s;return}if(Z.current!==s){X.current=e,Z.current=s;return}const Ce=X.current;if(!(Ce!==e))return;if(typeof Ce.columns=="number"&&typeof e.columns=="number"&&Ce.columns!==e.columns){X.current=e;return}const De=Hg(e,Ce,{designWidth:ae});X.current=e,Nl(e,De)&&d(De)},[e,d,n,s,ae]);const ce=a.useMemo(()=>Bg(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ue=a.useMemo(()=>Pr(e,Mi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),ye=a.useMemo(()=>Pr(e,Pi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Le=a.useMemo(()=>Pr(e,ki),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),q=a.useMemo(()=>Array.isArray(W)&&W.length>0?W:[...Vn],[W]),de=a.useMemo(()=>zg(q,m,ce,ue,ye,Le),[q,m,ce,ue,ye,Le]),Ee=Ki(e),Q=a.useMemo(()=>gn.slice(0,m).map(Ce=>ce[Ce]),[m,ce]),ne=a.useMemo(()=>Ta(m,Ee,ce),[m,Ee,ce]),Fe=a.useMemo(()=>jo(m,Ee,ce),[m,Ee,ce]),We=a.useMemo(()=>de.map((Ce,_e)=>_l(Fe[_e]??0,Ce.paddingLeft,Ce.paddingRight)),[de,Fe]),Ge=a.useMemo(()=>{const Ce=$===0?1/0:$;return(t??[]).slice(0,Ce).map((De,Oe)=>({id:Oe,cells:Object.fromEntries(Vn.map(Ne=>[Ne,De[Ne]??""])),image:De.image,link:De.link}))},[t,$]),Ze=ge?I??T:Ge.length,ct=a.useMemo(()=>ge?Ge.slice(0,Ze):Ge,[Ge,ge,Ze]),pt=ge&&Ze<Ge.length,Xe=ct.length>1||pt,vt=[te?`${c}-divider-top`:"",M||Xe?`${c}-divider-bottom`:""].filter(Boolean).join(" "),St=!n||i,et=()=>{if(!St)return;const Ce=I??T;if(!R){V(Ge.length);return}V(Math.min(Ce+R,Ge.length))},Be=Ce=>L.scalingValue(Ce,n??!1),dt=g?A??0:Y??0,mt=f??0,ot=h??0,Pt=dt+ot/2,Ht=Math.max(mt,Mr),tt=ps(0,ct.length,te,M,pt,v??0,n??!1).borderTopWidth,At=be!=null?`${be}px`:`calc(${tt} + ${Be(Pt)})`,It=g?"rowPaddingTopB":"rowPaddingTop",ze=de[0],Qe=de[de.length-1],He=We[0],st=We[We.length-1],$t=ze&&He?Math.max(He.paddingLeft,yi):0,Ct=Qe&&st?Math.max(st.paddingRight,yi):0,Zt=Ee,an=Ce=>{const _e=he.current;if(!_e)return{x:0,y:0};const De=_e.getBoundingClientRect();return{x:Ce.clientX-De.left+ms,y:Ce.clientY-De.top+ms}},sn=(Ce,_e)=>{if(!O)return;const De=Ce.image;if(!(De!=null&&De.url)){ee(null);return}const{x:Oe,y:Ne}=an(_e),rt=(E==null?void 0:E.min)??80,Me=(E==null?void 0:E.max)??320,Ye=(K==null?void 0:K.rowId)===Ce.id?K.widthPx:jg(rt,Me);ee({rowId:Ce.id,url:De.url,objectFit:"contain",isVideo:sg(De),widthPx:Ye,x:Oe,y:Ne})},ht=Ce=>{if(!O||!K)return;const{x:_e,y:De}=an(Ce);ee(Oe=>!Oe||Oe.x===_e&&Oe.y===De?Oe:{...Oe,x:_e,y:De})},jt=()=>{ee(null)},Yt=Ce=>{_&&ds(Ce,c),O&&ee(null)},qt=Ce=>{_&&us(Ce,c)};a.useLayoutEffect(()=>{if(!u||g){ke(null);return}const Ce=re.current,_e=Ce==null?void 0:Ce.parentElement;if(!Ce||!_e){ke(null);return}const De=()=>{const Ne=Ce.querySelector("[data-list-row]");if(!Ne){ke(null);return}const rt=_e.getBoundingClientRect(),Me=Ne.getBoundingClientRect();ke(Me.top-rt.top+Me.height/2)};De();const Oe=new ResizeObserver(De);return Oe.observe(Ce),Oe.observe(_e),()=>Oe.disconnect()},[u,g,ct,dt,mt,ot,t,e,de,Fe,ae,v,te,M,pt]);const Rt=a.useMemo(()=>!g&&Sa.some(Ce=>{const _e=Ce.charAt(0),De=e[`${Ce}VerticalAlign`];return Al(De,e,_e)}),[g,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Ye;const Ce=he.current;if(!Ce)return;const _e=()=>{Ce.querySelectorAll("[data-list-col]").forEach(Ke=>{Ke.style.transform="";const Et=Ke.querySelector(`.${c}-list-col`);Et&&(Et.style.minHeight="",Et.style.height="");const xt=Ke.querySelector(`.${c}-list-col-title`);xt&&(xt.style.transform="")})};if(g||!Rt){_e();return}const De=()=>{const Ke=Array.from(Ce.querySelectorAll("[data-list-row]")),Et=`${c}-list-col`,xt=`${c}-baseline-probe`;Ke.forEach(ft=>{ft.querySelectorAll("[data-list-col]").forEach(Wt=>{Wt.style.transform="";const Tt=Wt.querySelector(`.${Et}`);Tt&&(Tt.style.minHeight="",Tt.style.height="");const Bt=Wt.querySelector(`.${c}-list-col-title`);Bt&&(Bt.style.transform="")})}),Ke.forEach(ft=>{const Wt=Array.from(ft.querySelectorAll("[data-list-col]"));wg(ft,Wt,Et)}),Ce.offsetHeight,Ke.forEach(ft=>{const Wt=Array.from(ft.querySelectorAll("[data-list-col]")),Tt=ft.getBoundingClientRect().top,Bt=new Map,Ft=Wt.map(yt=>{const zt=yt.querySelector(`.${c}-list-col-title`),at={el:yt,titleEl:zt,letter:yt.getAttribute("data-col-letter")??"",kind:yt.getAttribute("data-valign")??"top",anchor:yt.getAttribute("data-valign-anchor")};return Bt.set(at.letter,at),at}),kt=new Map,en=(yt,zt)=>{const at=kt.get(yt.letter);if(at!==void 0)return at;const _t=yt.anchor?Bt.get(yt.anchor):void 0;if(yt.kind!=="baseline"||!_t||zt.has(yt.letter)){const qe=Er(yt,Tt,Et,xt);return kt.set(yt.letter,qe),qe}zt.add(yt.letter);const Gt=en(_t,zt);zt.delete(yt.letter);const ie=Er(yt,Tt,Et,xt),Ae=Gt-ie;Sg(yt.titleEl,Ae);const Ve=Er(yt,Tt,Et,xt);return kt.set(yt.letter,Ve),Ve};Ft.forEach(yt=>en(yt,new Set))})};let Oe=null;const Ne=()=>{Oe===null&&(Oe=requestAnimationFrame(()=>{Oe=null,De()}))};De();const rt=new ResizeObserver(()=>Ne());rt.observe(Ce);let Me=!1;return typeof document<"u"&&((Ye=document.fonts)!=null&&Ye.ready)&&document.fonts.ready.then(()=>{Me||Ne()}),()=>{Me=!0,Oe!==null&&(cancelAnimationFrame(Oe),Oe=null),rt.disconnect(),_e()}},[Rt,g,e,t,ae,ct,Fe]);const Qt=a.useMemo(()=>ug(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Qt}}),r.jsx("div",{style:Te,children:r.jsxs("div",{ref:he,className:`${c}-wrapper ${Se}${vt?` ${vt}`:""}${g?` ${c}-type-b`:""}`.trim(),style:{width:L.scalingValue(w??0,n),...!g&&u?{[`--${c}-first-entry-handle-top`]:At}:{}},onMouseMove:O?ht:void 0,onMouseLeave:O?jt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[ct.map((Ce,_e)=>{var rt;const De=(((rt=Ce.link)==null?void 0:rt.length)??0)>0,Oe=De&&(!n||i)?"a":"div",Ne=ps(_e,ct.length,te,M,pt,v??0,n??!1);return r.jsxs(Oe,{ref:_e===0?Me=>{re.current=Me}:void 0,className:`${c}-list-item${De||x==="always"?` ${c}-list-item-has-link`:""}`,...De?{href:Ce.link,target:"_blank"}:{},style:Ne,onMouseEnter:Me=>{_&&(De||x==="always")&&ds(Me,c),O&&sn(Ce,Me)},onMouseLeave:Me=>{_&&(De||x==="always")&&us(Me,c)},children:[dt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Be(dt)}}),r.jsxs("div",{className:`${c}-list-cols-row${g?"":` ${c}-list-cols-row-h`}${u&&_e===0&&g?` ${c}-list-cols-row-controls`:""}`,...g?{}:{"data-list-row":""},style:g?void 0:{minHeight:Be(ot)},children:[de.map((Me,Ye)=>{const Ke=Ye===de.length-1,Et=We[Ye],xt=Me.paddingBottom,ft=cg(Ce.cells[Me.key]),Wt=g&&ft&&xt>0,Tt=g?{minHeight:Be(ot)}:{width:Be(Fe[Ye])},Bt=g?{paddingLeft:Be(me),paddingRight:Be(me)}:{paddingLeft:Be(Et.paddingLeft),paddingRight:Be(Et.paddingRight)},Ft=Me.textPrefix.charAt(0),kt=g?hg(e[`${Me.textPrefix}VerticalAlign`]):gg(e[`${Me.textPrefix}VerticalAlign`],e,Ft),en=g&&ft&&u&&_e===0;return r.jsxs("div",{className:g?`${c}-list-col-wrap`:void 0,...g?{}:{"data-list-col":"","data-col-letter":Ft,"data-valign":kt.kind,...kt.kind==="baseline"?{"data-valign-anchor":kt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Ke?` ${c}-list-col-last`:""}`,style:{...Bt,...Tt,...g?{justifyContent:gs(kt.kind)}:{}},"data-test":Me.width,children:r.jsx("span",{className:fs(e,Me.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...hs(Uo(e,Me.textPrefix),n),...ys(e,Me.textPrefix,c,n),...g?{}:yg(kt.kind)},children:Ce.cells[Me.key]??null})}),Wt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Be(xt)}}),en&&r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Me.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:Be(Math.max(xt,Mr))}})]},Me.key)}),u&&_e===0&&g&&r.jsxs(r.Fragment,{children:[r.jsx(Jt,{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(se),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Be(pe),height:"100%"}}),r.jsx(Jt,{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(se),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Be(Math.max(pe,Ee-pe)),width:Be(pe),height:"100%"}})]})]}),!g&&mt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Be(mt)}}),u&&_e===0&&!g&&r.jsx(Jt,{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:Be(Ht)}})]},Ce.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":It,"data-controls-static-handle":"",...g?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:g?"center":"left-y",areaStyle:{position:"absolute",top:tt,left:0,width:"100%",height:Be(Math.max(dt,Mr))}})},"row-padding-handles"),u&&!g&&ze&&Qe&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Jt,{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(Fe[0]-((He==null?void 0:He.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Be($t),height:"100%"}}),r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Qe.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(Fe[de.length-1]-((st==null?void 0:st.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Be(Zt-Ct),width:Be(Ct),height:"100%"}})]},"column-edge-padding-handles"),u&&!g&&de.slice(0,-1).map((Ce,_e)=>{const De=de[_e+1],Oe=ne.slice(0,_e+1).reduce((Ke,Et)=>Ke+Et,0),Ne=We[_e],rt=We[_e+1],Me=Math.max(Ne.paddingRight,yi),Ye=Math.max(rt.paddingLeft,yi);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ce.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(Fe[_e]-Ne.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Be(Oe-Me),width:Be(Me),height:"100%"}}),r.jsx(Jt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":De.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Fe[_e+1]-rt.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Be(Oe),width:Be(Ye),height:"100%"}})]},`${Ce.paddingRightKey}-padding`)}),u&&!g&&de.slice(0,-1).map((Ce,_e)=>{const De=Og(_e,ne,Q,Ee),Ne=ne.slice(0,_e+1).reduce((rt,Me)=>rt+Me,0)-vs/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Ce.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Ca),"data-controls-max-fraction":String(De),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Be(Ne),width:Be(vs),height:"calc(100%)",pointerEvents:"auto"}})},`${Ce.widthKey}-junction`)})]}),pt&&(()=>{const Ce=Uo(e,Pn),_e=vg(e.cutLabelVerticalAlign),De=Ce.textTextAlign==="justify"||g;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Be(P??0),cursor:St?"pointer":"default",...dg(M,v??0,n??!1)},onClick:St?et:void 0,onMouseEnter:_||O?Yt:void 0,onMouseLeave:_?qt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...g?{paddingLeft:Be(me),paddingRight:Be(me)}:{},justifyContent:xg(Ce.textTextAlign),alignItems:gs(_e)},children:r.jsx("span",{className:fs(e,Pn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...hs(Ce,n),...ys(e,Pn,c,n),...De?{width:"100%"}:{}},children:H})})})})(),O&&K&&(()=>{const Ce=Oo(K.widthPx),_e={width:Ce,height:"auto",maxHeight:Ce,objectFit:"contain",left:K.x,top:K.y,position:"absolute"};return r.jsx(lg,{media:K,className:K.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:_e},`${K.rowId}-${K.url}`)})()]})})]})}const Vg=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
8970
+ `}const Un=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Oa=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",uo=[...Oa,An],Sr=["A","B","C","D","E"];function Xl(e){return`${e}ColumnVerticalAlign`}const la=["Top","Center","Bottom"];function ja(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Sr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Pg(e){const t=ja(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Ag(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Sr.includes(n)?n:null}function Yl(e,t,n){const i=Ag(e);return i?i===t?!1:Pg(n[Xl(i)]):!0}function po(e){const t=ja(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Sr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Wg(e,t,n){if(Jl(e,t,n))return po(e);const i=po(e);return i.kind==="baseline"?{kind:"top"}:i}function Fg(e){const t=po(e);return t.kind==="baseline"?{kind:"top"}:t}function Jl(e,t,n){return Yl(e,n,t)?po(e).kind==="baseline":!1}function _g(e){const t={};let n=!1;for(const i of Sr){const o=Xl(i),s=e[o];if(e.type==="b"){const l=String(s??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}Yl(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Hg(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Ng(e){const t=po(e).kind;return t==="baseline"?"center":t}function Og(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function ks(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function jg(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 zr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=jg(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function Bg(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 zg(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Dg={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function vt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Vg={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Gg(e){return[vt(e,"textFontFamily"),vt(e,"textFontSettings"),{type:"row",items:[vt(e,"textFontSize"),vt(e,"textLineHeight"),vt(e,"textLetterSpacing"),vt(e,"textWordSpacing")]},vt(e,"textTextAlign"),vt(e,"textTextAppearance"),`${e}VerticalAlign`]}function qg(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(uo.map(e=>[Vg[e],Gg(e)]))}}function rr(e,t){const n=i=>{const o=vt(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===An?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ps(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 hn(Qt(n,t))}function As(e,t,n,i){const o=rr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function Ws(e,t,n,i){const o=rr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((s-l)/2,i)}}const yn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Wi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Fi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],_i=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Kg={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Ug=["hover","focus","filled","success","error"],Fs=.004,wi=.004,Dr=wi,Ba=50,mo=1440,go=Ba/mo;function Zl(e){const t=typeof e=="number"&&e>0?e:mo;return Ba/t}function Xg(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 mo}const Ql={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function eo(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Yg(e,t=1){const n=t/e;return Object.fromEntries(yn.map(i=>[i,n]))}function Jg(){return Object.fromEntries([...Wi.map(e=>[e,0]),...Fi.map(e=>[e,0])])}function Zg(){return Object.fromEntries(_i.map(e=>[e,0]))}function _o(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:Ql[t]]))}function ec(e,t,n){const i=e-go,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 Yo(e,t,n){const i=za(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,l)=>s+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Qg(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Wi[o],l=Fi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=ec(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function za(e,t,n){if(e<=0)return[];const i=yn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,m)=>u+m,0)+go;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const m=d[u]-go;if(m<=0)continue;const v=Math.min(c,m);d[u]-=v,c-=v}return[...d,i[e-1]]}function eh(e,t,n){if(e<=1)return{};const i=za(e,t,n),o={};for(let s=0;s<e-1;s+=1){const l=yn[s];i[s]!==n[l]&&(o[l]=i[s])}return o}function _s(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Un]}function th(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function nh(e,t,n,i){const o=Math.min(i,e.length,yn.length),s={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=yn[c],m=Wi[c],v=Fi[c],b=_i[c],S=yn[l],y=Wi[l],w=Fi[l],C=_i[l],L=n[u],k=n[m],A=n[v],O=n[b];typeof L=="number"&&(s[S]=L),typeof k=="number"&&(s[y]=k),typeof A=="number"&&(s[w]=A),typeof O=="number"&&(s[C]=O)}return s}function tc(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 ih(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=eo(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...Yg(n,o),...Jg()};if(s)for(const d of _i)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,Zg());return tc(e,l)?l:e}function oh(e,t,n){const i=_g(e);i&&(e={...e,...i});const o=Zl(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=eo(e),c=eo(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof s=="number"?s:typeof l=="number"?l:Un.length,v=A=>{if(u)return A;const O=_o({...t,...A}),P=eo(A),D=Yo(m,P,O),R=Qg(m,D,{...t,...A});return Object.keys(R).length===0?A:{...A,...R}};if(typeof s=="number"&&s!==l)return e;const b=_s(e),S=_s(t);if(!th(b,S))return v({...e,...nh(b,S,t,m)});if(d<c&&typeof m=="number"&&!u){const A=_o({...t,...e});return v({...e,...eh(m,d,A)})}if(u){const A=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,O=Math.max(0,(d-o)/2);return A>O?{...e,textPaddingLR:O}:e}const y=_o({...t,...e}),w=Yo(m,c,_o(t)),L=Yo(m,d,y).some((A,O)=>A<(w[O]??A)),k=yn.some(A=>{const O=e[A],P=t[A];return typeof O=="number"&&typeof P=="number"&&O!==P});return L||k?v(e):e}function rh(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),s=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(go,i-o-s-go)}function ah(e,t){return Math.random()*(t-e)+e}function sh(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:Ql[t]]))}function Vr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function lh(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Wi[d],u=Fi[d],m=_i[d];return{key:l,textPrefix:Dg[l],widthKey:yn[d],width:n[yn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[m]}})}function ch({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=E.useScopedStyles(),u=!!o,{columns:m,type:v,wrapperWidth:b,entriesCount:S,cellMinHeight:y,dividerWidth:w,showVisibility:C,cut:L,showCut:k,cutCellMinHeight:A,cutLabel:O,imageSize:P,imageOnHover:D,entryHoverEffect:R,entryHoverShowOption:x,rowPaddingTop:U,rowPaddingBottom:h,rowPaddingTopB:I,columnsOrder:W,textPaddingLR:V,textColor:Y,backgroundColor:ae,dividerColor:Z,textHoverColor:G,backgroundHoverColor:H,dividerHoverColor:$}=e,[M,q]=a.useState(void 0),[z,ee]=a.useState(null),_=D==="on"&&(!n||i),ye=(L??0)>0,f=v==="b",ve=a.useRef(null),K=a.useRef(null),[le,$e]=a.useState(null),[oe,fe]=a.useState(mo),X=Zl(oe),be=Math.max(0,((b??0)-X)/2),xe=Math.min(V??0,be),pe=Math.max(xe,wi),se=((b??0)+X)/2;a.useLayoutEffect(()=>{if(!n){fe(mo);return}const Ce=()=>{fe(Xg(ve.current))};Ce();const je=ve.current;if(!je)return;const Ke=new ResizeObserver(Ce);Ke.observe(je);let He=je;for(;He&&!He.style.getPropertyValue("--cntrl-article-width");)He=He.parentElement;return He&&Ke.observe(He),()=>Ke.disconnect()},[n,l]),a.useEffect(()=>{q(void 0)},[L,k,t,S]),a.useEffect(()=>{n&&!i&&q(void 0)},[n,i]);const Re=E.buildColorVars(c,{textColor:Y,backgroundColor:ae,dividerColor:Z,textHoverColor:G,backgroundHoverColor:H,dividerHoverColor:$},Kg,Ug),ke=s&&s!=="default"?`${c}-state-${s}`:"",Se=`${!n||i?R==="default"?`${c}-entry-hover-default`:R==="blinds"?`${c}-entry-hover-blinds`:R==="reveal"?`${c}-entry-hover-reveal`:"":""} ${ke}`.trim(),B=R==="reveal"&&(!n||i),re=(C==null?void 0:C[0])??!1,F=(C==null?void 0:C[1])??!1,te=a.useRef(e),ne=a.useRef(l);a.useEffect(()=>{if(!d||!n){te.current=e,ne.current=l;return}if(ne.current!==l){te.current=e,ne.current=l;return}const Ce=te.current;if(!(Ce!==e))return;if(typeof Ce.columns=="number"&&typeof e.columns=="number"&&Ce.columns!==e.columns){te.current=e;return}const Ke=oh(e,Ce,{designWidth:oe});te.current=e,tc(e,Ke)&&d(Ke)},[e,d,n,l,oe]);const ue=a.useMemo(()=>sh(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),me=a.useMemo(()=>Vr(e,Wi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),he=a.useMemo(()=>Vr(e,Fi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Le=a.useMemo(()=>Vr(e,_i),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Q=a.useMemo(()=>Array.isArray(W)&&W.length>0?W:[...Un],[W]),ge=a.useMemo(()=>lh(Q,m,ue,me,he,Le),[Q,m,ue,me,he,Le]),Ae=eo(e),ie=a.useMemo(()=>yn.slice(0,m).map(Ce=>ue[Ce]),[m,ue]),j=a.useMemo(()=>za(m,Ae,ue),[m,Ae,ue]),Oe=a.useMemo(()=>Yo(m,Ae,ue),[m,Ae,ue]),Fe=a.useMemo(()=>ge.map((Ce,je)=>ec(Oe[je]??0,Ce.paddingLeft,Ce.paddingRight)),[ge,Oe]),et=a.useMemo(()=>{const Ce=S===0?1/0:S;return(t??[]).slice(0,Ce).map((Ke,He)=>({id:He,cells:Object.fromEntries(Un.map(Be=>[Be,Ke[Be]??""])),image:Ke.image,link:Ke.link}))},[t,S]),Ye=ye?M??L:et.length,at=a.useMemo(()=>ye?et.slice(0,Ye):et,[et,ye,Ye]),mt=ye&&Ye<et.length,De=at.length>1||mt,it=[re?`${c}-divider-top`:"",F||De?`${c}-divider-bottom`:""].filter(Boolean).join(" "),$t=!n||i,ot=()=>{if(!$t)return;const Ce=M??L;if(!k){q(et.length);return}q(Math.min(Ce+k,et.length))},Ue=Ce=>E.scalingValue(Ce,n??!1),ht=f?I??0:U??0,xt=h??0,ct=y??0,Mt=ht+ct/2,_t=Math.max(xt,Dr),Qe=Es(0,at.length,re,F,mt,w??0,n??!1).borderTopWidth,Tt=le!=null?`${le}px`:`calc(${Qe} + ${Ue(Mt)})`,Lt=f?"rowPaddingTopB":"rowPaddingTop",Ge=ge[0],qe=ge[ge.length-1],Pe=Fe[0],gt=Fe[Fe.length-1],It=Ge&&Pe?Math.max(Pe.paddingLeft,wi):0,kt=qe&&gt?Math.max(gt.paddingRight,wi):0,Dt=Ae,en=Ce=>{const je=ve.current;if(!je)return{x:0,y:0};const Ke=je.getBoundingClientRect();return{x:Ce.clientX-Ke.left+Ms,y:Ce.clientY-Ke.top+Ms}},on=(Ce,je)=>{if(!_)return;const Ke=Ce.image;if(!(Ke!=null&&Ke.url)){ee(null);return}const{x:He,y:Be}=en(je),dt=(P==null?void 0:P.min)??80,_e=(P==null?void 0:P.max)??320,Ze=(z==null?void 0:z.rowId)===Ce.id?z.widthPx:ah(dt,_e);ee({rowId:Ce.id,url:Ke.url,objectFit:"contain",isVideo:Ig(Ke),widthPx:Ze,x:He,y:Be})},bt=Ce=>{if(!_||!z)return;const{x:je,y:Ke}=en(Ce);ee(He=>!He||He.x===je&&He.y===Ke?He:{...He,x:je,y:Ke})},Rt=()=>{ee(null)},Ut=Ce=>{B&&Is(Ce,c),_&&ee(null)},Kt=Ce=>{B&&Rs(Ce,c)};a.useLayoutEffect(()=>{if(!u||f){$e(null);return}const Ce=K.current,je=Ce==null?void 0:Ce.parentElement;if(!Ce||!je){$e(null);return}const Ke=()=>{const Be=Ce.querySelector("[data-list-row]");if(!Be){$e(null);return}const dt=je.getBoundingClientRect(),_e=Be.getBoundingClientRect();$e(_e.top-dt.top+_e.height/2)};Ke();const He=new ResizeObserver(Ke);return He.observe(Ce),He.observe(je),()=>He.disconnect()},[u,f,at,ht,xt,ct,t,e,ge,Oe,oe,w,re,F,mt]);const ft=a.useMemo(()=>!f&&Oa.some(Ce=>{const je=Ce.charAt(0),Ke=e[`${Ce}VerticalAlign`];return Jl(Ke,e,je)}),[f,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Ze;const Ce=ve.current;if(!Ce)return;const je=()=>{Ce.querySelectorAll("[data-list-col]").forEach(tt=>{tt.style.transform="";const Ft=tt.querySelector(`.${c}-list-col`);Ft&&(Ft.style.minHeight="",Ft.style.height="");const Ct=tt.querySelector(`.${c}-list-col-title`);Ct&&(Ct.style.transform="")})};if(f||!ft){je();return}const Ke=()=>{const tt=Array.from(Ce.querySelectorAll("[data-list-row]")),Ft=`${c}-list-col`,Ct=`${c}-baseline-probe`;tt.forEach(st=>{st.querySelectorAll("[data-list-col]").forEach(Ht=>{Ht.style.transform="";const At=Ht.querySelector(`.${Ft}`);At&&(At.style.minHeight="",At.style.height="");const Vt=Ht.querySelector(`.${c}-list-col-title`);Vt&&(Vt.style.transform="")})}),tt.forEach(st=>{const Ht=Array.from(st.querySelectorAll("[data-list-col]"));Bg(st,Ht,Ft)}),Ce.offsetHeight,tt.forEach(st=>{const Ht=Array.from(st.querySelectorAll("[data-list-col]")),At=st.getBoundingClientRect().top,Vt=new Map,Bt=Ht.map(wt=>{const Gt=wt.querySelector(`.${c}-list-col-title`),ut={el:wt,titleEl:Gt,letter:wt.getAttribute("data-col-letter")??"",kind:wt.getAttribute("data-valign")??"top",anchor:wt.getAttribute("data-valign-anchor")};return Vt.set(ut.letter,ut),ut}),Pt=new Map,Zt=(wt,Gt)=>{const ut=Pt.get(wt.letter);if(ut!==void 0)return ut;const Wt=wt.anchor?Vt.get(wt.anchor):void 0;if(wt.kind!=="baseline"||!Wt||Gt.has(wt.letter)){const Ie=zr(wt,At,Ft,Ct);return Pt.set(wt.letter,Ie),Ie}Gt.add(wt.letter);const zt=Zt(Wt,Gt);Gt.delete(wt.letter);const g=zr(wt,At,Ft,Ct),ce=zt-g;zg(wt.titleEl,ce);const Ee=zr(wt,At,Ft,Ct);return Pt.set(wt.letter,Ee),Ee};Bt.forEach(wt=>Zt(wt,new Set))})};let He=null;const Be=()=>{He===null&&(He=requestAnimationFrame(()=>{He=null,Ke()}))};Ke();const dt=new ResizeObserver(()=>Be());dt.observe(Ce);let _e=!1;return typeof document<"u"&&((Ze=document.fonts)!=null&&Ze.ready)&&document.fonts.ready.then(()=>{_e||Be()}),()=>{_e=!0,He!==null&&(cancelAnimationFrame(He),He=null),dt.disconnect(),je()}},[ft,f,e,t,oe,at,Oe]);const Jt=a.useMemo(()=>kg(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Jt}}),r.jsx("div",{style:Re,children:r.jsxs("div",{ref:ve,className:`${c}-wrapper ${Se}${it?` ${it}`:""}${f?` ${c}-type-b`:""}`.trim(),style:{width:E.scalingValue(b??0,n),...!f&&u?{[`--${c}-first-entry-handle-top`]:Tt}:{}},onMouseMove:_?bt:void 0,onMouseLeave:_?Rt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[at.map((Ce,je)=>{var dt;const Ke=(((dt=Ce.link)==null?void 0:dt.length)??0)>0,He=Ke&&(!n||i)?"a":"div",Be=Es(je,at.length,re,F,mt,w??0,n??!1);return r.jsxs(He,{ref:je===0?_e=>{K.current=_e}:void 0,className:`${c}-list-item${Ke||x==="always"?` ${c}-list-item-has-link`:""}`,...Ke?{href:Ce.link,target:"_blank"}:{},style:Be,onMouseEnter:_e=>{B&&(Ke||x==="always")&&Is(_e,c),_&&on(Ce,_e)},onMouseLeave:_e=>{B&&(Ke||x==="always")&&Rs(_e,c)},children:[ht>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(ht)}}),r.jsxs("div",{className:`${c}-list-cols-row${f?"":` ${c}-list-cols-row-h`}${u&&je===0&&f?` ${c}-list-cols-row-controls`:""}`,...f?{}:{"data-list-row":""},style:f?void 0:{minHeight:Ue(ct)},children:[ge.map((_e,Ze)=>{const tt=Ze===ge.length-1,Ft=Fe[Ze],Ct=_e.paddingBottom,st=Eg(Ce.cells[_e.key]),Ht=f&&st&&Ct>0,At=f?{minHeight:Ue(ct)}:{width:Ue(Oe[Ze])},Vt=f?{paddingLeft:Ue(xe),paddingRight:Ue(xe)}:{paddingLeft:Ue(Ft.paddingLeft),paddingRight:Ue(Ft.paddingRight)},Bt=_e.textPrefix.charAt(0),Pt=f?Fg(e[`${_e.textPrefix}VerticalAlign`]):Wg(e[`${_e.textPrefix}VerticalAlign`],e,Bt),Zt=f&&st&&u&&je===0;return r.jsxs("div",{className:f?`${c}-list-col-wrap`:void 0,...f?{}:{"data-list-col":"","data-col-letter":Bt,"data-valign":Pt.kind,...Pt.kind==="baseline"?{"data-valign-anchor":Pt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${tt?` ${c}-list-col-last`:""}`,style:{...Vt,...At,...f?{justifyContent:ks(Pt.kind)}:{}},"data-test":_e.width,children:r.jsx("span",{className:As(e,_e.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Ps(rr(e,_e.textPrefix),n),...Ws(e,_e.textPrefix,c,n),...f?{}:Hg(Pt.kind)},children:Ce.cells[_e.key]??null})}),Ht&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(Ct)}}),Zt&&r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":_e.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:Ue(Math.max(Ct,Dr))}})]},_e.key)}),u&&je===0&&f&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{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(se),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ue(pe),height:"100%"}}),r.jsx(nn,{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(se),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ue(Math.max(pe,Ae-pe)),width:Ue(pe),height:"100%"}})]})]}),!f&&xt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(xt)}}),u&&je===0&&!f&&r.jsx(nn,{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:Ue(_t)}})]},Ce.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Lt,"data-controls-static-handle":"",...f?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:f?"center":"left-y",areaStyle:{position:"absolute",top:Qe,left:0,width:"100%",height:Ue(Math.max(ht,Dr))}})},"row-padding-handles"),u&&!f&&Ge&&qe&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ge.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Oe[0]-((Pe==null?void 0:Pe.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Ue(It),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":qe.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(Oe[ge.length-1]-((gt==null?void 0:gt.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(Dt-kt),width:Ue(kt),height:"100%"}})]},"column-edge-padding-handles"),u&&!f&&ge.slice(0,-1).map((Ce,je)=>{const Ke=ge[je+1],He=j.slice(0,je+1).reduce((tt,Ft)=>tt+Ft,0),Be=Fe[je],dt=Fe[je+1],_e=Math.max(Be.paddingRight,wi),Ze=Math.max(dt.paddingLeft,wi);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ce.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(Oe[je]-Be.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(He-_e),width:Ue(_e),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ke.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Oe[je+1]-dt.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(He),width:Ue(Ze),height:"100%"}})]},`${Ce.paddingRightKey}-padding`)}),u&&!f&&ge.slice(0,-1).map((Ce,je)=>{const Ke=rh(je,j,ie,Ae),Be=j.slice(0,je+1).reduce((dt,_e)=>dt+_e,0)-Fs/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Ce.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Ba),"data-controls-max-fraction":String(Ke),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ue(Be),width:Ue(Fs),height:"calc(100%)",pointerEvents:"auto"}})},`${Ce.widthKey}-junction`)})]}),mt&&(()=>{const Ce=rr(e,An),je=Ng(e.cutLabelVerticalAlign),Ke=Ce.textTextAlign==="justify"||f;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ue(A??0),cursor:$t?"pointer":"default",...Mg(F,w??0,n??!1)},onClick:$t?ot:void 0,onMouseEnter:B||_?Ut:void 0,onMouseLeave:B?Kt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...f?{paddingLeft:Ue(xe),paddingRight:Ue(xe)}:{},justifyContent:Og(Ce.textTextAlign),alignItems:ks(je)},children:r.jsx("span",{className:As(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Ps(Ce,n),...Ws(e,An,c,n),...Ke?{width:"100%"}:{}},children:O})})})})(),_&&z&&(()=>{const Ce=Xo(z.widthPx),je={width:Ce,height:"auto",maxHeight:Ce,objectFit:"contain",left:z.x,top:z.y,position:"absolute"};return r.jsx(Rg,{media:z,className:z.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:je},`${z.rowId}-${z.url}`)})()]})})]})}const dh=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
8997
8971
  import { CommonComponentProps } from '../props';
8998
8972
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
8999
8973
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -11950,7 +11924,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
11950
11924
  </>
11951
11925
  );
11952
11926
  }
11953
- `,Oi=["A","B","C","D","E"],bs=[...Ur,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],ei={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 qg(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Mo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Gg(){return Object.fromEntries(Oi.map((e,t)=>{const n=Vn[t],i=`${e} column`;return[n,qg(i)]}))}function Kg(){const e={};for(const t of Oi)e[`${t}ColumnWidth`]=Mo(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Mo(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Mo(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Mo(`${t} column padding bottom`);return e}function ws(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Vn]};for(const l of Oi)i[`${l}ColumnWidth`]=l==="A"?.0798:.32,i[`${l}ColumnPaddingLeft`]=0,i[`${l}ColumnPaddingRight`]=0,i[`${l}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function Ug(e){const t={};if(e===Pn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ur]},enum:[...Ur]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...bs],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...bs]}}return t[ut(e,"textFontFamily")]={type:"string",scope:"layout",title:"",display:{type:"font-family-select",hideLabel:!0}},t[ut(e,"textFontSettings")]={...ei.fontSettings,scope:"layout",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[ut(e,"textFontSize")]={...ei.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ut(e,"textLineHeight")]={...ei.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ut(e,"textLetterSpacing")]={...ei.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ut(e,"textWordSpacing")]={...ei.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ut(e,"textTextAlign")]={...ei.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ut(e,"textTextAppearance")]={...ei.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Xg=io.reduce((e,t)=>({...e,...Ug(t)}),{});function Yg(e){return{verticalAlign:e===Pn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Pn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Jg(e,t={}){var n;return{...Yg(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Ss=new Set(["textFontFamily","textFontSettings"]);function Zg(e,t,n){const i=l=>n===void 0?!0:n==="common"?Ss.has(l):!Ss.has(l),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=$a(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[ut(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[ut(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[ut(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[ut(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[ut(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[ut(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[ut(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[ut(e,"textTextAppearance")]=t.textTextAppearance),o}function Bo(e={},t){return io.reduce((n,i)=>({...n,...Zg(i,Jg(i,e),t)}),{})}const Qg=Bo(),eh=Lg();function Hl(e){return[ut(e,"textFontFamily"),ut(e,"textFontSettings"),ut(e,"textFontSize"),ut(e,"textLineHeight"),ut(e,"textLetterSpacing"),ut(e,"textWordSpacing"),ut(e,"textTextAlign"),ut(e,"textTextAppearance"),`${e}VerticalAlign`]}function th(){const e=[];return Sa.forEach((t,n)=>{const i=Vn[n],o=Hl(t);for(let l=1;l<Vn.length;l+=1){const s=[{name:"columns",value:l},...Array.from({length:l},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:s,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const nh=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Hl(Pn);const ih=[...Oi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],ti=[{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"}],oh=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:ti[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:ti[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:ti[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:ti[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:ti[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:ti[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:ti[6],link:""}],rh=[...Oi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],ah={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Gg(),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:oh},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"}},...Kg(),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"}},...Xg,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",...Qg,...Bo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:ws({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},...Bo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:ws({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},...Bo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...th(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...ih.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}},...Oi.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",...rh]},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__",eh]}],paletteBookmark:{items:[...nh],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},sh={element:Dg,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Ng(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:[...io.map(e=>({path:`${ut(e,"textFontFamily")}`}))]},fontRelations:{...io.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${ut(t,"textFontFamily")}`}),{})},schema:ah,sourceCode:Vg},$s=300,Fn=.004,lh={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"},ch=["hover","focus","filled","success","error"];function dh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ts(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:L.scalingValue((o-t)/2,i)}}function uh(e){return`
11927
+ `,Vi=["A","B","C","D","E"],Hs=[...la,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],oi={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 uh(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Ho(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function ph(){return Object.fromEntries(Vi.map((e,t)=>{const n=Un[t],i=`${e} column`;return[n,uh(i)]}))}function mh(){const e={};for(const t of Vi)e[`${t}ColumnWidth`]=Ho(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Ho(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Ho(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Ho(`${t} column padding bottom`);return e}function Ns(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Un]};for(const s of Vi)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 gh(e){const t={};if(e===An)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...la]},enum:[...la]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Hs],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Hs]}}return t[vt(e,"textFontFamily")]={type:"string",scope:"layout",title:"",display:{type:"font-family-select",hideLabel:!0}},t[vt(e,"textFontSettings")]={...oi.fontSettings,scope:"layout",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[vt(e,"textFontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[vt(e,"textLineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[vt(e,"textLetterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[vt(e,"textWordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[vt(e,"textTextAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[vt(e,"textTextAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const hh=uo.reduce((e,t)=>({...e,...gh(t)}),{});function fh(e){return{verticalAlign:e===An?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===An?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function yh(e,t={}){var n;return{...fh(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Os=new Set(["textFontFamily","textFontSettings"]);function vh(e,t,n){const i=s=>n===void 0?!0:n==="common"?Os.has(s):!Os.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=ja(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[vt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[vt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[vt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[vt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[vt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[vt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[vt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[vt(e,"textTextAppearance")]=t.textTextAppearance),o}function Jo(e={},t){return uo.reduce((n,i)=>({...n,...vh(i,yh(i,e),t)}),{})}const xh=Jo(),bh=qg();function nc(e){return[vt(e,"textFontFamily"),vt(e,"textFontSettings"),vt(e,"textFontSize"),vt(e,"textLineHeight"),vt(e,"textLetterSpacing"),vt(e,"textWordSpacing"),vt(e,"textTextAlign"),vt(e,"textTextAppearance"),`${e}VerticalAlign`]}function wh(){const e=[];return Oa.forEach((t,n)=>{const i=Un[n],o=nc(t);for(let s=1;s<Un.length;s+=1){const l=[{name:"columns",value:s},...Array.from({length:s},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:l,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Sh=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];nc(An);const $h=[...Vi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],ri=[{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"}],Ch=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:ri[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:ri[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:ri[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:ri[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:ri[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:ri[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:ri[6],link:""}],Th=[...Vi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Lh={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...ph(),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:Ch},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"}},...mh(),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"}},...hh,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",...xh,...Jo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ns({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},...Jo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ns({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},...Jo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...wh(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...$h.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}},...Vi.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",...Th]},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__",bh]}],paletteBookmark:{items:[...Sh],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Ih={element:ch,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>ih(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:[...uo.map(e=>({path:`${vt(e,"textFontFamily")}`}))]},fontRelations:{...uo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${vt(t,"textFontFamily")}`}),{})},schema:Lh,sourceCode:dh},js=300,Hn=.004,Rh={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"},Eh=["hover","focus","filled","success","error"];function Mh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Bs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function zs(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:E.scalingValue((o-t)/2,i)}}function kh(e){return`
11954
11928
  .${e}-wrapper {
11955
11929
  box-sizing: border-box;
11956
11930
  display: flex;
@@ -12012,7 +11986,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12012
11986
  display: flex;
12013
11987
  align-items: center;
12014
11988
  justify-content: space-between;
12015
- gap: ${dh(20)};
11989
+ gap: ${Mh(20)};
12016
11990
  width: 100%;
12017
11991
  min-width: 0;
12018
11992
  min-height: var(--${e}-question-min-height, unset);
@@ -12040,7 +12014,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12040
12014
  width: var(--${e}-icon-max-width);
12041
12015
  height: var(--${e}-icon-max-width);
12042
12016
  position: relative;
12043
- transition: transform ${$s}ms ease;
12017
+ transition: transform ${js}ms ease;
12044
12018
  }
12045
12019
  .${e}-icon-custom {
12046
12020
  display: flex;
@@ -12075,7 +12049,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12075
12049
  .${e}-panel {
12076
12050
  display: grid;
12077
12051
  grid-template-rows: 0fr;
12078
- transition: grid-template-rows ${$s}ms ease;
12052
+ transition: grid-template-rows ${js}ms ease;
12079
12053
  }
12080
12054
  .${e}-item-open .${e}-panel {
12081
12055
  grid-template-rows: 1fr;
@@ -12143,7 +12117,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12143
12117
  left: 20px;
12144
12118
  transform: translateY(-50%);
12145
12119
  }
12146
- `}function Ls(e,t,n,i,o,l,s,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:l??0,textAppearance:s,color:d??"#000000"}}function ph({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l}){const{prefix:s}=L.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:y="solid",entryHoverEffect:w="default",autoclose:$="off",icon:h,iconMaxWidth:v=.00833,iconPaddingRight:S=0,iconAnimation:T="rotate 45",questionColor:R="#000000",answerColor:P="#000000",dividerColor:H="#0000001F",iconColor:E="#000000",questionHoverColor:j="#666666",iconHoverColor:k="#666666",iconActiveColor:x="#000000",dividerHoverColor:Y="#000000",questionFontFamily:f,questionFontSettings:A,questionFontSize:W,questionLineHeight:z,questionLetterSpacing:G,questionWordSpacing:le,questionTextAppearance:J,answerFontFamily:D,answerFontSettings:N,answerFontSize:C,answerLineHeight:I,answerLetterSpacing:V,answerWordSpacing:K,answerTextAppearance:ee,questionPaddingLeft:O=0,questionPaddingTop:ge=0,questionPaddingBottom:g=0,answerPaddingLeft:he=0,answerPaddingRight:re=0,answerPaddingTop:be=0,answerPaddingBottom:ke=0}=e,ae=t??[],[ve,U]=a.useState(()=>new Set),xe=!n||i;a.useEffect(()=>{U(new Set)},[$]),a.useEffect(()=>{n&&!o&&!i&&U(new Set)},[n,o,i]);const me=Be=>L.scalingValue(Be,n??!1),pe=Math.max(O,Fn),se=Math.max(ge,Fn),Te=Math.max(g,Fn),Ie=Math.max(he,Fn),fe=Math.max(re,Fn),Se=Math.max(be,Fn),_=Math.max(ke,Fn),te=Math.max(0,(c??1)-S-v),M=Math.max(0,(c??1)-re),X=Math.max(0,(c??1)-he),Z=Math.max(S,Fn),ce=Math.max(0,(c??1)-O-v),ue=a.useMemo(()=>ve.size===0?0:Math.min(...ve),[ve]),ye=a.useCallback(Be=>ve.has(Be),[ve]),Le=xe&&w==="default"?`${s}-entry-hover-default`:"",q=h??"",de=q!=="",Ee=T.replace(/^rotate /,""),Q=`${s}-icon-anim-${Ee}`,ne=pn(Xt(Ls(f,A,W,z,G,le,J,R),n)),Fe=pn(Xt(Ls(D,N,C,I,V,K,ee,P),n)),We=Cs(W,z,`${s}-question`,`${s}-text-tight-leading`),Ge=Cs(C,I,`${s}-answer-text`,`${s}-text-tight-leading`),Ze=Ts(W,z,s,n),ct=Ts(C,I,s,n),pt=L.buildColorVars(s,{questionColor:R,answerColor:P,dividerColor:H,iconColor:E,questionHoverColor:j,iconHoverColor:k,iconActiveColor:x,dividerHoverColor:Y},lh,ch),Xe=l&&l!=="default"?`${s}-state-${l}`:"",vt=a.useCallback(Be=>{xe&&U(dt=>{if(dt.has(Be)){const ot=new Set(dt);return ot.delete(Be),ot}if($==="on")return new Set([Be]);const mt=new Set(dt);return mt.add(Be),mt})},[xe,$]),St=a.useMemo(()=>uh(s),[s]),et={[`--${s}-divider-width`]:L.scalingValue(m,n??!1),[`--${s}-divider-style`]:y,[`--${s}-icon-max-width`]:L.scalingValue(v,n??!1),...u>0?{[`--${s}-question-min-height`]:L.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:St}}),r.jsx("div",{style:pt,children:r.jsx("div",{className:it(`${s}-wrapper`,n&&!i&&`${s}-editor`,Le,Xe),style:{width:L.scalingValue(c,n??!1),maxWidth:"100%",...et},children:ae.map((Be,dt)=>{var At;const mt=ye(dt),ot=((At=Be.question)==null?void 0:At.trim())??"",Pt=Be.answer,Ht=((Pt==null?void 0:Pt.length)??0)>0,tt=d&&dt===ue;return r.jsxs("div",{className:it(`${s}-item`,mt&&`${s}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${s}-question-controls`,children:[tt&&r.jsxs(r.Fragment,{children:[r.jsx(Jt,{"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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:me(se),zIndex:2}}),r.jsx(Jt,{"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(te),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:me(pe),height:"100%",zIndex:2}}),r.jsx(Jt,{"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(ce),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:me(Z),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${s}-question-button`,"aria-expanded":mt,style:{...ne,...Ze,paddingLeft:me(O),paddingRight:me(S)},onClick:()=>vt(dt),children:[ge>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:me(ge)},"aria-hidden":"true"}),r.jsxs("span",{className:`${s}-question-row`,children:[r.jsx("span",{className:We,children:ot}),Ht&&(de?r.jsx("span",{className:`${s}-icon ${s}-icon-custom ${Q}`,"aria-hidden":"true",children:r.jsx(mn,{url:q,fill:E,hoverFill:k,className:`${s}-icon-image`})}):r.jsx("span",{className:`${s}-icon ${s}-icon-default ${Q}`,"aria-hidden":"true"}))]}),g>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:me(g)},"aria-hidden":"true"})]}),tt&&r.jsx(Jt,{"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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:me(Te),zIndex:2}})]}),Ht&&Pt&&r.jsx("div",{className:`${s}-panel`,"aria-hidden":!mt,children:r.jsx("div",{className:`${s}-panel-inner`,children:r.jsxs("div",{className:`${s}-answer-controls`,children:[tt&&mt&&r.jsxs(r.Fragment,{children:[r.jsx(Jt,{"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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:me(Se),zIndex:2}}),r.jsx(Jt,{"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(M),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:me(Ie),height:"100%",zIndex:2}}),r.jsx(Jt,{"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(X),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:me(fe),height:"100%",zIndex:2}})]}),be>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:me(be)}}),r.jsx("div",{className:`${s}-answer`,style:{...Fe,...ct,paddingLeft:me(he),paddingRight:me(re)},children:r.jsx("div",{className:Ge,children:r.jsx(Ti,{content:Pt})})}),ke>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:me(ke)}}),tt&&mt&&r.jsx(Jt,{"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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:me(_),zIndex:2}})]})})})]},dt)})})})]})}const mh=`import { useCallback, useEffect, useMemo, useState } from 'react';
12120
+ `}function Ds(e,t,n,i,o,s,l,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:l,color:d??"#000000"}}function Ph({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=E.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:v="solid",entryHoverEffect:b="default",autoclose:S="off",icon:y,iconMaxWidth:w=.00833,iconPaddingRight:C=0,iconAnimation:L="rotate 45",questionColor:k="#000000",answerColor:A="#000000",dividerColor:O="#0000001F",iconColor:P="#000000",questionHoverColor:D="#666666",iconHoverColor:R="#666666",iconActiveColor:x="#000000",dividerHoverColor:U="#000000",questionFontFamily:h,questionFontSettings:I,questionFontSize:W,questionLineHeight:V,questionLetterSpacing:Y,questionWordSpacing:ae,questionTextAppearance:Z,answerFontFamily:G,answerFontSettings:H,answerFontSize:$,answerLineHeight:M,answerLetterSpacing:q,answerWordSpacing:z,answerTextAppearance:ee,questionPaddingLeft:_=0,questionPaddingTop:ye=0,questionPaddingBottom:f=0,answerPaddingLeft:ve=0,answerPaddingRight:K=0,answerPaddingTop:le=0,answerPaddingBottom:$e=0}=e,oe=t??[],[fe,X]=a.useState(()=>new Set),be=!n||i;a.useEffect(()=>{X(new Set)},[S]),a.useEffect(()=>{n&&!o&&!i&&X(new Set)},[n,o,i]);const xe=Ue=>E.scalingValue(Ue,n??!1),pe=Math.max(_,Hn),se=Math.max(ye,Hn),Re=Math.max(f,Hn),ke=Math.max(ve,Hn),we=Math.max(K,Hn),Se=Math.max(le,Hn),B=Math.max($e,Hn),re=Math.max(0,(c??1)-C-w),F=Math.max(0,(c??1)-K),te=Math.max(0,(c??1)-ve),ne=Math.max(C,Hn),ue=Math.max(0,(c??1)-_-w),me=a.useMemo(()=>fe.size===0?0:Math.min(...fe),[fe]),he=a.useCallback(Ue=>fe.has(Ue),[fe]),Le=be&&b==="default"?`${l}-entry-hover-default`:"",Q=y??"",ge=Q!=="",Ae=L.replace(/^rotate /,""),ie=`${l}-icon-anim-${Ae}`,j=hn(Qt(Ds(h,I,W,V,Y,ae,Z,k),n)),Oe=hn(Qt(Ds(G,H,$,M,q,z,ee,A),n)),Fe=Bs(W,V,`${l}-question`,`${l}-text-tight-leading`),et=Bs($,M,`${l}-answer-text`,`${l}-text-tight-leading`),Ye=zs(W,V,l,n),at=zs($,M,l,n),mt=E.buildColorVars(l,{questionColor:k,answerColor:A,dividerColor:O,iconColor:P,questionHoverColor:D,iconHoverColor:R,iconActiveColor:x,dividerHoverColor:U},Rh,Eh),De=s&&s!=="default"?`${l}-state-${s}`:"",it=a.useCallback(Ue=>{be&&X(ht=>{if(ht.has(Ue)){const ct=new Set(ht);return ct.delete(Ue),ct}if(S==="on")return new Set([Ue]);const xt=new Set(ht);return xt.add(Ue),xt})},[be,S]),$t=a.useMemo(()=>kh(l),[l]),ot={[`--${l}-divider-width`]:E.scalingValue(m,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:E.scalingValue(w,n??!1),...u>0?{[`--${l}-question-min-height`]:E.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$t}}),r.jsx("div",{style:mt,children:r.jsx("div",{className:pt(`${l}-wrapper`,n&&!i&&`${l}-editor`,Le,De),style:{width:E.scalingValue(c,n??!1),maxWidth:"100%",...ot},children:oe.map((Ue,ht)=>{var Tt;const xt=he(ht),ct=((Tt=Ue.question)==null?void 0:Tt.trim())??"",Mt=Ue.answer,_t=((Mt==null?void 0:Mt.length)??0)>0,Qe=d&&ht===me;return r.jsxs("div",{className:pt(`${l}-item`,xt&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[Qe&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{"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:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:xe(se),zIndex:2}}),r.jsx(nn,{"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(re),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:xe(pe),height:"100%",zIndex:2}}),r.jsx(nn,{"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(ue),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:xe(ne),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":xt,style:{...j,...Ye,paddingLeft:xe(_),paddingRight:xe(C)},onClick:()=>it(ht),children:[ye>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:xe(ye)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:Fe,children:ct}),_t&&(ge?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${ie}`,"aria-hidden":"true",children:r.jsx(fn,{url:Q,fill:P,hoverFill:R,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${ie}`,"aria-hidden":"true"}))]}),f>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:xe(f)},"aria-hidden":"true"})]}),Qe&&r.jsx(nn,{"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:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:xe(Re),zIndex:2}})]}),_t&&Mt&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!xt,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[Qe&&xt&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{"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:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:xe(Se),zIndex:2}}),r.jsx(nn,{"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(F),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:xe(ke),height:"100%",zIndex:2}}),r.jsx(nn,{"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(te),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:xe(we),height:"100%",zIndex:2}})]}),le>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:xe(le)}}),r.jsx("div",{className:`${l}-answer`,style:{...Oe,...at,paddingLeft:xe(ve),paddingRight:xe(K)},children:r.jsx("div",{className:et,children:r.jsx(Ei,{content:Mt})})}),$e>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:xe($e)}}),Qe&&xt&&r.jsx(nn,{"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:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:xe(B),zIndex:2}})]})})})]},ht)})})})]})}const Ah=`import { useCallback, useEffect, useMemo, useState } from 'react';
12147
12121
  import cn from 'classnames';
12148
12122
  import { CommonComponentProps } from '../props';
12149
12123
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -12940,7 +12914,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
12940
12914
  </>
12941
12915
  );
12942
12916
  }
12943
- `;function _n(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Is={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},gh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],hh={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:_n("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:{...Is.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:{...Is.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:_n("Question Padding Left"),questionPaddingTop:_n("Question Padding Top"),questionPaddingBottom:_n("Question Padding Bottom"),answerPaddingLeft:_n("Answer Padding Left"),answerPaddingRight:_n("Answer Padding Right"),answerPaddingTop:_n("Answer Padding Top"),answerPaddingBottom:_n("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:[...gh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},fh={element:ph,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:hh,sourceCode:mh},kn=e=>e.display==="cover",ur=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Rs=100,yh=.2,Es=8,Ol=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,l]=a.useState(0),[s,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Rs:Math.max(Rs,window.innerHeight*yh),[]),y=a.useCallback(f=>Math.max(0,1-f/(m*1.5)),[m]),w=a.useCallback(f=>Math.max(0,1-f/(m*.45)),[m]),$=a.useCallback(f=>{const A=typeof window<"u"?window.innerHeight:800,W=Math.max(.88,1-f/A*.12);return`translateY(${f}px) scale(${W})`},[]),h=a.useCallback(()=>{c.current=null},[]),v=a.useCallback(()=>{d(!0),l(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),S=a.useCallback(()=>{const f=typeof window<"u"?window.innerHeight:800;d(!0),l(f),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),T=a.useCallback(f=>{!e||s||f.pointerType==="touch"&&(i!=null&&i(f.target)||(c.current={startX:f.clientX,startY:f.clientY,isLocked:null,pointerId:f.pointerId}))},[e,s,i]),R=a.useCallback(f=>{const A=c.current;if(!e||!A||f.pointerType!=="touch"||A.pointerId!==f.pointerId)return;const W=f.clientX-A.startX,z=f.clientY-A.startY;if(A.isLocked===null){if(Math.abs(W)<Es&&Math.abs(z)<Es)return;if(z>0&&z>Math.abs(W))A.isLocked=!0,f.currentTarget.setPointerCapture(f.pointerId);else{A.isLocked=!1,h();return}}if(!A.isLocked)return;f.preventDefault();const G=Math.max(0,z);u.current=G,l(G)},[e,h]),P=a.useCallback(f=>{const A=c.current;if(!e||!A||f.pointerType!=="touch"||A.pointerId!==f.pointerId)return;const W=A.isLocked===!0;if(f.currentTarget.hasPointerCapture(f.pointerId)&&f.currentTarget.releasePointerCapture(f.pointerId),!W){h();return}f.clientY-A.startY>=m?S():v()},[m,S,e,h,v]),H=a.useCallback(f=>{P(f)},[P]),E=a.useCallback(f=>{P(f)},[P]),j=o>0,k=s?`transform ${n}ms ease`:"none",x=s?`opacity ${n}ms ease`:"none",Y=o>0||s;return{isSwipeDragging:j,backdropStyle:{opacity:y(o),transition:x},mediaAreaStyle:{transform:$(o),transition:k,touchAction:j?"none":void 0,willChange:j?"transform":void 0},overlayContentStyle:Y?{opacity:w(o),transition:x}:void 0,swipeHandlers:e?{onPointerDown:T,onPointerMove:R,onPointerUp:H,onPointerCancel:E}:{},dismissAreaStyle:e?{touchAction:j?"none":"pan-x"}:void 0}},vh="[data-lightbox-scrollable]",jl=()=>{a.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,l=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 s=d=>{const c=d.target;c instanceof Element&&c.closest(vh)||d.preventDefault()};return document.addEventListener("touchmove",s,{passive:!1}),()=>{document.removeEventListener("touchmove",s),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=l,window.scrollTo(0,e)}},[])},xh=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},bh=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},wh=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Sh=(e,t,n,{duration:i,easing:o,onComplete:l})=>{const s=e.scrollLeft,d=n-s,c=s-n,u=(h,v)=>{bh(t),e.scrollLeft=h,v&&(l==null||l())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,y=0;const w=()=>{t.removeEventListener("transitionend",$),clearTimeout(y)},$=h=>{h.target!==t||h.propertyName!=="transform"||m||(m=!0,w(),u(n,!0))};return t.addEventListener("transitionend",$),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)`,y=window.setTimeout(()=>{m||(m=!0,w(),u(n,!0))},i+64),()=>{m||(m=!0,w(),u(s-wh(t),!1))}},Ui=300,$h=900,Ch=1500,Th="cubic-bezier(0.16, 1, 0.3, 1)",Lh=3e3,Ih=2,Rh=16,Eh=.05,Mh=1,Po=.3,Ph=50,kh=20,gi=.004,Ai=["title1","title2","title3"],Ah={title1:"1",title2:"2",title3:"3"},Wh={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Fh={title1:.02,title2:.02,title3:.02},ko=e=>`max(${e}, ${kh}px)`,_h=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]}},Nh=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=_h(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Hh=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")],Oh=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ai.map(e=>[Ah[e],Hh(e)]))}),La=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const c=Math.min(l,d);return{overflow:l-c,widths:[d-c,...s]}},{overflow:i-1,widths:[]});return o},Bl=(e,t)=>La(e,t),Ao=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ms=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:La(e.length,n),effective:Bl(e.length,n)}},jh=(e,t,n,i,o,l,s)=>{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:l,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:s,text:i}),d},kr=(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[Wh[t]]}},Bh=(e,t,n,i)=>e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),Ar=(e,t,n)=>{var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??Fh[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},zh=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:y,closeIcon:w,closeIconMaxWidth:$,closeIconColor:h,closeIconHoverColor:v,thumbnailTrigger:S,thumbnailVisibility:T,thumbnailObjectFit:R,thumbnailActive:P,thumbnailActiveColor:H,title1Width:E,title2Width:j,title3Width:k,title1MarginLeft:x=0,title2MarginLeft:Y=0,title3MarginLeft:f=0,titleRowMarginBottom:A=0,titleHeaderLayout:W="desktop",contentMarginTop:z,iconMarginLeft:G}=n,le=p=>L.scalingValue(p,i??!1),J=c??n.thumnailSize??.03,D=le(J),N=le(u),C=le(m??.02),I=le(y??0),V=le(z??0),K=ko(V),ee=le(G??0),[O,ge]=a.useState(0),g=a.useRef(O);g.current=O;const he=t[O],{title1:re,title2:be,title3:ke}=Nh(he),ae=Ar("title1",kr(n,"title1"),i),ve=Ar("title2",kr(n,"title2"),i),U=Ar("title3",kr(n,"title3"),i),xe=W==="mobile",me=!o&&(!i||l),pe=me,se=me,Te=me,Ie=kn(R),fe=Ie?{"--image-aspect-ratio":ur(R)}:void 0,Se=!!(re||be||ke),_=a.useMemo(()=>jh(e,re,be,ke,ae,ve,U),[e,O,re,be,ke,ae,ve,U]),te=a.useMemo(()=>({title1Width:E,title2Width:j,title3Width:k}),[E,j,k]),M=a.useMemo(()=>_.map(p=>te[p.widthKey]),[_,te]),X=a.useMemo(()=>La(_.length,M),[_.length,M]),Z=a.useMemo(()=>Bl(_.length,M),[_.length,M]),ce=a.useMemo(()=>_.filter(p=>p.prefix==="title1"),[_]),ue=a.useMemo(()=>_.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[_]),ye=a.useMemo(()=>Ms(ce,te),[ce,te]),Le=a.useMemo(()=>Ms(ue,te),[ue,te]),q=a.useCallback((p,b)=>{const F=_.indexOf(p);if(!xe||b==="single-row")return{effectiveWidth:Z[F]??0,resolvedWidth:X[F]??0,maxWidth:Ao(F,X)};if(b==="two-row-top"){const we=ce.indexOf(p);return{effectiveWidth:ye.effective[we]??0,resolvedWidth:ye.resolved[we]??0,maxWidth:Ao(we,ye.resolved)}}const oe=ue.indexOf(p);return{effectiveWidth:Le.effective[oe]??0,resolvedWidth:Le.resolved[oe]??0,maxWidth:Ao(oe,Le.resolved)}},[ue,Le,Z,X,_,ce,ye,xe]),de=a.useCallback(p=>L.scalingValue(p,i??!1),[i]),Ee=de(A??0),Q=a.useMemo(()=>({title1MarginLeft:x,title2MarginLeft:Y,title3MarginLeft:f}),[x,Y,f]),ne=a.useCallback(p=>_.slice(0,p+1).reduce((b,F,oe)=>b+(F!=null&&F.marginLeftKey?Q[F.marginLeftKey]??0:0)+(X[oe]??0),0)+(xe?0:x??0),[_,Q,X,xe,x]),Fe=a.useCallback(()=>xe?0:x??0,[xe,x]),We=a.useCallback(p=>ue.slice(0,p).reduce((b,F,oe)=>b+(F.marginLeftKey?Q[F.marginLeftKey]??0:0)+(Le.resolved[oe]??0),0),[ue,Le.resolved,Q]),Ge=a.useCallback(p=>{const b=ue[p];return We(p)+(b.marginLeftKey?Q[b.marginLeftKey]??0:0)+(Le.resolved[p]??0)},[ue,Le.resolved,We,Q]),Ze=(p,b)=>{const F=p.marginLeftKey?Q[p.marginLeftKey]??0:0,{effectiveWidth:oe,resolvedWidth:we,maxWidth:Pe}=q(p,b),Ue=o&&b==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...b==="single-row"?{gridArea:p.prefix}:{},width:de(oe),...F>0?{marginLeft:de(F)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),Ue&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we),style:{position:"absolute",top:0,left:de(-F),width:`max(${de(F)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Ue&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:de(-gi/2),width:de(gi),height:"100%",pointerEvents:"auto"}})]},p.className)},ct=()=>{const p=xe?-1:_.findIndex(oe=>oe.prefix==="title1"),b=!xe&&(o||(x??0)>0)?(()=>{const oe=x??0,we=p>=0?X[p]:E??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we),style:{position:"absolute",top:0,left:0,width:`max(${de(oe)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,F=_.flatMap((oe,we)=>{if(!oe.marginLeftKey)return[];const Pe=Q[oe.marginLeftKey]??0,Ue=Bh(_,X,Q,we)+Fe();return r.jsx("div",{"data-controls":oe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(X[we]),style:{position:"absolute",top:0,left:de(Ue),width:`max(${de(Pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},oe.marginLeftKey)});return b?[b,...F]:F},pt=()=>_.map((p,b)=>{const F=Ao(b,X),we=ne(b)-gi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:de(we),width:de(gi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),Xe=()=>ue.flatMap((p,b)=>{if(!p.marginLeftKey)return[];const F=Q[p.marginLeftKey]??0,oe=We(b),{resolvedWidth:we}=q(p,"two-row-bottom");return r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we),style:{position:"absolute",top:0,left:de(oe),width:`max(${de(F)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),vt=()=>ue.map((p,b)=>{const{maxWidth:F}=q(p,"two-row-bottom"),we=Ge(b)-gi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:de(we),width:de(gi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),St=a.useRef(null),et=a.useRef(null),Be=a.useRef(null),dt=a.useRef(null),mt=a.useRef([]),ot=a.useRef([]),Pt=a.useRef(0),Ht=a.useRef(null),tt=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),At=a.useRef(null),It=a.useRef(null),ze=a.useRef(0),Qe=a.useRef("forward"),He=a.useRef(0),st=a.useRef(null),$t=a.useRef(!1),Ct=t.length>1&&(!o||!!l),Zt=Ct?3:1,an=a.useMemo(()=>Array.from({length:Zt},()=>t).flat(),[t,Zt]),[sn,ht]=a.useState(!1),[jt,Yt]=a.useState(!1),[qt,Rt]=a.useState(!0),Qt=a.useRef(null),Ce=a.useRef(null),_e=a.useRef(!1),De=a.useRef(!1),Oe=a.useRef(null),Ne=a.useRef(null),rt=pe&&!qt,Me=a.useCallback(()=>{pe&&(Rt(!0),Ne.current&&clearTimeout(Ne.current),Ne.current=setTimeout(()=>{tt.current.isActive||Rt(!1)},Lh))},[pe]),Ye=a.useCallback(()=>{o||De.current||(De.current=!0,Yt(!1),Oe.current=setTimeout(()=>{s()},Ui))},[o,s]),Ke=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rt?"true":"false",style:{width:L.scalingValue($??0,i),height:L.scalingValue($??0,i),marginRight:ee,"--close-icon-hover-color":v},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ye,"aria-label":"Close",children:r.jsx(mn,{url:w,fill:h,hoverFill:i&&!l?h:v,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:ee,height:"100%",pointerEvents:"auto"}})]}),Et=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:de(x??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),xt=()=>{const p=_.find(oe=>oe.prefix==="title1"),b=_.filter(oe=>oe.prefix==="title2"||oe.prefix==="title3"),F=b.length>0||o||(A??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(x??0)>0||o?Et():null,p&&Ze(p,"two-row-top"),w&&Ke()]}),F?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[b.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[b.map(oe=>Ze(oe,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Xe(),vt()]})]}):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:Ee,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ft=()=>r.jsxs(r.Fragment,{children:[(x??0)>0||o?Et("single-row"):null,_.map(p=>Ze(p,"single-row")),o?r.jsxs(r.Fragment,{children:[ct(),pt()]}):null,w?Ke():null]}),Wt=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Tt,backdropStyle:Bt,mediaAreaStyle:Ft,overlayContentStyle:kt,swipeHandlers:en,dismissAreaStyle:yt}=Ol({enabled:me??!1,onClose:Ye,animMs:Ui,isBlockedTarget:Wt}),zt=()=>{if(!Ct||t.length===0)return Pt.current=0,0;const p=ot.current[0],b=ot.current[t.length];if(!p||!b)return Pt.current;const F=b.offsetLeft-p.offsetLeft;return F>0&&(Pt.current=F),Pt.current},at=(p=!1)=>{if(!Ct)return;const b=et.current,F=zt();!b||F<=0||F<b.clientWidth*.25||(b.scrollLeft<=0?(b.scrollLeft+=F,p&&(tt.current.scrollLeft+=F),$t.current&&(He.current+=F)):b.scrollLeft>=F*2&&(b.scrollLeft-=F,p&&(tt.current.scrollLeft-=F),$t.current&&(He.current-=F)))},_t=(p,b=(F=>(F=et.current)==null?void 0:F.scrollLeft)()??0)=>{if(!Ct)return p;let oe=t.length+p,we=1/0;for(let Pe=0;Pe<Zt;Pe++){const Ue=Pe*t.length+p,lt=ot.current[Ue];if(!lt)continue;const Ut=Math.abs(lt.offsetLeft-b);Ut<we&&(we=Ut,oe=Ue)}return oe},Gt=p=>{const b=et.current;return!p||!b?!1:p.offsetWidth>b.clientWidth+1},ie=p=>{const b=et.current;if(!p||!b||!Gt(p))return!1;const F=p.offsetLeft,oe=F+p.offsetWidth;return b.scrollLeft>=F-1&&b.scrollLeft+b.clientWidth<=oe+1},Ae=(p=(b=>(b=et.current)==null?void 0:b.scrollLeft)()??0)=>{for(let oe=0;oe<ot.current.length;oe+=1){const we=ot.current[oe];if(we&&ie(we))return oe}let F={flatIndex:0,distance:1/0};return ot.current.forEach((oe,we)=>{if(!oe)return;const Pe=Math.abs(oe.offsetLeft-p);Pe<F.distance&&(F={flatIndex:we,distance:Pe})}),F.flatIndex},Ve=p=>{et.current&&ot.current.forEach(b=>{b&&(b.style.scrollSnapAlign=Gt(b)&&p==="backward"?"end":"start")})},qe=(p,b,F)=>{const oe=p-b,we=Ae(b),Pe=ot.current[we];if(ie(Pe))return Ae(p)%t.length;const Ue=ot.current[we+1],lt=Pe?Ue?Ue.offsetLeft-Pe.offsetLeft:Pe.offsetWidth:0,Ut=lt>0?oe>lt*Po?1:oe<-lt*Po?-1:0:0;return Ut===0?F:Ct?(F+Ut+t.length)%t.length:Math.max(0,Math.min(t.length-1,F+Ut))},bt=a.useCallback((p=!1)=>{if(T!=="on"||o)return;const b=dt.current,F=g.current,oe=mt.current[F];if(!b||!oe||b.scrollWidth<=b.clientWidth)return;const we=b.scrollLeft,Pe=we+b.clientWidth,Ue=oe.offsetLeft,lt=Ue+oe.offsetWidth;if(Ue>=we&&lt<=Pe)return;const Ut=b.scrollWidth-b.clientWidth;let Dt=we;if(!p&&Qt.current===null){const pi=mt.current[F-1],ji=mt.current[F+1],bo=pi?oe.offsetLeft-pi.offsetLeft:ji?ji.offsetLeft-oe.offsetLeft:oe.offsetWidth;lt>Pe?Dt+=bo:Ue<we&&(Dt-=bo)}else lt>Pe?Dt=lt-b.clientWidth:Dt=Ue;b.scrollLeft=Math.max(0,Math.min(Ut,Dt))},[o,T]),Kt=a.useCallback((p=!1)=>{p&&(_e.current=!0),Ce.current===null&&(Ce.current=requestAnimationFrame(()=>{Ce.current=null;const b=_e.current;_e.current=!1,bt(b)}))},[bt]),gt=a.useCallback(p=>{if(p===g.current)return;const b=g.current;g.current=p;const F=Math.abs(p-b)>1,oe=Ct&&t.length>1&&(b===t.length-1&&p===0||b===0&&p===t.length-1);ge(p),Kt(F||oe)},[t.length,Ct,Kt]),wt=()=>{if(!et.current||t.length===0||Qt.current!==null||tt.current.isActive&&tt.current.hasMoved)return;const p=et.current.scrollLeft,b=Ae(p)%t.length;b!==g.current&&gt(b)},tn=()=>{Qt.current=null},Ot=p=>{const b=et.current;b&&(b.style.scrollSnapType=p?"":"none")},fn=()=>{var p;(p=It.current)==null||p.call(It),It.current=null},bn=()=>{st.current!==null&&(cancelAnimationFrame(st.current),st.current=null),$t.current=!1},Un=()=>{const p=et.current;if(!p){st.current=null,$t.current=!1;return}const b=He.current-p.scrollLeft;if(Math.abs(b)<.5){p.scrollLeft=He.current,at(),wt(),st.current=null,$t.current=!1;return}p.scrollLeft+=b*Eh,at(),wt(),Me(),st.current=requestAnimationFrame(Un)},Xn=()=>{const p=Be.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},fo=(p,b,F,oe)=>{Xn(),p.scrollLeft=b,ze.current=p.scrollLeft,at(),F!==void 0?(g.current=F,ge(F)):wt(),Ot(!0),oe==null||oe()},yo=(p,{behavior:b="smooth",activeIndex:F,onComplete:oe}={})=>{const we=et.current,Pe=Be.current;if(!we||!Pe)return;if(bn(),fn(),Ot(!1),b==="auto"){fo(we,p,F,oe);return}const Ue=Math.abs(p-we.scrollLeft),lt=xh(Ue,$h,Ch,we.clientWidth*.55);It.current=Sh(we,Pe,p,{duration:lt,easing:Th,onComplete:()=>{It.current=null,fo(we,p,F,oe)}})},pr=(p="smooth")=>{const b=et.current;if(!b||t.length===0)return;const F=Ae()%t.length,oe=_t(F,b.scrollLeft),we=ot.current[oe];we&&yo(we.offsetLeft,{behavior:p,activeIndex:F})},mr=(p,b="smooth",F,oe)=>{const we=et.current;if(!we||t.length===0)return;const Pe=(oe??we.scrollLeft)-p,Ue=Ae(p),lt=ot.current[Ue];if(ie(lt)){Ot(!0),wt();return}const Ut=ot.current[Ue+1],Dt=lt?Ut?Ut.offsetLeft-lt.offsetLeft:lt.offsetWidth:0;if((Dt>0?Pe>Dt*Po?1:Pe<-Dt*Po?-1:0:0)!==0){const Vl=F??Ue%t.length,ql=qe(oe??we.scrollLeft,p,Vl);wn(ql,b);return}const ji=oe??we.scrollLeft,bo=Ae(ji),Ia=ot.current[bo];if(Ia&&Math.abs(Ia.offsetLeft-ji)<1){Ot(!0),wt();return}pr("auto")},wn=(p,b="smooth")=>{const F=et.current;if(!F||t.length===0)return;const oe=_t(p,F.scrollLeft),we=ot.current[oe];we&&(b==="smooth"?Qt.current=p:Qt.current=null,g.current=p,ge(p),Kt(!0),yo(we.offsetLeft,{behavior:b,activeIndex:p,onComplete:b==="smooth"?tn:void 0}))},ui=()=>{At.current&&(window.removeEventListener("pointerup",At.current),window.removeEventListener("pointercancel",At.current),At.current=null)},vo=(p,b,F,oe,we)=>{const Pe=F-p,Ue=oe-b,lt=Math.abs(Pe),Ut=Math.abs(Ue);if(lt<Ph||lt<=Ut)return!1;const Dt=Pe<0?1:-1,pi=Ct?(we+Dt+t.length)%t.length:Math.max(0,Math.min(t.length-1,we+Dt));return pi===we?!1:(wn(pi),!0)},Yn=p=>{if(!tt.current.isActive)return;ui();const b=et.current;if(!b)return;const{scrollLeft:F,startActiveIndex:oe,hasMoved:we}=tt.current,Pe=b.scrollLeft;at(!0),tt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ht(!1),p!==void 0&&b.hasPointerCapture(p)&&b.releasePointerCapture(p),we?mr(F,"smooth",oe,Pe):(Ot(!0),wt()),Me()},xo=(p,b)=>{const F=Ht.current;Ht.current=null,F&&(vo(F.startX,F.startY,p,b,F.startActiveIndex),Me())},gr=p=>{if(!se)return;if(p.pointerType==="touch"){if(bn(),Ot(!0),Wt(p.target))return;Ht.current={startX:p.clientX,startY:p.clientY,startActiveIndex:g.current};return}if(p.pointerType!=="mouse"||p.button!==0||Wt(p.target))return;const b=et.current;if(!b)return;bn(),fn(),Xn(),Qt.current=null,tt.current={isActive:!0,startX:p.clientX,scrollLeft:b.scrollLeft,startActiveIndex:g.current,hasMoved:!1},Ot(!1),Me(),b.setPointerCapture(p.pointerId),ui();const F=oe=>{oe.pointerType==="mouse"&&Yn(oe.pointerId)};At.current=F,window.addEventListener("pointerup",F),window.addEventListener("pointercancel",F)},hr=p=>{if(!se||p.pointerType!=="mouse")return;const b=et.current;if(!b||!tt.current.isActive)return;if(p.buttons===0){Yn(p.pointerId);return}const F=p.clientX-tt.current.startX;Math.abs(F)>Mh&&(tt.current.hasMoved=!0,ht(!0)),tt.current.hasMoved&&(p.preventDefault(),b.scrollLeft=tt.current.scrollLeft-F,at(!0),wt(),Me())},B=p=>{if(se){if(p.pointerType==="touch"){p.type==="pointerup"?xo(p.clientX,p.clientY):Ht.current=null;return}p.pointerType==="mouse"&&Yn(p.pointerId)}},$e=p=>{!se||p.pointerType!=="mouse"||Yn(p.pointerId)};return jl(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Yt(!0));return()=>{cancelAnimationFrame(p),fn(),ui(),Ce.current!==null&&(cancelAnimationFrame(Ce.current),Ce.current=null),Oe.current&&clearTimeout(Oe.current),Ne.current&&clearTimeout(Ne.current)}},[]),a.useEffect(()=>{if(!pe){Rt(!0);return}Me();const p=St.current;if(!p)return;const b=()=>Me();return p.addEventListener("pointermove",b),p.addEventListener("pointerdown",b),()=>{p.removeEventListener("pointermove",b),p.removeEventListener("pointerdown",b),Ne.current&&clearTimeout(Ne.current)}},[pe,Me]),a.useEffect(()=>{const p=b=>{b.key==="Escape"&&Ye()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Ye]),a.useLayoutEffect(()=>{zt()},[I,t.length,Ct]),a.useLayoutEffect(()=>{o||wn(g.current,"auto")},[I,o]),a.useLayoutEffect(()=>{wn(0,"auto")},[t.length,Ct]),a.useEffect(()=>{const p=et.current;if(!p||o||!me)return;const b=F=>{if(F.preventDefault(),Math.abs(F.deltaY)<=Math.abs(F.deltaX))return;const oe=F.deltaMode===1?Rh:F.deltaMode===2?p.clientHeight:1,we=F.deltaY*oe*Ih;if(we!==0){if(fn(),$t.current||($t.current=!0,He.current=p.scrollLeft,Qt.current=null,Ot(!1)),He.current+=we,!Ct){const Pe=p.scrollWidth-p.clientWidth;He.current=Math.max(0,Math.min(Pe,He.current))}Me(),st.current===null&&(st.current=requestAnimationFrame(Un))}};return p.addEventListener("wheel",b,{passive:!1}),()=>{p.removeEventListener("wheel",b),bn()}},[o,me,Ct]),a.useEffect(()=>{const p=et.current;if(!p)return;const b=()=>{at(tt.current.isActive);const oe=p.scrollLeft,we=oe-ze.current;ze.current=oe;const Pe=Pt.current>0?Pt.current*.5:1/0;if(we!==0&&Math.abs(we)<Pe){const Ue=we>0?"forward":"backward";Ue!==Qe.current&&(Qe.current=Ue,Ve(Ue))}tt.current.isActive&&tt.current.hasMoved||wt()};p.addEventListener("scroll",b,{passive:!0});const F=new ResizeObserver(()=>{zt(),at(tt.current.isActive),Ve(Qe.current),wt()});return F.observe(p),()=>{fn(),p.removeEventListener("scroll",b),F.disconnect()}},[t.length,Ct]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Tt||Ye()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:jt?1:0,transition:`opacity ${Ui}ms ease`,pointerEvents:jt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Bt}}),r.jsxs("div",{ref:St,className:`${e}-lightbox-dismiss-area`,style:yt,...en,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ft,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:et,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":se&&t.length>0?"true":"false","data-mouse-dragging":sn?"true":"false",onPointerDown:gr,onPointerMove:hr,onPointerUp:B,onPointerCancel:B,onLostPointerCapture:$e,children:r.jsx("div",{ref:Be,className:`${e}-lightbox-strip-track`,style:{gap:I},children:an.map((p,b)=>{const F=p.image.objectFit??"contain",oe=b%t.length,we=Math.floor(b/t.length),Pe=ko(I),Ue=`calc(-0.5 * (${Pe} + ${I}))`;return r.jsxs("div",{ref:lt=>ot.current[b]=lt,className:`${e}-strip-item`,style:{height:W==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:p.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:F}}),o&&oe<t.length-1&&we===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ue,width:Pe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${we}-${p.image.url}-${oe}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rt?"true":"false",style:kt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:V,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:K,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${xe?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||w)&&r.jsx("div",{className:`${e}-header ${xe?`${e}-header-two-row`:`${e}-header-single-row`}`,children:xe?xt():Se||w?ft():null})})})]}),t.length>1&&T==="on"&&(()=>{const p=ko(C),b=`calc(-0.5 * (${C} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:C},children:r.jsx("div",{ref:dt,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:F=>F.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":P,style:{gap:N,"--thumbnail-active-color":H},children:[t.map((F,oe)=>{const we=ko(N),Pe=`calc(-0.5 * (${we} + ${N}))`;return r.jsxs("div",{ref:Ue=>{mt.current[oe]=Ue},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":O===oe?"true":"false",onClick:()=>me&&S==="click"&&wn(oe),onMouseEnter:()=>Te&&S==="hover"&&wn(oe),"aria-label":F.image.name?`View ${F.image.name}`:`View image ${oe+1}`,"aria-current":O===oe?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Ie?` ${e}-thumb-image-cover`:""}`,src:F.image.url,alt:"",draggable:!1,style:{...fe,maxWidth:D,maxHeight:D,width:R.display==="cover"?"auto":"100%",height:"auto",objectFit:R.display==="cover"?"cover":"contain"}})}),o&&oe<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Pe,width:we,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${F.image.url}-${oe}`)}),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:b,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Dh(e){return`
12917
+ `;function Nn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Vs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Wh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Fh={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:Nn("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:{...Vs.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:{...Vs.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:Nn("Question Padding Left"),questionPaddingTop:Nn("Question Padding Top"),questionPaddingBottom:Nn("Question Padding Bottom"),answerPaddingLeft:Nn("Answer Padding Left"),answerPaddingRight:Nn("Answer Padding Right"),answerPaddingTop:Nn("Answer Padding Top"),answerPaddingBottom:Nn("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:[...Wh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},_h={element:Ph,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:Fh,sourceCode:Ah},Wn=e=>e.display==="cover",$r=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Gs=100,Hh=.2,qs=8,ic=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=a.useState(0),[l,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Gs:Math.max(Gs,window.innerHeight*Hh),[]),v=a.useCallback(h=>Math.max(0,1-h/(m*1.5)),[m]),b=a.useCallback(h=>Math.max(0,1-h/(m*.45)),[m]),S=a.useCallback(h=>{const I=typeof window<"u"?window.innerHeight:800,W=Math.max(.88,1-h/I*.12);return`translateY(${h}px) scale(${W})`},[]),y=a.useCallback(()=>{c.current=null},[]),w=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),y()},[n,y]),C=a.useCallback(()=>{const h=typeof window<"u"?window.innerHeight:800;d(!0),s(h),window.setTimeout(()=>{t(),y(),d(!1)},Math.min(n,200))},[n,t,y]),L=a.useCallback(h=>{!e||l||h.pointerType==="touch"&&(i!=null&&i(h.target)||(c.current={startX:h.clientX,startY:h.clientY,isLocked:null,pointerId:h.pointerId}))},[e,l,i]),k=a.useCallback(h=>{const I=c.current;if(!e||!I||h.pointerType!=="touch"||I.pointerId!==h.pointerId)return;const W=h.clientX-I.startX,V=h.clientY-I.startY;if(I.isLocked===null){if(Math.abs(W)<qs&&Math.abs(V)<qs)return;if(V>0&&V>Math.abs(W))I.isLocked=!0,h.currentTarget.setPointerCapture(h.pointerId);else{I.isLocked=!1,y();return}}if(!I.isLocked)return;h.preventDefault();const Y=Math.max(0,V);u.current=Y,s(Y)},[e,y]),A=a.useCallback(h=>{const I=c.current;if(!e||!I||h.pointerType!=="touch"||I.pointerId!==h.pointerId)return;const W=I.isLocked===!0;if(h.currentTarget.hasPointerCapture(h.pointerId)&&h.currentTarget.releasePointerCapture(h.pointerId),!W){y();return}h.clientY-I.startY>=m?C():w()},[m,C,e,y,w]),O=a.useCallback(h=>{A(h)},[A]),P=a.useCallback(h=>{A(h)},[A]),D=o>0,R=l?`transform ${n}ms ease`:"none",x=l?`opacity ${n}ms ease`:"none",U=o>0||l;return{isSwipeDragging:D,backdropStyle:{opacity:v(o),transition:x},mediaAreaStyle:{transform:S(o),transition:R,touchAction:D?"none":void 0,willChange:D?"transform":void 0},overlayContentStyle:U?{opacity:b(o),transition:x}:void 0,swipeHandlers:e?{onPointerDown:L,onPointerMove:k,onPointerUp:O,onPointerCancel:P}:{},dismissAreaStyle:e?{touchAction:D?"none":"pan-x"}:void 0}},Nh="[data-lightbox-scrollable]",oc=()=>{a.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 l=d=>{const c=d.target;c instanceof Element&&c.closest(Nh)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),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)}},[])},Oh=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},jh=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Bh=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},zh=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(y,w)=>{jh(t),e.scrollLeft=y,w&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,v=0;const b=()=>{t.removeEventListener("transitionend",S),clearTimeout(v)},S=y=>{y.target!==t||y.propertyName!=="transform"||m||(m=!0,b(),u(n,!0))};return t.addEventListener("transitionend",S),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)`,v=window.setTimeout(()=>{m||(m=!0,b(),u(n,!0))},i+64),()=>{m||(m=!0,b(),u(l-Bh(t),!1))}},to=300,Dh=900,Vh=1500,Gh="cubic-bezier(0.16, 1, 0.3, 1)",qh=3e3,Kh=2,Uh=16,Xh=.05,Yh=1,No=.3,Jh=50,Zh=20,vi=.004,Hi=["title1","title2","title3"],Qh={title1:"1",title2:"2",title3:"3"},ef={title1:"title1Color",title2:"title2Color",title3:"title3Color"},tf={title1:.02,title2:.02,title3:.02},Oo=e=>`max(${e}, ${Zh}px)`,nf=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]}},of=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=nf(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Nt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,rf=e=>[Nt(e,"fontFamily"),Nt(e,"fontSettings"),{type:"row",items:[Nt(e,"fontSize"),Nt(e,"lineHeight"),Nt(e,"letterSpacing"),Nt(e,"wordSpacing")]},Nt(e,"textAlign"),Nt(e,"textAppearance")],af=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Hi.map(e=>[Qh[e],rf(e)]))}),Da=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},rc=(e,t)=>Da(e,t),jo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ks=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Da(e.length,n),effective:rc(e.length,n)}},sf=(e,t,n,i,o,s,l)=>{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:l,text:i}),d},Gr=(e,t)=>{const n=i=>{const o=Nt(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[ef[t]]}},lf=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),qr=(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??tf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)},cf=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:v,closeIcon:b,closeIconMaxWidth:S,closeIconColor:y,closeIconHoverColor:w,thumbnailTrigger:C,thumbnailVisibility:L,thumbnailObjectFit:k,thumbnailActive:A,thumbnailActiveColor:O,title1Width:P,title2Width:D,title3Width:R,title1MarginLeft:x=0,title2MarginLeft:U=0,title3MarginLeft:h=0,titleRowMarginBottom:I=0,titleHeaderLayout:W="desktop",contentMarginTop:V,iconMarginLeft:Y}=n,ae=p=>E.scalingValue(p,i??!1),Z=c??n.thumnailSize??.03,G=ae(Z),H=ae(u),$=ae(m??.02),M=ae(v??0),q=ae(V??0),z=Oo(q),ee=ae(Y??0),[_,ye]=a.useState(0),f=a.useRef(_);f.current=_;const ve=t[_],{title1:K,title2:le,title3:$e}=of(ve),oe=qr("title1",Gr(n,"title1"),i),fe=qr("title2",Gr(n,"title2"),i),X=qr("title3",Gr(n,"title3"),i),be=W==="mobile",xe=!o&&(!i||s),pe=xe,se=xe,Re=xe,ke=Wn(k),we=ke?{"--image-aspect-ratio":$r(k)}:void 0,Se=!!(K||le||$e),B=a.useMemo(()=>sf(e,K,le,$e,oe,fe,X),[e,_,K,le,$e,oe,fe,X]),re=a.useMemo(()=>({title1Width:P,title2Width:D,title3Width:R}),[P,D,R]),F=a.useMemo(()=>B.map(p=>re[p.widthKey]),[B,re]),te=a.useMemo(()=>Da(B.length,F),[B.length,F]),ne=a.useMemo(()=>rc(B.length,F),[B.length,F]),ue=a.useMemo(()=>B.filter(p=>p.prefix==="title1"),[B]),me=a.useMemo(()=>B.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[B]),he=a.useMemo(()=>Ks(ue,re),[ue,re]),Le=a.useMemo(()=>Ks(me,re),[me,re]),Q=a.useCallback((p,T)=>{const N=B.indexOf(p);if(!be||T==="single-row")return{effectiveWidth:ne[N]??0,resolvedWidth:te[N]??0,maxWidth:jo(N,te)};if(T==="two-row-top"){const Te=ue.indexOf(p);return{effectiveWidth:he.effective[Te]??0,resolvedWidth:he.resolved[Te]??0,maxWidth:jo(Te,he.resolved)}}const de=me.indexOf(p);return{effectiveWidth:Le.effective[de]??0,resolvedWidth:Le.resolved[de]??0,maxWidth:jo(de,Le.resolved)}},[me,Le,ne,te,B,ue,he,be]),ge=a.useCallback(p=>E.scalingValue(p,i??!1),[i]),Ae=ge(I??0),ie=a.useMemo(()=>({title1MarginLeft:x,title2MarginLeft:U,title3MarginLeft:h}),[x,U,h]),j=a.useCallback(p=>B.slice(0,p+1).reduce((T,N,de)=>T+(N!=null&&N.marginLeftKey?ie[N.marginLeftKey]??0:0)+(te[de]??0),0)+(be?0:x??0),[B,ie,te,be,x]),Oe=a.useCallback(()=>be?0:x??0,[be,x]),Fe=a.useCallback(p=>me.slice(0,p).reduce((T,N,de)=>T+(N.marginLeftKey?ie[N.marginLeftKey]??0:0)+(Le.resolved[de]??0),0),[me,Le.resolved,ie]),et=a.useCallback(p=>{const T=me[p];return Fe(p)+(T.marginLeftKey?ie[T.marginLeftKey]??0:0)+(Le.resolved[p]??0)},[me,Le.resolved,Fe,ie]),Ye=(p,T)=>{const N=p.marginLeftKey?ie[p.marginLeftKey]??0:0,{effectiveWidth:de,resolvedWidth:Te,maxWidth:Ne}=Q(p,T),rt=o&&T==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...T==="single-row"?{gridArea:p.prefix}:{},width:ge(de),...N>0?{marginLeft:ge(N)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),rt&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Te),style:{position:"absolute",top:0,left:ge(-N),width:`max(${ge(N)}, 10px)`,height:"100%",pointerEvents:"auto"}}),rt&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ne),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:ge(-vi/2),width:ge(vi),height:"100%",pointerEvents:"auto"}})]},p.className)},at=()=>{const p=be?-1:B.findIndex(de=>de.prefix==="title1"),T=!be&&(o||(x??0)>0)?(()=>{const de=x??0,Te=p>=0?te[p]:P??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Te),style:{position:"absolute",top:0,left:0,width:`max(${ge(de)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,N=B.flatMap((de,Te)=>{if(!de.marginLeftKey)return[];const Ne=ie[de.marginLeftKey]??0,rt=lf(B,te,ie,Te)+Oe();return r.jsx("div",{"data-controls":de.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(te[Te]),style:{position:"absolute",top:0,left:ge(rt),width:`max(${ge(Ne)}, 10px)`,height:"100%",pointerEvents:"auto"}},de.marginLeftKey)});return T?[T,...N]:N},mt=()=>B.map((p,T)=>{const N=jo(T,te),Te=j(T)-vi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(N),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ge(Te),width:ge(vi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),De=()=>me.flatMap((p,T)=>{if(!p.marginLeftKey)return[];const N=ie[p.marginLeftKey]??0,de=Fe(T),{resolvedWidth:Te}=Q(p,"two-row-bottom");return r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Te),style:{position:"absolute",top:0,left:ge(de),width:`max(${ge(N)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),it=()=>me.map((p,T)=>{const{maxWidth:N}=Q(p,"two-row-bottom"),Te=et(T)-vi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(N),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ge(Te),width:ge(vi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),$t=a.useRef(null),ot=a.useRef(null),Ue=a.useRef(null),ht=a.useRef(null),xt=a.useRef([]),ct=a.useRef([]),Mt=a.useRef(0),_t=a.useRef(null),Qe=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Tt=a.useRef(null),Lt=a.useRef(null),Ge=a.useRef(0),qe=a.useRef("forward"),Pe=a.useRef(0),gt=a.useRef(null),It=a.useRef(!1),kt=t.length>1&&(!o||!!s),Dt=kt?3:1,en=a.useMemo(()=>Array.from({length:Dt},()=>t).flat(),[t,Dt]),[on,bt]=a.useState(!1),[Rt,Ut]=a.useState(!1),[Kt,ft]=a.useState(!0),Jt=a.useRef(null),Ce=a.useRef(null),je=a.useRef(!1),Ke=a.useRef(!1),He=a.useRef(null),Be=a.useRef(null),dt=pe&&!Kt,_e=a.useCallback(()=>{pe&&(ft(!0),Be.current&&clearTimeout(Be.current),Be.current=setTimeout(()=>{Qe.current.isActive||ft(!1)},qh))},[pe]),Ze=a.useCallback(()=>{o||Ke.current||(Ke.current=!0,Ut(!1),He.current=setTimeout(()=>{l()},to))},[o,l]),tt=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":dt?"true":"false",style:{width:E.scalingValue(S??0,i),height:E.scalingValue(S??0,i),marginRight:ee,"--close-icon-hover-color":w},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ze,"aria-label":"Close",children:r.jsx(fn,{url:b,fill:y,hoverFill:i&&!s?y:w,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:ee,height:"100%",pointerEvents:"auto"}})]}),Ft=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:ge(x??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Ct=()=>{const p=B.find(de=>de.prefix==="title1"),T=B.filter(de=>de.prefix==="title2"||de.prefix==="title3"),N=T.length>0||o||(I??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(x??0)>0||o?Ft():null,p&&Ye(p,"two-row-top"),b&&tt()]}),N?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[T.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[T.map(de=>Ye(de,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[De(),it()]})]}):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:Ae,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},st=()=>r.jsxs(r.Fragment,{children:[(x??0)>0||o?Ft("single-row"):null,B.map(p=>Ye(p,"single-row")),o?r.jsxs(r.Fragment,{children:[at(),mt()]}):null,b?tt():null]}),Ht=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Vt,mediaAreaStyle:Bt,overlayContentStyle:Pt,swipeHandlers:Zt,dismissAreaStyle:wt}=ic({enabled:xe??!1,onClose:Ze,animMs:to,isBlockedTarget:Ht}),Gt=()=>{if(!kt||t.length===0)return Mt.current=0,0;const p=ct.current[0],T=ct.current[t.length];if(!p||!T)return Mt.current;const N=T.offsetLeft-p.offsetLeft;return N>0&&(Mt.current=N),Mt.current},ut=(p=!1)=>{if(!kt)return;const T=ot.current,N=Gt();!T||N<=0||N<T.clientWidth*.25||(T.scrollLeft<=0?(T.scrollLeft+=N,p&&(Qe.current.scrollLeft+=N),It.current&&(Pe.current+=N)):T.scrollLeft>=N*2&&(T.scrollLeft-=N,p&&(Qe.current.scrollLeft-=N),It.current&&(Pe.current-=N)))},Wt=(p,T=(N=>(N=ot.current)==null?void 0:N.scrollLeft)()??0)=>{if(!kt)return p;let de=t.length+p,Te=1/0;for(let Ne=0;Ne<Dt;Ne++){const rt=Ne*t.length+p,yt=ct.current[rt];if(!yt)continue;const tn=Math.abs(yt.offsetLeft-T);tn<Te&&(Te=tn,de=rt)}return de},zt=p=>{const T=ot.current;return!p||!T?!1:p.offsetWidth>T.clientWidth+1},g=p=>{const T=ot.current;if(!p||!T||!zt(p))return!1;const N=p.offsetLeft,de=N+p.offsetWidth;return T.scrollLeft>=N-1&&T.scrollLeft+T.clientWidth<=de+1},ce=(p=(T=>(T=ot.current)==null?void 0:T.scrollLeft)()??0)=>{for(let de=0;de<ct.current.length;de+=1){const Te=ct.current[de];if(Te&&g(Te))return de}let N={flatIndex:0,distance:1/0};return ct.current.forEach((de,Te)=>{if(!de)return;const Ne=Math.abs(de.offsetLeft-p);Ne<N.distance&&(N={flatIndex:Te,distance:Ne})}),N.flatIndex},Ee=p=>{ot.current&&ct.current.forEach(T=>{T&&(T.style.scrollSnapAlign=zt(T)&&p==="backward"?"end":"start")})},Ie=(p,T,N)=>{const de=p-T,Te=ce(T),Ne=ct.current[Te];if(g(Ne))return ce(p)%t.length;const rt=ct.current[Te+1],yt=Ne?rt?rt.offsetLeft-Ne.offsetLeft:Ne.offsetWidth:0,tn=yt>0?de>yt*No?1:de<-yt*No?-1:0:0;return tn===0?N:kt?(N+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,N+tn))},Je=a.useCallback((p=!1)=>{if(L!=="on"||o)return;const T=ht.current,N=f.current,de=xt.current[N];if(!T||!de||T.scrollWidth<=T.clientWidth)return;const Te=T.scrollLeft,Ne=Te+T.clientWidth,rt=de.offsetLeft,yt=rt+de.offsetWidth;if(rt>=Te&&yt<=Ne)return;const tn=T.scrollWidth-T.clientWidth;let Xt=Te;if(!p&&Jt.current===null){const fi=xt.current[N-1],Gi=xt.current[N+1],Io=fi?de.offsetLeft-fi.offsetLeft:Gi?Gi.offsetLeft-de.offsetLeft:de.offsetWidth;yt>Ne?Xt+=Io:rt<Te&&(Xt-=Io)}else yt>Ne?Xt=yt-T.clientWidth:Xt=rt;T.scrollLeft=Math.max(0,Math.min(tn,Xt))},[o,L]),Et=a.useCallback((p=!1)=>{p&&(je.current=!0),Ce.current===null&&(Ce.current=requestAnimationFrame(()=>{Ce.current=null;const T=je.current;je.current=!1,Je(T)}))},[Je]),Ve=a.useCallback(p=>{if(p===f.current)return;const T=f.current;f.current=p;const N=Math.abs(p-T)>1,de=kt&&t.length>1&&(T===t.length-1&&p===0||T===0&&p===t.length-1);ye(p),Et(N||de)},[t.length,kt,Et]),nt=()=>{if(!ot.current||t.length===0||Jt.current!==null||Qe.current.isActive&&Qe.current.hasMoved)return;const p=ot.current.scrollLeft,T=ce(p)%t.length;T!==f.current&&Ve(T)},Ot=()=>{Jt.current=null},St=p=>{const T=ot.current;T&&(T.style.scrollSnapType=p?"":"none")},ln=()=>{var p;(p=Lt.current)==null||p.call(Lt),Lt.current=null},cn=()=>{gt.current!==null&&(cancelAnimationFrame(gt.current),gt.current=null),It.current=!1},Zn=()=>{const p=ot.current;if(!p){gt.current=null,It.current=!1;return}const T=Pe.current-p.scrollLeft;if(Math.abs(T)<.5){p.scrollLeft=Pe.current,ut(),nt(),gt.current=null,It.current=!1;return}p.scrollLeft+=T*Xh,ut(),nt(),_e(),gt.current=requestAnimationFrame(Zn)},Qn=()=>{const p=Ue.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},$o=(p,T,N,de)=>{Qn(),p.scrollLeft=T,Ge.current=p.scrollLeft,ut(),N!==void 0?(f.current=N,ye(N)):nt(),St(!0),de==null||de()},Co=(p,{behavior:T="smooth",activeIndex:N,onComplete:de}={})=>{const Te=ot.current,Ne=Ue.current;if(!Te||!Ne)return;if(cn(),ln(),St(!1),T==="auto"){$o(Te,p,N,de);return}const rt=Math.abs(p-Te.scrollLeft),yt=Oh(rt,Dh,Vh,Te.clientWidth*.55);Lt.current=zh(Te,Ne,p,{duration:yt,easing:Gh,onComplete:()=>{Lt.current=null,$o(Te,p,N,de)}})},Tr=(p="smooth")=>{const T=ot.current;if(!T||t.length===0)return;const N=ce()%t.length,de=Wt(N,T.scrollLeft),Te=ct.current[de];Te&&Co(Te.offsetLeft,{behavior:p,activeIndex:N})},Lr=(p,T="smooth",N,de)=>{const Te=ot.current;if(!Te||t.length===0)return;const Ne=(de??Te.scrollLeft)-p,rt=ce(p),yt=ct.current[rt];if(g(yt)){St(!0),nt();return}const tn=ct.current[rt+1],Xt=yt?tn?tn.offsetLeft-yt.offsetLeft:yt.offsetWidth:0;if((Xt>0?Ne>Xt*No?1:Ne<-Xt*No?-1:0:0)!==0){const uc=N??rt%t.length,pc=Ie(de??Te.scrollLeft,p,uc);Sn(pc,T);return}const Gi=de??Te.scrollLeft,Io=ce(Gi),Va=ct.current[Io];if(Va&&Math.abs(Va.offsetLeft-Gi)<1){St(!0),nt();return}Tr("auto")},Sn=(p,T="smooth")=>{const N=ot.current;if(!N||t.length===0)return;const de=Wt(p,N.scrollLeft),Te=ct.current[de];Te&&(T==="smooth"?Jt.current=p:Jt.current=null,f.current=p,ye(p),Et(!0),Co(Te.offsetLeft,{behavior:T,activeIndex:p,onComplete:T==="smooth"?Ot:void 0}))},hi=()=>{Tt.current&&(window.removeEventListener("pointerup",Tt.current),window.removeEventListener("pointercancel",Tt.current),Tt.current=null)},To=(p,T,N,de,Te)=>{const Ne=N-p,rt=de-T,yt=Math.abs(Ne),tn=Math.abs(rt);if(yt<Jh||yt<=tn)return!1;const Xt=Ne<0?1:-1,fi=kt?(Te+Xt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Te+Xt));return fi===Te?!1:(Sn(fi),!0)},ei=p=>{if(!Qe.current.isActive)return;hi();const T=ot.current;if(!T)return;const{scrollLeft:N,startActiveIndex:de,hasMoved:Te}=Qe.current,Ne=T.scrollLeft;ut(!0),Qe.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},bt(!1),p!==void 0&&T.hasPointerCapture(p)&&T.releasePointerCapture(p),Te?Lr(N,"smooth",de,Ne):(St(!0),nt()),_e()},Lo=(p,T)=>{const N=_t.current;_t.current=null,N&&(To(N.startX,N.startY,p,T,N.startActiveIndex),_e())},Ir=p=>{if(!se)return;if(p.pointerType==="touch"){if(cn(),St(!0),Ht(p.target))return;_t.current={startX:p.clientX,startY:p.clientY,startActiveIndex:f.current};return}if(p.pointerType!=="mouse"||p.button!==0||Ht(p.target))return;const T=ot.current;if(!T)return;cn(),ln(),Qn(),Jt.current=null,Qe.current={isActive:!0,startX:p.clientX,scrollLeft:T.scrollLeft,startActiveIndex:f.current,hasMoved:!1},St(!1),_e(),T.setPointerCapture(p.pointerId),hi();const N=de=>{de.pointerType==="mouse"&&ei(de.pointerId)};Tt.current=N,window.addEventListener("pointerup",N),window.addEventListener("pointercancel",N)},Rr=p=>{if(!se||p.pointerType!=="mouse")return;const T=ot.current;if(!T||!Qe.current.isActive)return;if(p.buttons===0){ei(p.pointerId);return}const N=p.clientX-Qe.current.startX;Math.abs(N)>Yh&&(Qe.current.hasMoved=!0,bt(!0)),Qe.current.hasMoved&&(p.preventDefault(),T.scrollLeft=Qe.current.scrollLeft-N,ut(!0),nt(),_e())},J=p=>{if(se){if(p.pointerType==="touch"){p.type==="pointerup"?Lo(p.clientX,p.clientY):_t.current=null;return}p.pointerType==="mouse"&&ei(p.pointerId)}},Me=p=>{!se||p.pointerType!=="mouse"||ei(p.pointerId)};return oc(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Ut(!0));return()=>{cancelAnimationFrame(p),ln(),hi(),Ce.current!==null&&(cancelAnimationFrame(Ce.current),Ce.current=null),He.current&&clearTimeout(He.current),Be.current&&clearTimeout(Be.current)}},[]),a.useEffect(()=>{if(!pe){ft(!0);return}_e();const p=$t.current;if(!p)return;const T=()=>_e();return p.addEventListener("pointermove",T),p.addEventListener("pointerdown",T),()=>{p.removeEventListener("pointermove",T),p.removeEventListener("pointerdown",T),Be.current&&clearTimeout(Be.current)}},[pe,_e]),a.useEffect(()=>{const p=T=>{T.key==="Escape"&&Ze()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Ze]),a.useLayoutEffect(()=>{Gt()},[M,t.length,kt]),a.useLayoutEffect(()=>{o||Sn(f.current,"auto")},[M,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,kt]),a.useEffect(()=>{const p=ot.current;if(!p||o||!xe)return;const T=N=>{if(N.preventDefault(),Math.abs(N.deltaY)<=Math.abs(N.deltaX))return;const de=N.deltaMode===1?Uh:N.deltaMode===2?p.clientHeight:1,Te=N.deltaY*de*Kh;if(Te!==0){if(ln(),It.current||(It.current=!0,Pe.current=p.scrollLeft,Jt.current=null,St(!1)),Pe.current+=Te,!kt){const Ne=p.scrollWidth-p.clientWidth;Pe.current=Math.max(0,Math.min(Ne,Pe.current))}_e(),gt.current===null&&(gt.current=requestAnimationFrame(Zn))}};return p.addEventListener("wheel",T,{passive:!1}),()=>{p.removeEventListener("wheel",T),cn()}},[o,xe,kt]),a.useEffect(()=>{const p=ot.current;if(!p)return;const T=()=>{ut(Qe.current.isActive);const de=p.scrollLeft,Te=de-Ge.current;Ge.current=de;const Ne=Mt.current>0?Mt.current*.5:1/0;if(Te!==0&&Math.abs(Te)<Ne){const rt=Te>0?"forward":"backward";rt!==qe.current&&(qe.current=rt,Ee(rt))}Qe.current.isActive&&Qe.current.hasMoved||nt()};p.addEventListener("scroll",T,{passive:!0});const N=new ResizeObserver(()=>{Gt(),ut(Qe.current.isActive),Ee(qe.current),nt()});return N.observe(p),()=>{ln(),p.removeEventListener("scroll",T),N.disconnect()}},[t.length,kt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Ze()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Rt?1:0,transition:`opacity ${to}ms ease`,pointerEvents:Rt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Vt}}),r.jsxs("div",{ref:$t,className:`${e}-lightbox-dismiss-area`,style:wt,...Zt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Bt,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:ot,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":se&&t.length>0?"true":"false","data-mouse-dragging":on?"true":"false",onPointerDown:Ir,onPointerMove:Rr,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:Me,children:r.jsx("div",{ref:Ue,className:`${e}-lightbox-strip-track`,style:{gap:M},children:en.map((p,T)=>{const N=p.image.objectFit??"contain",de=T%t.length,Te=Math.floor(T/t.length),Ne=Oo(M),rt=`calc(-0.5 * (${Ne} + ${M}))`;return r.jsxs("div",{ref:yt=>ct.current[T]=yt,className:`${e}-strip-item`,style:{height:W==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:p.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:N}}),o&&de<t.length-1&&Te===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:rt,width:Ne,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Te}-${p.image.url}-${de}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":dt?"true":"false",style:Pt,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${be?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||b)&&r.jsx("div",{className:`${e}-header ${be?`${e}-header-two-row`:`${e}-header-single-row`}`,children:be?Ct():Se||b?st():null})})})]}),t.length>1&&L==="on"&&(()=>{const p=Oo($),T=`calc(-0.5 * (${$} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:$},children:r.jsx("div",{ref:ht,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:N=>N.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":A,style:{gap:H,"--thumbnail-active-color":O},children:[t.map((N,de)=>{const Te=Oo(H),Ne=`calc(-0.5 * (${Te} + ${H}))`;return r.jsxs("div",{ref:rt=>{xt.current[de]=rt},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":_===de?"true":"false",onClick:()=>xe&&C==="click"&&Sn(de),onMouseEnter:()=>Re&&C==="hover"&&Sn(de),"aria-label":N.image.name?`View ${N.image.name}`:`View image ${de+1}`,"aria-current":_===de?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${ke?` ${e}-thumb-image-cover`:""}`,src:N.image.url,alt:"",draggable:!1,style:{...we,maxWidth:G,maxHeight:G,width:k.display==="cover"?"auto":"100%",height:"auto",objectFit:k.display==="cover"?"cover":"contain"}})}),o&&de<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ne,width:Te,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${N.image.url}-${de}`)}),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:T,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function df(e){return`
12944
12918
  .${e}-wrapper {
12945
12919
  position: relative;
12946
12920
  width: 100%;
@@ -13166,7 +13140,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
13166
13140
  background-color: transparent;
13167
13141
  padding: 0;
13168
13142
  opacity: 1;
13169
- transition: opacity ${Ui}ms ease;
13143
+ transition: opacity ${to}ms ease;
13170
13144
  }
13171
13145
 
13172
13146
  .${e}-close-icon[data-overlay-content-hidden="true"] {
@@ -13291,7 +13265,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
13291
13265
  display: flex;
13292
13266
  flex-direction: column;
13293
13267
  opacity: 1;
13294
- transition: opacity ${Ui}ms ease;
13268
+ transition: opacity ${to}ms ease;
13295
13269
  }
13296
13270
 
13297
13271
  .${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
@@ -13332,7 +13306,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
13332
13306
  pointer-events: auto;
13333
13307
  z-index: 10;
13334
13308
  }
13335
- `}const Vh=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l})=>{const{prefix:s}=L.useScopedStyles(),{cover:d,coverFit:c}=e,u=a.useRef(null),[m,y]=a.useState(!1),w=t??[],$=m&&w.length>0,h=()=>{w.length!==0&&y(!0)};return a.useEffect(()=>{!n||i||o||y(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:u,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Dh(s)}}),d&&r.jsx("div",{className:`${s}-cover ${kn(c)?`${s}-ratio-wrapper-cover`:`${s}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...kn(c)?{"--image-aspect-ratio":ur(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${s}-cover-image ${kn(c)?`${s}-cover-image-cover`:`${s}-cover-image-fit`}`,src:d,alt:"cover"})})]}),$&&typeof document<"u"&&(()=>{const v=(l?document.getElementById(l):null)??document.body;return Wi.createPortal(r.jsx(zh,{prefix:s,images:w,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),v)})()]})},qh=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
13309
+ `}const uf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:l}=E.useScopedStyles(),{cover:d,coverFit:c}=e,u=a.useRef(null),[m,v]=a.useState(!1),b=t??[],S=m&&b.length>0,y=()=>{b.length!==0&&v(!0)};return a.useEffect(()=>{!n||i||o||v(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:df(l)}}),d&&r.jsx("div",{className:`${l}-cover ${Wn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>y(),style:{...Wn(c)?{"--image-aspect-ratio":$r(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${l}-cover-image ${Wn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),S&&typeof document<"u"&&(()=>{const w=(s?document.getElementById(s):null)??document.body;return mi.createPortal(r.jsx(cf,{prefix:l,images:b,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>v(!1)}),w)})()]})},pf=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
13336
13310
  import { createPortal } from 'react-dom';
13337
13311
  import { CommonComponentProps } from '../props';
13338
13312
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -13886,7 +13860,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
13886
13860
  </>
13887
13861
  );
13888
13862
  };
13889
- `,Gh="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>'),ni={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 Kh(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")]={...ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Lt(e,"fontSize")]={...ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Lt(e,"lineHeight")]={...ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Lt(e,"letterSpacing")]={...ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Lt(e,"wordSpacing")]={...ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Lt(e,"textAlign")]={...ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Lt(e,"textAppearance")]={...ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Uh=Ai.reduce((e,t)=>({...e,...Kh(t)}),{}),Xh=Ai.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 Wr(e){return Ai.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 Yh=Oh(),Jh={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:"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"}},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"}},...Uh,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:Gh,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...Xh},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,contentMarginTop:.08,iconMarginLeft:.02,...Wr({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{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:.039,contentMarginTop:.015,iconMarginLeft:.02,...Wr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},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,contentMarginTop:.015,iconMarginLeft:.02,...Wr({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:[Yh]}],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"}]}},Zh={element:Vh,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Jh,sourceCode:qh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Ai.map(e=>({path:`${Lt(e,"fontFamily")}`}))]},fontRelations:{...Ai.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Lt(t,"fontFamily")}`}),{})}},Qh=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,initialSlideIndex:s=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:m})=>{const{type:y,coverFit:w,backgroundColor:$,imageGap:h,maxWidth:v,maxHeight:S,textTransition:T,title1Width:R,title2Width:P,title3Width:H,title1MarginLeft:E=0,title2MarginLeft:j=0,title3MarginLeft:k=0,titleRowMarginBottom:x=0,titleHeaderLayout:Y="single-row",countCloseGap:f=0,closeIcon:A,closeIconMaxWidth:W,closeIconColor:z,closeIconHoverColor:G,contentMarginTop:le=0,iconMarginRight:J=0}=n,D=a.useCallback(B=>L.scalingValue(B,i??!1),[i]),N=D(h??0),C=`${v}%`,I=`${S}%`,V=D(f),K=D(le),ee=D(J),O=ri("title1",oi(n,"title1"),i),ge=ri("title2",oi(n,"title2"),i),g=ri("title3",oi(n,"title3"),i),he=ri("count",oi(n,"count"),i),re=Y==="mobile",be=!i||!!l,ke=!o&&(!i||!!l),ae=a.useMemo(()=>Ho(t,y),[t,y]),[ve,U]=a.useState(s),xe=ae[ve],me=xe==null?void 0:xe.entry,[pe,se]=a.useState(!1),[Te,Ie]=a.useState(null),[fe,Se]=a.useState(!1),[_,te]=a.useState(null),[M,X]=a.useState(!1),[Z,ce]=a.useState(0),[ue,ye]=a.useState(),[Le,q]=a.useState(),[de,Ee]=a.useState(null),Q=a.useRef(null),ne=a.useRef(0),Fe=a.useRef(0),We=a.useRef(0),Ge=a.useRef(!1),Ze=a.useRef(null),ct=a.useRef(null),pt=a.useRef(null),Xe=a.useRef(null),vt=a.useRef(null),St=a.useRef(null),et=a.useRef(null),Be=a.useCallback(()=>{const B=ct.current;if(!B)return;const $e=B.closest(`.${e}-lightbox-content-area`);if(!$e)return B.getBoundingClientRect().width;const p=Array.from($e.children).reduce((b,F)=>!(F instanceof HTMLElement)||F.contains(B)?b:b+F.getBoundingClientRect().width,0);return $e.getBoundingClientRect().width-p},[e]),dt=a.useCallback(()=>{Q.current&&(clearTimeout(Q.current),Q.current=null)},[]),mt=a.useCallback(B=>{B===ne.current&&(te(null),X(!1))},[]),ot=a.useCallback(()=>{o||Ge.current||(Ge.current=!0,u==null||u(),se(!1),Ze.current=setTimeout(()=>{m()},300))},[o,u,m]),Pt=a.useCallback(B=>!!(B.closest("[data-controls]")||B.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ht,backdropStyle:tt,mediaAreaStyle:At,overlayContentStyle:It,swipeHandlers:ze,dismissAreaStyle:Qe}=Ol({enabled:ke,onClose:ot,animMs:300,isBlockedTarget:Pt}),He=a.useCallback(B=>{d&&bl(B+1,c,!0)},[d,c]),st=a.useCallback(B=>{if(B)return B.getBoundingClientRect().height},[]),$t=a.useCallback(B=>{if(ae.length===0)return;const $e=(B%ae.length+ae.length)%ae.length;if($e===ve)return;const p=ae[ve],b=ae[$e];ne.current+=1;const F=ne.current,oe=T==="fade"&&rs(p==null?void 0:p.entry)!==rs(b==null?void 0:b.entry),we=st(pt.current),Pe=oe?(()=>{const lt=Be();Wi.flushSync(()=>{Ee(b.entry)}),pt.current&&lt&&(pt.current.style.width=`${lt}px`);const Ut=st(pt.current);return pt.current&&(pt.current.style.width=""),{measuredIncomingTitlesHeight:Ut,incomingTitlesMeasureWidth:lt}})():void 0,Ue=Math.max(we??0,(Pe==null?void 0:Pe.measuredIncomingTitlesHeight)??0)||void 0;ce(F),te(ve),X(!0),U($e),He($e),We.current=$e,oe?(dt(),Ue&&ye(Ue),Pe!=null&&Pe.incomingTitlesMeasureWidth&&q(Pe.incomingTitlesMeasureWidth),Ie((p==null?void 0:p.entryIndex)??null),Se(!0),Fe.current=b.entryIndex,Q.current=setTimeout(()=>{Ie(null),Se(!1),ye(void 0),q(void 0),Ee(null),Q.current=null},400)):(dt(),Ie(null),Se(!1),ye(void 0),q(void 0),Ee(null),Fe.current=b.entryIndex)},[ve,dt,Be,st,ae,He,T]),Ct=a.useCallback(()=>{et.current=null},[]),Zt=a.useCallback(B=>{!be||ae.length<=1||B.pointerType==="mouse"&&B.button!==0||B.target.closest("[data-controls]")||(et.current={startX:B.clientX,startY:B.clientY,pointerId:B.pointerId})},[be,ae.length]),an=a.useCallback(B=>{var lt;if(!be||ae.length<=1||B.pointerType==="mouse"&&B.button!==0)return;if(Ht){Ct();return}const $e=et.current;if(!$e||$e.pointerId!==B.pointerId||(Ct(),B.target.closest("[data-controls]")))return;const b=B.clientX-$e.startX,F=B.clientY-$e.startY,oe=Math.abs(b),we=Math.abs(F);if(oe>=pm&&oe>we){$t(b>0?ve-1:ve+1);return}if(oe>ts||we>ts)return;const Pe=(lt=Xe.current)==null?void 0:lt.getBoundingClientRect(),Ue=Pe?Pe.left+Pe.width/2:window.innerWidth/2;$t(B.clientX<Ue?ve-1:ve+1)},[ve,be,$t,Ht,Ct,ae.length]),sn=a.useCallback(B=>{const $e=et.current;($e==null?void 0:$e.pointerId)===B.pointerId&&Ct()},[Ct]);jl(),a.useEffect(()=>{St.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const B=requestAnimationFrame(()=>{se(!0),requestAnimationFrame(()=>{vt.current?vt.current.focus():Xe.current&&Xe.current.focus()})});return()=>{cancelAnimationFrame(B),Ze.current&&clearTimeout(Ze.current),Q.current&&clearTimeout(Q.current);const $e=St.current;$e&&document.contains($e)&&$e.focus()}},[]),a.useEffect(()=>{var B;T!=="fade"&&(Fe.current=((B=ae[ve])==null?void 0:B.entryIndex)??0,dt(),Ie(null),Se(!1),ye(void 0),q(void 0))},[ve,dt,ae,T]),a.useEffect(()=>{const B=$e=>{if($e.key==="Escape"){ot();return}if($e.key==="ArrowLeft"&&ae.length>1){$t(ve-1);return}if($e.key==="ArrowRight"&&ae.length>1){$t(ve+1);return}if($e.key==="Tab"&&Xe.current){const p=Xe.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),b=Array.from(p).filter(Pe=>!Pe.closest('[aria-hidden="true"]'));if(b.length===0)return;const F=b[0],oe=b[b.length-1],we=document.activeElement;$e.shiftKey?(we===F||!Xe.current.contains(we))&&($e.preventDefault(),oe.focus()):(we===oe||!Xe.current.contains(we))&&($e.preventDefault(),F.focus())}};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[$t,ot,ve,ae.length]),a.useLayoutEffect(()=>{dt(),ne.current=0,ce(0),te(null),X(!1),Ie(null),Se(!1),ye(void 0),q(void 0),Ee(null),U(B=>{const $e=Math.max(0,ae.length-1);return Math.min(B,$e)})},[dt,t.length,y,ae.length]),a.useLayoutEffect(()=>{var p;const B=Math.max(0,ae.length-1),$e=Math.min(Math.max(0,s),B);We.current=$e,Fe.current=((p=ae[$e])==null?void 0:p.entryIndex)??0,U($e)},[s]);const ht=Te!==null?t[Te]:null,jt=_!==null?ae[_]:null,Yt=(me==null?void 0:me.title1)||(me==null?void 0:me.title2)||(me==null?void 0:me.title3)||(ht==null?void 0:ht.title1)||(ht==null?void 0:ht.title2)||(ht==null?void 0:ht.title3),qt=bm(y,ae,t),Rt=A!==null,Qt=Yt||qt||Rt,Ce=qt&&Rt?{gap:V}:void 0,_e=`${e}-titles-stack${re?` ${e}-titles-stack-stacked`:""}`,De=`${e}-titles-layer-out${re?` ${e}-titles-layer-out-stacked`:""}`,Oe=`${e}-titles-layer-out`,Ne=(E??0)>0||o,rt=D(x),Me=a.useMemo(()=>({title1Width:R??wi.title1Width,title2Width:P??wi.title2Width,title3Width:H??wi.title3Width}),[R,P,H]),Ye=a.useMemo(()=>({title2MarginLeft:j,title3MarginLeft:k}),[j,k]),Ke=a.useMemo(()=>me?jn(e,me,O,ge,g):[],[e,me,O,ge,g]),Et=a.useMemo(()=>Ke.map(B=>Me[B.widthKey]),[Ke,Me]),xt=a.useMemo(()=>Ii(Ke.length,Et),[Ke.length,Et]),ft=a.useMemo(()=>no(Ke.length,Et),[Ke.length,Et]),Wt=a.useMemo(()=>Ke.filter(B=>B.prefix==="title1"),[Ke]),Tt=a.useMemo(()=>Ke.filter(B=>B.prefix==="title2"||B.prefix==="title3"),[Ke]),Bt=a.useMemo(()=>Bn(Wt,Me),[Wt,Me]),Ft=a.useMemo(()=>Bn(Tt,Me),[Tt,Me]),kt=a.useCallback((B,$e)=>{const p=Ke.findIndex(F=>F.prefix===B.prefix);if(!re||$e==="single-row")return{effectiveWidth:ft[p]??0,resolvedWidth:xt[p]??0,maxWidth:on(p,xt)};if($e==="two-row-top"){const F=Wt.findIndex(oe=>oe.prefix===B.prefix);return{effectiveWidth:Bt.effective[F]??0,resolvedWidth:Bt.resolved[F]??0,maxWidth:on(F,Bt.resolved)}}const b=Tt.findIndex(F=>F.prefix===B.prefix);return{effectiveWidth:Ft.effective[b]??0,resolvedWidth:Ft.resolved[b]??0,maxWidth:on(b,Ft.resolved)}},[Ke,Tt,Ft,ft,xt,Wt,Bt,re]),en=a.useCallback(B=>Cl(Ke,xt,Ye,B)+(re?0:E??0),[Ke,xt,Ye,re,E]),yt=a.useCallback(()=>re?0:E??0,[re,E]),zt=a.useCallback(B=>Tt.slice(0,B).reduce(($e,p,b)=>$e+(p.marginLeftKey?Ye[p.marginLeftKey]??0:0)+(Ft.resolved[b]??0),0),[Tt,Ft.resolved,Ye]),at=a.useCallback(B=>{const $e=Tt[B];return zt(B)+($e.marginLeftKey?Ye[$e.marginLeftKey]??0:0)+(Ft.resolved[B]??0)},[Tt,Ft.resolved,zt,Ye]),_t=a.useCallback((B,$e,p)=>{if(!re||p==="single-row"){const Pe=B.findIndex(Dt=>Dt.prefix===$e.prefix),Ue=B.map(Dt=>Me[Dt.widthKey]),lt=Ii(B.length,Ue);return{effectiveWidth:no(B.length,Ue)[Pe]??0,resolvedWidth:lt[Pe]??0,maxWidth:on(Pe,lt)}}if(p==="two-row-top"){const Pe=B.filter(Dt=>Dt.prefix==="title1"),Ue=Pe.findIndex(Dt=>Dt.prefix===$e.prefix),{resolved:lt,effective:Ut}=Bn(Pe,Me);return{effectiveWidth:Ut[Ue]??0,resolvedWidth:lt[Ue]??0,maxWidth:on(Ue,lt)}}const b=B.filter(Pe=>Pe.prefix==="title2"||Pe.prefix==="title3"),F=b.findIndex(Pe=>Pe.prefix===$e.prefix),{resolved:oe,effective:we}=Bn(b,Me);return{effectiveWidth:we[F]??0,resolvedWidth:oe[F]??0,maxWidth:on(F,oe)}},[Me,re]),Gt=(B,$e,p)=>{const b=B.marginLeftKey?Ye[B.marginLeftKey]??0:0,{effectiveWidth:F,resolvedWidth:oe,maxWidth:we}=p??kt(B,$e),Pe=Math.max(b,On),Ue=o&&$e==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":B.prefix,style:{width:D(F),...b>0?{marginLeft:D(b)}:{}},children:[r.jsx("p",{className:B.className,style:B.style,children:B.text}),Ue&&B.marginLeftKey?r.jsx("div",{"data-controls":B.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(oe),style:{position:"absolute",top:0,left:D(-b),width:D(Pe),height:"100%",pointerEvents:"auto"}}):null,Ue?r.jsx("div",{"data-controls":B.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(we),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:D(-dn/2),width:D(dn),height:"100%",pointerEvents:"auto"}}):null]},B.className)},ie=(B="two-row")=>{const $e=Ke.findIndex(F=>F.prefix==="title1"),p=$e>=0?xt[$e]:Me.title1Width,b=B==="two-row"&&o;return r.jsx("div",{...b?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:D(E??0),flexShrink:0,alignSelf:"stretch",...b?{pointerEvents:"auto"}:{}}})},Ae=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:O,"aria-hidden":"true",children:" "}),Ve=()=>r.jsx("span",{className:`${e}-entry-counter`,style:he,"aria-live":"polite","aria-atomic":"true",children:xm(ae,ve,y,t)}),qe=()=>qt?o&&Rt?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Ve(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Lr(V)} + ${V}))`,width:Lr(V),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Ve():null,bt=()=>!qt&&!Rt?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ce,children:[qe(),Rt?wt():null]}),Kt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[qt||Yt?Ae():null,Ne?ie("single-row"):null,Ot(me),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),bt(),wn()]}),gt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[qt||Yt?Ae():null,Ne?ie("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:fe&&ue?{minHeight:ue}:void 0,children:[r.jsx("div",{ref:pt,className:_e,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Xn(de||me)}),r.jsxs("div",{ref:ct,className:_e,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%",...fe&&Le?{width:Le,maxWidth:"100%"}:void 0},children:[ht&&fe?r.jsx("div",{className:`${De} ${e}-titles-fade-out`,children:Xn(ht)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Xn(me)})]})]}),bt(),wn()]}),wt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:L.scalingValue(W??0,i),height:L.scalingValue(W??0,i),marginRight:ee,"--close-icon-hover-color":G},children:[r.jsx("button",{ref:vt,type:"button",className:`${e}-close-icon-inner`,onClick:ot,"aria-label":"Close",children:r.jsx(mn,{url:A??"",fill:z,hoverFill:i&&!l?z:G,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:ee,height:"100%",pointerEvents:"auto"}})]}),tn=(B,$e)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[qt||Yt?Ae():null,Ne?ie("two-row"):null,$e!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:$e},children:B}):r.jsxs(r.Fragment,{children:[B,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),bt()]}),Ot=B=>{if(!B)return null;const $e=jn(e,B,O,ge,g);return r.jsx(r.Fragment,{children:$e.map(p=>Gt(p,"single-row",_t($e,p,"single-row")))})},fn=B=>{if(!B)return null;const $e=jn(e,B,O,ge,g),p=$e.find(b=>b.prefix==="title1");return p?Gt(p,"two-row-top",_t($e,p,"two-row-top")):null},bn=(B,$e=!1)=>{const p=B?jn(e,B,O,ge,g):[],b=p.filter(we=>we.prefix==="title2"||we.prefix==="title3"),F=o&&$e;return b.length>0||F||(x??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[b.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[b.map(we=>Gt(we,"two-row-bottom",_t(p,we,"two-row-bottom"))),$e&&o?r.jsxs(r.Fragment,{children:[pr(),mr()]}):null]}):null,(x??0)>0||F?r.jsx("div",{"data-controls":F?"titleRowMarginBottom":void 0,"data-controls-axis":F?"y":void 0,"data-controls-reverse":F?"":void 0,className:F?`${e}-control`:void 0,style:{height:rt,width:"100%",flexShrink:0,pointerEvents:F?"auto":"none"}}):null]}):null},Un=(B,$e=!1)=>r.jsxs(r.Fragment,{children:[tn(fn(B)),bn(B,$e)]}),Xn=B=>re?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Un(B)}):B?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Ot(B)}):null,fo=()=>{const B=re?-1:Ke.findIndex(b=>b.prefix==="title1"),$e=!re&&(o||(E??0)>0)?(()=>{const b=E??0,F=B>=0?xt[B]:Me.title1Width,oe=Math.max(b,On);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F),style:{position:"absolute",top:0,left:0,width:D(oe),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=Ke.flatMap((b,F)=>{if(!b.marginLeftKey)return[];const oe=Ye[b.marginLeftKey]??0,we=$l(Ke,xt,Ye,F)+yt(),Pe=Math.max(oe,On);return r.jsx("div",{"data-controls":b.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(xt[F]),style:{position:"absolute",top:0,left:D(we),width:D(Pe),height:"100%",pointerEvents:"auto"}},b.marginLeftKey)});return $e?[$e,...p]:p},yo=()=>Ke.map((B,$e)=>{const p=on($e,xt),F=en($e)-dn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":B.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:D(F),width:D(dn),height:"100%",pointerEvents:"auto"}})},`${B.widthKey}-junction`)}),pr=()=>Tt.flatMap((B,$e)=>{if(!B.marginLeftKey)return[];const p=Ye[B.marginLeftKey]??0,b=zt($e),F=Math.max(p,On),{resolvedWidth:oe}=kt(B,"two-row-bottom");return r.jsx("div",{"data-controls":B.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(oe),style:{position:"absolute",top:0,left:D(b),width:D(F),height:"100%",pointerEvents:"auto"}},B.marginLeftKey)}),mr=()=>Tt.map((B,$e)=>{const{maxWidth:p}=kt(B,"two-row-bottom"),F=at($e)-dn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":B.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:D(F),width:D(dn),height:"100%",pointerEvents:"auto"}})},`${B.widthKey}-junction`)}),wn=()=>!o||re?null:r.jsxs(r.Fragment,{children:[fo(),yo()]}),ui=B=>{const $e=!B.objectFit&&kn(w);return{className:`${e}-slide-image-cell${$e?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:C,maxHeight:I,...$e?{"--image-aspect-ratio":ur(w)}:{}}}},vo=B=>B.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":B.objectFit}}:kn(w)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Yn=B=>{if(B.length===0)return null;const $e=B.length>1,p=Lr(N),b=`calc(-0.5 * (${p} + ${N}))`;if(B.length===1){const F=B[0];return r.jsx("div",{...ui(F),children:r.jsx("img",{...vo(F),src:F.url,alt:F.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:$e?{gap:N}:void 0,children:B.map((F,oe)=>r.jsxs("div",{...ui(F),children:[r.jsx("img",{...vo(F),src:F.url,alt:F.name??"",draggable:!1}),o&&$e&&oe<B.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:b,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${F.url}-${oe}`))})},xo=!!(me!=null&&me.title2||me!=null&&me.title3||ht!=null&&ht.title2||ht!=null&&ht.title3||(x??0)>0||o),gr=()=>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:pt,className:_e,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Un(de||me)}),r.jsxs("div",{ref:ct,className:`${e}-titles-row-two-row`,style:{...fe&&ue?{minHeight:ue}:void 0,...fe&&Le?{width:Le,maxWidth:"100%"}:void 0},children:[tn(r.jsxs("div",{className:_e,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%"},children:[ht&&fe?r.jsx("div",{className:`${Oe} ${e}-titles-fade-out`,children:fn(ht)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:fn(me)})]}),fe&&ue?ue:void 0),xo?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ht&&fe?r.jsx("div",{className:`${De} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:bn(ht)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${re?` ${e}-titles-layer-in-stacked`:""}`,children:bn(me,!0)})]}):null]})]}),hr=()=>{const B=xo;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...B?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:B?void 0:{flex:"0 0 auto",height:"auto"},children:Un(me,!0)}),wn()]})};return r.jsxs("div",{ref:Xe,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ht||ot()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Rt?void 0:-1,style:{opacity:pe?1:0,transition:"opacity 300ms ease",pointerEvents:pe?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:$,...tt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Qe,...ze,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:B=>B.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":be&&ae.length>1?"true":"false",onPointerDown:be?Zt:void 0,onPointerUp:be?an:void 0,onPointerCancel:be?sn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[jt&&M?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:B=>{B.target===B.currentTarget&&mt(Z)},children:r.jsx("div",{className:`${e}-slide-area`,children:Yn(jt.images)})},`slide-out-${Z}`):null,r.jsx("div",{className:`${e}-slide-layer-in${M?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:xe?Yn(xe.images):null})},`slide-in-${Z}-${ve}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:It,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:K,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...re?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${re?` ${e}-lightbox-content-area-stacked`:""}`,children:Qt&&r.jsx("div",{className:`${e}-text-bar-cell${re?` ${e}-text-bar-cell-stacked`:""}`,style:re?void 0:{flex:1,minWidth:0,width:"100%"},children:re?T==="fade"?gr():hr():T==="fade"?gt():Kt()})})})]})]})]})};function ef(e){return`
13863
+ `,mf="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>'),ai={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 gf(e){const t={};return t[Nt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Nt(e,"fontSettings")]={...ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Nt(e,"fontSize")]={...ai.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Nt(e,"lineHeight")]={...ai.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Nt(e,"letterSpacing")]={...ai.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Nt(e,"wordSpacing")]={...ai.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Nt(e,"textAlign")]={...ai.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Nt(e,"textAppearance")]={...ai.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const hf=Hi.reduce((e,t)=>({...e,...gf(t)}),{}),ff=Hi.reduce((e,t)=>({...e,[Nt(t,"fontFamily")]:"Goudy Bookletter 1911",[Nt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Nt(t,"letterSpacing")]:0,[Nt(t,"wordSpacing")]:0,[Nt(t,"textAlign")]:"left",[Nt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Kr(e){return Hi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Nt(n,"fontSize")]=i),o!==void 0&&(t[Nt(n,"lineHeight")]=o),t},{})}const yf=af(),vf={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:"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"}},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"}},...hf,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:mf,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...ff},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,contentMarginTop:.08,iconMarginLeft:.02,...Kr({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{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:.039,contentMarginTop:.015,iconMarginLeft:.02,...Kr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},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,contentMarginTop:.015,iconMarginLeft:.02,...Kr({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:[yf]}],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"}]}},xf={element:uf,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:vf,sourceCode:pf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Hi.map(e=>({path:`${Nt(e,"fontFamily")}`}))]},fontRelations:{...Hi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Nt(t,"fontFamily")}`}),{})}},bf=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:m})=>{const{type:v,coverFit:b,backgroundColor:S,imageGap:y,maxWidth:w,maxHeight:C,textTransition:L,title1Width:k,title2Width:A,title3Width:O,title1MarginLeft:P=0,title2MarginLeft:D=0,title3MarginLeft:R=0,titleRowMarginBottom:x=0,titleHeaderLayout:U="single-row",countCloseGap:h=0,closeIcon:I,closeIconMaxWidth:W,closeIconColor:V,closeIconHoverColor:Y,contentMarginTop:ae=0,iconMarginRight:Z=0}=n,G=a.useCallback(J=>E.scalingValue(J,i??!1),[i]),H=G(y??0),$=`${w}%`,M=`${C}%`,q=G(h),z=G(ae),ee=G(Z),_=ci("title1",li(n,"title1"),i),ye=ci("title2",li(n,"title2"),i),f=ci("title3",li(n,"title3"),i),ve=ci("count",li(n,"count"),i),K=U==="mobile",le=!i||!!s,$e=!o&&(!i||!!s),oe=a.useMemo(()=>Uo(t,v),[t,v]),[fe,X]=a.useState(l),be=oe[fe],xe=be==null?void 0:be.entry,[pe,se]=a.useState(!1),[Re,ke]=a.useState(null),[we,Se]=a.useState(!1),[B,re]=a.useState(null),[F,te]=a.useState(!1),[ne,ue]=a.useState(0),[me,he]=a.useState(),[Le,Q]=a.useState(),[ge,Ae]=a.useState(null),ie=a.useRef(null),j=a.useRef(0),Oe=a.useRef(0),Fe=a.useRef(0),et=a.useRef(!1),Ye=a.useRef(null),at=a.useRef(null),mt=a.useRef(null),De=a.useRef(null),it=a.useRef(null),$t=a.useRef(null),ot=a.useRef(null),Ue=a.useCallback(()=>{const J=at.current;if(!J)return;const Me=J.closest(`.${e}-lightbox-content-area`);if(!Me)return J.getBoundingClientRect().width;const p=Array.from(Me.children).reduce((T,N)=>!(N instanceof HTMLElement)||N.contains(J)?T:T+N.getBoundingClientRect().width,0);return Me.getBoundingClientRect().width-p},[e]),ht=a.useCallback(()=>{ie.current&&(clearTimeout(ie.current),ie.current=null)},[]),xt=a.useCallback(J=>{J===j.current&&(re(null),te(!1))},[]),ct=a.useCallback(()=>{o||et.current||(et.current=!0,u==null||u(),se(!1),Ye.current=setTimeout(()=>{m()},300))},[o,u,m]),Mt=a.useCallback(J=>!!(J.closest("[data-controls]")||J.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:_t,backdropStyle:Qe,mediaAreaStyle:Tt,overlayContentStyle:Lt,swipeHandlers:Ge,dismissAreaStyle:qe}=ic({enabled:$e,onClose:ct,animMs:300,isBlockedTarget:Mt}),Pe=a.useCallback(J=>{d&&Ol(J+1,c,!0)},[d,c]),gt=a.useCallback(J=>{if(J)return J.getBoundingClientRect().height},[]),It=a.useCallback(J=>{if(oe.length===0)return;const Me=(J%oe.length+oe.length)%oe.length;if(Me===fe)return;const p=oe[fe],T=oe[Me];j.current+=1;const N=j.current,de=L==="fade"&&Ss(p==null?void 0:p.entry)!==Ss(T==null?void 0:T.entry),Te=gt(mt.current),Ne=de?(()=>{const yt=Ue();mi.flushSync(()=>{Ae(T.entry)}),mt.current&&yt&&(mt.current.style.width=`${yt}px`);const tn=gt(mt.current);return mt.current&&(mt.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:yt}})():void 0,rt=Math.max(Te??0,(Ne==null?void 0:Ne.measuredIncomingTitlesHeight)??0)||void 0;ue(N),re(fe),te(!0),X(Me),Pe(Me),Fe.current=Me,de?(ht(),rt&&he(rt),Ne!=null&&Ne.incomingTitlesMeasureWidth&&Q(Ne.incomingTitlesMeasureWidth),ke((p==null?void 0:p.entryIndex)??null),Se(!0),Oe.current=T.entryIndex,ie.current=setTimeout(()=>{ke(null),Se(!1),he(void 0),Q(void 0),Ae(null),ie.current=null},400)):(ht(),ke(null),Se(!1),he(void 0),Q(void 0),Ae(null),Oe.current=T.entryIndex)},[fe,ht,Ue,gt,oe,Pe,L]),kt=a.useCallback(()=>{ot.current=null},[]),Dt=a.useCallback(J=>{!le||oe.length<=1||J.pointerType==="mouse"&&J.button!==0||J.target.closest("[data-controls]")||(ot.current={startX:J.clientX,startY:J.clientY,pointerId:J.pointerId})},[le,oe.length]),en=a.useCallback(J=>{var yt;if(!le||oe.length<=1||J.pointerType==="mouse"&&J.button!==0)return;if(_t){kt();return}const Me=ot.current;if(!Me||Me.pointerId!==J.pointerId||(kt(),J.target.closest("[data-controls]")))return;const T=J.clientX-Me.startX,N=J.clientY-Me.startY,de=Math.abs(T),Te=Math.abs(N);if(de>=Am&&de>Te){It(T>0?fe-1:fe+1);return}if(de>vs||Te>vs)return;const Ne=(yt=De.current)==null?void 0:yt.getBoundingClientRect(),rt=Ne?Ne.left+Ne.width/2:window.innerWidth/2;It(J.clientX<rt?fe-1:fe+1)},[fe,le,It,_t,kt,oe.length]),on=a.useCallback(J=>{const Me=ot.current;(Me==null?void 0:Me.pointerId)===J.pointerId&&kt()},[kt]);oc(),a.useEffect(()=>{$t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const J=requestAnimationFrame(()=>{se(!0),requestAnimationFrame(()=>{it.current?it.current.focus():De.current&&De.current.focus()})});return()=>{cancelAnimationFrame(J),Ye.current&&clearTimeout(Ye.current),ie.current&&clearTimeout(ie.current);const Me=$t.current;Me&&document.contains(Me)&&Me.focus()}},[]),a.useEffect(()=>{var J;L!=="fade"&&(Oe.current=((J=oe[fe])==null?void 0:J.entryIndex)??0,ht(),ke(null),Se(!1),he(void 0),Q(void 0))},[fe,ht,oe,L]),a.useEffect(()=>{const J=Me=>{if(Me.key==="Escape"){ct();return}if(Me.key==="ArrowLeft"&&oe.length>1){It(fe-1);return}if(Me.key==="ArrowRight"&&oe.length>1){It(fe+1);return}if(Me.key==="Tab"&&De.current){const p=De.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),T=Array.from(p).filter(Ne=>!Ne.closest('[aria-hidden="true"]'));if(T.length===0)return;const N=T[0],de=T[T.length-1],Te=document.activeElement;Me.shiftKey?(Te===N||!De.current.contains(Te))&&(Me.preventDefault(),de.focus()):(Te===de||!De.current.contains(Te))&&(Me.preventDefault(),N.focus())}};return window.addEventListener("keydown",J),()=>window.removeEventListener("keydown",J)},[It,ct,fe,oe.length]),a.useLayoutEffect(()=>{ht(),j.current=0,ue(0),re(null),te(!1),ke(null),Se(!1),he(void 0),Q(void 0),Ae(null),X(J=>{const Me=Math.max(0,oe.length-1);return Math.min(J,Me)})},[ht,t.length,v,oe.length]),a.useLayoutEffect(()=>{var p;const J=Math.max(0,oe.length-1),Me=Math.min(Math.max(0,l),J);Fe.current=Me,Oe.current=((p=oe[Me])==null?void 0:p.entryIndex)??0,X(Me)},[l]);const bt=Re!==null?t[Re]:null,Rt=B!==null?oe[B]:null,Ut=(xe==null?void 0:xe.title1)||(xe==null?void 0:xe.title2)||(xe==null?void 0:xe.title3)||(bt==null?void 0:bt.title1)||(bt==null?void 0:bt.title2)||(bt==null?void 0:bt.title3),Kt=Bm(v,oe,t),ft=I!==null,Jt=Ut||Kt||ft,Ce=Kt&&ft?{gap:q}:void 0,je=`${e}-titles-stack${K?` ${e}-titles-stack-stacked`:""}`,Ke=`${e}-titles-layer-out${K?` ${e}-titles-layer-out-stacked`:""}`,He=`${e}-titles-layer-out`,Be=(P??0)>0||o,dt=G(x),_e=a.useMemo(()=>({title1Width:k??Ti.title1Width,title2Width:A??Ti.title2Width,title3Width:O??Ti.title3Width}),[k,A,O]),Ze=a.useMemo(()=>({title2MarginLeft:D,title3MarginLeft:R}),[D,R]),tt=a.useMemo(()=>xe?Dn(e,xe,_,ye,f):[],[e,xe,_,ye,f]),Ft=a.useMemo(()=>tt.map(J=>_e[J.widthKey]),[tt,_e]),Ct=a.useMemo(()=>ki(tt.length,Ft),[tt.length,Ft]),st=a.useMemo(()=>co(tt.length,Ft),[tt.length,Ft]),Ht=a.useMemo(()=>tt.filter(J=>J.prefix==="title1"),[tt]),At=a.useMemo(()=>tt.filter(J=>J.prefix==="title2"||J.prefix==="title3"),[tt]),Vt=a.useMemo(()=>Vn(Ht,_e),[Ht,_e]),Bt=a.useMemo(()=>Vn(At,_e),[At,_e]),Pt=a.useCallback((J,Me)=>{const p=tt.findIndex(N=>N.prefix===J.prefix);if(!K||Me==="single-row")return{effectiveWidth:st[p]??0,resolvedWidth:Ct[p]??0,maxWidth:an(p,Ct)};if(Me==="two-row-top"){const N=Ht.findIndex(de=>de.prefix===J.prefix);return{effectiveWidth:Vt.effective[N]??0,resolvedWidth:Vt.resolved[N]??0,maxWidth:an(N,Vt.resolved)}}const T=At.findIndex(N=>N.prefix===J.prefix);return{effectiveWidth:Bt.effective[T]??0,resolvedWidth:Bt.resolved[T]??0,maxWidth:an(T,Bt.resolved)}},[tt,At,Bt,st,Ct,Ht,Vt,K]),Zt=a.useCallback(J=>Dl(tt,Ct,Ze,J)+(K?0:P??0),[tt,Ct,Ze,K,P]),wt=a.useCallback(()=>K?0:P??0,[K,P]),Gt=a.useCallback(J=>At.slice(0,J).reduce((Me,p,T)=>Me+(p.marginLeftKey?Ze[p.marginLeftKey]??0:0)+(Bt.resolved[T]??0),0),[At,Bt.resolved,Ze]),ut=a.useCallback(J=>{const Me=At[J];return Gt(J)+(Me.marginLeftKey?Ze[Me.marginLeftKey]??0:0)+(Bt.resolved[J]??0)},[At,Bt.resolved,Gt,Ze]),Wt=a.useCallback((J,Me,p)=>{if(!K||p==="single-row"){const Ne=J.findIndex(Xt=>Xt.prefix===Me.prefix),rt=J.map(Xt=>_e[Xt.widthKey]),yt=ki(J.length,rt);return{effectiveWidth:co(J.length,rt)[Ne]??0,resolvedWidth:yt[Ne]??0,maxWidth:an(Ne,yt)}}if(p==="two-row-top"){const Ne=J.filter(Xt=>Xt.prefix==="title1"),rt=Ne.findIndex(Xt=>Xt.prefix===Me.prefix),{resolved:yt,effective:tn}=Vn(Ne,_e);return{effectiveWidth:tn[rt]??0,resolvedWidth:yt[rt]??0,maxWidth:an(rt,yt)}}const T=J.filter(Ne=>Ne.prefix==="title2"||Ne.prefix==="title3"),N=T.findIndex(Ne=>Ne.prefix===Me.prefix),{resolved:de,effective:Te}=Vn(T,_e);return{effectiveWidth:Te[N]??0,resolvedWidth:de[N]??0,maxWidth:an(N,de)}},[_e,K]),zt=(J,Me,p)=>{const T=J.marginLeftKey?Ze[J.marginLeftKey]??0:0,{effectiveWidth:N,resolvedWidth:de,maxWidth:Te}=p??Pt(J,Me),Ne=Math.max(T,zn),rt=o&&Me==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":J.prefix,style:{width:G(N),...T>0?{marginLeft:G(T)}:{}},children:[r.jsx("p",{className:J.className,style:J.style,children:J.text}),rt&&J.marginLeftKey?r.jsx("div",{"data-controls":J.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(de),style:{position:"absolute",top:0,left:G(-T),width:G(Ne),height:"100%",pointerEvents:"auto"}}):null,rt?r.jsx("div",{"data-controls":J.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Te),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:G(-mn/2),width:G(mn),height:"100%",pointerEvents:"auto"}}):null]},J.className)},g=(J="two-row")=>{const Me=tt.findIndex(N=>N.prefix==="title1"),p=Me>=0?Ct[Me]:_e.title1Width,T=J==="two-row"&&o;return r.jsx("div",{...T?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:G(P??0),flexShrink:0,alignSelf:"stretch",...T?{pointerEvents:"auto"}:{}}})},ce=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:_,"aria-hidden":"true",children:" "}),Ee=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ve,"aria-live":"polite","aria-atomic":"true",children:jm(oe,fe,v,t)}),Ie=()=>Kt?o&&ft?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Ee(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Or(q)} + ${q}))`,width:Or(q),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Ee():null,Je=()=>!Kt&&!ft?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ce,children:[Ie(),ft?nt():null]}),Et=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||Ut?ce():null,Be?g("single-row"):null,St(xe),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Je(),Sn()]}),Ve=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||Ut?ce():null,Be?g("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:we&&me?{minHeight:me}:void 0,children:[r.jsx("div",{ref:mt,className:je,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Qn(ge||xe)}),r.jsxs("div",{ref:at,className:je,style:{position:we?"absolute":"relative",inset:we?0:void 0,width:"100%",...we&&Le?{width:Le,maxWidth:"100%"}:void 0},children:[bt&&we?r.jsx("div",{className:`${Ke} ${e}-titles-fade-out`,children:Qn(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Qn(xe)})]})]}),Je(),Sn()]}),nt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(W??0,i),height:E.scalingValue(W??0,i),marginRight:ee,"--close-icon-hover-color":Y},children:[r.jsx("button",{ref:it,type:"button",className:`${e}-close-icon-inner`,onClick:ct,"aria-label":"Close",children:r.jsx(fn,{url:I??"",fill:V,hoverFill:i&&!s?V:Y,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:ee,height:"100%",pointerEvents:"auto"}})]}),Ot=(J,Me)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Kt||Ut?ce():null,Be?g("two-row"):null,Me!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Me},children:J}):r.jsxs(r.Fragment,{children:[J,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Je()]}),St=J=>{if(!J)return null;const Me=Dn(e,J,_,ye,f);return r.jsx(r.Fragment,{children:Me.map(p=>zt(p,"single-row",Wt(Me,p,"single-row")))})},ln=J=>{if(!J)return null;const Me=Dn(e,J,_,ye,f),p=Me.find(T=>T.prefix==="title1");return p?zt(p,"two-row-top",Wt(Me,p,"two-row-top")):null},cn=(J,Me=!1)=>{const p=J?Dn(e,J,_,ye,f):[],T=p.filter(Te=>Te.prefix==="title2"||Te.prefix==="title3"),N=o&&Me;return T.length>0||N||(x??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[T.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[T.map(Te=>zt(Te,"two-row-bottom",Wt(p,Te,"two-row-bottom"))),Me&&o?r.jsxs(r.Fragment,{children:[Tr(),Lr()]}):null]}):null,(x??0)>0||N?r.jsx("div",{"data-controls":N?"titleRowMarginBottom":void 0,"data-controls-axis":N?"y":void 0,"data-controls-reverse":N?"":void 0,className:N?`${e}-control`:void 0,style:{height:dt,width:"100%",flexShrink:0,pointerEvents:N?"auto":"none"}}):null]}):null},Zn=(J,Me=!1)=>r.jsxs(r.Fragment,{children:[Ot(ln(J)),cn(J,Me)]}),Qn=J=>K?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Zn(J)}):J?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:St(J)}):null,$o=()=>{const J=K?-1:tt.findIndex(T=>T.prefix==="title1"),Me=!K&&(o||(P??0)>0)?(()=>{const T=P??0,N=J>=0?Ct[J]:_e.title1Width,de=Math.max(T,zn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(N),style:{position:"absolute",top:0,left:0,width:G(de),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=tt.flatMap((T,N)=>{if(!T.marginLeftKey)return[];const de=Ze[T.marginLeftKey]??0,Te=zl(tt,Ct,Ze,N)+wt(),Ne=Math.max(de,zn);return r.jsx("div",{"data-controls":T.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ct[N]),style:{position:"absolute",top:0,left:G(Te),width:G(Ne),height:"100%",pointerEvents:"auto"}},T.marginLeftKey)});return Me?[Me,...p]:p},Co=()=>tt.map((J,Me)=>{const p=an(Me,Ct),N=Zt(Me)-mn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":J.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(N),width:G(mn),height:"100%",pointerEvents:"auto"}})},`${J.widthKey}-junction`)}),Tr=()=>At.flatMap((J,Me)=>{if(!J.marginLeftKey)return[];const p=Ze[J.marginLeftKey]??0,T=Gt(Me),N=Math.max(p,zn),{resolvedWidth:de}=Pt(J,"two-row-bottom");return r.jsx("div",{"data-controls":J.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(de),style:{position:"absolute",top:0,left:G(T),width:G(N),height:"100%",pointerEvents:"auto"}},J.marginLeftKey)}),Lr=()=>At.map((J,Me)=>{const{maxWidth:p}=Pt(J,"two-row-bottom"),N=ut(Me)-mn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":J.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(N),width:G(mn),height:"100%",pointerEvents:"auto"}})},`${J.widthKey}-junction`)}),Sn=()=>!o||K?null:r.jsxs(r.Fragment,{children:[$o(),Co()]}),hi=J=>{const Me=!J.objectFit&&Wn(b);return{className:`${e}-slide-image-cell${Me?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:$,maxHeight:M,...Me?{"--image-aspect-ratio":$r(b)}:{}}}},To=J=>J.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":J.objectFit}}:Wn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ei=J=>{if(J.length===0)return null;const Me=J.length>1,p=Or(H),T=`calc(-0.5 * (${p} + ${H}))`;if(J.length===1){const N=J[0];return r.jsx("div",{...hi(N),children:r.jsx("img",{...To(N),src:N.url,alt:N.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Me?{gap:H}:void 0,children:J.map((N,de)=>r.jsxs("div",{...hi(N),children:[r.jsx("img",{...To(N),src:N.url,alt:N.name??"",draggable:!1}),o&&Me&&de<J.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:T,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${N.url}-${de}`))})},Lo=!!(xe!=null&&xe.title2||xe!=null&&xe.title3||bt!=null&&bt.title2||bt!=null&&bt.title3||(x??0)>0||o),Ir=()=>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:mt,className:je,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Zn(ge||xe)}),r.jsxs("div",{ref:at,className:`${e}-titles-row-two-row`,style:{...we&&me?{minHeight:me}:void 0,...we&&Le?{width:Le,maxWidth:"100%"}:void 0},children:[Ot(r.jsxs("div",{className:je,style:{position:we?"absolute":"relative",inset:we?0:void 0,width:"100%"},children:[bt&&we?r.jsx("div",{className:`${He} ${e}-titles-fade-out`,children:ln(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ln(xe)})]}),we&&me?me:void 0),Lo?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[bt&&we?r.jsx("div",{className:`${Ke} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:cn(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${K?` ${e}-titles-layer-in-stacked`:""}`,children:cn(xe,!0)})]}):null]})]}),Rr=()=>{const J=Lo;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...J?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:J?void 0:{flex:"0 0 auto",height:"auto"},children:Zn(xe,!0)}),Sn()]})};return r.jsxs("div",{ref:De,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{_t||ct()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:pe?1:0,transition:"opacity 300ms ease",pointerEvents:pe?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:S,...Qe}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...Ge,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Tt,onClick:J=>J.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":le&&oe.length>1?"true":"false",onPointerDown:le?Dt:void 0,onPointerUp:le?en:void 0,onPointerCancel:le?on:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Rt&&F?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:J=>{J.target===J.currentTarget&&xt(ne)},children:r.jsx("div",{className:`${e}-slide-area`,children:ei(Rt.images)})},`slide-out-${ne}`):null,r.jsx("div",{className:`${e}-slide-layer-in${F?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:be?ei(be.images):null})},`slide-in-${ne}-${fe}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Lt,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%",...K?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${K?` ${e}-lightbox-content-area-stacked`:""}`,children:Jt&&r.jsx("div",{className:`${e}-text-bar-cell${K?` ${e}-text-bar-cell-stacked`:""}`,style:K?void 0:{flex:1,minWidth:0,width:"100%"},children:K?L==="fade"?Ir():Rr():L==="fade"?Ve():Et()})})})]})]})]})};function wf(e){return`
13890
13864
  .${e}-wrapper {
13891
13865
  position: relative;
13892
13866
  width: 100%;
@@ -14420,7 +14394,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
14420
14394
  pointer-events: auto;
14421
14395
  z-index: 10;
14422
14396
  }
14423
- `}const tf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l,metadata:s})=>{const{prefix:d}=L.useScopedStyles(),c=(s==null?void 0:s.itemId)??null,{cover:u,coverFit:m,type:y}=e,w=a.useRef(null),[$,h]=a.useState(!1),[v,S]=a.useState(0),T=a.useRef(!1),R=a.useRef(!1),P=a.useRef(!1),H=a.useMemo(()=>(t??[]).filter(f=>Li(f).length>0),[t]),E=$&&H.length>0,j=!n,k=a.useCallback(()=>{j&&(P.current=!0,gm(R.current,c),R.current=!1)},[j,c]),x=(f=0)=>{if(H.length===0||n&&!i&&!o)return;const A=Ho(H,y),W=Math.max(0,Math.min(f,A.length-1));if(S(W),j){const z=wl();bl(W+1,c,z),R.current=!z}h(!0)},Y=a.useCallback(()=>{h(!1),P.current=!1},[]);return a.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),a.useEffect(()=>{if(!j||T.current)return;T.current=!0;const f=is(c);if(!f)return;const A=os(f,Ho(H,y).length);A<0||(S(A),h(!0))},[H,c,j,y]),a.useEffect(()=>{if(!j)return;const f=()=>{if(P.current){P.current=!1,h(!1);return}const A=is(c);if(!A){h(!1);return}const W=os(A,Ho(H,y).length);if(W<0){h(!1);return}R.current=!1,S(W),h(!0)};return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[H,c,j,y]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:w,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ef(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${kn(m)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>x(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...kn(m)?{"--image-aspect-ratio":ur(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${kn(m)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),E&&typeof document<"u"&&(()=>{const f=(l?document.getElementById(l):null)??document.body;return Wi.createPortal(r.jsx(Qh,{prefix:d,entries:H,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:v,enableUrlSync:j,journalItemId:c,onBeforeClose:k,onClose:Y}),f)})()]})},nf=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14397
+ `}const Sf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:l})=>{const{prefix:d}=E.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:m,type:v}=e,b=a.useRef(null),[S,y]=a.useState(!1),[w,C]=a.useState(0),L=a.useRef(!1),k=a.useRef(!1),A=a.useRef(!1),O=a.useMemo(()=>(t??[]).filter(h=>Mi(h).length>0),[t]),P=S&&O.length>0,D=!n,R=a.useCallback(()=>{D&&(A.current=!0,Fm(k.current,c),k.current=!1)},[D,c]),x=(h=0)=>{if(O.length===0||n&&!i&&!o)return;const I=Uo(O,v),W=Math.max(0,Math.min(h,I.length-1));if(C(W),D){const V=jl();Ol(W+1,c,V),k.current=!V}y(!0)},U=a.useCallback(()=>{y(!1),A.current=!1},[]);return a.useEffect(()=>{!n||i||o||y(!1)},[n,i,o]),a.useEffect(()=>{if(!D||L.current)return;L.current=!0;const h=bs(c);if(!h)return;const I=ws(h,Uo(O,v).length);I<0||(C(I),y(!0))},[O,c,D,v]),a.useEffect(()=>{if(!D)return;const h=()=>{if(A.current){A.current=!1,y(!1);return}const I=bs(c);if(!I){y(!1);return}const W=ws(I,Uo(O,v).length);if(W<0){y(!1);return}k.current=!1,C(W),y(!0)};return window.addEventListener("popstate",h),()=>window.removeEventListener("popstate",h)},[O,c,D,v]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:b,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:wf(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Wn(m)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>x(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Wn(m)?{"--image-aspect-ratio":$r(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Wn(m)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),P&&typeof document<"u"&&(()=>{const h=(s?document.getElementById(s):null)??document.body;return mi.createPortal(r.jsx(bf,{prefix:d,entries:O,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:w,enableUrlSync:D,journalItemId:c,onBeforeClose:R,onClose:U}),h)})()]})},$f=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14424
14398
  import { createPortal } from 'react-dom';
14425
14399
  import { CommonComponentProps } from '../props';
14426
14400
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15188,7 +15162,7 @@ export type LightboxJournalSettings = {
15188
15162
  closeIconColor: string;
15189
15163
  closeIconHoverColor: string;
15190
15164
  };
15191
- `,of="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>'),ii={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 rf(e){const t={};return t[Je(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Je(e,"fontSettings")]={...ii.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Je(e,"fontSize")]={...ii.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Je(e,"lineHeight")]={...ii.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Je(e,"letterSpacing")]={...ii.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Je(e,"wordSpacing")]={...ii.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Je(e,"textAlign")]={...ii.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Je(e,"textAppearance")]={...ii.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const af=ci.reduce((e,t)=>({...e,...rf(t)}),{}),sf=ci.reduce((e,t)=>({...e,[Je(t,"fontFamily")]:"Goudy Bookletter 1911",[Je(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Je(t,"letterSpacing")]:0,[Je(t,"wordSpacing")]:0,[Je(t,"textAlign")]:"left",[Je(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Fr(e){return ci.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Je(n,"fontSize")]=i),o!==void 0&&(t[Je(n,"lineHeight")]=o),t},{})}const lf=wm(),cf={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"}},...af,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:of,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...sf,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...Fr({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...Fr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},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,...Fr({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:[lf]}],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"}]}]}},df={element:tf,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:cf,sourceCode:nf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...ci.map(e=>({path:`${Je(e,"fontFamily")}`}))]},fontRelations:{...ci.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Je(t,"fontFamily")}`}),{})}},uf={sizeType:"custom",value:700,min:400,max:700};function Xo(e,t){return{widthPx:e,heightPx:e*t}}function Xr(e,t,n,i,o,l){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,l/2),i-l/2)}}function Ps(e,t,n,i){const{heightPx:o}=Xo(n,i);return Xr(e/2,t/2,e,t,n,o)}function zl(e,t,n){for(const i of n){const{heightPx:o}=Xo(i.widthPx,i.aspectRatio),l=i.widthPx/2,s=o/2;if(e>=i.x-l&&e<=i.x+l&&t>=i.y-s&&t<=i.y+s)return!0}return!1}function pf(e,t,n,i,o,l,s,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":zl(e,t,n)||l==="area"?s??"none":d??"none"}function ks(e,t,n){var d;const{sizeType:i,value:o,min:l,max:s}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(s-l)+l)}function mf(e){return`
15165
+ `,Cf="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>'),si={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 Tf(e){const t={};return t[ze(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ze(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ze(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ze(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ze(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ze(e,"textAppearance")]={...si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Lf=Kn.reduce((e,t)=>({...e,...Tf(t)}),{}),If=Kn.reduce((e,t)=>({...e,[ze(t,"fontFamily")]:"Goudy Bookletter 1911",[ze(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ze(t,"letterSpacing")]:0,[ze(t,"wordSpacing")]:0,[ze(t,"textAlign")]:"left",[ze(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ur(e){return Kn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ze(n,"fontSize")]=i),o!==void 0&&(t[ze(n,"lineHeight")]=o),t},{})}const Rf=zm(),Ef={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"}},...Lf,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:Cf,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...If,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...Ur({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...Ur({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},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,...Ur({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:[Rf]}],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"}]}]}},Mf={element:Sf,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Ef,sourceCode:$f,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Kn.map(e=>({path:`${ze(e,"fontFamily")}`}))]},fontRelations:{...Kn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ze(t,"fontFamily")}`}),{})}},kf={sizeType:"custom",value:700,min:400,max:700};function ar(e,t){return{widthPx:e,heightPx:e*t}}function ca(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}=ar(n,i);return ca(e/2,t/2,e,t,n,o)}function ac(e,t,n){for(const i of n){const{heightPx:o}=ar(i.widthPx,i.aspectRatio),s=i.widthPx/2,l=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Pf(e,t,n,i,o,s,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":ac(e,t,n)||s==="area"?l??"none":d??"none"}function Xs(e,t,n){var d;const{sizeType:i,value:o,min:s,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-s)+s)}function Af(e){return`
15192
15166
  .${e}-root {
15193
15167
  position: absolute;
15194
15168
  top: 0;
@@ -15223,7 +15197,7 @@ export type LightboxJournalSettings = {
15223
15197
  width: 32px;
15224
15198
  height: 32px;
15225
15199
  }
15226
- `}function gf(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 hf(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await gf(i)]));return new Map(n)}function ff({settings:e,content:t=[],isEditor:n}){const{prefix:i}=L.useScopedStyles(),[o,l]=a.useState(null),[s,d]=a.useState([]),[c,u]=a.useState(0),m=a.useRef(0),[y,w]=a.useState({x:0,y:0}),[$,h]=a.useState("none"),v=a.useRef({x:0,y:0}),[S,T]=a.useState(!1),[R,P]=a.useState(!1),H=a.useRef(new Map),{imageSize:E=uf,cursor:j="system",target:k="area",position:x="random",visible:Y="all",defaultCursor:f=null,hoverCursor:A=null}=e,W=a.useMemo(()=>mf(i),[i]),z=a.useCallback((N,C,I=s)=>{if(!o)return;const V=o.getBoundingClientRect(),K=N-V.left,ee=C-V.top;w({x:K,y:ee}),h(pf(K,ee,I,o,j,k,A,f))},[o,s,j,k,A,f]);a.useEffect(()=>{const N=[...t.map(I=>I.image.url),f,A].filter(I=>!!I);if(N.length===0){H.current=new Map,P(!0);return}let C=!1;return P(!1),hf(N).then(I=>{C||(H.current=I,P(!0))}),()=>{C=!0}},[t,f,A]),a.useEffect(()=>{if(!o)return;const N=I=>{I.stopPropagation(),v.current={x:I.clientX,y:I.clientY},z(I.clientX,I.clientY)},C=()=>{S&&z(v.current.x,v.current.y)};return o.addEventListener("mousemove",N),window.addEventListener("scroll",C,!0),()=>{o.removeEventListener("mousemove",N),window.removeEventListener("scroll",C,!0)}},[o,S,z]),a.useEffect(()=>{!o||!S||z(v.current.x,v.current.y)},[s,o,S,z]),a.useEffect(()=>{S||h("none")},[S]);const G=(N,C,I,V={})=>{var he;const K=((he=H.current.get(N.image.url))==null?void 0:he.aspectRatio)??1,ee=ks(N.image.url,E,H.current),{heightPx:O}=Xo(ee,K);let ge=0,g=0;return x==="same"?{x:ge,y:g}=Ps(C,I,ee,K):(ge=V.x??Math.random()*C,g=V.y??Math.random()*I,{x:ge,y:g}=Xr(ge,g,C,I,ee,O)),{id:m.current++,url:N.image.url,link:N.link,name:N.image.name,x:ge,y:g,xRatio:ge/C,yRatio:g/I,aspectRatio:K,widthPx:ee}},le=()=>{if(!o)return;const N=o.getBoundingClientRect(),C=N.width,I=N.height;C===0||I===0||d(V=>V.length===0?V:V.map(K=>{const ee=E.sizeType==="random"?K.widthPx:ks(K.url,E,H.current),{heightPx:O}=Xo(ee,K.aspectRatio);if(x==="same"){const{x:he,y:re}=Ps(C,I,ee,K.aspectRatio);return{...K,x:he,y:re,widthPx:ee}}const{x:ge,y:g}=Xr(K.xRatio*C,K.yRatio*I,C,I,ee,O);return{...K,x:ge,y:g,widthPx:ee}}))};a.useEffect(()=>{if(!o||t.length===0||!R)return;const N=o.getBoundingClientRect(),C=N.width,I=N.height,V=G(t[0],C,I);d([V]),u(1)},[E,x,o,t,R]),a.useEffect(()=>{if(!o)return;le();const N=new ResizeObserver(le);return N.observe(o),window.addEventListener("resize",le),()=>{N.disconnect(),window.removeEventListener("resize",le)}},[o,x,E,s.length]),a.useEffect(()=>{Y==="last One"&&d(N=>N.length>0?[N[N.length-1]]:[])},[Y]);const J=N=>{if(!o||t.length===0||!R)return;const C=o.getBoundingClientRect(),I=N.clientX-C.left,V=N.clientY-C.top;if(k==="image"&&!zl(I,V,s))return;let K=0,ee=0;x==="on Click"?(K=I,ee=V):x==="same"?(K=C.width/2,ee=C.height/2):(K=Math.random()*C.width,ee=Math.random()*C.height);const O=t[c],ge=G(O,C.width,C.height,{x:K,y:ee}),g=Y==="all"?[...s,ge]:[ge];d(g),u(he=>he>=t.length-1?0:he+1),z(N.clientX,N.clientY,g)},D=j==="custom"&&$!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),r.jsxs("div",{ref:l,onClick:J,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),className:`${i}-root`,style:{cursor:D?"none":"default"},children:[s.map(N=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${N.y}px`,left:`${N.x}px`,width:`${N.widthPx}px`,cursor:D?"none":"default"},children:k==="area"&&N.link?r.jsx("a",{href:N.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:N.url,alt:N.name,className:`${i}-image`})}):r.jsx("img",{src:N.url,alt:N.name,className:`${i}-image`})},N.id)),S&&D&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${$}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const yf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15200
+ `}function Wf(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 Ff(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Wf(i)]));return new Map(n)}function _f({settings:e,content:t=[],isEditor:n}){const{prefix:i}=E.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),m=a.useRef(0),[v,b]=a.useState({x:0,y:0}),[S,y]=a.useState("none"),w=a.useRef({x:0,y:0}),[C,L]=a.useState(!1),[k,A]=a.useState(!1),O=a.useRef(new Map),{imageSize:P=kf,cursor:D="system",target:R="area",position:x="random",visible:U="all",defaultCursor:h=null,hoverCursor:I=null}=e,W=a.useMemo(()=>Af(i),[i]),V=a.useCallback((H,$,M=l)=>{if(!o)return;const q=o.getBoundingClientRect(),z=H-q.left,ee=$-q.top;b({x:z,y:ee}),y(Pf(z,ee,M,o,D,R,I,h))},[o,l,D,R,I,h]);a.useEffect(()=>{const H=[...t.map(M=>M.image.url),h,I].filter(M=>!!M);if(H.length===0){O.current=new Map,A(!0);return}let $=!1;return A(!1),Ff(H).then(M=>{$||(O.current=M,A(!0))}),()=>{$=!0}},[t,h,I]),a.useEffect(()=>{if(!o)return;const H=M=>{M.stopPropagation(),w.current={x:M.clientX,y:M.clientY},V(M.clientX,M.clientY)},$=()=>{C&&V(w.current.x,w.current.y)};return o.addEventListener("mousemove",H),window.addEventListener("scroll",$,!0),()=>{o.removeEventListener("mousemove",H),window.removeEventListener("scroll",$,!0)}},[o,C,V]),a.useEffect(()=>{!o||!C||V(w.current.x,w.current.y)},[l,o,C,V]),a.useEffect(()=>{C||y("none")},[C]);const Y=(H,$,M,q={})=>{var ve;const z=((ve=O.current.get(H.image.url))==null?void 0:ve.aspectRatio)??1,ee=Xs(H.image.url,P,O.current),{heightPx:_}=ar(ee,z);let ye=0,f=0;return x==="same"?{x:ye,y:f}=Us($,M,ee,z):(ye=q.x??Math.random()*$,f=q.y??Math.random()*M,{x:ye,y:f}=ca(ye,f,$,M,ee,_)),{id:m.current++,url:H.image.url,link:H.link,name:H.image.name,x:ye,y:f,xRatio:ye/$,yRatio:f/M,aspectRatio:z,widthPx:ee}},ae=()=>{if(!o)return;const H=o.getBoundingClientRect(),$=H.width,M=H.height;$===0||M===0||d(q=>q.length===0?q:q.map(z=>{const ee=P.sizeType==="random"?z.widthPx:Xs(z.url,P,O.current),{heightPx:_}=ar(ee,z.aspectRatio);if(x==="same"){const{x:ve,y:K}=Us($,M,ee,z.aspectRatio);return{...z,x:ve,y:K,widthPx:ee}}const{x:ye,y:f}=ca(z.xRatio*$,z.yRatio*M,$,M,ee,_);return{...z,x:ye,y:f,widthPx:ee}}))};a.useEffect(()=>{if(!o||t.length===0||!k)return;const H=o.getBoundingClientRect(),$=H.width,M=H.height,q=Y(t[0],$,M);d([q]),u(1)},[P,x,o,t,k]),a.useEffect(()=>{if(!o)return;ae();const H=new ResizeObserver(ae);return H.observe(o),window.addEventListener("resize",ae),()=>{H.disconnect(),window.removeEventListener("resize",ae)}},[o,x,P,l.length]),a.useEffect(()=>{U==="last One"&&d(H=>H.length>0?[H[H.length-1]]:[])},[U]);const Z=H=>{if(!o||t.length===0||!k)return;const $=o.getBoundingClientRect(),M=H.clientX-$.left,q=H.clientY-$.top;if(R==="image"&&!ac(M,q,l))return;let z=0,ee=0;x==="on Click"?(z=M,ee=q):x==="same"?(z=$.width/2,ee=$.height/2):(z=Math.random()*$.width,ee=Math.random()*$.height);const _=t[c],ye=Y(_,$.width,$.height,{x:z,y:ee}),f=U==="all"?[...l,ye]:[ye];d(f),u(ve=>ve>=t.length-1?0:ve+1),V(H.clientX,H.clientY,f)},G=D==="custom"&&S!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),r.jsxs("div",{ref:s,onClick:Z,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),className:`${i}-root`,style:{cursor:G?"none":"default"},children:[l.map(H=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${H.y}px`,left:`${H.x}px`,width:`${H.widthPx}px`,cursor:G?"none":"default"},children:R==="area"&&H.link?r.jsx("a",{href:H.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:H.url,alt:H.name,className:`${i}-image`})}):r.jsx("img",{src:H.url,alt:H.name,className:`${i}-image`})},H.id)),C&&G&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${S}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Hf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15227
15201
  import { CommonComponentProps } from '../props';
15228
15202
  import { useScopedStyles } from '../utils/index';
15229
15203
 
@@ -15744,7 +15718,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
15744
15718
  </>
15745
15719
  );
15746
15720
  }
15747
- `,vf={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"]}]}]},xf={element:ff,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:vf,sourceCode:yf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.defaultCursor"},{path:"settings.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},bf=100,wf=70,Nn="cubic-bezier(0.86, 0, 0.07, 1)";function Sf(e){return`
15721
+ `,Nf={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"]}]}]},Of={element:_f,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:Nf,sourceCode:Hf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.defaultCursor"},{path:"settings.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},jf=100,Bf=70,On="cubic-bezier(0.86, 0, 0.07, 1)";function zf(e){return`
15748
15722
  .${e}-wrapper {
15749
15723
  position: relative;
15750
15724
  width: 100%;
@@ -15779,34 +15753,34 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
15779
15753
  }
15780
15754
  .${e}-incoming-next {
15781
15755
  z-index: 4;
15782
- transition: transform var(--${e}-transition-ms) ${Nn};
15756
+ transition: transform var(--${e}-transition-ms) ${On};
15783
15757
  }
15784
15758
  .${e}-incoming-prev {
15785
15759
  z-index: 4;
15786
- transition: transform var(--${e}-transition-ms) ${Nn};
15760
+ transition: transform var(--${e}-transition-ms) ${On};
15787
15761
  }
15788
15762
  .${e}-outgoing {
15789
15763
  will-change: transform;
15790
15764
  }
15791
15765
  .${e}-outgoing-next {
15792
15766
  z-index: 3;
15793
- transition: transform var(--${e}-transition-ms) ${Nn};
15767
+ transition: transform var(--${e}-transition-ms) ${On};
15794
15768
  }
15795
15769
  .${e}-outgoing-prev {
15796
15770
  z-index: 3;
15797
- transition: transform var(--${e}-transition-ms) ${Nn};
15771
+ transition: transform var(--${e}-transition-ms) ${On};
15798
15772
  }
15799
15773
  .${e}-outgoing-next .${e}-effect-image {
15800
- transition: filter var(--${e}-transition-ms) ${Nn};
15774
+ transition: filter var(--${e}-transition-ms) ${On};
15801
15775
  }
15802
15776
  .${e}-outgoing-prev .${e}-effect-image {
15803
- transition: filter var(--${e}-transition-ms) ${Nn};
15777
+ transition: filter var(--${e}-transition-ms) ${On};
15804
15778
  }
15805
15779
  .${e}-incoming .${e}-effect-image {
15806
- transition: filter var(--${e}-transition-ms) ${Nn};
15780
+ transition: filter var(--${e}-transition-ms) ${On};
15807
15781
  }
15808
15782
  .${e}-background .${e}-effect-image {
15809
- transition: filter var(--${e}-transition-ms) ${Nn};
15783
+ transition: filter var(--${e}-transition-ms) ${On};
15810
15784
  }
15811
15785
  .${e}-snap .${e}-incoming,
15812
15786
  .${e}-snap .${e}-outgoing,
@@ -15854,7 +15828,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
15854
15828
  display: block;
15855
15829
  pointer-events: none;
15856
15830
  }
15857
- `}function $f(e){return e==="blur"?wf:e==="greyscale"?bf:0}function zi(e,t=1,n=1){const i=$f(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 As(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Cf(e,t){return t<=1?0:(e-1+t)%t}function Tf(e,t=1){return!e||e.height===0?t:e.width/e.height}function Lf(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const l=e*i/100,s=t*o/100;let d=l,c=d/n;return c>s&&(c=s,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function Ws(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 Dl(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function Fs(e,t,n){return{...Dl(e),[`--${n}-stage-scale`]:t}}function If(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 Rf({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,_,te,M,X,Z,ce;const{prefix:o}=L.useScopedStyles(),l=a.useMemo(()=>Sf(o),[o]),{imageSize:s,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:m="greyscale"}=e,y=t??[],w=As(y.length),[$,h]=a.useState(w.activeIndex),[v,S]=a.useState(w.backgroundIndex),[T,R]=a.useState(!1),[P,H]=a.useState(!1),[E,j]=a.useState(null),[k,x]=a.useState(null),[Y,f]=a.useState(0),[A,W]=a.useState(1),[z,G]=a.useState("none"),[le,J]=a.useState("next"),[D,N]=a.useState({}),[C,I]=a.useState({width:0,height:0}),V=a.useRef(null),K=a.useRef(null),ee=!n||!!i,O=s??60,ge=Math.max(10,Math.min(100,d??O)),g=Math.max(10,Math.min(100,c??O)),he=Math.max(100,u),re=zi(m),be=a.useCallback(ue=>{const ye=Tf(ue?D[ue]:void 0);return Lf(C.width,C.height,ye,ge,g)},[C.height,C.width,D,g,ge]);a.useEffect(()=>{const ue=K.current;if(!ue)return;const ye=new ResizeObserver(([Le])=>{const{width:q,height:de}=Le.contentRect;I({width:q,height:de})});return ye.observe(ue),()=>ye.disconnect()},[]),a.useEffect(()=>{const ue=(t??[]).map(ye=>{var Le;return(Le=ye.image)==null?void 0:Le.url}).filter(ye=>!!ye);If(ue,(ye,Le)=>{N(q=>{var de,Ee;return((de=q[ye])==null?void 0:de.width)===Le.width&&((Ee=q[ye])==null?void 0:Ee.height)===Le.height?q:{...q,[ye]:Le}})})},[t]),a.useEffect(()=>{const{backgroundIndex:ue,activeIndex:ye}=As(y.length);h(ye),S(ue),R(!1),H(!1),j(null),x(null),f(0),W(1),G("none"),J("next")},[y.length,t]),a.useEffect(()=>()=>{V.current&&clearTimeout(V.current)},[]);const ke=a.useCallback(ue=>{var Q,ne,Fe,We;if(!ee||T||y.length<=1)return;const ye=ue==="next"?($+1)%y.length:($-1+y.length)%y.length,Le=be((ne=(Q=y[$])==null?void 0:Q.image)==null?void 0:ne.url),q=be((We=(Fe=y[ye])==null?void 0:Fe.image)==null?void 0:We.url),de=Ws(C.width,C.height,Le),Ee=Ws(C.width,C.height,q);V.current&&clearTimeout(V.current),J(ue),H(!0),R(!0),ue==="next"?(j($),x(ye),f(0),W(1),G(zi(m,0,1))):(S(Cf(ye,y.length)),j(ye),x($),f(1),W(Ee),G(zi(m,1,Ee))),requestAnimationFrame(()=>{H(!1),requestAnimationFrame(()=>{ue==="next"?(f(1),W(de),G(zi(m,1,de))):(f(0),W(1),G(zi(m,0,1)))})}),V.current=setTimeout(()=>{ue==="next"&&S($),h(ye),j(null),x(null),R(!1)},he)},[$,m,C.height,C.width,be,T,ee,y,he]),ae=y[$],ve=v!==null?y[v]:null,U=E!==null?y[E]:null,xe=k!==null?y[k]:null,me=y.length<=1?0:($-1+y.length)%y.length,pe=y.length<=1?0:($+1)%y.length,se=be((Se=ae==null?void 0:ae.image)==null?void 0:Se.url),Te=be((_=U==null?void 0:U.image)==null?void 0:_.url),Ie=be((te=xe==null?void 0:xe.image)==null?void 0:te.url),fe={[`--${o}-transition-ms`]:`${he}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsxs("div",{ref:K,className:it(`${o}-wrapper`,P&&`${o}-snap`,n&&!i&&`${o}-editor`),style:fe,"aria-label":"Zoom gallery",children:[((M=ve==null?void 0:ve.image)==null?void 0:M.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:ve.image.url,alt:"",style:{filter:re}})}),T&&((X=U==null?void 0:U.image)==null?void 0:X.url)&&r.jsx("div",{className:it(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${le}`),style:Fs(Te,A,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:U.image.url,alt:"",style:{filter:z}})}),T&&((Z=xe==null?void 0:xe.image)==null?void 0:Z.url)&&r.jsx("div",{className:it(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${le}`),style:Fs(Ie,Y,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:xe.image.url,alt:""})}),!T&&((ce=ae==null?void 0:ae.image)==null?void 0:ce.url)&&r.jsx("div",{className:it(`${o}-stage`,`${o}-foreground`),style:Dl(se),children:r.jsx("img",{className:`${o}-image`,src:ae.image.url,alt:ae.image.name??""})}),ee&&y.length>1&&!T&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:it(`${o}-nav`,`${o}-nav-prev`),onClick:()=>ke("prev"),"aria-label":`Show previous image (${me+1} of ${y.length})`}),r.jsx("button",{type:"button",className:it(`${o}-nav`,`${o}-nav-next`),onClick:()=>ke("next"),"aria-label":`Show next image (${pe+1} of ${y.length})`})]})]})]})}const Ef=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15831
+ `}function Df(e){return e==="blur"?Bf:e==="greyscale"?jf:0}function Ki(e,t=1,n=1){const i=Df(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 Ys(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Vf(e,t){return t<=1?0:(e-1+t)%t}function Gf(e,t=1){return!e||e.height===0?t:e.width/e.height}function qf(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,l=t*o/100;let d=s,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function Js(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 sc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function Zs(e,t,n){return{...sc(e),[`--${n}-stage-scale`]:t}}function Kf(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 Uf({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,B,re,F,te,ne,ue;const{prefix:o}=E.useScopedStyles(),s=a.useMemo(()=>zf(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:m="greyscale"}=e,v=t??[],b=Ys(v.length),[S,y]=a.useState(b.activeIndex),[w,C]=a.useState(b.backgroundIndex),[L,k]=a.useState(!1),[A,O]=a.useState(!1),[P,D]=a.useState(null),[R,x]=a.useState(null),[U,h]=a.useState(0),[I,W]=a.useState(1),[V,Y]=a.useState("none"),[ae,Z]=a.useState("next"),[G,H]=a.useState({}),[$,M]=a.useState({width:0,height:0}),q=a.useRef(null),z=a.useRef(null),ee=!n||!!i,_=l??60,ye=Math.max(10,Math.min(100,d??_)),f=Math.max(10,Math.min(100,c??_)),ve=Math.max(100,u),K=Ki(m),le=a.useCallback(me=>{const he=Gf(me?G[me]:void 0);return qf($.width,$.height,he,ye,f)},[$.height,$.width,G,f,ye]);a.useEffect(()=>{const me=z.current;if(!me)return;const he=new ResizeObserver(([Le])=>{const{width:Q,height:ge}=Le.contentRect;M({width:Q,height:ge})});return he.observe(me),()=>he.disconnect()},[]),a.useEffect(()=>{const me=(t??[]).map(he=>{var Le;return(Le=he.image)==null?void 0:Le.url}).filter(he=>!!he);Kf(me,(he,Le)=>{H(Q=>{var ge,Ae;return((ge=Q[he])==null?void 0:ge.width)===Le.width&&((Ae=Q[he])==null?void 0:Ae.height)===Le.height?Q:{...Q,[he]:Le}})})},[t]),a.useEffect(()=>{const{backgroundIndex:me,activeIndex:he}=Ys(v.length);y(he),C(me),k(!1),O(!1),D(null),x(null),h(0),W(1),Y("none"),Z("next")},[v.length,t]),a.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]);const $e=a.useCallback(me=>{var ie,j,Oe,Fe;if(!ee||L||v.length<=1)return;const he=me==="next"?(S+1)%v.length:(S-1+v.length)%v.length,Le=le((j=(ie=v[S])==null?void 0:ie.image)==null?void 0:j.url),Q=le((Fe=(Oe=v[he])==null?void 0:Oe.image)==null?void 0:Fe.url),ge=Js($.width,$.height,Le),Ae=Js($.width,$.height,Q);q.current&&clearTimeout(q.current),Z(me),O(!0),k(!0),me==="next"?(D(S),x(he),h(0),W(1),Y(Ki(m,0,1))):(C(Vf(he,v.length)),D(he),x(S),h(1),W(Ae),Y(Ki(m,1,Ae))),requestAnimationFrame(()=>{O(!1),requestAnimationFrame(()=>{me==="next"?(h(1),W(ge),Y(Ki(m,1,ge))):(h(0),W(1),Y(Ki(m,0,1)))})}),q.current=setTimeout(()=>{me==="next"&&C(S),y(he),D(null),x(null),k(!1)},ve)},[S,m,$.height,$.width,le,L,ee,v,ve]),oe=v[S],fe=w!==null?v[w]:null,X=P!==null?v[P]:null,be=R!==null?v[R]:null,xe=v.length<=1?0:(S-1+v.length)%v.length,pe=v.length<=1?0:(S+1)%v.length,se=le((Se=oe==null?void 0:oe.image)==null?void 0:Se.url),Re=le((B=X==null?void 0:X.image)==null?void 0:B.url),ke=le((re=be==null?void 0:be.image)==null?void 0:re.url),we={[`--${o}-transition-ms`]:`${ve}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:z,className:pt(`${o}-wrapper`,A&&`${o}-snap`,n&&!i&&`${o}-editor`),style:we,"aria-label":"Zoom gallery",children:[((F=fe==null?void 0:fe.image)==null?void 0:F.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:fe.image.url,alt:"",style:{filter:K}})}),L&&((te=X==null?void 0:X.image)==null?void 0:te.url)&&r.jsx("div",{className:pt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${ae}`),style:Zs(Re,I,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:X.image.url,alt:"",style:{filter:V}})}),L&&((ne=be==null?void 0:be.image)==null?void 0:ne.url)&&r.jsx("div",{className:pt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${ae}`),style:Zs(ke,U,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:be.image.url,alt:""})}),!L&&((ue=oe==null?void 0:oe.image)==null?void 0:ue.url)&&r.jsx("div",{className:pt(`${o}-stage`,`${o}-foreground`),style:sc(se),children:r.jsx("img",{className:`${o}-image`,src:oe.image.url,alt:oe.image.name??""})}),ee&&v.length>1&&!L&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:pt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>$e("prev"),"aria-label":`Show previous image (${xe+1} of ${v.length})`}),r.jsx("button",{type:"button",className:pt(`${o}-nav`,`${o}-nav-next`),onClick:()=>$e("next"),"aria-label":`Show next image (${pe+1} of ${v.length})`})]})]})]})}const Xf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15858
15832
  import cn from 'classnames';
15859
15833
  import { CommonComponentProps } from '../props';
15860
15834
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16373,4 +16347,719 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16373
16347
  </>
16374
16348
  );
16375
16349
  }
16376
- `,Mf={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:""}}]}},Pf={element:Rf,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:Mf,sourceCode:Ef,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},kf=[tu,lu,xf,Yu,rp,hp,kp,Np,Vp,um,rg,sh,fh,Zh,df,Pf];exports.components=kf;exports.isSchemaV1=Gl;
16350
+ `,Yf={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:""}}]}},Jf={element:Uf,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:Yf,sourceCode:Xf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Zf(e){return`
16351
+ .${e}-titles-row {
16352
+ position: relative;
16353
+ flex: 0 1 auto;
16354
+ z-index: 2;
16355
+ box-sizing: border-box;
16356
+ pointer-events: none;
16357
+ word-break: break-word;
16358
+ min-width: 0;
16359
+ display: flex;
16360
+ flex-direction: row;
16361
+ align-items: baseline;
16362
+ }
16363
+ .${e}-titles-row-header {
16364
+ flex: 1;
16365
+ align-items: baseline;
16366
+ }
16367
+ .${e}-titles-row-header-controls {
16368
+ display: flex;
16369
+ flex-direction: row;
16370
+ align-items: baseline;
16371
+ flex-shrink: 0;
16372
+ }
16373
+ .${e}-close-icon {
16374
+ position: relative;
16375
+ flex-shrink: 0;
16376
+ align-self: center;
16377
+ pointer-events: auto;
16378
+ z-index: 2;
16379
+ display: flex;
16380
+ align-items: center;
16381
+ justify-content: center;
16382
+ border: none;
16383
+ background-color: transparent;
16384
+ padding: 0;
16385
+ }
16386
+ .${e}-close-icon-inner {
16387
+ all: unset;
16388
+ position: relative;
16389
+ cursor: pointer;
16390
+ width: 100%;
16391
+ height: 100%;
16392
+ pointer-events: auto;
16393
+ }
16394
+ .${e}-close-icon-img {
16395
+ position: absolute;
16396
+ top: 50%;
16397
+ left: 50%;
16398
+ transform: translate(-50%, -50%);
16399
+ }
16400
+ .${e}-titles-baseline-strut {
16401
+ width: 0;
16402
+ overflow: hidden;
16403
+ flex-shrink: 0;
16404
+ pointer-events: none;
16405
+ white-space: nowrap;
16406
+ }
16407
+ .${e}-titles-row-titles {
16408
+ position: relative;
16409
+ flex: 1;
16410
+ min-width: 0;
16411
+ align-self: flex-start;
16412
+ }
16413
+ .${e}-titles-stack {
16414
+ position: relative;
16415
+ display: flex;
16416
+ flex-direction: row;
16417
+ align-items: baseline;
16418
+ align-self: flex-start;
16419
+ min-width: 0;
16420
+ }
16421
+ .${e}-titles-row-two-row {
16422
+ display: flex;
16423
+ flex: 1;
16424
+ height: 100%;
16425
+ min-height: 0;
16426
+ align-self: stretch;
16427
+ flex-direction: column;
16428
+ width: 100%;
16429
+ }
16430
+ .${e}-titles-row-top {
16431
+ display: flex;
16432
+ flex-direction: row;
16433
+ align-items: baseline;
16434
+ width: 100%;
16435
+ flex-shrink: 0;
16436
+ margin-bottom: 0;
16437
+ }
16438
+ .${e}-titles-row-top .${e}-title-cell[data-title="title1"] {
16439
+ flex: 0 0 auto;
16440
+ min-width: 0;
16441
+ }
16442
+ .${e}-titles-row-bottom-wrap {
16443
+ display: flex;
16444
+ flex-direction: column;
16445
+ width: 100%;
16446
+ margin-top: auto;
16447
+ flex-shrink: 0;
16448
+ }
16449
+ .${e}-titles-row-bottom-area {
16450
+ position: relative;
16451
+ flex: 1;
16452
+ min-height: 0;
16453
+ display: flex;
16454
+ flex-direction: column;
16455
+ width: 100%;
16456
+ }
16457
+ .${e}-titles-row-bottom {
16458
+ position: relative;
16459
+ display: flex;
16460
+ flex-direction: row;
16461
+ align-items: flex-end;
16462
+ width: 100%;
16463
+ }
16464
+ .${e}-titles-row-bottom .${e}-title-cell {
16465
+ flex: 0 0 auto;
16466
+ }
16467
+ .${e}-title-cell {
16468
+ position: relative;
16469
+ flex: 0 0 auto;
16470
+ min-width: 0;
16471
+ box-sizing: border-box;
16472
+ }
16473
+ .${e}-text-bar-cell {
16474
+ position: relative;
16475
+ flex: 0 1 auto;
16476
+ min-width: 0;
16477
+ display: flex;
16478
+ align-items: baseline;
16479
+ }
16480
+ .${e}-title1,
16481
+ .${e}-title2,
16482
+ .${e}-title3 {
16483
+ margin: 0;
16484
+ min-width: 0;
16485
+ }
16486
+ .${e}-title-resize-handle {
16487
+ background: transparent;
16488
+ }
16489
+ .${e}-lightbox {
16490
+ position: fixed;
16491
+ inset: 0;
16492
+ z-index: 9997;
16493
+ overscroll-behavior: none;
16494
+ overflow: hidden;
16495
+ }
16496
+ .${e}-lightbox-editor {
16497
+ inset: auto;
16498
+ top: var(--cntrl-article-top, 0);
16499
+ left: var(--cntrl-article-left, 0);
16500
+ width: var(--cntrl-article-width, 100vw) !important;
16501
+ height: var(--cntrl-viewport-height, 100vh) !important;
16502
+ }
16503
+ .${e}-lightbox-edit-mode {
16504
+ z-index: 1;
16505
+ }
16506
+ .${e}-lightbox-dismiss-area {
16507
+ position: relative;
16508
+ width: 100%;
16509
+ height: 100%;
16510
+ }
16511
+ .${e}-lightbox-overlay-content {
16512
+ position: absolute;
16513
+ inset: 0;
16514
+ z-index: 3;
16515
+ pointer-events: none;
16516
+ display: flex;
16517
+ flex-direction: column;
16518
+ isolation: isolate;
16519
+ }
16520
+ .${e}-lightbox-content-area {
16521
+ position: relative;
16522
+ display: flex;
16523
+ flex-direction: row;
16524
+ align-items: flex-start;
16525
+ flex: 1;
16526
+ min-width: 0;
16527
+ min-height: 0;
16528
+ }
16529
+ .${e}-lightbox-content-area-stacked {
16530
+ align-items: stretch;
16531
+ align-self: stretch;
16532
+ }
16533
+ .${e}-text-bar-cell-stacked {
16534
+ align-self: stretch;
16535
+ flex: 1;
16536
+ min-width: 0;
16537
+ min-height: 0;
16538
+ height: 100%;
16539
+ flex-direction: column;
16540
+ align-items: stretch;
16541
+ }
16542
+ .${e}-control {
16543
+ position: relative;
16544
+ z-index: 2;
16545
+ pointer-events: auto;
16546
+ flex-shrink: 0;
16547
+ }
16548
+ `}const Cn=500,Ui=650,un="cubic-bezier(0.22, 1, 0.36, 1)",Qf=72,ey=50,ty=1e4,ny=650,iy=500;function oy(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function lc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ir(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function ry(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?lc(i,n):null}function ay(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function Yi(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Qs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Yi(e,i,n)}const sy=.03;function cc(e){return e.width*sy}const Xr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Bo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function el(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function ly(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function da(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function cy(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:da(e,t.width,t.height)}function dy(e,t){if(Cr(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function uy(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function py({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Cr(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Ni(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=cc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function sr(e,t,n){const i=Ni(e,t,n);return{...i,left:2*i.left-e.left}}function my(e,t,n){const{left:i,width:o}=n,s=cc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function dc(e,t,n,i){const o=Ni(e,"left",i),s=Ni(e,"right",i),l=sr(e,"left",i),d=sr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function gy(e,t,n,i){const{start:o,end:s}=dc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function hy(e,t,n){const i=Ni(e,t,n),o=sr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Cr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function fy({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function zo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Cr(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function yy({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:v,sourceRect:b,resolveCloseSourceRect:S,onClose:y,onPrev:w,onNext:C}){const L=a.useRef(null),k=a.useRef(null),A=a.useRef(null),O=a.useRef(new Map),[P,D]=a.useState(0),R=a.useRef(null),x=a.useRef(0),U=a.useRef(0),h=a.useRef("none"),I=a.useRef(!1),W=a.useRef(!1),V=a.useRef(!1),Y=a.useRef(null),ae=a.useRef(null),Z=a.useRef(null),G=a.useRef(()=>{}),H=a.useRef(null),$=a.useRef(null),M=a.useRef(null),q=a.useRef(!1),[z,ee]=a.useState(null),[_,ye]=a.useState(Xr),[f,ve]=a.useState(0),[K,le]=a.useState("opening"),[$e,oe]=a.useState(0),[fe,X]=a.useState(0),[be,xe]=a.useState(!1),[pe,se]=a.useState(null),[Re,ke]=a.useState(null),[we,Se]=a.useState(null),[B,re]=a.useState(!1),[F,te]=a.useState(null),[ne,ue]=a.useState(!1),me=a.useRef(!1),[he,Le]=a.useState(!1),[Q,ge]=a.useState(!1),Ae=a.useRef(n),ie=a.useRef(void 0),j=t[n],Oe=j?Cr(j):!1,Fe=fe!==0||be,et=!l&&(!s||!!d),Ye=c&&!l,at=u.length>1,mt=a.useCallback((g,ce)=>t.length<=1?null:t[(g+ce+t.length)%t.length]??null,[t]),De=at?Yi(u,m,-1):mt(n,-1),it=at?Yi(u,m,1):mt(n,1),$t=pe===-1&&Fe?at&&Re!==null?Yi(u,Re,-1):we!==null?mt(we,-1):null:null,ot=pe===1&&Fe?at&&Re!==null?Yi(u,Re,1):we!==null?mt(we,1):null:null,Ue=$t&&$t.url!==(De==null?void 0:De.url)?$t:null,ht=ot&&ot.url!==(it==null?void 0:it.url)?ot:null,xt=De&&Ye?(()=>{const g=at?Qs(u,m,-1):t.length>2?mt((n-1+t.length)%t.length,-1):null;return g&&g.url!==De.url?g:null})():null,ct=it&&Ye?(()=>{const g=at?Qs(u,m,1):t.length>2?mt((n+1)%t.length,1):null;return g&&g.url!==it.url?g:null})():null,Mt=Ue??xt,_t=ht??ct,Qe=a.useCallback((g,ce,Ee)=>{if(!g||!ce||!Ee)return;const Ie=O.current,Je=Ie.get(g);(Je==null?void 0:Je.width)===ce&&(Je==null?void 0:Je.height)===Ee||(Ie.set(g,{width:ce,height:Ee}),D(Et=>Et+1))},[]),Tt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const ce=O.current.get(g.url);return cy(k.current,ce)},[P,f]),Lt=a.useCallback(()=>{if(!j)return;const g=Tt(j);if(g){ee(g);return}const ce=k.current;ce&&ee(el(ce))},[j,Tt]),Ge=a.useCallback(g=>{if(at){const ce=u.length;ke((m+g+ce)%ce),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),ke(null))},[at,u.length,m,t.length,n]),qe=a.useCallback(g=>{V.current=g,xe(g)},[]),Pe=a.useCallback(()=>{Y.current!==null&&(window.clearTimeout(Y.current),Y.current=null)},[]),gt=a.useCallback(()=>{Pe(),Y.current=window.setTimeout(()=>{Pe(),qe(!1)},Ui+32)},[Pe,qe]),It=a.useCallback(()=>{const g=L.current;if(!g){ye({left:0,top:0,width:typeof window<"u"?window.innerWidth:Xr.width,height:typeof window<"u"?window.innerHeight:Xr.height});return}const ce=g.getBoundingClientRect();ye({left:ce.left,top:ce.top,width:ce.width,height:ce.height})},[]),kt=a.useCallback((g,ce)=>{if(Fe){if(he&&!be)return`translate(${fe}px, 0px)`;if(be&&pe!==null){const Ee=Tt(g);if(!Ee)return;const{x:Ie,y:Je}=gy(Ee,ce,pe,_);return`translate(${Ie}px, ${Je}px)`}if(be)return"translate(0px, 0px)"}},[Fe,he,be,fe,pe,_,Tt]),Dt=a.useCallback(()=>{const g=ae.current;ae.current=null,Pe(),qe(!1),se(null),ke(null),Se(null),X(0),Le(!1),I.current=!1,U.current=0,h.current="none",g===-1?w():g===1&&C()},[Pe,qe,w,C]),en=a.useCallback(()=>{Pe(),Y.current=window.setTimeout(()=>{ae.current!==null&&Dt()},Ui+32)},[Pe,Dt]),on=a.useCallback(()=>{Pe(),ae.current=null,qe(!1),se(null),ke(null),Se(null),X(0),Le(!1),I.current=!1,U.current=0,h.current="none"},[Pe,qe]),bt=a.useCallback(g=>{if(!(!Ye||!z)){if(V.current){if(ae.current===g){Z.current=g,Dt();return}on()}Pe(),Ge(g),ae.current=g,se(g),qe(!0),en()}},[Ye,z,Dt,on,Pe,Ge,qe,en]);G.current=bt;const Rt=a.useCallback(()=>{H.current=null,q.current=!1,$.current!==null&&(window.clearInterval($.current),$.current=null),M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),Ut=a.useCallback(g=>{$.current!==null&&window.clearInterval($.current);const ce=q.current?iy:ny;$.current=window.setInterval(()=>{G.current(g)},ce)},[]),Kt=a.useCallback(g=>{H.current!==g&&(Rt(),H.current=g,q.current=!1,G.current(g),Ut(g),M.current=window.setTimeout(()=>{M.current=null,H.current===g&&(q.current=!0,Ut(g))},ty))},[Rt,Ut]),ft=a.useCallback(()=>{const g=k.current;if(!g)return;const ce=j==null?void 0:j.url,Ee=ce?O.current.get(ce):void 0;if(Ee!=null&&Ee.width&&(Ee!=null&&Ee.height)){ee(da(g,Ee.width,Ee.height));return}const Ie=A.current;if(Ie&&ce&&(Ie.src===ce||Ie.currentSrc===ce)){const{width:Et,height:Ve}=ly(Ie);if(Et&&Ve){Qe(ce,Et,Ve),ee(da(g,Et,Ve));return}}const Je=el(g);!Je.width||!Je.height||ee(Je)},[j==null?void 0:j.url,Qe]),Jt=a.useCallback(g=>{if(A.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&ft();return}g.complete&&g.naturalWidth>0&&ft()}},[ft]),Ce=a.useCallback(()=>{It(),ft(),ve(g=>g+1)},[It,ft]);a.useEffect(()=>{Ce();const g=k.current,ce=L.current,Ee=new ResizeObserver(()=>Ce());return g&&Ee.observe(g),ce&&Ee.observe(ce),window.addEventListener("resize",Ce),()=>{Ee.disconnect(),window.removeEventListener("resize",Ce)}},[Ce,n,v]),a.useLayoutEffect(()=>{if(!j)return;const g=A.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){ft();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&ft()}},[j==null?void 0:j.url,n,ft]),a.useEffect(()=>{Lt()},[Lt,P]),a.useEffect(()=>{const g=new Set,ce=[],Ee=Ie=>{!(Ie!=null&&Ie.url)||g.has(Ie.url)||(g.add(Ie.url),ce.push(Ie))};t.forEach(Ee),u.forEach(Ie=>Ie.items.forEach(Ee)),ce.forEach(Ie=>{O.current.has(Ie.url)||dy(Ie,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(K!=="opening"||!z)return;if(!b){le("open");return}re(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{re(!0),le("open")})});return()=>cancelAnimationFrame(g)},[K,z,b]),a.useEffect(()=>{if(K!=="closing")return;const g=setTimeout(()=>y(),Cn);return()=>clearTimeout(g)},[K,y]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{Ae.current===n&&ie.current===(j==null?void 0:j.url)||(Pe(),ae.current=null,se(null),ke(null),Se(null),oe(0),X(0),qe(!1),ge(!1),Le(!1),x.current=0,U.current=0,h.current="none",I.current=!1,R.current=null,W.current=!1,A.current=null,Lt(),Ae.current=n,ie.current=j==null?void 0:j.url)},[n,j==null?void 0:j.url,qe,Pe,Lt]),a.useLayoutEffect(()=>{const g=Z.current;g!==null&&(Z.current=null,requestAnimationFrame(()=>{G.current(g)}))},[n,m,j==null?void 0:j.url]),a.useLayoutEffect(()=>{if(K==="opening"){me.current=!1,ue(!1);return}if(K!=="open"||me.current)return;if(!De&&!it){me.current=!0;return}ue(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ue(!0),me.current=!0})});return()=>cancelAnimationFrame(g)},[K,De==null?void 0:De.url,it==null?void 0:it.url]),a.useEffect(()=>{if(K!=="open")return;const g=()=>{const Ve=nt=>{nt.stopPropagation(),nt.preventDefault(),document.removeEventListener("click",Ve,!0)};document.addEventListener("click",Ve,!0)},ce=Ve=>{const nt=Ve<0?1:-1;Pe(),Ge(nt),ae.current=nt,se(nt),qe(!0),en()},Ee=Ve=>{if(Math.abs(Ve)>ey&&Ye){ce(Ve);return}ae.current=null,se(null),ke(null),Se(null),qe(!0),X(0),gt()},Ie=Ve=>{if(Ve.touches.length!==1||V.current)return;const nt=Ve.touches[0];W.current=!0,R.current={x:nt.clientX,y:nt.clientY},h.current="none",U.current=0,I.current=!1},Je=Ve=>{if(!R.current||Ve.touches.length!==1||V.current)return;const nt=Ve.touches[0],Ot=nt.clientX-R.current.x,St=nt.clientY-R.current.y;if(h.current==="none"){if(Math.abs(Ot)<10&&Math.abs(St)<10)return;if(Math.abs(Ot)>Math.abs(St)){if(!Ye)return;h.current="horizontal"}else if(St>0){if(!et)return;h.current="vertical"}else return}if(h.current==="horizontal"){I.current=!0,Le(!0),U.current=Ot,X(Ot),Ve.preventDefault();return}h.current==="vertical"&&(I.current=!0,Le(!0),x.current=St,oe(St),Ve.preventDefault())},Et=()=>{if(!R.current)return;const Ve=h.current,nt=I.current;if(nt&&Ve==="horizontal")Ee(U.current),g();else if(nt&&Ve==="vertical"){const Ot=x.current;if(et&&Ot>Qf){const St=window.innerHeight;x.current=St,ge(!0),oe(St),le("closing")}else x.current=0,oe(0);g()}else Ve==="horizontal"&&Math.abs(U.current)>0&&(Ee(U.current),g());R.current=null,h.current="none",U.current=0,I.current=!1,Le(!1)};return document.addEventListener("touchstart",Ie,{passive:!0}),document.addEventListener("touchmove",Je,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Ie),document.removeEventListener("touchmove",Je),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[K,Ye,qe,gt,Pe,et,en,Ge]);const je=a.useCallback(()=>{const g=(S==null?void 0:S())??b??null;g&&z&&(te(g),re(!0)),le("closing")},[S,b,z]);a.useEffect(()=>{const g=Ie=>{if(Ie.key==="Escape"){if(s&&d||K==="closing")return;Rt(),je();return}if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight"||K!=="open"||!Ye)return;Ie.preventDefault();const Je=Ie.key==="ArrowLeft"?-1:1;Ie.repeat&&H.current===Je||Kt(Je)},ce=Ie=>{if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight")return;const Je=Ie.key==="ArrowLeft"?-1:1;H.current===Je&&Rt()},Ee=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",ce),window.addEventListener("blur",Ee),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",ce),window.removeEventListener("blur",Ee),Rt()}},[K,s,d,je,Ye,Kt,Rt]),a.useEffect(()=>{K!=="open"&&Rt()},[K,Rt]);const Ke=()=>{K==="closing"||l||je()},He=K==="open",Be=K==="closing",dt=$e>0?Math.max(0,1-$e/500):1,_e=$e>0?Math.max(.35,1-$e/500):1,Ze=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!V.current)){if(ae.current!==null){Dt();return}Pe(),qe(!1)}},[Pe,qe,Dt]),tt=K==="closing"?F??b:b,Ft=tt&&z&&(K==="opening"||Be)?oy(tt,z):void 0,Ct=Fe&&j?kt(j,"center"):$e>0?`translateY(${$e}px)`:Ft,st=z?Bo(z,_):null,Ht=!!(tt&&z),At=Ht&&(K==="closing"||K==="open"&&B),Vt={position:"absolute",top:st==null?void 0:st.top,left:st==null?void 0:st.left,width:st==null?void 0:st.width,height:st==null?void 0:st.height,objectFit:"contain",transformOrigin:"top left",transform:Ct,opacity:$e>0?_e:Ht?1:K==="opening"||Be?0:1,transition:he&&!be?"none":be?`transform ${Ui}ms ${un}`:Q?`transform ${Cn}ms ${un}, opacity ${Cn}ms ${un}`:At?`transform ${Cn}ms ${un}`:K==="opening"||Be?`opacity ${Cn}ms ${un}`:"none",pointerEvents:Oe&&He&&!Fe?"auto":"none",touchAction:Oe&&He?"none":void 0,zIndex:1,overflow:Oe?"hidden":void 0},Bt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:He&&!Fe?"auto":"none"},Pt=(g,ce,Ee="adjacent")=>{const Ie=Tt(g);if(!Ie)return{display:"none"};const Je=Ee==="far"?ce==="left"?"far-left":"far-right":ce==="left"?"left-adjacent":"right-adjacent",{start:Et}=pe!==null?dc(Ie,Je,pe,_):{start:Ee==="far"?sr(Ie,ce,_):Ni(Ie,ce,_)},Ve=Bo(Et,_),nt=kt(g,Je),Ot=!Fe&&Ee==="adjacent"&&He&&!ne?hy(Ie,ce,_):null,St=Ee==="far"&&Fe&&pe===(ce==="left"?-1:1),ln=he&&!be?!1:be,cn=Ee==="adjacent"&&He&&ne&&!Fe;return{position:"absolute",top:Ve.top,left:Ve.left,width:Ve.width,height:Ve.height,objectFit:"contain",transform:nt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Ee==="far"?He&&St?1:0:He?1:0,transition:ln?Ee==="far"?`transform ${Ui}ms ${un}`:`transform ${Ui}ms ${un}, opacity ${Cn}ms ${un}`:cn?`transform ${Cn}ms ${un}`:K==="opening"||Be?`opacity ${Cn}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},Zt=(g,ce)=>{const Ee=Tt(g);return Ee?my(Ni(Ee,ce,_),ce,_):null},wt=g=>ce=>{if(!l){if(W.current){W.current=!1;return}ce.stopPropagation(),bt(g)}},Gt=De?Zt(De,"left"):null,ut=it?Zt(it,"right"):null,Wt=Gt?Bo(Gt,_):null,zt=ut?Bo(ut,_):null;return r.jsxs("div",{ref:L,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:K==="open"?"none":void 0},onClick:Ke,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:He?dt:0,transition:he?"none":`opacity ${Cn}ms ${un}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},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:k,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:He?1:0,transition:he?"none":`opacity ${Cn}ms ${un}`,pointerEvents:"none"},children:r.jsx(Vl,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Ke})})]}),He&&Mt&&r.jsx(zo,{media:Mt,style:Pt(Mt,"left","far"),onMeasure:Qe,onTransitionEnd:Ze},`far-prev-${Mt.url}`),He&&De&&r.jsxs(r.Fragment,{children:[r.jsx(zo,{media:De,style:Pt(De,"left"),onMeasure:Qe,onTransitionEnd:Ze},`prev-${De.url}`),Wt&&r.jsx("div",{style:{position:"absolute",top:Wt.top,left:Wt.left,width:Wt.width,height:Wt.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:wt(-1)})]}),He&&it&&r.jsxs(r.Fragment,{children:[r.jsx(zo,{media:it,style:Pt(it,"right"),onMeasure:Qe,onTransitionEnd:Ze},`next-${it.url}`),zt&&r.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:wt(1)})]}),He&&_t&&r.jsx(zo,{media:_t,style:Pt(_t,"right","far"),onMeasure:Qe,onTransitionEnd:Ze},`far-next-${_t.url}`),z&&j&&(Oe?r.jsx(fy,{src:j.url,phase:K,onMediaElement:Jt,wrapperStyle:Vt,videoStyle:Bt,onLoadedMetadata:ft,onTransitionEnd:Ze},`${n}-${j.url}`):r.jsx("img",{ref:Jt,src:j.url,alt:j.name,onLoad:ft,onTransitionEnd:Ze,style:Vt},`${n}-${j.url}`))]})}const vy=20,xy=.18;function by(e){return`
16549
+ .${e}-wrapper {
16550
+ box-sizing: border-box;
16551
+ max-width: 100%;
16552
+ overflow: visible;
16553
+ overflow-wrap: anywhere;
16554
+ word-break: break-word;
16555
+ }
16556
+ .${e}-item {
16557
+ display: inline;
16558
+ white-space: normal;
16559
+ max-width: 100%;
16560
+ }
16561
+ .${e}-item-title {
16562
+ display: inline;
16563
+ white-space: pre-wrap;
16564
+ overflow-wrap: anywhere;
16565
+ word-break: break-word;
16566
+ }
16567
+ .${e}-item-image {
16568
+ display: inline-block;
16569
+ vertical-align: baseline;
16570
+ position: relative;
16571
+ z-index: 1;
16572
+ height: 1cap;
16573
+ max-height: 1cap;
16574
+ margin-top: calc(var(--${e}-line-height) - 1cap);
16575
+ margin-bottom: 0;
16576
+ margin-left: var(--${e}-image-inline-gap);
16577
+ margin-right: var(--${e}-image-inline-gap);
16578
+ }
16579
+ .${e}-item-image img,
16580
+ .${e}-item-image video {
16581
+ display: block;
16582
+ height: 100%;
16583
+ max-height: 1cap;
16584
+ }
16585
+ .${e}-item-image-hover-scale-in img,
16586
+ .${e}-item-image-hover-scale-in video {
16587
+ transition: transform 0.3s ease;
16588
+ }
16589
+ .${e}-item-image-hover-scale-in:hover img,
16590
+ .${e}-item-image-hover-scale-in:hover video {
16591
+ transform: scale(1.15);
16592
+ }
16593
+ .${e}-item-image-hover-saturate img,
16594
+ .${e}-item-image-hover-saturate video {
16595
+ filter: grayscale(100%);
16596
+ transition: filter 0.3s ease;
16597
+ }
16598
+ .${e}-item-image-hover-saturate:hover img,
16599
+ .${e}-item-image-hover-saturate:hover video {
16600
+ filter: grayscale(0%);
16601
+ }
16602
+ .${e}-item-gap-host {
16603
+ display: inline-block;
16604
+ vertical-align: baseline;
16605
+ height: var(--${e}-line-height);
16606
+ position: relative;
16607
+ flex-shrink: 0;
16608
+ }
16609
+ .${e}-item-gap-control {
16610
+ position: absolute;
16611
+ top: 0;
16612
+ z-index: 2;
16613
+ pointer-events: auto;
16614
+ }
16615
+ ${Zf(e)}
16616
+ `}function wy(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:E.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:E.scalingValue(i*xy,n??!1)}}function Sy(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function $y(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.display)==="cover",i=(t==null?void 0:t.ratioValue)??"1:1",o=(t==null?void 0:t.reversed)??!1,[s,l]=i.split(":").map(Number),u=`${o?l:s} / ${o?s:l}`;return{isCover:n,aspectRatio:u,objectFitMode:n?"cover":"contain",imageWrapperStyle:n?{aspectRatio:u,overflow:"hidden"}:void 0,imageStyle:n?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",cursor:"pointer"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"100%",maxWidth:"100%",cursor:"pointer"}}}function Cy(e,t,n,i,o,s){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);s(n,d?lc(d,o):void 0)}}function Ty({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=E.useScopedStyles(),c=a.useMemo(()=>by(d),[d]),u=t??[],m=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,v=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,b=E.scalingValue(v,n??!1),S=`max(${b}, ${vy}px)`,{objectFitMode:y,isCover:w,imageWrapperStyle:C,imageStyle:L}=$y(e),k=Sy(e,n),A={width:E.scalingValue(m,n??!1),...k,...wy(e,d,n)},O=a.useRef(null),[P,D]=a.useState(!1),[R,x]=a.useState([]),[U,h]=a.useState(0),[I,W]=a.useState(0),[V,Y]=a.useState(null),[ae,Z]=a.useState({title1:"",title2:"",title3:""}),G=(!n||i)&&!P,H=(e==null?void 0:e.imageHoverEffect)??"none",$=G&&H!=="none"?`${d}-item-image-hover-${H}`:void 0,M=(()=>{const le={},$e=O.current?getComputedStyle(O.current).getPropertyValue("--cntrl-article-width").trim():"";return $e&&(le["--cntrl-article-width"]=$e),le})(),q=!n||i||o,z=a.useMemo(()=>ay(u),[u]),ee=a.useMemo(()=>uy(u),[u]),_=(le,$e)=>{if(n&&!o&&!i)return;const oe=z.findIndex(X=>X.gridIndex===le);if(oe<0)return;const fe=z[oe];W(oe),x(fe.items),h(0),Z(fe.entry),Y($e??null),D(!0)},ye=a.useCallback(()=>{D(!1),Y(null)},[]),f=a.useCallback(()=>{const le=z[I];return!le||!O.current?V:ry(O.current,le.gridIndex,y)??V},[z,I,V,y]),ve=a.useCallback(le=>{if(z.length>1){const $e=z.length,oe=(I+le+$e)%$e,fe=z[oe];W(oe),x(fe.items),h(0),Z(fe.entry);return}h($e=>($e+le+R.length)%R.length)},[z,I,R.length]),K=z.length>1||R.length>1;return a.useEffect(()=>{if(!P||typeof document>"u")return;const le=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=le}},[P]),a.useEffect(()=>{!n||o||i||D(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(py,{mediaList:ee}),r.jsx("div",{ref:O,className:`${d}-wrapper`,style:A,children:u.map((le,$e)=>{var X,be;const oe=!!((X=le.image)!=null&&X.url),fe=Cy(!!q,oe,$e,d,y,_);return r.jsxs("div",{className:`${d}-item`,children:[le.title?r.jsx("span",{className:`${d}-item-title`,onClick:fe,style:fe?{cursor:"pointer"}:void 0,children:le.title}):null,(be=le.image)!=null&&be.url?r.jsx("span",{className:[`${d}-item-image`,$].filter(Boolean).join(" "),style:w?C:void 0,children:le.image.type==="video"?r.jsx("video",{src:le.image.url,"data-waterfall-index":$e,style:L,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:fe}):r.jsx("img",{src:le.image.url,alt:le.image.name??"","data-waterfall-index":$e,style:L,onClick:fe})}):null,$e<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:b},children:o&&!P&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:S,height:"100%"}})})]},$e)})}),P&&typeof document<"u"&&e&&(()=>{const le=(l?document.getElementById(l):null)??document.body;return mi.createPortal(r.jsx("div",{style:M,"data-selection":"none",children:r.jsx(yy,{prefix:d,items:R,index:U,entry:ae,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:K,lightboxEntries:z,entryIdx:I,layoutId:s,sourceRect:V,resolveCloseSourceRect:f,onClose:ye,onPrev:()=>ve(-1),onNext:()=>ve(1)})}),le)})()]})}const Ly=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16617
+ import type React from 'react';
16618
+ import { createPortal } from 'react-dom';
16619
+ import { CommonComponentProps } from '../props';
16620
+ import { scalingValue, useScopedStyles } from '../utils/index';
16621
+ import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
16622
+ import {
16623
+ Lightbox,
16624
+ PreloadedMediaPool,
16625
+ buildLightboxEntries,
16626
+ collectAllWaterfallMedia,
16627
+ getLightboxCSS,
16628
+ getItemSourceRect,
16629
+ getMediaClickSourceRect,
16630
+ type AnimRect,
16631
+ type WaterfallLightboxSettings,
16632
+ type WaterfallMedia,
16633
+ } from './WaterfallLightbox';
16634
+
16635
+ export type WaterfallContentItem = {
16636
+ title?: string;
16637
+ subtitle?: string;
16638
+ caption?: string;
16639
+ image?: WaterfallMedia;
16640
+ };
16641
+
16642
+ export type WaterfallSettings = {
16643
+ wrapperWidth?: number;
16644
+ imageDisplay?: {
16645
+ display: 'fit' | 'cover';
16646
+ ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
16647
+ reversed: boolean;
16648
+ };
16649
+ titleColor?: string;
16650
+ titleFontFamily?: string;
16651
+ titleFontSettings?: { fontWeight: number; fontStyle: string };
16652
+ titleFontSize?: number;
16653
+ titleLineHeight?: number;
16654
+ titleLetterSpacing?: number;
16655
+ titleWordSpacing?: number;
16656
+ titleTextAppearance?: TextStyles['textAppearance'];
16657
+ horizontalGap?: number;
16658
+ imageHoverEffect?: 'none' | 'scale-in' | 'saturate';
16659
+ } & WaterfallLightboxSettings;
16660
+
16661
+ type WaterfallProps = {
16662
+ settings?: WaterfallSettings;
16663
+ content?: WaterfallContentItem[];
16664
+ isEditor?: boolean;
16665
+ isPreviewMode?: boolean;
16666
+ isEditMode?: boolean;
16667
+ layoutId?: string;
16668
+ portalId?: string;
16669
+ } & CommonComponentProps;
16670
+
16671
+ const GAP_CONTROL_MIN_PX = 20;
16672
+ const IMAGE_INLINE_GAP_RATIO = 0.18;
16673
+
16674
+ function getCSS(P: string): string {
16675
+ return \`
16676
+ .\${P}-wrapper {
16677
+ box-sizing: border-box;
16678
+ max-width: 100%;
16679
+ overflow: visible;
16680
+ overflow-wrap: anywhere;
16681
+ word-break: break-word;
16682
+ }
16683
+ .\${P}-item {
16684
+ display: inline;
16685
+ white-space: normal;
16686
+ max-width: 100%;
16687
+ }
16688
+ .\${P}-item-title {
16689
+ display: inline;
16690
+ white-space: pre-wrap;
16691
+ overflow-wrap: anywhere;
16692
+ word-break: break-word;
16693
+ }
16694
+ .\${P}-item-image {
16695
+ display: inline-block;
16696
+ vertical-align: baseline;
16697
+ position: relative;
16698
+ z-index: 1;
16699
+ height: 1cap;
16700
+ max-height: 1cap;
16701
+ margin-top: calc(var(--\${P}-line-height) - 1cap);
16702
+ margin-bottom: 0;
16703
+ margin-left: var(--\${P}-image-inline-gap);
16704
+ margin-right: var(--\${P}-image-inline-gap);
16705
+ }
16706
+ .\${P}-item-image img,
16707
+ .\${P}-item-image video {
16708
+ display: block;
16709
+ height: 100%;
16710
+ max-height: 1cap;
16711
+ }
16712
+ .\${P}-item-image-hover-scale-in img,
16713
+ .\${P}-item-image-hover-scale-in video {
16714
+ transition: transform 0.3s ease;
16715
+ }
16716
+ .\${P}-item-image-hover-scale-in:hover img,
16717
+ .\${P}-item-image-hover-scale-in:hover video {
16718
+ transform: scale(1.15);
16719
+ }
16720
+ .\${P}-item-image-hover-saturate img,
16721
+ .\${P}-item-image-hover-saturate video {
16722
+ filter: grayscale(100%);
16723
+ transition: filter 0.3s ease;
16724
+ }
16725
+ .\${P}-item-image-hover-saturate:hover img,
16726
+ .\${P}-item-image-hover-saturate:hover video {
16727
+ filter: grayscale(0%);
16728
+ }
16729
+ .\${P}-item-gap-host {
16730
+ display: inline-block;
16731
+ vertical-align: baseline;
16732
+ height: var(--\${P}-line-height);
16733
+ position: relative;
16734
+ flex-shrink: 0;
16735
+ }
16736
+ .\${P}-item-gap-control {
16737
+ position: absolute;
16738
+ top: 0;
16739
+ z-index: 2;
16740
+ pointer-events: auto;
16741
+ }
16742
+ \${getLightboxCSS(P)}
16743
+ \`;
16744
+ }
16745
+
16746
+ function getWaterfallTextMetricsVars(
16747
+ settings: WaterfallSettings | undefined,
16748
+ varPrefix: string,
16749
+ isEditor?: boolean,
16750
+ ): React.CSSProperties {
16751
+ const fontSize = settings?.titleFontSize ?? 0.07;
16752
+ const lineHeight = settings?.titleLineHeight ?? fontSize;
16753
+
16754
+ return {
16755
+ [\`--\${varPrefix}-line-height\`]: scalingValue(lineHeight, isEditor ?? false),
16756
+ [\`--\${varPrefix}-image-inline-gap\`]: scalingValue(fontSize * IMAGE_INLINE_GAP_RATIO, isEditor ?? false),
16757
+ } as React.CSSProperties;
16758
+ }
16759
+
16760
+ function resolveInlineTitleStyle(settings: WaterfallSettings | undefined, isEditor?: boolean): React.CSSProperties {
16761
+ const textStyles: TextStyles = {
16762
+ fontSettings: {
16763
+ fontFamily: settings?.titleFontFamily ?? 'Arial',
16764
+ fontWeight: settings?.titleFontSettings?.fontWeight ?? 400,
16765
+ fontStyle: settings?.titleFontSettings?.fontStyle ?? 'normal',
16766
+ },
16767
+ fontSize: settings?.titleFontSize ?? 0.07,
16768
+ lineHeight: settings?.titleLineHeight,
16769
+ letterSpacing: settings?.titleLetterSpacing ?? 0,
16770
+ wordSpacing: settings?.titleWordSpacing ?? 0,
16771
+ textAppearance: settings?.titleTextAppearance,
16772
+ color: settings?.titleColor ?? '#000000',
16773
+ };
16774
+ return textStylesToCss(textStyles, isEditor);
16775
+ }
16776
+
16777
+ function resolveImageDisplay(settings: WaterfallSettings | undefined) {
16778
+ const { imageDisplay } = settings ?? {};
16779
+ const isCover = imageDisplay?.display === 'cover';
16780
+ const ratioValue = imageDisplay?.ratioValue ?? '1:1';
16781
+ const ratioReversed = imageDisplay?.reversed ?? false;
16782
+ const [rW, rH] = ratioValue.split(':').map(Number);
16783
+ const effW = ratioReversed ? rH : rW;
16784
+ const effH = ratioReversed ? rW : rH;
16785
+ const aspectRatio = \`\${effW} / \${effH}\`;
16786
+
16787
+ const imageWrapperStyle: React.CSSProperties | undefined = isCover
16788
+ ? { aspectRatio, overflow: 'hidden' }
16789
+ : undefined;
16790
+
16791
+ const imageStyle: React.CSSProperties = isCover
16792
+ ? {
16793
+ objectFit: 'cover',
16794
+ pointerEvents: 'auto',
16795
+ width: '100%',
16796
+ height: '100%',
16797
+ maxWidth: '100%',
16798
+ cursor: 'pointer',
16799
+ }
16800
+ : {
16801
+ objectFit: 'contain',
16802
+ pointerEvents: 'auto',
16803
+ width: 'auto',
16804
+ height: '100%',
16805
+ maxWidth: '100%',
16806
+ cursor: 'pointer',
16807
+ };
16808
+
16809
+ return {
16810
+ isCover,
16811
+ aspectRatio,
16812
+ objectFitMode: isCover ? 'cover' as const : 'contain' as const,
16813
+ imageWrapperStyle,
16814
+ imageStyle,
16815
+ };
16816
+ }
16817
+
16818
+ function createWaterfallItemOpenHandler(
16819
+ canOpenLightbox: boolean,
16820
+ hasLightbox: boolean,
16821
+ index: number,
16822
+ prefix: string,
16823
+ objectFitMode: 'cover' | 'contain',
16824
+ openLightbox: (gridIndex: number, sourceRect?: AnimRect) => void,
16825
+ ): React.MouseEventHandler<HTMLElement> | undefined {
16826
+ if (!canOpenLightbox || !hasLightbox) return undefined;
16827
+
16828
+ return (e) => {
16829
+ const mediaEl = (e.currentTarget.closest(\`.\${prefix}-item\`)?.querySelector(
16830
+ \`[data-waterfall-index="\${index}"]\`,
16831
+ ) as HTMLElement | null)
16832
+ ?? (e.currentTarget instanceof HTMLImageElement || e.currentTarget instanceof HTMLVideoElement
16833
+ ? e.currentTarget
16834
+ : null);
16835
+ openLightbox(
16836
+ index,
16837
+ mediaEl
16838
+ ? getMediaClickSourceRect(mediaEl, objectFitMode)
16839
+ : undefined,
16840
+ );
16841
+ };
16842
+ }
16843
+
16844
+ export function Waterfall({
16845
+ settings,
16846
+ content,
16847
+ isEditor,
16848
+ isPreviewMode,
16849
+ isEditMode,
16850
+ layoutId,
16851
+ portalId,
16852
+ }: WaterfallProps) {
16853
+ const { prefix: P } = useScopedStyles();
16854
+ const scopedCss = useMemo(() => getCSS(P), [P]);
16855
+ const items = content ?? [];
16856
+ const wrapperWidth = typeof settings?.wrapperWidth === 'number' ? settings.wrapperWidth : 1;
16857
+ const horizontalGap = typeof settings?.horizontalGap === 'number' ? settings.horizontalGap : 0;
16858
+ const horizontalGapScaled = scalingValue(horizontalGap, isEditor ?? false);
16859
+ const gapControlWidth = \`max(\${horizontalGapScaled}, \${GAP_CONTROL_MIN_PX}px)\`;
16860
+ const { objectFitMode, isCover, imageWrapperStyle, imageStyle } = resolveImageDisplay(settings);
16861
+ const inlineTitleStyle = resolveInlineTitleStyle(settings, isEditor);
16862
+ const wrapperStyle = {
16863
+ width: scalingValue(wrapperWidth, isEditor ?? false),
16864
+ ...inlineTitleStyle,
16865
+ ...getWaterfallTextMetricsVars(settings, P, isEditor),
16866
+ } as React.CSSProperties;
16867
+
16868
+ const containerRef = useRef<HTMLDivElement>(null);
16869
+ const [lightboxOpen, setLightboxOpen] = useState(false);
16870
+ const [lightboxItems, setLightboxItems] = useState<WaterfallMedia[]>([]);
16871
+ const [lightboxIndex, setLightboxIndex] = useState(0);
16872
+ const [lightboxEntryIdx, setLightboxEntryIdx] = useState(0);
16873
+ const [lightboxSourceRect, setLightboxSourceRect] = useState<AnimRect | null>(null);
16874
+ const [lightboxEntry, setLightboxEntry] = useState({ title1: '', title2: '', title3: '' });
16875
+
16876
+ const showImageHoverEffects = (!isEditor || isPreviewMode) && !lightboxOpen;
16877
+ const imageHoverEffect = settings?.imageHoverEffect ?? 'none';
16878
+ const imageHoverClass = showImageHoverEffects && imageHoverEffect !== 'none'
16879
+ ? \`\${P}-item-image-hover-\${imageHoverEffect}\`
16880
+ : undefined;
16881
+
16882
+ const lightboxPortalStyle = (() => {
16883
+ const style: Record<string, string> = {};
16884
+ const articleWidth = containerRef.current
16885
+ ? getComputedStyle(containerRef.current).getPropertyValue('--cntrl-article-width').trim()
16886
+ : '';
16887
+ if (articleWidth) {
16888
+ style['--cntrl-article-width'] = articleWidth;
16889
+ }
16890
+ return style as React.CSSProperties;
16891
+ })();
16892
+
16893
+ const canOpenLightbox = !isEditor || isPreviewMode || isEditMode;
16894
+ const allLightboxEntries = useMemo(() => buildLightboxEntries(items), [items]);
16895
+ const allMedia = useMemo(() => collectAllWaterfallMedia(items), [items]);
16896
+
16897
+ const openLightbox = (gridIndex: number, sourceRect?: AnimRect) => {
16898
+ if (isEditor && !isEditMode && !isPreviewMode) return;
16899
+ const entryIdx = allLightboxEntries.findIndex((entry) => entry.gridIndex === gridIndex);
16900
+ if (entryIdx < 0) return;
16901
+
16902
+ const data = allLightboxEntries[entryIdx];
16903
+ setLightboxEntryIdx(entryIdx);
16904
+ setLightboxItems(data.items);
16905
+ setLightboxIndex(0);
16906
+ setLightboxEntry(data.entry);
16907
+ setLightboxSourceRect(sourceRect ?? null);
16908
+ setLightboxOpen(true);
16909
+ };
16910
+
16911
+ const closeLightbox = useCallback(() => {
16912
+ setLightboxOpen(false);
16913
+ setLightboxSourceRect(null);
16914
+ }, []);
16915
+
16916
+ const resolveCloseSourceRect = useCallback((): AnimRect | null => {
16917
+ const entry = allLightboxEntries[lightboxEntryIdx];
16918
+ if (!entry || !containerRef.current) return lightboxSourceRect;
16919
+ return getItemSourceRect(containerRef.current, entry.gridIndex, objectFitMode) ?? lightboxSourceRect;
16920
+ }, [allLightboxEntries, lightboxEntryIdx, lightboxSourceRect, objectFitMode]);
16921
+
16922
+ const navigateLightbox = useCallback((direction: -1 | 1) => {
16923
+ if (allLightboxEntries.length > 1) {
16924
+ const len = allLightboxEntries.length;
16925
+ const newEntryIdx = (lightboxEntryIdx + direction + len) % len;
16926
+ const newData = allLightboxEntries[newEntryIdx];
16927
+ setLightboxEntryIdx(newEntryIdx);
16928
+ setLightboxItems(newData.items);
16929
+ setLightboxIndex(0);
16930
+ setLightboxEntry(newData.entry);
16931
+ return;
16932
+ }
16933
+ setLightboxIndex((prev) => (prev + direction + lightboxItems.length) % lightboxItems.length);
16934
+ }, [allLightboxEntries, lightboxEntryIdx, lightboxItems.length]);
16935
+
16936
+ const canNavigateLightbox = allLightboxEntries.length > 1 || lightboxItems.length > 1;
16937
+
16938
+ useEffect(() => {
16939
+ if (!lightboxOpen) return;
16940
+ if (typeof document === 'undefined') return;
16941
+ const prevOverflow = document.body.style.overflow;
16942
+ document.body.style.overflow = 'hidden';
16943
+ return () => {
16944
+ document.body.style.overflow = prevOverflow;
16945
+ };
16946
+ }, [lightboxOpen]);
16947
+
16948
+ useEffect(() => {
16949
+ if (!isEditor || isEditMode || isPreviewMode) return;
16950
+ setLightboxOpen(false);
16951
+ }, [isEditor, isEditMode, isPreviewMode]);
16952
+
16953
+ return (
16954
+ <>
16955
+ <style dangerouslySetInnerHTML={{ __html: scopedCss }} />
16956
+ <PreloadedMediaPool mediaList={allMedia} />
16957
+ <div ref={containerRef} className={\`\${P}-wrapper\`} style={wrapperStyle}>
16958
+ {items.map((item, index) => {
16959
+ const hasLightbox = Boolean(item.image?.url);
16960
+ const handleOpen = createWaterfallItemOpenHandler(
16961
+ Boolean(canOpenLightbox),
16962
+ hasLightbox,
16963
+ index,
16964
+ P,
16965
+ objectFitMode,
16966
+ openLightbox,
16967
+ );
16968
+
16969
+ return (
16970
+ <div key={index} className={\`\${P}-item\`}>
16971
+ {item.title ? (
16972
+ <span
16973
+ className={\`\${P}-item-title\`}
16974
+ onClick={handleOpen}
16975
+ style={handleOpen ? { cursor: 'pointer' } : undefined}
16976
+ >
16977
+ {item.title}
16978
+ </span>
16979
+ ) : null}
16980
+ {item.image?.url ? (
16981
+ <span
16982
+ className={[
16983
+ \`\${P}-item-image\`,
16984
+ imageHoverClass,
16985
+ ].filter(Boolean).join(' ')}
16986
+ style={isCover ? imageWrapperStyle : undefined}
16987
+ >
16988
+ {item.image.type === 'video' ? (
16989
+ <video
16990
+ src={item.image.url}
16991
+ data-waterfall-index={index}
16992
+ style={imageStyle}
16993
+ playsInline
16994
+ muted
16995
+ loop
16996
+ autoPlay
16997
+ onClick={handleOpen}
16998
+ />
16999
+ ) : (
17000
+ <img
17001
+ src={item.image.url}
17002
+ alt={item.image.name ?? ''}
17003
+ data-waterfall-index={index}
17004
+ style={imageStyle}
17005
+ onClick={handleOpen}
17006
+ />
17007
+ )}
17008
+ </span>
17009
+ ) : null}
17010
+ {index < items.length - 1 && (
17011
+ <div
17012
+ className={\`\${P}-item-gap-host\`}
17013
+ style={{ width: horizontalGapScaled }}
17014
+ >
17015
+ {isEditMode && !lightboxOpen && (
17016
+ <div
17017
+ data-controls="horizontalGap"
17018
+ data-controls-axis="x"
17019
+ data-controls-min="0"
17020
+ className={\`\${P}-item-gap-control\`}
17021
+ style={{
17022
+ left: '50%',
17023
+ transform: 'translateX(-50%)',
17024
+ width: gapControlWidth,
17025
+ height: '100%',
17026
+ }}
17027
+ />
17028
+ )}
17029
+ </div>
17030
+ )}
17031
+ </div>
17032
+ );
17033
+ })}
17034
+ </div>
17035
+ {lightboxOpen && typeof document !== 'undefined' && settings && (() => {
17036
+ const portalTarget = (portalId ? document.getElementById(portalId) : null) ?? document.body;
17037
+ return createPortal(
17038
+ <div style={lightboxPortalStyle} data-selection="none">
17039
+ <Lightbox
17040
+ prefix={P}
17041
+ items={lightboxItems}
17042
+ index={lightboxIndex}
17043
+ entry={lightboxEntry}
17044
+ settings={settings}
17045
+ isEditor={isEditor}
17046
+ isEditMode={isEditMode}
17047
+ isPreviewMode={isPreviewMode}
17048
+ canNavigate={canNavigateLightbox}
17049
+ lightboxEntries={allLightboxEntries}
17050
+ entryIdx={lightboxEntryIdx}
17051
+ layoutId={layoutId}
17052
+ sourceRect={lightboxSourceRect}
17053
+ resolveCloseSourceRect={resolveCloseSourceRect}
17054
+ onClose={closeLightbox}
17055
+ onPrev={() => navigateLightbox(-1)}
17056
+ onNext={() => navigateLightbox(1)}
17057
+ />
17058
+ </div>,
17059
+ portalTarget,
17060
+ );
17061
+ })()}
17062
+ </>
17063
+ );
17064
+ }
17065
+ `,Iy="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 Ry(e){const t={};return t[ze(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSettings")]={...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSize")]={...jn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ze(e,"lineHeight")]={...jn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ze(e,"letterSpacing")]={...jn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ze(e,"wordSpacing")]={...jn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ze(e,"textAlign")]={...jn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ze(e,"textAppearance")]={...jn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Oi=Kn.filter(e=>e!=="count"),Ey=Oi.reduce((e,t)=>({...e,...Ry(t)}),{}),My=Oi.reduce((e,t)=>({...e,[ze(t,"fontFamily")]:"Arial",[ze(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ze(t,"letterSpacing")]:0,[ze(t,"wordSpacing")]:0,[ze(t,"textAlign")]:"left",[ze(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Yr(e){return Oi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ze(n,"fontSize")]=i),o!==void 0&&(t[ze(n,"lineHeight")]=o),t},{})}const ky={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Oi.map(e=>[Fa[e],_a(e)]))},Do={subtitle:"Group exhibition",caption:"Installation view"},Py=[{title:"Nicolas Roggy 'Facings'",...Do,image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"grid(1).webp",objectFit:"cover"}},{title:"Jordan Derrien 'Eight attempts, for eight works and a little more'",...Do,image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"grid(2).webp",objectFit:"cover"}},{title:"Anne Bourse",...Do,image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"grid(3).webp",objectFit:"cover"}},{title:"Jean-Charles de Quillacq 'Le temps est venu'",...Do,image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"grid(4).webp",objectFit:"cover"}}],Ay={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!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"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",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"]}},required:["image"]},default:Py},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},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"}}},imageHoverEffect:{type:"string",scope:"common",title:"Hover",display:{type:"toggle-cycle",enum:["none","scale-in","saturate"]}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},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"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",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"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},...Ey},defaults:{imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},imageHoverEffect:"none",titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Iy,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...My},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.02,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.07,titleLineHeight:.07,...Yr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.07,titleLineHeight:.07,...Yr({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.02,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...Yr({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","wrapperWidth","imageDisplay","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","wrapperWidth",{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[ky]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},Wy={element:Ty,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Oi.map(e=>({path:`${ze(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Oi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ze(t,"fontFamily")}`}),{})},schema:Ay,sourceCode:Ly},Fy=[Su,Eu,Of,yp,Lp,_p,Qp,om,um,Pm,Tg,Ih,_h,xf,Mf,Jf,Wy];exports.components=Fy;exports.isSchemaV1=mc;