@cntrl-site/components 1.0.52-0 → 1.0.52

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,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),at=require("classnames"),v=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),gi=require("react-dom");function Tc(e){return e.type==="object"&&e.version===1}const Lc="ControlSlider-module__wrapper___sHEkd",Ic="ControlSlider-module__hoverArrow___A-dOH",Rc="ControlSlider-module__sliderItem___QQSkR",Ec="ControlSlider-module__sliderImage___9hRl-",Mc="ControlSlider-module__arrow___05ghY",kc="ControlSlider-module__arrowVertical___tBfVN",Pc="ControlSlider-module__nextArrow___-30Yc",Ac="ControlSlider-module__arrowInner___aEra3",Fc="ControlSlider-module__arrowIcon___S4ztF",Wc="ControlSlider-module__arrowImg___2dwJW",_c="ControlSlider-module__mirror___brd6U",Hc="ControlSlider-module__pagination___bicLF",Nc="ControlSlider-module__paginationInner___bT-P-",Oc="ControlSlider-module__paginationVertical___zYqKw",jc="ControlSlider-module__paginationItem___nTRbk",zc="ControlSlider-module__dot___p1Qun",Bc="ControlSlider-module__activeDot___LHFaj",Dc="ControlSlider-module__paginationInsideBottom___R3FWn",Vc="ControlSlider-module__paginationInsideTop___V-qb-",Gc="ControlSlider-module__paginationOutsideBottom___14w8D",qc="ControlSlider-module__paginationOutsideTop___SCLqB",Kc="ControlSlider-module__paginationInsideLeft___yOBRZ",Uc="ControlSlider-module__paginationInsideRight___Rtt3o",Xc="ControlSlider-module__paginationOutsideLeft___lahaw",Yc="ControlSlider-module__paginationOutsideRight___EtuQa",Zc="ControlSlider-module__imgWrapper___UjEgB",Jc="ControlSlider-module__captionBlock___dJ6-j",Qc="ControlSlider-module__captionTextWrapper___HFlpf",ed="ControlSlider-module__captionText___uGBVc",td="ControlSlider-module__active___WZK4G",nd="ControlSlider-module__withPointerEvents___t-18M",id="ControlSlider-module__topLeftAlignment___zjnGM",od="ControlSlider-module__topCenterAlignment___gD1xW",rd="ControlSlider-module__topRightAlignment___NMapS",ad="ControlSlider-module__middleLeftAlignment___OnUrY",ld="ControlSlider-module__middleCenterAlignment___Tdkl0",sd="ControlSlider-module__middleRightAlignment___wEbfX",cd="ControlSlider-module__bottomLeftAlignment___cTP2-",dd="ControlSlider-module__bottomCenterAlignment___c54fB",ud="ControlSlider-module__bottomRightAlignment___kEwrz",pd="ControlSlider-module__clickOverlay___DZA28",md="ControlSlider-module__contain___pLyq7",gd="ControlSlider-module__cover___KdDat",Qe={wrapper:Lc,hoverArrow:Ic,sliderItem:Rc,sliderImage:Ec,arrow:Mc,arrowVertical:kc,nextArrow:Pc,arrowInner:Ac,arrowIcon:Fc,arrowImg:Wc,mirror:_c,pagination:Hc,paginationInner:Nc,paginationVertical:Oc,paginationItem:jc,dot:zc,activeDot:Bc,paginationInsideBottom:Dc,paginationInsideTop:Vc,paginationOutsideBottom:Gc,paginationOutsideTop:qc,paginationInsideLeft:Kc,paginationInsideRight:Uc,paginationOutsideLeft:Xc,paginationOutsideRight:Yc,imgWrapper:Zc,captionBlock:Jc,captionTextWrapper:Qc,captionText:ed,active:td,withPointerEvents:nd,topLeftAlignment:id,topCenterAlignment:od,topRightAlignment:rd,middleLeftAlignment:ad,middleCenterAlignment:ld,middleRightAlignment:sd,bottomLeftAlignment:cd,bottomCenterAlignment:dd,bottomRightAlignment:ud,clickOverlay:pd,contain:md,cover:gd};function hd(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 fd(e,t,n){return t&&hd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Xa="(prefers-reduced-motion: reduce)",Ci=1,yd=2,Ei=3,Bi=4,yo=5,Go=6,Jo=7,vd={CREATED:Ci,MOUNTED:yd,IDLE:Ei,MOVING:Bi,SCROLLING:yo,DRAGGING:Go,DESTROYED:Jo};function Wn(e){e.length=0}function Yn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ht(e){return e.bind.apply(e,[null].concat(Yn(arguments,1)))}var us=setTimeout,ia=function(){};function Ya(e){return requestAnimationFrame(e)}function sr(e,t){return typeof t===e}function oo(e){return!va(e)&&sr("object",e)}var ya=Array.isArray,ps=Ht(sr,"function"),qn=Ht(sr,"string"),vo=Ht(sr,"undefined");function va(e){return e===null}function ms(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function bo(e){return ya(e)?e:[e]}function vn(e,t){bo(e).forEach(t)}function ba(e,t){return e.indexOf(t)>-1}function qo(e,t){return e.push.apply(e,bo(t)),e}function Mn(e,t,n){e&&vn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Ln(e,t){Mn(e,qn(t)?t.split(" "):t,!0)}function xo(e,t){vn(t,e.appendChild.bind(e))}function xa(e,t){vn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ro(e,t){return ms(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function gs(e,t){var n=e?Yn(e.children):[];return t?n.filter(function(i){return ro(i,t)}):n}function wo(e,t){return t?gs(e,t)[0]:e.firstElementChild}var ao=Object.keys;function di(e,t,n){return e&&(n?ao(e).reverse():ao(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function lo(e){return Yn(arguments,1).forEach(function(t){di(t,function(n,i){e[i]=t[i]})}),e}function Bn(e){return Yn(arguments,1).forEach(function(t){di(t,function(n,i){ya(n)?e[i]=n.slice():oo(n)?e[i]=Bn({},oo(e[i])?e[i]:{},n):e[i]=n})}),e}function Za(e,t){vn(t||ao(e),function(n){delete e[n]})}function In(e,t){vn(e,function(n){vn(t,function(i){n&&n.removeAttribute(i)})})}function gt(e,t,n){oo(t)?di(t,function(i,o){gt(e,o,i)}):vn(e,function(i){va(n)||n===""?In(i,t):i.setAttribute(t,String(n))})}function Ti(e,t,n){var i=document.createElement(e);return t&&(qn(t)?Ln(i,t):gt(i,t)),n&&xo(n,i),i}function bn(e,t,n){if(vo(n))return getComputedStyle(e)[t];va(n)||(e.style[t]=""+n)}function so(e,t){bn(e,"display",t)}function hs(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function xn(e,t){return e.getAttribute(t)}function Ja(e,t){return e&&e.classList.contains(t)}function gn(e){return e.getBoundingClientRect()}function ui(e){vn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function fs(e){return wo(new DOMParser().parseFromString(e,"text/html").body)}function En(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ys(e,t){return e&&e.querySelector(t)}function wa(e,t){return t?Yn(e.querySelectorAll(t)):[]}function kn(e,t){Mn(e,t,!1)}function oa(e){return e.timeStamp}function ni(e){return qn(e)?e:e?e+"px":""}var So="splide",Sa="data-"+So;function eo(e,t){if(!e)throw new Error("["+So+"] "+(t||""))}var Kn=Math.min,Qo=Math.max,er=Math.floor,co=Math.ceil,ln=Math.abs;function vs(e,t,n){return ln(e-t)<n}function Ko(e,t,n,i){var o=Kn(t,n),l=Qo(t,n);return i?o<e&&e<l:o<=e&&e<=l}function wi(e,t,n){var i=Kn(t,n),o=Qo(t,n);return Kn(Qo(i,e),o)}function ra(e){return+(e>0)-+(e<0)}function aa(e,t){return vn(t,function(n){e=e.replace("%s",""+n)}),e}function $a(e){return e<10?"0"+e:""+e}var Qa={};function bd(e){return""+e+$a(Qa[e]=(Qa[e]||0)+1)}function bs(){var e=[];function t(s,c,d,u){o(s,c,function(m,x,w){var $="addEventListener"in m,f=$?m.removeEventListener.bind(m,x,d,u):m.removeListener.bind(m,d);$?m.addEventListener(x,d,u):m.addListener(d),e.push([m,x,w,d,f])})}function n(s,c,d){o(s,c,function(u,m,x){e=e.filter(function(w){return w[0]===u&&w[1]===m&&w[2]===x&&(!d||w[3]===d)?(w[4](),!1):!0})})}function i(s,c,d){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:m,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,m,!1,d)),s.dispatchEvent(u),u}function o(s,c,d){vn(s,function(u){u&&vn(c,function(m){m.split(" ").forEach(function(x){var w=x.split(".");d(u,w[0],w[1])})})})}function l(){e.forEach(function(s){s[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:l}}var Zn="mounted",la="ready",_n="move",Di="moved",Ca="click",xs="active",ws="inactive",Ss="visible",$s="hidden",Jt="refresh",rn="updated",Mi="resize",cr="resized",Cs="drag",Ts="dragging",Ls="dragged",dr="scroll",hi="scrolled",xd="overflow",Ta="destroy",Is="arrows:mounted",Rs="arrows:updated",Es="pagination:mounted",Ms="pagination:updated",La="navigation:mounted",Ia="autoplay:play",ks="autoplay:playing",Ra="autoplay:pause",Ea="lazyload:loaded",Ps="sk",As="sh",tr="ei";function Gt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=bs();function i(l,s){n.bind(t,bo(l).join(" "),function(c){s.apply(s,ya(c.detail)?c.detail:[])})}function o(l){n.dispatch(t,l,Yn(arguments,1))}return e&&e.event.on(Ta,n.destroy),lo(n,{bus:t,on:i,off:Ht(n.unbind,t),emit:o})}function ur(e,t,n,i){var o=Date.now,l,s=0,c,d=!0,u=0;function m(){if(!d){if(s=e?Kn((o()-l)/e,1):1,n&&n(s),s>=1&&(t(),l=o(),i&&++u>=i))return w();c=Ya(m)}}function x(M){M||f(),l=o()-(M?s*e:0),d=!1,c=Ya(m)}function w(){d=!0}function $(){l=o(),s=0,n&&n(s)}function f(){c&&cancelAnimationFrame(c),s=0,c=0,d=!0}function S(M){e=M}function L(){return d}return{start:x,rewind:$,pause:w,cancel:f,set:S,isPaused:L}}function wd(e){var t=e;function n(o){t=o}function i(o){return ba(bo(o),t)}return{set:n,is:i}}function Sd(e,t){var n=ur(0,e,null,1);return function(){n.isPaused()&&n.start()}}function $d(e,t,n){var i=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},s=bs(),c=[];function d(){var f=n.mediaQuery==="min";ao(o).sort(function(S,L){return f?+S-+L:+L-+S}).forEach(function(S){m(o[S],"("+(f?"min":"max")+"-width:"+S+"px)")}),m(l,Xa),x()}function u(f){f&&s.destroy()}function m(f,S){var L=matchMedia(S);s.bind(L,"change",x),c.push([f,L])}function x(){var f=i.is(Jo),S=n.direction,L=c.reduce(function(M,A){return Bn(M,A[1].matches?A[0]:{})},{});Za(n),$(L),n.destroy?e.destroy(n.destroy==="completely"):f?(u(!0),e.mount()):S!==n.direction&&e.refresh()}function w(f){matchMedia(Xa).matches&&(f?Bn(n,l):Za(n,ao(l)))}function $(f,S,L){Bn(n,f),S&&Bn(Object.getPrototypeOf(n),f),(L||!i.is(Ci))&&e.emit(rn,n)}return{setup:d,destroy:u,reduce:w,set:$}}var pr="Arrow",mr=pr+"Left",gr=pr+"Right",Fs=pr+"Up",Ws=pr+"Down",el="rtl",hr="ttb",kr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Fs,gr],ArrowRight:[Ws,mr]};function Cd(e,t,n){function i(l,s,c){c=c||n.direction;var d=c===el&&!s?1:c===hr?0:-1;return kr[l]&&kr[l][d]||l.replace(/width|left|right/i,function(u,m){var x=kr[u.toLowerCase()][d]||u;return m>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(l){return l*(n.direction===el?1:-1)}return{resolve:i,orient:o}}var Pn="role",Li="tabindex",Td="disabled",wn="aria-",$o=wn+"controls",_s=wn+"current",tl=wn+"selected",fn=wn+"label",Ma=wn+"labelledby",Hs=wn+"hidden",ka=wn+"orientation",uo=wn+"roledescription",nl=wn+"live",il=wn+"busy",ol=wn+"atomic",Pa=[Pn,Li,Td,$o,_s,fn,Ma,Hs,ka,uo],Rn=So+"__",Jn="is-",Pr=So,rl=Rn+"track",Ld=Rn+"list",fr=Rn+"slide",Ns=fr+"--clone",Id=fr+"__container",Aa=Rn+"arrows",yr=Rn+"arrow",Os=yr+"--prev",js=yr+"--next",vr=Rn+"pagination",zs=vr+"__page",Rd=Rn+"progress",Ed=Rd+"__bar",Md=Rn+"toggle",kd=Rn+"spinner",Pd=Rn+"sr",Ad=Jn+"initialized",pi=Jn+"active",Bs=Jn+"prev",Ds=Jn+"next",sa=Jn+"visible",ca=Jn+"loading",Vs=Jn+"focus-in",Gs=Jn+"overflow",Fd=[pi,sa,Bs,Ds,ca,Vs,Gs],Wd={slide:fr,clone:Ns,arrows:Aa,arrow:yr,prev:Os,next:js,pagination:vr,page:zs,spinner:kd};function _d(e,t){if(ps(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ro(n,t);)n=n.parentElement;return n}var Hd=5,al=200,qs="touchstart mousedown",Ar="touchmove mousemove",Fr="touchend touchcancel mouseup click";function Nd(e,t,n){var i=Gt(e),o=i.on,l=i.bind,s=e.root,c=n.i18n,d={},u=[],m=[],x=[],w,$,f;function S(){C(),J(),A()}function L(){o(Jt,M),o(Jt,S),o(rn,A),l(document,qs+" keydown",function(I){f=I.type==="keydown"},{capture:!0}),l(s,"focusin",function(){Mn(s,Vs,!!f)})}function M(I){var R=Pa.concat("style");Wn(u),kn(s,m),kn(w,x),In([w,$],R),In(s,I?R:["style",uo])}function A(){kn(s,m),kn(w,x),m=U(Pr),x=U(rl),Ln(s,m),Ln(w,x),gt(s,fn,n.label),gt(s,Ma,n.labelledby)}function C(){w=k("."+rl),$=wo(w,"."+Ld),eo(w&&$,"A track/list element is missing."),qo(u,gs($,"."+fr+":not(."+Ns+")")),di({arrows:Aa,pagination:vr,prev:Os,next:js,bar:Ed,toggle:Md},function(I,R){d[R]=k("."+I)}),lo(d,{root:s,track:w,list:$,slides:u})}function J(){var I=s.id||bd(So),R=n.role;s.id=I,w.id=w.id||I+"-track",$.id=$.id||I+"-list",!xn(s,Pn)&&s.tagName!=="SECTION"&&R&&gt(s,Pn,R),gt(s,uo,c.carousel),gt($,Pn,"presentation")}function k(I){var R=ys(s,I);return R&&_d(R,"."+Pr)===s?R:void 0}function U(I){return[I+"--"+n.type,I+"--"+n.direction,n.drag&&I+"--draggable",n.isNavigation&&I+"--nav",I===Pr&&pi]}return lo(d,{setup:S,mount:L,destroy:M})}var ki="slide",Vi="loop",Co="fade";function Od(e,t,n,i){var o=Gt(e),l=o.on,s=o.emit,c=o.bind,d=e.Components,u=e.root,m=e.options,x=m.isNavigation,w=m.updateOnMove,$=m.i18n,f=m.pagination,S=m.slideFocus,L=d.Direction.resolve,M=xn(i,"style"),A=xn(i,fn),C=n>-1,J=wo(i,"."+Id),k;function U(){C||(i.id=u.id+"-slide"+$a(t+1),gt(i,Pn,f?"tabpanel":"group"),gt(i,uo,$.slide),gt(i,fn,A||aa($.slideLabel,[t+1,e.length]))),I()}function I(){c(i,"click",Ht(s,Ca,H)),c(i,"keydown",Ht(s,Ps,H)),l([Di,As,hi],h),l(La,T),w&&l(_n,y)}function R(){k=!0,o.destroy(),kn(i,Fd),In(i,Pa),gt(i,"style",M),gt(i,fn,A||"")}function T(){var _=e.splides.map(function(E){var q=E.splide.Components.Slides.getAt(t);return q?q.slide.id:""}).join(" ");gt(i,fn,aa($.slideX,(C?n:t)+1)),gt(i,$o,_),gt(i,Pn,S?"button":""),S&&In(i,uo)}function y(){k||h()}function h(){if(!k){var _=e.index;F(),W(),Mn(i,Bs,t===_-1),Mn(i,Ds,t===_+1)}}function F(){var _=ne();_!==Ja(i,pi)&&(Mn(i,pi,_),gt(i,_s,x&&_||""),s(_?xs:ws,H))}function W(){var _=X(),E=!_&&(!ne()||C);if(e.state.is([Bi,yo])||gt(i,Hs,E||""),gt(wa(i,m.focusableNodes||""),Li,E?-1:""),S&&gt(i,Li,E?-1:0),_!==Ja(i,sa)&&(Mn(i,sa,_),s(_?Ss:$s,H)),!_&&document.activeElement===i){var q=d.Slides.getAt(e.index);q&&hs(q.slide)}}function V(_,E,q){bn(q&&J||i,_,E)}function ne(){var _=e.index;return _===t||m.cloneStatus&&_===n}function X(){if(e.is(Co))return ne();var _=gn(d.Elements.track),E=gn(i),q=L("left",!0),Y=L("right",!0);return er(_[q])<=co(E[q])&&er(E[Y])<=co(_[Y])}function z(_,E){var q=ln(_-t);return!C&&(m.rewind||e.is(Vi))&&(q=Kn(q,e.length-q)),q<=E}var H={index:t,slideIndex:n,slide:i,container:J,isClone:C,mount:U,destroy:R,update:h,style:V,isWithin:z};return H}function jd(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=i.bind,c=t.Elements,d=c.slides,u=c.list,m=[];function x(){w(),o(Jt,$),o(Jt,w)}function w(){d.forEach(function(h,F){S(h,F,-1)})}function $(){k(function(h){h.destroy()}),Wn(m)}function f(){k(function(h){h.update()})}function S(h,F,W){var V=Od(e,F,W,h);V.mount(),m.push(V),m.sort(function(ne,X){return ne.index-X.index})}function L(h){return h?U(function(F){return!F.isClone}):m}function M(h){var F=t.Controller,W=F.toIndex(h),V=F.hasFocus()?1:n.perPage;return U(function(ne){return Ko(ne.index,W,W+V-1)})}function A(h){return U(h)[0]}function C(h,F){vn(h,function(W){if(qn(W)&&(W=fs(W)),ms(W)){var V=d[F];V?xa(W,V):xo(u,W),Ln(W,n.classes.slide),R(W,Ht(l,Mi))}}),l(Jt)}function J(h){ui(U(h).map(function(F){return F.slide})),l(Jt)}function k(h,F){L(F).forEach(h)}function U(h){return m.filter(ps(h)?h:function(F){return qn(h)?ro(F.slide,h):ba(bo(h),F.index)})}function I(h,F,W){k(function(V){V.style(h,F,W)})}function R(h,F){var W=wa(h,"img"),V=W.length;V?W.forEach(function(ne){s(ne,"load error",function(){--V||F()})}):F()}function T(h){return h?d.length:m.length}function y(){return m.length>n.perPage}return{mount:x,destroy:$,update:f,register:S,get:L,getIn:M,getAt:A,add:C,remove:J,forEach:k,filter:U,style:I,getLength:T,isEnough:y}}function zd(e,t,n){var i=Gt(e),o=i.on,l=i.bind,s=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,m=u.root,x=u.track,w=u.list,$=c.getAt,f=c.style,S,L,M;function A(){C(),l(window,"resize load",Sd(Ht(s,Mi))),o([rn,Jt],C),o(Mi,J)}function C(){S=n.direction===hr,bn(m,"maxWidth",ni(n.width)),bn(x,d("paddingLeft"),k(!1)),bn(x,d("paddingRight"),k(!0)),J(!0)}function J(H){var _=gn(m);(H||L.width!==_.width||L.height!==_.height)&&(bn(x,"height",U()),f(d("marginRight"),ni(n.gap)),f("width",R()),f("height",T(),!0),L=_,s(cr),M!==(M=z())&&(Mn(m,Gs,M),s(xd,M)))}function k(H){var _=n.padding,E=d(H?"right":"left");return _&&ni(_[E]||(oo(_)?0:_))||"0px"}function U(){var H="";return S&&(H=I(),eo(H,"height or heightRatio is missing."),H="calc("+H+" - "+k(!1)+" - "+k(!0)+")"),H}function I(){return ni(n.height||gn(w).width*n.heightRatio)}function R(){return n.autoWidth?null:ni(n.fixedWidth)||(S?"":y())}function T(){return ni(n.fixedHeight)||(S?n.autoHeight?null:y():I())}function y(){var H=ni(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function h(){return gn(w)[d("width")]}function F(H,_){var E=$(H||0);return E?gn(E.slide)[d("width")]+(_?0:ne()):0}function W(H,_){var E=$(H);if(E){var q=gn(E.slide)[d("right")],Y=gn(w)[d("left")];return ln(q-Y)+(_?0:ne())}return 0}function V(H){return W(e.length-1)-W(0)+F(0,H)}function ne(){var H=$(0);return H&&parseFloat(bn(H.slide,d("marginRight")))||0}function X(H){return parseFloat(bn(x,d("padding"+(H?"Right":"Left"))))||0}function z(){return e.is(Co)||V(!0)>h()}return{mount:A,resize:J,listSize:h,slideSize:F,sliderSize:V,totalSize:W,getPadding:X,isOverflow:z}}var Bd=2;function Dd(e,t,n){var i=Gt(e),o=i.on,l=t.Elements,s=t.Slides,c=t.Direction.resolve,d=[],u;function m(){o(Jt,x),o([rn,Mi],$),(u=L())&&(f(u),t.Layout.resize(!0))}function x(){w(),m()}function w(){ui(d),Wn(d),i.destroy()}function $(){var M=L();u!==M&&(u<M||!M)&&i.emit(Jt)}function f(M){var A=s.get().slice(),C=A.length;if(C){for(;A.length<M;)qo(A,A);qo(A.slice(-M),A.slice(0,M)).forEach(function(J,k){var U=k<M,I=S(J.slide,k);U?xa(I,A[0].slide):xo(l.list,I),qo(d,I),s.register(I,k-M+(U?0:C),J.index)})}}function S(M,A){var C=M.cloneNode(!0);return Ln(C,n.classes.clone),C.id=e.root.id+"-clone"+$a(A+1),C}function L(){var M=n.clones;if(!e.is(Vi))M=0;else if(vo(M)){var A=n[c("fixedWidth")]&&t.Layout.slideSize(0),C=A&&co(gn(l.track)[c("width")]/A);M=C||n[c("autoWidth")]&&e.length||n.perPage*Bd}return M}return{mount:m,destroy:w}}function Vd(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,m=c.totalSize,x=c.listSize,w=c.sliderSize,$=t.Direction,f=$.resolve,S=$.orient,L=t.Elements,M=L.list,A=L.track,C;function J(){C=t.Transition,o([Zn,cr,rn,Jt],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),I(e.index),t.Slides.update())}function U(E,q,Y,ee){E!==q&&H(E>Y)&&(h(),R(y(V(),E>Y),!0)),s(Bi),l(_n,q,Y,E),C.start(q,function(){s(Ei),l(Di,q,Y,E),ee&&ee()})}function I(E){R(W(E,!0))}function R(E,q){if(!e.is(Co)){var Y=q?E:T(E);bn(M,"transform","translate"+f("X")+"("+Y+"px)"),E!==Y&&l(As)}}function T(E){if(e.is(Vi)){var q=F(E),Y=q>t.Controller.getEnd(),ee=q<0;(ee||Y)&&(E=y(E,Y))}return E}function y(E,q){var Y=E-z(q),ee=w();return E-=S(ee*(co(ln(Y)/ee)||1))*(q?1:-1),E}function h(){R(V(),!0),C.cancel()}function F(E){for(var q=t.Slides.get(),Y=0,ee=1/0,N=0;N<q.length;N++){var pe=q[N].index,b=ln(W(pe,!0)-E);if(b<=ee)ee=b,Y=pe;else break}return Y}function W(E,q){var Y=S(m(E-1)-X(E));return q?ne(Y):Y}function V(){var E=f("left");return gn(M)[E]-gn(A)[E]+S(u(!1))}function ne(E){return n.trimSpace&&e.is(ki)&&(E=wi(E,0,S(w(!0)-x()))),E}function X(E){var q=n.focus;return q==="center"?(x()-d(E,!0))/2:+q*d(E)||0}function z(E){return W(E?t.Controller.getEnd():0,!!n.trimSpace)}function H(E){var q=S(y(V(),E));return E?q>=0:q<=M[f("scrollWidth")]-gn(A)[f("width")]}function _(E,q){q=vo(q)?V():q;var Y=E!==!0&&S(q)<S(z(!1)),ee=E!==!1&&S(q)>S(z(!0));return Y||ee}return{mount:J,move:U,jump:I,translate:R,shift:y,cancel:h,toIndex:F,toPosition:W,getPosition:V,getLimit:z,exceededLimit:_,reposition:k}}function Gd(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=t.Move,c=s.getPosition,d=s.getLimit,u=s.toPosition,m=t.Slides,x=m.isEnough,w=m.getLength,$=n.omitEnd,f=e.is(Vi),S=e.is(ki),L=Ht(V,!1),M=Ht(V,!0),A=n.start||0,C,J=A,k,U,I;function R(){T(),o([rn,Jt,tr],T),o(cr,y)}function T(){k=w(!0),U=n.perMove,I=n.perPage,C=H();var b=wi(A,0,$?C:k-1);b!==A&&(A=b,s.reposition())}function y(){C!==H()&&l(tr)}function h(b,ye,Q){if(!pe()){var xe=W(b),$e=z(xe);$e>-1&&(ye||$e!==A)&&(Y($e),s.move(xe,$e,J,Q))}}function F(b,ye,Q,xe){t.Scroll.scroll(b,ye,Q,function(){var $e=z(s.toIndex(c()));Y($?Kn($e,C):$e),xe&&xe()})}function W(b){var ye=A;if(qn(b)){var Q=b.match(/([+\-<>])(\d+)?/)||[],xe=Q[1],$e=Q[2];xe==="+"||xe==="-"?ye=ne(A+ +(""+xe+(+$e||1)),A):xe===">"?ye=$e?_(+$e):L(!0):xe==="<"&&(ye=M(!0))}else ye=f?b:wi(b,0,C);return ye}function V(b,ye){var Q=U||(N()?1:I),xe=ne(A+Q*(b?-1:1),A,!(U||N()));return xe===-1&&S&&!vs(c(),d(!b),1)?b?0:C:ye?xe:z(xe)}function ne(b,ye,Q){if(x()||N()){var xe=X(b);xe!==b&&(ye=b,b=xe,Q=!1),b<0||b>C?!U&&(Ko(0,b,ye,!0)||Ko(C,ye,b,!0))?b=_(E(b)):f?b=Q?b<0?-(k%I||I):k:b:n.rewind?b=b<0?C:0:b=-1:Q&&b!==ye&&(b=_(E(ye)+(b<ye?-1:1)))}else b=-1;return b}function X(b){if(S&&n.trimSpace==="move"&&b!==A)for(var ye=c();ye===u(b,!0)&&Ko(b,0,e.length-1,!n.rewind);)b<A?--b:++b;return b}function z(b){return f?(b+k)%k||0:b}function H(){for(var b=k-(N()||f&&U?1:I);$&&b-- >0;)if(u(k-1,!0)!==u(b,!0)){b++;break}return wi(b,0,k-1)}function _(b){return wi(N()?b:I*b,0,C)}function E(b){return N()?Kn(b,C):er((b>=C?k-1:b)/I)}function q(b){var ye=s.toIndex(b);return S?wi(ye,0,C):ye}function Y(b){b!==A&&(J=A,A=b)}function ee(b){return b?J:A}function N(){return!vo(n.focus)||n.isNavigation}function pe(){return e.state.is([Bi,yo])&&!!n.waitForTransition}return{mount:R,go:h,scroll:F,getNext:L,getPrev:M,getAdjacent:V,getEnd:H,setIndex:Y,getIndex:ee,toIndex:_,toPage:E,toDest:q,hasFocus:N,isBusy:pe}}var qd="http://www.w3.org/2000/svg",Kd="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",Mo=40;function Ud(e,t,n){var i=Gt(e),o=i.on,l=i.bind,s=i.emit,c=n.classes,d=n.i18n,u=t.Elements,m=t.Controller,x=u.arrows,w=u.track,$=x,f=u.prev,S=u.next,L,M,A={};function C(){k(),o(rn,J)}function J(){U(),C()}function k(){var F=n.arrows;F&&!(f&&S)&&T(),f&&S&&(lo(A,{prev:f,next:S}),so($,F?"":"none"),Ln($,M=Aa+"--"+n.direction),F&&(I(),h(),gt([f,S],$o,w.id),s(Is,f,S)))}function U(){i.destroy(),kn($,M),L?(ui(x?[f,S]:$),f=S=null):In([f,S],Pa)}function I(){o([Zn,Di,Jt,hi,tr],h),l(S,"click",Ht(R,">")),l(f,"click",Ht(R,"<"))}function R(F){m.go(F,!0)}function T(){$=x||Ti("div",c.arrows),f=y(!0),S=y(!1),L=!0,xo($,[f,S]),!x&&xa($,w)}function y(F){var W='<button class="'+c.arrow+" "+(F?c.prev:c.next)+'" type="button"><svg xmlns="'+qd+'" viewBox="0 0 '+Mo+" "+Mo+'" width="'+Mo+'" height="'+Mo+'" focusable="false"><path d="'+(n.arrowPath||Kd)+'" />';return fs(W)}function h(){if(f&&S){var F=e.index,W=m.getPrev(),V=m.getNext(),ne=W>-1&&F<W?d.last:d.prev,X=V>-1&&F>V?d.first:d.next;f.disabled=W<0,S.disabled=V<0,gt(f,fn,ne),gt(S,fn,X),s(Rs,f,S,W,V)}}return{arrows:A,mount:C,destroy:U,update:h}}var Xd=Sa+"-interval";function Yd(e,t,n){var i=Gt(e),o=i.on,l=i.bind,s=i.emit,c=ur(n.interval,e.go.bind(e,">"),I),d=c.isPaused,u=t.Elements,m=t.Elements,x=m.root,w=m.toggle,$=n.autoplay,f,S,L=$==="pause";function M(){$&&(A(),w&&gt(w,$o,u.track.id),L||C(),U())}function A(){n.pauseOnHover&&l(x,"mouseenter mouseleave",function(T){f=T.type==="mouseenter",k()}),n.pauseOnFocus&&l(x,"focusin focusout",function(T){S=T.type==="focusin",k()}),w&&l(w,"click",function(){L?C():J(!0)}),o([_n,dr,Jt],c.rewind),o(_n,R)}function C(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),S=f=L=!1,U(),s(Ia))}function J(T){T===void 0&&(T=!0),L=!!T,U(),d()||(c.pause(),s(Ra))}function k(){L||(f||S?J(!1):C())}function U(){w&&(Mn(w,pi,!L),gt(w,fn,n.i18n[L?"play":"pause"]))}function I(T){var y=u.bar;y&&bn(y,"width",T*100+"%"),s(ks,T)}function R(T){var y=t.Slides.getAt(T);c.set(y&&+xn(y.slide,Xd)||n.interval)}return{mount:M,destroy:c.cancel,play:C,pause:J,isPaused:d}}function Zd(e,t,n){var i=Gt(e),o=i.on;function l(){n.cover&&(o(Ea,Ht(c,!0)),o([Zn,rn,Jt],Ht(s,!0)))}function s(d){t.Slides.forEach(function(u){var m=wo(u.container||u.slide,"img");m&&m.src&&c(d,m,u)})}function c(d,u,m){m.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),so(u,d?"none":"")}return{mount:l,destroy:Ht(s,!1)}}var Jd=10,Qd=600,eu=.6,tu=1.5,nu=800;function iu(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,m=c.exceededLimit,x=c.translate,w=e.is(ki),$,f,S=1;function L(){o(_n,J),o([rn,Jt],k)}function M(I,R,T,y,h){var F=d();if(J(),T&&(!w||!m())){var W=t.Layout.sliderSize(),V=ra(I)*W*er(ln(I)/W)||0;I=c.toPosition(t.Controller.toDest(I%W))+V}var ne=vs(F,I,1);S=1,R=ne?0:R||Qo(ln(I-F)/tu,nu),f=y,$=ur(R,A,Ht(C,F,I,h),1),s(yo),l(dr),$.start()}function A(){s(Ei),f&&f(),l(hi)}function C(I,R,T,y){var h=d(),F=I+(R-I)*U(y),W=(F-h)*S;x(h+W),w&&!T&&m()&&(S*=eu,ln(W)<Jd&&M(u(m(!0)),Qd,!1,f,!0))}function J(){$&&$.cancel()}function k(){$&&!$.isPaused()&&(J(),A())}function U(I){var R=n.easingFunc;return R?R(I):1-Math.pow(1-I,4)}return{mount:L,destroy:J,scroll:M,cancel:k}}var Si={passive:!1,capture:!0};function ou(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=i.bind,c=i.unbind,d=e.state,u=t.Move,m=t.Scroll,x=t.Controller,w=t.Elements.track,$=t.Media.reduce,f=t.Direction,S=f.resolve,L=f.orient,M=u.getPosition,A=u.exceededLimit,C,J,k,U,I,R=!1,T,y,h;function F(){s(w,Ar,ia,Si),s(w,Fr,ia,Si),s(w,qs,V,Si),s(w,"click",z,{capture:!0}),s(w,"dragstart",En),o([Zn,rn],W)}function W(){var B=n.drag;ie(!B),U=B==="free"}function V(B){if(T=!1,!y){var le=$e(B);xe(B.target)&&(le||!B.button)&&(x.isBusy()?En(B,!0):(h=le?w:window,I=d.is([Bi,yo]),k=null,s(h,Ar,ne,Si),s(h,Fr,X,Si),u.cancel(),m.cancel(),H(B)))}}function ne(B){if(d.is(Go)||(d.set(Go),l(Cs)),B.cancelable)if(I){u.translate(C+Q(N(B)));var le=pe(B)>al,re=R!==(R=A());(le||re)&&H(B),T=!0,l(Ts),En(B)}else q(B)&&(I=E(B),En(B))}function X(B){d.is(Go)&&(d.set(Ei),l(Ls)),I&&(_(B),En(B)),c(h,Ar,ne),c(h,Fr,X),I=!1}function z(B){!y&&T&&En(B,!0)}function H(B){k=J,J=B,C=M()}function _(B){var le=Y(B),re=ee(le),ke=n.rewind&&n.rewindByDrag;$(!1),U?x.scroll(re,0,n.snap):e.is(Co)?x.go(L(ra(le))<0?ke?"<":"-":ke?">":"+"):e.is(ki)&&R&&ke?x.go(A(!0)?">":"<"):x.go(x.toDest(re),!0),$(!0)}function E(B){var le=n.dragMinThreshold,re=oo(le),ke=re&&le.mouse||0,fe=(re?le.touch:+le)||10;return ln(N(B))>($e(B)?fe:ke)}function q(B){return ln(N(B))>ln(N(B,!0))}function Y(B){if(e.is(Vi)||!R){var le=pe(B);if(le&&le<al)return N(B)/le}return 0}function ee(B){return M()+ra(B)*Kn(ln(B)*(n.flickPower||600),U?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function N(B,le){return ye(B,le)-ye(b(B),le)}function pe(B){return oa(B)-oa(b(B))}function b(B){return J===B&&k||J}function ye(B,le){return($e(B)?B.changedTouches[0]:B)["page"+S(le?"Y":"X")]}function Q(B){return B/(R&&e.is(ki)?Hd:1)}function xe(B){var le=n.noDrag;return!ro(B,"."+zs+", ."+yr)&&(!le||!ro(B,le))}function $e(B){return typeof TouchEvent<"u"&&B instanceof TouchEvent}function oe(){return I}function ie(B){y=B}return{mount:F,disable:ie,isDragging:oe}}var ru={Spacebar:" ",Right:gr,Left:mr,Up:Fs,Down:Ws};function Fa(e){return e=qn(e)?e:e.key,ru[e]||e}var ll="keydown";function au(e,t,n){var i=Gt(e),o=i.on,l=i.bind,s=i.unbind,c=e.root,d=t.Direction.resolve,u,m;function x(){w(),o(rn,$),o(rn,w),o(_n,S)}function w(){var M=n.keyboard;M&&(u=M==="global"?window:c,l(u,ll,L))}function $(){s(u,ll)}function f(M){m=M}function S(){var M=m;m=!0,us(function(){m=M})}function L(M){if(!m){var A=Fa(M);A===d(mr)?e.go("<"):A===d(gr)&&e.go(">")}}return{mount:x,destroy:$,disable:f}}var to=Sa+"-lazy",Uo=to+"-srcset",lu="["+to+"], ["+Uo+"]";function su(e,t,n){var i=Gt(e),o=i.on,l=i.off,s=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Di,hi],m=[];function x(){n.lazyLoad&&(w(),o(Jt,w))}function w(){Wn(m),$(),d?M():(l(u),o(u,f),f())}function $(){t.Slides.forEach(function(A){wa(A.slide,lu).forEach(function(C){var J=xn(C,to),k=xn(C,Uo);if(J!==C.src||k!==C.srcset){var U=n.classes.spinner,I=C.parentElement,R=wo(I,"."+U)||Ti("span",U,I);m.push([C,A,R]),C.src||so(C,"none")}})})}function f(){m=m.filter(function(A){var C=n.perPage*((n.preloadPages||1)+1)-1;return A[1].isWithin(e.index,C)?S(A):!0}),m.length||l(u)}function S(A){var C=A[0];Ln(A[1].slide,ca),s(C,"load error",Ht(L,A)),gt(C,"src",xn(C,to)),gt(C,"srcset",xn(C,Uo)),In(C,to),In(C,Uo)}function L(A,C){var J=A[0],k=A[1];kn(k.slide,ca),C.type!=="error"&&(ui(A[2]),so(J,""),c(Ea,J,k),c(Mi)),d&&M()}function M(){m.length&&S(m.shift())}return{mount:x,destroy:Ht(Wn,m),check:f}}function cu(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,m=u.hasFocus,x=u.getIndex,w=u.go,$=t.Direction.resolve,f=d.pagination,S=[],L,M;function A(){C(),o([rn,Jt,tr],A);var y=n.pagination;f&&so(f,y?"":"none"),y&&(o([_n,dr,hi],T),J(),T(),l(Es,{list:L,items:S},R(e.index)))}function C(){L&&(ui(f?Yn(L.children):L),kn(L,M),Wn(S),L=null),i.destroy()}function J(){var y=e.length,h=n.classes,F=n.i18n,W=n.perPage,V=m()?u.getEnd()+1:co(y/W);L=f||Ti("ul",h.pagination,d.track.parentElement),Ln(L,M=vr+"--"+I()),gt(L,Pn,"tablist"),gt(L,fn,F.select),gt(L,ka,I()===hr?"vertical":"");for(var ne=0;ne<V;ne++){var X=Ti("li",null,L),z=Ti("button",{class:h.page,type:"button"},X),H=c.getIn(ne).map(function(E){return E.slide.id}),_=!m()&&W>1?F.pageX:F.slideX;s(z,"click",Ht(k,ne)),n.paginationKeyboard&&s(z,"keydown",Ht(U,ne)),gt(X,Pn,"presentation"),gt(z,Pn,"tab"),gt(z,$o,H.join(" ")),gt(z,fn,aa(_,ne+1)),gt(z,Li,-1),S.push({li:X,button:z,page:ne})}}function k(y){w(">"+y,!0)}function U(y,h){var F=S.length,W=Fa(h),V=I(),ne=-1;W===$(gr,!1,V)?ne=++y%F:W===$(mr,!1,V)?ne=(--y+F)%F:W==="Home"?ne=0:W==="End"&&(ne=F-1);var X=S[ne];X&&(hs(X.button),w(">"+ne),En(h,!0))}function I(){return n.paginationDirection||n.direction}function R(y){return S[u.toPage(y)]}function T(){var y=R(x(!0)),h=R(x());if(y){var F=y.button;kn(F,pi),In(F,tl),gt(F,Li,-1)}if(h){var W=h.button;Ln(W,pi),gt(W,tl,!0),gt(W,Li,"")}l(Ms,{list:L,items:S},y,h)}return{items:S,mount:A,destroy:C,getAt:R,update:T}}var du=[" ","Enter"];function uu(e,t,n){var i=n.isNavigation,o=n.slideFocus,l=[];function s(){e.splides.forEach(function(f){f.isParent||(u(e,f.splide),u(f.splide,e))}),i&&m()}function c(){l.forEach(function(f){f.destroy()}),Wn(l)}function d(){c(),s()}function u(f,S){var L=Gt(f);L.on(_n,function(M,A,C){S.go(S.is(Vi)?C:M)}),l.push(L)}function m(){var f=Gt(e),S=f.on;S(Ca,w),S(Ps,$),S([Zn,rn],x),l.push(f),f.emit(La,e.splides)}function x(){gt(t.Elements.list,ka,n.direction===hr?"vertical":"")}function w(f){e.go(f.index)}function $(f,S){ba(du,Fa(S))&&(w(f),En(S))}return{setup:Ht(t.Media.set,{slideFocus:vo(o)?i:o},!0),mount:s,destroy:c,remount:d}}function pu(e,t,n){var i=Gt(e),o=i.bind,l=0;function s(){n.wheel&&o(t.Elements.track,"wheel",c,Si)}function c(u){if(u.cancelable){var m=u.deltaY,x=m<0,w=oa(u),$=n.wheelMinThreshold||0,f=n.wheelSleep||0;ln(m)>$&&w-l>f&&(e.go(x?"<":">"),l=w),d(x)&&En(u)}}function d(u){return!n.releaseWheel||e.state.is(Bi)||t.Controller.getAdjacent(u)!==-1}return{mount:s}}var mu=90;function gu(e,t,n){var i=Gt(e),o=i.on,l=t.Elements.track,s=n.live&&!n.isNavigation,c=Ti("span",Pd),d=ur(mu,Ht(m,!1));function u(){s&&(w(!t.Autoplay.isPaused()),gt(l,ol,!0),c.textContent="…",o(Ia,Ht(w,!0)),o(Ra,Ht(w,!1)),o([Di,hi],Ht(m,!0)))}function m($){gt(l,il,$),$?(xo(l,c),d.start()):(ui(c),d.cancel())}function x(){In(l,[nl,ol,il]),ui(c)}function w($){s&&gt(l,nl,$?"off":"polite")}return{mount:u,disable:w,destroy:x}}var hu=Object.freeze({__proto__:null,Media:$d,Direction:Cd,Elements:Nd,Slides:jd,Layout:zd,Clones:Dd,Move:Vd,Controller:Gd,Arrows:Ud,Autoplay:Yd,Cover:Zd,Scroll:iu,Drag:ou,Keyboard:au,LazyLoad:su,Pagination:cu,Sync:uu,Wheel:pu,Live:gu}),fu={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"},yu={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:Wd,i18n:fu,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function vu(e,t,n){var i=t.Slides;function o(){Gt(e).on([Zn,Jt],l)}function l(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function s(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),us(d)}return{mount:o,start:s,cancel:ia}}function bu(e,t,n){var i=t.Move,o=t.Controller,l=t.Scroll,s=t.Elements.list,c=Ht(bn,s,"transition"),d;function u(){Gt(e).bind(s,"transitionend",function($){$.target===s&&d&&(x(),d())})}function m($,f){var S=i.toPosition($,!0),L=i.getPosition(),M=w($);ln(S-L)>=1&&M>=1?n.useScroll?l.scroll(S,M,!1,f):(c("transform "+M+"ms "+n.easing),i.translate(S,!0),d=f):(i.jump($),f())}function x(){c(""),l.cancel()}function w($){var f=n.rewindSpeed;if(e.is(ki)&&f){var S=o.getIndex(!0),L=o.getEnd();if(S===0&&$>=L||S>=L&&$===0)return f}return n.speed}return{mount:u,start:m,cancel:x}}var xu=(function(){function e(n,i){this.event=Gt(),this.Components={},this.state=wd(Ci),this.splides=[],this._o={},this._E={};var o=qn(n)?ys(document,n):n;eo(o,o+" is invalid."),this.root=o,i=Bn({label:xn(o,fn)||"",labelledby:xn(o,Ma)||""},yu,e.defaults,i||{});try{Bn(i,JSON.parse(xn(o,Sa)))}catch{eo(!1,"Invalid JSON")}this._o=Object.create(Bn({},i))}var t=e.prototype;return t.mount=function(i,o){var l=this,s=this.state,c=this.Components;eo(s.is([Ci,Jo]),"Already mounted!"),s.set(Ci),this._C=c,this._T=o||this._T||(this.is(Co)?vu:bu),this._E=i||this._E;var d=lo({},hu,this._E,{Transition:this._T});return di(d,function(u,m){var x=u(l,c,l._o);c[m]=x,x.setup&&x.setup()}),di(c,function(u){u.mount&&u.mount()}),this.emit(Zn),Ln(this.root,Ad),s.set(Ei),this.emit(la),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Ei)&&(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(Yn(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(Jt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,l=this.state;return l.is(Ci)?Gt(this).on(la,this.destroy.bind(this,i)):(di(this._C,function(s){s.destroy&&s.destroy(i)},!0),o.emit(Ta),o.destroy(),i&&Wn(this.splides),l.set(Jo)),this},fd(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})(),Wa=xu;Wa.defaults={};Wa.STATES=vd;var sl=[[Zn,"onMounted"],[la,"onReady"],[_n,"onMove"],[Di,"onMoved"],[Ca,"onClick"],[xs,"onActive"],[ws,"onInactive"],[Ss,"onVisible"],[$s,"onHidden"],[Jt,"onRefresh"],[rn,"onUpdated"],[Mi,"onResize"],[cr,"onResized"],[Cs,"onDrag"],[Ts,"onDragging"],[Ls,"onDragged"],[dr,"onScroll"],[hi,"onScrolled"],[Ta,"onDestroy"],[Is,"onArrowsMounted"],[Rs,"onArrowsUpdated"],[Es,"onPaginationMounted"],[Ms,"onPaginationUpdated"],[La,"onNavigationMounted"],[Ia,"onAutoplayPlay"],[ks,"onAutoplayPlaying"],[Ra,"onAutoplayPause"],[Ea,"onLazyLoadLoaded"]];function _a(...e){return e.filter(Boolean).join(" ")}function nr(e){return e!==null&&typeof e=="object"}function da(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!da(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)||!da(e[o],t[o]))}return e===t}function wu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Su(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 ua(e,t){const n=e;return Su(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():nr(i)?n[o]=ua(nr(n[o])?n[o]:{},i):n[o]=i}),n}var $u=({children:e,className:t,...n})=>a.createElement("div",{className:_a("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),br=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 Wa(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ua({},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&&!da(this.options,e)&&(this.splide.options=e,this.options=ua({},e));const t=this.getSlides();wu(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){sl.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:_a("splide",e),ref:this.splideRef,...this.omit(o,["options",...sl.map(l=>l[1])])},n?a.createElement($u,null,i):i)}},xr=({children:e,className:t,...n})=>a.createElement("li",{className:_a("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),nt=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),gi=require("react-dom");function Sc(e){return e.type==="object"&&e.version===1}const $c="ControlSlider-module__wrapper___sHEkd",Cc="ControlSlider-module__hoverArrow___A-dOH",Tc="ControlSlider-module__sliderItem___QQSkR",Lc="ControlSlider-module__sliderImage___9hRl-",Ic="ControlSlider-module__arrow___05ghY",Rc="ControlSlider-module__arrowVertical___tBfVN",Ec="ControlSlider-module__nextArrow___-30Yc",kc="ControlSlider-module__arrowInner___aEra3",Mc="ControlSlider-module__arrowIcon___S4ztF",Pc="ControlSlider-module__arrowImg___2dwJW",Ac="ControlSlider-module__mirror___brd6U",Fc="ControlSlider-module__pagination___bicLF",Wc="ControlSlider-module__paginationInner___bT-P-",_c="ControlSlider-module__paginationVertical___zYqKw",Nc="ControlSlider-module__paginationItem___nTRbk",Hc="ControlSlider-module__dot___p1Qun",jc="ControlSlider-module__activeDot___LHFaj",Oc="ControlSlider-module__paginationInsideBottom___R3FWn",zc="ControlSlider-module__paginationInsideTop___V-qb-",Bc="ControlSlider-module__paginationOutsideBottom___14w8D",Dc="ControlSlider-module__paginationOutsideTop___SCLqB",Vc="ControlSlider-module__paginationInsideLeft___yOBRZ",Gc="ControlSlider-module__paginationInsideRight___Rtt3o",qc="ControlSlider-module__paginationOutsideLeft___lahaw",Kc="ControlSlider-module__paginationOutsideRight___EtuQa",Uc="ControlSlider-module__imgWrapper___UjEgB",Xc="ControlSlider-module__captionBlock___dJ6-j",Yc="ControlSlider-module__captionTextWrapper___HFlpf",Zc="ControlSlider-module__captionText___uGBVc",Jc="ControlSlider-module__active___WZK4G",Qc="ControlSlider-module__withPointerEvents___t-18M",ed="ControlSlider-module__topLeftAlignment___zjnGM",td="ControlSlider-module__topCenterAlignment___gD1xW",nd="ControlSlider-module__topRightAlignment___NMapS",id="ControlSlider-module__middleLeftAlignment___OnUrY",od="ControlSlider-module__middleCenterAlignment___Tdkl0",rd="ControlSlider-module__middleRightAlignment___wEbfX",ad="ControlSlider-module__bottomLeftAlignment___cTP2-",sd="ControlSlider-module__bottomCenterAlignment___c54fB",ld="ControlSlider-module__bottomRightAlignment___kEwrz",cd="ControlSlider-module__clickOverlay___DZA28",dd="ControlSlider-module__contain___pLyq7",ud="ControlSlider-module__cover___KdDat",Xe={wrapper:$c,hoverArrow:Cc,sliderItem:Tc,sliderImage:Lc,arrow:Ic,arrowVertical:Rc,nextArrow:Ec,arrowInner:kc,arrowIcon:Mc,arrowImg:Pc,mirror:Ac,pagination:Fc,paginationInner:Wc,paginationVertical:_c,paginationItem:Nc,dot:Hc,activeDot:jc,paginationInsideBottom:Oc,paginationInsideTop:zc,paginationOutsideBottom:Bc,paginationOutsideTop:Dc,paginationInsideLeft:Vc,paginationInsideRight:Gc,paginationOutsideLeft:qc,paginationOutsideRight:Kc,imgWrapper:Uc,captionBlock:Xc,captionTextWrapper:Yc,captionText:Zc,active:Jc,withPointerEvents:Qc,topLeftAlignment:ed,topCenterAlignment:td,topRightAlignment:nd,middleLeftAlignment:id,middleCenterAlignment:od,middleRightAlignment:rd,bottomLeftAlignment:ad,bottomCenterAlignment:sd,bottomRightAlignment:ld,clickOverlay:cd,contain:dd,cover:ud};function pd(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 md(e,t,n){return t&&pd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ya="(prefers-reduced-motion: reduce)",Ci=1,gd=2,Ri=3,zi=4,yo=5,qo=6,Qo=7,hd={CREATED:Ci,MOUNTED:gd,IDLE:Ri,MOVING:zi,SCROLLING:yo,DRAGGING:qo,DESTROYED:Qo};function Wn(e){e.length=0}function Xn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ot(e){return e.bind.apply(e,[null].concat(Xn(arguments,1)))}var dl=setTimeout,oa=function(){};function Za(e){return requestAnimationFrame(e)}function cr(e,t){return typeof t===e}function oo(e){return!xa(e)&&cr("object",e)}var va=Array.isArray,ul=Ot(cr,"function"),Gn=Ot(cr,"string"),vo=Ot(cr,"undefined");function xa(e){return e===null}function pl(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function xo(e){return va(e)?e:[e]}function vn(e,t){xo(e).forEach(t)}function ba(e,t){return e.indexOf(t)>-1}function Ko(e,t){return e.push.apply(e,xo(t)),e}function kn(e,t,n){e&&vn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){kn(e,Gn(t)?t.split(" "):t,!0)}function bo(e,t){vn(t,e.appendChild.bind(e))}function wa(e,t){vn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ro(e,t){return pl(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ml(e,t){var n=e?Xn(e.children):[];return t?n.filter(function(i){return ro(i,t)}):n}function wo(e,t){return t?ml(e,t)[0]:e.firstElementChild}var ao=Object.keys;function di(e,t,n){return e&&(n?ao(e).reverse():ao(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function so(e){return Xn(arguments,1).forEach(function(t){di(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Xn(arguments,1).forEach(function(t){di(t,function(n,i){va(n)?e[i]=n.slice():oo(n)?e[i]=zn({},oo(e[i])?e[i]:{},n):e[i]=n})}),e}function Ja(e,t){vn(t||ao(e),function(n){delete e[n]})}function Ln(e,t){vn(e,function(n){vn(t,function(i){n&&n.removeAttribute(i)})})}function ct(e,t,n){oo(t)?di(t,function(i,o){ct(e,o,i)}):vn(e,function(i){xa(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function Ti(e,t,n){var i=document.createElement(e);return t&&(Gn(t)?Tn(i,t):ct(i,t)),n&&bo(n,i),i}function xn(e,t,n){if(vo(n))return getComputedStyle(e)[t];xa(n)||(e.style[t]=""+n)}function lo(e,t){xn(e,"display",t)}function gl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function Qa(e,t){return e&&e.classList.contains(t)}function gn(e){return e.getBoundingClientRect()}function ui(e){vn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function hl(e){return wo(new DOMParser().parseFromString(e,"text/html").body)}function En(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function fl(e,t){return e&&e.querySelector(t)}function Sa(e,t){return t?Xn(e.querySelectorAll(t)):[]}function Mn(e,t){kn(e,t,!1)}function ra(e){return e.timeStamp}function ti(e){return Gn(e)?e:e?e+"px":""}var So="splide",$a="data-"+So;function Qi(e,t){if(!e)throw new Error("["+So+"] "+(t||""))}var qn=Math.min,er=Math.max,tr=Math.floor,co=Math.ceil,ln=Math.abs;function yl(e,t,n){return ln(e-t)<n}function Uo(e,t,n,i){var o=qn(t,n),s=er(t,n);return i?o<e&&e<s:o<=e&&e<=s}function wi(e,t,n){var i=qn(t,n),o=er(t,n);return qn(er(i,e),o)}function aa(e){return+(e>0)-+(e<0)}function sa(e,t){return vn(t,function(n){e=e.replace("%s",""+n)}),e}function Ca(e){return e<10?"0"+e:""+e}var es={};function fd(e){return""+e+Ca(es[e]=(es[e]||0)+1)}function vl(){var e=[];function t(l,d,c,u){o(l,d,function(m,x,b){var T="addEventListener"in m,f=T?m.removeEventListener.bind(m,x,c,u):m.removeListener.bind(m,c);T?m.addEventListener(x,c,u):m.addListener(c),e.push([m,x,b,c,f])})}function n(l,d,c){o(l,d,function(u,m,x){e=e.filter(function(b){return b[0]===u&&b[1]===m&&b[2]===x&&(!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(x){var b=x.split(".");c(u,b[0],b[1])})})})}function s(){e.forEach(function(l){l[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Yn="mounted",la="ready",_n="move",Bi="moved",Ta="click",xl="active",bl="inactive",wl="visible",Sl="hidden",Zt="refresh",an="updated",Ei="resize",dr="resized",$l="drag",Cl="dragging",Tl="dragged",ur="scroll",hi="scrolled",yd="overflow",La="destroy",Ll="arrows:mounted",Il="arrows:updated",Rl="pagination:mounted",El="pagination:updated",Ia="navigation:mounted",Ra="autoplay:play",kl="autoplay:playing",Ea="autoplay:pause",ka="lazyload:loaded",Ml="sk",Pl="sh",nr="ei";function qt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=vl();function i(s,l){n.bind(t,xo(s).join(" "),function(d){l.apply(l,va(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Xn(arguments,1))}return e&&e.event.on(La,n.destroy),so(n,{bus:t,on:i,off:Ot(n.unbind,t),emit:o})}function pr(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=Za(m)}}function x(R){R||f(),s=o()-(R?l*e:0),c=!1,d=Za(m)}function b(){c=!0}function T(){s=o(),l=0,n&&n(l)}function f(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function L(R){e=R}function $(){return c}return{start:x,rewind:T,pause:b,cancel:f,set:L,isPaused:$}}function vd(e){var t=e;function n(o){t=o}function i(o){return ba(xo(o),t)}return{set:n,is:i}}function xd(e,t){var n=pr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function bd(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=vl(),d=[];function c(){var f=n.mediaQuery==="min";ao(o).sort(function(L,$){return f?+L-+$:+$-+L}).forEach(function(L){m(o[L],"("+(f?"min":"max")+"-width:"+L+"px)")}),m(s,Ya),x()}function u(f){f&&l.destroy()}function m(f,L){var $=matchMedia(L);l.bind($,"change",x),d.push([f,$])}function x(){var f=i.is(Qo),L=n.direction,$=d.reduce(function(R,P){return zn(R,P[1].matches?P[0]:{})},{});Ja(n),T($),n.destroy?e.destroy(n.destroy==="completely"):f?(u(!0),e.mount()):L!==n.direction&&e.refresh()}function b(f){matchMedia(Ya).matches&&(f?zn(n,s):Ja(n,ao(s)))}function T(f,L,$){zn(n,f),L&&zn(Object.getPrototypeOf(n),f),($||!i.is(Ci))&&e.emit(an,n)}return{setup:c,destroy:u,reduce:b,set:T}}var mr="Arrow",gr=mr+"Left",hr=mr+"Right",Al=mr+"Up",Fl=mr+"Down",ts="rtl",fr="ttb",Pr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Al,hr],ArrowRight:[Fl,gr]};function wd(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===ts&&!l?1:d===fr?0:-1;return Pr[s]&&Pr[s][c]||s.replace(/width|left|right/i,function(u,m){var x=Pr[u.toLowerCase()][c]||u;return m>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(s){return s*(n.direction===ts?1:-1)}return{resolve:i,orient:o}}var Pn="role",Li="tabindex",Sd="disabled",wn="aria-",$o=wn+"controls",Wl=wn+"current",ns=wn+"selected",fn=wn+"label",Ma=wn+"labelledby",_l=wn+"hidden",Pa=wn+"orientation",uo=wn+"roledescription",is=wn+"live",os=wn+"busy",rs=wn+"atomic",Aa=[Pn,Li,Sd,$o,Wl,fn,Ma,_l,Pa,uo],In=So+"__",Zn="is-",Ar=So,as=In+"track",$d=In+"list",yr=In+"slide",Nl=yr+"--clone",Cd=yr+"__container",Fa=In+"arrows",vr=In+"arrow",Hl=vr+"--prev",jl=vr+"--next",xr=In+"pagination",Ol=xr+"__page",Td=In+"progress",Ld=Td+"__bar",Id=In+"toggle",Rd=In+"spinner",Ed=In+"sr",kd=Zn+"initialized",pi=Zn+"active",zl=Zn+"prev",Bl=Zn+"next",ca=Zn+"visible",da=Zn+"loading",Dl=Zn+"focus-in",Vl=Zn+"overflow",Md=[pi,ca,zl,Bl,da,Dl,Vl],Pd={slide:yr,clone:Nl,arrows:Fa,arrow:vr,prev:Hl,next:jl,pagination:xr,page:Ol,spinner:Rd};function Ad(e,t){if(ul(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ro(n,t);)n=n.parentElement;return n}var Fd=5,ss=200,Gl="touchstart mousedown",Fr="touchmove mousemove",Wr="touchend touchcancel mouseup click";function Wd(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],m=[],x=[],b,T,f;function L(){C(),X(),P()}function $(){o(Zt,R),o(Zt,L),o(an,P),s(document,Gl+" keydown",function(I){f=I.type==="keydown"},{capture:!0}),s(l,"focusin",function(){kn(l,Dl,!!f)})}function R(I){var w=Aa.concat("style");Wn(u),Mn(l,m),Mn(b,x),Ln([b,T],w),Ln(l,I?w:["style",uo])}function P(){Mn(l,m),Mn(b,x),m=B(Ar),x=B(as),Tn(l,m),Tn(b,x),ct(l,fn,n.label),ct(l,Ma,n.labelledby)}function C(){b=E("."+as),T=wo(b,"."+$d),Qi(b&&T,"A track/list element is missing."),Ko(u,ml(T,"."+yr+":not(."+Nl+")")),di({arrows:Fa,pagination:xr,prev:Hl,next:jl,bar:Ld,toggle:Id},function(I,w){c[w]=E("."+I)}),so(c,{root:l,track:b,list:T,slides:u})}function X(){var I=l.id||fd(So),w=n.role;l.id=I,b.id=b.id||I+"-track",T.id=T.id||I+"-list",!bn(l,Pn)&&l.tagName!=="SECTION"&&w&&ct(l,Pn,w),ct(l,uo,d.carousel),ct(T,Pn,"presentation")}function E(I){var w=fl(l,I);return w&&Ad(w,"."+Ar)===l?w:void 0}function B(I){return[I+"--"+n.type,I+"--"+n.direction,n.drag&&I+"--draggable",n.isNavigation&&I+"--nav",I===Ar&&pi]}return so(c,{setup:L,mount:$,destroy:R})}var ki="slide",Di="loop",Co="fade";function _d(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,x=m.isNavigation,b=m.updateOnMove,T=m.i18n,f=m.pagination,L=m.slideFocus,$=c.Direction.resolve,R=bn(i,"style"),P=bn(i,fn),C=n>-1,X=wo(i,"."+Cd),E;function B(){C||(i.id=u.id+"-slide"+Ca(t+1),ct(i,Pn,f?"tabpanel":"group"),ct(i,uo,T.slide),ct(i,fn,P||sa(T.slideLabel,[t+1,e.length]))),I()}function I(){d(i,"click",Ot(l,Ta,H)),d(i,"keydown",Ot(l,Ml,H)),s([Bi,Pl,hi],S),s(Ia,W),b&&s(_n,h)}function w(){E=!0,o.destroy(),Mn(i,Md),Ln(i,Aa),ct(i,"style",R),ct(i,fn,P||"")}function W(){var F=e.splides.map(function(A){var K=A.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");ct(i,fn,sa(T.slideX,(C?n:t)+1)),ct(i,$o,F),ct(i,Pn,L?"button":""),L&&Ln(i,uo)}function h(){E||S()}function S(){if(!E){var F=e.index;k(),D(),kn(i,zl,t===F-1),kn(i,Bl,t===F+1)}}function k(){var F=ae();F!==Qa(i,pi)&&(kn(i,pi,F),ct(i,Wl,x&&F||""),l(F?xl:bl,H))}function D(){var F=Y(),A=!F&&(!ae()||C);if(e.state.is([zi,yo])||ct(i,_l,A||""),ct(Sa(i,m.focusableNodes||""),Li,A?-1:""),L&&ct(i,Li,A?-1:0),F!==Qa(i,ca)&&(kn(i,ca,F),l(F?wl:Sl,H)),!F&&document.activeElement===i){var K=c.Slides.getAt(e.index);K&&gl(K.slide)}}function U(F,A,K){xn(K&&X||i,F,A)}function ae(){var F=e.index;return F===t||m.cloneStatus&&F===n}function Y(){if(e.is(Co))return ae();var F=gn(c.Elements.track),A=gn(i),K=$("left",!0),q=$("right",!0);return tr(F[K])<=co(A[K])&&tr(A[q])<=co(F[q])}function G(F,A){var K=ln(F-t);return!C&&(m.rewind||e.is(Di))&&(K=qn(K,e.length-K)),K<=A}var H={index:t,slideIndex:n,slide:i,container:X,isClone:C,mount:B,destroy:w,update:S,style:U,isWithin:G};return H}function Nd(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 x(){b(),o(Zt,T),o(Zt,b)}function b(){c.forEach(function(S,k){L(S,k,-1)})}function T(){E(function(S){S.destroy()}),Wn(m)}function f(){E(function(S){S.update()})}function L(S,k,D){var U=_d(e,k,D,S);U.mount(),m.push(U),m.sort(function(ae,Y){return ae.index-Y.index})}function $(S){return S?B(function(k){return!k.isClone}):m}function R(S){var k=t.Controller,D=k.toIndex(S),U=k.hasFocus()?1:n.perPage;return B(function(ae){return Uo(ae.index,D,D+U-1)})}function P(S){return B(S)[0]}function C(S,k){vn(S,function(D){if(Gn(D)&&(D=hl(D)),pl(D)){var U=c[k];U?wa(D,U):bo(u,D),Tn(D,n.classes.slide),w(D,Ot(s,Ei))}}),s(Zt)}function X(S){ui(B(S).map(function(k){return k.slide})),s(Zt)}function E(S,k){$(k).forEach(S)}function B(S){return m.filter(ul(S)?S:function(k){return Gn(S)?ro(k.slide,S):ba(xo(S),k.index)})}function I(S,k,D){E(function(U){U.style(S,k,D)})}function w(S,k){var D=Sa(S,"img"),U=D.length;U?D.forEach(function(ae){l(ae,"load error",function(){--U||k()})}):k()}function W(S){return S?c.length:m.length}function h(){return m.length>n.perPage}return{mount:x,destroy:T,update:f,register:L,get:$,getIn:R,getAt:P,add:C,remove:X,forEach:E,filter:B,style:I,getLength:W,isEnough:h}}function Hd(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,x=u.track,b=u.list,T=d.getAt,f=d.style,L,$,R;function P(){C(),s(window,"resize load",xd(Ot(l,Ei))),o([an,Zt],C),o(Ei,X)}function C(){L=n.direction===fr,xn(m,"maxWidth",ti(n.width)),xn(x,c("paddingLeft"),E(!1)),xn(x,c("paddingRight"),E(!0)),X(!0)}function X(H){var F=gn(m);(H||$.width!==F.width||$.height!==F.height)&&(xn(x,"height",B()),f(c("marginRight"),ti(n.gap)),f("width",w()),f("height",W(),!0),$=F,l(dr),R!==(R=G())&&(kn(m,Vl,R),l(yd,R)))}function E(H){var F=n.padding,A=c(H?"right":"left");return F&&ti(F[A]||(oo(F)?0:F))||"0px"}function B(){var H="";return L&&(H=I(),Qi(H,"height or heightRatio is missing."),H="calc("+H+" - "+E(!1)+" - "+E(!0)+")"),H}function I(){return ti(n.height||gn(b).width*n.heightRatio)}function w(){return n.autoWidth?null:ti(n.fixedWidth)||(L?"":h())}function W(){return ti(n.fixedHeight)||(L?n.autoHeight?null:h():I())}function h(){var H=ti(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function S(){return gn(b)[c("width")]}function k(H,F){var A=T(H||0);return A?gn(A.slide)[c("width")]+(F?0:ae()):0}function D(H,F){var A=T(H);if(A){var K=gn(A.slide)[c("right")],q=gn(b)[c("left")];return ln(K-q)+(F?0:ae())}return 0}function U(H){return D(e.length-1)-D(0)+k(0,H)}function ae(){var H=T(0);return H&&parseFloat(xn(H.slide,c("marginRight")))||0}function Y(H){return parseFloat(xn(x,c("padding"+(H?"Right":"Left"))))||0}function G(){return e.is(Co)||U(!0)>S()}return{mount:P,resize:X,listSize:S,slideSize:k,sliderSize:U,totalSize:D,getPadding:Y,isOverflow:G}}var jd=2;function Od(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(Zt,x),o([an,Ei],T),(u=$())&&(f(u),t.Layout.resize(!0))}function x(){b(),m()}function b(){ui(c),Wn(c),i.destroy()}function T(){var R=$();u!==R&&(u<R||!R)&&i.emit(Zt)}function f(R){var P=l.get().slice(),C=P.length;if(C){for(;P.length<R;)Ko(P,P);Ko(P.slice(-R),P.slice(0,R)).forEach(function(X,E){var B=E<R,I=L(X.slide,E);B?wa(I,P[0].slide):bo(s.list,I),Ko(c,I),l.register(I,E-R+(B?0:C),X.index)})}}function L(R,P){var C=R.cloneNode(!0);return Tn(C,n.classes.clone),C.id=e.root.id+"-clone"+Ca(P+1),C}function $(){var R=n.clones;if(!e.is(Di))R=0;else if(vo(R)){var P=n[d("fixedWidth")]&&t.Layout.slideSize(0),C=P&&co(gn(s.track)[d("width")]/P);R=C||n[d("autoWidth")]&&e.length||n.perPage*jd}return R}return{mount:m,destroy:b}}function zd(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,x=d.listSize,b=d.sliderSize,T=t.Direction,f=T.resolve,L=T.orient,$=t.Elements,R=$.list,P=$.track,C;function X(){C=t.Transition,o([Yn,dr,an,Zt],E)}function E(){t.Controller.isBusy()||(t.Scroll.cancel(),I(e.index),t.Slides.update())}function B(A,K,q,ee){A!==K&&H(A>q)&&(S(),w(h(U(),A>q),!0)),l(zi),s(_n,K,q,A),C.start(K,function(){l(Ri),s(Bi,K,q,A),ee&&ee()})}function I(A){w(D(A,!0))}function w(A,K){if(!e.is(Co)){var q=K?A:W(A);xn(R,"transform","translate"+f("X")+"("+q+"px)"),A!==q&&s(Pl)}}function W(A){if(e.is(Di)){var K=k(A),q=K>t.Controller.getEnd(),ee=K<0;(ee||q)&&(A=h(A,q))}return A}function h(A,K){var q=A-G(K),ee=b();return A-=L(ee*(co(ln(q)/ee)||1))*(K?1:-1),A}function S(){w(U(),!0),C.cancel()}function k(A){for(var K=t.Slides.get(),q=0,ee=1/0,N=0;N<K.length;N++){var ue=K[N].index,v=ln(D(ue,!0)-A);if(v<=ee)ee=v,q=ue;else break}return q}function D(A,K){var q=L(m(A-1)-Y(A));return K?ae(q):q}function U(){var A=f("left");return gn(R)[A]-gn(P)[A]+L(u(!1))}function ae(A){return n.trimSpace&&e.is(ki)&&(A=wi(A,0,L(b(!0)-x()))),A}function Y(A){var K=n.focus;return K==="center"?(x()-c(A,!0))/2:+K*c(A)||0}function G(A){return D(A?t.Controller.getEnd():0,!!n.trimSpace)}function H(A){var K=L(h(U(),A));return A?K>=0:K<=R[f("scrollWidth")]-gn(P)[f("width")]}function F(A,K){K=vo(K)?U():K;var q=A!==!0&&L(K)<L(G(!1)),ee=A!==!1&&L(K)>L(G(!0));return q||ee}return{mount:X,move:B,jump:I,translate:w,shift:h,cancel:S,toIndex:k,toPosition:D,getPosition:U,getLimit:G,exceededLimit:F,reposition:E}}function Bd(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,x=m.isEnough,b=m.getLength,T=n.omitEnd,f=e.is(Di),L=e.is(ki),$=Ot(U,!1),R=Ot(U,!0),P=n.start||0,C,X=P,E,B,I;function w(){W(),o([an,Zt,nr],W),o(dr,h)}function W(){E=b(!0),B=n.perMove,I=n.perPage,C=H();var v=wi(P,0,T?C:E-1);v!==P&&(P=v,l.reposition())}function h(){C!==H()&&s(nr)}function S(v,ye,Z){if(!ue()){var ce=D(v),$e=G(ce);$e>-1&&(ye||$e!==P)&&(q($e),l.move(ce,$e,X,Z))}}function k(v,ye,Z,ce){t.Scroll.scroll(v,ye,Z,function(){var $e=G(l.toIndex(d()));q(T?qn($e,C):$e),ce&&ce()})}function D(v){var ye=P;if(Gn(v)){var Z=v.match(/([+\-<>])(\d+)?/)||[],ce=Z[1],$e=Z[2];ce==="+"||ce==="-"?ye=ae(P+ +(""+ce+(+$e||1)),P):ce===">"?ye=$e?F(+$e):$(!0):ce==="<"&&(ye=R(!0))}else ye=f?v:wi(v,0,C);return ye}function U(v,ye){var Z=B||(N()?1:I),ce=ae(P+Z*(v?-1:1),P,!(B||N()));return ce===-1&&L&&!yl(d(),c(!v),1)?v?0:C:ye?ce:G(ce)}function ae(v,ye,Z){if(x()||N()){var ce=Y(v);ce!==v&&(ye=v,v=ce,Z=!1),v<0||v>C?!B&&(Uo(0,v,ye,!0)||Uo(C,ye,v,!0))?v=F(A(v)):f?v=Z?v<0?-(E%I||I):E:v:n.rewind?v=v<0?C:0:v=-1:Z&&v!==ye&&(v=F(A(ye)+(v<ye?-1:1)))}else v=-1;return v}function Y(v){if(L&&n.trimSpace==="move"&&v!==P)for(var ye=d();ye===u(v,!0)&&Uo(v,0,e.length-1,!n.rewind);)v<P?--v:++v;return v}function G(v){return f?(v+E)%E||0:v}function H(){for(var v=E-(N()||f&&B?1:I);T&&v-- >0;)if(u(E-1,!0)!==u(v,!0)){v++;break}return wi(v,0,E-1)}function F(v){return wi(N()?v:I*v,0,C)}function A(v){return N()?qn(v,C):tr((v>=C?E-1:v)/I)}function K(v){var ye=l.toIndex(v);return L?wi(ye,0,C):ye}function q(v){v!==P&&(X=P,P=v)}function ee(v){return v?X:P}function N(){return!vo(n.focus)||n.isNavigation}function ue(){return e.state.is([zi,yo])&&!!n.waitForTransition}return{mount:w,go:S,scroll:k,getNext:$,getPrev:R,getAdjacent:U,getEnd:H,setIndex:q,getIndex:ee,toIndex:F,toPage:A,toDest:K,hasFocus:N,isBusy:ue}}var Dd="http://www.w3.org/2000/svg",Vd="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",ko=40;function Gd(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,x=u.arrows,b=u.track,T=x,f=u.prev,L=u.next,$,R,P={};function C(){E(),o(an,X)}function X(){B(),C()}function E(){var k=n.arrows;k&&!(f&&L)&&W(),f&&L&&(so(P,{prev:f,next:L}),lo(T,k?"":"none"),Tn(T,R=Fa+"--"+n.direction),k&&(I(),S(),ct([f,L],$o,b.id),l(Ll,f,L)))}function B(){i.destroy(),Mn(T,R),$?(ui(x?[f,L]:T),f=L=null):Ln([f,L],Aa)}function I(){o([Yn,Bi,Zt,hi,nr],S),s(L,"click",Ot(w,">")),s(f,"click",Ot(w,"<"))}function w(k){m.go(k,!0)}function W(){T=x||Ti("div",d.arrows),f=h(!0),L=h(!1),$=!0,bo(T,[f,L]),!x&&wa(T,b)}function h(k){var D='<button class="'+d.arrow+" "+(k?d.prev:d.next)+'" type="button"><svg xmlns="'+Dd+'" viewBox="0 0 '+ko+" "+ko+'" width="'+ko+'" height="'+ko+'" focusable="false"><path d="'+(n.arrowPath||Vd)+'" />';return hl(D)}function S(){if(f&&L){var k=e.index,D=m.getPrev(),U=m.getNext(),ae=D>-1&&k<D?c.last:c.prev,Y=U>-1&&k>U?c.first:c.next;f.disabled=D<0,L.disabled=U<0,ct(f,fn,ae),ct(L,fn,Y),l(Il,f,L,D,U)}}return{arrows:P,mount:C,destroy:B,update:S}}var qd=$a+"-interval";function Kd(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.emit,d=pr(n.interval,e.go.bind(e,">"),I),c=d.isPaused,u=t.Elements,m=t.Elements,x=m.root,b=m.toggle,T=n.autoplay,f,L,$=T==="pause";function R(){T&&(P(),b&&ct(b,$o,u.track.id),$||C(),B())}function P(){n.pauseOnHover&&s(x,"mouseenter mouseleave",function(W){f=W.type==="mouseenter",E()}),n.pauseOnFocus&&s(x,"focusin focusout",function(W){L=W.type==="focusin",E()}),b&&s(b,"click",function(){$?C():X(!0)}),o([_n,ur,Zt],d.rewind),o(_n,w)}function C(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),L=f=$=!1,B(),l(Ra))}function X(W){W===void 0&&(W=!0),$=!!W,B(),c()||(d.pause(),l(Ea))}function E(){$||(f||L?X(!1):C())}function B(){b&&(kn(b,pi,!$),ct(b,fn,n.i18n[$?"play":"pause"]))}function I(W){var h=u.bar;h&&xn(h,"width",W*100+"%"),l(kl,W)}function w(W){var h=t.Slides.getAt(W);d.set(h&&+bn(h.slide,qd)||n.interval)}return{mount:R,destroy:d.cancel,play:C,pause:X,isPaused:c}}function Ud(e,t,n){var i=qt(e),o=i.on;function s(){n.cover&&(o(ka,Ot(d,!0)),o([Yn,an,Zt],Ot(l,!0)))}function l(c){t.Slides.forEach(function(u){var m=wo(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),lo(u,c?"none":"")}return{mount:s,destroy:Ot(l,!1)}}var Xd=10,Yd=600,Zd=.6,Jd=1.5,Qd=800;function eu(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,x=d.translate,b=e.is(ki),T,f,L=1;function $(){o(_n,X),o([an,Zt],E)}function R(I,w,W,h,S){var k=c();if(X(),W&&(!b||!m())){var D=t.Layout.sliderSize(),U=aa(I)*D*tr(ln(I)/D)||0;I=d.toPosition(t.Controller.toDest(I%D))+U}var ae=yl(k,I,1);L=1,w=ae?0:w||er(ln(I-k)/Jd,Qd),f=h,T=pr(w,P,Ot(C,k,I,S),1),l(yo),s(ur),T.start()}function P(){l(Ri),f&&f(),s(hi)}function C(I,w,W,h){var S=c(),k=I+(w-I)*B(h),D=(k-S)*L;x(S+D),b&&!W&&m()&&(L*=Zd,ln(D)<Xd&&R(u(m(!0)),Yd,!1,f,!0))}function X(){T&&T.cancel()}function E(){T&&!T.isPaused()&&(X(),P())}function B(I){var w=n.easingFunc;return w?w(I):1-Math.pow(1-I,4)}return{mount:$,destroy:X,scroll:R,cancel:E}}var Si={passive:!1,capture:!0};function tu(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,x=t.Controller,b=t.Elements.track,T=t.Media.reduce,f=t.Direction,L=f.resolve,$=f.orient,R=u.getPosition,P=u.exceededLimit,C,X,E,B,I,w=!1,W,h,S;function k(){l(b,Fr,oa,Si),l(b,Wr,oa,Si),l(b,Gl,U,Si),l(b,"click",G,{capture:!0}),l(b,"dragstart",En),o([Yn,an],D)}function D(){var J=n.drag;ve(!J),B=J==="free"}function U(J){if(W=!1,!h){var pe=$e(J);ce(J.target)&&(pe||!J.button)&&(x.isBusy()?En(J,!0):(S=pe?b:window,I=c.is([zi,yo]),E=null,l(S,Fr,ae,Si),l(S,Wr,Y,Si),u.cancel(),m.cancel(),H(J)))}}function ae(J){if(c.is(qo)||(c.set(qo),s($l)),J.cancelable)if(I){u.translate(C+Z(N(J)));var pe=ue(J)>ss,he=w!==(w=P());(pe||he)&&H(J),W=!0,s(Cl),En(J)}else K(J)&&(I=A(J),En(J))}function Y(J){c.is(qo)&&(c.set(Ri),s(Tl)),I&&(F(J),En(J)),d(S,Fr,ae),d(S,Wr,Y),I=!1}function G(J){!h&&W&&En(J,!0)}function H(J){E=X,X=J,C=R()}function F(J){var pe=q(J),he=ee(pe),Ae=n.rewind&&n.rewindByDrag;T(!1),B?x.scroll(he,0,n.snap):e.is(Co)?x.go($(aa(pe))<0?Ae?"<":"-":Ae?">":"+"):e.is(ki)&&w&&Ae?x.go(P(!0)?">":"<"):x.go(x.toDest(he),!0),T(!0)}function A(J){var pe=n.dragMinThreshold,he=oo(pe),Ae=he&&pe.mouse||0,be=(he?pe.touch:+pe)||10;return ln(N(J))>($e(J)?be:Ae)}function K(J){return ln(N(J))>ln(N(J,!0))}function q(J){if(e.is(Di)||!w){var pe=ue(J);if(pe&&pe<ss)return N(J)/pe}return 0}function ee(J){return R()+aa(J)*qn(ln(J)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function N(J,pe){return ye(J,pe)-ye(v(J),pe)}function ue(J){return ra(J)-ra(v(J))}function v(J){return X===J&&E||X}function ye(J,pe){return($e(J)?J.changedTouches[0]:J)["page"+L(pe?"Y":"X")]}function Z(J){return J/(w&&e.is(ki)?Fd:1)}function ce(J){var pe=n.noDrag;return!ro(J,"."+Ol+", ."+vr)&&(!pe||!ro(J,pe))}function $e(J){return typeof TouchEvent<"u"&&J instanceof TouchEvent}function ne(){return I}function ve(J){h=J}return{mount:k,disable:ve,isDragging:ne}}var nu={Spacebar:" ",Right:hr,Left:gr,Up:Al,Down:Fl};function Wa(e){return e=Gn(e)?e:e.key,nu[e]||e}var ls="keydown";function iu(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 x(){b(),o(an,T),o(an,b),o(_n,L)}function b(){var R=n.keyboard;R&&(u=R==="global"?window:d,s(u,ls,$))}function T(){l(u,ls)}function f(R){m=R}function L(){var R=m;m=!0,dl(function(){m=R})}function $(R){if(!m){var P=Wa(R);P===c(gr)?e.go("<"):P===c(hr)&&e.go(">")}}return{mount:x,destroy:T,disable:f}}var eo=$a+"-lazy",Xo=eo+"-srcset",ou="["+eo+"], ["+Xo+"]";function ru(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,hi],m=[];function x(){n.lazyLoad&&(b(),o(Zt,b))}function b(){Wn(m),T(),c?R():(s(u),o(u,f),f())}function T(){t.Slides.forEach(function(P){Sa(P.slide,ou).forEach(function(C){var X=bn(C,eo),E=bn(C,Xo);if(X!==C.src||E!==C.srcset){var B=n.classes.spinner,I=C.parentElement,w=wo(I,"."+B)||Ti("span",B,I);m.push([C,P,w]),C.src||lo(C,"none")}})})}function f(){m=m.filter(function(P){var C=n.perPage*((n.preloadPages||1)+1)-1;return P[1].isWithin(e.index,C)?L(P):!0}),m.length||s(u)}function L(P){var C=P[0];Tn(P[1].slide,da),l(C,"load error",Ot($,P)),ct(C,"src",bn(C,eo)),ct(C,"srcset",bn(C,Xo)),Ln(C,eo),Ln(C,Xo)}function $(P,C){var X=P[0],E=P[1];Mn(E.slide,da),C.type!=="error"&&(ui(P[2]),lo(X,""),d(ka,X,E),d(Ei)),c&&R()}function R(){m.length&&L(m.shift())}return{mount:x,destroy:Ot(Wn,m),check:f}}function au(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,x=u.getIndex,b=u.go,T=t.Direction.resolve,f=c.pagination,L=[],$,R;function P(){C(),o([an,Zt,nr],P);var h=n.pagination;f&&lo(f,h?"":"none"),h&&(o([_n,ur,hi],W),X(),W(),s(Rl,{list:$,items:L},w(e.index)))}function C(){$&&(ui(f?Xn($.children):$),Mn($,R),Wn(L),$=null),i.destroy()}function X(){var h=e.length,S=n.classes,k=n.i18n,D=n.perPage,U=m()?u.getEnd()+1:co(h/D);$=f||Ti("ul",S.pagination,c.track.parentElement),Tn($,R=xr+"--"+I()),ct($,Pn,"tablist"),ct($,fn,k.select),ct($,Pa,I()===fr?"vertical":"");for(var ae=0;ae<U;ae++){var Y=Ti("li",null,$),G=Ti("button",{class:S.page,type:"button"},Y),H=d.getIn(ae).map(function(A){return A.slide.id}),F=!m()&&D>1?k.pageX:k.slideX;l(G,"click",Ot(E,ae)),n.paginationKeyboard&&l(G,"keydown",Ot(B,ae)),ct(Y,Pn,"presentation"),ct(G,Pn,"tab"),ct(G,$o,H.join(" ")),ct(G,fn,sa(F,ae+1)),ct(G,Li,-1),L.push({li:Y,button:G,page:ae})}}function E(h){b(">"+h,!0)}function B(h,S){var k=L.length,D=Wa(S),U=I(),ae=-1;D===T(hr,!1,U)?ae=++h%k:D===T(gr,!1,U)?ae=(--h+k)%k:D==="Home"?ae=0:D==="End"&&(ae=k-1);var Y=L[ae];Y&&(gl(Y.button),b(">"+ae),En(S,!0))}function I(){return n.paginationDirection||n.direction}function w(h){return L[u.toPage(h)]}function W(){var h=w(x(!0)),S=w(x());if(h){var k=h.button;Mn(k,pi),Ln(k,ns),ct(k,Li,-1)}if(S){var D=S.button;Tn(D,pi),ct(D,ns,!0),ct(D,Li,"")}s(El,{list:$,items:L},h,S)}return{items:L,mount:P,destroy:C,getAt:w,update:W}}var su=[" ","Enter"];function lu(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(f){f.isParent||(u(e,f.splide),u(f.splide,e))}),i&&m()}function d(){s.forEach(function(f){f.destroy()}),Wn(s)}function c(){d(),l()}function u(f,L){var $=qt(f);$.on(_n,function(R,P,C){L.go(L.is(Di)?C:R)}),s.push($)}function m(){var f=qt(e),L=f.on;L(Ta,b),L(Ml,T),L([Yn,an],x),s.push(f),f.emit(Ia,e.splides)}function x(){ct(t.Elements.list,Pa,n.direction===fr?"vertical":"")}function b(f){e.go(f.index)}function T(f,L){ba(su,Wa(L))&&(b(f),En(L))}return{setup:Ot(t.Media.set,{slideFocus:vo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function cu(e,t,n){var i=qt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Si)}function d(u){if(u.cancelable){var m=u.deltaY,x=m<0,b=ra(u),T=n.wheelMinThreshold||0,f=n.wheelSleep||0;ln(m)>T&&b-s>f&&(e.go(x?"<":">"),s=b),c(x)&&En(u)}}function c(u){return!n.releaseWheel||e.state.is(zi)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var du=90;function uu(e,t,n){var i=qt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=Ti("span",Ed),c=pr(du,Ot(m,!1));function u(){l&&(b(!t.Autoplay.isPaused()),ct(s,rs,!0),d.textContent="…",o(Ra,Ot(b,!0)),o(Ea,Ot(b,!1)),o([Bi,hi],Ot(m,!0)))}function m(T){ct(s,os,T),T?(bo(s,d),c.start()):(ui(d),c.cancel())}function x(){Ln(s,[is,rs,os]),ui(d)}function b(T){l&&ct(s,is,T?"off":"polite")}return{mount:u,disable:b,destroy:x}}var pu=Object.freeze({__proto__:null,Media:bd,Direction:wd,Elements:Wd,Slides:Nd,Layout:Hd,Clones:Od,Move:zd,Controller:Bd,Arrows:Gd,Autoplay:Kd,Cover:Ud,Scroll:eu,Drag:tu,Keyboard:iu,LazyLoad:ru,Pagination:au,Sync:lu,Wheel:cu,Live:uu}),mu={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"},gu={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:Pd,i18n:mu,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function hu(e,t,n){var i=t.Slides;function o(){qt(e).on([Yn,Zt],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),dl(c)}return{mount:o,start:l,cancel:oa}}function fu(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=Ot(xn,l,"transition"),c;function u(){qt(e).bind(l,"transitionend",function(T){T.target===l&&c&&(x(),c())})}function m(T,f){var L=i.toPosition(T,!0),$=i.getPosition(),R=b(T);ln(L-$)>=1&&R>=1?n.useScroll?s.scroll(L,R,!1,f):(d("transform "+R+"ms "+n.easing),i.translate(L,!0),c=f):(i.jump(T),f())}function x(){d(""),s.cancel()}function b(T){var f=n.rewindSpeed;if(e.is(ki)&&f){var L=o.getIndex(!0),$=o.getEnd();if(L===0&&T>=$||L>=$&&T===0)return f}return n.speed}return{mount:u,start:m,cancel:x}}var yu=(function(){function e(n,i){this.event=qt(),this.Components={},this.state=vd(Ci),this.splides=[],this._o={},this._E={};var o=Gn(n)?fl(document,n):n;Qi(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,fn)||"",labelledby:bn(o,Ma)||""},gu,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,$a)))}catch{Qi(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;Qi(l.is([Ci,Qo]),"Already mounted!"),l.set(Ci),this._C=d,this._T=o||this._T||(this.is(Co)?hu:fu),this._E=i||this._E;var c=so({},pu,this._E,{Transition:this._T});return di(c,function(u,m){var x=u(s,d,s._o);d[m]=x,x.setup&&x.setup()}),di(d,function(u){u.mount&&u.mount()}),this.emit(Yn),Tn(this.root,kd),l.set(Ri),this.emit(la),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Ri)&&(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(Zt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Ci)?qt(this).on(la,this.destroy.bind(this,i)):(di(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(La),o.destroy(),i&&Wn(this.splides),s.set(Qo)),this},md(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})(),_a=yu;_a.defaults={};_a.STATES=hd;var cs=[[Yn,"onMounted"],[la,"onReady"],[_n,"onMove"],[Bi,"onMoved"],[Ta,"onClick"],[xl,"onActive"],[bl,"onInactive"],[wl,"onVisible"],[Sl,"onHidden"],[Zt,"onRefresh"],[an,"onUpdated"],[Ei,"onResize"],[dr,"onResized"],[$l,"onDrag"],[Cl,"onDragging"],[Tl,"onDragged"],[ur,"onScroll"],[hi,"onScrolled"],[La,"onDestroy"],[Ll,"onArrowsMounted"],[Il,"onArrowsUpdated"],[Rl,"onPaginationMounted"],[El,"onPaginationUpdated"],[Ia,"onNavigationMounted"],[Ra,"onAutoplayPlay"],[kl,"onAutoplayPlaying"],[Ea,"onAutoplayPause"],[ka,"onLazyLoadLoaded"]];function Na(...e){return e.filter(Boolean).join(" ")}function ir(e){return e!==null&&typeof e=="object"}function ua(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!ua(n,t[i]));if(ir(e)&&ir(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ua(e[o],t[o]))}return e===t}function vu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function xu(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 pa(e,t){const n=e;return xu(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ir(i)?n[o]=pa(ir(n[o])?n[o]:{},i):n[o]=i}),n}var bu=({children:e,className:t,...n})=>a.createElement("div",{className:Na("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),br=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 _a(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=pa({},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&&!ua(this.options,e)&&(this.splide.options=e,this.options=pa({},e));const t=this.getSlides();vu(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){cs.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:Na("splide",e),ref:this.splideRef,...this.omit(o,["options",...cs.map(s=>s[1])])},n?a.createElement(bu,null,i):i)}},wr=({children:e,className:t,...n})=>a.createElement("li",{className:Na("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 Cu="RichTextRenderer-module__link___BWeZ2",Tu={link:Cu},Lu=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))},wr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Lu(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function dn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,l,s;const{fontSize:n,lineHeight:i}=e;return{fontFamily:wr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:v.scalingValue(e.letterSpacing,t),wordSpacing:v.scalingValue(e.wordSpacing,t),fontSize:v.scalingValue(n,t),lineHeight:i!==void 0?v.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 mi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Tu.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Iu(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 Iu(e){return{...e.fontFamily&&{fontFamily:wr(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 Ru="SvgImage-module__svg___q3xE-",Eu="SvgImage-module__img___VsTm-",cl={svg:Ru,img:Eu},Mu=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},ku=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,on=({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 c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(c)}},[]),!Mu(e)||!l?r.jsx("img",{src:e,alt:"",className:at(cl.img,i),style:o}):r.jsx("span",{"data-supports-mask":l,className:at(cl.svg,i),style:{"--svg":ku(e),"--fill":t,"--hover-fill":n,...o??{}}})},Pu={"top-left":Qe.topLeftAlignment,"top-center":Qe.topCenterAlignment,"top-right":Qe.topRightAlignment,"middle-left":Qe.middleLeftAlignment,"middle-center":Qe.middleCenterAlignment,"middle-right":Qe.middleRightAlignment,"bottom-left":Qe.bottomLeftAlignment,"bottom-center":Qe.bottomCenterAlignment,"bottom-right":Qe.bottomRightAlignment};function Au({settings:e,content:t,styles:n,isEditor:i}){const[o,l]=a.useState(null),{widthSettings:s,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:m,fontSizeLineHeight:x,textAppearance:w,color:$}=n.imageCaption??{},[f,S]=a.useState(void 0),[L,M]=a.useState(null),[A,C]=a.useState(0),[J,k]=a.useState(0),{direction:U,transition:I,controls:R,pagination:T,imageCaption:y,triggers:h}=e,F=a.useRef(I.type),{x:W,y:V}=e.controls.offset,ne=X=>{o&&o.go(X)};return a.useEffect(()=>{if(!L)return;const X=new ResizeObserver(z=>{if(!o)return;const[H]=z;S({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return X.observe(L),()=>X.unobserve(L)},[L]),a.useEffect(()=>{!o||F.current===I.type||(k(X=>X+1),F.current=I.type)},[I.type]),r.jsx("div",{className:at(Qe.wrapper,{[Qe.editor]:i}),ref:M,children:r.jsxs("div",{className:Qe.sliderInner,style:{width:f?f.width:"100%",height:f?f.height:"100%",backgroundColor:I.backgroundColor&&I.type==="fade in"?I.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:at(Qe.captionBlock),children:r.jsx("div",{className:Qe.captionTextWrapper,children:t.map((X,z)=>r.jsx("div",{className:at(Qe.captionText,Pu[y.alignment],{[Qe.withPointerEvents]:z===A&&i,[Qe.active]:z===A}),style:{fontFamily:wr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:s.sizing==="auto"?"max-content":v.scalingValue(s.width,i),letterSpacing:v.scalingValue(d,i),wordSpacing:v.scalingValue(m,i),textAlign:u,fontSize:v.scalingValue(x.fontSize,i),lineHeight:v.scalingValue(x.lineHeight,i),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:$,transitionDuration:I.duration?`${Math.round(parseInt(I.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Qe.captionTextInner,style:{"--link-hover-color":y.linkHoverColor,"--link-color":y.linkColor,position:"relative",top:v.scalingValue(y.offset.y,i),left:v.scalingValue(y.offset.x,i)},children:r.jsx(mi,{content:X.imageCaption})})},z))})}),r.jsx(br,{onMove:X=>{C(X.index)},ref:l,options:{arrows:!1,speed:I.duration?parseInt(I.duration):500,autoplay:h.autoPlay!==null,...h.autoPlay!==null&&{interval:parseInt(h.autoPlay)*1e3},direction:U==="horiz"||I.type==="fade in"?"ltr":"ttb",pagination:!1,drag:h.triggersList.drag,perPage:1,width:f?f.width:"100%",height:f?f.height:"100%",type:I.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((X,z)=>r.jsx(xr,{children:r.jsx("div",{className:Qe.sliderItem,children:r.jsx("div",{className:Qe.imgWrapper,children:r.jsx("img",{className:at(Qe.sliderImage,{[Qe.contain]:X.image.objectFit==="contain",[Qe.cover]:X.image.objectFit==="cover"}),src:X.image.url,alt:X.image.name??""})})})},z))},J),R.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:at(Qe.arrow,{[Qe.arrowVertical]:U==="vert",[Qe.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{onClick:()=>{ne("-1")},className:Qe.arrowInner,style:{transform:`translate(${v.scalingValue(W,i)}, ${v.scalingValue(V*(U==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(on,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:at(Qe.arrowImg,Qe.mirror)}),!R.arrowsImgUrl&&r.jsx(dl,{color:R.color,className:at(Qe.arrowIcon,Qe.arrowImg,Qe.mirror)})]})}),r.jsx("div",{className:at(Qe.arrow,Qe.nextArrow,{[Qe.arrowVertical]:U==="vert",[Qe.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{className:Qe.arrowInner,onClick:()=>ne("+1"),style:{transform:`translate(${v.scalingValue(W*(U==="horiz"?-1:1),i)}, ${v.scalingValue(V,i)}) scale(${e.controls.scale/100}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(on,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Qe.arrowImg}),!R.arrowsImgUrl&&r.jsx(dl,{color:R.color,className:at(Qe.arrowIcon,Qe.arrowImg)})]})})]}),h.triggersList.click&&r.jsx("div",{className:Qe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),T.isActive&&r.jsx("div",{className:at(Qe.pagination,{[Qe.paginationInsideBottom]:T.position==="inside-1"&&U==="horiz",[Qe.paginationInsideTop]:T.position==="inside-2"&&U==="horiz",[Qe.paginationOutsideBottom]:T.position==="outside-1"&&U==="horiz",[Qe.paginationOutsideTop]:T.position==="outside-2"&&U==="horiz",[Qe.paginationInsideLeft]:T.position==="inside-1"&&U==="vert",[Qe.paginationInsideRight]:T.position==="inside-2"&&U==="vert",[Qe.paginationOutsideLeft]:T.position==="outside-1"&&U==="vert",[Qe.paginationOutsideRight]:T.position==="outside-2"&&U==="vert",[Qe.paginationVertical]:U==="vert"}),children:r.jsx("div",{className:Qe.paginationInner,style:{backgroundColor:T.colors[2],transform:`scale(${T.scale/100}) translate(${v.scalingValue(T.offset.x,i)}, ${v.scalingValue(T.offset.y,i)}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:t.map((X,z)=>r.jsx("button",{onClick:()=>{o&&o.go(z)},className:at(Qe.paginationItem),children:r.jsx("div",{className:at(Qe.dot,{[Qe.activeDot]:z===A}),style:{backgroundColor:z===A?T.colors[0]:T.colors[1],"--pagination-hover-color":T.hover}})},z))})})]})})}function dl({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 Fu={element:Au,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"]}},Wu="ImageRevealSlider-module__imageRevealSlider___UE5Ob",_u="ImageRevealSlider-module__image___Qjt-e",Hu="ImageRevealSlider-module__link___N-iLG",Nu="ImageRevealSlider-module__cursor___2U03d",vi={imageRevealSlider:Wu,image:_u,link:Hu,cursor:Nu};function ul(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,c=l/2,d=s/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Wr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ou(e,t,n,i){let o,l;if(t==="custom"){o=n;const s=await Wr(e);l=s.height/s.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const s=await Wr(e);l=s.height/s.width*o}else{const s=await Wr(e);o=s.width,l=s.height}return{width:o,height:l,finalWidth:`${o}px`}}function ju({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[l,s]=a.useState([]),[c,d]=a.useState(0),u=a.useRef(0),[m,x]=a.useState({x:0,y:0}),[w,$]=a.useState(1),[f,S]=a.useState("none"),L=a.useRef({x:0,y:0}),[M,A]=a.useState(!1),{sizeType:C,imageWidth:J,randomRangeImageWidth:k}=e.imageSize,{revealPosition:U,visible:I}=e.position,{cursorType:R,target:T,defaultCursorScale:y,defaultCursor:h,hoverCursorScale:F,hoverCursor:W}=e.cursor;a.useEffect(()=>{if(!i)return;const X=(_,E)=>{const q=i.getBoundingClientRect(),Y=_-q.left,ee=E-q.top;if(x({x:Y,y:ee}),R==="system"){S("none"),$(1);return}const N=Y,pe=ee,b=document.elementFromPoint(q.left+N,q.top+pe);if(b&&b.closest("a")){S("none"),$(1);return}const ye=ul(N,pe,l)||T==="area"?{img:W??"none",scale:F}:{img:h??"none",scale:y};S(ye.img),$(ye.scale)},z=_=>{_.stopPropagation(),L.current={x:_.clientX,y:_.clientY},X(_.clientX,_.clientY)},H=()=>{M&&X(L.current.x,L.current.y)};return i.addEventListener("mousemove",z),window.addEventListener("scroll",H,!0),()=>{i.removeEventListener("mousemove",z),window.removeEventListener("scroll",H,!0)}},[i,M,m,R,T,W,h,F,y,l]),a.useEffect(()=>{M||(S("none"),$(0))},[M]);const V=async(X,z,H,_={})=>{const{width:E,height:q,finalWidth:Y}=await Ou(X.image.url,C,J,k);let ee=0,N=0;U==="same"?(ee=z/2,N=H/2):(ee=_.x??Math.random()*z,N=_.y??Math.random()*H);const pe=Math.min(Math.max(ee,E/2),z-E/2),b=Math.min(Math.max(N,q/2),H-q/2);return{id:u.current++,url:X.image.url,link:X.link,name:X.image.name,x:pe,y:b,width:Y}};a.useEffect(()=>{if(!i||t.length===0)return;const X=i.getBoundingClientRect(),z=X.width,H=X.height,_=[];(async()=>{const q=t[0],Y=await V(q,z,H);_.push(Y),s(_),d(1)})()},[C,J,k,U,i]),a.useEffect(()=>{I==="last One"&&s(X=>X.length>0?[X[X.length-1]]:[])},[I]);const ne=async X=>{if(!i)return;const z=i.getBoundingClientRect(),H=X.clientX-z.left,_=X.clientY-z.top;if(T==="image"&&!ul(H,_,l))return;let E=0,q=0;U==="on Click"?(E=H,q=_):U==="same"?(E=z.width/2,q=z.height/2):(E=Math.random()*z.width,q=Math.random()*z.height);const Y=t[c],ee=await V(Y,z.width,z.height,{x:E,y:q});s(N=>I==="all"?[...N,ee]:[ee]),d(N=>N>=t.length-1?0:N+1)};return r.jsxs("div",{ref:o,onClick:ne,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),className:vi.imageRevealSlider,style:{cursor:f==="none"?"default":"none"},children:[l.map(X=>r.jsx("div",{className:vi.wrapper,style:{top:`${X.y}px`,left:`${X.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:X.width??"auto",height:"auto",cursor:f==="none"?"default":"none"},children:T==="area"&&X.link?r.jsx("a",{href:X.link,target:"_blank",className:vi.link,children:r.jsx("img",{src:X.url,alt:X.name,className:vi.image},X.id)}):r.jsx("img",{src:X.url,alt:X.name,className:vi.image},X.id)},X.id)),M&&r.jsx("div",{className:vi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${w})`,backgroundImage:`url('${f}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const zu={element:ju,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:""}]}}}},Bu="LightBox-module__hidden___9s-9x",Du="LightBox-module__heroImage___sTxNF",Vu="LightBox-module__background___rm9ml",Gu="LightBox-module__editor___4ACaY",qu="LightBox-module__contentStyle___Bgnsq",Ku="LightBox-module__imageStyle___tLIlB",Uu="LightBox-module__imgWrapper___LuFUp",Xu="LightBox-module__contain___8-yaS",Yu="LightBox-module__cover___hNvOG",Zu="LightBox-module__caption___b6L2I",Ju="LightBox-module__captionTextInner___rCGNH",Qu="LightBox-module__lightboxSplide___XFuWC",ep="LightBox-module__arrow___iz38X",tp="LightBox-module__arrowVertical___Zfz81",np="LightBox-module__nextArrow___zkAQN",ip="LightBox-module__arrowInner___p48sW",op="LightBox-module__arrowIcon___3VaFf",rp="LightBox-module__arrowImg___pNV88",ap="LightBox-module__mirror___pjeXc",lp="LightBox-module__thumbsWrapper___GB-nU",sp="LightBox-module__thumbsContainerVertical___wttk5",cp="LightBox-module__thumbsContainer___osSma",dp="LightBox-module__thumbsAlignStart___MO6tY",up="LightBox-module__thumbsAlignCenter___Q4sUx",pp="LightBox-module__thumbsAlignEnd___p4y9R",mp="LightBox-module__thumbItem___HvnF3",gp="LightBox-module__closeButton___g2khP",hp="LightBox-module__fadeIn___0m5GW",fp="LightBox-module__slideInLeft___gPYwC",yp="LightBox-module__slideInRight___S-pPp",vp="LightBox-module__slideInTop___DFdAj",bp="LightBox-module__slideInBottom___m27kZ",xp="LightBox-module__fadeOut___55qBR",wp="LightBox-module__slideOutLeft___NvU7P",Sp="LightBox-module__slideOutRight___SK7eC",$p="LightBox-module__slideOutTop___Vgg0z",Cp="LightBox-module__slideOutBottom___nJ0Ef",Tp="LightBox-module__scaleSlide___vZriG",je={hidden:Bu,heroImage:Du,background:Vu,editor:Gu,contentStyle:qu,imageStyle:Ku,imgWrapper:Uu,contain:Xu,cover:Yu,caption:Zu,captionTextInner:Ju,lightboxSplide:Qu,arrow:ep,arrowVertical:tp,nextArrow:np,arrowInner:ip,arrowIcon:op,arrowImg:rp,mirror:ap,thumbsWrapper:lp,thumbsContainerVertical:sp,thumbsContainer:cp,thumbsAlignStart:dp,thumbsAlignCenter:up,thumbsAlignEnd:pp,thumbItem:mp,closeButton:gp,fadeIn:hp,slideInLeft:fp,slideInRight:yp,slideInTop:vp,slideInBottom:bp,fadeOut:xp,slideOutLeft:wp,slideOutRight:Sp,slideOutTop:$p,slideOutBottom:Cp,scaleSlide:Tp},ko=(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% + ${v.scalingValue(t.x,n)}), calc(-50% + ${v.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${v.scalingValue(t.x,n)}, calc(-50% + ${v.scalingValue(t.y,n)}))`:l==="center"?i.transform=`translate(calc(-50% + ${v.scalingValue(t.x,n)}), ${v.scalingValue(t.y,n)})`:i.transform=`translate(${v.scalingValue(t.x,n)}, ${v.scalingValue(t.y,n)})`,i};function Ks(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 Lp(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Us(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,l=n/i;if(l>o){const c=e;return{renderedW:c,renderedH:c/l}}const s=t;return{renderedW:s*l,renderedH:s}}function Ip(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,l=n/i;if(l>o){const c=t;return{renderedW:c*l,renderedH:c}}const s=e;return{renderedW:s,renderedH:s/l}}function Xs(e,t,n,i,o){const{x:l,y:s}=Lp(o);return{offsetX:l*(e-n),offsetY:s*(t-i)}}function Rp(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,l=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:s,objectPosition:c}=window.getComputedStyle(e),d=s==="cover"?Ip:Us,{renderedW:u,renderedH:m}=d(n,i,o,l),{offsetX:x,offsetY:w}=Xs(n,i,u,m,c),$=(x+u/2)/n*100,f=(w+m/2)/i*100;return`${$}% ${f}%`}function Ep(e){return Rp(e)}function ir(e){const t=e.getBoundingClientRect(),n=Ks(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,{renderedW:c,renderedH:d}=Us(i,o,l,s),u=window.getComputedStyle(e).objectPosition,{offsetX:m,offsetY:x}=Xs(i,o,c,d,u),w=t.left+n.left,$=t.top+n.top;return{x:m+w,y:x+$,width:c,height:d}}function pl(e){const t=e.getBoundingClientRect(),n=Ks(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ml(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 Mp(e,t){const n=(()=>{if(e==="fade in")return je.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return je.slideInLeft;case"right":return je.slideInRight;case"top":return je.slideInTop;case"bottom":return je.slideInBottom;default:return je.slideInRight}return je.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return je.fadeIn;if(e==="slide in")switch(t){case"left":return je.slideInLeft;case"right":return je.slideInRight;case"top":return je.slideInTop;case"bottom":return je.slideInBottom;default:return je.slideInRight}return je.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return je.fadeOut;if(e==="slide in")switch(t){case"left":return je.slideOutLeft;case"right":return je.slideOutRight;case"top":return je.slideOutTop;case"bottom":return je.slideOutBottom;default:return je.slideOutRight}return je.fadeOut})(),l=(()=>{if(e==="fade in")return je.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return je.slideOutLeft;case"right":return je.slideOutRight;case"top":return je.slideOutTop;case"bottom":return je.slideOutBottom;default:return je.slideOutRight}return je.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:l}}const kp=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:l,isPreviewMode:s})=>{const[c,d]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:je.heroImage,onClick:()=>d(!0)}),r.jsx(Pp,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:l})]})},Pp=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:l,isEditor:s,metadata:c})=>{var Se;const{widthSettings:d,fontSettings:u,letterSpacing:m,textAlign:x,wordSpacing:w,fontSizeLineHeight:$,textAppearance:f,color:S}=i.imageCaption??{},[L,M]=a.useState(0),[A,C]=a.useState(0),[J,k]=a.useState(!1),[U,I]=a.useState(!1),[R,T]=a.useState({}),y=a.useRef(null),h=a.useRef(null),F=a.useRef(null),W=a.useRef(!1),V=a.useRef(null),ne=a.useRef(null),X=a.useRef(null),z=a.useRef(null),H=a.useRef(!1),_=a.useRef(null),[E,q]=a.useState(!1),{appear:Y,triggers:ee,slider:N,thumbnail:pe,controls:b,area:ye,caption:Q,layout:xe}=o.lightboxBlock,{appearClass:$e,backdropAppearClass:oe,backdropDisappearClass:ie,disappearClass:B}=Mp(Y.type,Y.direction),le=(c==null?void 0:c.itemId)??null;a.useEffect(()=>{const G=()=>{setTimeout(()=>{var D,K;(K=(D=y.current)==null?void 0:D.splide)==null||K.refresh()},16)},me=()=>{C(D=>D+1)};return window.addEventListener("ArticleEditor.Layout:change",G),window.addEventListener("ArticleEditor.ComponentContent:change",me),()=>{window.removeEventListener("ArticleEditor.Layout:change",G),window.removeEventListener("ArticleEditor.ComponentContent:change",me)}},[]),a.useEffect(()=>{if(!e||!pe.isActive){q(!1);return}const G=_.current;if(!G)return;const me=()=>{N.direction==="horiz"?q(G.scrollWidth>G.clientWidth):q(G.scrollHeight>G.clientHeight)};me();const D=new ResizeObserver(me);return D.observe(G),()=>D.disconnect()},[e,pe.isActive,n.length,R,N.direction]);const re=a.useCallback(()=>{const G=window.matchMedia("(max-width: 768px)").matches,me=ml(ye.color);G&&!s&&me>.9&&(document.body.style.backgroundColor=""),k(!0),W.current=!0;const D=K=>{K.target===V.current&&K.animationName&&(V.current&&ne.current&&V.current.removeEventListener("animationend",ne.current),ne.current=null,W.current&&(W.current=!1,t()),k(!1))};V.current&&(ne.current=D,V.current.addEventListener("animationend",D))},[t,ye.color,s]),ke=(G,me,D)=>{var K,ae;if(G){if(ee.type==="click"&&ee.switch==="image")ee.repeat==="close"&&L===n.length-1?re():(K=y.current)==null||K.go("+1");else if(ee.type==="click"&&ee.switch==="50/50"){const ge=G.getBoundingClientRect(),ce=me-ge.left,be=D-ge.top,Ee=ge.width,Z=ge.height;let de;N.direction==="horiz"?de=ce<Ee/2?"-1":"+1":de=be<Z/2?"-1":"+1",(ae=y.current)==null||ae.go(de)}}},fe=G=>{if(H.current){H.current=!1;return}const me=n[L],D=(me==null?void 0:me.image.objectFit)==="cover";let K,ae;if("changedTouches"in G&&G.changedTouches.length>0)K=G.changedTouches[0].clientX,ae=G.changedTouches[0].clientY;else if("clientX"in G)K=G.clientX,ae=G.clientY;else return;let ge;if(D&&F.current){const ce=pl(F.current);ge=K>=ce.left&&K<=ce.right&&ae>=ce.top&&ae<=ce.bottom}else{const ce=F.current?ir(F.current):null;if(!ce){G.target===G.currentTarget&&re();return}ge=K>=ce.x&&K<=ce.x+ce.width&&ae>=ce.y&&ae<=ce.y+ce.height}ge?ke(F.current,K,ae):re()},Pe=G=>{const me=G.target;(me.classList.contains(je.thumbsWrapper)||me.classList.contains(je.thumbsContainer))&&fe(G)};a.useEffect(()=>{if(!e)return;const G=me=>{var D,K;if(me.key==="Escape"){re();return}if(me.key==="ArrowRight"){M(ae=>(ae+1)%Math.max(n.length,1)),(D=y.current)==null||D.go("+1");return}me.key==="ArrowLeft"&&(M(ae=>(ae-1+Math.max(n.length,1))%Math.max(n.length,1)),(K=y.current)==null||K.go("-1"))};return window.addEventListener("keydown",G),()=>{window.removeEventListener("keydown",G)}},[e,re,n.length]),a.useEffect(()=>{if(e){if(M(0),C(me=>me+1),W.current=!1,k(!1),I(!1),T({}),!le)return;const G=new CustomEvent("page-overlay",{detail:{itemId:le}});window.dispatchEvent(G)}return()=>{V.current&&ne.current&&(V.current.removeEventListener("animationend",ne.current),ne.current=null),I(!1)}},[e,le]),a.useEffect(()=>{h.current!==null&&h.current!==N.type&&C(G=>G+1),h.current=N.type},[N.type]),a.useEffect(()=>{if(!e)return;const G=document.body.style.overflow,me=window.matchMedia("(max-width: 768px)").matches,D=ml(ye.color);document.body.style.overflow="hidden",I(!1);const K=ge=>{ge.target===V.current&&!W.current&&ge.animationName&&(me&&!s&&D>.9&&(document.body.style.backgroundColor=ye.color),I(!0),V.current&&X.current&&V.current.removeEventListener("animationend",X.current),X.current=null)};V.current&&(X.current=K,V.current.addEventListener("animationend",K));const ae=ge=>{const ce=ge.target;ce&&(ce.closest(`.${je.thumbsWrapper}`)||ce.closest(`.${je.thumbsContainer}`))||N.type!=="slide"&&ge.preventDefault()};return document.addEventListener("touchmove",ae,{passive:!1}),()=>{document.body.style.overflow=G,document.removeEventListener("touchmove",ae),V.current&&X.current&&(V.current.removeEventListener("animationend",X.current),X.current=null),I(!1)}},[e,s,ye.color,N.type]),a.useEffect(()=>{if(!e)return;const G=me=>{var K,ae;if(W.current){me.stopPropagation();return}if(H.current){H.current=!1;return}const D=me.target;if(!(D&&(D.closest(`.${je.thumbsContainer}`)||D.closest(`.${je.thumbItem}`)||D.closest(`.${je.arrow}`)||D.closest(`.${je.closeButton}`)||D.closest(`.${je.caption}`)))){if(N.type==="slide"&&ee.type==="drag"&&((ae=(K=y.current)==null?void 0:K.splide)!=null&&ae.root)){const ge=y.current.splide.root;if(D&&(ge.contains(D)||ge===D))return}if(me.touches.length===0&&me.changedTouches.length>0){const ge=n[L],ce=(ge==null?void 0:ge.image.objectFit)==="cover",be=me.changedTouches[0];let Ee;if(ce&&F.current){const Z=pl(F.current);Ee=be.clientX>=Z.left&&be.clientX<=Z.right&&be.clientY>=Z.top&&be.clientY<=Z.bottom}else{const Z=F.current?ir(F.current):null;if(!Z)return;Ee=be.clientX>=Z.x&&be.clientX<=Z.x+Z.width&&be.clientY>=Z.y&&be.clientY<=Z.y+Z.height}if(!Ee){me.stopPropagation(),W.current=!0;const Z=de=>{de.stopPropagation(),de.preventDefault(),document.removeEventListener("click",Z,!0)};document.addEventListener("click",Z,!0),re()}}}};return document.addEventListener("touchend",G,{passive:!0}),()=>{document.removeEventListener("touchend",G)}},[e,re,L,n]);const ve=(N.type==="scale"||N.type==="fade")&&N.direction==="vert"&&ee.type==="drag";a.useEffect(()=>{var de,We;if(!e||!ve||!((We=(de=y.current)==null?void 0:de.splide)!=null&&We.root))return;const G=y.current.splide.root,me=30,D=(se,O)=>{if(z.current){const Oe=Math.abs(se-z.current.x),_e=Math.abs(O-z.current.y);(Oe>0||_e>0)&&(H.current=!0)}},K=se=>{z.current&&(se.preventDefault(),D(se.clientX,se.clientY))},ae=se=>{z.current&&se.touches.length>0&&(se.preventDefault(),D(se.touches[0].clientX,se.touches[0].clientY))},ge=(se,O)=>{if(!z.current||!y.current){z.current=null;return}const Oe=Math.abs(se-z.current.x),_e=Math.abs(O-z.current.y);_e>me&&_e>Oe&&y.current.go(O<z.current.y?"+1":"-1"),z.current=null},ce=se=>{z.current&&ge(se.clientX,se.clientY),document.removeEventListener("pointerup",ce),document.removeEventListener("pointercancel",ce),document.removeEventListener("pointermove",K)},be=se=>{if(z.current){if(se.changedTouches.length>0){const O=se.changedTouches[0];ge(O.clientX,O.clientY)}document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),document.removeEventListener("touchmove",ae)}},Ee=se=>{z.current={x:se.clientX,y:se.clientY},H.current=!1,document.addEventListener("pointermove",K,{passive:!1}),document.addEventListener("pointerup",ce),document.addEventListener("pointercancel",ce)},Z=se=>{se.touches.length>0&&(z.current={x:se.touches[0].clientX,y:se.touches[0].clientY},H.current=!1,document.addEventListener("touchmove",ae,{passive:!1}),document.addEventListener("touchend",be),document.addEventListener("touchcancel",be))};return G.addEventListener("pointerdown",Ee),G.addEventListener("touchstart",Z),()=>{G.removeEventListener("pointerdown",Ee),G.removeEventListener("touchstart",Z),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ce),document.removeEventListener("pointercancel",ce),document.removeEventListener("touchmove",ae),document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),z.current=null,H.current=!1}},[e,ve,A]);const we={backgroundColor:ye.color,backdropFilter:`blur(${ye.blur}px)`,animationDuration:`${parseInt(Y.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:gi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:s?null:V,className:at(je.background,J?ie:oe,{[je.editor]:s},{[je.hidden]:!e}),style:{...we,...U&&!s&&!J?{position:"absolute"}:{}}}),r.jsxs("div",{ref:s?V:null,className:at(je.contentStyle,J?B:$e,{[je.editor]:s},{[je.hidden]:!e}),style:{animationDuration:`${parseInt(Y.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(br,{onMove:G=>M(G.index),ref:y,className:je.lightboxSplide,options:{arrows:!1,speed:N.duration?parseInt(N.duration):500,direction:N.direction==="horiz"||N.type==="fade"||N.type==="scale"?"ltr":"ttb",pagination:!1,drag:ee.type==="drag"&&!ve,perPage:1,width:"100%",height:"100%",type:N.type==="fade"||N.type==="scale"?"fade":"loop",padding:0,rewind:ee.repeat!=="close",start:0},style:{"--splide-speed":N.duration},children:n.map((G,me)=>{const D=ko(xe.position,xe.offset,s),K=`${v.scalingValue(xe.padding.top,s)} ${v.scalingValue(xe.padding.right,s)} ${v.scalingValue(xe.padding.bottom,s)} ${v.scalingValue(xe.padding.left,s)}`,ae=N.type==="scale"?(()=>{const{transform:ge,...ce}=D;return{...ce,position:"absolute",padding:K,boxSizing:"border-box","--position-transform":ge||"none"}})():{...D,position:"absolute",padding:K,boxSizing:"border-box"};return r.jsx(xr,{children:r.jsx("div",{className:je.imgWrapper,onClick:fe,children:r.jsx("img",{ref:me===L?F:null,className:at(je.imageStyle,{[je.contain]:G.image.objectFit==="contain",[je.cover]:G.image.objectFit==="cover",[je.scaleSlide]:N.type==="scale"}),src:G.image.url,alt:G.image.name??"",style:{...ae,pointerEvents:G.image.objectFit==="contain"?"none":"auto"}})})},me)})},A),b.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:at(je.arrow,{[je.arrowVertical]:N.direction==="vert"}),style:{color:b.color,"--arrow-hover-color":b.hover},children:r.jsxs("button",{className:je.arrowInner,style:{transform:`translate(${v.scalingValue(b.offset.x,s)}, ${v.scalingValue(b.offset.y*(N.direction==="horiz"?1:-1),s)}) scale(${b.scale}) rotate(${N.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var G;return(G=y.current)==null?void 0:G.go("-1")},"aria-label":"Previous",children:[b.arrowsImgUrl&&r.jsx(on,{url:b.arrowsImgUrl,fill:b.color,hoverFill:b.hover,className:at(je.arrowImg,je.mirror)}),!b.arrowsImgUrl&&r.jsx(gl,{color:b.color,className:at(je.arrowIcon,je.arrowImg,je.mirror)})]})}),r.jsx("div",{className:at(je.arrow,je.nextArrow,{[je.arrowVertical]:N.direction==="vert"}),style:{color:b.color,"--arrow-hover-color":b.hover},children:r.jsxs("button",{className:je.arrowInner,style:{transform:`translate(${v.scalingValue(b.offset.x*(N.direction==="horiz"?-1:1),s)}, ${v.scalingValue(b.offset.y,s)}) scale(${b.scale}) rotate(${N.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var G;return(G=y.current)==null?void 0:G.go("+1")},"aria-label":"Next",children:[b.arrowsImgUrl&&r.jsx(on,{url:b.arrowsImgUrl,fill:b.color,hoverFill:b.hover,className:je.arrowImg}),!b.arrowsImgUrl&&r.jsx(gl,{color:b.color,className:at(je.arrowIcon,je.arrowImg)})]})})]}),ye.closeIconUrl&&(()=>{const G=ko(ye.closeIconAlign,ye.closeIconOffset,s),me=`scale(${ye.closeIconScale})`,D=G.transform?`${G.transform} ${me}`:me;return r.jsx("button",{className:je.closeButton,style:{...G,transform:D},onClick:re,"aria-label":"Close lightbox",children:r.jsx(on,{url:ye.closeIconUrl,fill:ye.closeIconColor??"#000000",hoverFill:ye.closeIconHover??"#cccccc"})})})(),Q&&Q.isActive&&i.imageCaption&&((Se=n[L])==null?void 0:Se.imageCaption)&&r.jsx("div",{className:je.caption,style:{...ko(Q.alignment,Q.offset,s),fontFamily:wr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":v.scalingValue(d.width,s),letterSpacing:v.scalingValue(m,s),wordSpacing:v.scalingValue(w,s),textAlign:x,fontSize:v.scalingValue($.fontSize,s),lineHeight:v.scalingValue($.lineHeight,s),textTransform:f.textTransform??"none",textDecoration:f.textDecoration??"none",fontVariant:f.fontVariant??"normal",color:S},onClick:G=>G.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:je.captionTextInner,style:{"--link-color":Q.linkColor,"--link-hover-color":Q.linkHoverColor},children:r.jsx(mi,{content:n[L].imageCaption})})}),pe.isActive&&(()=>{const[G,me]=pe.position.split("-"),D=N.direction==="horiz"?`${G}-left`:pe.position,K=ko(D,pe.offset,s),ae=()=>{if(N.direction==="horiz"){if(me==="left")return"flex-start";if(me==="center")return"center";if(me==="right")return"flex-end"}else{if(G==="top")return"flex-start";if(G==="middle")return"center";if(G==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:_,className:je.thumbsWrapper,onClick:ge=>Pe(ge),style:{position:s?"absolute":"fixed",...K,...N.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:at(je.thumbsContainer,{[je.thumbsContainerVertical]:N.direction==="vert",[je.thumbsAlignStart]:pe.align==="start",[je.thumbsAlignCenter]:pe.align==="center",[je.thumbsAlignEnd]:pe.align==="end"}),style:{gap:v.scalingValue(pe.grid.gap,s),justifyContent:E?"flex-start":ae()},children:n.map((ge,ce)=>{const be=ce===L,Ee=R[ce],de=pe.grid.size*(be?pe.activeState.scale:1),We=()=>{if(pe.fit!=="fit")return{};if(!Ee)return N.direction==="horiz"?{height:v.scalingValue(de,s)}:{width:v.scalingValue(de,s)};const se=Ee.width/Ee.height;if(N.direction==="horiz"){const O=de,Oe=O*se;return{width:v.scalingValue(Oe,s),height:v.scalingValue(O,s)}}else{const O=de,Oe=O/se;return{width:v.scalingValue(O,s),height:v.scalingValue(Oe,s)}}};return r.jsx("button",{className:je.thumbItem,style:{...N.direction==="horiz"&&pe.fit!=="fit"?{height:v.scalingValue(de,s)}:{},...N.direction==="vert"&&pe.fit!=="fit"?{width:v.scalingValue(de,s)}:{},...pe.fit==="cover"?{width:v.scalingValue(de,s),height:v.scalingValue(de,s)}:{},...We(),transition:be?"all 0.25s ease-out":"none",opacity:be?pe.activeState.opacity/100:pe.opacity/100,"--thumb-hover":pe.activeState.opacity/100},onClick:se=>{var O;se.stopPropagation(),M(ce),(O=y.current)==null||O.go(ce)},onMouseEnter:()=>{var se;pe.triggers==="hov"&&((se=y.current)==null||se.go(ce))},children:r.jsx("img",{src:ge.image.url,alt:ge.image.name??"",onLoad:se=>{const O=se.currentTarget;O.naturalWidth&&O.naturalHeight&&T(Oe=>({...Oe,[ce]:{width:O.naturalWidth,height:O.naturalHeight}}))},style:{objectFit:pe.fit==="cover"?"cover":"contain",...pe.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...pe.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ge.image.name}-${ce}`)})})})})()]})]}),document.getElementById(l))};function gl({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 Ap={element:kp,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 Po(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fp(e){return`
6
+ */const wu="RichTextRenderer-module__link___BWeZ2",Su={link:wu},$u=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=>$u(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function dn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Sr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:i!==void 0?y.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 mi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Su.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Cu(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 Cu(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 Tu="SvgImage-module__svg___q3xE-",Lu="SvgImage-module__img___VsTm-",ds={svg:Tu,img:Lu},Iu=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Ru=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,rn=({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)}},[]),!Iu(e)||!s?r.jsx("img",{src:e,alt:"",className:nt(ds.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:nt(ds.svg,i),style:{"--svg":Ru(e),"--fill":t,"--hover-fill":n,...o??{}}})},Eu={"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 ku({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:x,textAppearance:b,color:T}=n.imageCaption??{},[f,L]=a.useState(void 0),[$,R]=a.useState(null),[P,C]=a.useState(0),[X,E]=a.useState(0),{direction:B,transition:I,controls:w,pagination:W,imageCaption:h,triggers:S}=e,k=a.useRef(I.type),{x:D,y:U}=e.controls.offset,ae=Y=>{o&&o.go(Y)};return a.useEffect(()=>{if(!$)return;const Y=new ResizeObserver(G=>{if(!o)return;const[H]=G;L({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return Y.observe($),()=>Y.unobserve($)},[$]),a.useEffect(()=>{!o||k.current===I.type||(E(Y=>Y+1),k.current=I.type)},[I.type]),r.jsx("div",{className:nt(Xe.wrapper,{[Xe.editor]:i}),ref:R,children:r.jsxs("div",{className:Xe.sliderInner,style:{width:f?f.width:"100%",height:f?f.height:"100%",backgroundColor:I.backgroundColor&&I.type==="fade in"?I.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:nt(Xe.captionBlock),children:r.jsx("div",{className:Xe.captionTextWrapper,children:t.map((Y,G)=>r.jsx("div",{className:nt(Xe.captionText,Eu[h.alignment],{[Xe.withPointerEvents]:G===P&&i,[Xe.active]:G===P}),style:{fontFamily:Sr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":y.scalingValue(l.width,i),letterSpacing:y.scalingValue(c,i),wordSpacing:y.scalingValue(m,i),textAlign:u,fontSize:y.scalingValue(x.fontSize,i),lineHeight:y.scalingValue(x.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:T,transitionDuration:I.duration?`${Math.round(parseInt(I.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:y.scalingValue(h.offset.y,i),left:y.scalingValue(h.offset.x,i)},children:r.jsx(mi,{content:Y.imageCaption})})},G))})}),r.jsx(br,{onMove:Y=>{C(Y.index)},ref:s,options:{arrows:!1,speed:I.duration?parseInt(I.duration):500,autoplay:S.autoPlay!==null,...S.autoPlay!==null&&{interval:parseInt(S.autoPlay)*1e3},direction:B==="horiz"||I.type==="fade in"?"ltr":"ttb",pagination:!1,drag:S.triggersList.drag,perPage:1,width:f?f.width:"100%",height:f?f.height:"100%",type:I.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((Y,G)=>r.jsx(wr,{children:r.jsx("div",{className:Xe.sliderItem,children:r.jsx("div",{className:Xe.imgWrapper,children:r.jsx("img",{className:nt(Xe.sliderImage,{[Xe.contain]:Y.image.objectFit==="contain",[Xe.cover]:Y.image.objectFit==="cover"}),src:Y.image.url,alt:Y.image.name??""})})})},G))},X),w.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(Xe.arrow,{[Xe.arrowVertical]:B==="vert",[Xe.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:r.jsxs("button",{onClick:()=>{ae("-1")},className:Xe.arrowInner,style:{transform:`translate(${y.scalingValue(D,i)}, ${y.scalingValue(U*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&r.jsx(rn,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:nt(Xe.arrowImg,Xe.mirror)}),!w.arrowsImgUrl&&r.jsx(us,{color:w.color,className:nt(Xe.arrowIcon,Xe.arrowImg,Xe.mirror)})]})}),r.jsx("div",{className:nt(Xe.arrow,Xe.nextArrow,{[Xe.arrowVertical]:B==="vert",[Xe.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:r.jsxs("button",{className:Xe.arrowInner,onClick:()=>ae("+1"),style:{transform:`translate(${y.scalingValue(D*(B==="horiz"?-1:1),i)}, ${y.scalingValue(U,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&r.jsx(rn,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:Xe.arrowImg}),!w.arrowsImgUrl&&r.jsx(us,{color:w.color,className:nt(Xe.arrowIcon,Xe.arrowImg)})]})})]}),S.triggersList.click&&r.jsx("div",{className:Xe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),W.isActive&&r.jsx("div",{className:nt(Xe.pagination,{[Xe.paginationInsideBottom]:W.position==="inside-1"&&B==="horiz",[Xe.paginationInsideTop]:W.position==="inside-2"&&B==="horiz",[Xe.paginationOutsideBottom]:W.position==="outside-1"&&B==="horiz",[Xe.paginationOutsideTop]:W.position==="outside-2"&&B==="horiz",[Xe.paginationInsideLeft]:W.position==="inside-1"&&B==="vert",[Xe.paginationInsideRight]:W.position==="inside-2"&&B==="vert",[Xe.paginationOutsideLeft]:W.position==="outside-1"&&B==="vert",[Xe.paginationOutsideRight]:W.position==="outside-2"&&B==="vert",[Xe.paginationVertical]:B==="vert"}),children:r.jsx("div",{className:Xe.paginationInner,style:{backgroundColor:W.colors[2],transform:`scale(${W.scale/100}) translate(${y.scalingValue(W.offset.x,i)}, ${y.scalingValue(W.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((Y,G)=>r.jsx("button",{onClick:()=>{o&&o.go(G)},className:nt(Xe.paginationItem),children:r.jsx("div",{className:nt(Xe.dot,{[Xe.activeDot]:G===P}),style:{backgroundColor:G===P?W.colors[0]:W.colors[1],"--pagination-hover-color":W.hover}})},G))})})]})})}function us({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 Mu={element:ku,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"]}},Pu="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Au="ImageRevealSlider-module__image___Qjt-e",Fu="ImageRevealSlider-module__link___N-iLG",Wu="ImageRevealSlider-module__cursor___2U03d",vi={imageRevealSlider:Pu,image:Au,link:Fu,cursor:Wu};function ps(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 _r(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function _u(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await _r(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await _r(e);s=l.height/l.width*o}else{const l=await _r(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function Nu({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,x]=a.useState({x:0,y:0}),[b,T]=a.useState(1),[f,L]=a.useState("none"),$=a.useRef({x:0,y:0}),[R,P]=a.useState(!1),{sizeType:C,imageWidth:X,randomRangeImageWidth:E}=e.imageSize,{revealPosition:B,visible:I}=e.position,{cursorType:w,target:W,defaultCursorScale:h,defaultCursor:S,hoverCursorScale:k,hoverCursor:D}=e.cursor;a.useEffect(()=>{if(!i)return;const Y=(F,A)=>{const K=i.getBoundingClientRect(),q=F-K.left,ee=A-K.top;if(x({x:q,y:ee}),w==="system"){L("none"),T(1);return}const N=q,ue=ee,v=document.elementFromPoint(K.left+N,K.top+ue);if(v&&v.closest("a")){L("none"),T(1);return}const ye=ps(N,ue,s)||W==="area"?{img:D??"none",scale:k}:{img:S??"none",scale:h};L(ye.img),T(ye.scale)},G=F=>{F.stopPropagation(),$.current={x:F.clientX,y:F.clientY},Y(F.clientX,F.clientY)},H=()=>{R&&Y($.current.x,$.current.y)};return i.addEventListener("mousemove",G),window.addEventListener("scroll",H,!0),()=>{i.removeEventListener("mousemove",G),window.removeEventListener("scroll",H,!0)}},[i,R,m,w,W,D,S,k,h,s]),a.useEffect(()=>{R||(L("none"),T(0))},[R]);const U=async(Y,G,H,F={})=>{const{width:A,height:K,finalWidth:q}=await _u(Y.image.url,C,X,E);let ee=0,N=0;B==="same"?(ee=G/2,N=H/2):(ee=F.x??Math.random()*G,N=F.y??Math.random()*H);const ue=Math.min(Math.max(ee,A/2),G-A/2),v=Math.min(Math.max(N,K/2),H-K/2);return{id:u.current++,url:Y.image.url,link:Y.link,name:Y.image.name,x:ue,y:v,width:q}};a.useEffect(()=>{if(!i||t.length===0)return;const Y=i.getBoundingClientRect(),G=Y.width,H=Y.height,F=[];(async()=>{const K=t[0],q=await U(K,G,H);F.push(q),l(F),c(1)})()},[C,X,E,B,i]),a.useEffect(()=>{I==="last One"&&l(Y=>Y.length>0?[Y[Y.length-1]]:[])},[I]);const ae=async Y=>{if(!i)return;const G=i.getBoundingClientRect(),H=Y.clientX-G.left,F=Y.clientY-G.top;if(W==="image"&&!ps(H,F,s))return;let A=0,K=0;B==="on Click"?(A=H,K=F):B==="same"?(A=G.width/2,K=G.height/2):(A=Math.random()*G.width,K=Math.random()*G.height);const q=t[d],ee=await U(q,G.width,G.height,{x:A,y:K});l(N=>I==="all"?[...N,ee]:[ee]),c(N=>N>=t.length-1?0:N+1)};return r.jsxs("div",{ref:o,onClick:ae,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),className:vi.imageRevealSlider,style:{cursor:f==="none"?"default":"none"},children:[s.map(Y=>r.jsx("div",{className:vi.wrapper,style:{top:`${Y.y}px`,left:`${Y.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:Y.width??"auto",height:"auto",cursor:f==="none"?"default":"none"},children:W==="area"&&Y.link?r.jsx("a",{href:Y.link,target:"_blank",className:vi.link,children:r.jsx("img",{src:Y.url,alt:Y.name,className:vi.image},Y.id)}):r.jsx("img",{src:Y.url,alt:Y.name,className:vi.image},Y.id)},Y.id)),R&&r.jsx("div",{className:vi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${f}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Hu={element:Nu,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:""}]}}}},ju="LightBox-module__hidden___9s-9x",Ou="LightBox-module__heroImage___sTxNF",zu="LightBox-module__background___rm9ml",Bu="LightBox-module__editor___4ACaY",Du="LightBox-module__contentStyle___Bgnsq",Vu="LightBox-module__imageStyle___tLIlB",Gu="LightBox-module__imgWrapper___LuFUp",qu="LightBox-module__contain___8-yaS",Ku="LightBox-module__cover___hNvOG",Uu="LightBox-module__caption___b6L2I",Xu="LightBox-module__captionTextInner___rCGNH",Yu="LightBox-module__lightboxSplide___XFuWC",Zu="LightBox-module__arrow___iz38X",Ju="LightBox-module__arrowVertical___Zfz81",Qu="LightBox-module__nextArrow___zkAQN",ep="LightBox-module__arrowInner___p48sW",tp="LightBox-module__arrowIcon___3VaFf",np="LightBox-module__arrowImg___pNV88",ip="LightBox-module__mirror___pjeXc",op="LightBox-module__thumbsWrapper___GB-nU",rp="LightBox-module__thumbsContainerVertical___wttk5",ap="LightBox-module__thumbsContainer___osSma",sp="LightBox-module__thumbsAlignStart___MO6tY",lp="LightBox-module__thumbsAlignCenter___Q4sUx",cp="LightBox-module__thumbsAlignEnd___p4y9R",dp="LightBox-module__thumbItem___HvnF3",up="LightBox-module__closeButton___g2khP",pp="LightBox-module__fadeIn___0m5GW",mp="LightBox-module__slideInLeft___gPYwC",gp="LightBox-module__slideInRight___S-pPp",hp="LightBox-module__slideInTop___DFdAj",fp="LightBox-module__slideInBottom___m27kZ",yp="LightBox-module__fadeOut___55qBR",vp="LightBox-module__slideOutLeft___NvU7P",xp="LightBox-module__slideOutRight___SK7eC",bp="LightBox-module__slideOutTop___Vgg0z",wp="LightBox-module__slideOutBottom___nJ0Ef",Sp="LightBox-module__scaleSlide___vZriG",Fe={hidden:ju,heroImage:Ou,background:zu,editor:Bu,contentStyle:Du,imageStyle:Vu,imgWrapper:Gu,contain:qu,cover:Ku,caption:Uu,captionTextInner:Xu,lightboxSplide:Yu,arrow:Zu,arrowVertical:Ju,nextArrow:Qu,arrowInner:ep,arrowIcon:tp,arrowImg:np,mirror:ip,thumbsWrapper:op,thumbsContainerVertical:rp,thumbsContainer:ap,thumbsAlignStart:sp,thumbsAlignCenter:lp,thumbsAlignEnd:cp,thumbItem:dp,closeButton:up,fadeIn:pp,slideInLeft:mp,slideInRight:gp,slideInTop:hp,slideInBottom:fp,fadeOut:yp,slideOutLeft:vp,slideOutRight:xp,slideOutTop:bp,slideOutBottom:wp,scaleSlide:Sp},Mo=(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% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:i.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,i};function ql(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 or(e){const t=e.getBoundingClientRect(),n=ql(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 x=t.left+n.left,b=t.top+n.top,T=(i-u)/2+x,f=(o-m)/2+b;return{x:T,y:f,width:u,height:m}}function ms(e){const t=e.getBoundingClientRect(),n=ql(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function gs(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 $p(e,t){const n=(()=>{if(e==="fade in")return Fe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Fe.slideInLeft;case"right":return Fe.slideInRight;case"top":return Fe.slideInTop;case"bottom":return Fe.slideInBottom;default:return Fe.slideInRight}return Fe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Fe.fadeIn;if(e==="slide in")switch(t){case"left":return Fe.slideInLeft;case"right":return Fe.slideInRight;case"top":return Fe.slideInTop;case"bottom":return Fe.slideInBottom;default:return Fe.slideInRight}return Fe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Fe.fadeOut;if(e==="slide in")switch(t){case"left":return Fe.slideOutLeft;case"right":return Fe.slideOutRight;case"top":return Fe.slideOutTop;case"bottom":return Fe.slideOutBottom;default:return Fe.slideOutRight}return Fe.fadeOut})(),s=(()=>{if(e==="fade in")return Fe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Fe.slideOutLeft;case"right":return Fe.slideOutRight;case"top":return Fe.slideOutTop;case"bottom":return Fe.slideOutBottom;default:return Fe.slideOutRight}return Fe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const Cp=({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:Fe.heroImage,onClick:()=>c(!0)}),r.jsx(Tp,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Tp=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var xe;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:x,wordSpacing:b,fontSizeLineHeight:T,textAppearance:f,color:L}=i.imageCaption??{},[$,R]=a.useState(0),[P,C]=a.useState(0),[X,E]=a.useState(!1),[B,I]=a.useState(!1),[w,W]=a.useState({}),h=a.useRef(null),S=a.useRef(null),k=a.useRef(null),D=a.useRef(!1),U=a.useRef(null),ae=a.useRef(null),Y=a.useRef(null),G=a.useRef(null),H=a.useRef(!1),F=a.useRef(null),[A,K]=a.useState(!1),{appear:q,triggers:ee,slider:N,thumbnail:ue,controls:v,area:ye,caption:Z,layout:ce}=o.lightboxBlock,{appearClass:$e,backdropAppearClass:ne,backdropDisappearClass:ve,disappearClass:J}=$p(q.type,q.direction),pe=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const O=()=>{setTimeout(()=>{var fe,Se;(Se=(fe=h.current)==null?void 0:fe.splide)==null||Se.refresh()},16)},se=()=>{C(fe=>fe+1)};return window.addEventListener("ArticleEditor.Layout:change",O),window.addEventListener("ArticleEditor.ComponentContent:change",se),()=>{window.removeEventListener("ArticleEditor.Layout:change",O),window.removeEventListener("ArticleEditor.ComponentContent:change",se)}},[]),a.useEffect(()=>{if(!e||!ue.isActive){K(!1);return}const O=F.current;if(!O)return;const se=()=>{N.direction==="horiz"?K(O.scrollWidth>O.clientWidth):K(O.scrollHeight>O.clientHeight)};se();const fe=new ResizeObserver(se);return fe.observe(O),()=>fe.disconnect()},[e,ue.isActive,n.length,w,N.direction]);const he=a.useCallback(()=>{const O=window.matchMedia("(max-width: 768px)").matches,se=gs(ye.color);O&&!l&&se>.9&&(document.body.style.backgroundColor=""),E(!0),D.current=!0;const fe=Se=>{Se.target===U.current&&Se.animationName&&(U.current&&ae.current&&U.current.removeEventListener("animationend",ae.current),ae.current=null,D.current&&(D.current=!1,t()),E(!1))};U.current&&(ae.current=fe,U.current.addEventListener("animationend",fe))},[t,ye.color,l]),Ae=(O,se,fe)=>{var Se,Ie;if(O){if(ee.type==="click"&&ee.switch==="image")ee.repeat==="close"&&$===n.length-1?he():(Se=h.current)==null||Se.go("+1");else if(ee.type==="click"&&ee.switch==="50/50"){const we=O.getBoundingClientRect(),_=se-we.left,de=fe-we.top,oe=we.width,z=we.height;let re;N.direction==="horiz"?re=_<oe/2?"-1":"+1":re=de<z/2?"-1":"+1",(Ie=h.current)==null||Ie.go(re)}}},be=O=>{if(H.current){H.current=!1;return}const se=n[$],fe=(se==null?void 0:se.image.objectFit)==="cover";let Se,Ie;if("changedTouches"in O&&O.changedTouches.length>0)Se=O.changedTouches[0].clientX,Ie=O.changedTouches[0].clientY;else if("clientX"in O)Se=O.clientX,Ie=O.clientY;else return;let we;if(fe&&k.current){const _=ms(k.current);we=Se>=_.left&&Se<=_.right&&Ie>=_.top&&Ie<=_.bottom}else{const _=k.current?or(k.current):null;if(!_){O.target===O.currentTarget&&he();return}we=Se>=_.x&&Se<=_.x+_.width&&Ie>=_.y&&Ie<=_.y+_.height}we?Ae(k.current,Se,Ie):he()},We=O=>{const se=O.target;(se.classList.contains(Fe.thumbsWrapper)||se.classList.contains(Fe.thumbsContainer))&&be(O)};a.useEffect(()=>{if(!e)return;const O=se=>{var fe,Se;if(se.key==="Escape"){he();return}if(se.key==="ArrowRight"){R(Ie=>(Ie+1)%Math.max(n.length,1)),(fe=h.current)==null||fe.go("+1");return}se.key==="ArrowLeft"&&(R(Ie=>(Ie-1+Math.max(n.length,1))%Math.max(n.length,1)),(Se=h.current)==null||Se.go("-1"))};return window.addEventListener("keydown",O),()=>{window.removeEventListener("keydown",O)}},[e,he,n.length]),a.useEffect(()=>{if(e){if(R(0),C(se=>se+1),D.current=!1,E(!1),I(!1),W({}),!pe)return;const O=new CustomEvent("page-overlay",{detail:{itemId:pe}});window.dispatchEvent(O)}return()=>{U.current&&ae.current&&(U.current.removeEventListener("animationend",ae.current),ae.current=null),I(!1)}},[e,pe]),a.useEffect(()=>{S.current!==null&&S.current!==N.type&&C(O=>O+1),S.current=N.type},[N.type]),a.useEffect(()=>{if(!e)return;const O=document.body.style.overflow,se=window.matchMedia("(max-width: 768px)").matches,fe=gs(ye.color);document.body.style.overflow="hidden",I(!1);const Se=we=>{we.target===U.current&&!D.current&&we.animationName&&(se&&!l&&fe>.9&&(document.body.style.backgroundColor=ye.color),I(!0),U.current&&Y.current&&U.current.removeEventListener("animationend",Y.current),Y.current=null)};U.current&&(Y.current=Se,U.current.addEventListener("animationend",Se));const Ie=we=>{const _=we.target;_&&(_.closest(`.${Fe.thumbsWrapper}`)||_.closest(`.${Fe.thumbsContainer}`))||N.type!=="slide"&&we.preventDefault()};return document.addEventListener("touchmove",Ie,{passive:!1}),()=>{document.body.style.overflow=O,document.removeEventListener("touchmove",Ie),U.current&&Y.current&&(U.current.removeEventListener("animationend",Y.current),Y.current=null),I(!1)}},[e,l,ye.color,N.type]),a.useEffect(()=>{if(!e)return;const O=se=>{var Se,Ie;if(D.current){se.stopPropagation();return}if(H.current){H.current=!1;return}const fe=se.target;if(!(fe&&(fe.closest(`.${Fe.thumbsContainer}`)||fe.closest(`.${Fe.thumbItem}`)||fe.closest(`.${Fe.arrow}`)||fe.closest(`.${Fe.closeButton}`)||fe.closest(`.${Fe.caption}`)))){if(N.type==="slide"&&ee.type==="drag"&&((Ie=(Se=h.current)==null?void 0:Se.splide)!=null&&Ie.root)){const we=h.current.splide.root;if(fe&&(we.contains(fe)||we===fe))return}if(se.touches.length===0&&se.changedTouches.length>0){const we=n[$],_=(we==null?void 0:we.image.objectFit)==="cover",de=se.changedTouches[0];let oe;if(_&&k.current){const z=ms(k.current);oe=de.clientX>=z.left&&de.clientX<=z.right&&de.clientY>=z.top&&de.clientY<=z.bottom}else{const z=k.current?or(k.current):null;if(!z)return;oe=de.clientX>=z.x&&de.clientX<=z.x+z.width&&de.clientY>=z.y&&de.clientY<=z.y+z.height}if(!oe){se.stopPropagation(),D.current=!0;const z=re=>{re.stopPropagation(),re.preventDefault(),document.removeEventListener("click",z,!0)};document.addEventListener("click",z,!0),he()}}}};return document.addEventListener("touchend",O,{passive:!0}),()=>{document.removeEventListener("touchend",O)}},[e,he,$,n]);const Q=(N.type==="scale"||N.type==="fade")&&N.direction==="vert"&&ee.type==="drag";a.useEffect(()=>{var re,ke;if(!e||!Q||!((ke=(re=h.current)==null?void 0:re.splide)!=null&&ke.root))return;const O=h.current.splide.root,se=30,fe=(ie,j)=>{if(G.current){const Ne=Math.abs(ie-G.current.x),Me=Math.abs(j-G.current.y);(Ne>0||Me>0)&&(H.current=!0)}},Se=ie=>{G.current&&(ie.preventDefault(),fe(ie.clientX,ie.clientY))},Ie=ie=>{G.current&&ie.touches.length>0&&(ie.preventDefault(),fe(ie.touches[0].clientX,ie.touches[0].clientY))},we=(ie,j)=>{if(!G.current||!h.current){G.current=null;return}const Ne=Math.abs(ie-G.current.x),Me=Math.abs(j-G.current.y);Me>se&&Me>Ne&&h.current.go(j<G.current.y?"+1":"-1"),G.current=null},_=ie=>{G.current&&we(ie.clientX,ie.clientY),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("pointermove",Se)},de=ie=>{if(G.current){if(ie.changedTouches.length>0){const j=ie.changedTouches[0];we(j.clientX,j.clientY)}document.removeEventListener("touchend",de),document.removeEventListener("touchcancel",de),document.removeEventListener("touchmove",Ie)}},oe=ie=>{G.current={x:ie.clientX,y:ie.clientY},H.current=!1,document.addEventListener("pointermove",Se,{passive:!1}),document.addEventListener("pointerup",_),document.addEventListener("pointercancel",_)},z=ie=>{ie.touches.length>0&&(G.current={x:ie.touches[0].clientX,y:ie.touches[0].clientY},H.current=!1,document.addEventListener("touchmove",Ie,{passive:!1}),document.addEventListener("touchend",de),document.addEventListener("touchcancel",de))};return O.addEventListener("pointerdown",oe),O.addEventListener("touchstart",z),()=>{O.removeEventListener("pointerdown",oe),O.removeEventListener("touchstart",z),document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("touchmove",Ie),document.removeEventListener("touchend",de),document.removeEventListener("touchcancel",de),G.current=null,H.current=!1}},[e,Q,P]);const le={backgroundColor:ye.color,backdropFilter:`blur(${ye.blur}px)`,animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:gi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:U,className:nt(Fe.background,X?ve:ne,{[Fe.editor]:l},{[Fe.hidden]:!e}),style:{...le,...B&&!l&&!X?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?U:null,className:nt(Fe.contentStyle,X?J:$e,{[Fe.editor]:l},{[Fe.hidden]:!e}),style:{animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(br,{onMove:O=>R(O.index),ref:h,className:Fe.lightboxSplide,options:{arrows:!1,speed:N.duration?parseInt(N.duration):500,direction:N.direction==="horiz"||N.type==="fade"||N.type==="scale"?"ltr":"ttb",pagination:!1,drag:ee.type==="drag"&&!Q,perPage:1,width:"100%",height:"100%",type:N.type==="fade"||N.type==="scale"?"fade":"loop",padding:0,rewind:ee.repeat!=="close",start:0},style:{"--splide-speed":N.duration},children:n.map((O,se)=>{const fe=Mo(ce.position,ce.offset,l),Se=`${y.scalingValue(ce.padding.top,l)} ${y.scalingValue(ce.padding.right,l)} ${y.scalingValue(ce.padding.bottom,l)} ${y.scalingValue(ce.padding.left,l)}`,Ie=N.type==="scale"?(()=>{const{transform:we,..._}=fe;return{..._,position:"absolute",padding:Se,boxSizing:"border-box","--position-transform":we||"none"}})():{...fe,position:"absolute",padding:Se,boxSizing:"border-box"};return r.jsx(wr,{children:r.jsx("div",{className:Fe.imgWrapper,onClick:be,children:r.jsx("img",{ref:se===$?k:null,className:nt(Fe.imageStyle,{[Fe.contain]:O.image.objectFit==="contain",[Fe.cover]:O.image.objectFit==="cover",[Fe.scaleSlide]:N.type==="scale"}),src:O.image.url,alt:O.image.name??"",style:{...Ie,pointerEvents:O.image.objectFit==="contain"?"none":"auto"}})})},se)})},P),v.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(Fe.arrow,{[Fe.arrowVertical]:N.direction==="vert"}),style:{color:v.color,"--arrow-hover-color":v.hover},children:r.jsxs("button",{className:Fe.arrowInner,style:{transform:`translate(${y.scalingValue(v.offset.x,l)}, ${y.scalingValue(v.offset.y*(N.direction==="horiz"?1:-1),l)}) scale(${v.scale}) rotate(${N.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=h.current)==null?void 0:O.go("-1")},"aria-label":"Previous",children:[v.arrowsImgUrl&&r.jsx(rn,{url:v.arrowsImgUrl,fill:v.color,hoverFill:v.hover,className:nt(Fe.arrowImg,Fe.mirror)}),!v.arrowsImgUrl&&r.jsx(hs,{color:v.color,className:nt(Fe.arrowIcon,Fe.arrowImg,Fe.mirror)})]})}),r.jsx("div",{className:nt(Fe.arrow,Fe.nextArrow,{[Fe.arrowVertical]:N.direction==="vert"}),style:{color:v.color,"--arrow-hover-color":v.hover},children:r.jsxs("button",{className:Fe.arrowInner,style:{transform:`translate(${y.scalingValue(v.offset.x*(N.direction==="horiz"?-1:1),l)}, ${y.scalingValue(v.offset.y,l)}) scale(${v.scale}) rotate(${N.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=h.current)==null?void 0:O.go("+1")},"aria-label":"Next",children:[v.arrowsImgUrl&&r.jsx(rn,{url:v.arrowsImgUrl,fill:v.color,hoverFill:v.hover,className:Fe.arrowImg}),!v.arrowsImgUrl&&r.jsx(hs,{color:v.color,className:nt(Fe.arrowIcon,Fe.arrowImg)})]})})]}),ye.closeIconUrl&&(()=>{const O=Mo(ye.closeIconAlign,ye.closeIconOffset,l),se=`scale(${ye.closeIconScale})`,fe=O.transform?`${O.transform} ${se}`:se;return r.jsx("button",{className:Fe.closeButton,style:{...O,transform:fe},onClick:he,"aria-label":"Close lightbox",children:r.jsx(rn,{url:ye.closeIconUrl,fill:ye.closeIconColor??"#000000",hoverFill:ye.closeIconHover??"#cccccc"})})})(),Z&&Z.isActive&&i.imageCaption&&((xe=n[$])==null?void 0:xe.imageCaption)&&r.jsx("div",{className:Fe.caption,style:{...Mo(Z.alignment,Z.offset,l),fontFamily:Sr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":y.scalingValue(c.width,l),letterSpacing:y.scalingValue(m,l),wordSpacing:y.scalingValue(b,l),textAlign:x,fontSize:y.scalingValue(T.fontSize,l),lineHeight:y.scalingValue(T.lineHeight,l),textTransform:f.textTransform??"none",textDecoration:f.textDecoration??"none",fontVariant:f.fontVariant??"normal",color:L},onClick:O=>O.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Fe.captionTextInner,style:{"--link-color":Z.linkColor,"--link-hover-color":Z.linkHoverColor},children:r.jsx(mi,{content:n[$].imageCaption})})}),ue.isActive&&(()=>{const[O,se]=ue.position.split("-"),fe=N.direction==="horiz"?`${O}-left`:ue.position,Se=Mo(fe,ue.offset,l),Ie=()=>{if(N.direction==="horiz"){if(se==="left")return"flex-start";if(se==="center")return"center";if(se==="right")return"flex-end"}else{if(O==="top")return"flex-start";if(O==="middle")return"center";if(O==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:F,className:Fe.thumbsWrapper,onClick:we=>We(we),style:{position:l?"absolute":"fixed",...Se,...N.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:nt(Fe.thumbsContainer,{[Fe.thumbsContainerVertical]:N.direction==="vert",[Fe.thumbsAlignStart]:ue.align==="start",[Fe.thumbsAlignCenter]:ue.align==="center",[Fe.thumbsAlignEnd]:ue.align==="end"}),style:{gap:y.scalingValue(ue.grid.gap,l),justifyContent:A?"flex-start":Ie()},children:n.map((we,_)=>{const de=_===$,oe=w[_],re=ue.grid.size*(de?ue.activeState.scale:1),ke=()=>{if(ue.fit!=="fit")return{};if(!oe)return N.direction==="horiz"?{height:y.scalingValue(re,l)}:{width:y.scalingValue(re,l)};const ie=oe.width/oe.height;if(N.direction==="horiz"){const j=re,Ne=j*ie;return{width:y.scalingValue(Ne,l),height:y.scalingValue(j,l)}}else{const j=re,Ne=j/ie;return{width:y.scalingValue(j,l),height:y.scalingValue(Ne,l)}}};return r.jsx("button",{className:Fe.thumbItem,style:{...N.direction==="horiz"&&ue.fit!=="fit"?{height:y.scalingValue(re,l)}:{},...N.direction==="vert"&&ue.fit!=="fit"?{width:y.scalingValue(re,l)}:{},...ue.fit==="cover"?{width:y.scalingValue(re,l),height:y.scalingValue(re,l)}:{},...ke(),transition:de?"all 0.25s ease-out":"none",opacity:de?ue.activeState.opacity/100:ue.opacity/100,"--thumb-hover":ue.activeState.opacity/100},onClick:ie=>{var j;ie.stopPropagation(),R(_),(j=h.current)==null||j.go(_)},onMouseEnter:()=>{var ie;ue.triggers==="hov"&&((ie=h.current)==null||ie.go(_))},children:r.jsx("img",{src:we.image.url,alt:we.image.name??"",onLoad:ie=>{const j=ie.currentTarget;j.naturalWidth&&j.naturalHeight&&W(Ne=>({...Ne,[_]:{width:j.naturalWidth,height:j.naturalHeight}}))},style:{objectFit:ue.fit==="cover"?"cover":"contain",...ue.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ue.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${we.image.name}-${_}`)})})})})()]})]}),document.getElementById(s))};function hs({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 Lp={element:Cp,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 Po(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ip(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Wp({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:l}){const s=!!n,c=i&&t||!t,{prefix:d}=v.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:x=[],buttonLabel:w,gap:$,fieldsGap:f,buttonCorners:S,buttonStroke:L,buttonPadding:M,isButtonFullWidth:A,inputCorners:C,inputStroke:J,inputPadding:k,inputColor:U,inputTextColor:I,inputBorderColor:R,placeholderColor:T,buttonColor:y,buttonTextColor:h,buttonBorderColor:F,labelTextColor:W,successColor:V,errorColor:ne,fontFamily:X,inputFontSettings:z,inputFontSize:H,inputLineHeight:_,inputLetterSpacing:E,inputWordSpacing:q,inputTextAppearance:Y,buttonFontSettings:ee,buttonFontSize:N,buttonLineHeight:pe,buttonLetterSpacing:b,buttonWordSpacing:ye,buttonTextAppearance:Q,labelFontSettings:xe,labelFontSize:$e,labelLineHeight:oe,labelLetterSpacing:ie,labelWordSpacing:B,labelTextAppearance:le,statusFontSettings:re,statusFontSize:ke,statusLineHeight:fe,statusLetterSpacing:Pe,statusWordSpacing:ve,statusTextAppearance:we,successMessage:Se,errorMessage:G,stateOverrides:me}=e,D=u==="B",K=x.slice(0,Math.min(m,x.length)),ae={fontSettings:{fontFamily:X,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:H??.01,lineHeight:_,letterSpacing:E??0,wordSpacing:q??0,textAppearance:Y,color:I},ge=dn(Xt(ae,t)),ce=v.scalingValue(J??0,t),be=v.scalingValue((_??H??.01)+((k==null?void 0:k.top)??0)+((k==null?void 0:k.bottom)??0)+(u==="C"?J??0:(J??0)*2),t),Ee={...ge,borderStyle:"solid",borderRadius:u==="C"?0:v.scalingValue(C??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ce,borderLeftWidth:0}:{borderWidth:ce},paddingTop:v.scalingValue((k==null?void 0:k.top)??0,t),paddingRight:v.scalingValue((k==null?void 0:k.right)??0,t),paddingBottom:v.scalingValue((k==null?void 0:k.bottom)??0,t),paddingLeft:v.scalingValue((k==null?void 0:k.left)??0,t),height:be,minHeight:be},Z={fontSettings:{fontFamily:X,fontWeight:(ee==null?void 0:ee.fontWeight)??400,fontStyle:(ee==null?void 0:ee.fontStyle)??"normal"},fontSize:N??.01,lineHeight:pe,letterSpacing:b??0,wordSpacing:ye??0,textAppearance:Q,color:h},de=dn(Xt(Z,t)),We=v.scalingValue(L??0,t),se={fontSettings:{fontFamily:X,fontWeight:(xe==null?void 0:xe.fontWeight)??400,fontStyle:(xe==null?void 0:xe.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:oe,letterSpacing:ie??0,wordSpacing:B??0,textAppearance:le,color:W},O=Xt(se,t),Oe={fontSettings:{fontFamily:X,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:ke??.01,lineHeight:fe,letterSpacing:Pe??0,wordSpacing:ve??0,textAppearance:we,color:V},_e=dn(Xt(Oe,t)),nt=v.buildColorVars(d,{inputColor:U,inputTextColor:I,inputBorderColor:R,placeholderColor:T!=null&&T.trim()?T:"#cccccc",buttonColor:y,buttonTextColor:h,buttonBorderColor:F,labelTextColor:W,successColor:V,errorColor:ne},_p,Hp,me),[Ue,Ce]=a.useState(()=>Object.fromEntries(K.map(rt=>[rt.name,""]))),[Fe,He]=a.useState("idle"),[Ze,Tt]=a.useState(null),it=l==="success"?"success":l==="error"?"error":Fe,De=l==="error"?G:Ze,et=l==="filled",dt=a.useMemo(()=>{if(!et)return Ue;let rt=null;for(const qe of K)(Ue[qe.name]??"").trim().length>0||(rt=rt??{...Ue},rt[qe.name]="Filled");return rt??Ue},[Ue,et,K]),lt=it==="error"?v.getFormFieldValidationError(K,dt):null,Rt=`${l&&l!=="default"?`${d}-state-${l}`:""}`.trim(),ot=o==null?void 0:o.submitUrl,xt=(rt,qe)=>{Ce(Ne=>({...Ne,[rt]:qe}))},zt=async rt=>{if(rt.preventDefault(),!c)return;const qe=Object.fromEntries(K.map(pt=>{var yt;return[pt.name,((yt=Ue[pt.name])==null?void 0:yt.trim())??""]}).filter(([,pt])=>pt));if(!ot){He("error"),Tt("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const Ne=v.getFormFieldValidationError(K,Ue);if(Ne){He("error"),Tt(Ne);return}He("submitting"),Tt(null);try{const pt=await fetch(ot,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!pt.ok){const yt=await pt.text();throw new Error(yt||`Request failed: ${pt.status}`)}He("success"),Ce(Object.fromEntries(K.map(yt=>[yt.name,""])))}catch(pt){He("error"),Tt(pt instanceof Error?pt.message:"Something went wrong")}};return r.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${Rt}`.trim(),style:nt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Fp(d)}}),r.jsxs("form",{onSubmit:zt,className:`${d}-form`,children:[r.jsx("div",{className:`${d}-fields`,children:K.map((rt,qe)=>r.jsxs(a.Fragment,{children:[qe>0&&r.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${d}-control`:void 0,style:{height:v.scalingValue(f??0,t)}}),r.jsxs("div",{className:`${d}-field-group${D?` ${d}-labeled`:""}`,children:[D&&r.jsx("span",{className:`${d}-field-label`,style:O?{...O,lineHeight:O.fontSize}:void 0,children:rt.label||rt.name}),rt.type==="textarea"?r.jsx("textarea",{name:rt.name,autoComplete:"off",value:dt[rt.name]??"",onChange:Ne=>xt(rt.name,Ne.target.value),placeholder:rt.placeholder,className:`${d}-input`,style:Ee,rows:1,"data-filled":et||(dt[rt.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:rt.type==="phone"?"tel":rt.type==="email"?"email":"text",name:rt.name,autoComplete:"off",value:dt[rt.name]??"",onChange:Ne=>xt(rt.name,Ne.target.value),placeholder:rt.placeholder,required:rt.isRequired??rt.type==="email",className:`${d}-input`,style:Ee,"data-filled":et||(dt[rt.name]??"").trim().length>0})]})]},qe))}),r.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${d}-control`:void 0,style:{height:v.scalingValue($??0,t)}}),r.jsx("div",{className:`${d}-overlay-anchor`,children:r.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:v.scalingValue(S??0,t),borderWidth:We,paddingTop:v.scalingValue((M==null?void 0:M.top)??0,t),paddingRight:v.scalingValue((M==null?void 0:M.right)??0,t),paddingBottom:v.scalingValue((M==null?void 0:M.bottom)??0,t),paddingLeft:v.scalingValue((M==null?void 0:M.left)??0,t),pointerEvents:c?"auto":void 0,...de,...A?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${d}-overlay-anchor`,style:A?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Fe==="submitting"?"...":w})})})]}),it==="success"&&r.jsx("p",{className:`${d}-success`,style:{..._e},children:Se}),it==="error"&&r.jsx("p",{className:`${d}-error`,style:{..._e},role:"alert",children:lt??De??G})]})}const _p={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"},Hp=["hover","focus","filled","success","error"],Np=`import React, { useMemo, useState } from 'react';
158
+ `}function Rp({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=y.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:x=[],buttonLabel:b,gap:T,fieldsGap:f,buttonCorners:L,buttonStroke:$,buttonPadding:R,isButtonFullWidth:P,inputCorners:C,inputStroke:X,inputPadding:E,inputColor:B,inputTextColor:I,inputBorderColor:w,placeholderColor:W,buttonColor:h,buttonTextColor:S,buttonBorderColor:k,labelTextColor:D,successColor:U,errorColor:ae,fontFamily:Y,inputFontSettings:G,inputFontSize:H,inputLineHeight:F,inputLetterSpacing:A,inputWordSpacing:K,inputTextAppearance:q,buttonFontSettings:ee,buttonFontSize:N,buttonLineHeight:ue,buttonLetterSpacing:v,buttonWordSpacing:ye,buttonTextAppearance:Z,labelFontSettings:ce,labelFontSize:$e,labelLineHeight:ne,labelLetterSpacing:ve,labelWordSpacing:J,labelTextAppearance:pe,statusFontSettings:he,statusFontSize:Ae,statusLineHeight:be,statusLetterSpacing:We,statusWordSpacing:Q,statusTextAppearance:le,successMessage:xe,errorMessage:O,stateOverrides:se}=e,fe=u==="B",Se=x.slice(0,Math.min(m,x.length)),Ie={fontSettings:{fontFamily:Y,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:H??.01,lineHeight:F,letterSpacing:A??0,wordSpacing:K??0,textAppearance:q,color:I},we=dn(Xt(Ie,t)),_=y.scalingValue(X??0,t),de=y.scalingValue((F??H??.01)+((E==null?void 0:E.top)??0)+((E==null?void 0:E.bottom)??0)+(u==="C"?X??0:(X??0)*2),t),oe={...we,borderStyle:"solid",borderRadius:u==="C"?0:y.scalingValue(C??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:_,borderLeftWidth:0}:{borderWidth:_},paddingTop:y.scalingValue((E==null?void 0:E.top)??0,t),paddingRight:y.scalingValue((E==null?void 0:E.right)??0,t),paddingBottom:y.scalingValue((E==null?void 0:E.bottom)??0,t),paddingLeft:y.scalingValue((E==null?void 0:E.left)??0,t),height:de,minHeight:de},z={fontSettings:{fontFamily:Y,fontWeight:(ee==null?void 0:ee.fontWeight)??400,fontStyle:(ee==null?void 0:ee.fontStyle)??"normal"},fontSize:N??.01,lineHeight:ue,letterSpacing:v??0,wordSpacing:ye??0,textAppearance:Z,color:S},re=dn(Xt(z,t)),ke=y.scalingValue($??0,t),ie={fontSettings:{fontFamily:Y,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:ne,letterSpacing:ve??0,wordSpacing:J??0,textAppearance:pe,color:D},j=Xt(ie,t),Ne={fontSettings:{fontFamily:Y,fontWeight:(he==null?void 0:he.fontWeight)??400,fontStyle:(he==null?void 0:he.fontStyle)??"normal"},fontSize:Ae??.01,lineHeight:be,letterSpacing:We??0,wordSpacing:Q??0,textAppearance:le,color:U},Me=dn(Xt(Ne,t)),et=y.buildColorVars(c,{inputColor:B,inputTextColor:I,inputBorderColor:w,placeholderColor:W!=null&&W.trim()?W:"#cccccc",buttonColor:h,buttonTextColor:S,buttonBorderColor:k,labelTextColor:D,successColor:U,errorColor:ae},Ep,kp,se),[Ye,lt]=a.useState(()=>Object.fromEntries(Se.map(Ge=>[Ge.name,""]))),[mt,De]=a.useState("idle"),[ot,$t]=a.useState(null),rt=s==="success"?"success":s==="error"?"error":mt,Ue=s==="error"?O:ot,ht=s==="filled",xt=a.useMemo(()=>{if(!ht)return Ye;let Ge=null;for(const qe of Se)(Ye[qe.name]??"").trim().length>0||(Ge=Ge??{...Ye},Ge[qe.name]="Filled");return Ge??Ye},[Ye,ht,Se]),dt=rt==="error"?y.getFormFieldValidationError(Se,xt):null,_t=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Qe=o==null?void 0:o.submitUrl,Tt=(Ge,qe)=>{lt(Pe=>({...Pe,[Ge]:qe}))},Lt=async Ge=>{if(Ge.preventDefault(),!d)return;const qe=Object.fromEntries(Se.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=y.getFormFieldValidationError(Se,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"),lt(Object.fromEntries(Se.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:Ip(c)}}),r.jsxs("form",{onSubmit:Lt,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:Se.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:y.scalingValue(f??0,t)}}),r.jsxs("div",{className:`${c}-field-group${fe?` ${c}-labeled`:""}`,children:[fe&&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:oe,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:oe,"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:y.scalingValue(T??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(L??0,t),borderWidth:ke,paddingTop:y.scalingValue((R==null?void 0:R.top)??0,t),paddingRight:y.scalingValue((R==null?void 0:R.right)??0,t),paddingBottom:y.scalingValue((R==null?void 0:R.bottom)??0,t),paddingLeft:y.scalingValue((R==null?void 0:R.left)??0,t),pointerEvents:d?"auto":void 0,...re,...P?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:P?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:mt==="submitting"?"...":b})})})]}),rt==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Me},children:xe}),rt==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Me},role:"alert",children:dt??Ue??O})]})}const Ep={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"},kp=["hover","focus","filled","success","error"],Mp=`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
- `,Op=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Ao={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},jp=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],zp={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Ao.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Ao.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Ao.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Ao.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Op,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:[...jp],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"]},Bp={element:Wp,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:zp,sourceCode:Np,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Fo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Dp(e){return`
792
+ `,Pp=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Ao={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ap=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","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:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Ao.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Ao.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Ao.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Ao.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Pp,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:[...Ap],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"]},Wp={element:Rp,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:Fp,sourceCode:Mp,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Fo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _p(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -980,7 +980,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
980
980
  font-size: ${Fo(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const Vp=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:l}=v.useScopedStyles(),s=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:m=1,fontFamily:x,inputFontSettings:w,inputFontSize:$,inputLineHeight:f,inputLetterSpacing:S,inputWordSpacing:L,inputTextAppearance:M,buttonFontSettings:A,buttonFontSize:C,buttonLineHeight:J,buttonLetterSpacing:k,buttonWordSpacing:U,buttonTextAppearance:I,statusFontSettings:R,statusFontSize:T,statusLineHeight:y,statusLetterSpacing:h,statusWordSpacing:F,statusTextAppearance:W,iconMaxWidth:V,minHeight:ne,corners:X,stroke:z,stateOverrides:H,inputPadding:_,buttonPadding:E,successMessage:q="Thanks for subscribing!",errorMessage:Y="Please, fill all required fields."}=e,ee=c.slice(0,Math.min(m,c.length)),[N,pe]=a.useState(()=>Object.fromEntries(ee.map(se=>[se.name,""]))),[b,ye]=a.useState("idle"),[Q,xe]=a.useState(null),$e=o==="success"?"success":o==="error"?"error":b,oe=o==="error"?Y:Q,ie=o==="filled",B=a.useMemo(()=>{if(!ie)return N;let se=null;for(const O of ee)(N[O.name]??"").trim().length>0||(se=se??{...N},se[O.name]="Filled");return se??N},[ie,N,ee]),le=$e==="error"?v.getFormFieldValidationError(ee,B):null,re=o&&o!=="default"?`${l}-state-${o}`:"",ke=ee.some(se=>(B[se.name]??"").trim().length>0),fe=re!==`${l}-state-filled`&&ke?`${l}-state-filled`:"",Pe=`${re} ${fe}`.trim(),ve=i==null?void 0:i.submitUrl,we=u??"",Se=(d==null?void 0:d.icon)??"",G=(d==null?void 0:d.mode)==="On",me=we||"Submit",D={fontSettings:{fontFamily:x,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:$??.01,lineHeight:f,letterSpacing:S??0,wordSpacing:L??0,textAppearance:M,color:e.inputTextColor??"#111111"},K={fontSettings:{fontFamily:x,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:C??.01,lineHeight:J,letterSpacing:k??0,wordSpacing:U??0,textAppearance:I,color:e.buttonTextColor??"#ffffff"},ae={fontSettings:{fontFamily:x,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:T??.01,lineHeight:y,letterSpacing:h??0,wordSpacing:F??0,textAppearance:W,color:e.successColor??"#22c55e"},ge=dn(Xt(D,t)),ce=dn(Xt(K,t)),be=dn(Xt(ae,t)),Ee=v.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(D==null?void 0:D.color)??"#111111",buttonTextColor:e.buttonTextColor??(K==null?void 0:K.color)??"#ffffff"},Gp,qp,H),Z={borderRadius:v.scalingValue(X,t),borderWidth:v.scalingValue(z,t),borderStyle:"solid"},de={borderLeftWidth:v.scalingValue(z,t)},We=async se=>{if(se.preventDefault(),!s)return;const O=Object.fromEntries(ee.map(_e=>{var nt;return[_e.name,((nt=N[_e.name])==null?void 0:nt.trim())??""]}).filter(([,_e])=>_e));if(!ve){ye("error"),xe("No integrations were found for this form.");return}if(Object.keys(O).length===0)return;const Oe=v.getFormFieldValidationError(ee,N);if(Oe){ye("error"),xe(Oe);return}ye("submitting"),xe(null);try{const _e=await fetch(ve,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)});if(!_e.ok){const nt=await _e.text();throw new Error(nt||`Request failed: ${_e.status}`)}ye("success"),pe(Object.fromEntries(ee.map(nt=>[nt.name,""])))}catch(_e){ye("error"),xe(_e instanceof Error?_e.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${Pe}`.trim(),style:Ee,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Dp(l)}}),r.jsxs("form",{onSubmit:We,className:`${l}-form`,style:{...Z,height:v.scalingValue(ne,t),minHeight:v.scalingValue(ne,t)},children:[r.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:ee.map(se=>r.jsx("input",{type:se.type==="email"?"email":se.type==="phone"?"tel":"text",name:se.name,autoComplete:"off",value:B[se.name]??"",onChange:O=>pe(Oe=>({...Oe,[se.name]:O.target.value})),placeholder:se.placeholder,required:se.isRequired??se.type==="email",className:`${l}-input`,style:{...ge,paddingRight:v.scalingValue(_.right,t),paddingLeft:v.scalingValue(_.left,t),paddingTop:v.scalingValue(_.top,t),paddingBottom:v.scalingValue(_.bottom,t)}},se.name))}),r.jsx("div",{className:`${l}-overlayAnchor`,children:r.jsx("button",{type:s?"submit":"button",className:`${l}-submitBtn`,"aria-label":me,style:{...ce,...de,paddingRight:v.scalingValue(E.right,t),paddingLeft:v.scalingValue(E.left,t),paddingTop:v.scalingValue(E.top,t),paddingBottom:v.scalingValue(E.bottom,t),pointerEvents:s?"auto":void 0},children:b==="submitting"?"...":G?Se&&r.jsx(on,{url:Se,className:`${l}-submitBtnIcon`,style:{maxWidth:v.scalingValue(V??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):we})})]}),$e==="success"&&r.jsx("p",{className:`${l}-success`,style:{...be},children:q}),$e==="error"&&r.jsx("p",{className:`${l}-error`,style:{...be},role:"alert",children:le??oe??Y})]})},Gp={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"},qp=["hover","focus","filled","success","error"],Kp=`import React, { useMemo, useState } from 'react';
983
+ `}const Np=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=y.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:m=1,fontFamily:x,inputFontSettings:b,inputFontSize:T,inputLineHeight:f,inputLetterSpacing:L,inputWordSpacing:$,inputTextAppearance:R,buttonFontSettings:P,buttonFontSize:C,buttonLineHeight:X,buttonLetterSpacing:E,buttonWordSpacing:B,buttonTextAppearance:I,statusFontSettings:w,statusFontSize:W,statusLineHeight:h,statusLetterSpacing:S,statusWordSpacing:k,statusTextAppearance:D,iconMaxWidth:U,minHeight:ae,corners:Y,stroke:G,stateOverrides:H,inputPadding:F,buttonPadding:A,successMessage:K="Thanks for subscribing!",errorMessage:q="Please, fill all required fields."}=e,ee=d.slice(0,Math.min(m,d.length)),[N,ue]=a.useState(()=>Object.fromEntries(ee.map(ie=>[ie.name,""]))),[v,ye]=a.useState("idle"),[Z,ce]=a.useState(null),$e=o==="success"?"success":o==="error"?"error":v,ne=o==="error"?q:Z,ve=o==="filled",J=a.useMemo(()=>{if(!ve)return N;let ie=null;for(const j of ee)(N[j.name]??"").trim().length>0||(ie=ie??{...N},ie[j.name]="Filled");return ie??N},[ve,N,ee]),pe=$e==="error"?y.getFormFieldValidationError(ee,J):null,he=o&&o!=="default"?`${s}-state-${o}`:"",Ae=ee.some(ie=>(J[ie.name]??"").trim().length>0),be=he!==`${s}-state-filled`&&Ae?`${s}-state-filled`:"",We=`${he} ${be}`.trim(),Q=i==null?void 0:i.submitUrl,le=u??"",xe=(c==null?void 0:c.icon)??"",O=(c==null?void 0:c.mode)==="On",se=le||"Submit",fe={fontSettings:{fontFamily:x,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:T??.01,lineHeight:f,letterSpacing:L??0,wordSpacing:$??0,textAppearance:R,color:e.inputTextColor??"#111111"},Se={fontSettings:{fontFamily:x,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:C??.01,lineHeight:X,letterSpacing:E??0,wordSpacing:B??0,textAppearance:I,color:e.buttonTextColor??"#ffffff"},Ie={fontSettings:{fontFamily:x,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:W??.01,lineHeight:h,letterSpacing:S??0,wordSpacing:k??0,textAppearance:D,color:e.successColor??"#22c55e"},we=dn(Xt(fe,t)),_=dn(Xt(Se,t)),de=dn(Xt(Ie,t)),oe=y.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(fe==null?void 0:fe.color)??"#111111",buttonTextColor:e.buttonTextColor??(Se==null?void 0:Se.color)??"#ffffff"},Hp,jp,H),z={borderRadius:y.scalingValue(Y,t),borderWidth:y.scalingValue(G,t),borderStyle:"solid"},re={borderLeftWidth:y.scalingValue(G,t)},ke=async ie=>{if(ie.preventDefault(),!l)return;const j=Object.fromEntries(ee.map(Me=>{var et;return[Me.name,((et=N[Me.name])==null?void 0:et.trim())??""]}).filter(([,Me])=>Me));if(!Q){ye("error"),ce("No integrations were found for this form.");return}if(Object.keys(j).length===0)return;const Ne=y.getFormFieldValidationError(ee,N);if(Ne){ye("error"),ce(Ne);return}ye("submitting"),ce(null);try{const Me=await fetch(Q,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(!Me.ok){const et=await Me.text();throw new Error(et||`Request failed: ${Me.status}`)}ye("success"),ue(Object.fromEntries(ee.map(et=>[et.name,""])))}catch(Me){ye("error"),ce(Me instanceof Error?Me.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${We}`.trim(),style:oe,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_p(s)}}),r.jsxs("form",{onSubmit:ke,className:`${s}-form`,style:{...z,height:y.scalingValue(ae,t),minHeight:y.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:J[ie.name]??"",onChange:j=>ue(Ne=>({...Ne,[ie.name]:j.target.value})),placeholder:ie.placeholder,required:ie.isRequired??ie.type==="email",className:`${s}-input`,style:{...we,paddingRight:y.scalingValue(F.right,t),paddingLeft:y.scalingValue(F.left,t),paddingTop:y.scalingValue(F.top,t),paddingBottom:y.scalingValue(F.bottom,t)}},ie.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":se,style:{..._,...re,paddingRight:y.scalingValue(A.right,t),paddingLeft:y.scalingValue(A.left,t),paddingTop:y.scalingValue(A.top,t),paddingBottom:y.scalingValue(A.bottom,t),pointerEvents:l?"auto":void 0},children:v==="submitting"?"...":O?xe&&r.jsx(rn,{url:xe,className:`${s}-submitBtnIcon`,style:{maxWidth:y.scalingValue(U??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):le})})]}),$e==="success"&&r.jsx("p",{className:`${s}-success`,style:{...de},children:K}),$e==="error"&&r.jsx("p",{className:`${s}-error`,style:{...de},role:"alert",children:pe??ne??q})]})},Hp={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"},jp=["hover","focus","filled","success","error"],Op=`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>'),Xp=[{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."}],_r={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Yp=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Zp={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:{..._r.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:{..._r.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:{..._r.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:Xp,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:[...Yp],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"]},Jp={element:Vp,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:Zp,sourceCode:Kp};function Qp(e,t){const n=t>0?`${t}px`:"0px";return`
1560
+ `,zp="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>'),Bp=[{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."}],Nr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Dp=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Vp={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:{...Nr.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:{...Nr.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:{...Nr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Bp,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:zp},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:[...Dp],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"]},Gp={element:Np,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:Vp,sourceCode:Op};function qp(e,t){const n=t>0?`${t}px`:"0px";return`
1561
1561
  .${e}-marquee-wrapper {
1562
1562
  overflow: hidden;
1563
1563
  width: 100%;
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1689
1689
  .${e}-image-hover-grayscale:hover video {
1690
1690
  filter: grayscale(100%);
1691
1691
  }
1692
- `}const em=30,tm=20,Hr=3,nm=12,im=32,om=3,rm=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")},am=(e,t)=>Array.from({length:t},()=>e).flat(),lm=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},Ys=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),hl=(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 c=Array.from({length:t},(u,m)=>e.children[m]),d=Ys(c);return d<=0?0:d+l*Math.max(0,t-1)},sm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Ys(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},cm=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},dm=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>cm(i,e))},um=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??"")},pm=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,mm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:l,imageHoverClass:s,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var F,W,V,ne;const m=a.useRef(null),x=!!((F=e.image)!=null&&F.url&&um(e.image));a.useLayoutEffect(()=>{c&&pm(m.current)&&(u==null||u())},[c,(W=e.image)==null?void 0:W.url,u]);const w=n.display==="cover",$=n.ratioValue??"1:1",f=n.reversed??!1,[S,L]=$.split(":").map(Number),C=(f?L:S)/(f?S:L),J=i/C,k=J>o?o:J,U=J>o?o*C:i,I=d(U),R=d(k),T={borderRadius:d(l)},y=w?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...T}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...T},h=((V=e.image)==null?void 0:V.url)&&(x?r.jsx("video",{ref:X=>{m.current=X},src:e.image.url,style:y,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):r.jsx("img",{ref:X=>{m.current=X},src:e.image.url,alt:((ne=e.image)==null?void 0:ne.name)??"",style:y,onLoad:c?u:void 0,onError:c?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...w?{width:I}:{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,...w?{width:I,height:R,overflow:"hidden",...T}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:h&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:at(`${t}-marquee-link`,!w&&`${t}-marquee-link-contain`),children:h}):h})})},gm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=v.useScopedStyles(),[s,c]=a.useState(0),d=s>0?Math.round(s):0,u=a.useMemo(()=>Qp(l,d),[l,d]),{speed:m,direction:x,pauseOnHover:w,gap:$,imageMaxWidth:f,imageMaxHeight:S,hoverEffect:L,cornerRadius:M=0}=e,A=a.useMemo(()=>lm(e.imageFit),[e.imageFit]),C=(t==null?void 0:t.length)??0,J=!!o,k=!n||!!i,U=k&&L!=="off"&&L!=="randomize"?`${l}-image-hover-${L}`:void 0,I=n?!!i:!0,T=((t==null?void 0:t.length)??0)>0&&(I||!!n),y=Math.max(0,m)*em,h=fe=>v.scalingValue(fe,n??!1),F=a.useRef(null),W=a.useRef(null),V=a.useRef(null),[ne,X]=a.useState(0),z=I&&w==="on",[H,_]=a.useState(!1),[E,q]=a.useState({}),Y=a.useRef(E);Y.current=E;const ee=a.useRef(null),N=a.useRef(0),pe=a.useRef(null),b=a.useMemo(()=>(t??[]).map(fe=>{var Pe;return((Pe=fe.image)==null?void 0:Pe.url)??""}).join("\0"),[t]),[ye,Q]=a.useState(Hr),xe=a.useMemo(()=>{const fe=t??[];return fe.length===0||!(I||!!n)?fe:am(fe,ye)},[t,I,ye,n]),$e=a.useMemo(()=>(t??[]).filter(fe=>{var Pe;return!!((Pe=fe.image)!=null&&Pe.url)}).length,[t]),oe=T?om:1;a.useLayoutEffect(()=>{N.current=0,q({}),ee.current=null,Q(Hr),c(0)},[b]),a.useEffect(()=>{if(!k||L!=="randomize")return;const fe=F.current;if(!fe)return;const Pe=G=>{q(me=>{const D=Array.from(G).filter(ae=>ae in me&&!dm(fe,ae));if(D.length===0)return me;const K={...me};return D.forEach(ae=>{delete K[ae]}),K})},ve=new IntersectionObserver(G=>{const me=new Set;for(const D of G){const K=D.target.dataset.marqueeItemIndex,ae=K!==void 0?Number(K):NaN;Number.isNaN(ae)||me.add(ae)}me.size>0&&Pe(me)},{root:fe,threshold:0});Object.keys(E).forEach(G=>{const me=Number(G);fe.querySelectorAll(`[data-marquee-item-index="${me}"]`).forEach(D=>ve.observe(D))});const we={current:0},Se=()=>{const G=Object.keys(Y.current);G.length!==0&&(Pe(G.map(Number)),we.current=requestAnimationFrame(Se))};return Object.keys(Y.current).length>0&&(we.current=requestAnimationFrame(Se)),()=>{cancelAnimationFrame(we.current),ve.disconnect()}},[L,E,k]),a.useLayoutEffect(()=>{if(!T)return;const fe=F.current,Pe=V.current;if(!fe||!Pe)return;const ve={current:0},we=()=>{const me=fe.getBoundingClientRect().width||fe.offsetWidth,D=sm(Pe),K=ee.current,ae=typeof K=="number"&&Math.abs(K-D)<=.25;ee.current=D;let ge=ye,ce=0;if((I||n)&&C>0&&me>0){const Z=hl(Pe,C);if(Z>=im){ce=Z;const de=Math.min(nm,Math.max(Hr,Math.ceil(me/Z)+1));ge=de,de!==ye&&Q(de)}}const Ee=ge!==ye&&ce>0?ce*ge:D>0?D:ce>0?ce*ge:(()=>{const Z=hl(Pe,C);return Z>0?Z*ge:0})();Ee>0?c(Z=>Z<=0?Ee:!ae||Math.round(Z)===Math.round(Ee)?Z:Ee):!ae&&s<=0&&(cancelAnimationFrame(ve.current),ve.current=requestAnimationFrame(we))},Se=()=>{cancelAnimationFrame(ve.current),ve.current=requestAnimationFrame(we)};pe.current=Se,Se();const G=new ResizeObserver(Se);return G.observe(fe),G.observe(Pe),()=>{pe.current=null,cancelAnimationFrame(ve.current),G.disconnect()}},[I,T,s,b,ye,C,n]),a.useLayoutEffect(()=>{if(!T||d<=0)return;const fe=W.current;fe&&rm(fe)},[T,d,x,y]),a.useLayoutEffect(()=>{if(!T||s<=0){X(0);return}const fe=W.current,Pe=V.current;if(!fe||!Pe)return;const ve=()=>{const Se=fe.offsetHeight||fe.getBoundingClientRect().height,G=Array.from(Pe.children).reduce((D,K)=>Math.max(D,K.offsetHeight||K.getBoundingClientRect().height),0),me=Se>0?Se:G;X(me>0?me:0)};ve();const we=new ResizeObserver(ve);return we.observe(fe),we.observe(Pe),()=>we.disconnect()},[T,oe,xe,n,$,f,S,s,A,E]),a.useLayoutEffect(()=>{if(!n||!J||!T||typeof window>"u")return;const fe=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(fe)},[n,J,T,x,s,ne,$,xe]);const ie=()=>{z&&_(!0)},B=()=>{z&&_(!1)},le=a.useCallback(()=>{var fe;N.current=Math.min($e,N.current+1),(fe=pe.current)==null||fe.call(pe)},[$e]),re=a.useCallback((fe,Pe)=>{q(ve=>{const we=ve[fe]??Pe,Se=(t??[]).filter(me=>me!==we);if(Se.length===0)return ve;const G=Se[Math.floor(Math.random()*Se.length)];return{...ve,[fe]:G}})},[t]),ke=(fe,Pe,ve,we)=>{const Se=k&&L==="randomize"&&A.display==="cover"?E[ve]??fe:fe,G=`max(${h($)}, ${tm}px)`,me=`calc(-0.5 * (${G} + ${h($)}))`;return r.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":ve,onMouseEnter:k&&L==="randomize"&&A.display==="cover"?()=>re(ve,fe):void 0,children:[r.jsx(mm,{item:Se,prefix:l,imageFit:A,imageMaxWidth:f,imageMaxHeight:S,cornerRadius:M,imageHoverClass:U,isEditor:n,isFirstSet:we,scaled:h,onFirstSetImageDone:le}),J&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:me,width:G,height:"100%"}})]},`${Pe}-${ve}`)};if(T){const fe=I?z&&H?"paused":"running":"paused",Pe=d>0&&y>0?d/y*1e3:0,ve=`${Math.max(0,Pe)/1e3}s`;return r.jsxs("div",{ref:F,className:at(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:ne>0?{height:ne}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:W,className:`${l}-marquee-track`,"data-direction":x,onMouseEnter:ie,onMouseLeave:B,style:{WebkitAnimationDuration:ve,animationDuration:ve,WebkitAnimationPlayState:fe,animationPlayState:fe},children:Array.from({length:oe},(we,Se)=>r.jsx("div",{ref:Se===0?V:void 0,className:at(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:h($),paddingRight:h($)},"aria-hidden":Se>0,children:xe.map((G,me)=>ke(G,Se,me,Se===0&&me<C))},`set-${Se}`))})]})}return r.jsxs("div",{ref:F,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:at(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:h($),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((fe,Pe)=>ke(fe,0,Pe))},"marquee-static")]})},hm=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1692
+ `}const Kp=30,Up=20,Hr=3,Xp=12,Yp=32,Zp=3,Jp=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")},Qp=(e,t)=>Array.from({length:t},()=>e).flat(),em=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},Kl=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),fs=(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=Kl(d);return c<=0?0:c+s*Math.max(0,t-1)},tm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Kl(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},nm=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},im=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>nm(i,e))},om=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??"")},rm=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,am=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:s,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var k,D,U,ae;const m=a.useRef(null),x=!!((k=e.image)!=null&&k.url&&om(e.image));a.useLayoutEffect(()=>{d&&rm(m.current)&&(u==null||u())},[d,(D=e.image)==null?void 0:D.url,u]);const b=n.display==="cover",T=n.ratioValue??"1:1",f=n.reversed??!1,[L,$]=T.split(":").map(Number),C=(f?$:L)/(f?L:$),X=i/C,E=X>o?o:X,B=X>o?o*C:i,I=c(B),w=c(E),W={borderRadius:c(s)},h=b?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...W}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...W},S=((U=e.image)==null?void 0:U.url)&&(x?r.jsx("video",{ref:Y=>{m.current=Y},src:e.image.url,style:h,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:Y=>{m.current=Y},src:e.image.url,alt:((ae=e.image)==null?void 0:ae.name)??"",style:h,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...b?{width:I}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...b?{width:I,height:w,overflow:"hidden",...W}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:S&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:nt(`${t}-marquee-link`,!b&&`${t}-marquee-link-contain`),children:S}):S})})},sm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>qp(s,c),[s,c]),{speed:m,direction:x,pauseOnHover:b,gap:T,imageMaxWidth:f,imageMaxHeight:L,hoverEffect:$,cornerRadius:R=0}=e,P=a.useMemo(()=>em(e.imageFit),[e.imageFit]),C=(t==null?void 0:t.length)??0,X=!!o,E=!n||!!i,B=E&&$!=="off"&&$!=="randomize"?`${s}-image-hover-${$}`:void 0,I=n?!!i:!0,W=((t==null?void 0:t.length)??0)>0&&(I||!!n),h=Math.max(0,m)*Kp,S=be=>y.scalingValue(be,n??!1),k=a.useRef(null),D=a.useRef(null),U=a.useRef(null),[ae,Y]=a.useState(0),G=I&&b==="on",[H,F]=a.useState(!1),[A,K]=a.useState({}),q=a.useRef(A);q.current=A;const ee=a.useRef(null),N=a.useRef(0),ue=a.useRef(null),v=a.useMemo(()=>(t??[]).map(be=>{var We;return((We=be.image)==null?void 0:We.url)??""}).join("\0"),[t]),[ye,Z]=a.useState(Hr),ce=a.useMemo(()=>{const be=t??[];return be.length===0||!(I||!!n)?be:Qp(be,ye)},[t,I,ye,n]),$e=a.useMemo(()=>(t??[]).filter(be=>{var We;return!!((We=be.image)!=null&&We.url)}).length,[t]),ne=W?Zp:1;a.useLayoutEffect(()=>{N.current=0,K({}),ee.current=null,Z(Hr),d(0)},[v]),a.useEffect(()=>{if(!E||$!=="randomize")return;const be=k.current;if(!be)return;const We=O=>{K(se=>{const fe=Array.from(O).filter(Ie=>Ie in se&&!im(be,Ie));if(fe.length===0)return se;const Se={...se};return fe.forEach(Ie=>{delete Se[Ie]}),Se})},Q=new IntersectionObserver(O=>{const se=new Set;for(const fe of O){const Se=fe.target.dataset.marqueeItemIndex,Ie=Se!==void 0?Number(Se):NaN;Number.isNaN(Ie)||se.add(Ie)}se.size>0&&We(se)},{root:be,threshold:0});Object.keys(A).forEach(O=>{const se=Number(O);be.querySelectorAll(`[data-marquee-item-index="${se}"]`).forEach(fe=>Q.observe(fe))});const le={current:0},xe=()=>{const O=Object.keys(q.current);O.length!==0&&(We(O.map(Number)),le.current=requestAnimationFrame(xe))};return Object.keys(q.current).length>0&&(le.current=requestAnimationFrame(xe)),()=>{cancelAnimationFrame(le.current),Q.disconnect()}},[$,A,E]),a.useLayoutEffect(()=>{if(!W)return;const be=k.current,We=U.current;if(!be||!We)return;const Q={current:0},le=()=>{const se=be.getBoundingClientRect().width||be.offsetWidth,fe=tm(We),Se=ee.current,Ie=typeof Se=="number"&&Math.abs(Se-fe)<=.25;ee.current=fe;let we=ye,_=0;if((I||n)&&C>0&&se>0){const z=fs(We,C);if(z>=Yp){_=z;const re=Math.min(Xp,Math.max(Hr,Math.ceil(se/z)+1));we=re,re!==ye&&Z(re)}}const oe=we!==ye&&_>0?_*we:fe>0?fe:_>0?_*we:(()=>{const z=fs(We,C);return z>0?z*we:0})();oe>0?d(z=>z<=0?oe:!Ie||Math.round(z)===Math.round(oe)?z:oe):!Ie&&l<=0&&(cancelAnimationFrame(Q.current),Q.current=requestAnimationFrame(le))},xe=()=>{cancelAnimationFrame(Q.current),Q.current=requestAnimationFrame(le)};ue.current=xe,xe();const O=new ResizeObserver(xe);return O.observe(be),O.observe(We),()=>{ue.current=null,cancelAnimationFrame(Q.current),O.disconnect()}},[I,W,l,v,ye,C,n]),a.useLayoutEffect(()=>{if(!W||c<=0)return;const be=D.current;be&&Jp(be)},[W,c,x,h]),a.useLayoutEffect(()=>{if(!W||l<=0){Y(0);return}const be=D.current,We=U.current;if(!be||!We)return;const Q=()=>{const xe=be.offsetHeight||be.getBoundingClientRect().height,O=Array.from(We.children).reduce((fe,Se)=>Math.max(fe,Se.offsetHeight||Se.getBoundingClientRect().height),0),se=xe>0?xe:O;Y(se>0?se:0)};Q();const le=new ResizeObserver(Q);return le.observe(be),le.observe(We),()=>le.disconnect()},[W,ne,ce,n,T,f,L,l,P,A]),a.useLayoutEffect(()=>{if(!n||!X||!W||typeof window>"u")return;const be=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(be)},[n,X,W,x,l,ae,T,ce]);const ve=()=>{G&&F(!0)},J=()=>{G&&F(!1)},pe=a.useCallback(()=>{var be;N.current=Math.min($e,N.current+1),(be=ue.current)==null||be.call(ue)},[$e]),he=a.useCallback((be,We)=>{K(Q=>{const le=Q[be]??We,xe=(t??[]).filter(se=>se!==le);if(xe.length===0)return Q;const O=xe[Math.floor(Math.random()*xe.length)];return{...Q,[be]:O}})},[t]),Ae=(be,We,Q,le)=>{const xe=E&&$==="randomize"&&P.display==="cover"?A[Q]??be:be,O=`max(${S(T)}, ${Up}px)`,se=`calc(-0.5 * (${O} + ${S(T)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":Q,onMouseEnter:E&&$==="randomize"&&P.display==="cover"?()=>he(Q,be):void 0,children:[r.jsx(am,{item:xe,prefix:s,imageFit:P,imageMaxWidth:f,imageMaxHeight:L,cornerRadius:R,imageHoverClass:B,isEditor:n,isFirstSet:le,scaled:S,onFirstSetImageDone:pe}),X&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:se,width:O,height:"100%"}})]},`${We}-${Q}`)};if(W){const be=I?G&&H?"paused":"running":"paused",We=c>0&&h>0?c/h*1e3:0,Q=`${Math.max(0,We)/1e3}s`;return r.jsxs("div",{ref:k,className:nt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:ae>0?{height:ae}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:D,className:`${s}-marquee-track`,"data-direction":x,onMouseEnter:ve,onMouseLeave:J,style:{WebkitAnimationDuration:Q,animationDuration:Q,WebkitAnimationPlayState:be,animationPlayState:be},children:Array.from({length:ne},(le,xe)=>r.jsx("div",{ref:xe===0?U:void 0,className:nt(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:S(T),paddingRight:S(T)},"aria-hidden":xe>0,children:ce.map((O,se)=>Ae(O,xe,se,xe===0&&se<C))},`set-${xe}`))})]})}return r.jsxs("div",{ref:k,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:nt(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:S(T),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((be,We)=>Ae(be,0,We))},"marquee-static")]})},lm=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1693
1693
  import cn from 'classnames';
1694
1694
  import { CommonComponentProps } from '../props';
1695
1695
  import { scalingValue } from '../utils/scalingValue';
@@ -2472,7 +2472,7 @@ type MarqueeProps = {
2472
2472
  isPreviewMode?: boolean;
2473
2473
  isEditMode?: boolean;
2474
2474
  } & CommonComponentProps;
2475
- `,fm={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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},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,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},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","cornerRadius"]},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",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},ym={element:gm,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:fm,sourceCode:hm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function fl(e){return`
2475
+ `,cm={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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},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,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},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","cornerRadius"]},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",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},dm={element:sm,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:cm,sourceCode:lm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function um(e,t){const n=t>0?`${t}px`:"0px";return`
2476
2476
  .${e}-marquee-wrapper {
2477
2477
  overflow: hidden;
2478
2478
  width: 100%;
@@ -2480,13 +2480,13 @@ type MarqueeProps = {
2480
2480
  }
2481
2481
 
2482
2482
  @keyframes ${e}-marquee-left {
2483
- from { transform: translate3d(0, 0, 0); }
2484
- to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
2483
+ from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2484
+ to { -webkit-transform: translate3d(-${n}, 0, 0); transform: translate3d(-${n}, 0, 0); }
2485
2485
  }
2486
2486
 
2487
2487
  @keyframes ${e}-marquee-right {
2488
- from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
2489
- to { transform: translate3d(0, 0, 0); }
2488
+ from { -webkit-transform: translate3d(-${n}, 0, 0); transform: translate3d(-${n}, 0, 0); }
2489
+ to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2490
2490
  }
2491
2491
 
2492
2492
  .${e}-marquee-track {
@@ -2499,17 +2499,19 @@ type MarqueeProps = {
2499
2499
  -webkit-backface-visibility: hidden;
2500
2500
  -webkit-transform: translateZ(0);
2501
2501
  perspective: 1000px;
2502
- animation-duration: var(--marquee-duration);
2502
+ -webkit-animation-timing-function: linear;
2503
2503
  animation-timing-function: linear;
2504
+ -webkit-animation-iteration-count: infinite;
2504
2505
  animation-iteration-count: infinite;
2505
- animation-play-state: var(--marquee-play-state, running);
2506
2506
  }
2507
2507
 
2508
2508
  .${e}-marquee-track[data-direction="left"] {
2509
+ -webkit-animation-name: ${e}-marquee-left;
2509
2510
  animation-name: ${e}-marquee-left;
2510
2511
  }
2511
2512
 
2512
2513
  .${e}-marquee-track[data-direction="right"] {
2514
+ -webkit-animation-name: ${e}-marquee-right;
2513
2515
  animation-name: ${e}-marquee-right;
2514
2516
  }
2515
2517
 
@@ -2559,7 +2561,7 @@ type MarqueeProps = {
2559
2561
  pointer-events: auto;
2560
2562
  z-index: 10;
2561
2563
  }
2562
- `}const vm=30,yl=2,bm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=v.useScopedStyles(),{align:s,speed:c,direction:d,pauseOnHover:u,gap:m,cardWidth:x,corners:w,stroke:$,strokeColor:f,bgColor:S,padding:L,logoMarginTop:M,logoWidth:A,logoHeight:C,captionMarginTop:J}=e,k=!!o,U=((t==null?void 0:t.length)??0)>0,I=c>0&&(!n||i),R=U&&(I||n),T=Math.max(0,c)*vm,y=D=>v.scalingValue(D,n??!1),h=a.useRef(null),F=a.useRef(null),W=a.useRef(null),[V,ne]=a.useState(0),[X,z]=a.useState(0),[H,_]=a.useState(0),E=I&&u==="on",[q,Y]=a.useState(!1),ee=a.useRef(null),[N,pe]=a.useState(0),[b,ye]=a.useState(0),Q=a.useRef(null),xe=D=>{var ae,ge,ce,be,Ee;return{fontSettings:{fontFamily:(e==null?void 0:e[`${D}FontFamily`])??"Arial",fontWeight:((ae=e==null?void 0:e[`${D}FontSettings`])==null?void 0:ae.fontWeight)??400,fontStyle:((ge=e==null?void 0:e[`${D}FontSettings`])==null?void 0:ge.fontStyle)??"normal"},textAppearance:{textTransform:((ce=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:ce.textTransform)??"none",textDecoration:((be=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:be.textDecoration)??"none",fontVariant:((Ee=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:Ee.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${D}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${D}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${D}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${D}LineHeight`])??.01,color:(e==null?void 0:e[`${D}Color`])??"#000000"}},$e=xe("text"),oe=xe("caption"),ie=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(D=>{var K,ae;return(((K=D.text)==null?void 0:K.length)??0)>0||(((ae=D.caption)==null?void 0:ae.length)??0)>0}),[t]),B=a.useMemo(()=>!R||(t==null?void 0:t.length)===0?1:X<=0||V<=0?yl:Math.max(yl,Math.ceil(V/X)+1),[R,t==null?void 0:t.length,X,V]);a.useLayoutEffect(()=>{if(!R)return;const D=h.current,K=W.current;if(!D||!K)return;let ae=0;const ge=()=>{const Ee=D.getBoundingClientRect().width,Z=K.getBoundingClientRect().width,de=Q.current,We=typeof de=="number"&&Math.abs(de-Z)<=.25;if(Q.current=Z,ne(Ee),typeof Z=="number"&&Z>0&&X<=0){z(Z);return}We&&Z!==X?z(Z):!We&&X<=0&&(cancelAnimationFrame(ae),ae=requestAnimationFrame(ge))},ce=()=>{cancelAnimationFrame(ae),ae=requestAnimationFrame(ge)};ce();const be=new ResizeObserver(ce);return be.observe(D),be.observe(K),()=>{cancelAnimationFrame(ae),be.disconnect()}},[I,R,X]),a.useLayoutEffect(()=>{const D=F.current;if(!R||!D)return;const K=X>0?X:0,ae=K>0&&T>0?K/T*1e3:0,ge=`${Math.max(0,ae)/1e3}s`;D.style.setProperty("--marquee-distance",`${K}px`),D.style.setProperty("--marquee-duration",ge)},[I,R,T,X]),a.useLayoutEffect(()=>{if(!R){_(0);return}const D=W.current,K=F.current;if(!D||!K)return;const ae=()=>{let ce=0;for(let be=0;be<D.children.length;be++){const Z=D.children[be].firstElementChild;Z&&(ce=Math.max(ce,Z.offsetHeight))}ce<=0&&(ce=K.offsetHeight),_(ce>0?ce:0)};ae();const ge=new ResizeObserver(ae);return ge.observe(D),ge.observe(K),()=>{ge.disconnect()}},[R,B,t,n,m,x,L,$,w,A,C,N,b]);const le=()=>{E&&Y(!0)},re=()=>{E&&Y(!1)},ke=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),fe=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),Pe=a.useCallback((D,K,ae,ge)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ke,width:"100%"},children:[r.jsx("div",{"data-controls":k?ge==null?void 0:ge.controlsName:void 0,"data-controls-axis":k?"y":void 0,className:k?`${l}-control`:void 0,style:{height:y((ge==null?void 0:ge.marginTop)??0)}}),r.jsx("div",{...ge!=null&&ge.dataMeasureKind?{"data-testimonial-measure":ge.dataMeasureKind}:{},style:{...Xt(D,n),textAlign:fe,pointerEvents:"auto",...typeof(ge==null?void 0:ge.minHeightPx)=="number"&&ge.minHeightPx>0?{minHeight:ge.minHeightPx}:{}},children:r.jsx(mi,{content:K})})]},ae),[ke,fe,n,k,l,y]),ve=a.useCallback((D,K,ae)=>{var ge,ce,be;return r.jsxs("div",{style:{padding:`${y(L.top)} ${y(L.right)} ${y(L.bottom)} ${y(L.left)}`,width:y(x+$*2),height:"100%",borderRadius:y(w),border:`${y($)} solid ${f}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${l}-cover`,style:{background:S}}),r.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:ke,textAlign:fe},children:[D.text&&Pe($e,D.text,"text",ae!=null&&ae.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ae==null?void 0:ae.textMinHeightPx)=="number"&&ae.textMinHeightPx>0?{minHeightPx:ae.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ke,width:"100%"},children:[r.jsx("div",{"data-controls":k&&!(ae!=null&&ae.dataMeasureAttrs)?"logoMarginTop":void 0,className:k&&!(ae!=null&&ae.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:y(M)}}),r.jsx("div",{style:{width:y(A),height:y(C)},children:((ge=D.logo)==null?void 0:ge.url)&&r.jsx("img",{src:D.logo.url,alt:((ce=D.logo)==null?void 0:ce.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((be=D.logo)==null?void 0:be.objectFit)||"contain"}})})]}),D.caption&&Pe(oe,D.caption,"caption",{...ae!=null&&ae.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:J,...ae!=null&&ae.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ae==null?void 0:ae.captionMinHeightPx)=="number"&&ae.captionMinHeightPx>0?{minHeightPx:ae.captionMinHeightPx}:{}})]})]},K)},[S,J,oe,x,w,C,M,A,ke,fe,L.bottom,L.left,L.right,L.top,Pe,$,f,$e,n,k,l]),we=a.useCallback(D=>{pe(D.maxTextPx),ye(D.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!ie){we({maxTextPx:0,maxCaptionPx:0});return}const D=ee.current;if(!D)return;const K=()=>{v.readTestimonialTextMeasure(D,we)};K();const ae=new ResizeObserver(K);return ae.observe(D),()=>{ae.disconnect()}},[ie,we,t,ve]);const Se=ie?{textMinHeightPx:N,captionMinHeightPx:b}:void 0,G=ie?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((D,K)=>ve(D,`measure-${K}`,{dataMeasureAttrs:!0}))}):null,me=(D,K)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[ve(D,`card-${K}`,Se),k&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${y(m)})`,width:y(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},K);if(R){const D=I?E&&q?"paused":"running":"paused";return r.jsxs("div",{ref:h,className:at(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...H>0?{height:H}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:fl(l)}}),G,r.jsx("div",{ref:F,className:`${l}-marquee-track`,"data-direction":d,onMouseEnter:le,onMouseLeave:re,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":D},children:Array.from({length:B},(K,ae)=>r.jsx("div",{ref:ae===0?W:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:y(m),paddingRight:y(m)},"aria-hidden":ae>0,children:t==null?void 0:t.map((ge,ce)=>me(ge,`${ae}-${ce}`))},`set-${ae}`))})]})}return r.jsxs("div",{className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:fl(l)}}),G,r.jsx("div",{style:{gap:y(m),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((D,K)=>me(D,K))})]})},xm=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2564
+ `}const pm=30,ys=2,mm=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")},gm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:m,cardWidth:x,corners:b,stroke:T,strokeColor:f,bgColor:L,padding:$,logoMarginTop:R,logoWidth:P,logoHeight:C,captionMarginTop:X}=e,E=!!o,B=((t==null?void 0:t.length)??0)>0,I=d>0&&(!n||i),w=B&&(I||n),W=Math.max(0,d)*pm,h=_=>y.scalingValue(_,n??!1),S=a.useRef(null),k=a.useRef(null),D=a.useRef(null),[U,ae]=a.useState(0),[Y,G]=a.useState(0),H=Y>0?Y:0,F=a.useMemo(()=>um(s,H),[s,H]),[A,K]=a.useState(0),q=I&&u==="on",[ee,N]=a.useState(!1),ue=a.useRef(null),[v,ye]=a.useState(0),[Z,ce]=a.useState(0),$e=a.useRef(null),ne=_=>{var oe,z,re,ke,ie;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((oe=e==null?void 0:e[`${_}FontSettings`])==null?void 0:oe.fontWeight)??400,fontStyle:((z=e==null?void 0:e[`${_}FontSettings`])==null?void 0:z.fontStyle)??"normal"},textAppearance:{textTransform:((re=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:re.textTransform)??"none",textDecoration:((ke=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ke.textDecoration)??"none",fontVariant:((ie=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ie.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},ve=ne("text"),J=ne("caption"),pe=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var de,oe;return(((de=_.text)==null?void 0:de.length)??0)>0||(((oe=_.caption)==null?void 0:oe.length)??0)>0}),[t]),he=a.useMemo(()=>!w||(t==null?void 0:t.length)===0?1:Y<=0||U<=0?ys:Math.max(ys,Math.ceil(U/Y)+1),[w,t==null?void 0:t.length,Y,U]);a.useLayoutEffect(()=>{if(!w)return;const _=S.current,de=D.current;if(!_||!de)return;let oe=0;const z=()=>{const ie=_.getBoundingClientRect().width,j=de.getBoundingClientRect().width,Ne=$e.current,Me=typeof Ne=="number"&&Math.abs(Ne-j)<=.25;if($e.current=j,ae(ie),typeof j=="number"&&j>0&&Y<=0){G(j);return}Me&&j!==Y?G(j):!Me&&Y<=0&&(cancelAnimationFrame(oe),oe=requestAnimationFrame(z))},re=()=>{cancelAnimationFrame(oe),oe=requestAnimationFrame(z)};re();const ke=new ResizeObserver(re);return ke.observe(_),ke.observe(de),()=>{cancelAnimationFrame(oe),ke.disconnect()}},[I,w,Y]);const Ae=H>0&&W>0?H/W*1e3:0,be=`${Math.max(0,Ae)/1e3}s`;a.useLayoutEffect(()=>{if(!w||H<=0)return;const _=k.current;_&&mm(_)},[w,H,c]),a.useLayoutEffect(()=>{if(!w){K(0);return}const _=D.current,de=k.current;if(!_||!de)return;const oe=()=>{let re=0;for(let ke=0;ke<_.children.length;ke++){const j=_.children[ke].firstElementChild;j&&(re=Math.max(re,j.offsetHeight))}re<=0&&(re=de.offsetHeight),K(re>0?re:0)};oe();const z=new ResizeObserver(oe);return z.observe(_),z.observe(de),()=>{z.disconnect()}},[w,he,t,n,m,x,$,T,b,P,C,v,Z]);const We=()=>{q&&N(!0)},Q=()=>{q&&N(!1)},le=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),xe=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),O=a.useCallback((_,de,oe,z)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:le,width:"100%"},children:[r.jsx("div",{"data-controls":E?z==null?void 0:z.controlsName:void 0,"data-controls-axis":E?"y":void 0,className:E?`${s}-control`:void 0,style:{height:h((z==null?void 0:z.marginTop)??0)}}),r.jsx("div",{...z!=null&&z.dataMeasureKind?{"data-testimonial-measure":z.dataMeasureKind}:{},style:{...Xt(_,n),textAlign:xe,pointerEvents:"auto",...typeof(z==null?void 0:z.minHeightPx)=="number"&&z.minHeightPx>0?{minHeight:z.minHeightPx}:{}},children:r.jsx(mi,{content:de})})]},oe),[le,xe,n,E,s,h]),se=a.useCallback((_,de,oe)=>{var z,re,ke;return r.jsxs("div",{style:{padding:`${h($.top)} ${h($.right)} ${h($.bottom)} ${h($.left)}`,width:h(x+T*2),height:"100%",borderRadius:h(b),border:`${h(T)} solid ${f}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:L}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:le,textAlign:xe},children:[_.text&&O(ve,_.text,"text",oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(oe==null?void 0:oe.textMinHeightPx)=="number"&&oe.textMinHeightPx>0?{minHeightPx:oe.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:le,width:"100%"},children:[r.jsx("div",{"data-controls":E&&!(oe!=null&&oe.dataMeasureAttrs)?"logoMarginTop":void 0,className:E&&!(oe!=null&&oe.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:h(R)}}),r.jsx("div",{style:{width:h(P),height:h(C)},children:((z=_.logo)==null?void 0:z.url)&&r.jsx("img",{src:_.logo.url,alt:((re=_.logo)==null?void 0:re.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ke=_.logo)==null?void 0:ke.objectFit)||"contain"}})})]}),_.caption&&O(J,_.caption,"caption",{...oe!=null&&oe.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:X,...oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(oe==null?void 0:oe.captionMinHeightPx)=="number"&&oe.captionMinHeightPx>0?{minHeightPx:oe.captionMinHeightPx}:{}})]})]},de)},[L,X,J,x,b,C,R,P,le,xe,$.bottom,$.left,$.right,$.top,O,T,f,ve,n,E,s]),fe=a.useCallback(_=>{ye(_.maxTextPx),ce(_.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!pe){fe({maxTextPx:0,maxCaptionPx:0});return}const _=ue.current;if(!_)return;const de=()=>{y.readTestimonialTextMeasure(_,fe)};de();const oe=new ResizeObserver(de);return oe.observe(_),()=>{oe.disconnect()}},[pe,fe,t,se]);const Se=pe?{textMinHeightPx:v,captionMinHeightPx:Z}:void 0,Ie=pe?r.jsx("div",{ref:ue,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,de)=>se(_,`measure-${de}`,{dataMeasureAttrs:!0}))}):null,we=(_,de)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[se(_,`card-${de}`,Se),E&&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}})]},de);if(w){const _=I?q&&ee?"paused":"running":"paused";return r.jsxs("div",{ref:S,className:nt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...A>0?{height:A}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:F}}),Ie,r.jsx("div",{ref:k,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:We,onMouseLeave:Q,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:be,WebkitAnimationDuration:be,animationPlayState:_,WebkitAnimationPlayState:_},children:Array.from({length:he},(de,oe)=>r.jsx("div",{ref:oe===0?D:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:h(m),paddingRight:h(m)},"aria-hidden":oe>0,children:t==null?void 0:t.map((z,re)=>we(z,`${oe}-${re}`))},`set-${oe}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:F}}),Ie,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((_,de)=>we(_,de))})]})},hm=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2563
2565
  import cn from 'classnames';
2564
2566
  import { CommonComponentProps } from '../props';
2565
2567
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -2568,7 +2570,8 @@ import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
2568
2570
  import { useScopedStyles } from '../utils/useScopedStyles';
2569
2571
  import { readTestimonialTextMeasure } from '../utils/readTestimonialTextMeasure';
2570
2572
 
2571
- function getCSS(P: string): string {
2573
+ function getCSS(P: string, distancePx: number): string {
2574
+ const distance = distancePx > 0 ? \`\${distancePx}px\` : '0px';
2572
2575
  return \`
2573
2576
  .\${P}-marquee-wrapper {
2574
2577
  overflow: hidden;
@@ -2577,13 +2580,13 @@ function getCSS(P: string): string {
2577
2580
  }
2578
2581
 
2579
2582
  @keyframes \${P}-marquee-left {
2580
- from { transform: translate3d(0, 0, 0); }
2581
- to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
2583
+ from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2584
+ to { -webkit-transform: translate3d(-\${distance}, 0, 0); transform: translate3d(-\${distance}, 0, 0); }
2582
2585
  }
2583
2586
 
2584
2587
  @keyframes \${P}-marquee-right {
2585
- from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
2586
- to { transform: translate3d(0, 0, 0); }
2588
+ from { -webkit-transform: translate3d(-\${distance}, 0, 0); transform: translate3d(-\${distance}, 0, 0); }
2589
+ to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2587
2590
  }
2588
2591
 
2589
2592
  .\${P}-marquee-track {
@@ -2596,17 +2599,19 @@ function getCSS(P: string): string {
2596
2599
  -webkit-backface-visibility: hidden;
2597
2600
  -webkit-transform: translateZ(0);
2598
2601
  perspective: 1000px;
2599
- animation-duration: var(--marquee-duration);
2602
+ -webkit-animation-timing-function: linear;
2600
2603
  animation-timing-function: linear;
2604
+ -webkit-animation-iteration-count: infinite;
2601
2605
  animation-iteration-count: infinite;
2602
- animation-play-state: var(--marquee-play-state, running);
2603
2606
  }
2604
2607
 
2605
2608
  .\${P}-marquee-track[data-direction="left"] {
2609
+ -webkit-animation-name: \${P}-marquee-left;
2606
2610
  animation-name: \${P}-marquee-left;
2607
2611
  }
2608
2612
 
2609
2613
  .\${P}-marquee-track[data-direction="right"] {
2614
+ -webkit-animation-name: \${P}-marquee-right;
2610
2615
  animation-name: \${P}-marquee-right;
2611
2616
  }
2612
2617
 
@@ -2670,6 +2675,14 @@ type TestimonialsProps = {
2670
2675
  const PX_PER_SEC_PER_SPEED_UNIT = 30;
2671
2676
  const MIN_TRACK_COPIES = 2;
2672
2677
 
2678
+ const restartTrackAnimation = (track: HTMLElement) => {
2679
+ track.style.setProperty('animation-name', 'none');
2680
+ track.style.setProperty('-webkit-animation-name', 'none');
2681
+ void track.offsetHeight;
2682
+ track.style.removeProperty('animation-name');
2683
+ track.style.removeProperty('-webkit-animation-name');
2684
+ };
2685
+
2673
2686
  type RenderCardOpts = {
2674
2687
  textMinHeightPx?: number;
2675
2688
  captionMinHeightPx?: number;
@@ -2697,6 +2710,8 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode, is
2697
2710
  const setRef = useRef<HTMLDivElement | null>(null);
2698
2711
  const [containerWidth, setContainerWidth] = useState(0);
2699
2712
  const [setWidth, setSetWidth] = useState(0);
2713
+ const animationDistance = setWidth > 0 ? setWidth : 0;
2714
+ const scopedCss = useMemo(() => getCSS(P, animationDistance), [P, animationDistance]);
2700
2715
  const [trackHeight, setTrackHeight] = useState(0);
2701
2716
  const hoverPauseEnabled = autoplayEnabled && (pauseOnHover === 'on');
2702
2717
  const [isHovering, setIsHovering] = useState(false);
@@ -2779,15 +2794,15 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode, is
2779
2794
  };
2780
2795
  }, [autoplayEnabled, useMarqueeTrack, setWidth]);
2781
2796
 
2797
+ const durationMs = animationDistance > 0 && pxPerSec > 0 ? (animationDistance / pxPerSec) * 1000 : 0;
2798
+ const durationS = \`\${Math.max(0, durationMs) / 1000}s\`;
2799
+
2782
2800
  useLayoutEffect(() => {
2801
+ if (!useMarqueeTrack || animationDistance <= 0) return;
2783
2802
  const track = trackRef.current;
2784
- if (!useMarqueeTrack || !track) return;
2785
- const safeSetWidth = setWidth > 0 ? setWidth : 0;
2786
- const durationMs = safeSetWidth > 0 && pxPerSec > 0 ? (safeSetWidth / pxPerSec) * 1000 : 0;
2787
- const durationS = \`\${Math.max(0, durationMs) / 1000}s\`;
2788
- track.style.setProperty('--marquee-distance', \`\${safeSetWidth}px\`);
2789
- track.style.setProperty('--marquee-duration', durationS);
2790
- }, [autoplayEnabled, useMarqueeTrack, pxPerSec, setWidth]);
2803
+ if (!track) return;
2804
+ restartTrackAnimation(track);
2805
+ }, [useMarqueeTrack, animationDistance, direction]);
2791
2806
 
2792
2807
  useLayoutEffect(() => {
2793
2808
  if (!useMarqueeTrack) {
@@ -3072,7 +3087,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode, is
3072
3087
  ...(trackHeight > 0 ? { height: trackHeight } : {}),
3073
3088
  }}
3074
3089
  >
3075
- <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
3090
+ <style dangerouslySetInnerHTML={{ __html: scopedCss }} />
3076
3091
  {measureLayerEl}
3077
3092
  <div
3078
3093
  ref={trackRef}
@@ -3091,7 +3106,10 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode, is
3091
3106
  transform: 'translateZ(0)',
3092
3107
  WebkitTransform: 'translateZ(0)',
3093
3108
  perspective: '1000px',
3094
- ...( { '--marquee-play-state': marqueePlayState } as React.CSSProperties),
3109
+ animationDuration: durationS,
3110
+ WebkitAnimationDuration: durationS,
3111
+ animationPlayState: marqueePlayState,
3112
+ WebkitAnimationPlayState: marqueePlayState,
3095
3113
  }}
3096
3114
  >
3097
3115
  {Array.from({ length: copies }, (_, copyIndex) => (
@@ -3120,7 +3138,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode, is
3120
3138
 
3121
3139
  return (
3122
3140
  <div className={\`\${P}-wrapper\`}>
3123
- <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
3141
+ <style dangerouslySetInnerHTML={{ __html: scopedCss }} />
3124
3142
  {measureLayerEl}
3125
3143
  <div
3126
3144
  style={{
@@ -3174,7 +3192,7 @@ type TestimonialsSettings = {
3174
3192
  logoHeight: number;
3175
3193
  captionMarginTop: number;
3176
3194
  };
3177
- `,vl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},wm={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 Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",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:{...vl.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:{...vl.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"}]}]}]}},Sm={element:bm,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:wm,sourceCode:xm,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function $m(e){return`
3195
+ `,vs={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},fm={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 Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",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:{...vs.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:{...vs.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"}]}]}]}},ym={element:gm,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:fm,sourceCode:hm,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function vm(e){return`
3178
3196
  .${e}-container {
3179
3197
  position: relative;
3180
3198
  overflow-x: clip;
@@ -3298,7 +3316,7 @@ type TestimonialsSettings = {
3298
3316
  width: 100%;
3299
3317
  height: 100%;
3300
3318
  }
3301
- `}const Cm=3e3,Tm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=v.useScopedStyles(),s=t||[],{speed:c,align:d,width:u,imageMarginTop:m,textMarginTop:x,captionMarginTop:w,imageWidth:$,imageHeight:f,controlsWidth:S,controlsColor:L,controlsHoverColor:M}=e,A=c>0&&(!n||!!i),[C,J]=a.useState(0),[k,U]=a.useState(null),[I,R]=a.useState(!1),T=a.useRef(null),y=a.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),h=a.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);a.useEffect(()=>{J(0),U(null),R(!1)},[s.length]);const F=s[C],W=k===null?null:s[k],V=oe=>{var B,le,re,ke,fe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${oe}FontFamily`])??"Arial",fontWeight:((B=e==null?void 0:e[`${oe}FontSettings`])==null?void 0:B.fontWeight)??400,fontStyle:((le=e==null?void 0:e[`${oe}FontSettings`])==null?void 0:le.fontStyle)??"normal"},textAppearance:{textTransform:((re=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:re.textTransform)??"none",textDecoration:((ke=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:ke.textDecoration)??"none",fontVariant:((fe=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:fe.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"}},ne=V("text"),X=V("caption"),z=s.length>1&&s.some(oe=>{var ie,B;return(((ie=oe.text)==null?void 0:ie.length)??0)>0||(((B=oe.caption)==null?void 0:B.length)??0)>0}),H=a.useRef(null),[_,E]=a.useState(0),[q,Y]=a.useState(0),ee=e.controls??{mode:"Off",icon:null},N=s.length>1,pe=a.useCallback((oe,ie)=>!N||ie===oe?oe:(T.current&&window.clearTimeout(T.current),U(oe),R(!0),T.current=window.setTimeout(()=>{U(null),R(!1),T.current=null},300),ie),[N]),b=a.useCallback(()=>{N&&J(oe=>pe(oe,(oe-1+s.length)%s.length))},[N,pe,s.length]),ye=a.useCallback(()=>{N&&J(oe=>pe(oe,(oe+1)%s.length))},[N,pe,s.length]);a.useEffect(()=>{if(!A||!N)return;const oe=Math.max(300,Cm/c),ie=window.setInterval(()=>{J(B=>pe(B,(B+1)%s.length))},oe);return()=>{window.clearInterval(ie)}},[A,N,pe,s.length,c]),a.useEffect(()=>()=>{T.current&&window.clearTimeout(T.current)},[]);const Q=(oe,ie)=>{var fe,Pe,ve,we;const B=ie==null?void 0:ie.textMinHeightPx,le=ie==null?void 0:ie.captionMinHeightPx,re=ie==null?void 0:ie.dataMeasureAttrs,ke=o&&!(ie!=null&&ie.dataMeasureAttrs)&&!(ie!=null&&ie.hideControls);return r.jsxs(r.Fragment,{children:[oe.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"textMarginTop":void 0,className:ke?`${l}-control`:void 0,style:{height:v.scalingValue(x??0,n??!1)}}),r.jsx("div",{...re&&{"data-testimonial-measure":"text"},style:{...Xt(ne,n),...B&&B>0?{minHeight:B}:{},textAlign:h,pointerEvents:"auto"},children:r.jsx(mi,{content:oe.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"imageMarginTop":void 0,className:ke?`${l}-control`:void 0,style:{height:v.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:v.scalingValue($??0,n??!1),height:v.scalingValue(f??0,n??!1)},children:((fe=oe.image)==null?void 0:fe.url)&&r.jsx("img",{src:(Pe=oe.image)==null?void 0:Pe.url,alt:((ve=oe.image)==null?void 0:ve.name)??"",className:`${l}-icon`,style:{objectFit:((we=oe.image)==null?void 0:we.objectFit)||"contain"}})})]}),oe.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"captionMarginTop":void 0,className:ke?`${l}-control`:void 0,style:{height:v.scalingValue(w??0,n??!1)}}),r.jsx("div",{...re?{"data-testimonial-measure":"caption"}:{},style:{...Xt(X,n),...le&&le>0?{minHeight:le}:{},textAlign:h,pointerEvents:"auto"},children:r.jsx(mi,{content:oe.caption})})]})]})},xe=a.useCallback(oe=>{E(oe.maxTextPx),Y(oe.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!z){xe({maxTextPx:0,maxCaptionPx:0});return}const oe=H.current;if(!oe)return;const ie=()=>{v.readTestimonialTextMeasure(oe,xe)};ie();const B=new ResizeObserver(ie);return B.observe(oe),()=>{B.disconnect()}},[z,xe,t]),!F)return r.jsx(r.Fragment,{});const $e=z?{textMinHeightPx:_,captionMinHeightPx:q}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${l}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$m(l)}}),r.jsxs("div",{className:`${l}-wrapper`,style:{width:v.scalingValue(u??0,n??!1),alignItems:y},children:[z&&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:s.map((oe,ie)=>r.jsx("div",{style:{width:"100%"},children:Q(oe,{dataMeasureAttrs:!0})},ie))}),r.jsxs("div",{className:`${l}-fade-stack`,children:[W&&I&&r.jsx("div",{className:at(`${l}-fade-item-prev`,`${l}-fade-out`),children:Q(W,{...$e,hideControls:!0})}),r.jsx("div",{className:at(`${l}-fade-item-current`,I?`${l}-fade-in`:void 0),children:Q(F,$e)})]})]}),ee.mode==="On"&&r.jsxs("div",{className:`${l}-controls`,children:[r.jsx("div",{className:`${l}-arrow`,style:{width:v.scalingValue(S??.02,n??!1),height:v.scalingValue(S??.02,n??!1),"--arrow-hover-color":M},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:b,disabled:!N,"aria-label":"Previous testimonial",children:ee.icon&&r.jsx(on,{url:ee.icon,fill:L,hoverFill:M,className:at(`${l}-arrow-img`,`${l}-mirror`)})})}),r.jsx("div",{className:at(`${l}-arrow`,`${l}-next-arrow`),style:{width:v.scalingValue(S??.02,n??!1),height:v.scalingValue(S??.02,n??!1),"--arrow-hover-color":M},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:ye,disabled:!N,"aria-label":"Next testimonial",children:ee.icon&&r.jsx(on,{url:ee.icon,fill:L,hoverFill:M,className:`${l}-arrow-img`})})})]})]})})},Lm=`import cn from 'classnames';
3319
+ `}const xm=3e3,bm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:m,textMarginTop:x,captionMarginTop:b,imageWidth:T,imageHeight:f,controlsWidth:L,controlsColor:$,controlsHoverColor:R}=e,P=d>0&&(!n||!!i),[C,X]=a.useState(0),[E,B]=a.useState(null),[I,w]=a.useState(!1),W=a.useRef(null),h=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),S=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{X(0),B(null),w(!1)},[l.length]);const k=l[C],D=E===null?null:l[E],U=ne=>{var J,pe,he,Ae,be;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ne}FontFamily`])??"Arial",fontWeight:((J=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:J.fontWeight)??400,fontStyle:((pe=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:pe.fontStyle)??"normal"},textAppearance:{textTransform:((he=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:he.textTransform)??"none",textDecoration:((Ae=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:Ae.textDecoration)??"none",fontVariant:((be=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:be.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ne}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ne}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ne}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ne}WordSpacing`])??0,color:(e==null?void 0:e[`${ne}Color`])??"#000000"}},ae=U("text"),Y=U("caption"),G=l.length>1&&l.some(ne=>{var ve,J;return(((ve=ne.text)==null?void 0:ve.length)??0)>0||(((J=ne.caption)==null?void 0:J.length)??0)>0}),H=a.useRef(null),[F,A]=a.useState(0),[K,q]=a.useState(0),ee=e.controls??{mode:"Off",icon:null},N=l.length>1,ue=a.useCallback((ne,ve)=>!N||ve===ne?ne:(W.current&&window.clearTimeout(W.current),B(ne),w(!0),W.current=window.setTimeout(()=>{B(null),w(!1),W.current=null},300),ve),[N]),v=a.useCallback(()=>{N&&X(ne=>ue(ne,(ne-1+l.length)%l.length))},[N,ue,l.length]),ye=a.useCallback(()=>{N&&X(ne=>ue(ne,(ne+1)%l.length))},[N,ue,l.length]);a.useEffect(()=>{if(!P||!N)return;const ne=Math.max(300,xm/d),ve=window.setInterval(()=>{X(J=>ue(J,(J+1)%l.length))},ne);return()=>{window.clearInterval(ve)}},[P,N,ue,l.length,d]),a.useEffect(()=>()=>{W.current&&window.clearTimeout(W.current)},[]);const Z=(ne,ve)=>{var be,We,Q,le;const J=ve==null?void 0:ve.textMinHeightPx,pe=ve==null?void 0:ve.captionMinHeightPx,he=ve==null?void 0:ve.dataMeasureAttrs,Ae=o&&!(ve!=null&&ve.dataMeasureAttrs)&&!(ve!=null&&ve.hideControls);return r.jsxs(r.Fragment,{children:[ne.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":Ae?"textMarginTop":void 0,className:Ae?`${s}-control`:void 0,style:{height:y.scalingValue(x??0,n??!1)}}),r.jsx("div",{...he&&{"data-testimonial-measure":"text"},style:{...Xt(ae,n),...J&&J>0?{minHeight:J}:{},textAlign:S,pointerEvents:"auto"},children:r.jsx(mi,{content:ne.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":Ae?"imageMarginTop":void 0,className:Ae?`${s}-control`:void 0,style:{height:y.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:y.scalingValue(T??0,n??!1),height:y.scalingValue(f??0,n??!1)},children:((be=ne.image)==null?void 0:be.url)&&r.jsx("img",{src:(We=ne.image)==null?void 0:We.url,alt:((Q=ne.image)==null?void 0:Q.name)??"",className:`${s}-icon`,style:{objectFit:((le=ne.image)==null?void 0:le.objectFit)||"contain"}})})]}),ne.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":Ae?"captionMarginTop":void 0,className:Ae?`${s}-control`:void 0,style:{height:y.scalingValue(b??0,n??!1)}}),r.jsx("div",{...he?{"data-testimonial-measure":"caption"}:{},style:{...Xt(Y,n),...pe&&pe>0?{minHeight:pe}:{},textAlign:S,pointerEvents:"auto"},children:r.jsx(mi,{content:ne.caption})})]})]})},ce=a.useCallback(ne=>{A(ne.maxTextPx),q(ne.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!G){ce({maxTextPx:0,maxCaptionPx:0});return}const ne=H.current;if(!ne)return;const ve=()=>{y.readTestimonialTextMeasure(ne,ce)};ve();const J=new ResizeObserver(ve);return J.observe(ne),()=>{J.disconnect()}},[G,ce,t]),!k)return r.jsx(r.Fragment,{});const $e=G?{textMinHeightPx:F,captionMinHeightPx:K}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:vm(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:y.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((ne,ve)=>r.jsx("div",{style:{width:"100%"},children:Z(ne,{dataMeasureAttrs:!0})},ve))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[D&&I&&r.jsx("div",{className:nt(`${s}-fade-item-prev`,`${s}-fade-out`),children:Z(D,{...$e,hideControls:!0})}),r.jsx("div",{className:nt(`${s}-fade-item-current`,I?`${s}-fade-in`:void 0),children:Z(k,$e)})]})]}),ee.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:y.scalingValue(L??.02,n??!1),height:y.scalingValue(L??.02,n??!1),"--arrow-hover-color":R},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:v,disabled:!N,"aria-label":"Previous testimonial",children:ee.icon&&r.jsx(rn,{url:ee.icon,fill:$,hoverFill:R,className:nt(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:nt(`${s}-arrow`,`${s}-next-arrow`),style:{width:y.scalingValue(L??.02,n??!1),height:y.scalingValue(L??.02,n??!1),"--arrow-hover-color":R},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:ye,disabled:!N,"aria-label":"Next testimonial",children:ee.icon&&r.jsx(rn,{url:ee.icon,fill:$,hoverFill:R,className:`${s}-arrow-img`})})})]})]})})},wm=`import cn from 'classnames';
3302
3320
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3303
3321
  import { CommonComponentProps } from '../props';
3304
3322
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3794,12 +3812,12 @@ type TestimonialsSettings = {
3794
3812
  icon?: string | null;
3795
3813
  };
3796
3814
  };
3797
- `,Im="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>'),bl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Rm={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:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",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:{...bl.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:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...bl.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:"Text Default"}},defaults:{controls:{mode:"On",icon:Im},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"}]}]}]}},Em={element:Tm,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:Rm,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 Mm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function xl(e){return((e==null?void 0:e.trim().length)??0)>0}function Nr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Or(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:v.scalingValue((o-t)/2,i)}}function km(e){return`
3815
+ `,Sm="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>'),xs={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},$m={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:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",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:{...xs.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:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...xs.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:"Text Default"}},defaults:{controls:{mode:"On",icon:Sm},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"}]}]}]}},Cm={element:bm,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:$m,sourceCode:wm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Tm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bs(e){return((e==null?void 0:e.trim().length)??0)>0}function jr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Or(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((o-t)/2,i)}}function Lm(e){return`
3798
3816
  .${e}-wrapper {
3799
3817
  display: grid;
3800
3818
  align-items: start;
3801
3819
  justify-content: center;
3802
- min-height: ${Mm(48)};
3820
+ min-height: ${Tm(48)};
3803
3821
  }
3804
3822
  .${e}-item {
3805
3823
  display: flex;
@@ -4137,7 +4155,7 @@ type TestimonialsSettings = {
4137
4155
  z-index: 2;
4138
4156
  width: 100%;
4139
4157
  }
4140
- `}const $n=500,Pm=750,Hn="cubic-bezier(0.22, 1, 0.36, 1)",Am=72,Fm=50;function Wm(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 _m(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Hm(e){const[t]=e.media;return t!=null&&t.url?t:null}function Nm(e){return!Array.isArray(e)||e.length===0?[]:Wm(e)?e.flatMap(t=>{const n=_m(t);if(!n)return[];const i=Hm(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ii(e){return e.type==="video"}function Om(e){e.pause(),e.removeAttribute("src"),e.load()}function wl({media:e,className:t,style:n,onMediaClick:i}){return Ii(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Sl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function jm(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const l=e.width/n;return{width:e.width,height:l,left:e.left,top:e.top+(e.height-l)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function zm({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:l,onMouseMove:s}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{Om(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:l,onMouseMove:s,style:i})}function Bm({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:l,onPrev:s,onNext:c,counterClassName:d,counterStyle:u}){const m=i==="cover",x=a.useRef(null),w=a.useRef(null),$=a.useRef(null),f=a.useRef(null),S=a.useRef(0),L=a.useRef(0),M=a.useRef("none"),A=a.useRef(!1),C=a.useRef(!1),J=a.useRef(null),k=a.useRef(0),U=a.useRef(null),I=a.useRef(!1),R=a.useRef(null),[T,y]=a.useState(null),[h,F]=a.useState(null),[W,V]=a.useState("opening"),[ne,X]=a.useState(0),[z,H]=a.useState(0),[_,E]=a.useState(null),[q,Y]=a.useState(!1),[ee,N]=a.useState(!1),[pe,b]=a.useState(!1),[ye,Q]=a.useState(null),xe=a.useRef(n),$e=t[n],oe=$e?Ii($e):!1,ie=_!==null,B=a.useCallback(Ce=>{const Fe=Ce.currentTarget,He=Fe instanceof HTMLVideoElement?{width:Fe.videoWidth,height:Fe.videoHeight}:{width:Fe.naturalWidth,height:Fe.naturalHeight};!He.width||!He.height||Q(He)},[]);a.useEffect(()=>{J.current=h},[h]),a.useEffect(()=>{const Ce=x.current;if(!Ce)return;const Fe=()=>F(Sl(Ce));Fe();const He=new ResizeObserver(Fe);return He.observe(Ce),()=>He.disconnect()},[]);const le=a.useCallback(()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)},[]),re=a.useCallback(()=>{le(),k.current=0,U.current=null,I.current=!1,H(0),E(null),Y(!1)},[le]),ke=a.useCallback(Ce=>{re(),Ce===1?c():s()},[c,s,re]),fe=a.useCallback((Ce,Fe)=>{var Tt;const He=((Tt=J.current)==null?void 0:Tt.width)??0;le(),U.current=Ce,E(Ce),I.current=!0,Y(!0);const Ze=Fe?-Ce*He:0;k.current=Ze,H(Ze),R.current=window.setTimeout(()=>{R.current=null,Fe?ke(Ce):re()},$n+32)},[le,ke,re]),Pe=a.useCallback(Ce=>{I.current||t.length<=1||(U.current=Ce,E(Ce),I.current=!1,Y(!1),k.current=0,H(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{fe(Ce,!0)})}))},[t.length,fe]),ve=a.useCallback(()=>{const Ce=w.current;if(!Ce)return;const Fe=Sl(Ce);!Fe.width||!Fe.height||y(Fe)},[]);a.useEffect(()=>{ve();const Ce=w.current;if(!Ce)return;const Fe=new ResizeObserver(()=>ve());return Fe.observe(Ce),()=>Fe.disconnect()},[ve]),a.useEffect(()=>{W==="opening"&&T&&V("open")},[W,T]),a.useEffect(()=>{if(W!=="closing")return;const Ce=setTimeout(()=>l(),$n);return()=>clearTimeout(Ce)},[W,l]),a.useEffect(()=>()=>{le()},[le]),a.useLayoutEffect(()=>{xe.current!==n&&(re(),X(0),b(!1),N(!1),Q(null),S.current=0,L.current=0,M.current="none",A.current=!1,f.current=null,C.current=!1,xe.current=n)},[n,re]),a.useEffect(()=>{if(W!=="open")return;let Ce=null;const Fe=()=>{Ce&&(document.removeEventListener("click",Ce,!0),Ce=null)},He=()=>{Fe(),Ce=et=>{et.stopPropagation(),et.preventDefault(),Fe()},document.addEventListener("click",Ce,!0)},Ze=et=>{const dt=et<0?1:-1;if(Math.abs(et)>Fm&&t.length>1){fe(dt,!0);return}fe(dt,!1)},Tt=et=>{if(et.touches.length!==1||I.current)return;const dt=et.touches[0];C.current=!0,f.current={x:dt.clientX,y:dt.clientY},M.current="none",L.current=0,A.current=!1},it=et=>{if(!f.current||et.touches.length!==1||I.current)return;const dt=et.touches[0],lt=dt.clientX-f.current.x,ht=dt.clientY-f.current.y;if(M.current==="none"){if(Math.abs(lt)<10&&Math.abs(ht)<10)return;if(Math.abs(lt)>Math.abs(ht)){if(t.length<=1)return;M.current="horizontal"}else if(ht>0)M.current="vertical";else return}if(M.current==="horizontal"){A.current=!0,N(!0),L.current=lt;const Rt=lt<0?1:-1;U.current!==Rt&&(U.current=Rt,E(Rt)),k.current=lt,H(lt),et.preventDefault();return}M.current==="vertical"&&(A.current=!0,N(!0),S.current=ht,X(ht),et.preventDefault())},De=()=>{if(!f.current)return;const et=M.current,dt=A.current;if(dt&&et==="horizontal")Ze(L.current),He();else if(dt&&et==="vertical")if(S.current>Am){const ht=window.innerHeight;S.current=ht,b(!0),X(ht),V("closing")}else S.current=0,X(0),He();else et==="horizontal"&&Math.abs(L.current)>0&&(Ze(L.current),He());f.current=null,M.current="none",L.current=0,A.current=!1,N(!1)};return document.addEventListener("touchstart",Tt,{passive:!0}),document.addEventListener("touchmove",it,{passive:!1}),document.addEventListener("touchend",De),document.addEventListener("touchcancel",De),()=>{document.removeEventListener("touchstart",Tt),document.removeEventListener("touchmove",it),document.removeEventListener("touchend",De),document.removeEventListener("touchcancel",De),Fe()}},[W,t.length,fe]),a.useEffect(()=>{const Ce=Fe=>{Fe.key==="Escape"&&(Fe.preventDefault(),Fe.stopPropagation(),W!=="closing"&&V("closing"))};return window.addEventListener("keydown",Ce,!0),()=>window.removeEventListener("keydown",Ce,!0)},[W]);const we=()=>{W!=="closing"&&V("closing")},Se=W==="open",G=W==="closing",me=ne>0?Math.max(0,1-ne/500):1,D=ne>0?Math.max(.35,1-ne/500):1,K=T?m?T:jm(T,ye):null,ae=Ce=>{if(Ce.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const Fe=K??Ce.currentTarget.getBoundingClientRect(),He=Ce.clientY-Fe.top,Ze=Math.min(52,Fe.height*.2);if(!(He>Fe.height-Ze)){if(Ce.clientX-Fe.left<Fe.width/2){Pe(-1);return}Pe(1)}},ge=Ce=>{if(t.length<=1)return;const Fe=K??Ce.currentTarget.getBoundingClientRect(),He=Ce.clientX-Fe.left,Ze=Ce.clientY-Fe.top,Tt=Math.min(52,Fe.height*.2);if(Ze>Fe.height-Tt){Ce.currentTarget.style.cursor="default";return}Ce.currentTarget.style.cursor=He<Fe.width/2?"w-resize":"e-resize"},ce={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,zIndex:9998},be=m?"cover":"contain",Ee=z!==0||ne>0?`translate(${z}px, ${ne}px)`:void 0,Z=ee&&!q?"none":q?`transform ${$n}ms ${Hn}`:pe?`transform ${$n}ms ${Hn}, opacity ${$n}ms ${Hn}`:W==="opening"||G?`opacity ${$n}ms ${Hn}`:"none",de={...ce,transform:Ee,opacity:ne>0?D:W==="opening"||G?0:1,transition:Z,pointerEvents:"none"},We={position:"absolute",top:((K==null?void 0:K.top)??0)-((h==null?void 0:h.top)??0),left:((K==null?void 0:K.left)??0)-((h==null?void 0:h.left)??0),width:K==null?void 0:K.width,height:K==null?void 0:K.height,objectFit:be,pointerEvents:oe&&Se&&!ie?"auto":"none",touchAction:oe&&Se?"none":void 0},se=(h==null?void 0:h.width)??0,O=ie?(n+_+t.length)%t.length:null,Oe=O!==null?t[O]:null,_e={...ce,transform:ie?`translateX(${_*se+z}px)`:void 0,opacity:1,transition:q?`transform ${$n}ms ${Hn}`:"none",pointerEvents:"none"},nt={position:"absolute",top:((T==null?void 0:T.top)??0)-((h==null?void 0:h.top)??0),left:((T==null?void 0:T.left)??0)-((h==null?void 0:h.left)??0),width:T==null?void 0:T.width,height:T==null?void 0:T.height,objectFit:be,pointerEvents:"none"},Ue=K?{position:"fixed",top:K.top,height:K.height,width:K.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:x,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:W==="open"?"none":void 0},onClick:we,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Se?me:0,transition:ee?"none":`opacity ${$n}ms ${Hn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:m?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,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:Se?1:0,transition:`opacity ${$n}ms ${Hn}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:d,style:u,children:[n+1," / ",t.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:w,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Se?1:0,transition:`opacity ${$n}ms ${Hn}`},children:t.length>1&&r.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),T&&h&&Oe&&r.jsx("div",{style:_e,children:Ii(Oe)?r.jsx("video",{src:Oe.url,muted:!0,playsInline:!0,preload:"auto",style:nt},`neighbor-${O}-${Oe.url}`):r.jsx("img",{src:Oe.url,alt:Oe.name,style:nt},`neighbor-${O}-${Oe.url}`)}),T&&h&&$e&&r.jsx("div",{style:de,children:oe?r.jsx(zm,{src:$e.url,phase:W,mediaRef:$,mediaStyle:We,onLoadedMetadata:B,onClick:ae,onMouseMove:ge},`${n}-${$e.url}`):r.jsx("img",{ref:$,src:$e.url,alt:$e.name,onLoad:B,style:We},`${n}-${$e.url}`)}),Se&&Ue&&t.length>1&&!oe&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Ue,left:K.left,cursor:"w-resize",pointerEvents:ie?"none":"auto"},onClick:Ce=>{if(C.current){C.current=!1;return}Ce.stopPropagation(),Pe(-1)}}),r.jsx("div",{style:{...Ue,left:K.left+K.width/2,cursor:"e-resize",pointerEvents:ie?"none":"auto"},onClick:Ce=>{if(C.current){C.current=!1;return}Ce.stopPropagation(),Pe(1)}})]})]})}function Dm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Vm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:l,activeEvent:s,layoutId:c,portalId:d}){const{prefix:u}=v.useScopedStyles(),{type:m="a",gridLayout:x,textBoxWidth:w=100,verticalGap:$,entriesCount:f,lightbox:S,imageDisplay:L,imageCorners:M,lightboxImageDisplay:A,slider:C,sliderTiming:J,direction:k,transition:U,titleMarginTop:I,subtitleMarginTop:R,titleColor:T,subtitleColor:y,lightboxCounterColor:h,titleFontFamily:F,titleFontSettings:W,titleFontSize:V,titleLineHeight:ne,titleLetterSpacing:X,titleWordSpacing:z,titleTextAppearance:H,subtitleFontFamily:_,subtitleFontSettings:E,subtitleFontSize:q,subtitleLineHeight:Y,subtitleLetterSpacing:ee,subtitleWordSpacing:N,subtitleTextAppearance:pe,lightboxCounterFontFamily:b,lightboxCounterFontSettings:ye,lightboxCounterFontSize:Q,lightboxCounterLineHeight:xe,lightboxCounterLetterSpacing:$e,lightboxCounterWordSpacing:oe,lightboxCounterTextAppearance:ie,showText:B="always",alignEntries:le="off",align:re="top"}=e,ke={fontSettings:{fontFamily:F,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:V??.01,lineHeight:ne,letterSpacing:X??0,wordSpacing:z??0,textAppearance:H,color:T},Pe={...dn(Xt(ke,n))},ve={fontSettings:{fontFamily:_,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:q??.01,lineHeight:Y,letterSpacing:ee??0,wordSpacing:N??0,textAppearance:pe,color:y},Se={...dn(Xt(ve,n))},G={fontSettings:{fontFamily:b,fontWeight:(ye==null?void 0:ye.fontWeight)??400,fontStyle:(ye==null?void 0:ye.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:xe,letterSpacing:$e??0,wordSpacing:oe??0,textAppearance:ie,color:h},D={...dn(Xt(G,n)),...Or(Q,xe,u,n)},K=Nr(V,ne,`${u}-item-title`,`${u}-text-tight-leading`),ae=Nr(q,Y,`${u}-item-subtitle`,`${u}-text-tight-leading`),ge=Or(V,ne,u,n),ce=Or(q,Y,u,n),be=Nr(Q,xe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),Ee=v.buildColorVars(u,{titleColor:T,subtitleColor:y,lightboxCounterColor:h},Gm,qm),We=`${s&&s!=="default"?`${u}-state-${s}`:""}${B==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),se=f===0?1/0:f,O=(t??[]).slice(0,se),Oe=x.entryWidth??.2,_e=(L==null?void 0:L.display)==="cover",nt=(L==null?void 0:L.ratioValue)??"1:1",Ue=(L==null?void 0:L.reversed)??!1,[Ce,Fe]=nt.split(":").map(Number),Tt=`${Ue?Fe:Ce} / ${Ue?Ce:Fe}`,it=x.columnsCount,De=v.scalingValue(Oe??0,n),et=De,dt=!_e&&C!=="off",lt=O.length%it||it,ht=lt<it&&O.length>0,Rt=O.length-lt,ot=ht?Math.floor((it-lt)/2)+1:1,xt=M?v.scalingValue(M,n):void 0,zt={width:et,..._e?{aspectRatio:Tt,height:"auto",overflow:"hidden"}:{height:"auto"},...xt?{borderRadius:xt,overflow:"hidden"}:{}},rt=`${u}-item-image-wrapper${dt?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),qe=m==="d"||m==="e"||m==="f",Ne=le==="on",pt=`calc(${v.scalingValue(Oe??0,n)} * (${w} / 100))`,yt=v.scalingValue(Oe*w/100,n),Mt=_e?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...xt?{borderRadius:xt}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...xt?{borderRadius:xt}:{}},[Dt,en]=a.useState("ltr"),[sn,Lt]=a.useState(0),Et=a.useRef(null);a.useEffect(()=>{const Ae=Et.current;if(!Ae)return;const Ye=new ResizeObserver(Je=>{Lt(Math.round(Je[0].contentRect.width))});return Ye.observe(Ae),()=>Ye.disconnect()},[]);const Qt=(()=>{const Ae={...Ee},Ye=Et.current?getComputedStyle(Et.current).getPropertyValue("--cntrl-article-width").trim():"";return Ye&&(Ae["--cntrl-article-width"]=Ye),Ae})(),[Ut,ft]=a.useState(!1),[qt,Re]=a.useState([]),[Ve,Xe]=a.useState(0),ze=S==="on"&&(!n||i),mt=(Ae,Ye)=>{n&&!i||S!=="off"&&(Re(Ae),Xe(Ye),ft(!0))};a.useEffect(()=>{if(!Ut||S!=="on"||typeof document>"u")return;const Ae=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ae}},[Ut,S]),a.useEffect(()=>{!n||i||ft(!1)},[n,i]);const Nt=a.useMemo(()=>km(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Nt}}),r.jsx("div",{style:Ee,children:r.jsx("div",{ref:Et,className:`${u}-wrapper ${u}-type-${m}${Ne?` ${u}-align-entries`:""} ${u}-image-align-${re} ${We}`.trim(),style:{gridTemplateColumns:`repeat(${it}, ${De})`,rowGap:Ne?0:v.scalingValue($??0,n),columnGap:v.scalingValue(x.horizontalGap??0,n),width:v.scalingValue(x.wrapperWidth??0,n),...Ne?{[`--${u}-align-entries-row-gap`]:v.scalingValue($??0,n)}:{}},children:O.map((Ae,Ye)=>{var Bt;const Je=xl(Ae.title),bt=xl(Ae.subtitle),$t=(((Bt=Ae.link)==null?void 0:Bt.length)??0)>0&&S==="off"?Ae.link:void 0,ut=Math.floor(Ye/it)===Math.ceil(O.length/it)-1,Pt=ht&&Ye>=Rt?`${ot+(Ye-Rt)}`:void 0,At=qe?r.jsxs("div",{className:`${u}-item-text-block`,children:[Je&&r.jsx("p",{className:K,style:{width:pt,...Pe,...ge},children:Ae.title}),Je&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:v.scalingValue(I??0,n),width:yt}}),bt&&r.jsx("p",{className:ae,style:{width:pt,...Se,...ce},children:Ae.subtitle}),bt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:v.scalingValue(R??0,n),width:yt}})]}):null,Vt=Ne?r.jsxs("div",{className:`${u}-item-title-row`,children:[!qe&&r.jsx("div",{"data-controls":o&&Je?"titleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?v.scalingValue(I??0,n):0,width:yt}}),Je&&r.jsx("p",{className:K,style:{width:pt,...Pe,...ge},children:Ae.title}),qe&&Je&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:v.scalingValue(I??0,n),width:yt}})]}):null,Kt=Ne?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!qe&&r.jsx("div",{"data-controls":o&&bt?"subtitleMarginTop":void 0,className:o&&bt?`${u}-control`:void 0,style:{height:bt?v.scalingValue(R??0,n):0,width:yt}}),bt&&r.jsx("p",{className:ae,style:{width:pt,...Se,...ce},children:Ae.subtitle}),qe&&bt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:v.scalingValue(R??0,n),width:yt}})]}):null,Ft=$t?r.jsxs("a",{href:$t,target:"_blank",className:`${u}-item-text-link`,children:[Vt,Kt]}):r.jsxs(r.Fragment,{children:[Vt,Kt]}),Yt=Nm(Ae.gallery),wt=Yt.filter(vt=>vt.lightboxMedia).map(vt=>vt.lightboxMedia),Ot=r.jsx("div",{className:rt,style:zt,children:Yt.length===0?null:C==="off"?(()=>{const{displayMedia:vt,lightboxMedia:g}=Yt[0],ue=g?wt.findIndex(Te=>Te.url===g.url):-1;return r.jsx(wl,{media:vt,className:`${u}-item-${Ii(vt)?"video":"image"}`.trim(),style:Mt,onMediaClick:ze&&ue>=0?()=>mt(wt,ue):void 0})})():r.jsxs(r.Fragment,{children:[dt&&Ne&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Yt.map(({displayMedia:vt})=>Ii(vt)?r.jsx("video",{src:vt.url,muted:!0,playsInline:!0},`sizer-${vt.url}`):r.jsx("img",{src:vt.url,alt:""},`sizer-${vt.url}`))}),r.jsx(br,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:J*1e3,width:"100%",height:"100%",speed:Pm,type:U==="fade"?"fade":"loop",rewind:U==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:U==="fade"?"ltr":k!=="random"?k==="horizontal"?"ltr":"ttb":Dt},onMoved:vt=>{if(k!=="random"||U==="fade")return;const g=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";en(g),setTimeout(()=>{vt.refresh()},0)},children:Yt.map(({displayMedia:vt,lightboxMedia:g},ue)=>{const Te=g?wt.findIndex(Le=>Le.url===g.url):-1;return r.jsx(xr,{children:r.jsx(wl,{media:vt,className:`${u}-item-${Ii(vt)?"video":"image"}`.trim(),style:Mt,onMediaClick:ze&&Te>=0?()=>mt(wt,Te):void 0})},ue)})},`${U}-${Oe}-${k}-${J}-${sn}-${c}`)]})}),jt=qe?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Je?"titleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?v.scalingValue(I??0,n):0,width:yt}}),r.jsx("p",{className:K,style:{width:pt,...Pe,...ge},children:Ae.title}),r.jsx("div",{"data-controls":o&&bt?"subtitleMarginTop":void 0,className:o&&bt?`${u}-control`:void 0,style:{height:bt?v.scalingValue(R??0,n):0,width:yt}}),r.jsx("p",{className:ae,style:{width:pt,...Se,...ce},children:Ae.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:Pt&&!Ne?{gridColumn:Pt}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Ne&&ut?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${De} * (${w} / 100))`:De,...Pt&&Ne?{gridColumn:Pt}:{}},children:Ne?r.jsx(r.Fragment,{children:qe?r.jsxs(r.Fragment,{children:[Ft,r.jsx("a",{href:$t,target:"_blank",className:`${u}-item-image-link`,children:Ot})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:$t,target:"_blank",className:`${u}-item-image-link`,children:Ot}),Ft]})}):$t?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:$t,target:"_blank",className:`${u}-item-image-link`,children:[At,Ot]}),!qe&&r.jsx("a",{href:$t,target:"_blank",className:`${u}-item-text-link`,children:jt})]}):r.jsxs(r.Fragment,{children:[At,Ot,jt]})})},Ye)})})}),(!n||i)&&Ut&&typeof document<"u"&&S==="on"&&(()=>{const Ae=(d?document.getElementById(d):null)??document.body;return gi.createPortal(r.jsx("div",{style:Qt,"data-selection":"none",children:r.jsx(Bm,{prefix:u,items:qt,index:Ve,imageDisplay:Dm(A),isEditor:n,onClose:()=>ft(!1),onPrev:()=>Xe(Ye=>(Ye-1+qt.length)%qt.length),onNext:()=>Xe(Ye=>(Ye+1)%qt.length),counterClassName:be,counterStyle:D})}),Ae)})()]})}const Gm={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},qm=["hover","focus","filled","success","error"],Km=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4158
+ `}const Rn=500,Im=750,ni="cubic-bezier(0.22, 1, 0.36, 1)",Rm=72,Em=50;function km(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 Mm(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Pm(e){const[t]=e.media;return t!=null&&t.url?t:null}function Am(e){return!Array.isArray(e)||e.length===0?[]:km(e)?e.flatMap(t=>{const n=Mm(t);if(!n)return[];const i=Pm(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 to(e){return e.type==="video"}function Fm(e){e.pause(),e.removeAttribute("src"),e.load()}function ws({media:e,className:t,style:n,onMediaClick:i}){return to(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 Wo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Wm(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()=>{Fm(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 Nm({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const m=i==="cover",x=a.useRef(null),b=a.useRef(null),T=a.useRef(null),f=a.useRef(null),L=a.useRef(0),$=a.useRef(0),R=a.useRef("none"),P=a.useRef(!1),C=a.useRef(!1),X=a.useRef(!1),E=a.useRef(null),[B,I]=a.useState(null),[w,W]=a.useState("opening"),[h,S]=a.useState(0),[k,D]=a.useState(0),[U,ae]=a.useState(!1),[Y,G]=a.useState(!1),[H,F]=a.useState(!1),A=a.useRef(n),K=t[n],q=K?to(K):!1,ee=k!==0||U,N=a.useCallback(Q=>{X.current=Q,ae(Q)},[]),ue=a.useCallback(()=>{E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),v=a.useCallback(()=>{ue(),E.current=window.setTimeout(()=>{ue(),N(!1)},Rn+32)},[ue,N]),ye=a.useCallback(()=>{const Q=b.current,le=T.current;if(!Q)return;const xe=Q.getBoundingClientRect(),O=xe.width,se=xe.height;if(!O||!se)return;if(i==="cover"){I({width:O,height:se,left:xe.left,top:xe.top});return}if(!le){I(Wo(Q));return}const{width:fe,height:Se}=Wm(le);if(!fe||!Se){I(Wo(Q));return}const Ie=fe/Se,we=O/se;if(Ie>we){const _=O/Ie;I({width:O,height:_,left:xe.left,top:xe.top+(se-_)/2})}else{const _=se*Ie;I({width:_,height:se,left:xe.left+(O-_)/2,top:xe.top})}},[i]);a.useEffect(()=>{ye();const Q=b.current;if(!Q)return;const le=new ResizeObserver(()=>ye());return le.observe(Q),()=>le.disconnect()},[ye,n]),a.useEffect(()=>{w==="opening"&&B&&W("open")},[w,B]),a.useEffect(()=>{if(w!=="closing")return;const Q=setTimeout(()=>s(),Rn);return()=>clearTimeout(Q)},[w,s]),a.useEffect(()=>()=>{ue()},[ue]),a.useLayoutEffect(()=>{if(A.current===n)return;ue(),S(0),D(0),N(!1),F(!1),G(!1),L.current=0,$.current=0,R.current="none",P.current=!1,f.current=null,C.current=!1;const Q=b.current;Q&&I(Wo(Q)),A.current=n},[n,N,ue]),a.useEffect(()=>{if(w!=="open")return;let Q=null;const le=()=>{Q&&(document.removeEventListener("click",Q,!0),Q=null)},xe=()=>{le(),Q=we=>{we.stopPropagation(),we.preventDefault(),le()},document.addEventListener("click",Q,!0)},O=we=>{ue(),X.current=!1,ae(!1),D(0),G(!1),P.current=!1,$.current=0,R.current="none";const _=b.current;_&&I(Wo(_)),we<0?d():l()},se=we=>{if(Math.abs(we)>Em&&t.length>1){O(we);return}N(!0),D(0),v()},fe=we=>{if(we.touches.length!==1||X.current)return;const _=we.touches[0];C.current=!0,f.current={x:_.clientX,y:_.clientY},R.current="none",$.current=0,P.current=!1},Se=we=>{if(!f.current||we.touches.length!==1||X.current)return;const _=we.touches[0],de=_.clientX-f.current.x,oe=_.clientY-f.current.y;if(R.current==="none"){if(Math.abs(de)<10&&Math.abs(oe)<10)return;if(Math.abs(de)>Math.abs(oe)){if(t.length<=1)return;R.current="horizontal"}else if(oe>0)R.current="vertical";else return}if(R.current==="horizontal"){P.current=!0,G(!0),$.current=de,D(de),we.preventDefault();return}R.current==="vertical"&&(P.current=!0,G(!0),L.current=oe,S(oe),we.preventDefault())},Ie=()=>{if(!f.current)return;const we=R.current,_=P.current;if(_&&we==="horizontal")se($.current),xe();else if(_&&we==="vertical")if(L.current>Rm){const oe=window.innerHeight;L.current=oe,F(!0),S(oe),W("closing")}else L.current=0,S(0),xe();else we==="horizontal"&&Math.abs($.current)>0&&(se($.current),xe());f.current=null,R.current="none",$.current=0,P.current=!1,G(!1)};return document.addEventListener("touchstart",fe,{passive:!0}),document.addEventListener("touchmove",Se,{passive:!1}),document.addEventListener("touchend",Ie),document.addEventListener("touchcancel",Ie),()=>{document.removeEventListener("touchstart",fe),document.removeEventListener("touchmove",Se),document.removeEventListener("touchend",Ie),document.removeEventListener("touchcancel",Ie),le()}},[w,t.length,d,l,N,v]),a.useEffect(()=>{const Q=le=>{le.key==="Escape"&&(le.preventDefault(),le.stopPropagation(),w!=="closing"&&W("closing"))};return window.addEventListener("keydown",Q,!0),()=>window.removeEventListener("keydown",Q,!0)},[w]);const Z=()=>{w!=="closing"&&W("closing")},ce=w==="open",$e=w==="closing",ne=h>0?Math.max(0,1-h/500):1,ve=h>0?Math.max(.35,1-h/500):1,J=Q=>{if(Q.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const le=Q.currentTarget.getBoundingClientRect(),xe=Q.clientY-le.top,O=Math.min(52,le.height*.2);if(!(xe>le.height-O)){if(Q.clientX-le.left<le.width/2){l();return}d()}},pe=Q=>{if(t.length<=1)return;const le=Q.currentTarget.getBoundingClientRect(),xe=Q.clientX-le.left,O=Q.clientY-le.top,se=Math.min(52,le.height*.2);if(O>le.height-se){Q.currentTarget.style.cursor="default";return}Q.currentTarget.style.cursor=xe<le.width/2?"w-resize":"e-resize"},he=a.useCallback(Q=>{Q.propertyName!=="transform"||!X.current||(ue(),N(!1))},[ue,N]),Ae=ee?`translateX(${k}px)`:h>0?`translateY(${h}px)`:void 0,be={position:"fixed",top:B==null?void 0:B.top,left:B==null?void 0:B.left,width:B==null?void 0:B.width,height:B==null?void 0:B.height,objectFit:i==="cover"?"cover":"contain",transform:Ae,opacity:h>0?ve:w==="opening"||$e?0:1,transition:Y&&!U?"none":U?`transform ${Rn}ms ${ni}`:H?`transform ${Rn}ms ${ni}, opacity ${Rn}ms ${ni}`:w==="opening"||$e?`opacity ${Rn}ms ${ni}`:"none",pointerEvents:q&&ce&&!ee?"auto":"none",touchAction:q&&ce?"none":void 0,zIndex:9998},We=B?{position:"fixed",top:B.top,height:B.height,width:B.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:x,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:w==="open"?"none":void 0},onClick:Z,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:ce?ne: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:m?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:b,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:ce?1:0,transition:`opacity ${Rn}ms ${ni}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.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:b,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ce?1:0,transition:`opacity ${Rn}ms ${ni}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),B&&K&&(q?r.jsx(_m,{src:K.url,phase:w,mediaRef:T,mediaStyle:be,onLoadedMetadata:ye,onClick:J,onMouseMove:pe,onTransitionEnd:he},`${n}-${K.url}`):r.jsx("img",{ref:T,src:K.url,alt:K.name,onLoad:ye,onTransitionEnd:he,style:be},`${n}-${K.url}`)),ce&&We&&t.length>1&&!q&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...We,left:B.left,cursor:"w-resize",pointerEvents:ee?"none":"auto"},onClick:Q=>{if(C.current){C.current=!1;return}Q.stopPropagation(),l()}}),r.jsx("div",{style:{...We,left:B.left+B.width/2,cursor:"e-resize",pointerEvents:ee?"none":"auto"},onClick:Q=>{if(C.current){C.current=!1;return}Q.stopPropagation(),d()}})]})]})}function Hm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function jm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=y.useScopedStyles(),{type:m="a",gridLayout:x,textBoxWidth:b=100,verticalGap:T,entriesCount:f,lightbox:L,imageDisplay:$,lightboxImageDisplay:R,slider:P,sliderTiming:C,direction:X,transition:E,titleMarginTop:B,subtitleMarginTop:I,titleColor:w,subtitleColor:W,lightboxCounterColor:h,titleFontFamily:S,titleFontSettings:k,titleFontSize:D,titleLineHeight:U,titleLetterSpacing:ae,titleWordSpacing:Y,titleTextAppearance:G,subtitleFontFamily:H,subtitleFontSettings:F,subtitleFontSize:A,subtitleLineHeight:K,subtitleLetterSpacing:q,subtitleWordSpacing:ee,subtitleTextAppearance:N,lightboxCounterFontFamily:ue,lightboxCounterFontSettings:v,lightboxCounterFontSize:ye,lightboxCounterLineHeight:Z,lightboxCounterLetterSpacing:ce,lightboxCounterWordSpacing:$e,lightboxCounterTextAppearance:ne,showText:ve="always",alignEntries:J="off",align:pe="top"}=e,he={fontSettings:{fontFamily:S,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:D??.01,lineHeight:U,letterSpacing:ae??0,wordSpacing:Y??0,textAppearance:G,color:w},be={...dn(Xt(he,n))},We={fontSettings:{fontFamily:H,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:A??.01,lineHeight:K,letterSpacing:q??0,wordSpacing:ee??0,textAppearance:N,color:W},le={...dn(Xt(We,n))},xe={fontSettings:{fontFamily:ue,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:Z,letterSpacing:ce??0,wordSpacing:$e??0,textAppearance:ne,color:h},se={...dn(Xt(xe,n)),...Or(ye,Z,u,n)},fe=jr(D,U,`${u}-item-title`,`${u}-text-tight-leading`),Se=jr(A,K,`${u}-item-subtitle`,`${u}-text-tight-leading`),Ie=Or(D,U,u,n),we=Or(A,K,u,n),_=jr(ye,Z,`${u}-lightbox-counter`,`${u}-text-tight-leading`),de=y.buildColorVars(u,{titleColor:w,subtitleColor:W,lightboxCounterColor:h},Om,zm),re=`${l&&l!=="default"?`${u}-state-${l}`:""}${ve==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),ke=f===0?1/0:f,ie=(t??[]).slice(0,ke),j=x.entryWidth??.2,Ne=($==null?void 0:$.display)==="cover",Me=($==null?void 0:$.ratioValue)??"1:1",et=($==null?void 0:$.reversed)??!1,[Ye,lt]=Me.split(":").map(Number),ot=`${et?lt:Ye} / ${et?Ye:lt}`,$t=x.columnsCount,rt=y.scalingValue(j??0,n),Ue=rt,ht=!Ne&&P!=="off",xt=ie.length%$t||$t,dt=xt<$t&&ie.length>0,kt=ie.length-xt,_t=dt?Math.floor(($t-xt)/2)+1:1,Qe={width:Ue,...Ne?{aspectRatio:ot,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=J==="on",qe=`calc(${y.scalingValue(j??0,n)} * (${b} / 100))`,Pe=y.scalingValue(j*b/100,n),gt=Ne?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[It,Mt]=a.useState("ltr"),[Dt,en]=a.useState(0),on=a.useRef(null);a.useEffect(()=>{const ze=on.current;if(!ze)return;const ut=new ResizeObserver(_e=>{en(Math.round(_e[0].contentRect.width))});return ut.observe(ze),()=>ut.disconnect()},[]);const bt=(()=>{const ze={...de},ut=on.current?getComputedStyle(on.current).getPropertyValue("--cntrl-article-width").trim():"";return ut&&(ze["--cntrl-article-width"]=ut),ze})(),[Rt,Ut]=a.useState(!1),[Kt,ft]=a.useState([]),[Jt,Ce]=a.useState(0),Oe=L==="on"&&(!n||i),Ke=(ze,ut)=>{n&&!i||L!=="off"&&(ft(ze),Ce(ut),Ut(!0))};a.useEffect(()=>{if(!Rt||L!=="on"||typeof document>"u")return;const ze=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ze}},[Rt,L]),a.useEffect(()=>{!n||i||Ut(!1)},[n,i]);const He=a.useMemo(()=>Lm(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:He}}),r.jsx("div",{style:de,children:r.jsx("div",{ref:on,className:`${u}-wrapper ${u}-type-${m}${Ge?` ${u}-align-entries`:""} ${u}-image-align-${pe} ${re}`.trim(),style:{gridTemplateColumns:`repeat(${$t}, ${rt})`,rowGap:Ge?0:y.scalingValue(T??0,n),columnGap:y.scalingValue(x.horizontalGap??0,n),width:y.scalingValue(x.wrapperWidth??0,n),...Ge?{[`--${u}-align-entries-row-gap`]:y.scalingValue(T??0,n)}:{}},children:ie.map((ze,ut)=>{var Gt;const _e=bs(ze.title),Je=bs(ze.subtitle),tt=(((Gt=ze.link)==null?void 0:Gt.length)??0)>0&&L==="off"?ze.link:void 0,Wt=Math.floor(ut/$t)===Math.ceil(ie.length/$t)-1,Ct=dt&&ut>=kt?`${_t+(ut-kt)}`:void 0,st=Lt?r.jsxs("div",{className:`${u}-item-text-block`,children:[_e&&r.jsx("p",{className:fe,style:{width:qe,...be,...Ie},children:ze.title}),_e&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(B??0,n),width:Pe}}),Je&&r.jsx("p",{className:Se,style:{width:qe,...le,...we},children:ze.subtitle}),Je&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:Pe}})]}):null,Nt=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?y.scalingValue(B??0,n):0,width:Pe}}),_e&&r.jsx("p",{className:fe,style:{width:qe,...be,...Ie},children:ze.title}),Lt&&_e&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(B??0,n),width:Pe}})]}):null,At=Ge?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Lt&&r.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?y.scalingValue(I??0,n):0,width:Pe}}),Je&&r.jsx("p",{className:Se,style:{width:qe,...le,...we},children:ze.subtitle}),Lt&&Je&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:Pe}})]}):null,Vt=tt?r.jsxs("a",{href:tt,target:"_blank",className:`${u}-item-text-link`,children:[Nt,At]}):r.jsxs(r.Fragment,{children:[Nt,At]}),zt=Am(ze.gallery),Pt=zt.filter(pt=>pt.lightboxMedia).map(pt=>pt.lightboxMedia),Qt=r.jsx("div",{className:Tt,style:Qe,children:zt.length===0?null:P==="off"?(()=>{const{displayMedia:pt,lightboxMedia:Ft}=zt[0],Bt=Ft?Pt.findIndex(g=>g.url===Ft.url):-1;return r.jsx(ws,{media:pt,className:`${u}-item-${to(pt)?"video":"image"}`.trim(),style:gt,onMediaClick:Oe&&Bt>=0?()=>Ke(Pt,Bt):void 0})})():r.jsxs(r.Fragment,{children:[ht&&Ge&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:zt.map(({displayMedia:pt})=>to(pt)?r.jsx("video",{src:pt.url,muted:!0,playsInline:!0},`sizer-${pt.url}`):r.jsx("img",{src:pt.url,alt:""},`sizer-${pt.url}`))}),r.jsx(br,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:C*1e3,width:"100%",height:"100%",speed:Im,type:E==="fade"?"fade":"loop",rewind:E==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:E==="fade"?"ltr":X!=="random"?X==="horizontal"?"ltr":"ttb":It},onMoved:pt=>{if(X!=="random"||E==="fade")return;const Ft=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Mt(Ft),setTimeout(()=>{pt.refresh()},0)},children:zt.map(({displayMedia:pt,lightboxMedia:Ft},Bt)=>{const g=Ft?Pt.findIndex(me=>me.url===Ft.url):-1;return r.jsx(wr,{children:r.jsx(ws,{media:pt,className:`${u}-item-${to(pt)?"video":"image"}`.trim(),style:gt,onMediaClick:Oe&&g>=0?()=>Ke(Pt,g):void 0})},Bt)})},`${E}-${j}-${X}-${C}-${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?y.scalingValue(B??0,n):0,width:Pe}}),r.jsx("p",{className:fe,style:{width:qe,...be,...Ie},children:ze.title}),r.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?y.scalingValue(I??0,n):0,width:Pe}}),r.jsx("p",{className:Se,style:{width:qe,...le,...we},children:ze.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&&Wt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(b??0)>100?`calc(${rt} * (${b} / 100))`:rt,...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:Qt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:Qt}),Vt]})}):tt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:[st,Qt]}),!Lt&&r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-text-link`,children:wt})]}):r.jsxs(r.Fragment,{children:[st,Qt,wt]})})},ut)})})}),(!n||i)&&Rt&&typeof document<"u"&&L==="on"&&(()=>{const ze=(c?document.getElementById(c):null)??document.body;return gi.createPortal(r.jsx("div",{style:bt,"data-selection":"none",children:r.jsx(Nm,{prefix:u,items:Kt,index:Jt,imageDisplay:Hm(R),isEditor:n,onClose:()=>Ut(!1),onPrev:()=>Ce(ut=>(ut-1+Kt.length)%Kt.length),onNext:()=>Ce(ut=>(ut+1)%Kt.length),counterClassName:_,counterStyle:se})}),ze)})()]})}const Om={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},zm=["hover","focus","filled","success","error"],Bm=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4141
4159
  import '@splidejs/react-splide/css/core';
4142
4160
  import { CommonComponentProps } from '../props';
4143
4161
  import {
@@ -4688,16 +4706,11 @@ function getGhostRect(ghost: HTMLElement): AnimRect {
4688
4706
  return { width: cb.width, height: cb.height, left: cb.left, top: cb.top };
4689
4707
  }
4690
4708
 
4691
- function getContainRect(box: AnimRect, natural: { width: number; height: number } | null): AnimRect {
4692
- if (!natural || !natural.width || !natural.height || !box.width || !box.height) return box;
4693
- const ir = natural.width / natural.height;
4694
- const cr = box.width / box.height;
4695
- if (ir > cr) {
4696
- const dh = box.width / ir;
4697
- return { width: box.width, height: dh, left: box.left, top: box.top + (box.height - dh) / 2 };
4709
+ function getLightboxMediaDimensions(media: HTMLImageElement | HTMLVideoElement) {
4710
+ if (media instanceof HTMLVideoElement) {
4711
+ return { width: media.videoWidth, height: media.videoHeight };
4698
4712
  }
4699
- const dw = box.height * ir;
4700
- return { width: dw, height: box.height, left: box.left + (box.width - dw) / 2, top: box.top };
4713
+ return { width: media.naturalWidth, height: media.naturalHeight };
4701
4714
  }
4702
4715
 
4703
4716
  function LightboxVideo({
@@ -4708,14 +4721,16 @@ function LightboxVideo({
4708
4721
  onLoadedMetadata,
4709
4722
  onClick,
4710
4723
  onMouseMove,
4724
+ onTransitionEnd,
4711
4725
  }: {
4712
4726
  src: string;
4713
4727
  phase: 'opening' | 'open' | 'closing';
4714
4728
  mediaRef: React.RefObject<HTMLVideoElement>;
4715
4729
  mediaStyle: React.CSSProperties;
4716
- onLoadedMetadata: (e: React.SyntheticEvent<HTMLVideoElement>) => void;
4730
+ onLoadedMetadata: () => void;
4717
4731
  onClick: (e: React.MouseEvent<HTMLVideoElement>) => void;
4718
4732
  onMouseMove: (e: React.MouseEvent<HTMLVideoElement>) => void;
4733
+ onTransitionEnd: (e: React.TransitionEvent<HTMLVideoElement>) => void;
4719
4734
  }) {
4720
4735
  useEffect(() => {
4721
4736
  const video = mediaRef.current;
@@ -4736,6 +4751,7 @@ function LightboxVideo({
4736
4751
  onLoadedMetadata={onLoadedMetadata}
4737
4752
  onClick={onClick}
4738
4753
  onMouseMove={onMouseMove}
4754
+ onTransitionEnd={onTransitionEnd}
4739
4755
  style={mediaStyle}
4740
4756
  />
4741
4757
  );
@@ -4752,111 +4768,75 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
4752
4768
  const swipeAxisRef = useRef<SwipeAxis>('none');
4753
4769
  const isSwipingRef = useRef(false);
4754
4770
  const touchInteractionRef = useRef(false);
4755
- const viewportRectRef = useRef<AnimRect | null>(null);
4756
- const slideOffsetRef = useRef(0);
4757
- const slideDirRef = useRef<1 | -1 | null>(null);
4758
- const slideAnimatingRef = useRef(false);
4759
- const slideCommitTimerRef = useRef<number | null>(null);
4771
+ const navSwipeAnimatingRef = useRef(false);
4772
+ const navSwipeCommitTimerRef = useRef<number | null>(null);
4760
4773
  const [finalRect, setFinalRect] = useState<AnimRect | null>(null);
4761
- const [viewportRect, setViewportRect] = useState<AnimRect | null>(null);
4762
4774
  const [phase, setPhase] = useState<'opening' | 'open' | 'closing'>('opening');
4763
4775
  const [swipeOffset, setSwipeOffset] = useState(0);
4764
- const [slideOffset, setSlideOffset] = useState(0);
4765
- const [slideDir, setSlideDir] = useState<1 | -1 | null>(null);
4766
- const [slideAnimating, setSlideAnimating] = useState(false);
4776
+ const [navSwipeOffset, setNavSwipeOffset] = useState(0);
4777
+ const [navSwipeAnimating, setNavSwipeAnimating] = useState(false);
4767
4778
  const [isSwiping, setIsSwiping] = useState(false);
4768
4779
  const [swipeDismiss, setSwipeDismiss] = useState(false);
4769
- const [mediaNaturalSize, setMediaNaturalSize] = useState<{ width: number; height: number } | null>(null);
4770
4780
  const prevIndexRef = useRef(index);
4771
4781
  const currentItem = items[index];
4772
4782
  const isCurrentVideo = currentItem ? isVideoMedia(currentItem) : false;
4773
- const isSliding = slideDir !== null;
4774
-
4775
- const handleMediaLoad = useCallback((e: React.SyntheticEvent<HTMLImageElement | HTMLVideoElement>) => {
4776
- const target = e.currentTarget;
4777
- const size = target instanceof HTMLVideoElement
4778
- ? { width: target.videoWidth, height: target.videoHeight }
4779
- : { width: target.naturalWidth, height: target.naturalHeight };
4780
- if (!size.width || !size.height) return;
4781
- setMediaNaturalSize(size);
4782
- }, []);
4783
-
4784
- useEffect(() => {
4785
- viewportRectRef.current = viewportRect;
4786
- }, [viewportRect]);
4783
+ const isHorizontalNavActive = navSwipeOffset !== 0 || navSwipeAnimating;
4787
4784
 
4788
- useEffect(() => {
4789
- const el = containerRef.current;
4790
- if (!el) return;
4791
- const update = () => setViewportRect(getGhostRect(el));
4792
- update();
4793
- const ro = new ResizeObserver(update);
4794
- ro.observe(el);
4795
- return () => ro.disconnect();
4785
+ const setNavSwipeAnimatingState = useCallback((value: boolean) => {
4786
+ navSwipeAnimatingRef.current = value;
4787
+ setNavSwipeAnimating(value);
4796
4788
  }, []);
4797
4789
 
4798
- const clearSlideCommitTimer = useCallback(() => {
4799
- if (slideCommitTimerRef.current !== null) {
4800
- window.clearTimeout(slideCommitTimerRef.current);
4801
- slideCommitTimerRef.current = null;
4790
+ const clearNavSwipeCommitTimer = useCallback(() => {
4791
+ if (navSwipeCommitTimerRef.current !== null) {
4792
+ window.clearTimeout(navSwipeCommitTimerRef.current);
4793
+ navSwipeCommitTimerRef.current = null;
4802
4794
  }
4803
4795
  }, []);
4804
4796
 
4805
- const resetSlideState = useCallback(() => {
4806
- clearSlideCommitTimer();
4807
- slideOffsetRef.current = 0;
4808
- slideDirRef.current = null;
4809
- slideAnimatingRef.current = false;
4810
- setSlideOffset(0);
4811
- setSlideDir(null);
4812
- setSlideAnimating(false);
4813
- }, [clearSlideCommitTimer]);
4814
-
4815
- const commitSlide = useCallback((dir: 1 | -1) => {
4816
- resetSlideState();
4817
- if (dir === 1) onNext();
4818
- else onPrev();
4819
- }, [onNext, onPrev, resetSlideState]);
4820
-
4821
- const finishSlide = useCallback((dir: 1 | -1, commit: boolean) => {
4822
- const width = viewportRectRef.current?.width ?? 0;
4823
- clearSlideCommitTimer();
4824
- slideDirRef.current = dir;
4825
- setSlideDir(dir);
4826
- slideAnimatingRef.current = true;
4827
- setSlideAnimating(true);
4828
- const target = commit ? -dir * width : 0;
4829
- slideOffsetRef.current = target;
4830
- setSlideOffset(target);
4831
- slideCommitTimerRef.current = window.setTimeout(() => {
4832
- slideCommitTimerRef.current = null;
4833
- if (commit) commitSlide(dir);
4834
- else resetSlideState();
4797
+ const scheduleNavSwipeSnapBackEnd = useCallback(() => {
4798
+ clearNavSwipeCommitTimer();
4799
+ navSwipeCommitTimerRef.current = window.setTimeout(() => {
4800
+ clearNavSwipeCommitTimer();
4801
+ setNavSwipeAnimatingState(false);
4835
4802
  }, LIGHTBOX_ANIM_MS + 32);
4836
- }, [clearSlideCommitTimer, commitSlide, resetSlideState]);
4837
-
4838
- const startProgrammaticSlide = useCallback((dir: 1 | -1) => {
4839
- if (slideAnimatingRef.current || items.length <= 1) return;
4840
- slideDirRef.current = dir;
4841
- setSlideDir(dir);
4842
- slideAnimatingRef.current = false;
4843
- setSlideAnimating(false);
4844
- slideOffsetRef.current = 0;
4845
- setSlideOffset(0);
4846
- requestAnimationFrame(() => {
4847
- requestAnimationFrame(() => {
4848
- finishSlide(dir, true);
4849
- });
4850
- });
4851
- }, [items.length, finishSlide]);
4803
+ }, [clearNavSwipeCommitTimer, setNavSwipeAnimatingState]);
4852
4804
 
4853
4805
  const computeFinalRect = useCallback(() => {
4854
4806
  const ghost = ghostRef.current;
4807
+ const media = mediaRef.current;
4855
4808
  if (!ghost) return;
4856
- const rect = getGhostRect(ghost);
4857
- if (!rect.width || !rect.height) return;
4858
- setFinalRect(rect);
4859
- }, []);
4809
+ const cb = ghost.getBoundingClientRect();
4810
+ const cw = cb.width;
4811
+ const ch = cb.height;
4812
+ if (!cw || !ch) return;
4813
+
4814
+ if (imageDisplay === 'cover') {
4815
+ setFinalRect({ width: cw, height: ch, left: cb.left, top: cb.top });
4816
+ return;
4817
+ }
4818
+
4819
+ if (!media) {
4820
+ setFinalRect(getGhostRect(ghost));
4821
+ return;
4822
+ }
4823
+
4824
+ const { width: nw, height: nh } = getLightboxMediaDimensions(media);
4825
+ if (!nw || !nh) {
4826
+ setFinalRect(getGhostRect(ghost));
4827
+ return;
4828
+ }
4829
+
4830
+ const ir = nw / nh;
4831
+ const cr = cw / ch;
4832
+ if (ir > cr) {
4833
+ const dh = cw / ir;
4834
+ setFinalRect({ width: cw, height: dh, left: cb.left, top: cb.top + (ch - dh) / 2 });
4835
+ } else {
4836
+ const dw = ch * ir;
4837
+ setFinalRect({ width: dw, height: ch, left: cb.left + (cw - dw) / 2, top: cb.top });
4838
+ }
4839
+ }, [imageDisplay]);
4860
4840
 
4861
4841
  useEffect(() => {
4862
4842
  computeFinalRect();
@@ -4865,7 +4845,7 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
4865
4845
  const ro = new ResizeObserver(() => computeFinalRect());
4866
4846
  ro.observe(c);
4867
4847
  return () => ro.disconnect();
4868
- }, [computeFinalRect]);
4848
+ }, [computeFinalRect, index]);
4869
4849
 
4870
4850
  useEffect(() => {
4871
4851
  if (phase === 'opening' && finalRect) setPhase('open');
@@ -4879,18 +4859,19 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
4879
4859
 
4880
4860
  useEffect(() => {
4881
4861
  return () => {
4882
- clearSlideCommitTimer();
4862
+ clearNavSwipeCommitTimer();
4883
4863
  };
4884
- }, [clearSlideCommitTimer]);
4864
+ }, [clearNavSwipeCommitTimer]);
4885
4865
 
4886
4866
  useLayoutEffect(() => {
4887
4867
  if (prevIndexRef.current === index) return;
4888
4868
 
4889
- resetSlideState();
4869
+ clearNavSwipeCommitTimer();
4890
4870
  setSwipeOffset(0);
4871
+ setNavSwipeOffset(0);
4872
+ setNavSwipeAnimatingState(false);
4891
4873
  setSwipeDismiss(false);
4892
4874
  setIsSwiping(false);
4893
- setMediaNaturalSize(null);
4894
4875
  swipeOffsetRef.current = 0;
4895
4876
  swipeDeltaXRef.current = 0;
4896
4877
  swipeAxisRef.current = 'none';
@@ -4898,8 +4879,13 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
4898
4879
  touchStartRef.current = null;
4899
4880
  touchInteractionRef.current = false;
4900
4881
 
4882
+ const ghost = ghostRef.current;
4883
+ if (ghost) {
4884
+ setFinalRect(getGhostRect(ghost));
4885
+ }
4886
+
4901
4887
  prevIndexRef.current = index;
4902
- }, [index, resetSlideState]);
4888
+ }, [index, setNavSwipeAnimatingState, clearNavSwipeCommitTimer]);
4903
4889
 
4904
4890
  useEffect(() => {
4905
4891
  if (phase !== 'open') return;
@@ -4922,17 +4908,38 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
4922
4908
  document.addEventListener('click', blockClick, true);
4923
4909
  };
4924
4910
 
4925
- const startSlideRelease = (deltaX: number) => {
4926
- const dir: 1 | -1 = deltaX < 0 ? 1 : -1;
4911
+ const commitNavSwipe = (deltaX: number) => {
4912
+ clearNavSwipeCommitTimer();
4913
+ navSwipeAnimatingRef.current = false;
4914
+ setNavSwipeAnimating(false);
4915
+ setNavSwipeOffset(0);
4916
+ setIsSwiping(false);
4917
+ isSwipingRef.current = false;
4918
+ swipeDeltaXRef.current = 0;
4919
+ swipeAxisRef.current = 'none';
4920
+
4921
+ const ghost = ghostRef.current;
4922
+ if (ghost) {
4923
+ setFinalRect(getGhostRect(ghost));
4924
+ }
4925
+
4926
+ if (deltaX < 0) onNext();
4927
+ else onPrev();
4928
+ };
4929
+
4930
+ const startNavSwipeRelease = (deltaX: number) => {
4927
4931
  if (Math.abs(deltaX) > SWIPE_NAV_THRESHOLD && items.length > 1) {
4928
- finishSlide(dir, true);
4932
+ commitNavSwipe(deltaX);
4929
4933
  return;
4930
4934
  }
4931
- finishSlide(dir, false);
4935
+
4936
+ setNavSwipeAnimatingState(true);
4937
+ setNavSwipeOffset(0);
4938
+ scheduleNavSwipeSnapBackEnd();
4932
4939
  };
4933
4940
 
4934
4941
  const handleTouchStart = (e: TouchEvent) => {
4935
- if (e.touches.length !== 1 || slideAnimatingRef.current) return;
4942
+ if (e.touches.length !== 1 || navSwipeAnimatingRef.current) return;
4936
4943
  const touch = e.touches[0];
4937
4944
 
4938
4945
  touchInteractionRef.current = true;
@@ -4943,7 +4950,7 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
4943
4950
  };
4944
4951
 
4945
4952
  const handleTouchMove = (e: TouchEvent) => {
4946
- if (!touchStartRef.current || e.touches.length !== 1 || slideAnimatingRef.current) return;
4953
+ if (!touchStartRef.current || e.touches.length !== 1 || navSwipeAnimatingRef.current) return;
4947
4954
  const touch = e.touches[0];
4948
4955
  const deltaX = touch.clientX - touchStartRef.current.x;
4949
4956
  const deltaY = touch.clientY - touchStartRef.current.y;
@@ -4964,13 +4971,7 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
4964
4971
  isSwipingRef.current = true;
4965
4972
  setIsSwiping(true);
4966
4973
  swipeDeltaXRef.current = deltaX;
4967
- const dir: 1 | -1 = deltaX < 0 ? 1 : -1;
4968
- if (slideDirRef.current !== dir) {
4969
- slideDirRef.current = dir;
4970
- setSlideDir(dir);
4971
- }
4972
- slideOffsetRef.current = deltaX;
4973
- setSlideOffset(deltaX);
4974
+ setNavSwipeOffset(deltaX);
4974
4975
  e.preventDefault();
4975
4976
  return;
4976
4977
  }
@@ -4991,7 +4992,7 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
4991
4992
  const wasSwiping = isSwipingRef.current;
4992
4993
 
4993
4994
  if (wasSwiping && axis === 'horizontal') {
4994
- startSlideRelease(swipeDeltaXRef.current);
4995
+ startNavSwipeRelease(swipeDeltaXRef.current);
4995
4996
  blockSwipeClick();
4996
4997
  } else if (wasSwiping && axis === 'vertical') {
4997
4998
  const offset = swipeOffsetRef.current;
@@ -5008,7 +5009,7 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
5008
5009
  blockSwipeClick();
5009
5010
  }
5010
5011
  } else if (axis === 'horizontal' && Math.abs(swipeDeltaXRef.current) > 0) {
5011
- startSlideRelease(swipeDeltaXRef.current);
5012
+ startNavSwipeRelease(swipeDeltaXRef.current);
5012
5013
  blockSwipeClick();
5013
5014
  }
5014
5015
 
@@ -5031,7 +5032,7 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
5031
5032
  document.removeEventListener('touchcancel', handleTouchEnd);
5032
5033
  clearBlockSwipeClick();
5033
5034
  };
5034
- }, [phase, items.length, finishSlide]);
5035
+ }, [phase, items.length, onNext, onPrev, setNavSwipeAnimatingState, scheduleNavSwipeSnapBackEnd]);
5035
5036
 
5036
5037
  useEffect(() => {
5037
5038
  const onKeyDown = (e: KeyboardEvent) => {
@@ -5055,10 +5056,6 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
5055
5056
  const swipeBackdropOpacity = swipeOffset > 0 ? Math.max(0, 1 - swipeOffset / 500) : 1;
5056
5057
  const swipeMediaOpacity = swipeOffset > 0 ? Math.max(0.35, 1 - swipeOffset / 500) : 1;
5057
5058
 
5058
- const contentRect = finalRect
5059
- ? (isCover ? finalRect : getContainRect(finalRect, mediaNaturalSize))
5060
- : null;
5061
-
5062
5059
  const handleVideoClick = (e: React.MouseEvent<HTMLVideoElement>) => {
5063
5060
  e.stopPropagation();
5064
5061
  if (touchInteractionRef.current) {
@@ -5067,7 +5064,7 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
5067
5064
  }
5068
5065
  if (items.length <= 1) return;
5069
5066
 
5070
- const rect = contentRect ?? e.currentTarget.getBoundingClientRect();
5067
+ const rect = e.currentTarget.getBoundingClientRect();
5071
5068
  const y = e.clientY - rect.top;
5072
5069
  const controlsZoneHeight = Math.min(52, rect.height * 0.2);
5073
5070
 
@@ -5076,17 +5073,17 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
5076
5073
  }
5077
5074
 
5078
5075
  if (e.clientX - rect.left < rect.width / 2) {
5079
- startProgrammaticSlide(-1);
5076
+ onPrev();
5080
5077
  return;
5081
5078
  }
5082
5079
 
5083
- startProgrammaticSlide(1);
5080
+ onNext();
5084
5081
  };
5085
5082
 
5086
5083
  const handleVideoMouseMove = (e: React.MouseEvent<HTMLVideoElement>) => {
5087
5084
  if (items.length <= 1) return;
5088
5085
 
5089
- const rect = contentRect ?? e.currentTarget.getBoundingClientRect();
5086
+ const rect = e.currentTarget.getBoundingClientRect();
5090
5087
  const x = e.clientX - rect.left;
5091
5088
  const y = e.clientY - rect.top;
5092
5089
  const controlsZoneHeight = Math.min(52, rect.height * 0.2);
@@ -5099,79 +5096,51 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
5099
5096
  e.currentTarget.style.cursor = x < rect.width / 2 ? 'w-resize' : 'e-resize';
5100
5097
  };
5101
5098
 
5102
- const backingBaseStyle: React.CSSProperties = {
5103
- position: 'fixed',
5104
- top: viewportRect?.top,
5105
- left: viewportRect?.left,
5106
- width: viewportRect?.width,
5107
- height: viewportRect?.height,
5108
- zIndex: 9998,
5109
- };
5110
-
5111
- const objectFitStyle: React.CSSProperties['objectFit'] = isCover ? 'cover' : 'contain';
5099
+ const handleNavSwipeTransitionEnd = useCallback((e: React.TransitionEvent<HTMLElement>) => {
5100
+ if (e.propertyName !== 'transform' || !navSwipeAnimatingRef.current) return;
5112
5101
 
5113
- const currentTransform = (slideOffset !== 0 || swipeOffset > 0)
5114
- ? \`translate(\${slideOffset}px, \${swipeOffset}px)\`
5115
- : undefined;
5102
+ clearNavSwipeCommitTimer();
5103
+ setNavSwipeAnimatingState(false);
5104
+ }, [clearNavSwipeCommitTimer, setNavSwipeAnimatingState]);
5116
5105
 
5117
- const currentTransition = (isSwiping && !slideAnimating)
5118
- ? 'none'
5119
- : slideAnimating
5120
- ? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
5121
- : swipeDismiss
5122
- ? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
5123
- : phase === 'opening' || isClosing
5124
- ? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
5125
- : 'none';
5106
+ const mediaTransform = isHorizontalNavActive
5107
+ ? \`translateX(\${navSwipeOffset}px)\`
5108
+ : swipeOffset > 0
5109
+ ? \`translateY(\${swipeOffset}px)\`
5110
+ : undefined;
5126
5111
 
5127
- const currentBackingStyle: React.CSSProperties = {
5128
- ...backingBaseStyle,
5129
- transform: currentTransform,
5112
+ const mediaStyle: React.CSSProperties = {
5113
+ position: 'fixed',
5114
+ top: finalRect?.top,
5115
+ left: finalRect?.left,
5116
+ width: finalRect?.width,
5117
+ height: finalRect?.height,
5118
+ objectFit: imageDisplay === 'cover' ? 'cover' : 'contain',
5119
+ transform: mediaTransform,
5130
5120
  opacity: swipeOffset > 0
5131
5121
  ? swipeMediaOpacity
5132
5122
  : phase === 'opening' || isClosing
5133
5123
  ? 0
5134
5124
  : 1,
5135
- transition: currentTransition,
5136
- pointerEvents: 'none',
5137
- };
5138
-
5139
- const currentMediaStyle: React.CSSProperties = {
5140
- position: 'absolute',
5141
- top: (contentRect?.top ?? 0) - (viewportRect?.top ?? 0),
5142
- left: (contentRect?.left ?? 0) - (viewportRect?.left ?? 0),
5143
- width: contentRect?.width,
5144
- height: contentRect?.height,
5145
- objectFit: objectFitStyle,
5146
- pointerEvents: isCurrentVideo && isOpen && !isSliding ? 'auto' : 'none',
5125
+ transition: (isSwiping && !navSwipeAnimating)
5126
+ ? 'none'
5127
+ : navSwipeAnimating
5128
+ ? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
5129
+ : swipeDismiss
5130
+ ? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
5131
+ : phase === 'opening' || isClosing
5132
+ ? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
5133
+ : 'none',
5134
+ pointerEvents: isCurrentVideo && isOpen && !isHorizontalNavActive ? 'auto' : 'none',
5147
5135
  touchAction: isCurrentVideo && isOpen ? 'none' : undefined,
5136
+ zIndex: 9998,
5148
5137
  };
5149
5138
 
5150
- const slideWidth = viewportRect?.width ?? 0;
5151
- const neighborIndex = isSliding ? (index + (slideDir as 1 | -1) + items.length) % items.length : null;
5152
- const neighborItem = neighborIndex !== null ? items[neighborIndex] : null;
5153
- const neighborBackingStyle: React.CSSProperties = {
5154
- ...backingBaseStyle,
5155
- transform: isSliding ? \`translateX(\${(slideDir as 1 | -1) * slideWidth + slideOffset}px)\` : undefined,
5156
- opacity: 1,
5157
- transition: slideAnimating ? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\` : 'none',
5158
- pointerEvents: 'none',
5159
- };
5160
- const neighborMediaStyle: React.CSSProperties = {
5161
- position: 'absolute',
5162
- top: (finalRect?.top ?? 0) - (viewportRect?.top ?? 0),
5163
- left: (finalRect?.left ?? 0) - (viewportRect?.left ?? 0),
5164
- width: finalRect?.width,
5165
- height: finalRect?.height,
5166
- objectFit: objectFitStyle,
5167
- pointerEvents: 'none',
5168
- };
5169
-
5170
- const navOverlayBaseStyle = contentRect ? {
5139
+ const navOverlayBaseStyle = finalRect ? {
5171
5140
  position: 'fixed' as const,
5172
- top: contentRect.top,
5173
- height: contentRect.height,
5174
- width: contentRect.width / 2,
5141
+ top: finalRect.top,
5142
+ height: finalRect.height,
5143
+ width: finalRect.width / 2,
5175
5144
  zIndex: 9999,
5176
5145
  } : null;
5177
5146
 
@@ -5269,52 +5238,30 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
5269
5238
  )}
5270
5239
  </div>
5271
5240
 
5272
- {finalRect && viewportRect && neighborItem && (
5273
- <div style={neighborBackingStyle}>
5274
- {isVideoMedia(neighborItem) ? (
5275
- <video
5276
- key={\`neighbor-\${neighborIndex}-\${neighborItem.url}\`}
5277
- src={neighborItem.url}
5278
- muted
5279
- playsInline
5280
- preload='auto'
5281
- style={neighborMediaStyle}
5282
- />
5283
- ) : (
5284
- <img
5285
- key={\`neighbor-\${neighborIndex}-\${neighborItem.url}\`}
5286
- src={neighborItem.url}
5287
- alt={neighborItem.name}
5288
- style={neighborMediaStyle}
5289
- />
5290
- )}
5291
- </div>
5292
- )}
5293
-
5294
- {finalRect && viewportRect && currentItem && (
5295
- <div style={currentBackingStyle}>
5296
- {isCurrentVideo ? (
5297
- <LightboxVideo
5298
- key={\`\${index}-\${currentItem.url}\`}
5299
- src={currentItem.url}
5300
- phase={phase}
5301
- mediaRef={mediaRef as React.RefObject<HTMLVideoElement>}
5302
- mediaStyle={currentMediaStyle}
5303
- onLoadedMetadata={handleMediaLoad}
5304
- onClick={handleVideoClick}
5305
- onMouseMove={handleVideoMouseMove}
5306
- />
5307
- ) : (
5308
- <img
5309
- key={\`\${index}-\${currentItem.url}\`}
5310
- ref={mediaRef as React.RefObject<HTMLImageElement>}
5311
- src={currentItem.url}
5312
- alt={currentItem.name}
5313
- onLoad={handleMediaLoad}
5314
- style={currentMediaStyle}
5315
- />
5316
- )}
5317
- </div>
5241
+ {finalRect && currentItem && (
5242
+ isCurrentVideo ? (
5243
+ <LightboxVideo
5244
+ key={\`\${index}-\${currentItem.url}\`}
5245
+ src={currentItem.url}
5246
+ phase={phase}
5247
+ mediaRef={mediaRef as React.RefObject<HTMLVideoElement>}
5248
+ mediaStyle={mediaStyle}
5249
+ onLoadedMetadata={computeFinalRect}
5250
+ onClick={handleVideoClick}
5251
+ onMouseMove={handleVideoMouseMove}
5252
+ onTransitionEnd={handleNavSwipeTransitionEnd}
5253
+ />
5254
+ ) : (
5255
+ <img
5256
+ key={\`\${index}-\${currentItem.url}\`}
5257
+ ref={mediaRef as React.RefObject<HTMLImageElement>}
5258
+ src={currentItem.url}
5259
+ alt={currentItem.name}
5260
+ onLoad={computeFinalRect}
5261
+ onTransitionEnd={handleNavSwipeTransitionEnd}
5262
+ style={mediaStyle}
5263
+ />
5264
+ )
5318
5265
  )}
5319
5266
 
5320
5267
  {isOpen && navOverlayBaseStyle && items.length > 1 && !isCurrentVideo && (
@@ -5322,9 +5269,9 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
5322
5269
  <div
5323
5270
  style={{
5324
5271
  ...navOverlayBaseStyle,
5325
- left: contentRect!.left,
5272
+ left: finalRect!.left,
5326
5273
  cursor: 'w-resize',
5327
- pointerEvents: isSliding ? 'none' : 'auto',
5274
+ pointerEvents: isHorizontalNavActive ? 'none' : 'auto',
5328
5275
  }}
5329
5276
  onClick={(e) => {
5330
5277
  if (touchInteractionRef.current) {
@@ -5332,15 +5279,15 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
5332
5279
  return;
5333
5280
  }
5334
5281
  e.stopPropagation();
5335
- startProgrammaticSlide(-1);
5282
+ onPrev();
5336
5283
  }}
5337
5284
  />
5338
5285
  <div
5339
5286
  style={{
5340
5287
  ...navOverlayBaseStyle,
5341
- left: contentRect!.left + contentRect!.width / 2,
5288
+ left: finalRect!.left + finalRect!.width / 2,
5342
5289
  cursor: 'e-resize',
5343
- pointerEvents: isSliding ? 'none' : 'auto',
5290
+ pointerEvents: isHorizontalNavActive ? 'none' : 'auto',
5344
5291
  }}
5345
5292
  onClick={(e) => {
5346
5293
  if (touchInteractionRef.current) {
@@ -5348,7 +5295,7 @@ function Lightbox({ prefix: P, items, index, imageDisplay, isEditor, onClose, on
5348
5295
  return;
5349
5296
  }
5350
5297
  e.stopPropagation();
5351
- startProgrammaticSlide(1);
5298
+ onNext();
5352
5299
  }}
5353
5300
  />
5354
5301
  </>
@@ -5376,7 +5323,6 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
5376
5323
  entriesCount,
5377
5324
  lightbox,
5378
5325
  imageDisplay,
5379
- imageCorners,
5380
5326
  lightboxImageDisplay,
5381
5327
  slider,
5382
5328
  sliderTiming,
@@ -5525,14 +5471,11 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
5525
5471
  ? Math.floor((columnsCount - itemsInLastRow) / 2) + 1
5526
5472
  : 1;
5527
5473
 
5528
- const imageBorderRadius = imageCorners ? scalingValue(imageCorners, isEditor) : undefined;
5529
-
5530
5474
  const imageWrapperStyle: React.CSSProperties = {
5531
5475
  width: imageWrapperWidth,
5532
5476
  ...(isCover
5533
5477
  ? { aspectRatio, height: 'auto', overflow: 'hidden' }
5534
5478
  : { height: 'auto' }),
5535
- ...(imageBorderRadius ? { borderRadius: imageBorderRadius, overflow: 'hidden' } : {}),
5536
5479
  };
5537
5480
 
5538
5481
  const imageWrapperClassName = \`\${P}-item-image-wrapper\${isFitSlider ? \` \${P}-item-image-wrapper-fit-slider\` : ''}\`.trim();
@@ -5548,7 +5491,6 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
5548
5491
  width: '100%',
5549
5492
  height: '100%',
5550
5493
  maxWidth: '100%',
5551
- ...(imageBorderRadius ? { borderRadius: imageBorderRadius } : {}),
5552
5494
  }
5553
5495
  : {
5554
5496
  objectFit: 'contain',
@@ -5556,7 +5498,6 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
5556
5498
  width: 'auto',
5557
5499
  height: 'auto',
5558
5500
  maxWidth: '100%',
5559
- ...(imageBorderRadius ? { borderRadius: imageBorderRadius } : {}),
5560
5501
  };
5561
5502
 
5562
5503
  const [dir, setDir] = useState('ltr');
@@ -5980,7 +5921,6 @@ type GridSettings = {
5980
5921
  ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
5981
5922
  reversed: boolean;
5982
5923
  };
5983
- imageCorners?: number;
5984
5924
  lightboxImageDisplay?: 'fit' | 'cover' | { display?: 'fit' | 'cover' };
5985
5925
  slider: 'on' | 'off';
5986
5926
  sliderTiming: number;
@@ -6029,12 +5969,12 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
6029
5969
  };
6030
5970
 
6031
5971
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
6032
- `,jr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Um=["titleColor","subtitleColor","lightboxCounterColor"],Xm={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:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",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"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},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:{...jr.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:{...jr.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:{...jr.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:"fit",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,imageCorners:0,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:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,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,imageCorners:0,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","imageCorners","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","imageCorners"]},{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:[...Um],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Ym={element:Vm,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:Xm,sourceCode:Km},Zm=50,$l=10,Ha="cntrl-lightbox-journal",Sr=Ha,pa=`${Ha}-`,$r=e=>`${Ha}-${e}`,Na=e=>e===Sr||e.startsWith(pa),Cl=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Tl=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Cl(t.get($r(e)));if(i)return i}const n=Cl(t.get(Sr));if(n)return n;for(const[i]of t){if(!i.startsWith(pa))continue;const o=i.slice(pa.length);if(!/^\d+$/.test(o))continue;const l=Number.parseInt(o,10);if(Number.isFinite(l)&&l>=1)return l}return null},Ll=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Zs=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(s=>{Na(s)&&i.searchParams.delete(s)}),t?i.searchParams.set($r(t),String(e)):i.searchParams.set(Sr,String(e));const o=n?"replaceState":"pushState",l=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",l)},Jm=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===$r(e)||i===Sr:Na(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)}},Js=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has($r(e)):[...t.keys()].some(n=>Na(n))},Qm=(e,t)=>{if(Js(t)){if(e){window.history.back();return}Jm(t)}},eg=20,tg=2,zr=e=>`max(${e}, ${eg}px)`,Pi=e=>((e==null?void 0:e.image)??[]).slice(0,tg),Qs=e=>e.reduce((t,n)=>t+Pi(n).length,0),ng=(e,t)=>{const n=e.slice(0,t).reduce((o,l)=>o+Pi(l).length,1),i=Pi(e[t]).length;return{start:n,end:n+i-1}},ig=(e,t)=>{const n=Qs(e),{start:i,end:o}=ng(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Xo=(e,t)=>t==="B"?e.flatMap((n,i)=>Pi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Pi(n)})),og=(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 ig(i,o)},Il=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",rg=(e,t,n)=>e==="B"?t.length>1:Qs(n)>1,hn=.004,Dn=.004,Ri={title1Width:.13,title2Width:.13,title3Width:.14},Vn=(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},Ai=(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},c)=>{if(l<=0||c<=0)return{overflow:l,widths:[c,...s]};const d=Math.min(l,c);return{overflow:l-d,widths:[c-d,...s]}},{overflow:i-1,widths:[]});return o},po=(e,t)=>Ai(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)},Gn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ai(e.length,n),effective:po(e.length,n)}},ec=(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),tc=(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),Un=["title1","title2","title3","count"],Ge=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Oa={title1:"1",title2:"2",title3:"3",count:"Count"},ja=e=>[Ge(e,"fontFamily"),Ge(e,"fontSettings"),{type:"row",items:[Ge(e,"fontSize"),Ge(e,"lineHeight"),Ge(e,"letterSpacing"),Ge(e,"wordSpacing")]},Ge(e,"textAlign"),Ge(e,"textAppearance")],ag=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Un.map(e=>[Oa[e],ja(e)]))}),lg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},sg={title1:.02,title2:.02,title3:.02,count:.017},si=(e,t)=>{const n=i=>{const o=Ge(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[lg[t]]}},ci=(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??sg[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 nc({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:x=0,title3MarginLeft:w=0,titleRowMarginBottom:$=0,titleHeaderLayout:f="desktop",contentMarginTop:S=0,iconMarginRight:L=0,closeIcon:M=null,closeIconMaxWidth:A=0,closeIconColor:C="#000000",closeIconHoverColor:J="#cccccc"}=n,k=v.scalingValue(S,i),U=v.scalingValue(L,i),I=v.scalingValue($,i),R=f==="mobile",T=ci("title1",si(n,"title1"),i),y=ci("title2",si(n,"title2"),i),h=ci("title3",si(n,"title3"),i),F=a.useMemo(()=>({title1Width:c??Ri.title1Width,title2Width:d??Ri.title2Width,title3Width:u??Ri.title3Width}),[c,d,u]),W=a.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:w}),[x,w]),V=a.useMemo(()=>Vn(e,t,T,y,h),[e,t,T,y,h]),ne=a.useMemo(()=>V.map(Z=>F[Z.widthKey]),[V,F]),X=a.useMemo(()=>Ai(V.length,ne),[V.length,ne]),z=a.useMemo(()=>po(V.length,ne),[V.length,ne]),H=a.useMemo(()=>V.filter(Z=>Z.prefix==="title1"),[V]),_=a.useMemo(()=>V.filter(Z=>Z.prefix==="title2"||Z.prefix==="title3"),[V]),E=a.useMemo(()=>Gn(H,F),[H,F]),q=a.useMemo(()=>Gn(_,F),[_,F]),Y=!!(t.title1||t.title2||t.title3),ee=M!==null;if(!(Y||ee))return null;const pe=(m??0)>0||o,b=(Z,de)=>{const We=V.findIndex(O=>O.prefix===Z.prefix);if(!R||de==="single-row")return{effectiveWidth:z[We]??0,resolvedWidth:X[We]??0,maxWidth:an(We,X)};if(de==="two-row-top"){const O=H.findIndex(Oe=>Oe.prefix===Z.prefix);return{effectiveWidth:E.effective[O]??0,resolvedWidth:E.resolved[O]??0,maxWidth:an(O,E.resolved)}}const se=_.findIndex(O=>O.prefix===Z.prefix);return{effectiveWidth:q.effective[se]??0,resolvedWidth:q.resolved[se]??0,maxWidth:an(se,q.resolved)}},ye=(Z,de,We)=>{if(!R||We==="single-row"){const nt=Z.findIndex(He=>He.prefix===de.prefix),Ue=Z.map(He=>F[He.widthKey]),Ce=Ai(Z.length,Ue);return{effectiveWidth:po(Z.length,Ue)[nt]??0,resolvedWidth:Ce[nt]??0,maxWidth:an(nt,Ce)}}if(We==="two-row-top"){const nt=Z.filter(He=>He.prefix==="title1"),Ue=nt.findIndex(He=>He.prefix===de.prefix),{resolved:Ce,effective:Fe}=Gn(nt,F);return{effectiveWidth:Fe[Ue]??0,resolvedWidth:Ce[Ue]??0,maxWidth:an(Ue,Ce)}}const se=Z.filter(nt=>nt.prefix==="title2"||nt.prefix==="title3"),O=se.findIndex(nt=>nt.prefix===de.prefix),{resolved:Oe,effective:_e}=Gn(se,F);return{effectiveWidth:_e[O]??0,resolvedWidth:Oe[O]??0,maxWidth:an(O,Oe)}},Q=Z=>tc(V,X,W,Z)+(R?0:m??0),xe=()=>R?0:m??0,$e=Z=>_.slice(0,Z).reduce((de,We,se)=>de+(We.marginLeftKey?W[We.marginLeftKey]??0:0)+(q.resolved[se]??0),0),oe=Z=>{const de=_[Z];return $e(Z)+(de.marginLeftKey?W[de.marginLeftKey]??0:0)+(q.resolved[Z]??0)},ie=(Z,de,We)=>{const se=Z.marginLeftKey?W[Z.marginLeftKey]??0:0,{effectiveWidth:O,resolvedWidth:Oe,maxWidth:_e}=We??b(Z,de),nt=Math.max(se,Dn),Ue=o&&de==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":Z.prefix,style:{width:v.scalingValue(O,i),...se>0?{marginLeft:v.scalingValue(se,i)}:{}},children:[r.jsx("p",{className:Z.className,style:Z.style,children:Z.text}),Ue&&Z.marginLeftKey?r.jsx("div",{"data-controls":Z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:v.scalingValue(-se,i),width:v.scalingValue(nt,i),height:"100%",pointerEvents:"auto"}}):null,Ue?r.jsx("div",{"data-controls":Z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(_e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:v.scalingValue(-hn/2,i),width:v.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}}):null]},Z.className)},B=(Z="two-row")=>{const de=V.findIndex(O=>O.prefix==="title1"),We=de>=0?X[de]:F.title1Width,se=Z==="two-row"&&o;return r.jsx("div",{...se?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We)}:{},style:{width:v.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...se?{pointerEvents:"auto"}:{}}})},le=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:T,"aria-hidden":"true",children:" "}),re=Z=>{const de=Vn(e,Z,T,y,h);return r.jsx(r.Fragment,{children:de.map(We=>ie(We,"single-row",ye(de,We,"single-row")))})},ke=Z=>{const de=Vn(e,Z,T,y,h),We=de.find(se=>se.prefix==="title1");return We?ie(We,"two-row-top",ye(de,We,"two-row-top")):null},fe=(Z,de=!1)=>{const We=Vn(e,Z,T,y,h),se=We.filter(_e=>_e.prefix==="title2"||_e.prefix==="title3"),O=o&&de;return se.length>0||O||($??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[se.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:se.map(_e=>ie(_e,"two-row-bottom",ye(We,_e,"two-row-bottom")))}),de&&o?r.jsxs(r.Fragment,{children:[K(),ae()]}):null]}):null,($??0)>0||O?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:I,width:"100%",flexShrink:0,pointerEvents:O?"auto":"none"}}):null]}):null},Pe=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:v.scalingValue(A??0,i),height:v.scalingValue(A??0,i),marginRight:U,"--close-icon-hover-color":J},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Z=>{Z.stopPropagation(),s==null||s()},"aria-label":"Close",children:r.jsx(on,{url:M??"",fill:C,hoverFill:i&&!l?C:J,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:U,height:"100%",pointerEvents:"auto"}})]}),ve=()=>ee?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Pe()}):null,we=Z=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:Z})}),Se=Z=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[ee||Y?le():null,pe?B("two-row"):null,we(Z),ve()]}),G=(Z,de=!1)=>r.jsxs(r.Fragment,{children:[Se(ke(Z)),fe(Z,de)]}),me=()=>{const Z=R?-1:V.findIndex(se=>se.prefix==="title1"),de=!R&&(o||(m??0)>0)?(()=>{const se=m??0,O=Z>=0?X[Z]:F.title1Width,Oe=Math.max(se,Dn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(O),style:{position:"absolute",top:0,left:0,width:v.scalingValue(Oe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,We=V.flatMap((se,O)=>{if(!se.marginLeftKey)return[];const Oe=W[se.marginLeftKey]??0,_e=ec(V,X,W,O)+xe(),nt=Math.max(Oe,Dn);return r.jsx("div",{"data-controls":se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(X[O]),style:{position:"absolute",top:0,left:v.scalingValue(_e,i),width:v.scalingValue(nt,i),height:"100%",pointerEvents:"auto"}},se.marginLeftKey)});return de?[de,...We]:We},D=()=>V.map((Z,de)=>{const We=an(de,X),O=Q(de)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Z.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,left:v.scalingValue(O,i),width:v.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}})},`${Z.widthKey}-junction`)}),K=()=>_.flatMap((Z,de)=>{if(!Z.marginLeftKey)return[];const We=W[Z.marginLeftKey]??0,se=$e(de),O=Math.max(We,Dn),{resolvedWidth:Oe}=b(Z,"two-row-bottom");return r.jsx("div",{"data-controls":Z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:v.scalingValue(se,i),width:v.scalingValue(O,i),height:"100%",pointerEvents:"auto"}},Z.marginLeftKey)}),ae=()=>_.map((Z,de)=>{const{maxWidth:We}=b(Z,"two-row-bottom"),O=oe(de)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Z.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,left:v.scalingValue(O,i),width:v.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}})},`${Z.widthKey}-junction`)}),ge=()=>!o||R?null:r.jsxs(r.Fragment,{children:[me(),D()]}),ce=!!(t.title2||t.title3||($??0)>0||o),be=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[ee||Y?le():null,pe?B("single-row"):null,Y?we(re(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ve(),ge()]}),Ee=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ce?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:ce?void 0:{flex:"0 0 auto",height:"auto"},children:G(t,!0)}),ge()]});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:k,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...R?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${R?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${R?` ${e}-text-bar-cell-stacked`:""}`,style:R?void 0:{flex:1,minWidth:0,width:"100%"},children:R?Ee():be()})})})]})}function cg(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function dg(e){return`
5972
+ `,zr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Dm=["titleColor","subtitleColor","lightboxCounterColor"],Vm={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:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",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:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",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:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,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:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,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:[...Dm],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Gm={element:jm,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:Vm,sourceCode:Bm},qm=50,Ss=10,Ha="cntrl-lightbox-journal",$r=Ha,ma=`${Ha}-`,Cr=e=>`${Ha}-${e}`,ja=e=>e===$r||e.startsWith(ma),$s=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Cs=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=$s(t.get(Cr(e)));if(i)return i}const n=$s(t.get($r));if(n)return n;for(const[i]of t){if(!i.startsWith(ma))continue;const o=i.slice(ma.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ts=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ul=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{ja(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Cr(t),String(e)):i.searchParams.set($r,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Km=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Cr(e)||i===$r:ja(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)}},Xl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Cr(e)):[...t.keys()].some(n=>ja(n))},Um=(e,t)=>{if(Xl(t)){if(e){window.history.back();return}Km(t)}},Xm=20,Ym=2,Br=e=>`max(${e}, ${Xm}px)`,Mi=e=>((e==null?void 0:e.image)??[]).slice(0,Ym),Yl=e=>e.reduce((t,n)=>t+Mi(n).length,0),Zm=(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}},Jm=(e,t)=>{const n=Yl(e),{start:i,end:o}=Zm(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Yo=(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)})),Qm=(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 Jm(i,o)},Ls=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",eg=(e,t,n)=>e==="B"?t.length>1:Yl(n)>1,hn=.004,Bn=.004,Ii={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},Pi=(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},po=(e,t)=>Pi(e,t),sn=(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:Pi(e.length,n),effective:po(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),Jl=(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"],Be=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Oa={title1:"1",title2:"2",title3:"3",count:"Count"},za=e=>[Be(e,"fontFamily"),Be(e,"fontSettings"),{type:"row",items:[Be(e,"fontSize"),Be(e,"lineHeight"),Be(e,"letterSpacing"),Be(e,"wordSpacing")]},Be(e,"textAlign"),Be(e,"textAppearance")],tg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Kn.map(e=>[Oa[e],za(e)]))}),ng={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ig={title1:.02,title2:.02,title3:.02,count:.017},li=(e,t)=>{const n=i=>{const o=Be(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[ng[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??ig[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 Ql({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:x=0,title3MarginLeft:b=0,titleRowMarginBottom:T=0,titleHeaderLayout:f="desktop",contentMarginTop:L=0,iconMarginRight:$=0,closeIcon:R=null,closeIconMaxWidth:P=0,closeIconColor:C="#000000",closeIconHoverColor:X="#cccccc"}=n,E=y.scalingValue(L,i),B=y.scalingValue($,i),I=y.scalingValue(T,i),w=f==="mobile",W=ci("title1",li(n,"title1"),i),h=ci("title2",li(n,"title2"),i),S=ci("title3",li(n,"title3"),i),k=a.useMemo(()=>({title1Width:d??Ii.title1Width,title2Width:c??Ii.title2Width,title3Width:u??Ii.title3Width}),[d,c,u]),D=a.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:b}),[x,b]),U=a.useMemo(()=>Dn(e,t,W,h,S),[e,t,W,h,S]),ae=a.useMemo(()=>U.map(z=>k[z.widthKey]),[U,k]),Y=a.useMemo(()=>Pi(U.length,ae),[U.length,ae]),G=a.useMemo(()=>po(U.length,ae),[U.length,ae]),H=a.useMemo(()=>U.filter(z=>z.prefix==="title1"),[U]),F=a.useMemo(()=>U.filter(z=>z.prefix==="title2"||z.prefix==="title3"),[U]),A=a.useMemo(()=>Vn(H,k),[H,k]),K=a.useMemo(()=>Vn(F,k),[F,k]),q=!!(t.title1||t.title2||t.title3),ee=R!==null;if(!(q||ee))return null;const ue=(m??0)>0||o,v=(z,re)=>{const ke=U.findIndex(j=>j.prefix===z.prefix);if(!w||re==="single-row")return{effectiveWidth:G[ke]??0,resolvedWidth:Y[ke]??0,maxWidth:sn(ke,Y)};if(re==="two-row-top"){const j=H.findIndex(Ne=>Ne.prefix===z.prefix);return{effectiveWidth:A.effective[j]??0,resolvedWidth:A.resolved[j]??0,maxWidth:sn(j,A.resolved)}}const ie=F.findIndex(j=>j.prefix===z.prefix);return{effectiveWidth:K.effective[ie]??0,resolvedWidth:K.resolved[ie]??0,maxWidth:sn(ie,K.resolved)}},ye=(z,re,ke)=>{if(!w||ke==="single-row"){const et=z.findIndex(De=>De.prefix===re.prefix),Ye=z.map(De=>k[De.widthKey]),lt=Pi(z.length,Ye);return{effectiveWidth:po(z.length,Ye)[et]??0,resolvedWidth:lt[et]??0,maxWidth:sn(et,lt)}}if(ke==="two-row-top"){const et=z.filter(De=>De.prefix==="title1"),Ye=et.findIndex(De=>De.prefix===re.prefix),{resolved:lt,effective:mt}=Vn(et,k);return{effectiveWidth:mt[Ye]??0,resolvedWidth:lt[Ye]??0,maxWidth:sn(Ye,lt)}}const ie=z.filter(et=>et.prefix==="title2"||et.prefix==="title3"),j=ie.findIndex(et=>et.prefix===re.prefix),{resolved:Ne,effective:Me}=Vn(ie,k);return{effectiveWidth:Me[j]??0,resolvedWidth:Ne[j]??0,maxWidth:sn(j,Ne)}},Z=z=>Jl(U,Y,D,z)+(w?0:m??0),ce=()=>w?0:m??0,$e=z=>F.slice(0,z).reduce((re,ke,ie)=>re+(ke.marginLeftKey?D[ke.marginLeftKey]??0:0)+(K.resolved[ie]??0),0),ne=z=>{const re=F[z];return $e(z)+(re.marginLeftKey?D[re.marginLeftKey]??0:0)+(K.resolved[z]??0)},ve=(z,re,ke)=>{const ie=z.marginLeftKey?D[z.marginLeftKey]??0:0,{effectiveWidth:j,resolvedWidth:Ne,maxWidth:Me}=ke??v(z,re),et=Math.max(ie,Bn),Ye=o&&re==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":z.prefix,style:{width:y.scalingValue(j,i),...ie>0?{marginLeft:y.scalingValue(ie,i)}:{}},children:[r.jsx("p",{className:z.className,style:z.style,children:z.text}),Ye&&z.marginLeftKey?r.jsx("div",{"data-controls":z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:y.scalingValue(-ie,i),width:y.scalingValue(et,i),height:"100%",pointerEvents:"auto"}}):null,Ye?r.jsx("div",{"data-controls":z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Me),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:y.scalingValue(-hn/2,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}}):null]},z.className)},J=(z="two-row")=>{const re=U.findIndex(j=>j.prefix==="title1"),ke=re>=0?Y[re]:k.title1Width,ie=z==="two-row"&&o;return r.jsx("div",{...ie?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke)}:{},style:{width:y.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...ie?{pointerEvents:"auto"}:{}}})},pe=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),he=z=>{const re=Dn(e,z,W,h,S);return r.jsx(r.Fragment,{children:re.map(ke=>ve(ke,"single-row",ye(re,ke,"single-row")))})},Ae=z=>{const re=Dn(e,z,W,h,S),ke=re.find(ie=>ie.prefix==="title1");return ke?ve(ke,"two-row-top",ye(re,ke,"two-row-top")):null},be=(z,re=!1)=>{const ke=Dn(e,z,W,h,S),ie=ke.filter(Me=>Me.prefix==="title2"||Me.prefix==="title3"),j=o&&re;return ie.length>0||j||(T??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(Me=>ve(Me,"two-row-bottom",ye(ke,Me,"two-row-bottom")))}),re&&o?r.jsxs(r.Fragment,{children:[Se(),Ie()]}):null]}):null,(T??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:I,width:"100%",flexShrink:0,pointerEvents:j?"auto":"none"}}):null]}):null},We=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(P??0,i),height:y.scalingValue(P??0,i),marginRight:B,"--close-icon-hover-color":X},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:z=>{z.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(rn,{url:R??"",fill:C,hoverFill:i&&!s?C:X,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:B,height:"100%",pointerEvents:"auto"}})]}),Q=()=>ee?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:We()}):null,le=z=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:z})}),xe=z=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[ee||q?pe():null,ue?J("two-row"):null,le(z),Q()]}),O=(z,re=!1)=>r.jsxs(r.Fragment,{children:[xe(Ae(z)),be(z,re)]}),se=()=>{const z=w?-1:U.findIndex(ie=>ie.prefix==="title1"),re=!w&&(o||(m??0)>0)?(()=>{const ie=m??0,j=z>=0?Y[z]:k.title1Width,Ne=Math.max(ie,Bn);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:y.scalingValue(Ne,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ke=U.flatMap((ie,j)=>{if(!ie.marginLeftKey)return[];const Ne=D[ie.marginLeftKey]??0,Me=Zl(U,Y,D,j)+ce(),et=Math.max(Ne,Bn);return r.jsx("div",{"data-controls":ie.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Y[j]),style:{position:"absolute",top:0,left:y.scalingValue(Me,i),width:y.scalingValue(et,i),height:"100%",pointerEvents:"auto"}},ie.marginLeftKey)});return re?[re,...ke]:ke},fe=()=>U.map((z,re)=>{const ke=sn(re,Y),j=Z(re)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ke),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(j,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}})},`${z.widthKey}-junction`)}),Se=()=>F.flatMap((z,re)=>{if(!z.marginLeftKey)return[];const ke=D[z.marginLeftKey]??0,ie=$e(re),j=Math.max(ke,Bn),{resolvedWidth:Ne}=v(z,"two-row-bottom");return r.jsx("div",{"data-controls":z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:y.scalingValue(ie,i),width:y.scalingValue(j,i),height:"100%",pointerEvents:"auto"}},z.marginLeftKey)}),Ie=()=>F.map((z,re)=>{const{maxWidth:ke}=v(z,"two-row-bottom"),j=ne(re)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ke),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(j,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}})},`${z.widthKey}-junction`)}),we=()=>!o||w?null:r.jsxs(r.Fragment,{children:[se(),fe()]}),_=!!(t.title2||t.title3||(T??0)>0||o),de=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[ee||q?pe():null,ue?J("single-row"):null,q?le(he(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Q(),we()]}),oe=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,..._?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:_?void 0:{flex:"0 0 auto",height:"auto"},children:O(t,!0)}),we()]});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%",...w?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${w?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${w?` ${e}-text-bar-cell-stacked`:""}`,style:w?void 0:{flex:1,minWidth:0,width:"100%"},children:w?oe():de()})})})]})}function og(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function rg(e){return`
6033
5973
  .${e}-wrapper {
6034
5974
  display: grid;
6035
5975
  align-items: start;
6036
5976
  justify-content: center;
6037
- min-height: ${cg(48)};
5977
+ min-height: ${og(48)};
6038
5978
  }
6039
5979
  .${e}-item {
6040
5980
  display: flex;
@@ -6360,7 +6300,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
6360
6300
  pointer-events: auto;
6361
6301
  flex-shrink: 0;
6362
6302
  }
6363
- `}const Rl={url:"",name:"",objectFit:"cover"},Cn=500,Ui=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",ug=72,pg=50,mg=1e4,gg=650,hg=500;function fg(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 ic(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 yg(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?ic(i,n):null}function vg(e){return e.reduce((t,n,i)=>{const o=za(n.gallery),s=Ba(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return s.length===0||t.push({gridIndex:i,items:s,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Ji(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 El(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Ji(e,i,n)}const bg=.03;function oc(e){return e.width*bg}const Br={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 Ml(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function xg(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ma(e,t,n){const i=e.getBoundingClientRect(),o=i.width,l=i.height,s=t/n,c=o/l;if(s>c){const u=o/s;return{width:o,height:u,left:i.left,top:i.top+(l-u)/2}}const d=l*s;return{width:d,height:l,left:i.left+(o-d)/2,top:i.top}}function wg(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ma(e,t.width,t.height)}function Sg(e,t){if(Gi(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 $g(e){const t=new Set,n=[];for(const i of e){const o=za(i.gallery),l=Ba(o);for(const s of l)for(const c of[s.displayMedia,s.lightboxMedia])c!=null&&c.url&&!t.has(c.url)&&(t.add(c.url),n.push(c))}return n}function Cg({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=>Gi(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 Fi(e,t,n){const{width:i,height:o,top:l}=e,{left:s,width:c}=n,d=oc(n);return t==="left"?{left:s+d-i,top:l,width:i,height:o}:{left:s+c-d,top:l,width:i,height:o}}function or(e,t,n){const i=Fi(e,t,n);return{...i,left:2*i.left-e.left}}function Tg(e,t,n){const{left:i,width:o}=n,l=oc(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 rc(e,t,n,i){const o=Fi(e,"left",i),l=Fi(e,"right",i),s=or(e,"left",i),c=or(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:c,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:c};case"far-left":return{start:s,end:o};default:return{start:e,end:e}}}function Lg(e,t,n,i){const{start:o,end:l}=rc(e,t,n,i);return{x:l.left-o.left,y:l.top-o.top}}function Ig(e,t,n){const i=Fi(e,t,n),o=or(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function ac(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 za(e){if(!e)return;if(ac(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??Rl,i??o??Rl]}]}function Rg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Eg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Ba(e){if(!Array.isArray(e)||e.length===0)return[];if(ac(e)){const t=[];for(const n of e){const i=Rg(n);if(!i)continue;const o=Eg(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 Gi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Mg({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Gi(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 kg({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:l,onTransitionEnd:s}){const c=a.useRef(null);return a.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:s,children:r.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:l,onClick:d=>d.stopPropagation(),style:o},e)})}function _o({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Gi(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 Pg({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:w,resolveCloseSourceRect:$,onClose:f,onPrev:S,onNext:L}){const M=a.useRef(null),A=a.useRef(null),C=a.useRef(null),J=a.useRef(new Map),[k,U]=a.useState(0),I=a.useRef(null),R=a.useRef(0),T=a.useRef(0),y=a.useRef("none"),h=a.useRef(!1),F=a.useRef(!1),W=a.useRef(!1),V=a.useRef(null),ne=a.useRef(null),X=a.useRef(null),z=a.useRef(()=>{}),H=a.useRef(null),_=a.useRef(null),E=a.useRef(null),q=a.useRef(!1),[Y,ee]=a.useState(null),[N,pe]=a.useState(Br),[b,ye]=a.useState(0),[Q,xe]=a.useState("opening"),[$e,oe]=a.useState(0),[ie,B]=a.useState(0),[le,re]=a.useState(!1),[ke,fe]=a.useState(null),[Pe,ve]=a.useState(null),[we,Se]=a.useState(null),[G,me]=a.useState(!1),[D,K]=a.useState(null),[ae,ge]=a.useState(!1),ce=a.useRef(!1),[be,Ee]=a.useState(!1),[Z,de]=a.useState(!1),We=a.useRef(n),se=a.useRef(void 0),O=t[n],Oe=O?Gi(O):!1,_e=ie!==0||le,nt=!s&&(!l||!!c),Ue=d&&!s,Ce=u.length>1,Fe=a.useCallback((g,ue)=>t.length<=1?null:t[(g+ue+t.length)%t.length]??null,[t]),He=Ce?Ji(u,m,-1):Fe(n,-1),Ze=Ce?Ji(u,m,1):Fe(n,1),Tt=ke===-1&&_e?Ce&&Pe!==null?Ji(u,Pe,-1):we!==null?Fe(we,-1):null:null,it=ke===1&&_e?Ce&&Pe!==null?Ji(u,Pe,1):we!==null?Fe(we,1):null:null,De=Tt&&Tt.url!==(He==null?void 0:He.url)?Tt:null,et=it&&it.url!==(Ze==null?void 0:Ze.url)?it:null,dt=He&&Ue?(()=>{const g=Ce?El(u,m,-1):t.length>2?Fe((n-1+t.length)%t.length,-1):null;return g&&g.url!==He.url?g:null})():null,lt=Ze&&Ue?(()=>{const g=Ce?El(u,m,1):t.length>2?Fe((n+1)%t.length,1):null;return g&&g.url!==Ze.url?g:null})():null,ht=De??dt,Rt=et??lt,ot=a.useCallback((g,ue,Te)=>{if(!g||!ue||!Te)return;const Le=J.current,tt=Le.get(g);(tt==null?void 0:tt.width)===ue&&(tt==null?void 0:tt.height)===Te||(Le.set(g,{width:ue,height:Te}),U(kt=>kt+1))},[]),xt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const ue=J.current.get(g.url);return wg(A.current,ue)},[k,b]),zt=a.useCallback(()=>{if(!O)return;const g=xt(O);if(g){ee(g);return}const ue=A.current;ue&&ee(Ml(ue))},[O,xt]),rt=a.useCallback(g=>{if(Ce){const ue=u.length;ve((m+g+ue)%ue),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),ve(null))},[Ce,u.length,m,t.length,n]),qe=a.useCallback(g=>{W.current=g,re(g)},[]),Ne=a.useCallback(()=>{V.current!==null&&(window.clearTimeout(V.current),V.current=null)},[]),pt=a.useCallback(()=>{Ne(),V.current=window.setTimeout(()=>{Ne(),qe(!1)},Ui+32)},[Ne,qe]),yt=a.useCallback(()=>{const g=M.current;if(!g){pe({left:0,top:0,width:typeof window<"u"?window.innerWidth:Br.width,height:typeof window<"u"?window.innerHeight:Br.height});return}const ue=g.getBoundingClientRect();pe({left:ue.left,top:ue.top,width:ue.width,height:ue.height})},[]),Mt=a.useCallback((g,ue)=>{if(_e){if(be&&!le)return`translate(${ie}px, 0px)`;if(le&&ke!==null){const Te=xt(g);if(!Te)return;const{x:Le,y:tt}=Lg(Te,ue,ke,N);return`translate(${Le}px, ${tt}px)`}if(le)return"translate(0px, 0px)"}},[_e,be,le,ie,ke,N,xt]),Dt=a.useCallback(()=>{const g=ne.current;ne.current=null,Ne(),qe(!1),fe(null),ve(null),Se(null),B(0),Ee(!1),h.current=!1,T.current=0,y.current="none",g===-1?S():g===1&&L()},[Ne,qe,S,L]),en=a.useCallback(()=>{Ne(),V.current=window.setTimeout(()=>{ne.current!==null&&Dt()},Ui+32)},[Ne,Dt]),sn=a.useCallback(()=>{Ne(),ne.current=null,qe(!1),fe(null),ve(null),Se(null),B(0),Ee(!1),h.current=!1,T.current=0,y.current="none"},[Ne,qe]),Lt=a.useCallback(g=>{if(!(!Ue||!Y)){if(W.current){if(ne.current===g){X.current=g,Dt();return}sn()}Ne(),rt(g),ne.current=g,fe(g),qe(!0),en()}},[Ue,Y,Dt,sn,Ne,rt,qe,en]);z.current=Lt;const Et=a.useCallback(()=>{H.current=null,q.current=!1,_.current!==null&&(window.clearInterval(_.current),_.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),Qt=a.useCallback(g=>{_.current!==null&&window.clearInterval(_.current);const ue=q.current?hg:gg;_.current=window.setInterval(()=>{z.current(g)},ue)},[]),Ut=a.useCallback(g=>{H.current!==g&&(Et(),H.current=g,q.current=!1,z.current(g),Qt(g),E.current=window.setTimeout(()=>{E.current=null,H.current===g&&(q.current=!0,Qt(g))},mg))},[Et,Qt]),ft=a.useCallback(()=>{const g=A.current;if(!g)return;const ue=O==null?void 0:O.url,Te=ue?J.current.get(ue):void 0;if(Te!=null&&Te.width&&(Te!=null&&Te.height)){ee(ma(g,Te.width,Te.height));return}const Le=C.current;if(Le&&ue&&(Le.src===ue||Le.currentSrc===ue)){const{width:kt,height:Ke}=xg(Le);if(kt&&Ke){ot(ue,kt,Ke),ee(ma(g,kt,Ke));return}}const tt=Ml(g);!tt.width||!tt.height||ee(tt)},[O==null?void 0:O.url,ot]),qt=a.useCallback(g=>{if(C.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&ft();return}g.complete&&g.naturalWidth>0&&ft()}},[ft]),Re=a.useCallback(()=>{yt(),ft(),ye(g=>g+1)},[yt,ft]);a.useEffect(()=>{Re();const g=A.current,ue=M.current,Te=new ResizeObserver(()=>Re());return g&&Te.observe(g),ue&&Te.observe(ue),window.addEventListener("resize",Re),()=>{Te.disconnect(),window.removeEventListener("resize",Re)}},[Re,n,x]),a.useLayoutEffect(()=>{if(!O)return;const g=C.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){ft();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&ft()}},[O==null?void 0:O.url,n,ft]),a.useEffect(()=>{zt()},[zt,k]),a.useEffect(()=>{const g=new Set,ue=[],Te=Le=>{!(Le!=null&&Le.url)||g.has(Le.url)||(g.add(Le.url),ue.push(Le))};t.forEach(Te),u.forEach(Le=>Le.items.forEach(Te)),ue.forEach(Le=>{J.current.has(Le.url)||Sg(Le,ot)})},[t,u,ot]),a.useEffect(()=>{if(Q!=="opening"||!Y)return;if(!w){xe("open");return}me(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{me(!0),xe("open")})});return()=>cancelAnimationFrame(g)},[Q,Y,w]),a.useEffect(()=>{if(Q!=="closing")return;const g=setTimeout(()=>f(),Cn);return()=>clearTimeout(g)},[Q,f]),a.useEffect(()=>()=>{Ne()},[Ne]),a.useLayoutEffect(()=>{We.current===n&&se.current===(O==null?void 0:O.url)||(Ne(),ne.current=null,fe(null),ve(null),Se(null),oe(0),B(0),qe(!1),de(!1),Ee(!1),R.current=0,T.current=0,y.current="none",h.current=!1,I.current=null,F.current=!1,C.current=null,zt(),We.current=n,se.current=O==null?void 0:O.url)},[n,O==null?void 0:O.url,qe,Ne,zt]),a.useLayoutEffect(()=>{const g=X.current;g!==null&&(X.current=null,requestAnimationFrame(()=>{z.current(g)}))},[n,m,O==null?void 0:O.url]),a.useLayoutEffect(()=>{if(Q==="opening"){ce.current=!1,ge(!1);return}if(Q!=="open"||ce.current)return;if(!He&&!Ze){ce.current=!0;return}ge(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ge(!0),ce.current=!0})});return()=>cancelAnimationFrame(g)},[Q,He==null?void 0:He.url,Ze==null?void 0:Ze.url]),a.useEffect(()=>{if(Q!=="open")return;const g=()=>{const Ke=st=>{st.stopPropagation(),st.preventDefault(),document.removeEventListener("click",Ke,!0)};document.addEventListener("click",Ke,!0)},ue=Ke=>{const st=Ke<0?1:-1;Ne(),rt(st),ne.current=st,fe(st),qe(!0),en()},Te=Ke=>{if(Math.abs(Ke)>pg&&Ue){ue(Ke);return}ne.current=null,fe(null),ve(null),Se(null),qe(!0),B(0),pt()},Le=Ke=>{if(Ke.touches.length!==1||W.current)return;const st=Ke.touches[0];F.current=!0,I.current={x:st.clientX,y:st.clientY},y.current="none",T.current=0,h.current=!1},tt=Ke=>{if(!I.current||Ke.touches.length!==1||W.current)return;const st=Ke.touches[0],_t=st.clientX-I.current.x,It=st.clientY-I.current.y;if(y.current==="none"){if(Math.abs(_t)<10&&Math.abs(It)<10)return;if(Math.abs(_t)>Math.abs(It)){if(!Ue)return;y.current="horizontal"}else if(It>0){if(!nt)return;y.current="vertical"}else return}if(y.current==="horizontal"){h.current=!0,Ee(!0),T.current=_t,B(_t),Ke.preventDefault();return}y.current==="vertical"&&(h.current=!0,Ee(!0),R.current=It,oe(It),Ke.preventDefault())},kt=()=>{if(!I.current)return;const Ke=y.current,st=h.current;if(st&&Ke==="horizontal")Te(T.current),g();else if(st&&Ke==="vertical"){const _t=R.current;if(nt&&_t>ug){const It=window.innerHeight;R.current=It,de(!0),oe(It),xe("closing")}else R.current=0,oe(0);g()}else Ke==="horizontal"&&Math.abs(T.current)>0&&(Te(T.current),g());I.current=null,y.current="none",T.current=0,h.current=!1,Ee(!1)};return document.addEventListener("touchstart",Le,{passive:!0}),document.addEventListener("touchmove",tt,{passive:!1}),document.addEventListener("touchend",kt),document.addEventListener("touchcancel",kt),()=>{document.removeEventListener("touchstart",Le),document.removeEventListener("touchmove",tt),document.removeEventListener("touchend",kt),document.removeEventListener("touchcancel",kt)}},[Q,Ue,qe,pt,Ne,nt,en,rt]);const Ve=a.useCallback(()=>{const g=($==null?void 0:$())??w??null;g&&Y&&(K(g),me(!0)),xe("closing")},[$,w,Y]);a.useEffect(()=>{const g=Le=>{if(Le.key==="Escape"){if(l&&c||Q==="closing")return;Et(),Ve();return}if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight"||Q!=="open"||!Ue)return;Le.preventDefault();const tt=Le.key==="ArrowLeft"?-1:1;Le.repeat&&H.current===tt||Ut(tt)},ue=Le=>{if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight")return;const tt=Le.key==="ArrowLeft"?-1:1;H.current===tt&&Et()},Te=()=>{Et()};return window.addEventListener("keydown",g),window.addEventListener("keyup",ue),window.addEventListener("blur",Te),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",ue),window.removeEventListener("blur",Te),Et()}},[Q,l,c,Ve,Ue,Ut,Et]),a.useEffect(()=>{Q!=="open"&&Et()},[Q,Et]);const Xe=()=>{Q==="closing"||s||Ve()},ze=Q==="open",mt=Q==="closing",Nt=$e>0?Math.max(0,1-$e/500):1,Ae=$e>0?Math.max(.35,1-$e/500):1,Ye=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!W.current)){if(ne.current!==null){Dt();return}Ne(),qe(!1)}},[Ne,qe,Dt]),Je=Q==="closing"?D??w:w,bt=Je&&Y&&(Q==="opening"||mt)?fg(Je,Y):void 0,$t=_e&&O?Mt(O,"center"):$e>0?`translateY(${$e}px)`:bt,ut=Y?Wo(Y,N):null,Pt=!!(Je&&Y),At=Pt&&(Q==="closing"||Q==="open"&&G),Vt={position:"absolute",top:ut==null?void 0:ut.top,left:ut==null?void 0:ut.left,width:ut==null?void 0:ut.width,height:ut==null?void 0:ut.height,objectFit:"contain",transformOrigin:"top left",transform:$t,opacity:$e>0?Ae:Pt?1:Q==="opening"||mt?0:1,transition:be&&!le?"none":le?`transform ${Ui}ms ${pn}`:Z?`transform ${Cn}ms ${pn}, opacity ${Cn}ms ${pn}`:At?`transform ${Cn}ms ${pn}`:Q==="opening"||mt?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:Oe&&ze&&!_e?"auto":"none",touchAction:Oe&&ze?"none":void 0,zIndex:1,overflow:Oe?"hidden":void 0},Kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:ze&&!_e?"auto":"none"},Ft=(g,ue,Te="adjacent")=>{const Le=xt(g);if(!Le)return{display:"none"};const tt=Te==="far"?ue==="left"?"far-left":"far-right":ue==="left"?"left-adjacent":"right-adjacent",{start:kt}=ke!==null?rc(Le,tt,ke,N):{start:Te==="far"?or(Le,ue,N):Fi(Le,ue,N)},Ke=Wo(kt,N),st=Mt(g,tt),_t=!_e&&Te==="adjacent"&&ze&&!ae?Ig(Le,ue,N):null,It=Te==="far"&&_e&&ke===(ue==="left"?-1:1),cn=be&&!le?!1:le,un=Te==="adjacent"&&ze&&ae&&!_e;return{position:"absolute",top:Ke.top,left:Ke.left,width:Ke.width,height:Ke.height,objectFit:"contain",transform:st??(_t?`translate(${_t.x}px, ${_t.y}px)`:void 0),opacity:Te==="far"?ze&&It?1:0:ze?1:0,transition:cn?Te==="far"?`transform ${Ui}ms ${pn}`:`transform ${Ui}ms ${pn}, opacity ${Cn}ms ${pn}`:un?`transform ${Cn}ms ${pn}`:Q==="opening"||mt?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Yt=(g,ue)=>{const Te=xt(g);return Te?Tg(Fi(Te,ue,N),ue,N):null},wt=g=>ue=>{if(!s){if(F.current){F.current=!1;return}ue.stopPropagation(),Lt(g)}},Ot=He?Yt(He,"left"):null,jt=Ze?Yt(Ze,"right"):null,Bt=Ot?Wo(Ot,N):null,vt=jt?Wo(jt,N):null;return r.jsxs("div",{ref:M,className:[`${e}-lightbox`,l?`${e}-lightbox-editor`:"",s?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Q==="open"?"none":void 0},onClick:Xe,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:ze?Nt:0,transition:be?"none":`opacity ${Cn}ms ${pn}`,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:A,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:ze?1:0,transition:be?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"},children:r.jsx(nc,{prefix:e,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:c,onClose:Xe})})]}),ze&&ht&&r.jsx(_o,{media:ht,style:Ft(ht,"left","far"),onMeasure:ot,onTransitionEnd:Ye},`far-prev-${ht.url}`),ze&&He&&r.jsxs(r.Fragment,{children:[r.jsx(_o,{media:He,style:Ft(He,"left"),onMeasure:ot,onTransitionEnd:Ye},`prev-${He.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:s||be?"default":"pointer",pointerEvents:s||be?"none":"auto",zIndex:3},onClick:wt(-1)})]}),ze&&Ze&&r.jsxs(r.Fragment,{children:[r.jsx(_o,{media:Ze,style:Ft(Ze,"right"),onMeasure:ot,onTransitionEnd:Ye},`next-${Ze.url}`),vt&&r.jsx("div",{style:{position:"absolute",top:vt.top,left:vt.left,width:vt.width,height:vt.height,cursor:s||be?"default":"pointer",pointerEvents:s||be?"none":"auto",zIndex:3},onClick:wt(1)})]}),ze&&Rt&&r.jsx(_o,{media:Rt,style:Ft(Rt,"right","far"),onMeasure:ot,onTransitionEnd:Ye},`far-next-${Rt.url}`),Y&&O&&(Oe?r.jsx(kg,{src:O.url,phase:Q,onMediaElement:qt,wrapperStyle:Vt,videoStyle:Kt,onLoadedMetadata:ft,onTransitionEnd:Ye},`${n}-${O.url}`):r.jsx("img",{ref:qt,src:O.url,alt:O.name,onLoad:ft,onTransitionEnd:Ye,style:Vt},`${n}-${O.url}`))]})}function Ag({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:l,portalId:s}){const{prefix:c}=v.useScopedStyles(),{gridLayout:d,verticalGap:u,align:m="top",imageDisplay:x}=e,w=(x==null?void 0:x.display)==="cover",$=(x==null?void 0:x.ratioValue)??"1:1",f=(x==null?void 0:x.reversed)??!1,[S,L]=$.split(":").map(Number),C=`${f?L:S} / ${f?S:L}`,J=d.entryWidth??.2,k=d.columnsCount,U=v.scalingValue(J,n),I=v.scalingValue(d.horizontalGap??0,n),R=U,T=U,y={width:R,...w?{aspectRatio:C,height:"auto",overflow:"hidden"}:{height:"auto"}},h=w?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},F=a.useRef(null),[W,V]=a.useState(!1),[ne,X]=a.useState([]),[z,H]=a.useState(0),[_,E]=a.useState(0),[q,Y]=a.useState(null),[ee,N]=a.useState({title1:"",title2:"",title3:""}),pe=(()=>{const we={},Se=F.current?getComputedStyle(F.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(we["--cntrl-article-width"]=Se),we})(),b=!n||i||o,ye=a.useMemo(()=>dg(c),[c]),Q=t??[],xe=Q.length%k||k,$e=xe<k&&Q.length>0,oe=Q.length-xe,ie=$e?Math.floor((k-xe)/2)+1:1,B=a.useMemo(()=>vg(Q),[Q]),le=a.useMemo(()=>$g(Q),[Q]),re=(we,Se,G)=>{if(n&&!o&&!i)return;const me=B.findIndex(K=>K.gridIndex===we);if(me<0)return;const D=B[me];E(me),X(D.items),H(Se),N(D.entry),Y(G??null),V(!0)},ke=a.useCallback(()=>{V(!1),Y(null)},[]),fe=a.useCallback(()=>{const we=B[_];return!we||!F.current?q:yg(F.current,we.gridIndex,w?"cover":"contain")??q},[B,_,q,w]),Pe=a.useCallback(we=>{if(B.length>1){const Se=B.length,G=(_+we+Se)%Se,me=B[G],D=Math.min(z,me.items.length-1);E(G),X(me.items),H(D),N(me.entry);return}H(Se=>(Se+we+ne.length)%ne.length)},[B,_,z,ne.length]),ve=B.length>1||ne.length>1;return a.useEffect(()=>{if(!W||typeof document>"u")return;const we=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=we}},[W]),a.useEffect(()=>{!n||o||i||V(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ye}}),r.jsx(Cg,{mediaList:le}),r.jsx("div",{ref:F,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${k}, ${U})`,rowGap:0,columnGap:I,width:v.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:v.scalingValue(u??0,n)},children:Q.map((we,Se)=>{const G=za(we.gallery),me=Ba(G),D=me.filter(Ee=>Ee.lightboxMedia).map(Ee=>Ee.lightboxMedia),K=Math.floor(Se/k)===Math.ceil(Q.length/k)-1,ae=$e&&Se>=oe?`${ie+(Se-oe)}`:void 0,ge=me[0],ce=ge!=null&&ge.lightboxMedia?D.findIndex(Ee=>Ee.url===ge.lightboxMedia.url):-1,be=r.jsx("div",{className:`${c}-item-image-wrapper`,style:y,children:me.length>0&&r.jsx(Mg,{media:ge.displayMedia,gridIndex:Se,className:`${c}-item-${Gi(ge.displayMedia)?"video":"image"}`.trim(),style:h,onMediaClick:b&&ce>=0?Ee=>re(Se,ce,ic(Ee.currentTarget,w?"cover":"contain")):void 0})});return r.jsx("div",{className:`${c}-item`,children:r.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,K?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:U,...ae?{gridColumn:ae}:{}},children:[r.jsx("div",{className:`${c}-item-title-row`,children:r.jsx("div",{style:{height:0,width:T}})}),r.jsx("a",{className:`${c}-item-image-link`,children:be}),r.jsx("div",{className:`${c}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:T}})})]})},Se)})}),W&&typeof document<"u"&&(()=>{const we=(s?document.getElementById(s):null)??document.body;return gi.createPortal(r.jsx("div",{style:pe,"data-selection":"none",children:r.jsx(Pg,{prefix:c,items:ne,index:z,entry:ee,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ve,lightboxEntries:B,entryIdx:_,layoutId:l,sourceRect:q,resolveCloseSourceRect:fe,onClose:ke,onPrev:()=>Pe(-1),onNext:()=>Pe(1)})}),we)})()]})}const Fg=`import { CommonComponentProps } from '../props';
6303
+ `}const Is={url:"",name:"",objectFit:"cover"},$n=500,Ki=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",ag=72,sg=50,lg=1e4,cg=650,dg=500;function ug(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 ec(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=or(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 pg(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?ec(i,n):null}function mg(e){return e.reduce((t,n,i)=>{const o=Ba(n.gallery),l=Da(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 Zi(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 Rs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Zi(e,i,n)}const gg=.03;function tc(e){return e.width*gg}const Dr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function _o(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Es(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function hg(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ga(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 fg(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ga(e,t.width,t.height)}function yg(e,t){if(Vi(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 vg(e){const t=new Set,n=[];for(const i of e){const o=Ba(i.gallery),s=Da(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 xg({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=>Vi(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 Ai(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=tc(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 rr(e,t,n){const i=Ai(e,t,n);return{...i,left:2*i.left-e.left}}function bg(e,t,n){const{left:i,width:o}=n,s=tc(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 nc(e,t,n,i){const o=Ai(e,"left",i),s=Ai(e,"right",i),l=rr(e,"left",i),d=rr(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 wg(e,t,n,i){const{start:o,end:s}=nc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Sg(e,t,n){const i=Ai(e,t,n),o=rr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function ic(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(ic(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??Is,i??o??Is]}]}function $g(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Cg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Da(e){if(!Array.isArray(e)||e.length===0)return[];if(ic(e)){const t=[];for(const n of e){const i=$g(n);if(!i)continue;const o=Cg(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 Vi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Tg({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Vi(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 Lg({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 No({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Vi(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 Ig({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:b,resolveCloseSourceRect:T,onClose:f,onPrev:L,onNext:$}){const R=a.useRef(null),P=a.useRef(null),C=a.useRef(null),X=a.useRef(new Map),[E,B]=a.useState(0),I=a.useRef(null),w=a.useRef(0),W=a.useRef(0),h=a.useRef("none"),S=a.useRef(!1),k=a.useRef(!1),D=a.useRef(!1),U=a.useRef(null),ae=a.useRef(null),Y=a.useRef(null),G=a.useRef(()=>{}),H=a.useRef(null),F=a.useRef(null),A=a.useRef(null),K=a.useRef(!1),[q,ee]=a.useState(null),[N,ue]=a.useState(Dr),[v,ye]=a.useState(0),[Z,ce]=a.useState("opening"),[$e,ne]=a.useState(0),[ve,J]=a.useState(0),[pe,he]=a.useState(!1),[Ae,be]=a.useState(null),[We,Q]=a.useState(null),[le,xe]=a.useState(null),[O,se]=a.useState(!1),[fe,Se]=a.useState(null),[Ie,we]=a.useState(!1),_=a.useRef(!1),[de,oe]=a.useState(!1),[z,re]=a.useState(!1),ke=a.useRef(n),ie=a.useRef(void 0),j=t[n],Ne=j?Vi(j):!1,Me=ve!==0||pe,et=!l&&(!s||!!d),Ye=c&&!l,lt=u.length>1,mt=a.useCallback((g,me)=>t.length<=1?null:t[(g+me+t.length)%t.length]??null,[t]),De=lt?Zi(u,m,-1):mt(n,-1),ot=lt?Zi(u,m,1):mt(n,1),$t=Ae===-1&&Me?lt&&We!==null?Zi(u,We,-1):le!==null?mt(le,-1):null:null,rt=Ae===1&&Me?lt&&We!==null?Zi(u,We,1):le!==null?mt(le,1):null:null,Ue=$t&&$t.url!==(De==null?void 0:De.url)?$t:null,ht=rt&&rt.url!==(ot==null?void 0:ot.url)?rt:null,xt=De&&Ye?(()=>{const g=lt?Rs(u,m,-1):t.length>2?mt((n-1+t.length)%t.length,-1):null;return g&&g.url!==De.url?g:null})():null,dt=ot&&Ye?(()=>{const g=lt?Rs(u,m,1):t.length>2?mt((n+1)%t.length,1):null;return g&&g.url!==ot.url?g:null})():null,kt=Ue??xt,_t=ht??dt,Qe=a.useCallback((g,me,Re)=>{if(!g||!me||!Re)return;const Le=X.current,Ze=Le.get(g);(Ze==null?void 0:Ze.width)===me&&(Ze==null?void 0:Ze.height)===Re||(Le.set(g,{width:me,height:Re}),B(Et=>Et+1))},[]),Tt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const me=X.current.get(g.url);return fg(P.current,me)},[E,v]),Lt=a.useCallback(()=>{if(!j)return;const g=Tt(j);if(g){ee(g);return}const me=P.current;me&&ee(Es(me))},[j,Tt]),Ge=a.useCallback(g=>{if(lt){const me=u.length;Q((m+g+me)%me),xe(null);return}t.length>1&&(xe((n+g+t.length)%t.length),Q(null))},[lt,u.length,m,t.length,n]),qe=a.useCallback(g=>{D.current=g,he(g)},[]),Pe=a.useCallback(()=>{U.current!==null&&(window.clearTimeout(U.current),U.current=null)},[]),gt=a.useCallback(()=>{Pe(),U.current=window.setTimeout(()=>{Pe(),qe(!1)},Ki+32)},[Pe,qe]),It=a.useCallback(()=>{const g=R.current;if(!g){ue({left:0,top:0,width:typeof window<"u"?window.innerWidth:Dr.width,height:typeof window<"u"?window.innerHeight:Dr.height});return}const me=g.getBoundingClientRect();ue({left:me.left,top:me.top,width:me.width,height:me.height})},[]),Mt=a.useCallback((g,me)=>{if(Me){if(de&&!pe)return`translate(${ve}px, 0px)`;if(pe&&Ae!==null){const Re=Tt(g);if(!Re)return;const{x:Le,y:Ze}=wg(Re,me,Ae,N);return`translate(${Le}px, ${Ze}px)`}if(pe)return"translate(0px, 0px)"}},[Me,de,pe,ve,Ae,N,Tt]),Dt=a.useCallback(()=>{const g=ae.current;ae.current=null,Pe(),qe(!1),be(null),Q(null),xe(null),J(0),oe(!1),S.current=!1,W.current=0,h.current="none",g===-1?L():g===1&&$()},[Pe,qe,L,$]),en=a.useCallback(()=>{Pe(),U.current=window.setTimeout(()=>{ae.current!==null&&Dt()},Ki+32)},[Pe,Dt]),on=a.useCallback(()=>{Pe(),ae.current=null,qe(!1),be(null),Q(null),xe(null),J(0),oe(!1),S.current=!1,W.current=0,h.current="none"},[Pe,qe]),bt=a.useCallback(g=>{if(!(!Ye||!q)){if(D.current){if(ae.current===g){Y.current=g,Dt();return}on()}Pe(),Ge(g),ae.current=g,be(g),qe(!0),en()}},[Ye,q,Dt,on,Pe,Ge,qe,en]);G.current=bt;const Rt=a.useCallback(()=>{H.current=null,K.current=!1,F.current!==null&&(window.clearInterval(F.current),F.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Ut=a.useCallback(g=>{F.current!==null&&window.clearInterval(F.current);const me=K.current?dg:cg;F.current=window.setInterval(()=>{G.current(g)},me)},[]),Kt=a.useCallback(g=>{H.current!==g&&(Rt(),H.current=g,K.current=!1,G.current(g),Ut(g),A.current=window.setTimeout(()=>{A.current=null,H.current===g&&(K.current=!0,Ut(g))},lg))},[Rt,Ut]),ft=a.useCallback(()=>{const g=P.current;if(!g)return;const me=j==null?void 0:j.url,Re=me?X.current.get(me):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){ee(ga(g,Re.width,Re.height));return}const Le=C.current;if(Le&&me&&(Le.src===me||Le.currentSrc===me)){const{width:Et,height:Ve}=hg(Le);if(Et&&Ve){Qe(me,Et,Ve),ee(ga(g,Et,Ve));return}}const Ze=Es(g);!Ze.width||!Ze.height||ee(Ze)},[j==null?void 0:j.url,Qe]),Jt=a.useCallback(g=>{if(C.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(),ye(g=>g+1)},[It,ft]);a.useEffect(()=>{Ce();const g=P.current,me=R.current,Re=new ResizeObserver(()=>Ce());return g&&Re.observe(g),me&&Re.observe(me),window.addEventListener("resize",Ce),()=>{Re.disconnect(),window.removeEventListener("resize",Ce)}},[Ce,n,x]),a.useLayoutEffect(()=>{if(!j)return;const g=C.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,E]),a.useEffect(()=>{const g=new Set,me=[],Re=Le=>{!(Le!=null&&Le.url)||g.has(Le.url)||(g.add(Le.url),me.push(Le))};t.forEach(Re),u.forEach(Le=>Le.items.forEach(Re)),me.forEach(Le=>{X.current.has(Le.url)||yg(Le,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(Z!=="opening"||!q)return;if(!b){ce("open");return}se(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),ce("open")})});return()=>cancelAnimationFrame(g)},[Z,q,b]),a.useEffect(()=>{if(Z!=="closing")return;const g=setTimeout(()=>f(),$n);return()=>clearTimeout(g)},[Z,f]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{ke.current===n&&ie.current===(j==null?void 0:j.url)||(Pe(),ae.current=null,be(null),Q(null),xe(null),ne(0),J(0),qe(!1),re(!1),oe(!1),w.current=0,W.current=0,h.current="none",S.current=!1,I.current=null,k.current=!1,C.current=null,Lt(),ke.current=n,ie.current=j==null?void 0:j.url)},[n,j==null?void 0:j.url,qe,Pe,Lt]),a.useLayoutEffect(()=>{const g=Y.current;g!==null&&(Y.current=null,requestAnimationFrame(()=>{G.current(g)}))},[n,m,j==null?void 0:j.url]),a.useLayoutEffect(()=>{if(Z==="opening"){_.current=!1,we(!1);return}if(Z!=="open"||_.current)return;if(!De&&!ot){_.current=!0;return}we(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{we(!0),_.current=!0})});return()=>cancelAnimationFrame(g)},[Z,De==null?void 0:De.url,ot==null?void 0:ot.url]),a.useEffect(()=>{if(Z!=="open")return;const g=()=>{const Ve=it=>{it.stopPropagation(),it.preventDefault(),document.removeEventListener("click",Ve,!0)};document.addEventListener("click",Ve,!0)},me=Ve=>{const it=Ve<0?1:-1;Pe(),Ge(it),ae.current=it,be(it),qe(!0),en()},Re=Ve=>{if(Math.abs(Ve)>sg&&Ye){me(Ve);return}ae.current=null,be(null),Q(null),xe(null),qe(!0),J(0),gt()},Le=Ve=>{if(Ve.touches.length!==1||D.current)return;const it=Ve.touches[0];k.current=!0,I.current={x:it.clientX,y:it.clientY},h.current="none",W.current=0,S.current=!1},Ze=Ve=>{if(!I.current||Ve.touches.length!==1||D.current)return;const it=Ve.touches[0],jt=it.clientX-I.current.x,St=it.clientY-I.current.y;if(h.current==="none"){if(Math.abs(jt)<10&&Math.abs(St)<10)return;if(Math.abs(jt)>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"){S.current=!0,oe(!0),W.current=jt,J(jt),Ve.preventDefault();return}h.current==="vertical"&&(S.current=!0,oe(!0),w.current=St,ne(St),Ve.preventDefault())},Et=()=>{if(!I.current)return;const Ve=h.current,it=S.current;if(it&&Ve==="horizontal")Re(W.current),g();else if(it&&Ve==="vertical"){const jt=w.current;if(et&&jt>ag){const St=window.innerHeight;w.current=St,re(!0),ne(St),ce("closing")}else w.current=0,ne(0);g()}else Ve==="horizontal"&&Math.abs(W.current)>0&&(Re(W.current),g());I.current=null,h.current="none",W.current=0,S.current=!1,oe(!1)};return document.addEventListener("touchstart",Le,{passive:!0}),document.addEventListener("touchmove",Ze,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Le),document.removeEventListener("touchmove",Ze),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[Z,Ye,qe,gt,Pe,et,en,Ge]);const Oe=a.useCallback(()=>{const g=(T==null?void 0:T())??b??null;g&&q&&(Se(g),se(!0)),ce("closing")},[T,b,q]);a.useEffect(()=>{const g=Le=>{if(Le.key==="Escape"){if(s&&d||Z==="closing")return;Rt(),Oe();return}if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight"||Z!=="open"||!Ye)return;Le.preventDefault();const Ze=Le.key==="ArrowLeft"?-1:1;Le.repeat&&H.current===Ze||Kt(Ze)},me=Le=>{if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight")return;const Ze=Le.key==="ArrowLeft"?-1:1;H.current===Ze&&Rt()},Re=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",me),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",me),window.removeEventListener("blur",Re),Rt()}},[Z,s,d,Oe,Ye,Kt,Rt]),a.useEffect(()=>{Z!=="open"&&Rt()},[Z,Rt]);const Ke=()=>{Z==="closing"||l||Oe()},He=Z==="open",ze=Z==="closing",ut=$e>0?Math.max(0,1-$e/500):1,_e=$e>0?Math.max(.35,1-$e/500):1,Je=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!D.current)){if(ae.current!==null){Dt();return}Pe(),qe(!1)}},[Pe,qe,Dt]),tt=Z==="closing"?fe??b:b,Wt=tt&&q&&(Z==="opening"||ze)?ug(tt,q):void 0,Ct=Me&&j?Mt(j,"center"):$e>0?`translateY(${$e}px)`:Wt,st=q?_o(q,N):null,Nt=!!(tt&&q),At=Nt&&(Z==="closing"||Z==="open"&&O),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:Nt?1:Z==="opening"||ze?0:1,transition:de&&!pe?"none":pe?`transform ${Ki}ms ${pn}`:z?`transform ${$n}ms ${pn}, opacity ${$n}ms ${pn}`:At?`transform ${$n}ms ${pn}`:Z==="opening"||ze?`opacity ${$n}ms ${pn}`:"none",pointerEvents:Ne&&He&&!Me?"auto":"none",touchAction:Ne&&He?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},zt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:He&&!Me?"auto":"none"},Pt=(g,me,Re="adjacent")=>{const Le=Tt(g);if(!Le)return{display:"none"};const Ze=Re==="far"?me==="left"?"far-left":"far-right":me==="left"?"left-adjacent":"right-adjacent",{start:Et}=Ae!==null?nc(Le,Ze,Ae,N):{start:Re==="far"?rr(Le,me,N):Ai(Le,me,N)},Ve=_o(Et,N),it=Mt(g,Ze),jt=!Me&&Re==="adjacent"&&He&&!Ie?Sg(Le,me,N):null,St=Re==="far"&&Me&&Ae===(me==="left"?-1:1),cn=de&&!pe?!1:pe,un=Re==="adjacent"&&He&&Ie&&!Me;return{position:"absolute",top:Ve.top,left:Ve.left,width:Ve.width,height:Ve.height,objectFit:"contain",transform:it??(jt?`translate(${jt.x}px, ${jt.y}px)`:void 0),opacity:Re==="far"?He&&St?1:0:He?1:0,transition:cn?Re==="far"?`transform ${Ki}ms ${pn}`:`transform ${Ki}ms ${pn}, opacity ${$n}ms ${pn}`:un?`transform ${$n}ms ${pn}`:Z==="opening"||ze?`opacity ${$n}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Qt=(g,me)=>{const Re=Tt(g);return Re?bg(Ai(Re,me,N),me,N):null},wt=g=>me=>{if(!l){if(k.current){k.current=!1;return}me.stopPropagation(),bt(g)}},Gt=De?Qt(De,"left"):null,pt=ot?Qt(ot,"right"):null,Ft=Gt?_o(Gt,N):null,Bt=pt?_o(pt,N):null;return r.jsxs("div",{ref:R,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Z==="open"?"none":void 0},onClick:Ke,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:He?ut:0,transition:de?"none":`opacity ${$n}ms ${pn}`,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:P,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:He?1:0,transition:de?"none":`opacity ${$n}ms ${pn}`,pointerEvents:"none"},children:r.jsx(Ql,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Ke})})]}),He&&kt&&r.jsx(No,{media:kt,style:Pt(kt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${kt.url}`),He&&De&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:De,style:Pt(De,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${De.url}`),Ft&&r.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:wt(-1)})]}),He&&ot&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:ot,style:Pt(ot,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ot.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:wt(1)})]}),He&&_t&&r.jsx(No,{media:_t,style:Pt(_t,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${_t.url}`),q&&j&&(Ne?r.jsx(Lg,{src:j.url,phase:Z,onMediaElement:Jt,wrapperStyle:Vt,videoStyle:zt,onLoadedMetadata:ft,onTransitionEnd:Je},`${n}-${j.url}`):r.jsx("img",{ref:Jt,src:j.url,alt:j.name,onLoad:ft,onTransitionEnd:Je,style:Vt},`${n}-${j.url}`))]})}function Rg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:x}=e,b=(x==null?void 0:x.display)==="cover",T=(x==null?void 0:x.ratioValue)??"1:1",f=(x==null?void 0:x.reversed)??!1,[L,$]=T.split(":").map(Number),C=`${f?$:L} / ${f?L:$}`,X=c.entryWidth??.2,E=c.columnsCount,B=y.scalingValue(X,n),I=y.scalingValue(c.horizontalGap??0,n),w=B,W=B,h={width:w,...b?{aspectRatio:C,height:"auto",overflow:"hidden"}:{height:"auto"}},S=b?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},k=a.useRef(null),[D,U]=a.useState(!1),[ae,Y]=a.useState([]),[G,H]=a.useState(0),[F,A]=a.useState(0),[K,q]=a.useState(null),[ee,N]=a.useState({title1:"",title2:"",title3:""}),ue=(()=>{const le={},xe=k.current?getComputedStyle(k.current).getPropertyValue("--cntrl-article-width").trim():"";return xe&&(le["--cntrl-article-width"]=xe),le})(),v=!n||i||o,ye=a.useMemo(()=>rg(d),[d]),Z=t??[],ce=Z.length%E||E,$e=ce<E&&Z.length>0,ne=Z.length-ce,ve=$e?Math.floor((E-ce)/2)+1:1,J=a.useMemo(()=>mg(Z),[Z]),pe=a.useMemo(()=>vg(Z),[Z]),he=(le,xe,O)=>{if(n&&!o&&!i)return;const se=J.findIndex(Se=>Se.gridIndex===le);if(se<0)return;const fe=J[se];A(se),Y(fe.items),H(xe),N(fe.entry),q(O??null),U(!0)},Ae=a.useCallback(()=>{U(!1),q(null)},[]),be=a.useCallback(()=>{const le=J[F];return!le||!k.current?K:pg(k.current,le.gridIndex,b?"cover":"contain")??K},[J,F,K,b]),We=a.useCallback(le=>{if(J.length>1){const xe=J.length,O=(F+le+xe)%xe,se=J[O],fe=Math.min(G,se.items.length-1);A(O),Y(se.items),H(fe),N(se.entry);return}H(xe=>(xe+le+ae.length)%ae.length)},[J,F,G,ae.length]),Q=J.length>1||ae.length>1;return a.useEffect(()=>{if(!D||typeof document>"u")return;const le=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=le}},[D]),a.useEffect(()=>{!n||o||i||U(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ye}}),r.jsx(xg,{mediaList:pe}),r.jsx("div",{ref:k,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${E}, ${B})`,rowGap:0,columnGap:I,width:y.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:y.scalingValue(u??0,n)},children:Z.map((le,xe)=>{const O=Ba(le.gallery),se=Da(O),fe=se.filter(oe=>oe.lightboxMedia).map(oe=>oe.lightboxMedia),Se=Math.floor(xe/E)===Math.ceil(Z.length/E)-1,Ie=$e&&xe>=ne?`${ve+(xe-ne)}`:void 0,we=se[0],_=we!=null&&we.lightboxMedia?fe.findIndex(oe=>oe.url===we.lightboxMedia.url):-1,de=r.jsx("div",{className:`${d}-item-image-wrapper`,style:h,children:se.length>0&&r.jsx(Tg,{media:we.displayMedia,gridIndex:xe,className:`${d}-item-${Vi(we.displayMedia)?"video":"image"}`.trim(),style:S,onMediaClick:v&&_>=0?oe=>he(xe,_,ec(oe.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`,Se?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...Ie?{gridColumn:Ie}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:W}})}),r.jsx("a",{className:`${d}-item-image-link`,children:de}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:W}})})]})},xe)})}),D&&typeof document<"u"&&(()=>{const le=(l?document.getElementById(l):null)??document.body;return gi.createPortal(r.jsx("div",{style:ue,"data-selection":"none",children:r.jsx(Ig,{prefix:d,items:ae,index:G,entry:ee,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Q,lightboxEntries:J,entryIdx:F,layoutId:s,sourceRect:K,resolveCloseSourceRect:be,onClose:Ae,onPrev:()=>We(-1),onNext:()=>We(1)})}),le)})()]})}const Eg=`import { CommonComponentProps } from '../props';
6364
6304
  import { scalingValue, useScopedStyles } from '../utils/index';
6365
6305
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
6366
6306
  import { createPortal } from 'react-dom';
@@ -8714,11 +8654,11 @@ export function Hive({
8714
8654
  </>
8715
8655
  );
8716
8656
  }
8717
- `,Wg="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 _g(e){const t={};return t[Ge(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ge(e,"fontSettings")]={...ii.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ge(e,"fontSize")]={...ii.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ge(e,"lineHeight")]={...ii.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ge(e,"letterSpacing")]={...ii.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ge(e,"wordSpacing")]={...ii.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ge(e,"textAlign")]={...ii.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ge(e,"textAppearance")]={...ii.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Wi=Un.filter(e=>e!=="count"),Hg=Wi.reduce((e,t)=>({...e,..._g(t)}),{}),Ng=Wi.reduce((e,t)=>({...e,[Ge(t,"fontFamily")]:"Arial",[Ge(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ge(t,"letterSpacing")]:0,[Ge(t,"wordSpacing")]:0,[Ge(t,"textAlign")]:"left",[Ge(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Dr(e){return Wi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ge(n,"fontSize")]=i),o!==void 0&&(t[Ge(n,"lineHeight")]=o),t},{})}const Og={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Wi.map(e=>[Oa[e],ja(e)]))},jg={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},zg=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...jg,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Bg={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:zg},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"}},...Hg},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Wg,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Ng},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,...Dr({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,...Dr({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,...Dr({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:[Og]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Dg={element:Ag,id:"hive",name:"Catalogue",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:[...Wi.map(e=>({path:`${Ge(e,"fontFamily")}`}))]},fontRelations:{...Wi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ge(t,"fontFamily")}`}),{})},schema:Bg,sourceCode:Fg},kl=12;function Vg(e,t="50%"){const n={position:"absolute",width:kl,height:kl,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:Vg(n,i)})})}function Gg(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 qg({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 Vr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Kg(e){return String(e??"").trim().length>0}function Pl(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 Al(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 Fl(e,t,n,i,o,l,s){const c=v.scalingValue(l,s),d=v.scalingValue(0,s),u=e===0,m=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!m||i?c:d}}function Ug(e,t,n){const i=v.scalingValue(t,n),o=v.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Wl=10;function Xg(e){return`
8657
+ `,kg="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 Mg(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...ii.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...ii.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...ii.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...ii.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...ii.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...ii.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...ii.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fi=Kn.filter(e=>e!=="count"),Pg=Fi.reduce((e,t)=>({...e,...Mg(t)}),{}),Ag=Fi.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Arial",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Vr(e){return Fi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const Fg={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Fi.map(e=>[Oa[e],za(e)]))},Wg={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},_g=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Wg,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Ng={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"}},...Pg},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:kg,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Ag},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,...Vr({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,...Vr({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,...Vr({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:[Fg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Hg={element:Rg,id:"hive",name:"Catalogue",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:[...Fi.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{...Fi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})},schema:Ng,sourceCode:Eg},ks=12;function jg(e,t="50%"){const n={position:"absolute",width:ks,height:ks,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:jg(n,i)})})}function Og(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 zg({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 Gr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Bg(e){return String(e??"").trim().length>0}function Ms(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){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function As(e,t,n,i,o,s,l){const d=y.scalingValue(s,l),c=y.scalingValue(0,l),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=y.scalingValue(t,n),o=y.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Fs=10;function Vg(e){return`
8718
8658
  .${e}-wrapper {
8719
8659
  display: grid;
8720
8660
  align-items: start;
8721
- min-height: ${Vr(48)};
8661
+ min-height: ${Gr(48)};
8722
8662
  position: relative;
8723
8663
  overflow: visible;
8724
8664
  box-sizing: border-box;
@@ -8840,7 +8780,7 @@ a.${e}-list-item {
8840
8780
  flex-shrink: 0;
8841
8781
  overflow: visible;
8842
8782
  box-sizing: border-box;
8843
- min-width: ${Vr(50)};
8783
+ min-width: ${Gr(50)};
8844
8784
  position: relative;
8845
8785
  display: flex;
8846
8786
  align-items: flex-start;
@@ -8848,7 +8788,7 @@ a.${e}-list-item {
8848
8788
 
8849
8789
  .${e}-list-col-last {
8850
8790
  flex: 1 1 auto;
8851
- min-width: ${Vr(50)};
8791
+ min-width: ${Gr(50)};
8852
8792
  }
8853
8793
 
8854
8794
  .${e}-list-col-title {
@@ -9145,7 +9085,7 @@ a.${e}-list-item {
9145
9085
  overflow-wrap: anywhere;
9146
9086
  word-break: break-word;
9147
9087
  }
9148
- `}const Xn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Da=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",mo=[...Da,An],Cr=["A","B","C","D","E"];function lc(e){return`${e}ColumnVerticalAlign`}const ga=["Top","Center","Bottom"];function Va(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Cr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Yg(e){const t=Va(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Zg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Cr.includes(n)?n:null}function sc(e,t,n){const i=Zg(e);return i?i===t?!1:Yg(n[lc(i)]):!0}function go(e){const t=Va(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Cr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Jg(e,t,n){if(cc(e,t,n))return go(e);const i=go(e);return i.kind==="baseline"?{kind:"top"}:i}function Qg(e){const t=go(e);return t.kind==="baseline"?{kind:"top"}:t}function cc(e,t,n){return sc(e,n,t)?go(e).kind==="baseline":!1}function eh(e){const t={};let n=!1;for(const i of Cr){const o=lc(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}sc(l,i,e)||(t[o]="Top",n=!0)}return n?t:null}function th(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function nh(e){const t=go(e).kind;return t==="baseline"?"center":t}function ih(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function _l(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function oh(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 Gr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const s=oh(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+s;const c=l.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+s}function rh(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 ah(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const lh={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ct(e,t){return`${e}${t.replace(/^text/,"Text")}`}const sh={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function ch(e){return[Ct(e,"textFontFamily"),Ct(e,"textFontSettings"),{type:"row",items:[Ct(e,"textFontSize"),Ct(e,"textLineHeight"),Ct(e,"textLetterSpacing"),Ct(e,"textWordSpacing")]},Ct(e,"textTextAlign"),Ct(e,"textTextAppearance"),`${e}VerticalAlign`]}function dh(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(mo.map(e=>[sh[e],ch(e)]))}}function rr(e,t){const n=i=>{const o=Ct(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 Hl(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 dn(Xt(n,t))}function Nl(e,t,n,i){const o=rr(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s!==void 0&&s<l?`${n} ${i}`:n}function Ol(e,t,n,i){const o=rr(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s===void 0||s>=l?{}:{[`--${n}-title-leading-gap`]:v.scalingValue((l-s)/2,i)}}const yn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],_i=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Hi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ni=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],uh={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},ph=["hover","focus","filled","success","error"],jl=.004,$i=.004,qr=$i,Ga=50,ho=1440,fo=Ga/ho;function dc(e){const t=typeof e=="number"&&e>0?e:ho;return Ga/t}function mh(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 ho}const uc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function no(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function gh(e,t=1){const n=t/e;return Object.fromEntries(yn.map(i=>[i,n]))}function hh(){return Object.fromEntries([..._i.map(e=>[e,0]),...Hi.map(e=>[e,0])])}function fh(){return Object.fromEntries(Ni.map(e=>[e,0]))}function Ho(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:uc[t]]))}function pc(e,t,n){const i=e-fo,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 Yo(e,t,n){const i=qa(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 yh(e,t,n){const i={};for(let o=0;o<e;o+=1){const l=_i[o],s=Hi[o],c=typeof n[l]=="number"?n[l]:0,d=typeof n[s]=="number"?n[s]:0,u=pc(t[o]??0,c,d);u.paddingLeft!==c&&(i[l]=u.paddingLeft),u.paddingRight!==d&&(i[s]=u.paddingRight)}return i}function qa(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),s=o.reduce((u,m)=>u+m,0)+fo;if(t>=s)return i;const c=[...o];let d=s-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const m=c[u]-fo;if(m<=0)continue;const x=Math.min(d,m);c[u]-=x,d-=x}return[...c,i[e-1]]}function vh(e,t,n){if(e<=1)return{};const i=qa(e,t,n),o={};for(let l=0;l<e-1;l+=1){const s=yn[l];i[l]!==n[s]&&(o[s]=i[l])}return o}function zl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Xn]}function bh(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function xh(e,t,n,i){const o=Math.min(i,e.length,yn.length),l={};for(let s=0;s<o;s+=1){const c=e[s],d=t.indexOf(c);if(d===-1)continue;const u=yn[d],m=_i[d],x=Hi[d],w=Ni[d],$=yn[s],f=_i[s],S=Hi[s],L=Ni[s],M=n[u],A=n[m],C=n[x],J=n[w];typeof M=="number"&&(l[$]=M),typeof A=="number"&&(l[f]=A),typeof C=="number"&&(l[S]=C),typeof J=="number"&&(l[L]=J)}return l}function mc(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 wh(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=no(e),l=e.type==="b"||e.type===void 0&&t.type==="b",s={...e,...gh(n,o),...hh()};if(l)for(const c of Ni)typeof t[c]=="number"&&(s[c]=t[c]);else Object.assign(s,fh());return mc(e,s)?s:e}function Sh(e,t,n){const i=eh(e);i&&(e={...e,...i});const o=dc(n==null?void 0:n.designWidth),l=e.columns,s=t.columns,c=no(e),d=no(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof l=="number"?l:typeof s=="number"?s:Xn.length,x=C=>{if(u)return C;const J=Ho({...t,...C}),k=no(C),U=Yo(m,k,J),I=yh(m,U,{...t,...C});return Object.keys(I).length===0?C:{...C,...I}};if(typeof l=="number"&&l!==s)return e;const w=zl(e),$=zl(t);if(!bh(w,$))return x({...e,...xh(w,$,t,m)});if(c<d&&typeof m=="number"&&!u){const C=Ho({...t,...e});return x({...e,...vh(m,c,C)})}if(u){const C=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,J=Math.max(0,(c-o)/2);return C>J?{...e,textPaddingLR:J}:e}const f=Ho({...t,...e}),S=Yo(m,d,Ho(t)),M=Yo(m,c,f).some((C,J)=>C<(S[J]??C)),A=yn.some(C=>{const J=e[C],k=t[C];return typeof J=="number"&&typeof k=="number"&&J!==k});return M||A?x(e):e}function $h(e,t,n,i){const o=t.slice(0,e).reduce((s,c)=>s+c,0),l=n.slice(e+1,t.length-1).reduce((s,c)=>s+c,0);return Math.max(fo,i-o-l-fo)}function Ch(e,t){return Math.random()*(t-e)+e}function Th(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:uc[t]]))}function Kr(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,l){return e.slice(0,t).map((s,c)=>{const d=_i[c],u=Hi[c],m=Ni[c];return{key:s,textPrefix:lh[s],widthKey:yn[c],width:n[yn[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[d],paddingRight:o[u],paddingBottom:l[m]}})}function Ih({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l,layoutId:s,onUpdateSettings:c}){const{prefix:d}=v.useScopedStyles(),u=!!o,{columns:m,type:x,wrapperWidth:w,entriesCount:$,cellMinHeight:f,dividerWidth:S,showVisibility:L,cut:M,showCut:A,cutCellMinHeight:C,cutLabel:J,imageSize:k,imageOnHover:U,entryHoverEffect:I,entryHoverShowOption:R,rowPaddingTop:T,rowPaddingBottom:y,rowPaddingTopB:h,columnsOrder:F,textPaddingLR:W,textColor:V,backgroundColor:ne,dividerColor:X,textHoverColor:z,backgroundHoverColor:H,dividerHoverColor:_}=e,[E,q]=a.useState(void 0),[Y,ee]=a.useState(null),N=U==="on"&&(!n||i),pe=(M??0)>0,b=x==="b",ye=a.useRef(null),Q=a.useRef(null),[xe,$e]=a.useState(null),[oe,ie]=a.useState(ho),B=dc(oe),le=Math.max(0,((w??0)-B)/2),re=Math.min(W??0,le),ke=Math.max(re,$i),fe=((w??0)+B)/2;a.useLayoutEffect(()=>{if(!n){ie(ho);return}const Re=()=>{ie(mh(ye.current))};Re();const Ve=ye.current;if(!Ve)return;const Xe=new ResizeObserver(Re);Xe.observe(Ve);let ze=Ve;for(;ze&&!ze.style.getPropertyValue("--cntrl-article-width");)ze=ze.parentElement;return ze&&Xe.observe(ze),()=>Xe.disconnect()},[n,s]),a.useEffect(()=>{q(void 0)},[M,A,t,$]),a.useEffect(()=>{n&&!i&&q(void 0)},[n,i]);const Pe=v.buildColorVars(d,{textColor:V,backgroundColor:ne,dividerColor:X,textHoverColor:z,backgroundHoverColor:H,dividerHoverColor:_},uh,ph),ve=l&&l!=="default"?`${d}-state-${l}`:"",Se=`${!n||i?I==="default"?`${d}-entry-hover-default`:I==="blinds"?`${d}-entry-hover-blinds`:I==="reveal"?`${d}-entry-hover-reveal`:"":""} ${ve}`.trim(),G=I==="reveal"&&(!n||i),me=(L==null?void 0:L[0])??!1,D=(L==null?void 0:L[1])??!1,K=a.useRef(e),ae=a.useRef(s);a.useEffect(()=>{if(!c||!n){K.current=e,ae.current=s;return}if(ae.current!==s){K.current=e,ae.current=s;return}const Re=K.current;if(!(Re!==e))return;if(typeof Re.columns=="number"&&typeof e.columns=="number"&&Re.columns!==e.columns){K.current=e;return}const Xe=Sh(e,Re,{designWidth:oe});K.current=e,mc(e,Xe)&&c(Xe)},[e,c,n,s,oe]);const ge=a.useMemo(()=>Th(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ce=a.useMemo(()=>Kr(e,_i),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),be=a.useMemo(()=>Kr(e,Hi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ee=a.useMemo(()=>Kr(e,Ni),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Z=a.useMemo(()=>Array.isArray(F)&&F.length>0?F:[...Xn],[F]),de=a.useMemo(()=>Lh(Z,m,ge,ce,be,Ee),[Z,m,ge,ce,be,Ee]),We=no(e),se=a.useMemo(()=>yn.slice(0,m).map(Re=>ge[Re]),[m,ge]),O=a.useMemo(()=>qa(m,We,ge),[m,We,ge]),Oe=a.useMemo(()=>Yo(m,We,ge),[m,We,ge]),_e=a.useMemo(()=>de.map((Re,Ve)=>pc(Oe[Ve]??0,Re.paddingLeft,Re.paddingRight)),[de,Oe]),nt=a.useMemo(()=>{const Re=$===0?1/0:$;return(t??[]).slice(0,Re).map((Xe,ze)=>({id:ze,cells:Object.fromEntries(Xn.map(mt=>[mt,Xe[mt]??""])),image:Xe.image,link:Xe.link}))},[t,$]),Ue=pe?E??M:nt.length,Ce=a.useMemo(()=>pe?nt.slice(0,Ue):nt,[nt,pe,Ue]),Fe=pe&&Ue<nt.length,He=Ce.length>1||Fe,Ze=[me?`${d}-divider-top`:"",D||He?`${d}-divider-bottom`:""].filter(Boolean).join(" "),Tt=!n||i,it=()=>{if(!Tt)return;const Re=E??M;if(!A){q(nt.length);return}q(Math.min(Re+A,nt.length))},De=Re=>v.scalingValue(Re,n??!1),et=b?h??0:T??0,dt=y??0,lt=f??0,ht=et+lt/2,Rt=Math.max(dt,qr),ot=Fl(0,Ce.length,me,D,Fe,S??0,n??!1).borderTopWidth,xt=xe!=null?`${xe}px`:`calc(${ot} + ${De(ht)})`,zt=b?"rowPaddingTopB":"rowPaddingTop",rt=de[0],qe=de[de.length-1],Ne=_e[0],pt=_e[_e.length-1],yt=rt&&Ne?Math.max(Ne.paddingLeft,$i):0,Mt=qe&&pt?Math.max(pt.paddingRight,$i):0,Dt=We,en=Re=>{const Ve=ye.current;if(!Ve)return{x:0,y:0};const Xe=Ve.getBoundingClientRect();return{x:Re.clientX-Xe.left+Wl,y:Re.clientY-Xe.top+Wl}},sn=(Re,Ve)=>{if(!N)return;const Xe=Re.image;if(!(Xe!=null&&Xe.url)){ee(null);return}const{x:ze,y:mt}=en(Ve),Nt=(k==null?void 0:k.min)??80,Ae=(k==null?void 0:k.max)??320,Ye=(Y==null?void 0:Y.rowId)===Re.id?Y.widthPx:Ch(Nt,Ae);ee({rowId:Re.id,url:Xe.url,objectFit:"contain",isVideo:Gg(Xe),widthPx:Ye,x:ze,y:mt})},Lt=Re=>{if(!N||!Y)return;const{x:Ve,y:Xe}=en(Re);ee(ze=>!ze||ze.x===Ve&&ze.y===Xe?ze:{...ze,x:Ve,y:Xe})},Et=()=>{ee(null)},Qt=Re=>{G&&Pl(Re,d),N&&ee(null)},Ut=Re=>{G&&Al(Re,d)};a.useLayoutEffect(()=>{if(!u||b){$e(null);return}const Re=Q.current,Ve=Re==null?void 0:Re.parentElement;if(!Re||!Ve){$e(null);return}const Xe=()=>{const mt=Re.querySelector("[data-list-row]");if(!mt){$e(null);return}const Nt=Ve.getBoundingClientRect(),Ae=mt.getBoundingClientRect();$e(Ae.top-Nt.top+Ae.height/2)};Xe();const ze=new ResizeObserver(Xe);return ze.observe(Re),ze.observe(Ve),()=>ze.disconnect()},[u,b,Ce,et,dt,lt,t,e,de,Oe,oe,S,me,D,Fe]);const ft=a.useMemo(()=>!b&&Da.some(Re=>{const Ve=Re.charAt(0),Xe=e[`${Re}VerticalAlign`];return cc(Xe,e,Ve)}),[b,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Ye;const Re=ye.current;if(!Re)return;const Ve=()=>{Re.querySelectorAll("[data-list-col]").forEach(Je=>{Je.style.transform="";const bt=Je.querySelector(`.${d}-list-col`);bt&&(bt.style.minHeight="",bt.style.height="");const $t=Je.querySelector(`.${d}-list-col-title`);$t&&($t.style.transform="")})};if(b||!ft){Ve();return}const Xe=()=>{const Je=Array.from(Re.querySelectorAll("[data-list-row]")),bt=`${d}-list-col`,$t=`${d}-baseline-probe`;Je.forEach(ut=>{ut.querySelectorAll("[data-list-col]").forEach(Pt=>{Pt.style.transform="";const At=Pt.querySelector(`.${bt}`);At&&(At.style.minHeight="",At.style.height="");const Vt=Pt.querySelector(`.${d}-list-col-title`);Vt&&(Vt.style.transform="")})}),Je.forEach(ut=>{const Pt=Array.from(ut.querySelectorAll("[data-list-col]"));rh(ut,Pt,bt)}),Re.offsetHeight,Je.forEach(ut=>{const Pt=Array.from(ut.querySelectorAll("[data-list-col]")),At=ut.getBoundingClientRect().top,Vt=new Map,Kt=Pt.map(wt=>{const Ot=wt.querySelector(`.${d}-list-col-title`),jt={el:wt,titleEl:Ot,letter:wt.getAttribute("data-col-letter")??"",kind:wt.getAttribute("data-valign")??"top",anchor:wt.getAttribute("data-valign-anchor")};return Vt.set(jt.letter,jt),jt}),Ft=new Map,Yt=(wt,Ot)=>{const jt=Ft.get(wt.letter);if(jt!==void 0)return jt;const Bt=wt.anchor?Vt.get(wt.anchor):void 0;if(wt.kind!=="baseline"||!Bt||Ot.has(wt.letter)){const Le=Gr(wt,At,bt,$t);return Ft.set(wt.letter,Le),Le}Ot.add(wt.letter);const vt=Yt(Bt,Ot);Ot.delete(wt.letter);const g=Gr(wt,At,bt,$t),ue=vt-g;ah(wt.titleEl,ue);const Te=Gr(wt,At,bt,$t);return Ft.set(wt.letter,Te),Te};Kt.forEach(wt=>Yt(wt,new Set))})};let ze=null;const mt=()=>{ze===null&&(ze=requestAnimationFrame(()=>{ze=null,Xe()}))};Xe();const Nt=new ResizeObserver(()=>mt());Nt.observe(Re);let Ae=!1;return typeof document<"u"&&((Ye=document.fonts)!=null&&Ye.ready)&&document.fonts.ready.then(()=>{Ae||mt()}),()=>{Ae=!0,ze!==null&&(cancelAnimationFrame(ze),ze=null),Nt.disconnect(),Ve()}},[ft,b,e,t,oe,Ce,Oe]);const qt=a.useMemo(()=>Xg(d),[d]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:qt}}),r.jsx("div",{style:Pe,children:r.jsxs("div",{ref:ye,className:`${d}-wrapper ${Se}${Ze?` ${Ze}`:""}${b?` ${d}-type-b`:""}`.trim(),style:{width:v.scalingValue(w??0,n),...!b&&u?{[`--${d}-first-entry-handle-top`]:xt}:{}},onMouseMove:N?Lt:void 0,onMouseLeave:N?Et:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ce.map((Re,Ve)=>{var Nt;const Xe=(((Nt=Re.link)==null?void 0:Nt.length)??0)>0,ze=Xe&&(!n||i)?"a":"div",mt=Fl(Ve,Ce.length,me,D,Fe,S??0,n??!1);return r.jsxs(ze,{ref:Ve===0?Ae=>{Q.current=Ae}:void 0,className:`${d}-list-item${Xe||R==="always"?` ${d}-list-item-has-link`:""}`,...Xe?{href:Re.link,target:"_blank"}:{},style:mt,onMouseEnter:Ae=>{G&&(Xe||R==="always")&&Pl(Ae,d),N&&sn(Re,Ae)},onMouseLeave:Ae=>{G&&(Xe||R==="always")&&Al(Ae,d)},children:[et>0&&r.jsx("div",{className:`${d}-row-padding-handle`,style:{height:De(et)}}),r.jsxs("div",{className:`${d}-list-cols-row${b?"":` ${d}-list-cols-row-h`}${u&&Ve===0&&b?` ${d}-list-cols-row-controls`:""}`,...b?{}:{"data-list-row":""},style:b?void 0:{minHeight:De(lt)},children:[de.map((Ae,Ye)=>{const Je=Ye===de.length-1,bt=_e[Ye],$t=Ae.paddingBottom,ut=Kg(Re.cells[Ae.key]),Pt=b&&ut&&$t>0,At=b?{minHeight:De(lt)}:{width:De(Oe[Ye])},Vt=b?{paddingLeft:De(re),paddingRight:De(re)}:{paddingLeft:De(bt.paddingLeft),paddingRight:De(bt.paddingRight)},Kt=Ae.textPrefix.charAt(0),Ft=b?Qg(e[`${Ae.textPrefix}VerticalAlign`]):Jg(e[`${Ae.textPrefix}VerticalAlign`],e,Kt),Yt=b&&ut&&u&&Ve===0;return b&&!ut?null:r.jsxs("div",{className:b?`${d}-list-col-wrap`:void 0,...b?{}:{"data-list-col":"","data-col-letter":Kt,"data-valign":Ft.kind,...Ft.kind==="baseline"?{"data-valign-anchor":Ft.anchorLetter}:{}},children:[r.jsx("div",{className:`${d}-list-col${Je?` ${d}-list-col-last`:""}`,style:{...Vt,...At,...b?{justifyContent:_l(Ft.kind)}:{}},"data-test":Ae.width,children:r.jsx("span",{className:Nl(e,Ae.textPrefix,`${d}-list-col-title`,`${d}-text-tight-leading`),style:{...Hl(rr(e,Ae.textPrefix),n),...Ol(e,Ae.textPrefix,d,n),...b?{}:th(Ft.kind)},children:Re.cells[Ae.key]??null})}),Pt&&r.jsx("div",{className:`${d}-row-padding-handle`,style:{height:De($t)}}),Yt&&r.jsx(nn,{centerXHitTop:`var(--${d}-first-entry-handle-top, 50%)`,"data-controls":Ae.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${d}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:De(Math.max($t,qr))}})]},Ae.key)}),u&&Ve===0&&b&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{centerXHitTop:`var(--${d}-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(fe),className:`${d}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:De(ke),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${d}-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(fe),className:`${d}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:De(Math.max(ke,We-ke)),width:De(ke),height:"100%"}})]})]}),!b&&dt>0&&r.jsx("div",{className:`${d}-row-padding-handle`,style:{height:De(dt)}}),u&&Ve===0&&!b&&r.jsx(nn,{centerXHitTop:`var(--${d}-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:`${d}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:De(Rt)}})]},Re.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(nn,{centerXHitTop:`var(--${d}-first-entry-handle-top, 50%)`,"data-controls":zt,"data-controls-static-handle":"",...b?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${d}-padding-control-handle`,hitPlacement:b?"center":"left-y",areaStyle:{position:"absolute",top:ot,left:0,width:"100%",height:De(Math.max(et,qr))}})},"row-padding-handles"),u&&!b&&rt&&qe&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(nn,{centerXHitTop:`var(--${d}-first-entry-handle-top, 50%)`,"data-controls":rt.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]-((Ne==null?void 0:Ne.paddingRight)??0)),className:`${d}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:De(yt),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${d}-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[de.length-1]-((pt==null?void 0:pt.paddingLeft)??0)),className:`${d}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:De(Dt-Mt),width:De(Mt),height:"100%"}})]},"column-edge-padding-handles"),u&&!b&&de.slice(0,-1).map((Re,Ve)=>{const Xe=de[Ve+1],ze=O.slice(0,Ve+1).reduce((Je,bt)=>Je+bt,0),mt=_e[Ve],Nt=_e[Ve+1],Ae=Math.max(mt.paddingRight,$i),Ye=Math.max(Nt.paddingLeft,$i);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(nn,{centerXHitTop:`var(--${d}-first-entry-handle-top, 50%)`,"data-controls":Re.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[Ve]-mt.paddingLeft),className:`${d}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:De(ze-Ae),width:De(Ae),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${d}-first-entry-handle-top, 50%)`,"data-controls":Xe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Oe[Ve+1]-Nt.paddingRight),className:`${d}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:De(ze),width:De(Ye),height:"100%"}})]},`${Re.paddingRightKey}-padding`)}),u&&!b&&de.slice(0,-1).map((Re,Ve)=>{const Xe=$h(Ve,O,se,We),mt=O.slice(0,Ve+1).reduce((Nt,Ae)=>Nt+Ae,0)-jl/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Re.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Ga),"data-controls-max-fraction":String(Xe),"data-controls-variant":"column-width",className:`${d}-col-resize-handle`,style:{position:"absolute",top:"0px",left:De(mt),width:De(jl),height:"calc(100%)",pointerEvents:"auto"}})},`${Re.widthKey}-junction`)})]}),Fe&&(()=>{const Re=rr(e,An),Ve=nh(e.cutLabelVerticalAlign),Xe=Re.textTextAlign==="justify"||b;return r.jsx("button",{type:"button",className:`${d}-cut-item`,style:{minHeight:De(C??0),cursor:Tt?"pointer":"default",...Ug(D,S??0,n??!1)},onClick:Tt?it:void 0,onMouseEnter:G||N?Qt:void 0,onMouseLeave:G?Ut:void 0,children:r.jsx("div",{className:`${d}-list-cols-row`,style:{...b?{paddingLeft:De(re),paddingRight:De(re)}:{},justifyContent:ih(Re.textTextAlign),alignItems:_l(Ve)},children:r.jsx("span",{className:Nl(e,An,`${d}-cut-label`,`${d}-text-tight-leading`),style:{...Hl(Re,n),...Ol(e,An,d,n),...Xe?{width:"100%"}:{}},children:J})})})})(),N&&Y&&(()=>{const Re=`${Y.widthPx}px`,Ve={width:Re,height:"auto",maxHeight:Re,objectFit:"contain",left:Y.x,top:Y.y,position:"absolute"};return r.jsx(qg,{media:Y,className:Y.isVideo?`${d}-hover-video`:`${d}-hover-image`,style:Ve},`${Y.rowId}-${Y.url}`)})()]})})]})}const Rh=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
9088
+ `}const Un=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Va=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",mo=[...Va,An],Tr=["A","B","C","D","E"];function oc(e){return`${e}ColumnVerticalAlign`}const ha=["Top","Center","Bottom"];function Ga(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Tr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Gg(e){const t=Ga(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function qg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Tr.includes(n)?n:null}function rc(e,t,n){const i=qg(e);return i?i===t?!1:Gg(n[oc(i)]):!0}function go(e){const t=Ga(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Tr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Kg(e,t,n){if(ac(e,t,n))return go(e);const i=go(e);return i.kind==="baseline"?{kind:"top"}:i}function Ug(e){const t=go(e);return t.kind==="baseline"?{kind:"top"}:t}function ac(e,t,n){return rc(e,n,t)?go(e).kind==="baseline":!1}function Xg(e){const t={};let n=!1;for(const i of Tr){const o=oc(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}rc(s,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 Zg(e){const t=go(e).kind;return t==="baseline"?"center":t}function Jg(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ws(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Qg(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 qr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=Qg(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 eh(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 th(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const nh={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function vt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const ih={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function oh(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 rh(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(mo.map(e=>[ih[e],oh(e)]))}}function ar(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 _s(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 dn(Xt(n,t))}function Ns(e,t,n,i){const o=ar(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function Hs(e,t,n,i){const o=ar(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((s-l)/2,i)}}const yn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Wi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],_i=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ni=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],ah={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},sh=["hover","focus","filled","success","error"],js=.004,$i=.004,Kr=$i,qa=50,ho=1440,fo=qa/ho;function sc(e){const t=typeof e=="number"&&e>0?e:ho;return qa/t}function lh(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 ho}const lc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function no(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function ch(e,t=1){const n=t/e;return Object.fromEntries(yn.map(i=>[i,n]))}function dh(){return Object.fromEntries([...Wi.map(e=>[e,0]),..._i.map(e=>[e,0])])}function uh(){return Object.fromEntries(Ni.map(e=>[e,0]))}function Ho(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:lc[t]]))}function cc(e,t,n){const i=e-fo,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 Zo(e,t,n){const i=Ka(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 ph(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Wi[o],l=_i[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=cc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function Ka(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)+fo;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]-fo;if(m<=0)continue;const x=Math.min(c,m);d[u]-=x,c-=x}return[...d,i[e-1]]}function mh(e,t,n){if(e<=1)return{};const i=Ka(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 Os(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Un]}function gh(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function hh(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],x=_i[c],b=Ni[c],T=yn[l],f=Wi[l],L=_i[l],$=Ni[l],R=n[u],P=n[m],C=n[x],X=n[b];typeof R=="number"&&(s[T]=R),typeof P=="number"&&(s[f]=P),typeof C=="number"&&(s[L]=C),typeof X=="number"&&(s[$]=X)}return s}function dc(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 fh(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=no(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...ch(n,o),...dh()};if(s)for(const d of Ni)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,uh());return dc(e,l)?l:e}function yh(e,t,n){const i=Xg(e);i&&(e={...e,...i});const o=sc(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=no(e),c=no(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof s=="number"?s:typeof l=="number"?l:Un.length,x=C=>{if(u)return C;const X=Ho({...t,...C}),E=no(C),B=Zo(m,E,X),I=ph(m,B,{...t,...C});return Object.keys(I).length===0?C:{...C,...I}};if(typeof s=="number"&&s!==l)return e;const b=Os(e),T=Os(t);if(!gh(b,T))return x({...e,...hh(b,T,t,m)});if(d<c&&typeof m=="number"&&!u){const C=Ho({...t,...e});return x({...e,...mh(m,d,C)})}if(u){const C=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,X=Math.max(0,(d-o)/2);return C>X?{...e,textPaddingLR:X}:e}const f=Ho({...t,...e}),L=Zo(m,c,Ho(t)),R=Zo(m,d,f).some((C,X)=>C<(L[X]??C)),P=yn.some(C=>{const X=e[C],E=t[C];return typeof X=="number"&&typeof E=="number"&&X!==E});return R||P?x(e):e}function vh(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(fo,i-o-s-fo)}function xh(e,t){return Math.random()*(t-e)+e}function bh(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:lc[t]]))}function Ur(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function wh(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Wi[d],u=_i[d],m=Ni[d];return{key:l,textPrefix:nh[l],widthKey:yn[d],width:n[yn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[m]}})}function Sh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=y.useScopedStyles(),u=!!o,{columns:m,type:x,wrapperWidth:b,entriesCount:T,cellMinHeight:f,dividerWidth:L,showVisibility:$,cut:R,showCut:P,cutCellMinHeight:C,cutLabel:X,imageSize:E,imageOnHover:B,entryHoverEffect:I,entryHoverShowOption:w,rowPaddingTop:W,rowPaddingBottom:h,rowPaddingTopB:S,columnsOrder:k,textPaddingLR:D,textColor:U,backgroundColor:ae,dividerColor:Y,textHoverColor:G,backgroundHoverColor:H,dividerHoverColor:F}=e,[A,K]=a.useState(void 0),[q,ee]=a.useState(null),N=B==="on"&&(!n||i),ue=(R??0)>0,v=x==="b",ye=a.useRef(null),Z=a.useRef(null),[ce,$e]=a.useState(null),[ne,ve]=a.useState(ho),J=sc(ne),pe=Math.max(0,((b??0)-J)/2),he=Math.min(D??0,pe),Ae=Math.max(he,$i),be=((b??0)+J)/2;a.useLayoutEffect(()=>{if(!n){ve(ho);return}const Ce=()=>{ve(lh(ye.current))};Ce();const Oe=ye.current;if(!Oe)return;const Ke=new ResizeObserver(Ce);Ke.observe(Oe);let He=Oe;for(;He&&!He.style.getPropertyValue("--cntrl-article-width");)He=He.parentElement;return He&&Ke.observe(He),()=>Ke.disconnect()},[n,l]),a.useEffect(()=>{K(void 0)},[R,P,t,T]),a.useEffect(()=>{n&&!i&&K(void 0)},[n,i]);const We=y.buildColorVars(c,{textColor:U,backgroundColor:ae,dividerColor:Y,textHoverColor:G,backgroundHoverColor:H,dividerHoverColor:F},ah,sh),Q=s&&s!=="default"?`${c}-state-${s}`:"",xe=`${!n||i?I==="default"?`${c}-entry-hover-default`:I==="blinds"?`${c}-entry-hover-blinds`:I==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Q}`.trim(),O=I==="reveal"&&(!n||i),se=($==null?void 0:$[0])??!1,fe=($==null?void 0:$[1])??!1,Se=a.useRef(e),Ie=a.useRef(l);a.useEffect(()=>{if(!d||!n){Se.current=e,Ie.current=l;return}if(Ie.current!==l){Se.current=e,Ie.current=l;return}const Ce=Se.current;if(!(Ce!==e))return;if(typeof Ce.columns=="number"&&typeof e.columns=="number"&&Ce.columns!==e.columns){Se.current=e;return}const Ke=yh(e,Ce,{designWidth:ne});Se.current=e,dc(e,Ke)&&d(Ke)},[e,d,n,l,ne]);const we=a.useMemo(()=>bh(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),_=a.useMemo(()=>Ur(e,Wi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),de=a.useMemo(()=>Ur(e,_i),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),oe=a.useMemo(()=>Ur(e,Ni),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),z=a.useMemo(()=>Array.isArray(k)&&k.length>0?k:[...Un],[k]),re=a.useMemo(()=>wh(z,m,we,_,de,oe),[z,m,we,_,de,oe]),ke=no(e),ie=a.useMemo(()=>yn.slice(0,m).map(Ce=>we[Ce]),[m,we]),j=a.useMemo(()=>Ka(m,ke,we),[m,ke,we]),Ne=a.useMemo(()=>Zo(m,ke,we),[m,ke,we]),Me=a.useMemo(()=>re.map((Ce,Oe)=>cc(Ne[Oe]??0,Ce.paddingLeft,Ce.paddingRight)),[re,Ne]),et=a.useMemo(()=>{const Ce=T===0?1/0:T;return(t??[]).slice(0,Ce).map((Ke,He)=>({id:He,cells:Object.fromEntries(Un.map(ze=>[ze,Ke[ze]??""])),image:Ke.image,link:Ke.link}))},[t,T]),Ye=ue?A??R:et.length,lt=a.useMemo(()=>ue?et.slice(0,Ye):et,[et,ue,Ye]),mt=ue&&Ye<et.length,De=lt.length>1||mt,ot=[se?`${c}-divider-top`:"",fe||De?`${c}-divider-bottom`:""].filter(Boolean).join(" "),$t=!n||i,rt=()=>{if(!$t)return;const Ce=A??R;if(!P){K(et.length);return}K(Math.min(Ce+P,et.length))},Ue=Ce=>y.scalingValue(Ce,n??!1),ht=v?S??0:W??0,xt=h??0,dt=f??0,kt=ht+dt/2,_t=Math.max(xt,Kr),Qe=As(0,lt.length,se,fe,mt,L??0,n??!1).borderTopWidth,Tt=ce!=null?`${ce}px`:`calc(${Qe} + ${Ue(kt)})`,Lt=v?"rowPaddingTopB":"rowPaddingTop",Ge=re[0],qe=re[re.length-1],Pe=Me[0],gt=Me[Me.length-1],It=Ge&&Pe?Math.max(Pe.paddingLeft,$i):0,Mt=qe&&gt?Math.max(gt.paddingRight,$i):0,Dt=ke,en=Ce=>{const Oe=ye.current;if(!Oe)return{x:0,y:0};const Ke=Oe.getBoundingClientRect();return{x:Ce.clientX-Ke.left+Fs,y:Ce.clientY-Ke.top+Fs}},on=(Ce,Oe)=>{if(!N)return;const Ke=Ce.image;if(!(Ke!=null&&Ke.url)){ee(null);return}const{x:He,y:ze}=en(Oe),ut=(E==null?void 0:E.min)??80,_e=(E==null?void 0:E.max)??320,Je=(q==null?void 0:q.rowId)===Ce.id?q.widthPx:xh(ut,_e);ee({rowId:Ce.id,url:Ke.url,objectFit:"contain",isVideo:Og(Ke),widthPx:Je,x:He,y:ze})},bt=Ce=>{if(!N||!q)return;const{x:Oe,y:Ke}=en(Ce);ee(He=>!He||He.x===Oe&&He.y===Ke?He:{...He,x:Oe,y:Ke})},Rt=()=>{ee(null)},Ut=Ce=>{O&&Ms(Ce,c),N&&ee(null)},Kt=Ce=>{O&&Ps(Ce,c)};a.useLayoutEffect(()=>{if(!u||v){$e(null);return}const Ce=Z.current,Oe=Ce==null?void 0:Ce.parentElement;if(!Ce||!Oe){$e(null);return}const Ke=()=>{const ze=Ce.querySelector("[data-list-row]");if(!ze){$e(null);return}const ut=Oe.getBoundingClientRect(),_e=ze.getBoundingClientRect();$e(_e.top-ut.top+_e.height/2)};Ke();const He=new ResizeObserver(Ke);return He.observe(Ce),He.observe(Oe),()=>He.disconnect()},[u,v,lt,ht,xt,dt,t,e,re,Ne,ne,L,se,fe,mt]);const ft=a.useMemo(()=>!v&&Va.some(Ce=>{const Oe=Ce.charAt(0),Ke=e[`${Ce}VerticalAlign`];return ac(Ke,e,Oe)}),[v,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Je;const Ce=ye.current;if(!Ce)return;const Oe=()=>{Ce.querySelectorAll("[data-list-col]").forEach(tt=>{tt.style.transform="";const Wt=tt.querySelector(`.${c}-list-col`);Wt&&(Wt.style.minHeight="",Wt.style.height="");const Ct=tt.querySelector(`.${c}-list-col-title`);Ct&&(Ct.style.transform="")})};if(v||!ft){Oe();return}const Ke=()=>{const tt=Array.from(Ce.querySelectorAll("[data-list-row]")),Wt=`${c}-list-col`,Ct=`${c}-baseline-probe`;tt.forEach(st=>{st.querySelectorAll("[data-list-col]").forEach(Nt=>{Nt.style.transform="";const At=Nt.querySelector(`.${Wt}`);At&&(At.style.minHeight="",At.style.height="");const Vt=Nt.querySelector(`.${c}-list-col-title`);Vt&&(Vt.style.transform="")})}),tt.forEach(st=>{const Nt=Array.from(st.querySelectorAll("[data-list-col]"));eh(st,Nt,Wt)}),Ce.offsetHeight,tt.forEach(st=>{const Nt=Array.from(st.querySelectorAll("[data-list-col]")),At=st.getBoundingClientRect().top,Vt=new Map,zt=Nt.map(wt=>{const Gt=wt.querySelector(`.${c}-list-col-title`),pt={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(pt.letter,pt),pt}),Pt=new Map,Qt=(wt,Gt)=>{const pt=Pt.get(wt.letter);if(pt!==void 0)return pt;const Ft=wt.anchor?Vt.get(wt.anchor):void 0;if(wt.kind!=="baseline"||!Ft||Gt.has(wt.letter)){const Le=qr(wt,At,Wt,Ct);return Pt.set(wt.letter,Le),Le}Gt.add(wt.letter);const Bt=Qt(Ft,Gt);Gt.delete(wt.letter);const g=qr(wt,At,Wt,Ct),me=Bt-g;th(wt.titleEl,me);const Re=qr(wt,At,Wt,Ct);return Pt.set(wt.letter,Re),Re};zt.forEach(wt=>Qt(wt,new Set))})};let He=null;const ze=()=>{He===null&&(He=requestAnimationFrame(()=>{He=null,Ke()}))};Ke();const ut=new ResizeObserver(()=>ze());ut.observe(Ce);let _e=!1;return typeof document<"u"&&((Je=document.fonts)!=null&&Je.ready)&&document.fonts.ready.then(()=>{_e||ze()}),()=>{_e=!0,He!==null&&(cancelAnimationFrame(He),He=null),ut.disconnect(),Oe()}},[ft,v,e,t,ne,lt,Ne]);const Jt=a.useMemo(()=>Vg(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Jt}}),r.jsx("div",{style:We,children:r.jsxs("div",{ref:ye,className:`${c}-wrapper ${xe}${ot?` ${ot}`:""}${v?` ${c}-type-b`:""}`.trim(),style:{width:y.scalingValue(b??0,n),...!v&&u?{[`--${c}-first-entry-handle-top`]:Tt}:{}},onMouseMove:N?bt:void 0,onMouseLeave:N?Rt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[lt.map((Ce,Oe)=>{var ut;const Ke=(((ut=Ce.link)==null?void 0:ut.length)??0)>0,He=Ke&&(!n||i)?"a":"div",ze=As(Oe,lt.length,se,fe,mt,L??0,n??!1);return r.jsxs(He,{ref:Oe===0?_e=>{Z.current=_e}:void 0,className:`${c}-list-item${Ke||w==="always"?` ${c}-list-item-has-link`:""}`,...Ke?{href:Ce.link,target:"_blank"}:{},style:ze,onMouseEnter:_e=>{O&&(Ke||w==="always")&&Ms(_e,c),N&&on(Ce,_e)},onMouseLeave:_e=>{O&&(Ke||w==="always")&&Ps(_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${v?"":` ${c}-list-cols-row-h`}${u&&Oe===0&&v?` ${c}-list-cols-row-controls`:""}`,...v?{}:{"data-list-row":""},style:v?void 0:{minHeight:Ue(dt)},children:[re.map((_e,Je)=>{const tt=Je===re.length-1,Wt=Me[Je],Ct=_e.paddingBottom,st=Bg(Ce.cells[_e.key]),Nt=v&&st&&Ct>0,At=v?{minHeight:Ue(dt)}:{width:Ue(Ne[Je])},Vt=v?{paddingLeft:Ue(he),paddingRight:Ue(he)}:{paddingLeft:Ue(Wt.paddingLeft),paddingRight:Ue(Wt.paddingRight)},zt=_e.textPrefix.charAt(0),Pt=v?Ug(e[`${_e.textPrefix}VerticalAlign`]):Kg(e[`${_e.textPrefix}VerticalAlign`],e,zt),Qt=v&&st&&u&&Oe===0;return v&&!st?null:r.jsxs("div",{className:v?`${c}-list-col-wrap`:void 0,...v?{}:{"data-list-col":"","data-col-letter":zt,"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,...v?{justifyContent:Ws(Pt.kind)}:{}},"data-test":_e.width,children:r.jsx("span",{className:Ns(e,_e.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{..._s(ar(e,_e.textPrefix),n),...Hs(e,_e.textPrefix,c,n),...v?{}:Yg(Pt.kind)},children:Ce.cells[_e.key]??null})}),Nt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(Ct)}}),Qt&&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,Kr))}})]},_e.key)}),u&&Oe===0&&v&&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(be),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ue(Ae),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(be),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ue(Math.max(Ae,ke-Ae)),width:Ue(Ae),height:"100%"}})]})]}),!v&&xt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(xt)}}),u&&Oe===0&&!v&&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":"",...v?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:v?"center":"left-y",areaStyle:{position:"absolute",top:Qe,left:0,width:"100%",height:Ue(Math.max(ht,Kr))}})},"row-padding-handles"),u&&!v&&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(Ne[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(Ne[re.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-Mt),width:Ue(Mt),height:"100%"}})]},"column-edge-padding-handles"),u&&!v&&re.slice(0,-1).map((Ce,Oe)=>{const Ke=re[Oe+1],He=j.slice(0,Oe+1).reduce((tt,Wt)=>tt+Wt,0),ze=Me[Oe],ut=Me[Oe+1],_e=Math.max(ze.paddingRight,$i),Je=Math.max(ut.paddingLeft,$i);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(Ne[Oe]-ze.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(Ne[Oe+1]-ut.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(He),width:Ue(Je),height:"100%"}})]},`${Ce.paddingRightKey}-padding`)}),u&&!v&&re.slice(0,-1).map((Ce,Oe)=>{const Ke=vh(Oe,j,ie,ke),ze=j.slice(0,Oe+1).reduce((ut,_e)=>ut+_e,0)-js/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(qa),"data-controls-max-fraction":String(Ke),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ue(ze),width:Ue(js),height:"calc(100%)",pointerEvents:"auto"}})},`${Ce.widthKey}-junction`)})]}),mt&&(()=>{const Ce=ar(e,An),Oe=Zg(e.cutLabelVerticalAlign),Ke=Ce.textTextAlign==="justify"||v;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ue(C??0),cursor:$t?"pointer":"default",...Dg(fe,L??0,n??!1)},onClick:$t?rt:void 0,onMouseEnter:O||N?Ut:void 0,onMouseLeave:O?Kt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...v?{paddingLeft:Ue(he),paddingRight:Ue(he)}:{},justifyContent:Jg(Ce.textTextAlign),alignItems:Ws(Oe)},children:r.jsx("span",{className:Ns(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{..._s(Ce,n),...Hs(e,An,c,n),...Ke?{width:"100%"}:{}},children:X})})})})(),N&&q&&(()=>{const Ce=`${q.widthPx}px`,Oe={width:Ce,height:"auto",maxHeight:Ce,objectFit:"contain",left:q.x,top:q.y,position:"absolute"};return r.jsx(zg,{media:q,className:q.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Oe},`${q.rowId}-${q.url}`)})()]})})]})}const $h=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
9149
9089
  import { CommonComponentProps } from '../props';
9150
9090
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
9151
9091
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -12106,7 +12046,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12106
12046
  </>
12107
12047
  );
12108
12048
  }
12109
- `,qi=["A","B","C","D","E"],Bl=[...ga,"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 Eh(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function No(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Mh(){return Object.fromEntries(qi.map((e,t)=>{const n=Xn[t],i=`${e} column`;return[n,Eh(i)]}))}function kh(){const e={};for(const t of qi)e[`${t}ColumnWidth`]=No(`${t} column width`),e[`${t}ColumnPaddingLeft`]=No(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=No(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=No(`${t} column padding bottom`);return e}function Dl(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Xn]};for(const l of qi)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 Ph(e){const t={};if(e===An)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ga]},enum:[...ga]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Bl],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Bl]}}return t[Ct(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ct(e,"textFontSettings")]={...oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ct(e,"textFontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ct(e,"textLineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ct(e,"textLetterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ct(e,"textWordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ct(e,"textTextAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ct(e,"textTextAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Ah=mo.reduce((e,t)=>({...e,...Ph(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 Wh(e,t={}){var n;return{...Fh(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Vl=new Set(["textFontFamily","textFontSettings"]);function _h(e,t,n){const i=l=>n===void 0?!0:n==="common"?Vl.has(l):!Vl.has(l),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Va(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Ct(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Ct(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Ct(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Ct(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Ct(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Ct(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Ct(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Ct(e,"textTextAppearance")]=t.textTextAppearance),o}function Zo(e={},t){return mo.reduce((n,i)=>({...n,..._h(i,Wh(i,e),t)}),{})}const Hh=Zo(),Nh=dh();function gc(e){return[Ct(e,"textFontFamily"),Ct(e,"textFontSettings"),Ct(e,"textFontSize"),Ct(e,"textLineHeight"),Ct(e,"textLetterSpacing"),Ct(e,"textWordSpacing"),Ct(e,"textTextAlign"),Ct(e,"textTextAppearance"),`${e}VerticalAlign`]}function Oh(){const e=[];return Da.forEach((t,n)=>{const i=Xn[n],o=gc(t);for(let l=1;l<Xn.length;l+=1){const s=[{name:"columns",value:l},...Array.from({length:l},(c,d)=>({name:`columnsOrder.${d}`,value:i,isNotEqual:!0}))];o.forEach(c=>{e.push({if:s,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const jh=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];gc(An);const zh=[...qi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],ri=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],Bh=[{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:""}],Dh=[...qi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Vh={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:{...Mh(),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:Bh},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"}},...kh(),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"}},...Ah,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",...Hh,...Zo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Dl({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},...Zo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Dl({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},...Zo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Oh(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...zh.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}},...qi.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",...Dh]},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__",Nh]}],paletteBookmark:{items:[...jh],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Gh={element:Ih,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>wh(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...mo.map(e=>({path:`${Ct(e,"textFontFamily")}`}))]},fontRelations:{...mo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Ct(t,"textFontFamily")}`}),{})},schema:Vh,sourceCode:Rh},Gl=300,Nn=.004,qh={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"},Kh=["hover","focus","filled","success","error"];function Uh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ql(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Kl(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:v.scalingValue((o-t)/2,i)}}function Xh(e){return`
12049
+ `,Gi=["A","B","C","D","E"],zs=[...ha,"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 Ch(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function jo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Th(){return Object.fromEntries(Gi.map((e,t)=>{const n=Un[t],i=`${e} column`;return[n,Ch(i)]}))}function Lh(){const e={};for(const t of Gi)e[`${t}ColumnWidth`]=jo(`${t} column width`),e[`${t}ColumnPaddingLeft`]=jo(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=jo(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=jo(`${t} column padding bottom`);return e}function Bs(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Un]};for(const s of Gi)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 Ih(e){const t={};if(e===An)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ha]},enum:[...ha]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...zs],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...zs]}}return t[vt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[vt(e,"textFontSettings")]={...oi.fontSettings,scope:"common",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 Rh=mo.reduce((e,t)=>({...e,...Ih(t)}),{});function Eh(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 kh(e,t={}){var n;return{...Eh(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Ds=new Set(["textFontFamily","textFontSettings"]);function Mh(e,t,n){const i=s=>n===void 0?!0:n==="common"?Ds.has(s):!Ds.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Ga(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 mo.reduce((n,i)=>({...n,...Mh(i,kh(i,e),t)}),{})}const Ph=Jo(),Ah=rh();function uc(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 Fh(){const e=[];return Va.forEach((t,n)=>{const i=Un[n],o=uc(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 Wh=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];uc(An);const _h=[...Gi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],ri=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],Nh=[{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:""}],Hh=[...Gi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],jh={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:{...Th(),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:Nh},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"}},...Lh(),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"}},...Rh,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",...Ph,...Jo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Bs({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:Bs({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:[...Fh(),{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}},...Gi.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",...Hh]},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__",Ah]}],paletteBookmark:{items:[...Wh],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Oh={element:Sh,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>fh(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...mo.map(e=>({path:`${vt(e,"textFontFamily")}`}))]},fontRelations:{...mo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${vt(t,"textFontFamily")}`}),{})},schema:jh,sourceCode:$h},Vs=300,Nn=.004,zh={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"},Bh=["hover","focus","filled","success","error"];function Dh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Gs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function qs(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((o-t)/2,i)}}function Vh(e){return`
12110
12050
  .${e}-wrapper {
12111
12051
  box-sizing: border-box;
12112
12052
  display: flex;
@@ -12168,7 +12108,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12168
12108
  display: flex;
12169
12109
  align-items: center;
12170
12110
  justify-content: space-between;
12171
- gap: ${Uh(20)};
12111
+ gap: ${Dh(20)};
12172
12112
  width: 100%;
12173
12113
  min-width: 0;
12174
12114
  min-height: var(--${e}-question-min-height, unset);
@@ -12196,7 +12136,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12196
12136
  width: var(--${e}-icon-max-width);
12197
12137
  height: var(--${e}-icon-max-width);
12198
12138
  position: relative;
12199
- transition: transform ${Gl}ms ease;
12139
+ transition: transform ${Vs}ms ease;
12200
12140
  }
12201
12141
  .${e}-icon-custom {
12202
12142
  display: flex;
@@ -12231,7 +12171,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12231
12171
  .${e}-panel {
12232
12172
  display: grid;
12233
12173
  grid-template-rows: 0fr;
12234
- transition: grid-template-rows ${Gl}ms ease;
12174
+ transition: grid-template-rows ${Vs}ms ease;
12235
12175
  }
12236
12176
  .${e}-item-open .${e}-panel {
12237
12177
  grid-template-rows: 1fr;
@@ -12299,7 +12239,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12299
12239
  left: 20px;
12300
12240
  transform: translateY(-50%);
12301
12241
  }
12302
- `}function Ul(e,t,n,i,o,l,s,c){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:c??"#000000"}}function Yh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l}){const{prefix:s}=v.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:x="solid",entryHoverEffect:w="default",autoclose:$="off",icon:f,iconMaxWidth:S=.00833,iconPaddingRight:L=0,iconAnimation:M="rotate 45",questionColor:A="#000000",answerColor:C="#000000",dividerColor:J="#0000001F",iconColor:k="#000000",questionHoverColor:U="#666666",iconHoverColor:I="#666666",iconActiveColor:R="#000000",dividerHoverColor:T="#000000",questionFontFamily:y,questionFontSettings:h,questionFontSize:F,questionLineHeight:W,questionLetterSpacing:V,questionWordSpacing:ne,questionTextAppearance:X,answerFontFamily:z,answerFontSettings:H,answerFontSize:_,answerLineHeight:E,answerLetterSpacing:q,answerWordSpacing:Y,answerTextAppearance:ee,questionPaddingLeft:N=0,questionPaddingTop:pe=0,questionPaddingBottom:b=0,answerPaddingLeft:ye=0,answerPaddingRight:Q=0,answerPaddingTop:xe=0,answerPaddingBottom:$e=0}=e,oe=t??[],[ie,B]=a.useState(()=>new Set),le=!n||i;a.useEffect(()=>{B(new Set)},[$]),a.useEffect(()=>{n&&!o&&!i&&B(new Set)},[n,o,i]);const re=De=>v.scalingValue(De,n??!1),ke=Math.max(N,Nn),fe=Math.max(pe,Nn),Pe=Math.max(b,Nn),ve=Math.max(ye,Nn),we=Math.max(Q,Nn),Se=Math.max(xe,Nn),G=Math.max($e,Nn),me=Math.max(0,(d??1)-L-S),D=Math.max(0,(d??1)-Q),K=Math.max(0,(d??1)-ye),ae=Math.max(L,Nn),ge=Math.max(0,(d??1)-N-S),ce=a.useMemo(()=>ie.size===0?0:Math.min(...ie),[ie]),be=a.useCallback(De=>ie.has(De),[ie]),Ee=le&&w==="default"?`${s}-entry-hover-default`:"",Z=f??"",de=Z!=="",We=M.replace(/^rotate /,""),se=`${s}-icon-anim-${We}`,O=dn(Xt(Ul(y,h,F,W,V,ne,X,A),n)),Oe=dn(Xt(Ul(z,H,_,E,q,Y,ee,C),n)),_e=ql(F,W,`${s}-question`,`${s}-text-tight-leading`),nt=ql(_,E,`${s}-answer-text`,`${s}-text-tight-leading`),Ue=Kl(F,W,s,n),Ce=Kl(_,E,s,n),Fe=v.buildColorVars(s,{questionColor:A,answerColor:C,dividerColor:J,iconColor:k,questionHoverColor:U,iconHoverColor:I,iconActiveColor:R,dividerHoverColor:T},qh,Kh),He=l&&l!=="default"?`${s}-state-${l}`:"",Ze=a.useCallback(De=>{le&&B(et=>{if(et.has(De)){const lt=new Set(et);return lt.delete(De),lt}if($==="on")return new Set([De]);const dt=new Set(et);return dt.add(De),dt})},[le,$]),Tt=a.useMemo(()=>Xh(s),[s]),it={[`--${s}-divider-width`]:v.scalingValue(m,n??!1),[`--${s}-divider-style`]:x,[`--${s}-icon-max-width`]:v.scalingValue(S,n??!1),...u>0?{[`--${s}-question-min-height`]:v.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Tt}}),r.jsx("div",{style:Fe,children:r.jsx("div",{className:at(`${s}-wrapper`,n&&!i&&`${s}-editor`,Ee,He),style:{width:v.scalingValue(d,n??!1),maxWidth:"100%",...it},children:oe.map((De,et)=>{var xt;const dt=be(et),lt=((xt=De.question)==null?void 0:xt.trim())??"",ht=De.answer,Rt=((ht==null?void 0:ht.length)??0)>0,ot=c&&et===ce;return r.jsxs("div",{className:at(`${s}-item`,dt&&`${s}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${s}-question-controls`,children:[ot&&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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:re(fe),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(me),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:re(ke),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(ge),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:re(ae),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${s}-question-button`,"aria-expanded":dt,style:{...O,...Ue,paddingLeft:re(N),paddingRight:re(L)},onClick:()=>Ze(et),children:[pe>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:re(pe)},"aria-hidden":"true"}),r.jsxs("span",{className:`${s}-question-row`,children:[r.jsx("span",{className:_e,children:lt}),Rt&&(de?r.jsx("span",{className:`${s}-icon ${s}-icon-custom ${se}`,"aria-hidden":"true",children:r.jsx(on,{url:Z,fill:k,hoverFill:I,className:`${s}-icon-image`})}):r.jsx("span",{className:`${s}-icon ${s}-icon-default ${se}`,"aria-hidden":"true"}))]}),b>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:re(b)},"aria-hidden":"true"})]}),ot&&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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:re(Pe),zIndex:2}})]}),Rt&&ht&&r.jsx("div",{className:`${s}-panel`,"aria-hidden":!dt,children:r.jsx("div",{className:`${s}-panel-inner`,children:r.jsxs("div",{className:`${s}-answer-controls`,children:[ot&&dt&&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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:re(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(D),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:re(ve),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(K),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:re(we),height:"100%",zIndex:2}})]}),xe>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:re(xe)}}),r.jsx("div",{className:`${s}-answer`,style:{...Oe,...Ce,paddingLeft:re(ye),paddingRight:re(Q)},children:r.jsx("div",{className:nt,children:r.jsx(mi,{content:ht})})}),$e>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:re($e)}}),ot&&dt&&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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:re(G),zIndex:2}})]})})})]},et)})})})]})}const Zh=`import { useCallback, useEffect, useMemo, useState } from 'react';
12242
+ `}function Ks(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 Gh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=y.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:x="solid",entryHoverEffect:b="default",autoclose:T="off",icon:f,iconMaxWidth:L=.00833,iconPaddingRight:$=0,iconAnimation:R="rotate 45",questionColor:P="#000000",answerColor:C="#000000",dividerColor:X="#0000001F",iconColor:E="#000000",questionHoverColor:B="#666666",iconHoverColor:I="#666666",iconActiveColor:w="#000000",dividerHoverColor:W="#000000",questionFontFamily:h,questionFontSettings:S,questionFontSize:k,questionLineHeight:D,questionLetterSpacing:U,questionWordSpacing:ae,questionTextAppearance:Y,answerFontFamily:G,answerFontSettings:H,answerFontSize:F,answerLineHeight:A,answerLetterSpacing:K,answerWordSpacing:q,answerTextAppearance:ee,questionPaddingLeft:N=0,questionPaddingTop:ue=0,questionPaddingBottom:v=0,answerPaddingLeft:ye=0,answerPaddingRight:Z=0,answerPaddingTop:ce=0,answerPaddingBottom:$e=0}=e,ne=t??[],[ve,J]=a.useState(()=>new Set),pe=!n||i;a.useEffect(()=>{J(new Set)},[T]),a.useEffect(()=>{n&&!o&&!i&&J(new Set)},[n,o,i]);const he=Ue=>y.scalingValue(Ue,n??!1),Ae=Math.max(N,Nn),be=Math.max(ue,Nn),We=Math.max(v,Nn),Q=Math.max(ye,Nn),le=Math.max(Z,Nn),xe=Math.max(ce,Nn),O=Math.max($e,Nn),se=Math.max(0,(c??1)-$-L),fe=Math.max(0,(c??1)-Z),Se=Math.max(0,(c??1)-ye),Ie=Math.max($,Nn),we=Math.max(0,(c??1)-N-L),_=a.useMemo(()=>ve.size===0?0:Math.min(...ve),[ve]),de=a.useCallback(Ue=>ve.has(Ue),[ve]),oe=pe&&b==="default"?`${l}-entry-hover-default`:"",z=f??"",re=z!=="",ke=R.replace(/^rotate /,""),ie=`${l}-icon-anim-${ke}`,j=dn(Xt(Ks(h,S,k,D,U,ae,Y,P),n)),Ne=dn(Xt(Ks(G,H,F,A,K,q,ee,C),n)),Me=Gs(k,D,`${l}-question`,`${l}-text-tight-leading`),et=Gs(F,A,`${l}-answer-text`,`${l}-text-tight-leading`),Ye=qs(k,D,l,n),lt=qs(F,A,l,n),mt=y.buildColorVars(l,{questionColor:P,answerColor:C,dividerColor:X,iconColor:E,questionHoverColor:B,iconHoverColor:I,iconActiveColor:w,dividerHoverColor:W},zh,Bh),De=s&&s!=="default"?`${l}-state-${s}`:"",ot=a.useCallback(Ue=>{pe&&J(ht=>{if(ht.has(Ue)){const dt=new Set(ht);return dt.delete(Ue),dt}if(T==="on")return new Set([Ue]);const xt=new Set(ht);return xt.add(Ue),xt})},[pe,T]),$t=a.useMemo(()=>Vh(l),[l]),rt={[`--${l}-divider-width`]:y.scalingValue(m,n??!1),[`--${l}-divider-style`]:x,[`--${l}-icon-max-width`]:y.scalingValue(L,n??!1),...u>0?{[`--${l}-question-min-height`]:y.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:nt(`${l}-wrapper`,n&&!i&&`${l}-editor`,oe,De),style:{width:y.scalingValue(c,n??!1),maxWidth:"100%",...rt},children:ne.map((Ue,ht)=>{var Tt;const xt=de(ht),dt=((Tt=Ue.question)==null?void 0:Tt.trim())??"",kt=Ue.answer,_t=((kt==null?void 0:kt.length)??0)>0,Qe=d&&ht===_;return r.jsxs("div",{className:nt(`${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:he(be),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(se),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:he(Ae),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(we),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:he(Ie),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":xt,style:{...j,...Ye,paddingLeft:he(N),paddingRight:he($)},onClick:()=>ot(ht),children:[ue>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:he(ue)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:Me,children:dt}),_t&&(re?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${ie}`,"aria-hidden":"true",children:r.jsx(rn,{url:z,fill:E,hoverFill:I,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${ie}`,"aria-hidden":"true"}))]}),v>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:he(v)},"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:he(We),zIndex:2}})]}),_t&&kt&&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:he(xe),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(fe),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:he(Q),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(Se),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:he(le),height:"100%",zIndex:2}})]}),ce>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:he(ce)}}),r.jsx("div",{className:`${l}-answer`,style:{...Ne,...lt,paddingLeft:he(ye),paddingRight:he(Z)},children:r.jsx("div",{className:et,children:r.jsx(mi,{content:kt})})}),$e>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:he($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:he(O),zIndex:2}})]})})})]},ht)})})})]})}const qh=`import { useCallback, useEffect, useMemo, useState } from 'react';
12303
12243
  import cn from 'classnames';
12304
12244
  import { CommonComponentProps } from '../props';
12305
12245
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -13096,7 +13036,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
13096
13036
  </>
13097
13037
  );
13098
13038
  }
13099
- `;function On(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Xl={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Jh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Qh={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:On("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:{...Xl.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:{...Xl.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:On("Question Padding Left"),questionPaddingTop:On("Question Padding Top"),questionPaddingBottom:On("Question Padding Bottom"),answerPaddingLeft:On("Answer Padding Left"),answerPaddingRight:On("Answer Padding Right"),answerPaddingTop:On("Answer Padding Top"),answerPaddingBottom:On("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:[...Jh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},ef={element:Yh,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:Qh,sourceCode:Zh},Fn=e=>e.display==="cover",Tr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Yl=100,tf=.2,Zl=8,hc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,l]=a.useState(0),[s,c]=a.useState(!1),d=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Yl:Math.max(Yl,window.innerHeight*tf),[]),x=a.useCallback(y=>Math.max(0,1-y/(m*1.5)),[m]),w=a.useCallback(y=>Math.max(0,1-y/(m*.45)),[m]),$=a.useCallback(y=>{const h=typeof window<"u"?window.innerHeight:800,F=Math.max(.88,1-y/h*.12);return`translateY(${y}px) scale(${F})`},[]),f=a.useCallback(()=>{d.current=null},[]),S=a.useCallback(()=>{c(!0),l(0),window.setTimeout(()=>c(!1),n),f()},[n,f]),L=a.useCallback(()=>{const y=typeof window<"u"?window.innerHeight:800;c(!0),l(y),window.setTimeout(()=>{t(),f(),c(!1)},Math.min(n,200))},[n,t,f]),M=a.useCallback(y=>{!e||s||y.pointerType==="touch"&&(i!=null&&i(y.target)||(d.current={startX:y.clientX,startY:y.clientY,isLocked:null,pointerId:y.pointerId}))},[e,s,i]),A=a.useCallback(y=>{const h=d.current;if(!e||!h||y.pointerType!=="touch"||h.pointerId!==y.pointerId)return;const F=y.clientX-h.startX,W=y.clientY-h.startY;if(h.isLocked===null){if(Math.abs(F)<Zl&&Math.abs(W)<Zl)return;if(W>0&&W>Math.abs(F))h.isLocked=!0,y.currentTarget.setPointerCapture(y.pointerId);else{h.isLocked=!1,f();return}}if(!h.isLocked)return;y.preventDefault();const V=Math.max(0,W);u.current=V,l(V)},[e,f]),C=a.useCallback(y=>{const h=d.current;if(!e||!h||y.pointerType!=="touch"||h.pointerId!==y.pointerId)return;const F=h.isLocked===!0;if(y.currentTarget.hasPointerCapture(y.pointerId)&&y.currentTarget.releasePointerCapture(y.pointerId),!F){f();return}y.clientY-h.startY>=m?L():S()},[m,L,e,f,S]),J=a.useCallback(y=>{C(y)},[C]),k=a.useCallback(y=>{C(y)},[C]),U=o>0,I=s?`transform ${n}ms ease`:"none",R=s?`opacity ${n}ms ease`:"none",T=o>0||s;return{isSwipeDragging:U,backdropStyle:{opacity:x(o),transition:R},mediaAreaStyle:{transform:$(o),transition:I,touchAction:U?"none":void 0,willChange:U?"transform":void 0},overlayContentStyle:T?{opacity:w(o),transition:R}:void 0,swipeHandlers:e?{onPointerDown:M,onPointerMove:A,onPointerUp:J,onPointerCancel:k}:{},dismissAreaStyle:e?{touchAction:U?"none":"pan-x"}:void 0}},nf="[data-lightbox-scrollable]",fc=()=>{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=c=>{const d=c.target;d instanceof Element&&d.closest(nf)||c.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)}},[])},of=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},rf=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},af=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},lf=(e,t,n,{duration:i,easing:o,onComplete:l})=>{const s=e.scrollLeft,c=n-s,d=s-n,u=(f,S)=>{rf(t),e.scrollLeft=f,S&&(l==null||l())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let m=!1,x=0;const w=()=>{t.removeEventListener("transitionend",$),clearTimeout(x)},$=f=>{f.target!==t||f.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(${d}px, 0, 0)`,x=window.setTimeout(()=>{m||(m=!0,w(),u(n,!0))},i+64),()=>{m||(m=!0,w(),u(s-af(t),!1))}},io=300,sf=900,cf=1500,df="cubic-bezier(0.16, 1, 0.3, 1)",uf=3e3,pf=2,mf=16,gf=.05,hf=1,Oo=.3,ff=50,yf=20,bi=.004,Oi=["title1","title2","title3"],vf={title1:"1",title2:"2",title3:"3"},bf={title1:"title1Color",title2:"title2Color",title3:"title3Color"},xf={title1:.02,title2:.02,title3:.02},jo=e=>`max(${e}, ${yf}px)`,wf=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]}},Sf=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=wf(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Wt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,$f=e=>[Wt(e,"fontFamily"),Wt(e,"fontSettings"),{type:"row",items:[Wt(e,"fontSize"),Wt(e,"lineHeight"),Wt(e,"letterSpacing"),Wt(e,"wordSpacing")]},Wt(e,"textAlign"),Wt(e,"textAppearance")],Cf=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Oi.map(e=>[vf[e],$f(e)]))}),Ka=(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},c)=>{if(l<=0||c<=0)return{overflow:l,widths:[c,...s]};const d=Math.min(l,c);return{overflow:l-d,widths:[c-d,...s]}},{overflow:i-1,widths:[]});return o},yc=(e,t)=>Ka(e,t),zo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Jl=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ka(e.length,n),effective:yc(e.length,n)}},Tf=(e,t,n,i,o,l,s)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:l,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:s,text:i}),c},Ur=(e,t)=>{const n=i=>{const o=Wt(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[bf[t]]}},Lf=(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),Xr=(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??xf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},If=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:x,closeIcon:w,closeIconMaxWidth:$,closeIconColor:f,closeIconHoverColor:S,thumbnailTrigger:L,thumbnailVisibility:M,thumbnailObjectFit:A,thumbnailActive:C,thumbnailActiveColor:J,title1Width:k,title2Width:U,title3Width:I,title1MarginLeft:R=0,title2MarginLeft:T=0,title3MarginLeft:y=0,titleRowMarginBottom:h=0,titleHeaderLayout:F="desktop",contentMarginTop:W,iconMarginLeft:V}=n,ne=p=>v.scalingValue(p,i??!1),X=d??n.thumnailSize??.03,z=ne(X),H=ne(u),_=ne(m??.02),E=ne(x??0),q=ne(W??0),Y=jo(q),ee=ne(V??0),[N,pe]=a.useState(0),b=a.useRef(N);b.current=N;const ye=t[N],{title1:Q,title2:xe,title3:$e}=Sf(ye),oe=Xr("title1",Ur(n,"title1"),i),ie=Xr("title2",Ur(n,"title2"),i),B=Xr("title3",Ur(n,"title3"),i),le=F==="mobile",re=!o&&(!i||l),ke=re,fe=re,Pe=re,ve=Fn(A),we=ve?{"--image-aspect-ratio":Tr(A)}:void 0,Se=!!(Q||xe||$e),G=a.useMemo(()=>Tf(e,Q,xe,$e,oe,ie,B),[e,N,Q,xe,$e,oe,ie,B]),me=a.useMemo(()=>({title1Width:k,title2Width:U,title3Width:I}),[k,U,I]),D=a.useMemo(()=>G.map(p=>me[p.widthKey]),[G,me]),K=a.useMemo(()=>Ka(G.length,D),[G.length,D]),ae=a.useMemo(()=>yc(G.length,D),[G.length,D]),ge=a.useMemo(()=>G.filter(p=>p.prefix==="title1"),[G]),ce=a.useMemo(()=>G.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[G]),be=a.useMemo(()=>Jl(ge,me),[ge,me]),Ee=a.useMemo(()=>Jl(ce,me),[ce,me]),Z=a.useCallback((p,P)=>{const j=G.indexOf(p);if(!le||P==="single-row")return{effectiveWidth:ae[j]??0,resolvedWidth:K[j]??0,maxWidth:zo(j,K)};if(P==="two-row-top"){const Ie=ge.indexOf(p);return{effectiveWidth:be.effective[Ie]??0,resolvedWidth:be.resolved[Ie]??0,maxWidth:zo(Ie,be.resolved)}}const he=ce.indexOf(p);return{effectiveWidth:Ee.effective[he]??0,resolvedWidth:Ee.resolved[he]??0,maxWidth:zo(he,Ee.resolved)}},[ce,Ee,ae,K,G,ge,be,le]),de=a.useCallback(p=>v.scalingValue(p,i??!1),[i]),We=de(h??0),se=a.useMemo(()=>({title1MarginLeft:R,title2MarginLeft:T,title3MarginLeft:y}),[R,T,y]),O=a.useCallback(p=>G.slice(0,p+1).reduce((P,j,he)=>P+(j!=null&&j.marginLeftKey?se[j.marginLeftKey]??0:0)+(K[he]??0),0)+(le?0:R??0),[G,se,K,le,R]),Oe=a.useCallback(()=>le?0:R??0,[le,R]),_e=a.useCallback(p=>ce.slice(0,p).reduce((P,j,he)=>P+(j.marginLeftKey?se[j.marginLeftKey]??0:0)+(Ee.resolved[he]??0),0),[ce,Ee.resolved,se]),nt=a.useCallback(p=>{const P=ce[p];return _e(p)+(P.marginLeftKey?se[P.marginLeftKey]??0:0)+(Ee.resolved[p]??0)},[ce,Ee.resolved,_e,se]),Ue=(p,P)=>{const j=p.marginLeftKey?se[p.marginLeftKey]??0:0,{effectiveWidth:he,resolvedWidth:Ie,maxWidth:Be}=Z(p,P),ct=o&&P==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...P==="single-row"?{gridArea:p.prefix}:{},width:de(he),...j>0?{marginLeft:de(j)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),ct&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ie),style:{position:"absolute",top:0,left:de(-j),width:`max(${de(j)}, 10px)`,height:"100%",pointerEvents:"auto"}}),ct&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Be),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:de(-bi/2),width:de(bi),height:"100%",pointerEvents:"auto"}})]},p.className)},Ce=()=>{const p=le?-1:G.findIndex(he=>he.prefix==="title1"),P=!le&&(o||(R??0)>0)?(()=>{const he=R??0,Ie=p>=0?K[p]:k??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ie),style:{position:"absolute",top:0,left:0,width:`max(${de(he)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,j=G.flatMap((he,Ie)=>{if(!he.marginLeftKey)return[];const Be=se[he.marginLeftKey]??0,ct=Lf(G,K,se,Ie)+Oe();return r.jsx("div",{"data-controls":he.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(K[Ie]),style:{position:"absolute",top:0,left:de(ct),width:`max(${de(Be)}, 10px)`,height:"100%",pointerEvents:"auto"}},he.marginLeftKey)});return P?[P,...j]:j},Fe=()=>G.map((p,P)=>{const j=zo(P,K),Ie=O(P)-bi/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(j),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:de(Ie),width:de(bi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),He=()=>ce.flatMap((p,P)=>{if(!p.marginLeftKey)return[];const j=se[p.marginLeftKey]??0,he=_e(P),{resolvedWidth:Ie}=Z(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(Ie),style:{position:"absolute",top:0,left:de(he),width:`max(${de(j)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),Ze=()=>ce.map((p,P)=>{const{maxWidth:j}=Z(p,"two-row-bottom"),Ie=nt(P)-bi/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(j),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:de(Ie),width:de(bi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),Tt=a.useRef(null),it=a.useRef(null),De=a.useRef(null),et=a.useRef(null),dt=a.useRef([]),lt=a.useRef([]),ht=a.useRef(0),Rt=a.useRef(null),ot=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),xt=a.useRef(null),zt=a.useRef(null),rt=a.useRef(0),qe=a.useRef("forward"),Ne=a.useRef(0),pt=a.useRef(null),yt=a.useRef(!1),Mt=t.length>1&&(!o||!!l),Dt=Mt?3:1,en=a.useMemo(()=>Array.from({length:Dt},()=>t).flat(),[t,Dt]),[sn,Lt]=a.useState(!1),[Et,Qt]=a.useState(!1),[Ut,ft]=a.useState(!0),qt=a.useRef(null),Re=a.useRef(null),Ve=a.useRef(!1),Xe=a.useRef(!1),ze=a.useRef(null),mt=a.useRef(null),Nt=ke&&!Ut,Ae=a.useCallback(()=>{ke&&(ft(!0),mt.current&&clearTimeout(mt.current),mt.current=setTimeout(()=>{ot.current.isActive||ft(!1)},uf))},[ke]),Ye=a.useCallback(()=>{o||Xe.current||(Xe.current=!0,Qt(!1),ze.current=setTimeout(()=>{s()},io))},[o,s]),Je=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":Nt?"true":"false",style:{width:v.scalingValue($??0,i),height:v.scalingValue($??0,i),marginRight:ee,"--close-icon-hover-color":S},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ye,"aria-label":"Close",children:r.jsx(on,{url:w,fill:f,hoverFill:i&&!l?f:S,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"}})]}),bt=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:de(R??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),$t=()=>{const p=G.find(he=>he.prefix==="title1"),P=G.filter(he=>he.prefix==="title2"||he.prefix==="title3"),j=P.length>0||o||(h??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(R??0)>0||o?bt():null,p&&Ue(p,"two-row-top"),w&&Je()]}),j?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[P.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[P.map(he=>Ue(he,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[He(),Ze()]})]}):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:We,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ut=()=>r.jsxs(r.Fragment,{children:[(R??0)>0||o?bt("single-row"):null,G.map(p=>Ue(p,"single-row")),o?r.jsxs(r.Fragment,{children:[Ce(),Fe()]}):null,w?Je():null]}),Pt=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Vt,mediaAreaStyle:Kt,overlayContentStyle:Ft,swipeHandlers:Yt,dismissAreaStyle:wt}=hc({enabled:re??!1,onClose:Ye,animMs:io,isBlockedTarget:Pt}),Ot=()=>{if(!Mt||t.length===0)return ht.current=0,0;const p=lt.current[0],P=lt.current[t.length];if(!p||!P)return ht.current;const j=P.offsetLeft-p.offsetLeft;return j>0&&(ht.current=j),ht.current},jt=(p=!1)=>{if(!Mt)return;const P=it.current,j=Ot();!P||j<=0||j<P.clientWidth*.25||(P.scrollLeft<=0?(P.scrollLeft+=j,p&&(ot.current.scrollLeft+=j),yt.current&&(Ne.current+=j)):P.scrollLeft>=j*2&&(P.scrollLeft-=j,p&&(ot.current.scrollLeft-=j),yt.current&&(Ne.current-=j)))},Bt=(p,P=(j=>(j=it.current)==null?void 0:j.scrollLeft)()??0)=>{if(!Mt)return p;let he=t.length+p,Ie=1/0;for(let Be=0;Be<Dt;Be++){const ct=Be*t.length+p,St=lt.current[ct];if(!St)continue;const tn=Math.abs(St.offsetLeft-P);tn<Ie&&(Ie=tn,he=ct)}return he},vt=p=>{const P=it.current;return!p||!P?!1:p.offsetWidth>P.clientWidth+1},g=p=>{const P=it.current;if(!p||!P||!vt(p))return!1;const j=p.offsetLeft,he=j+p.offsetWidth;return P.scrollLeft>=j-1&&P.scrollLeft+P.clientWidth<=he+1},ue=(p=(P=>(P=it.current)==null?void 0:P.scrollLeft)()??0)=>{for(let he=0;he<lt.current.length;he+=1){const Ie=lt.current[he];if(Ie&&g(Ie))return he}let j={flatIndex:0,distance:1/0};return lt.current.forEach((he,Ie)=>{if(!he)return;const Be=Math.abs(he.offsetLeft-p);Be<j.distance&&(j={flatIndex:Ie,distance:Be})}),j.flatIndex},Te=p=>{it.current&&lt.current.forEach(P=>{P&&(P.style.scrollSnapAlign=vt(P)&&p==="backward"?"end":"start")})},Le=(p,P,j)=>{const he=p-P,Ie=ue(P),Be=lt.current[Ie];if(g(Be))return ue(p)%t.length;const ct=lt.current[Ie+1],St=Be?ct?ct.offsetLeft-Be.offsetLeft:Be.offsetWidth:0,tn=St>0?he>St*Oo?1:he<-St*Oo?-1:0:0;return tn===0?j:Mt?(j+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,j+tn))},tt=a.useCallback((p=!1)=>{if(M!=="on"||o)return;const P=et.current,j=b.current,he=dt.current[j];if(!P||!he||P.scrollWidth<=P.clientWidth)return;const Ie=P.scrollLeft,Be=Ie+P.clientWidth,ct=he.offsetLeft,St=ct+he.offsetWidth;if(ct>=Ie&&St<=Be)return;const tn=P.scrollWidth-P.clientWidth;let Zt=Ie;if(!p&&qt.current===null){const yi=dt.current[j-1],Ki=dt.current[j+1],Eo=yi?he.offsetLeft-yi.offsetLeft:Ki?Ki.offsetLeft-he.offsetLeft:he.offsetWidth;St>Be?Zt+=Eo:ct<Ie&&(Zt-=Eo)}else St>Be?Zt=St-P.clientWidth:Zt=ct;P.scrollLeft=Math.max(0,Math.min(tn,Zt))},[o,M]),kt=a.useCallback((p=!1)=>{p&&(Ve.current=!0),Re.current===null&&(Re.current=requestAnimationFrame(()=>{Re.current=null;const P=Ve.current;Ve.current=!1,tt(P)}))},[tt]),Ke=a.useCallback(p=>{if(p===b.current)return;const P=b.current;b.current=p;const j=Math.abs(p-P)>1,he=Mt&&t.length>1&&(P===t.length-1&&p===0||P===0&&p===t.length-1);pe(p),kt(j||he)},[t.length,Mt,kt]),st=()=>{if(!it.current||t.length===0||qt.current!==null||ot.current.isActive&&ot.current.hasMoved)return;const p=it.current.scrollLeft,P=ue(p)%t.length;P!==b.current&&Ke(P)},_t=()=>{qt.current=null},It=p=>{const P=it.current;P&&(P.style.scrollSnapType=p?"":"none")},cn=()=>{var p;(p=zt.current)==null||p.call(zt),zt.current=null},un=()=>{pt.current!==null&&(cancelAnimationFrame(pt.current),pt.current=null),yt.current=!1},Qn=()=>{const p=it.current;if(!p){pt.current=null,yt.current=!1;return}const P=Ne.current-p.scrollLeft;if(Math.abs(P)<.5){p.scrollLeft=Ne.current,jt(),st(),pt.current=null,yt.current=!1;return}p.scrollLeft+=P*gf,jt(),st(),Ae(),pt.current=requestAnimationFrame(Qn)},ei=()=>{const p=De.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},To=(p,P,j,he)=>{ei(),p.scrollLeft=P,rt.current=p.scrollLeft,jt(),j!==void 0?(b.current=j,pe(j)):st(),It(!0),he==null||he()},Lo=(p,{behavior:P="smooth",activeIndex:j,onComplete:he}={})=>{const Ie=it.current,Be=De.current;if(!Ie||!Be)return;if(un(),cn(),It(!1),P==="auto"){To(Ie,p,j,he);return}const ct=Math.abs(p-Ie.scrollLeft),St=of(ct,sf,cf,Ie.clientWidth*.55);zt.current=lf(Ie,Be,p,{duration:St,easing:df,onComplete:()=>{zt.current=null,To(Ie,p,j,he)}})},Ir=(p="smooth")=>{const P=it.current;if(!P||t.length===0)return;const j=ue()%t.length,he=Bt(j,P.scrollLeft),Ie=lt.current[he];Ie&&Lo(Ie.offsetLeft,{behavior:p,activeIndex:j})},Rr=(p,P="smooth",j,he)=>{const Ie=it.current;if(!Ie||t.length===0)return;const Be=(he??Ie.scrollLeft)-p,ct=ue(p),St=lt.current[ct];if(g(St)){It(!0),st();return}const tn=lt.current[ct+1],Zt=St?tn?tn.offsetLeft-St.offsetLeft:St.offsetWidth:0;if((Zt>0?Be>Zt*Oo?1:Be<-Zt*Oo?-1:0:0)!==0){const $c=j??ct%t.length,Cc=Le(he??Ie.scrollLeft,p,$c);Sn(Cc,P);return}const Ki=he??Ie.scrollLeft,Eo=ue(Ki),Ua=lt.current[Eo];if(Ua&&Math.abs(Ua.offsetLeft-Ki)<1){It(!0),st();return}Ir("auto")},Sn=(p,P="smooth")=>{const j=it.current;if(!j||t.length===0)return;const he=Bt(p,j.scrollLeft),Ie=lt.current[he];Ie&&(P==="smooth"?qt.current=p:qt.current=null,b.current=p,pe(p),kt(!0),Lo(Ie.offsetLeft,{behavior:P,activeIndex:p,onComplete:P==="smooth"?_t:void 0}))},fi=()=>{xt.current&&(window.removeEventListener("pointerup",xt.current),window.removeEventListener("pointercancel",xt.current),xt.current=null)},Io=(p,P,j,he,Ie)=>{const Be=j-p,ct=he-P,St=Math.abs(Be),tn=Math.abs(ct);if(St<ff||St<=tn)return!1;const Zt=Be<0?1:-1,yi=Mt?(Ie+Zt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ie+Zt));return yi===Ie?!1:(Sn(yi),!0)},ti=p=>{if(!ot.current.isActive)return;fi();const P=it.current;if(!P)return;const{scrollLeft:j,startActiveIndex:he,hasMoved:Ie}=ot.current,Be=P.scrollLeft;jt(!0),ot.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},Lt(!1),p!==void 0&&P.hasPointerCapture(p)&&P.releasePointerCapture(p),Ie?Rr(j,"smooth",he,Be):(It(!0),st()),Ae()},Ro=(p,P)=>{const j=Rt.current;Rt.current=null,j&&(Io(j.startX,j.startY,p,P,j.startActiveIndex),Ae())},Er=p=>{if(!fe)return;if(p.pointerType==="touch"){if(un(),It(!0),Pt(p.target))return;Rt.current={startX:p.clientX,startY:p.clientY,startActiveIndex:b.current};return}if(p.pointerType!=="mouse"||p.button!==0||Pt(p.target))return;const P=it.current;if(!P)return;un(),cn(),ei(),qt.current=null,ot.current={isActive:!0,startX:p.clientX,scrollLeft:P.scrollLeft,startActiveIndex:b.current,hasMoved:!1},It(!1),Ae(),P.setPointerCapture(p.pointerId),fi();const j=he=>{he.pointerType==="mouse"&&ti(he.pointerId)};xt.current=j,window.addEventListener("pointerup",j),window.addEventListener("pointercancel",j)},Mr=p=>{if(!fe||p.pointerType!=="mouse")return;const P=it.current;if(!P||!ot.current.isActive)return;if(p.buttons===0){ti(p.pointerId);return}const j=p.clientX-ot.current.startX;Math.abs(j)>hf&&(ot.current.hasMoved=!0,Lt(!0)),ot.current.hasMoved&&(p.preventDefault(),P.scrollLeft=ot.current.scrollLeft-j,jt(!0),st(),Ae())},te=p=>{if(fe){if(p.pointerType==="touch"){p.type==="pointerup"?Ro(p.clientX,p.clientY):Rt.current=null;return}p.pointerType==="mouse"&&ti(p.pointerId)}},Me=p=>{!fe||p.pointerType!=="mouse"||ti(p.pointerId)};return fc(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Qt(!0));return()=>{cancelAnimationFrame(p),cn(),fi(),Re.current!==null&&(cancelAnimationFrame(Re.current),Re.current=null),ze.current&&clearTimeout(ze.current),mt.current&&clearTimeout(mt.current)}},[]),a.useEffect(()=>{if(!ke){ft(!0);return}Ae();const p=Tt.current;if(!p)return;const P=()=>Ae();return p.addEventListener("pointermove",P),p.addEventListener("pointerdown",P),()=>{p.removeEventListener("pointermove",P),p.removeEventListener("pointerdown",P),mt.current&&clearTimeout(mt.current)}},[ke,Ae]),a.useEffect(()=>{const p=P=>{P.key==="Escape"&&Ye()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Ye]),a.useLayoutEffect(()=>{Ot()},[E,t.length,Mt]),a.useLayoutEffect(()=>{o||Sn(b.current,"auto")},[E,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,Mt]),a.useEffect(()=>{const p=it.current;if(!p||o||!re)return;const P=j=>{if(j.preventDefault(),Math.abs(j.deltaY)<=Math.abs(j.deltaX))return;const he=j.deltaMode===1?mf:j.deltaMode===2?p.clientHeight:1,Ie=j.deltaY*he*pf;if(Ie!==0){if(cn(),yt.current||(yt.current=!0,Ne.current=p.scrollLeft,qt.current=null,It(!1)),Ne.current+=Ie,!Mt){const Be=p.scrollWidth-p.clientWidth;Ne.current=Math.max(0,Math.min(Be,Ne.current))}Ae(),pt.current===null&&(pt.current=requestAnimationFrame(Qn))}};return p.addEventListener("wheel",P,{passive:!1}),()=>{p.removeEventListener("wheel",P),un()}},[o,re,Mt]),a.useEffect(()=>{const p=it.current;if(!p)return;const P=()=>{jt(ot.current.isActive);const he=p.scrollLeft,Ie=he-rt.current;rt.current=he;const Be=ht.current>0?ht.current*.5:1/0;if(Ie!==0&&Math.abs(Ie)<Be){const ct=Ie>0?"forward":"backward";ct!==qe.current&&(qe.current=ct,Te(ct))}ot.current.isActive&&ot.current.hasMoved||st()};p.addEventListener("scroll",P,{passive:!0});const j=new ResizeObserver(()=>{Ot(),jt(ot.current.isActive),Te(qe.current),st()});return j.observe(p),()=>{cn(),p.removeEventListener("scroll",P),j.disconnect()}},[t.length,Mt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Ye()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Et?1:0,transition:`opacity ${io}ms ease`,pointerEvents:Et?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...Vt}}),r.jsxs("div",{ref:Tt,className:`${e}-lightbox-dismiss-area`,style:wt,...Yt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Kt,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:it,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":fe&&t.length>0?"true":"false","data-mouse-dragging":sn?"true":"false",onPointerDown:Er,onPointerMove:Mr,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:Me,children:r.jsx("div",{ref:De,className:`${e}-lightbox-strip-track`,style:{gap:E},children:en.map((p,P)=>{const j=p.image.objectFit??"contain",he=P%t.length,Ie=Math.floor(P/t.length),Be=jo(E),ct=`calc(-0.5 * (${Be} + ${E}))`;return r.jsxs("div",{ref:St=>lt.current[P]=St,className:`${e}-strip-item`,style:{height:F==="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:j}}),o&&he<t.length-1&&Ie===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ct,width:Be,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ie}-${p.image.url}-${he}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":Nt?"true":"false",style:Ft,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:Y,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${le?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||w)&&r.jsx("div",{className:`${e}-header ${le?`${e}-header-two-row`:`${e}-header-single-row`}`,children:le?$t():Se||w?ut():null})})})]}),t.length>1&&M==="on"&&(()=>{const p=jo(_),P=`calc(-0.5 * (${_} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:_},children:r.jsx("div",{ref:et,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:j=>j.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":C,style:{gap:H,"--thumbnail-active-color":J},children:[t.map((j,he)=>{const Ie=jo(H),Be=`calc(-0.5 * (${Ie} + ${H}))`;return r.jsxs("div",{ref:ct=>{dt.current[he]=ct},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":N===he?"true":"false",onClick:()=>re&&L==="click"&&Sn(he),onMouseEnter:()=>Pe&&L==="hover"&&Sn(he),"aria-label":j.image.name?`View ${j.image.name}`:`View image ${he+1}`,"aria-current":N===he?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${ve?` ${e}-thumb-image-cover`:""}`,src:j.image.url,alt:"",draggable:!1,style:{...we,maxWidth:z,maxHeight:z,width:A.display==="cover"?"auto":"100%",height:"auto",objectFit:A.display==="cover"?"cover":"contain"}})}),o&&he<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Be,width:Ie,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${j.image.url}-${he}`)}),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:P,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Rf(e){return`
13039
+ `;function Hn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Us={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Kh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Uh={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:Hn("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:{...Us.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:{...Us.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:Hn("Question Padding Left"),questionPaddingTop:Hn("Question Padding Top"),questionPaddingBottom:Hn("Question Padding Bottom"),answerPaddingLeft:Hn("Answer Padding Left"),answerPaddingRight:Hn("Answer Padding Right"),answerPaddingTop:Hn("Answer Padding Top"),answerPaddingBottom:Hn("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:[...Kh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Xh={element:Gh,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:Uh,sourceCode:qh},Fn=e=>e.display==="cover",Lr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Xs=100,Yh=.2,Ys=8,pc=({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"?Xs:Math.max(Xs,window.innerHeight*Yh),[]),x=a.useCallback(h=>Math.max(0,1-h/(m*1.5)),[m]),b=a.useCallback(h=>Math.max(0,1-h/(m*.45)),[m]),T=a.useCallback(h=>{const S=typeof window<"u"?window.innerHeight:800,k=Math.max(.88,1-h/S*.12);return`translateY(${h}px) scale(${k})`},[]),f=a.useCallback(()=>{c.current=null},[]),L=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),f()},[n,f]),$=a.useCallback(()=>{const h=typeof window<"u"?window.innerHeight:800;d(!0),s(h),window.setTimeout(()=>{t(),f(),d(!1)},Math.min(n,200))},[n,t,f]),R=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]),P=a.useCallback(h=>{const S=c.current;if(!e||!S||h.pointerType!=="touch"||S.pointerId!==h.pointerId)return;const k=h.clientX-S.startX,D=h.clientY-S.startY;if(S.isLocked===null){if(Math.abs(k)<Ys&&Math.abs(D)<Ys)return;if(D>0&&D>Math.abs(k))S.isLocked=!0,h.currentTarget.setPointerCapture(h.pointerId);else{S.isLocked=!1,f();return}}if(!S.isLocked)return;h.preventDefault();const U=Math.max(0,D);u.current=U,s(U)},[e,f]),C=a.useCallback(h=>{const S=c.current;if(!e||!S||h.pointerType!=="touch"||S.pointerId!==h.pointerId)return;const k=S.isLocked===!0;if(h.currentTarget.hasPointerCapture(h.pointerId)&&h.currentTarget.releasePointerCapture(h.pointerId),!k){f();return}h.clientY-S.startY>=m?$():L()},[m,$,e,f,L]),X=a.useCallback(h=>{C(h)},[C]),E=a.useCallback(h=>{C(h)},[C]),B=o>0,I=l?`transform ${n}ms ease`:"none",w=l?`opacity ${n}ms ease`:"none",W=o>0||l;return{isSwipeDragging:B,backdropStyle:{opacity:x(o),transition:w},mediaAreaStyle:{transform:T(o),transition:I,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:W?{opacity:b(o),transition:w}:void 0,swipeHandlers:e?{onPointerDown:R,onPointerMove:P,onPointerUp:X,onPointerCancel:E}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},Zh="[data-lightbox-scrollable]",mc=()=>{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(Zh)||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({top:e,left:0,behavior:"instant"})}},[])},Jh=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Qh=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},ef=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},tf=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(f,L)=>{Qh(t),e.scrollLeft=f,L&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,x=0;const b=()=>{t.removeEventListener("transitionend",T),clearTimeout(x)},T=f=>{f.target!==t||f.propertyName!=="transform"||m||(m=!0,b(),u(n,!0))};return t.addEventListener("transitionend",T),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{m||(m=!0,b(),u(n,!0))},i+64),()=>{m||(m=!0,b(),u(l-ef(t),!1))}},io=300,nf=900,of=1500,rf="cubic-bezier(0.16, 1, 0.3, 1)",af=3e3,sf=2,lf=16,cf=.05,df=1,Oo=.3,uf=50,pf=20,xi=.004,Hi=["title1","title2","title3"],mf={title1:"1",title2:"2",title3:"3"},gf={title1:"title1Color",title2:"title2Color",title3:"title3Color"},hf={title1:.02,title2:.02,title3:.02},zo=e=>`max(${e}, ${pf}px)`,ff=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]}},yf=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=ff(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Ht=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,vf=e=>[Ht(e,"fontFamily"),Ht(e,"fontSettings"),{type:"row",items:[Ht(e,"fontSize"),Ht(e,"lineHeight"),Ht(e,"letterSpacing"),Ht(e,"wordSpacing")]},Ht(e,"textAlign"),Ht(e,"textAppearance")],xf=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Hi.map(e=>[mf[e],vf(e)]))}),Ua=(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},gc=(e,t)=>Ua(e,t),Bo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Zs=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ua(e.length,n),effective:gc(e.length,n)}},bf=(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},Xr=(e,t)=>{const n=i=>{const o=Ht(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[gf[t]]}},wf=(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),Yr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??hf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},Sf=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:x,closeIcon:b,closeIconMaxWidth:T,closeIconColor:f,closeIconHoverColor:L,thumbnailTrigger:$,thumbnailVisibility:R,thumbnailObjectFit:P,thumbnailActive:C,thumbnailActiveColor:X,title1Width:E,title2Width:B,title3Width:I,title1MarginLeft:w=0,title2MarginLeft:W=0,title3MarginLeft:h=0,titleRowMarginBottom:S=0,titleHeaderLayout:k="desktop",contentMarginTop:D,iconMarginLeft:U}=n,ae=p=>y.scalingValue(p,i??!1),Y=c??n.thumnailSize??.03,G=ae(Y),H=ae(u),F=ae(m??.02),A=ae(x??0),K=ae(D??0),q=zo(K),ee=ae(U??0),[N,ue]=a.useState(0),v=a.useRef(N);v.current=N;const ye=t[N],{title1:Z,title2:ce,title3:$e}=yf(ye),ne=Yr("title1",Xr(n,"title1"),i),ve=Yr("title2",Xr(n,"title2"),i),J=Yr("title3",Xr(n,"title3"),i),pe=k==="mobile",he=!o&&(!i||s),Ae=he,be=he,We=he,Q=Fn(P),le=Q?{"--image-aspect-ratio":Lr(P)}:void 0,xe=!!(Z||ce||$e),O=a.useMemo(()=>bf(e,Z,ce,$e,ne,ve,J),[e,N,Z,ce,$e,ne,ve,J]),se=a.useMemo(()=>({title1Width:E,title2Width:B,title3Width:I}),[E,B,I]),fe=a.useMemo(()=>O.map(p=>se[p.widthKey]),[O,se]),Se=a.useMemo(()=>Ua(O.length,fe),[O.length,fe]),Ie=a.useMemo(()=>gc(O.length,fe),[O.length,fe]),we=a.useMemo(()=>O.filter(p=>p.prefix==="title1"),[O]),_=a.useMemo(()=>O.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[O]),de=a.useMemo(()=>Zs(we,se),[we,se]),oe=a.useMemo(()=>Zs(_,se),[_,se]),z=a.useCallback((p,M)=>{const V=O.indexOf(p);if(!pe||M==="single-row")return{effectiveWidth:Ie[V]??0,resolvedWidth:Se[V]??0,maxWidth:Bo(V,Se)};if(M==="two-row-top"){const Te=we.indexOf(p);return{effectiveWidth:de.effective[Te]??0,resolvedWidth:de.resolved[Te]??0,maxWidth:Bo(Te,de.resolved)}}const ge=_.indexOf(p);return{effectiveWidth:oe.effective[ge]??0,resolvedWidth:oe.resolved[ge]??0,maxWidth:Bo(ge,oe.resolved)}},[_,oe,Ie,Se,O,we,de,pe]),re=a.useCallback(p=>y.scalingValue(p,i??!1),[i]),ke=re(S??0),ie=a.useMemo(()=>({title1MarginLeft:w,title2MarginLeft:W,title3MarginLeft:h}),[w,W,h]),j=a.useCallback(p=>O.slice(0,p+1).reduce((M,V,ge)=>M+(V!=null&&V.marginLeftKey?ie[V.marginLeftKey]??0:0)+(Se[ge]??0),0)+(pe?0:w??0),[O,ie,Se,pe,w]),Ne=a.useCallback(()=>pe?0:w??0,[pe,w]),Me=a.useCallback(p=>_.slice(0,p).reduce((M,V,ge)=>M+(V.marginLeftKey?ie[V.marginLeftKey]??0:0)+(oe.resolved[ge]??0),0),[_,oe.resolved,ie]),et=a.useCallback(p=>{const M=_[p];return Me(p)+(M.marginLeftKey?ie[M.marginLeftKey]??0:0)+(oe.resolved[p]??0)},[_,oe.resolved,Me,ie]),Ye=(p,M)=>{const V=p.marginLeftKey?ie[p.marginLeftKey]??0:0,{effectiveWidth:ge,resolvedWidth:Te,maxWidth:je}=z(p,M),at=o&&M==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...M==="single-row"?{gridArea:p.prefix}:{},width:re(ge),...V>0?{marginLeft:re(V)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),at&&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:re(-V),width:`max(${re(V)}, 10px)`,height:"100%",pointerEvents:"auto"}}),at&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(je),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:re(-xi/2),width:re(xi),height:"100%",pointerEvents:"auto"}})]},p.className)},lt=()=>{const p=pe?-1:O.findIndex(ge=>ge.prefix==="title1"),M=!pe&&(o||(w??0)>0)?(()=>{const ge=w??0,Te=p>=0?Se[p]:E??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(${re(ge)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,V=O.flatMap((ge,Te)=>{if(!ge.marginLeftKey)return[];const je=ie[ge.marginLeftKey]??0,at=wf(O,Se,ie,Te)+Ne();return r.jsx("div",{"data-controls":ge.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Se[Te]),style:{position:"absolute",top:0,left:re(at),width:`max(${re(je)}, 10px)`,height:"100%",pointerEvents:"auto"}},ge.marginLeftKey)});return M?[M,...V]:V},mt=()=>O.map((p,M)=>{const V=Bo(M,Se),Te=j(M)-xi/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(V),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:re(Te),width:re(xi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),De=()=>_.flatMap((p,M)=>{if(!p.marginLeftKey)return[];const V=ie[p.marginLeftKey]??0,ge=Me(M),{resolvedWidth:Te}=z(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:re(ge),width:`max(${re(V)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),ot=()=>_.map((p,M)=>{const{maxWidth:V}=z(p,"two-row-bottom"),Te=et(M)-xi/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(V),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:re(Te),width:re(xi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),$t=a.useRef(null),rt=a.useRef(null),Ue=a.useRef(null),ht=a.useRef(null),xt=a.useRef([]),dt=a.useRef([]),kt=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),Mt=t.length>1&&(!o||!!s),Dt=Mt?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),Oe=a.useRef(!1),Ke=a.useRef(!1),He=a.useRef(null),ze=a.useRef(null),ut=Ae&&!Kt,_e=a.useCallback(()=>{Ae&&(ft(!0),ze.current&&clearTimeout(ze.current),ze.current=setTimeout(()=>{Qe.current.isActive||ft(!1)},af))},[Ae]),Je=a.useCallback(()=>{o||Ke.current||(Ke.current=!0,Ut(!1),He.current=setTimeout(()=>{l()},io))},[o,l]),tt=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":ut?"true":"false",style:{width:y.scalingValue(T??0,i),height:y.scalingValue(T??0,i),marginRight:ee,"--close-icon-hover-color":L},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Je,"aria-label":"Close",children:r.jsx(rn,{url:b,fill:f,hoverFill:i&&!s?f:L,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"}})]}),Wt=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:re(w??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Ct=()=>{const p=O.find(ge=>ge.prefix==="title1"),M=O.filter(ge=>ge.prefix==="title2"||ge.prefix==="title3"),V=M.length>0||o||(S??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(w??0)>0||o?Wt():null,p&&Ye(p,"two-row-top"),b&&tt()]}),V?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[M.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[M.map(ge=>Ye(ge,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[De(),ot()]})]}):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:ke,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},st=()=>r.jsxs(r.Fragment,{children:[(w??0)>0||o?Wt("single-row"):null,O.map(p=>Ye(p,"single-row")),o?r.jsxs(r.Fragment,{children:[lt(),mt()]}):null,b?tt():null]}),Nt=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Vt,mediaAreaStyle:zt,overlayContentStyle:Pt,swipeHandlers:Qt,dismissAreaStyle:wt}=pc({enabled:he??!1,onClose:Je,animMs:io,isBlockedTarget:Nt}),Gt=()=>{if(!Mt||t.length===0)return kt.current=0,0;const p=dt.current[0],M=dt.current[t.length];if(!p||!M)return kt.current;const V=M.offsetLeft-p.offsetLeft;return V>0&&(kt.current=V),kt.current},pt=(p=!1)=>{if(!Mt)return;const M=rt.current,V=Gt();!M||V<=0||V<M.clientWidth*.25||(M.scrollLeft<=0?(M.scrollLeft+=V,p&&(Qe.current.scrollLeft+=V),It.current&&(Pe.current+=V)):M.scrollLeft>=V*2&&(M.scrollLeft-=V,p&&(Qe.current.scrollLeft-=V),It.current&&(Pe.current-=V)))},Ft=(p,M=(V=>(V=rt.current)==null?void 0:V.scrollLeft)()??0)=>{if(!Mt)return p;let ge=t.length+p,Te=1/0;for(let je=0;je<Dt;je++){const at=je*t.length+p,yt=dt.current[at];if(!yt)continue;const tn=Math.abs(yt.offsetLeft-M);tn<Te&&(Te=tn,ge=at)}return ge},Bt=p=>{const M=rt.current;return!p||!M?!1:p.offsetWidth>M.clientWidth+1},g=p=>{const M=rt.current;if(!p||!M||!Bt(p))return!1;const V=p.offsetLeft,ge=V+p.offsetWidth;return M.scrollLeft>=V-1&&M.scrollLeft+M.clientWidth<=ge+1},me=(p=(M=>(M=rt.current)==null?void 0:M.scrollLeft)()??0)=>{for(let ge=0;ge<dt.current.length;ge+=1){const Te=dt.current[ge];if(Te&&g(Te))return ge}let V={flatIndex:0,distance:1/0};return dt.current.forEach((ge,Te)=>{if(!ge)return;const je=Math.abs(ge.offsetLeft-p);je<V.distance&&(V={flatIndex:Te,distance:je})}),V.flatIndex},Re=p=>{rt.current&&dt.current.forEach(M=>{M&&(M.style.scrollSnapAlign=Bt(M)&&p==="backward"?"end":"start")})},Le=(p,M,V)=>{const ge=p-M,Te=me(M),je=dt.current[Te];if(g(je))return me(p)%t.length;const at=dt.current[Te+1],yt=je?at?at.offsetLeft-je.offsetLeft:je.offsetWidth:0,tn=yt>0?ge>yt*Oo?1:ge<-yt*Oo?-1:0:0;return tn===0?V:Mt?(V+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,V+tn))},Ze=a.useCallback((p=!1)=>{if(R!=="on"||o)return;const M=ht.current,V=v.current,ge=xt.current[V];if(!M||!ge||M.scrollWidth<=M.clientWidth)return;const Te=M.scrollLeft,je=Te+M.clientWidth,at=ge.offsetLeft,yt=at+ge.offsetWidth;if(at>=Te&&yt<=je)return;const tn=M.scrollWidth-M.clientWidth;let Yt=Te;if(!p&&Jt.current===null){const yi=xt.current[V-1],qi=xt.current[V+1],Eo=yi?ge.offsetLeft-yi.offsetLeft:qi?qi.offsetLeft-ge.offsetLeft:ge.offsetWidth;yt>je?Yt+=Eo:at<Te&&(Yt-=Eo)}else yt>je?Yt=yt-M.clientWidth:Yt=at;M.scrollLeft=Math.max(0,Math.min(tn,Yt))},[o,R]),Et=a.useCallback((p=!1)=>{p&&(Oe.current=!0),Ce.current===null&&(Ce.current=requestAnimationFrame(()=>{Ce.current=null;const M=Oe.current;Oe.current=!1,Ze(M)}))},[Ze]),Ve=a.useCallback(p=>{if(p===v.current)return;const M=v.current;v.current=p;const V=Math.abs(p-M)>1,ge=Mt&&t.length>1&&(M===t.length-1&&p===0||M===0&&p===t.length-1);ue(p),Et(V||ge)},[t.length,Mt,Et]),it=()=>{if(!rt.current||t.length===0||Jt.current!==null||Qe.current.isActive&&Qe.current.hasMoved)return;const p=rt.current.scrollLeft,M=me(p)%t.length;M!==v.current&&Ve(M)},jt=()=>{Jt.current=null},St=p=>{const M=rt.current;M&&(M.style.scrollSnapType=p?"":"none")},cn=()=>{var p;(p=Lt.current)==null||p.call(Lt),Lt.current=null},un=()=>{gt.current!==null&&(cancelAnimationFrame(gt.current),gt.current=null),It.current=!1},Jn=()=>{const p=rt.current;if(!p){gt.current=null,It.current=!1;return}const M=Pe.current-p.scrollLeft;if(Math.abs(M)<.5){p.scrollLeft=Pe.current,pt(),it(),gt.current=null,It.current=!1;return}p.scrollLeft+=M*cf,pt(),it(),_e(),gt.current=requestAnimationFrame(Jn)},Qn=()=>{const p=Ue.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},To=(p,M,V,ge)=>{Qn(),p.scrollLeft=M,Ge.current=p.scrollLeft,pt(),V!==void 0?(v.current=V,ue(V)):it(),St(!0),ge==null||ge()},Lo=(p,{behavior:M="smooth",activeIndex:V,onComplete:ge}={})=>{const Te=rt.current,je=Ue.current;if(!Te||!je)return;if(un(),cn(),St(!1),M==="auto"){To(Te,p,V,ge);return}const at=Math.abs(p-Te.scrollLeft),yt=Jh(at,nf,of,Te.clientWidth*.55);Lt.current=tf(Te,je,p,{duration:yt,easing:rf,onComplete:()=>{Lt.current=null,To(Te,p,V,ge)}})},Rr=(p="smooth")=>{const M=rt.current;if(!M||t.length===0)return;const V=me()%t.length,ge=Ft(V,M.scrollLeft),Te=dt.current[ge];Te&&Lo(Te.offsetLeft,{behavior:p,activeIndex:V})},Er=(p,M="smooth",V,ge)=>{const Te=rt.current;if(!Te||t.length===0)return;const je=(ge??Te.scrollLeft)-p,at=me(p),yt=dt.current[at];if(g(yt)){St(!0),it();return}const tn=dt.current[at+1],Yt=yt?tn?tn.offsetLeft-yt.offsetLeft:yt.offsetWidth:0;if((Yt>0?je>Yt*Oo?1:je<-Yt*Oo?-1:0:0)!==0){const bc=V??at%t.length,wc=Le(ge??Te.scrollLeft,p,bc);Sn(wc,M);return}const qi=ge??Te.scrollLeft,Eo=me(qi),Xa=dt.current[Eo];if(Xa&&Math.abs(Xa.offsetLeft-qi)<1){St(!0),it();return}Rr("auto")},Sn=(p,M="smooth")=>{const V=rt.current;if(!V||t.length===0)return;const ge=Ft(p,V.scrollLeft),Te=dt.current[ge];Te&&(M==="smooth"?Jt.current=p:Jt.current=null,v.current=p,ue(p),Et(!0),Lo(Te.offsetLeft,{behavior:M,activeIndex:p,onComplete:M==="smooth"?jt:void 0}))},fi=()=>{Tt.current&&(window.removeEventListener("pointerup",Tt.current),window.removeEventListener("pointercancel",Tt.current),Tt.current=null)},Io=(p,M,V,ge,Te)=>{const je=V-p,at=ge-M,yt=Math.abs(je),tn=Math.abs(at);if(yt<uf||yt<=tn)return!1;const Yt=je<0?1:-1,yi=Mt?(Te+Yt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Te+Yt));return yi===Te?!1:(Sn(yi),!0)},ei=p=>{if(!Qe.current.isActive)return;fi();const M=rt.current;if(!M)return;const{scrollLeft:V,startActiveIndex:ge,hasMoved:Te}=Qe.current,je=M.scrollLeft;pt(!0),Qe.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},bt(!1),p!==void 0&&M.hasPointerCapture(p)&&M.releasePointerCapture(p),Te?Er(V,"smooth",ge,je):(St(!0),it()),_e()},Ro=(p,M)=>{const V=_t.current;_t.current=null,V&&(Io(V.startX,V.startY,p,M,V.startActiveIndex),_e())},kr=p=>{if(!be)return;if(p.pointerType==="touch"){if(un(),St(!0),Nt(p.target))return;_t.current={startX:p.clientX,startY:p.clientY,startActiveIndex:v.current};return}if(p.pointerType!=="mouse"||p.button!==0||Nt(p.target))return;const M=rt.current;if(!M)return;un(),cn(),Qn(),Jt.current=null,Qe.current={isActive:!0,startX:p.clientX,scrollLeft:M.scrollLeft,startActiveIndex:v.current,hasMoved:!1},St(!1),_e(),M.setPointerCapture(p.pointerId),fi();const V=ge=>{ge.pointerType==="mouse"&&ei(ge.pointerId)};Tt.current=V,window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V)},Mr=p=>{if(!be||p.pointerType!=="mouse")return;const M=rt.current;if(!M||!Qe.current.isActive)return;if(p.buttons===0){ei(p.pointerId);return}const V=p.clientX-Qe.current.startX;Math.abs(V)>df&&(Qe.current.hasMoved=!0,bt(!0)),Qe.current.hasMoved&&(p.preventDefault(),M.scrollLeft=Qe.current.scrollLeft-V,pt(!0),it(),_e())},te=p=>{if(be){if(p.pointerType==="touch"){p.type==="pointerup"?Ro(p.clientX,p.clientY):_t.current=null;return}p.pointerType==="mouse"&&ei(p.pointerId)}},Ee=p=>{!be||p.pointerType!=="mouse"||ei(p.pointerId)};return mc(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Ut(!0));return()=>{cancelAnimationFrame(p),cn(),fi(),Ce.current!==null&&(cancelAnimationFrame(Ce.current),Ce.current=null),He.current&&clearTimeout(He.current),ze.current&&clearTimeout(ze.current)}},[]),a.useEffect(()=>{if(!Ae){ft(!0);return}_e();const p=$t.current;if(!p)return;const M=()=>_e();return p.addEventListener("pointermove",M),p.addEventListener("pointerdown",M),()=>{p.removeEventListener("pointermove",M),p.removeEventListener("pointerdown",M),ze.current&&clearTimeout(ze.current)}},[Ae,_e]),a.useEffect(()=>{const p=M=>{M.key==="Escape"&&Je()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Je]),a.useLayoutEffect(()=>{Gt()},[A,t.length,Mt]),a.useLayoutEffect(()=>{o||Sn(v.current,"auto")},[A,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,Mt]),a.useEffect(()=>{const p=rt.current;if(!p||o||!he)return;const M=V=>{if(V.preventDefault(),Math.abs(V.deltaY)<=Math.abs(V.deltaX))return;const ge=V.deltaMode===1?lf:V.deltaMode===2?p.clientHeight:1,Te=V.deltaY*ge*sf;if(Te!==0){if(cn(),It.current||(It.current=!0,Pe.current=p.scrollLeft,Jt.current=null,St(!1)),Pe.current+=Te,!Mt){const je=p.scrollWidth-p.clientWidth;Pe.current=Math.max(0,Math.min(je,Pe.current))}_e(),gt.current===null&&(gt.current=requestAnimationFrame(Jn))}};return p.addEventListener("wheel",M,{passive:!1}),()=>{p.removeEventListener("wheel",M),un()}},[o,he,Mt]),a.useEffect(()=>{const p=rt.current;if(!p)return;const M=()=>{pt(Qe.current.isActive);const ge=p.scrollLeft,Te=ge-Ge.current;Ge.current=ge;const je=kt.current>0?kt.current*.5:1/0;if(Te!==0&&Math.abs(Te)<je){const at=Te>0?"forward":"backward";at!==qe.current&&(qe.current=at,Re(at))}Qe.current.isActive&&Qe.current.hasMoved||it()};p.addEventListener("scroll",M,{passive:!0});const V=new ResizeObserver(()=>{Gt(),pt(Qe.current.isActive),Re(qe.current),it()});return V.observe(p),()=>{cn(),p.removeEventListener("scroll",M),V.disconnect()}},[t.length,Mt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Je()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Rt?1:0,transition:`opacity ${io}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,...Qt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:zt,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:rt,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":be&&t.length>0?"true":"false","data-mouse-dragging":on?"true":"false",onPointerDown:kr,onPointerMove:Mr,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:Ee,children:r.jsx("div",{ref:Ue,className:`${e}-lightbox-strip-track`,style:{gap:A},children:en.map((p,M)=>{const V=p.image.objectFit??"contain",ge=M%t.length,Te=Math.floor(M/t.length),je=zo(A),at=`calc(-0.5 * (${je} + ${A}))`;return r.jsxs("div",{ref:yt=>dt.current[M]=yt,className:`${e}-strip-item`,style:{height:k==="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:V}}),o&&ge<t.length-1&&Te===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:at,width:je,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Te}-${p.image.url}-${ge}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":ut?"true":"false",style:Pt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:K,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:q,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${pe?` ${e}-lightbox-content-area-stacked`:""}`,children:(xe||b)&&r.jsx("div",{className:`${e}-header ${pe?`${e}-header-two-row`:`${e}-header-single-row`}`,children:pe?Ct():xe||b?st():null})})})]}),t.length>1&&R==="on"&&(()=>{const p=zo(F),M=`calc(-0.5 * (${F} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:F},children:r.jsx("div",{ref:ht,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:V=>V.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":C,style:{gap:H,"--thumbnail-active-color":X},children:[t.map((V,ge)=>{const Te=zo(H),je=`calc(-0.5 * (${Te} + ${H}))`;return r.jsxs("div",{ref:at=>{xt.current[ge]=at},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":N===ge?"true":"false",onClick:()=>he&&$==="click"&&Sn(ge),onMouseEnter:()=>We&&$==="hover"&&Sn(ge),"aria-label":V.image.name?`View ${V.image.name}`:`View image ${ge+1}`,"aria-current":N===ge?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Q?` ${e}-thumb-image-cover`:""}`,src:V.image.url,alt:"",draggable:!1,style:{...le,maxWidth:G,maxHeight:G,width:P.display==="cover"?"auto":"100%",height:"auto",objectFit:P.display==="cover"?"cover":"contain"}})}),o&&ge<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:je,width:Te,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${V.image.url}-${ge}`)}),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:M,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function $f(e){return`
13100
13040
  .${e}-wrapper {
13101
13041
  position: relative;
13102
13042
  width: 100%;
@@ -13493,7 +13433,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
13493
13433
  pointer-events: auto;
13494
13434
  z-index: 10;
13495
13435
  }
13496
- `}const Ef=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l})=>{const{prefix:s}=v.useScopedStyles(),{cover:c,coverFit:d}=e,u=a.useRef(null),[m,x]=a.useState(!1),w=t??[],$=m&&w.length>0,f=()=>{w.length!==0&&x(!0)};return a.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:u,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Rf(s)}}),c&&r.jsx("div",{className:`${s}-cover ${Fn(d)?`${s}-ratio-wrapper-cover`:`${s}-ratio-wrapper-fit`}`,onClick:()=>f(),style:{...Fn(d)?{"--image-aspect-ratio":Tr(d)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${s}-cover-image ${Fn(d)?`${s}-cover-image-cover`:`${s}-cover-image-fit`}`,src:c,alt:"cover"})})]}),$&&typeof document<"u"&&(()=>{const S=(l?document.getElementById(l):null)??document.body;return gi.createPortal(r.jsx(If,{prefix:s,images:w,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),S)})()]})},Mf=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
13436
+ `}const Cf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:l}=y.useScopedStyles(),{cover:d,coverFit:c}=e,u=a.useRef(null),[m,x]=a.useState(!1),b=t??[],T=m&&b.length>0,f=()=>{b.length!==0&&x(!0)};return a.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$f(l)}}),d&&r.jsx("div",{className:`${l}-cover ${Fn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>f(),style:{...Fn(c)?{"--image-aspect-ratio":Lr(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${l}-cover-image ${Fn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),T&&typeof document<"u"&&(()=>{const L=(s?document.getElementById(s):null)??document.body;return gi.createPortal(r.jsx(Sf,{prefix:l,images:b,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),L)})()]})},Tf=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
13497
13437
  import { createPortal } from 'react-dom';
13498
13438
  import { CommonComponentProps } from '../props';
13499
13439
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -14051,7 +13991,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
14051
13991
  </>
14052
13992
  );
14053
13993
  };
14054
- `,kf="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 Pf(e){const t={};return t[Wt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Wt(e,"fontSettings")]={...ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Wt(e,"fontSize")]={...ai.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Wt(e,"lineHeight")]={...ai.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Wt(e,"letterSpacing")]={...ai.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Wt(e,"wordSpacing")]={...ai.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Wt(e,"textAlign")]={...ai.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Wt(e,"textAppearance")]={...ai.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Af=Oi.reduce((e,t)=>({...e,...Pf(t)}),{}),Ff=Oi.reduce((e,t)=>({...e,[Wt(t,"fontFamily")]:"Goudy Bookletter 1911",[Wt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Wt(t,"letterSpacing")]:0,[Wt(t,"wordSpacing")]:0,[Wt(t,"textAlign")]:"left",[Wt(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[Wt(n,"fontSize")]=i),o!==void 0&&(t[Wt(n,"lineHeight")]=o),t},{})}const Wf=Cf(),_f={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",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","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",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:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Af,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/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:kf,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Ff},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...Yr({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,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...Yr({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,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...Yr({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:[Wf]}],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/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Hf={element:Ef,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:_f,sourceCode:Mf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Oi.map(e=>({path:`${Wt(e,"fontFamily")}`}))]},fontRelations:{...Oi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Wt(t,"fontFamily")}`}),{})}},Nf=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,initialSlideIndex:s=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:m})=>{const{type:x,coverFit:w,backgroundColor:$,imageGap:f,maxWidth:S,maxHeight:L,textTransition:M,title1Width:A,title2Width:C,title3Width:J,title1MarginLeft:k=0,title2MarginLeft:U=0,title3MarginLeft:I=0,titleRowMarginBottom:R=0,titleHeaderLayout:T="single-row",countCloseGap:y=0,closeIcon:h,closeIconMaxWidth:F,closeIconColor:W,closeIconHoverColor:V,contentMarginTop:ne=0,iconMarginRight:X=0}=n,z=a.useCallback(te=>v.scalingValue(te,i??!1),[i]),H=z(f??0),_=`${S}%`,E=`${L}%`,q=z(y),Y=z(ne),ee=z(X),N=ci("title1",si(n,"title1"),i),pe=ci("title2",si(n,"title2"),i),b=ci("title3",si(n,"title3"),i),ye=ci("count",si(n,"count"),i),Q=T==="mobile",xe=!i||!!l,$e=!o&&(!i||!!l),oe=a.useMemo(()=>Xo(t,x),[t,x]),[ie,B]=a.useState(s),le=oe[ie],re=le==null?void 0:le.entry,[ke,fe]=a.useState(!1),[Pe,ve]=a.useState(null),[we,Se]=a.useState(!1),[G,me]=a.useState(null),[D,K]=a.useState(!1),[ae,ge]=a.useState(0),[ce,be]=a.useState(),[Ee,Z]=a.useState(),[de,We]=a.useState(null),se=a.useRef(null),O=a.useRef(0),Oe=a.useRef(0),_e=a.useRef(0),nt=a.useRef(!1),Ue=a.useRef(null),Ce=a.useRef(null),Fe=a.useRef(null),He=a.useRef(null),Ze=a.useRef(null),Tt=a.useRef(null),it=a.useRef(null),De=a.useCallback(()=>{const te=Ce.current;if(!te)return;const Me=te.closest(`.${e}-lightbox-content-area`);if(!Me)return te.getBoundingClientRect().width;const p=Array.from(Me.children).reduce((P,j)=>!(j instanceof HTMLElement)||j.contains(te)?P:P+j.getBoundingClientRect().width,0);return Me.getBoundingClientRect().width-p},[e]),et=a.useCallback(()=>{se.current&&(clearTimeout(se.current),se.current=null)},[]),dt=a.useCallback(te=>{te===O.current&&(me(null),K(!1))},[]),lt=a.useCallback(()=>{o||nt.current||(nt.current=!0,u==null||u(),fe(!1),Ue.current=setTimeout(()=>{m()},300))},[o,u,m]),ht=a.useCallback(te=>!!(te.closest("[data-controls]")||te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Rt,backdropStyle:ot,mediaAreaStyle:xt,overlayContentStyle:zt,swipeHandlers:rt,dismissAreaStyle:qe}=hc({enabled:$e,onClose:lt,animMs:300,isBlockedTarget:ht}),Ne=a.useCallback(te=>{c&&Zs(te+1,d,!0)},[c,d]),pt=a.useCallback(te=>{if(te)return te.getBoundingClientRect().height},[]),yt=a.useCallback(te=>{if(oe.length===0)return;const Me=(te%oe.length+oe.length)%oe.length;if(Me===ie)return;const p=oe[ie],P=oe[Me];O.current+=1;const j=O.current,he=M==="fade"&&Il(p==null?void 0:p.entry)!==Il(P==null?void 0:P.entry),Ie=pt(Fe.current),Be=he?(()=>{const St=De();gi.flushSync(()=>{We(P.entry)}),Fe.current&&St&&(Fe.current.style.width=`${St}px`);const tn=pt(Fe.current);return Fe.current&&(Fe.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:St}})():void 0,ct=Math.max(Ie??0,(Be==null?void 0:Be.measuredIncomingTitlesHeight)??0)||void 0;ge(j),me(ie),K(!0),B(Me),Ne(Me),_e.current=Me,he?(et(),ct&&be(ct),Be!=null&&Be.incomingTitlesMeasureWidth&&Z(Be.incomingTitlesMeasureWidth),ve((p==null?void 0:p.entryIndex)??null),Se(!0),Oe.current=P.entryIndex,se.current=setTimeout(()=>{ve(null),Se(!1),be(void 0),Z(void 0),We(null),se.current=null},400)):(et(),ve(null),Se(!1),be(void 0),Z(void 0),We(null),Oe.current=P.entryIndex)},[ie,et,De,pt,oe,Ne,M]),Mt=a.useCallback(()=>{it.current=null},[]),Dt=a.useCallback(te=>{!xe||oe.length<=1||te.pointerType==="mouse"&&te.button!==0||te.target.closest("[data-controls]")||(it.current={startX:te.clientX,startY:te.clientY,pointerId:te.pointerId})},[xe,oe.length]),en=a.useCallback(te=>{var St;if(!xe||oe.length<=1||te.pointerType==="mouse"&&te.button!==0)return;if(Rt){Mt();return}const Me=it.current;if(!Me||Me.pointerId!==te.pointerId||(Mt(),te.target.closest("[data-controls]")))return;const P=te.clientX-Me.startX,j=te.clientY-Me.startY,he=Math.abs(P),Ie=Math.abs(j);if(he>=Zm&&he>Ie){yt(P>0?ie-1:ie+1);return}if(he>$l||Ie>$l)return;const Be=(St=He.current)==null?void 0:St.getBoundingClientRect(),ct=Be?Be.left+Be.width/2:window.innerWidth/2;yt(te.clientX<ct?ie-1:ie+1)},[ie,xe,yt,Rt,Mt,oe.length]),sn=a.useCallback(te=>{const Me=it.current;(Me==null?void 0:Me.pointerId)===te.pointerId&&Mt()},[Mt]);fc(),a.useEffect(()=>{Tt.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const te=requestAnimationFrame(()=>{fe(!0),requestAnimationFrame(()=>{Ze.current?Ze.current.focus():He.current&&He.current.focus()})});return()=>{cancelAnimationFrame(te),Ue.current&&clearTimeout(Ue.current),se.current&&clearTimeout(se.current);const Me=Tt.current;Me&&document.contains(Me)&&Me.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var te;M!=="fade"&&(Oe.current=((te=oe[ie])==null?void 0:te.entryIndex)??0,et(),ve(null),Se(!1),be(void 0),Z(void 0))},[ie,et,oe,M]),a.useEffect(()=>{const te=Me=>{if(Me.key==="Escape"){lt();return}if(Me.key==="ArrowLeft"&&oe.length>1){yt(ie-1);return}if(Me.key==="ArrowRight"&&oe.length>1){yt(ie+1);return}if(Me.key==="Tab"&&He.current){const p=He.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),P=Array.from(p).filter(Be=>!Be.closest('[aria-hidden="true"]'));if(P.length===0)return;const j=P[0],he=P[P.length-1],Ie=document.activeElement;Me.shiftKey?(Ie===j||!He.current.contains(Ie))&&(Me.preventDefault(),he.focus()):(Ie===he||!He.current.contains(Ie))&&(Me.preventDefault(),j.focus())}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[yt,lt,ie,oe.length]),a.useLayoutEffect(()=>{et(),O.current=0,ge(0),me(null),K(!1),ve(null),Se(!1),be(void 0),Z(void 0),We(null),B(te=>{const Me=Math.max(0,oe.length-1);return Math.min(te,Me)})},[et,t.length,x,oe.length]),a.useLayoutEffect(()=>{var p;const te=Math.max(0,oe.length-1),Me=Math.min(Math.max(0,s),te);_e.current=Me,Oe.current=((p=oe[Me])==null?void 0:p.entryIndex)??0,B(Me)},[s]);const Lt=Pe!==null?t[Pe]:null,Et=G!==null?oe[G]:null,Qt=(re==null?void 0:re.title1)||(re==null?void 0:re.title2)||(re==null?void 0:re.title3)||(Lt==null?void 0:Lt.title1)||(Lt==null?void 0:Lt.title2)||(Lt==null?void 0:Lt.title3),Ut=rg(x,oe,t),ft=h!==null,qt=Qt||Ut||ft,Re=Ut&&ft?{gap:q}:void 0,Ve=`${e}-titles-stack${Q?` ${e}-titles-stack-stacked`:""}`,Xe=`${e}-titles-layer-out${Q?` ${e}-titles-layer-out-stacked`:""}`,ze=`${e}-titles-layer-out`,mt=(k??0)>0||o,Nt=z(R),Ae=a.useMemo(()=>({title1Width:A??Ri.title1Width,title2Width:C??Ri.title2Width,title3Width:J??Ri.title3Width}),[A,C,J]),Ye=a.useMemo(()=>({title2MarginLeft:U,title3MarginLeft:I}),[U,I]),Je=a.useMemo(()=>re?Vn(e,re,N,pe,b):[],[e,re,N,pe,b]),bt=a.useMemo(()=>Je.map(te=>Ae[te.widthKey]),[Je,Ae]),$t=a.useMemo(()=>Ai(Je.length,bt),[Je.length,bt]),ut=a.useMemo(()=>po(Je.length,bt),[Je.length,bt]),Pt=a.useMemo(()=>Je.filter(te=>te.prefix==="title1"),[Je]),At=a.useMemo(()=>Je.filter(te=>te.prefix==="title2"||te.prefix==="title3"),[Je]),Vt=a.useMemo(()=>Gn(Pt,Ae),[Pt,Ae]),Kt=a.useMemo(()=>Gn(At,Ae),[At,Ae]),Ft=a.useCallback((te,Me)=>{const p=Je.findIndex(j=>j.prefix===te.prefix);if(!Q||Me==="single-row")return{effectiveWidth:ut[p]??0,resolvedWidth:$t[p]??0,maxWidth:an(p,$t)};if(Me==="two-row-top"){const j=Pt.findIndex(he=>he.prefix===te.prefix);return{effectiveWidth:Vt.effective[j]??0,resolvedWidth:Vt.resolved[j]??0,maxWidth:an(j,Vt.resolved)}}const P=At.findIndex(j=>j.prefix===te.prefix);return{effectiveWidth:Kt.effective[P]??0,resolvedWidth:Kt.resolved[P]??0,maxWidth:an(P,Kt.resolved)}},[Je,At,Kt,ut,$t,Pt,Vt,Q]),Yt=a.useCallback(te=>tc(Je,$t,Ye,te)+(Q?0:k??0),[Je,$t,Ye,Q,k]),wt=a.useCallback(()=>Q?0:k??0,[Q,k]),Ot=a.useCallback(te=>At.slice(0,te).reduce((Me,p,P)=>Me+(p.marginLeftKey?Ye[p.marginLeftKey]??0:0)+(Kt.resolved[P]??0),0),[At,Kt.resolved,Ye]),jt=a.useCallback(te=>{const Me=At[te];return Ot(te)+(Me.marginLeftKey?Ye[Me.marginLeftKey]??0:0)+(Kt.resolved[te]??0)},[At,Kt.resolved,Ot,Ye]),Bt=a.useCallback((te,Me,p)=>{if(!Q||p==="single-row"){const Be=te.findIndex(Zt=>Zt.prefix===Me.prefix),ct=te.map(Zt=>Ae[Zt.widthKey]),St=Ai(te.length,ct);return{effectiveWidth:po(te.length,ct)[Be]??0,resolvedWidth:St[Be]??0,maxWidth:an(Be,St)}}if(p==="two-row-top"){const Be=te.filter(Zt=>Zt.prefix==="title1"),ct=Be.findIndex(Zt=>Zt.prefix===Me.prefix),{resolved:St,effective:tn}=Gn(Be,Ae);return{effectiveWidth:tn[ct]??0,resolvedWidth:St[ct]??0,maxWidth:an(ct,St)}}const P=te.filter(Be=>Be.prefix==="title2"||Be.prefix==="title3"),j=P.findIndex(Be=>Be.prefix===Me.prefix),{resolved:he,effective:Ie}=Gn(P,Ae);return{effectiveWidth:Ie[j]??0,resolvedWidth:he[j]??0,maxWidth:an(j,he)}},[Ae,Q]),vt=(te,Me,p)=>{const P=te.marginLeftKey?Ye[te.marginLeftKey]??0:0,{effectiveWidth:j,resolvedWidth:he,maxWidth:Ie}=p??Ft(te,Me),Be=Math.max(P,Dn),ct=o&&Me==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":te.prefix,style:{width:z(j),...P>0?{marginLeft:z(P)}:{}},children:[r.jsx("p",{className:te.className,style:te.style,children:te.text}),ct&&te.marginLeftKey?r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(he),style:{position:"absolute",top:0,left:z(-P),width:z(Be),height:"100%",pointerEvents:"auto"}}):null,ct?r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ie),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:z(-hn/2),width:z(hn),height:"100%",pointerEvents:"auto"}}):null]},te.className)},g=(te="two-row")=>{const Me=Je.findIndex(j=>j.prefix==="title1"),p=Me>=0?$t[Me]:Ae.title1Width,P=te==="two-row"&&o;return r.jsx("div",{...P?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:z(k??0),flexShrink:0,alignSelf:"stretch",...P?{pointerEvents:"auto"}:{}}})},ue=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:N,"aria-hidden":"true",children:" "}),Te=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ye,"aria-live":"polite","aria-atomic":"true",children:og(oe,ie,x,t)}),Le=()=>Ut?o&&ft?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Te(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${zr(q)} + ${q}))`,width:zr(q),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Te():null,tt=()=>!Ut&&!ft?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Re,children:[Le(),ft?st():null]}),kt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ut||Qt?ue():null,mt?g("single-row"):null,It(re),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),tt(),Sn()]}),Ke=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ut||Qt?ue():null,mt?g("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:we&&ce?{minHeight:ce}:void 0,children:[r.jsx("div",{ref:Fe,className:Ve,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(de||re)}),r.jsxs("div",{ref:Ce,className:Ve,style:{position:we?"absolute":"relative",inset:we?0:void 0,width:"100%",...we&&Ee?{width:Ee,maxWidth:"100%"}:void 0},children:[Lt&&we?r.jsx("div",{className:`${Xe} ${e}-titles-fade-out`,children:ei(Lt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ei(re)})]})]}),tt(),Sn()]}),st=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:v.scalingValue(F??0,i),height:v.scalingValue(F??0,i),marginRight:ee,"--close-icon-hover-color":V},children:[r.jsx("button",{ref:Ze,type:"button",className:`${e}-close-icon-inner`,onClick:lt,"aria-label":"Close",children:r.jsx(on,{url:h??"",fill:W,hoverFill:i&&!l?W:V,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"}})]}),_t=(te,Me)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Ut||Qt?ue():null,mt?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:te}):r.jsxs(r.Fragment,{children:[te,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),tt()]}),It=te=>{if(!te)return null;const Me=Vn(e,te,N,pe,b);return r.jsx(r.Fragment,{children:Me.map(p=>vt(p,"single-row",Bt(Me,p,"single-row")))})},cn=te=>{if(!te)return null;const Me=Vn(e,te,N,pe,b),p=Me.find(P=>P.prefix==="title1");return p?vt(p,"two-row-top",Bt(Me,p,"two-row-top")):null},un=(te,Me=!1)=>{const p=te?Vn(e,te,N,pe,b):[],P=p.filter(Ie=>Ie.prefix==="title2"||Ie.prefix==="title3"),j=o&&Me;return P.length>0||j||(R??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[P.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[P.map(Ie=>vt(Ie,"two-row-bottom",Bt(p,Ie,"two-row-bottom"))),Me&&o?r.jsxs(r.Fragment,{children:[Ir(),Rr()]}):null]}):null,(R??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:Nt,width:"100%",flexShrink:0,pointerEvents:j?"auto":"none"}}):null]}):null},Qn=(te,Me=!1)=>r.jsxs(r.Fragment,{children:[_t(cn(te)),un(te,Me)]}),ei=te=>Q?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Qn(te)}):te?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:It(te)}):null,To=()=>{const te=Q?-1:Je.findIndex(P=>P.prefix==="title1"),Me=!Q&&(o||(k??0)>0)?(()=>{const P=k??0,j=te>=0?$t[te]:Ae.title1Width,he=Math.max(P,Dn);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:z(he),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=Je.flatMap((P,j)=>{if(!P.marginLeftKey)return[];const he=Ye[P.marginLeftKey]??0,Ie=ec(Je,$t,Ye,j)+wt(),Be=Math.max(he,Dn);return r.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String($t[j]),style:{position:"absolute",top:0,left:z(Ie),width:z(Be),height:"100%",pointerEvents:"auto"}},P.marginLeftKey)});return Me?[Me,...p]:p},Lo=()=>Je.map((te,Me)=>{const p=an(Me,$t),j=Yt(Me)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.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:z(j),width:z(hn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Ir=()=>At.flatMap((te,Me)=>{if(!te.marginLeftKey)return[];const p=Ye[te.marginLeftKey]??0,P=Ot(Me),j=Math.max(p,Dn),{resolvedWidth:he}=Ft(te,"two-row-bottom");return r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(he),style:{position:"absolute",top:0,left:z(P),width:z(j),height:"100%",pointerEvents:"auto"}},te.marginLeftKey)}),Rr=()=>At.map((te,Me)=>{const{maxWidth:p}=Ft(te,"two-row-bottom"),j=jt(Me)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.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:z(j),width:z(hn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Sn=()=>!o||Q?null:r.jsxs(r.Fragment,{children:[To(),Lo()]}),fi=te=>{const Me=!te.objectFit&&Fn(w);return{className:`${e}-slide-image-cell${Me?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:_,maxHeight:E,...Me?{"--image-aspect-ratio":Tr(w)}:{}}}},Io=te=>te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":te.objectFit}}:Fn(w)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ti=te=>{if(te.length===0)return null;const Me=te.length>1,p=zr(H),P=`calc(-0.5 * (${p} + ${H}))`;if(te.length===1){const j=te[0];return r.jsx("div",{...fi(j),children:r.jsx("img",{...Io(j),src:j.url,alt:j.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Me?{gap:H}:void 0,children:te.map((j,he)=>r.jsxs("div",{...fi(j),children:[r.jsx("img",{...Io(j),src:j.url,alt:j.name??"",draggable:!1}),o&&Me&&he<te.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:P,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${j.url}-${he}`))})},Ro=!!(re!=null&&re.title2||re!=null&&re.title3||Lt!=null&&Lt.title2||Lt!=null&&Lt.title3||(R??0)>0||o),Er=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:Fe,className:Ve,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Qn(de||re)}),r.jsxs("div",{ref:Ce,className:`${e}-titles-row-two-row`,style:{...we&&ce?{minHeight:ce}:void 0,...we&&Ee?{width:Ee,maxWidth:"100%"}:void 0},children:[_t(r.jsxs("div",{className:Ve,style:{position:we?"absolute":"relative",inset:we?0:void 0,width:"100%"},children:[Lt&&we?r.jsx("div",{className:`${ze} ${e}-titles-fade-out`,children:cn(Lt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:cn(re)})]}),we&&ce?ce:void 0),Ro?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Lt&&we?r.jsx("div",{className:`${Xe} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:un(Lt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${Q?` ${e}-titles-layer-in-stacked`:""}`,children:un(re,!0)})]}):null]})]}),Mr=()=>{const te=Ro;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...te?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:te?void 0:{flex:"0 0 auto",height:"auto"},children:Qn(re,!0)}),Sn()]})};return r.jsxs("div",{ref:He,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Rt||lt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:ke?1:0,transition:"opacity 300ms ease",pointerEvents:ke?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:$,...ot}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...rt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:xt,onClick:te=>te.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":xe&&oe.length>1?"true":"false",onPointerDown:xe?Dt:void 0,onPointerUp:xe?en:void 0,onPointerCancel:xe?sn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Et&&D?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:te=>{te.target===te.currentTarget&&dt(ae)},children:r.jsx("div",{className:`${e}-slide-area`,children:ti(Et.images)})},`slide-out-${ae}`):null,r.jsx("div",{className:`${e}-slide-layer-in${D?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:le?ti(le.images):null})},`slide-in-${ae}-${ie}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:zt,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:Y,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...Q?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${Q?` ${e}-lightbox-content-area-stacked`:""}`,children:qt&&r.jsx("div",{className:`${e}-text-bar-cell${Q?` ${e}-text-bar-cell-stacked`:""}`,style:Q?void 0:{flex:1,minWidth:0,width:"100%"},children:Q?M==="fade"?Er():Mr():M==="fade"?Ke():kt()})})})]})]})]})};function Of(e){return`
13994
+ `,Lf="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 If(e){const t={};return t[Ht(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ht(e,"fontSettings")]={...ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ht(e,"fontSize")]={...ai.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ht(e,"lineHeight")]={...ai.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ht(e,"letterSpacing")]={...ai.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ht(e,"wordSpacing")]={...ai.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ht(e,"textAlign")]={...ai.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ht(e,"textAppearance")]={...ai.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Rf=Hi.reduce((e,t)=>({...e,...If(t)}),{}),Ef=Hi.reduce((e,t)=>({...e,[Ht(t,"fontFamily")]:"Goudy Bookletter 1911",[Ht(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ht(t,"letterSpacing")]:0,[Ht(t,"wordSpacing")]:0,[Ht(t,"textAlign")]:"left",[Ht(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Zr(e){return Hi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ht(n,"fontSize")]=i),o!==void 0&&(t[Ht(n,"lineHeight")]=o),t},{})}const kf=xf(),Mf={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",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","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",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:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Rf,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/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Lf,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Ef},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...Zr({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,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...Zr({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,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...Zr({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:[kf]}],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/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Pf={element:Cf,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:Mf,sourceCode:Tf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Hi.map(e=>({path:`${Ht(e,"fontFamily")}`}))]},fontRelations:{...Hi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ht(t,"fontFamily")}`}),{})}},Af=({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:x,coverFit:b,backgroundColor:T,imageGap:f,maxWidth:L,maxHeight:$,textTransition:R,title1Width:P,title2Width:C,title3Width:X,title1MarginLeft:E=0,title2MarginLeft:B=0,title3MarginLeft:I=0,titleRowMarginBottom:w=0,titleHeaderLayout:W="single-row",countCloseGap:h=0,closeIcon:S,closeIconMaxWidth:k,closeIconColor:D,closeIconHoverColor:U,contentMarginTop:ae=0,iconMarginRight:Y=0}=n,G=a.useCallback(te=>y.scalingValue(te,i??!1),[i]),H=G(f??0),F=`${L}%`,A=`${$}%`,K=G(h),q=G(ae),ee=G(Y),N=ci("title1",li(n,"title1"),i),ue=ci("title2",li(n,"title2"),i),v=ci("title3",li(n,"title3"),i),ye=ci("count",li(n,"count"),i),Z=W==="mobile",ce=!i||!!s,$e=!o&&(!i||!!s),ne=a.useMemo(()=>Yo(t,x),[t,x]),[ve,J]=a.useState(l),pe=ne[ve],he=pe==null?void 0:pe.entry,[Ae,be]=a.useState(!1),[We,Q]=a.useState(null),[le,xe]=a.useState(!1),[O,se]=a.useState(null),[fe,Se]=a.useState(!1),[Ie,we]=a.useState(0),[_,de]=a.useState(),[oe,z]=a.useState(),[re,ke]=a.useState(null),ie=a.useRef(null),j=a.useRef(0),Ne=a.useRef(0),Me=a.useRef(0),et=a.useRef(!1),Ye=a.useRef(null),lt=a.useRef(null),mt=a.useRef(null),De=a.useRef(null),ot=a.useRef(null),$t=a.useRef(null),rt=a.useRef(null),Ue=a.useCallback(()=>{const te=lt.current;if(!te)return;const Ee=te.closest(`.${e}-lightbox-content-area`);if(!Ee)return te.getBoundingClientRect().width;const p=Array.from(Ee.children).reduce((M,V)=>!(V instanceof HTMLElement)||V.contains(te)?M:M+V.getBoundingClientRect().width,0);return Ee.getBoundingClientRect().width-p},[e]),ht=a.useCallback(()=>{ie.current&&(clearTimeout(ie.current),ie.current=null)},[]),xt=a.useCallback(te=>{te===j.current&&(se(null),Se(!1))},[]),dt=a.useCallback(()=>{o||et.current||(et.current=!0,u==null||u(),be(!1),Ye.current=setTimeout(()=>{m()},300))},[o,u,m]),kt=a.useCallback(te=>!!(te.closest("[data-controls]")||te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:_t,backdropStyle:Qe,mediaAreaStyle:Tt,overlayContentStyle:Lt,swipeHandlers:Ge,dismissAreaStyle:qe}=pc({enabled:$e,onClose:dt,animMs:300,isBlockedTarget:kt}),Pe=a.useCallback(te=>{d&&Ul(te+1,c,!0)},[d,c]),gt=a.useCallback(te=>{if(te)return te.getBoundingClientRect().height},[]),It=a.useCallback(te=>{if(ne.length===0)return;const Ee=(te%ne.length+ne.length)%ne.length;if(Ee===ve)return;const p=ne[ve],M=ne[Ee];j.current+=1;const V=j.current,ge=R==="fade"&&Ls(p==null?void 0:p.entry)!==Ls(M==null?void 0:M.entry),Te=gt(mt.current),je=ge?(()=>{const yt=Ue();gi.flushSync(()=>{ke(M.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,at=Math.max(Te??0,(je==null?void 0:je.measuredIncomingTitlesHeight)??0)||void 0;we(V),se(ve),Se(!0),J(Ee),Pe(Ee),Me.current=Ee,ge?(ht(),at&&de(at),je!=null&&je.incomingTitlesMeasureWidth&&z(je.incomingTitlesMeasureWidth),Q((p==null?void 0:p.entryIndex)??null),xe(!0),Ne.current=M.entryIndex,ie.current=setTimeout(()=>{Q(null),xe(!1),de(void 0),z(void 0),ke(null),ie.current=null},400)):(ht(),Q(null),xe(!1),de(void 0),z(void 0),ke(null),Ne.current=M.entryIndex)},[ve,ht,Ue,gt,ne,Pe,R]),Mt=a.useCallback(()=>{rt.current=null},[]),Dt=a.useCallback(te=>{!ce||ne.length<=1||te.pointerType==="mouse"&&te.button!==0||te.target.closest("[data-controls]")||(rt.current={startX:te.clientX,startY:te.clientY,pointerId:te.pointerId})},[ce,ne.length]),en=a.useCallback(te=>{var yt;if(!ce||ne.length<=1||te.pointerType==="mouse"&&te.button!==0)return;if(_t){Mt();return}const Ee=rt.current;if(!Ee||Ee.pointerId!==te.pointerId||(Mt(),te.target.closest("[data-controls]")))return;const M=te.clientX-Ee.startX,V=te.clientY-Ee.startY,ge=Math.abs(M),Te=Math.abs(V);if(ge>=qm&&ge>Te){It(M>0?ve-1:ve+1);return}if(ge>Ss||Te>Ss)return;const je=(yt=De.current)==null?void 0:yt.getBoundingClientRect(),at=je?je.left+je.width/2:window.innerWidth/2;It(te.clientX<at?ve-1:ve+1)},[ve,ce,It,_t,Mt,ne.length]),on=a.useCallback(te=>{const Ee=rt.current;(Ee==null?void 0:Ee.pointerId)===te.pointerId&&Mt()},[Mt]);mc(),a.useEffect(()=>{$t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const te=requestAnimationFrame(()=>{be(!0),requestAnimationFrame(()=>{ot.current?ot.current.focus():De.current&&De.current.focus()})});return()=>{cancelAnimationFrame(te),Ye.current&&clearTimeout(Ye.current),ie.current&&clearTimeout(ie.current);const Ee=$t.current;Ee&&document.contains(Ee)&&Ee.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var te;R!=="fade"&&(Ne.current=((te=ne[ve])==null?void 0:te.entryIndex)??0,ht(),Q(null),xe(!1),de(void 0),z(void 0))},[ve,ht,ne,R]),a.useEffect(()=>{const te=Ee=>{if(Ee.key==="Escape"){dt();return}if(Ee.key==="ArrowLeft"&&ne.length>1){It(ve-1);return}if(Ee.key==="ArrowRight"&&ne.length>1){It(ve+1);return}if(Ee.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"])'),M=Array.from(p).filter(je=>!je.closest('[aria-hidden="true"]'));if(M.length===0)return;const V=M[0],ge=M[M.length-1],Te=document.activeElement;Ee.shiftKey?(Te===V||!De.current.contains(Te))&&(Ee.preventDefault(),ge.focus()):(Te===ge||!De.current.contains(Te))&&(Ee.preventDefault(),V.focus())}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[It,dt,ve,ne.length]),a.useLayoutEffect(()=>{ht(),j.current=0,we(0),se(null),Se(!1),Q(null),xe(!1),de(void 0),z(void 0),ke(null),J(te=>{const Ee=Math.max(0,ne.length-1);return Math.min(te,Ee)})},[ht,t.length,x,ne.length]),a.useLayoutEffect(()=>{var p;const te=Math.max(0,ne.length-1),Ee=Math.min(Math.max(0,l),te);Me.current=Ee,Ne.current=((p=ne[Ee])==null?void 0:p.entryIndex)??0,J(Ee)},[l]);const bt=We!==null?t[We]:null,Rt=O!==null?ne[O]:null,Ut=(he==null?void 0:he.title1)||(he==null?void 0:he.title2)||(he==null?void 0:he.title3)||(bt==null?void 0:bt.title1)||(bt==null?void 0:bt.title2)||(bt==null?void 0:bt.title3),Kt=eg(x,ne,t),ft=S!==null,Jt=Ut||Kt||ft,Ce=Kt&&ft?{gap:K}:void 0,Oe=`${e}-titles-stack${Z?` ${e}-titles-stack-stacked`:""}`,Ke=`${e}-titles-layer-out${Z?` ${e}-titles-layer-out-stacked`:""}`,He=`${e}-titles-layer-out`,ze=(E??0)>0||o,ut=G(w),_e=a.useMemo(()=>({title1Width:P??Ii.title1Width,title2Width:C??Ii.title2Width,title3Width:X??Ii.title3Width}),[P,C,X]),Je=a.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:I}),[B,I]),tt=a.useMemo(()=>he?Dn(e,he,N,ue,v):[],[e,he,N,ue,v]),Wt=a.useMemo(()=>tt.map(te=>_e[te.widthKey]),[tt,_e]),Ct=a.useMemo(()=>Pi(tt.length,Wt),[tt.length,Wt]),st=a.useMemo(()=>po(tt.length,Wt),[tt.length,Wt]),Nt=a.useMemo(()=>tt.filter(te=>te.prefix==="title1"),[tt]),At=a.useMemo(()=>tt.filter(te=>te.prefix==="title2"||te.prefix==="title3"),[tt]),Vt=a.useMemo(()=>Vn(Nt,_e),[Nt,_e]),zt=a.useMemo(()=>Vn(At,_e),[At,_e]),Pt=a.useCallback((te,Ee)=>{const p=tt.findIndex(V=>V.prefix===te.prefix);if(!Z||Ee==="single-row")return{effectiveWidth:st[p]??0,resolvedWidth:Ct[p]??0,maxWidth:sn(p,Ct)};if(Ee==="two-row-top"){const V=Nt.findIndex(ge=>ge.prefix===te.prefix);return{effectiveWidth:Vt.effective[V]??0,resolvedWidth:Vt.resolved[V]??0,maxWidth:sn(V,Vt.resolved)}}const M=At.findIndex(V=>V.prefix===te.prefix);return{effectiveWidth:zt.effective[M]??0,resolvedWidth:zt.resolved[M]??0,maxWidth:sn(M,zt.resolved)}},[tt,At,zt,st,Ct,Nt,Vt,Z]),Qt=a.useCallback(te=>Jl(tt,Ct,Je,te)+(Z?0:E??0),[tt,Ct,Je,Z,E]),wt=a.useCallback(()=>Z?0:E??0,[Z,E]),Gt=a.useCallback(te=>At.slice(0,te).reduce((Ee,p,M)=>Ee+(p.marginLeftKey?Je[p.marginLeftKey]??0:0)+(zt.resolved[M]??0),0),[At,zt.resolved,Je]),pt=a.useCallback(te=>{const Ee=At[te];return Gt(te)+(Ee.marginLeftKey?Je[Ee.marginLeftKey]??0:0)+(zt.resolved[te]??0)},[At,zt.resolved,Gt,Je]),Ft=a.useCallback((te,Ee,p)=>{if(!Z||p==="single-row"){const je=te.findIndex(Yt=>Yt.prefix===Ee.prefix),at=te.map(Yt=>_e[Yt.widthKey]),yt=Pi(te.length,at);return{effectiveWidth:po(te.length,at)[je]??0,resolvedWidth:yt[je]??0,maxWidth:sn(je,yt)}}if(p==="two-row-top"){const je=te.filter(Yt=>Yt.prefix==="title1"),at=je.findIndex(Yt=>Yt.prefix===Ee.prefix),{resolved:yt,effective:tn}=Vn(je,_e);return{effectiveWidth:tn[at]??0,resolvedWidth:yt[at]??0,maxWidth:sn(at,yt)}}const M=te.filter(je=>je.prefix==="title2"||je.prefix==="title3"),V=M.findIndex(je=>je.prefix===Ee.prefix),{resolved:ge,effective:Te}=Vn(M,_e);return{effectiveWidth:Te[V]??0,resolvedWidth:ge[V]??0,maxWidth:sn(V,ge)}},[_e,Z]),Bt=(te,Ee,p)=>{const M=te.marginLeftKey?Je[te.marginLeftKey]??0:0,{effectiveWidth:V,resolvedWidth:ge,maxWidth:Te}=p??Pt(te,Ee),je=Math.max(M,Bn),at=o&&Ee==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":te.prefix,style:{width:G(V),...M>0?{marginLeft:G(M)}:{}},children:[r.jsx("p",{className:te.className,style:te.style,children:te.text}),at&&te.marginLeftKey?r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ge),style:{position:"absolute",top:0,left:G(-M),width:G(je),height:"100%",pointerEvents:"auto"}}):null,at?r.jsx("div",{"data-controls":te.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(-hn/2),width:G(hn),height:"100%",pointerEvents:"auto"}}):null]},te.className)},g=(te="two-row")=>{const Ee=tt.findIndex(V=>V.prefix==="title1"),p=Ee>=0?Ct[Ee]:_e.title1Width,M=te==="two-row"&&o;return r.jsx("div",{...M?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:G(E??0),flexShrink:0,alignSelf:"stretch",...M?{pointerEvents:"auto"}:{}}})},me=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:N,"aria-hidden":"true",children:" "}),Re=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ye,"aria-live":"polite","aria-atomic":"true",children:Qm(ne,ve,x,t)}),Le=()=>Kt?o&&ft?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Re(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Br(K)} + ${K}))`,width:Br(K),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Re():null,Ze=()=>!Kt&&!ft?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ce,children:[Le(),ft?it():null]}),Et=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||Ut?me():null,ze?g("single-row"):null,St(he),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Ze(),Sn()]}),Ve=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||Ut?me():null,ze?g("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:le&&_?{minHeight:_}:void 0,children:[r.jsx("div",{ref:mt,className:Oe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Qn(re||he)}),r.jsxs("div",{ref:lt,className:Oe,style:{position:le?"absolute":"relative",inset:le?0:void 0,width:"100%",...le&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[bt&&le?r.jsx("div",{className:`${Ke} ${e}-titles-fade-out`,children:Qn(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${le?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Qn(he)})]})]}),Ze(),Sn()]}),it=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(k??0,i),height:y.scalingValue(k??0,i),marginRight:ee,"--close-icon-hover-color":U},children:[r.jsx("button",{ref:ot,type:"button",className:`${e}-close-icon-inner`,onClick:dt,"aria-label":"Close",children:r.jsx(rn,{url:S??"",fill:D,hoverFill:i&&!s?D:U,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"}})]}),jt=(te,Ee)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Kt||Ut?me():null,ze?g("two-row"):null,Ee!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ee},children:te}):r.jsxs(r.Fragment,{children:[te,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Ze()]}),St=te=>{if(!te)return null;const Ee=Dn(e,te,N,ue,v);return r.jsx(r.Fragment,{children:Ee.map(p=>Bt(p,"single-row",Ft(Ee,p,"single-row")))})},cn=te=>{if(!te)return null;const Ee=Dn(e,te,N,ue,v),p=Ee.find(M=>M.prefix==="title1");return p?Bt(p,"two-row-top",Ft(Ee,p,"two-row-top")):null},un=(te,Ee=!1)=>{const p=te?Dn(e,te,N,ue,v):[],M=p.filter(Te=>Te.prefix==="title2"||Te.prefix==="title3"),V=o&&Ee;return M.length>0||V||(w??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[M.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[M.map(Te=>Bt(Te,"two-row-bottom",Ft(p,Te,"two-row-bottom"))),Ee&&o?r.jsxs(r.Fragment,{children:[Rr(),Er()]}):null]}):null,(w??0)>0||V?r.jsx("div",{"data-controls":V?"titleRowMarginBottom":void 0,"data-controls-axis":V?"y":void 0,"data-controls-reverse":V?"":void 0,className:V?`${e}-control`:void 0,style:{height:ut,width:"100%",flexShrink:0,pointerEvents:V?"auto":"none"}}):null]}):null},Jn=(te,Ee=!1)=>r.jsxs(r.Fragment,{children:[jt(cn(te)),un(te,Ee)]}),Qn=te=>Z?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Jn(te)}):te?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:St(te)}):null,To=()=>{const te=Z?-1:tt.findIndex(M=>M.prefix==="title1"),Ee=!Z&&(o||(E??0)>0)?(()=>{const M=E??0,V=te>=0?Ct[te]:_e.title1Width,ge=Math.max(M,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(V),style:{position:"absolute",top:0,left:0,width:G(ge),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=tt.flatMap((M,V)=>{if(!M.marginLeftKey)return[];const ge=Je[M.marginLeftKey]??0,Te=Zl(tt,Ct,Je,V)+wt(),je=Math.max(ge,Bn);return r.jsx("div",{"data-controls":M.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ct[V]),style:{position:"absolute",top:0,left:G(Te),width:G(je),height:"100%",pointerEvents:"auto"}},M.marginLeftKey)});return Ee?[Ee,...p]:p},Lo=()=>tt.map((te,Ee)=>{const p=sn(Ee,Ct),V=Qt(Ee)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.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(V),width:G(hn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Rr=()=>At.flatMap((te,Ee)=>{if(!te.marginLeftKey)return[];const p=Je[te.marginLeftKey]??0,M=Gt(Ee),V=Math.max(p,Bn),{resolvedWidth:ge}=Pt(te,"two-row-bottom");return r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ge),style:{position:"absolute",top:0,left:G(M),width:G(V),height:"100%",pointerEvents:"auto"}},te.marginLeftKey)}),Er=()=>At.map((te,Ee)=>{const{maxWidth:p}=Pt(te,"two-row-bottom"),V=pt(Ee)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.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(V),width:G(hn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Sn=()=>!o||Z?null:r.jsxs(r.Fragment,{children:[To(),Lo()]}),fi=te=>{const Ee=!te.objectFit&&Fn(b);return{className:`${e}-slide-image-cell${Ee?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:F,maxHeight:A,...Ee?{"--image-aspect-ratio":Lr(b)}:{}}}},Io=te=>te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":te.objectFit}}:Fn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ei=te=>{if(te.length===0)return null;const Ee=te.length>1,p=Br(H),M=`calc(-0.5 * (${p} + ${H}))`;if(te.length===1){const V=te[0];return r.jsx("div",{...fi(V),children:r.jsx("img",{...Io(V),src:V.url,alt:V.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Ee?{gap:H}:void 0,children:te.map((V,ge)=>r.jsxs("div",{...fi(V),children:[r.jsx("img",{...Io(V),src:V.url,alt:V.name??"",draggable:!1}),o&&Ee&&ge<te.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:M,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${V.url}-${ge}`))})},Ro=!!(he!=null&&he.title2||he!=null&&he.title3||bt!=null&&bt.title2||bt!=null&&bt.title3||(w??0)>0||o),kr=()=>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:Oe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Jn(re||he)}),r.jsxs("div",{ref:lt,className:`${e}-titles-row-two-row`,style:{...le&&_?{minHeight:_}:void 0,...le&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[jt(r.jsxs("div",{className:Oe,style:{position:le?"absolute":"relative",inset:le?0:void 0,width:"100%"},children:[bt&&le?r.jsx("div",{className:`${He} ${e}-titles-fade-out`,children:cn(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${le?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:cn(he)})]}),le&&_?_:void 0),Ro?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[bt&&le?r.jsx("div",{className:`${Ke} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:un(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${le?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${Z?` ${e}-titles-layer-in-stacked`:""}`,children:un(he,!0)})]}):null]})]}),Mr=()=>{const te=Ro;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...te?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:te?void 0:{flex:"0 0 auto",height:"auto"},children:Jn(he,!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||dt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:Ae?1:0,transition:"opacity 300ms ease",pointerEvents:Ae?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:T,...Qe}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...Ge,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Tt,onClick:te=>te.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ce&&ne.length>1?"true":"false",onPointerDown:ce?Dt:void 0,onPointerUp:ce?en:void 0,onPointerCancel:ce?on:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Rt&&fe?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:te=>{te.target===te.currentTarget&&xt(Ie)},children:r.jsx("div",{className:`${e}-slide-area`,children:ei(Rt.images)})},`slide-out-${Ie}`):null,r.jsx("div",{className:`${e}-slide-layer-in${fe?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:pe?ei(pe.images):null})},`slide-in-${Ie}-${ve}`)]})})}),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:q,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...Z?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${Z?` ${e}-lightbox-content-area-stacked`:""}`,children:Jt&&r.jsx("div",{className:`${e}-text-bar-cell${Z?` ${e}-text-bar-cell-stacked`:""}`,style:Z?void 0:{flex:1,minWidth:0,width:"100%"},children:Z?R==="fade"?kr():Mr():R==="fade"?Ve():Et()})})})]})]})]})};function Ff(e){return`
14055
13995
  .${e}-wrapper {
14056
13996
  position: relative;
14057
13997
  width: 100%;
@@ -14585,7 +14525,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
14585
14525
  pointer-events: auto;
14586
14526
  z-index: 10;
14587
14527
  }
14588
- `}const jf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l,metadata:s})=>{const{prefix:c}=v.useScopedStyles(),d=(s==null?void 0:s.itemId)??null,{cover:u,coverFit:m,type:x}=e,w=a.useRef(null),[$,f]=a.useState(!1),[S,L]=a.useState(0),M=a.useRef(!1),A=a.useRef(!1),C=a.useRef(!1),J=a.useMemo(()=>(t??[]).filter(y=>Pi(y).length>0),[t]),k=$&&J.length>0,U=!n,I=a.useCallback(()=>{U&&(C.current=!0,Qm(A.current,d),A.current=!1)},[U,d]),R=(y=0)=>{if(J.length===0||n&&!i&&!o)return;const h=Xo(J,x),F=Math.max(0,Math.min(y,h.length-1));if(L(F),U){const W=Js();Zs(F+1,d,W),A.current=!W}f(!0)},T=a.useCallback(()=>{f(!1),C.current=!1},[]);return a.useEffect(()=>{!n||i||o||f(!1)},[n,i,o]),a.useEffect(()=>{if(!U||M.current)return;M.current=!0;const y=Tl(d);if(!y)return;const h=Ll(y,Xo(J,x).length);h<0||(L(h),f(!0))},[J,d,U,x]),a.useEffect(()=>{if(!U)return;const y=()=>{if(C.current){C.current=!1,f(!1);return}const h=Tl(d);if(!h){f(!1);return}const F=Ll(h,Xo(J,x).length);if(F<0){f(!1);return}A.current=!1,L(F),f(!0)};return window.addEventListener("popstate",y),()=>window.removeEventListener("popstate",y)},[J,d,U,x]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:w,className:`${c}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Of(c)}}),u?r.jsx("button",{type:"button",className:`${c}-cover ${Fn(m)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>R(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Fn(m)?{"--image-aspect-ratio":Tr(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${c}-cover-image ${Fn(m)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),k&&typeof document<"u"&&(()=>{const y=(l?document.getElementById(l):null)??document.body;return gi.createPortal(r.jsx(Nf,{prefix:c,entries:J,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:S,enableUrlSync:U,journalItemId:d,onBeforeClose:I,onClose:T}),y)})()]})},zf=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14528
+ `}const Wf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:l})=>{const{prefix:d}=y.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:m,type:x}=e,b=a.useRef(null),[T,f]=a.useState(!1),[L,$]=a.useState(0),R=a.useRef(!1),P=a.useRef(!1),C=a.useRef(!1),X=a.useMemo(()=>(t??[]).filter(h=>Mi(h).length>0),[t]),E=T&&X.length>0,B=!n,I=a.useCallback(()=>{B&&(C.current=!0,Um(P.current,c),P.current=!1)},[B,c]),w=(h=0)=>{if(X.length===0||n&&!i&&!o)return;const S=Yo(X,x),k=Math.max(0,Math.min(h,S.length-1));if($(k),B){const D=Xl();Ul(k+1,c,D),P.current=!D}f(!0)},W=a.useCallback(()=>{f(!1),C.current=!1},[]);return a.useEffect(()=>{!n||i||o||f(!1)},[n,i,o]),a.useEffect(()=>{if(!B||R.current)return;R.current=!0;const h=Cs(c);if(!h)return;const S=Ts(h,Yo(X,x).length);S<0||($(S),f(!0))},[X,c,B,x]),a.useEffect(()=>{if(!B)return;const h=()=>{if(C.current){C.current=!1,f(!1);return}const S=Cs(c);if(!S){f(!1);return}const k=Ts(S,Yo(X,x).length);if(k<0){f(!1);return}P.current=!1,$(k),f(!0)};return window.addEventListener("popstate",h),()=>window.removeEventListener("popstate",h)},[X,c,B,x]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:b,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ff(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Fn(m)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>w(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Fn(m)?{"--image-aspect-ratio":Lr(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Fn(m)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),E&&typeof document<"u"&&(()=>{const h=(s?document.getElementById(s):null)??document.body;return gi.createPortal(r.jsx(Af,{prefix:d,entries:X,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:L,enableUrlSync:B,journalItemId:c,onBeforeClose:I,onClose:W}),h)})()]})},_f=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14589
14529
  import { createPortal } from 'react-dom';
14590
14530
  import { CommonComponentProps } from '../props';
14591
14531
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15353,7 +15293,7 @@ export type LightboxJournalSettings = {
15353
15293
  closeIconColor: string;
15354
15294
  closeIconHoverColor: string;
15355
15295
  };
15356
- `,Bf="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>'),li={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 Df(e){const t={};return t[Ge(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ge(e,"fontSettings")]={...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ge(e,"fontSize")]={...li.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ge(e,"lineHeight")]={...li.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ge(e,"letterSpacing")]={...li.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ge(e,"wordSpacing")]={...li.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ge(e,"textAlign")]={...li.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ge(e,"textAppearance")]={...li.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Vf=Un.reduce((e,t)=>({...e,...Df(t)}),{}),Gf=Un.reduce((e,t)=>({...e,[Ge(t,"fontFamily")]:"Goudy Bookletter 1911",[Ge(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ge(t,"letterSpacing")]:0,[Ge(t,"wordSpacing")]:0,[Ge(t,"textAlign")]:"left",[Ge(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Zr(e){return Un.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ge(n,"fontSize")]=i),o!==void 0&&(t[Ge(n,"lineHeight")]=o),t},{})}const qf=ag(),Kf={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"}},...Vf,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/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Bf,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Gf,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:.04,...Zr({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,...Zr({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,...Zr({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:[qf]}],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:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Uf={element:jf,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:Kf,sourceCode:zf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Un.map(e=>({path:`${Ge(e,"fontFamily")}`}))]},fontRelations:{...Un.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ge(t,"fontFamily")}`}),{})}},Xf={sizeType:"custom",value:700,min:400,max:700};function ar(e,t){return{widthPx:e,heightPx:e*t}}function ha(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 Ql(e,t,n,i){const{heightPx:o}=ar(n,i);return ha(e/2,t/2,e,t,n,o)}function vc(e,t,n){for(const i of n){const{heightPx:o}=ar(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 Yf(e,t,n,i,o,l,s,c){if(o==="system")return"none";const d=i.getBoundingClientRect(),u=document.elementFromPoint(d.left+e,d.top+t);return u&&u.closest("a")?"none":vc(e,t,n)||l==="area"?s??"none":c??"none"}function es(e,t,n){var c;const{sizeType:i,value:o,min:l,max:s}=t;return i==="custom"?o:i==="as is"?((c=n.get(e))==null?void 0:c.naturalWidth)??o:Math.round(Math.random()*(s-l)+l)}function Zf(e){return`
15296
+ `,Nf="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 Hf(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const jf=Kn.reduce((e,t)=>({...e,...Hf(t)}),{}),Of=Kn.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Goudy Bookletter 1911",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Jr(e){return Kn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const zf=tg(),Bf={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"}},...jf,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/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Nf,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Of,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:.04,...Jr({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,...Jr({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,...Jr({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:[zf]}],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:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Df={element:Wf,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:Bf,sourceCode:_f,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Kn.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{...Kn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})}},Vf={sizeType:"custom",value:700,min:400,max:700};function sr(e,t){return{widthPx:e,heightPx:e*t}}function fa(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 Js(e,t,n,i){const{heightPx:o}=sr(n,i);return fa(e/2,t/2,e,t,n,o)}function hc(e,t,n){for(const i of n){const{heightPx:o}=sr(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 Gf(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":hc(e,t,n)||s==="area"?l??"none":d??"none"}function Qs(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 qf(e){return`
15357
15297
  .${e}-root {
15358
15298
  position: absolute;
15359
15299
  top: 0;
@@ -15388,7 +15328,7 @@ export type LightboxJournalSettings = {
15388
15328
  width: 32px;
15389
15329
  height: 32px;
15390
15330
  }
15391
- `}function Jf(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 Qf(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Jf(i)]));return new Map(n)}function ey({settings:e,content:t=[],isEditor:n}){const{prefix:i}=v.useScopedStyles(),[o,l]=a.useState(null),[s,c]=a.useState([]),[d,u]=a.useState(0),m=a.useRef(0),[x,w]=a.useState({x:0,y:0}),[$,f]=a.useState("none"),S=a.useRef({x:0,y:0}),[L,M]=a.useState(!1),[A,C]=a.useState(!1),J=a.useRef(new Map),{imageSize:k=Xf,cursor:U="system",target:I="area",position:R="random",visible:T="all",defaultCursor:y=null,hoverCursor:h=null}=e,F=a.useMemo(()=>Zf(i),[i]),W=a.useCallback((H,_,E=s)=>{if(!o)return;const q=o.getBoundingClientRect(),Y=H-q.left,ee=_-q.top;w({x:Y,y:ee}),f(Yf(Y,ee,E,o,U,I,h,y))},[o,s,U,I,h,y]);a.useEffect(()=>{const H=[...t.map(E=>E.image.url),y,h].filter(E=>!!E);if(H.length===0){J.current=new Map,C(!0);return}let _=!1;return C(!1),Qf(H).then(E=>{_||(J.current=E,C(!0))}),()=>{_=!0}},[t,y,h]),a.useEffect(()=>{if(!o)return;const H=E=>{E.stopPropagation(),S.current={x:E.clientX,y:E.clientY},W(E.clientX,E.clientY)},_=()=>{L&&W(S.current.x,S.current.y)};return o.addEventListener("mousemove",H),window.addEventListener("scroll",_,!0),()=>{o.removeEventListener("mousemove",H),window.removeEventListener("scroll",_,!0)}},[o,L,W]),a.useEffect(()=>{!o||!L||W(S.current.x,S.current.y)},[s,o,L,W]),a.useEffect(()=>{L||f("none")},[L]);const V=(H,_,E,q={})=>{var ye;const Y=((ye=J.current.get(H.image.url))==null?void 0:ye.aspectRatio)??1,ee=es(H.image.url,k,J.current),{heightPx:N}=ar(ee,Y);let pe=0,b=0;return R==="same"?{x:pe,y:b}=Ql(_,E,ee,Y):(pe=q.x??Math.random()*_,b=q.y??Math.random()*E,{x:pe,y:b}=ha(pe,b,_,E,ee,N)),{id:m.current++,url:H.image.url,link:H.link,name:H.image.name,x:pe,y:b,xRatio:pe/_,yRatio:b/E,aspectRatio:Y,widthPx:ee}},ne=()=>{if(!o)return;const H=o.getBoundingClientRect(),_=H.width,E=H.height;_===0||E===0||c(q=>q.length===0?q:q.map(Y=>{const ee=k.sizeType==="random"?Y.widthPx:es(Y.url,k,J.current),{heightPx:N}=ar(ee,Y.aspectRatio);if(R==="same"){const{x:ye,y:Q}=Ql(_,E,ee,Y.aspectRatio);return{...Y,x:ye,y:Q,widthPx:ee}}const{x:pe,y:b}=ha(Y.xRatio*_,Y.yRatio*E,_,E,ee,N);return{...Y,x:pe,y:b,widthPx:ee}}))};a.useEffect(()=>{if(!o||t.length===0||!A)return;const H=o.getBoundingClientRect(),_=H.width,E=H.height,q=V(t[0],_,E);c([q]),u(1)},[k,R,o,t,A]),a.useEffect(()=>{if(!o)return;ne();const H=new ResizeObserver(ne);return H.observe(o),window.addEventListener("resize",ne),()=>{H.disconnect(),window.removeEventListener("resize",ne)}},[o,R,k,s.length]),a.useEffect(()=>{T==="last One"&&c(H=>H.length>0?[H[H.length-1]]:[])},[T]);const X=H=>{if(!o||t.length===0||!A)return;const _=o.getBoundingClientRect(),E=H.clientX-_.left,q=H.clientY-_.top;if(I==="image"&&!vc(E,q,s))return;let Y=0,ee=0;R==="on Click"?(Y=E,ee=q):R==="same"?(Y=_.width/2,ee=_.height/2):(Y=Math.random()*_.width,ee=Math.random()*_.height);const N=t[d],pe=V(N,_.width,_.height,{x:Y,y:ee}),b=T==="all"?[...s,pe]:[pe];c(b),u(ye=>ye>=t.length-1?0:ye+1),W(H.clientX,H.clientY,b)},z=U==="custom"&&$!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:F}}),r.jsxs("div",{ref:l,onClick:X,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),className:`${i}-root`,style:{cursor:z?"none":"default"},children:[s.map(H=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${H.y}px`,left:`${H.x}px`,width:`${H.widthPx}px`,cursor:z?"none":"default"},children:I==="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)),L&&z&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${$}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const ty=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15331
+ `}function Kf(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 Uf(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Kf(i)]));return new Map(n)}function Xf({settings:e,content:t=[],isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),m=a.useRef(0),[x,b]=a.useState({x:0,y:0}),[T,f]=a.useState("none"),L=a.useRef({x:0,y:0}),[$,R]=a.useState(!1),[P,C]=a.useState(!1),X=a.useRef(new Map),{imageSize:E=Vf,cursor:B="system",target:I="area",position:w="random",visible:W="all",defaultCursor:h=null,hoverCursor:S=null}=e,k=a.useMemo(()=>qf(i),[i]),D=a.useCallback((H,F,A=l)=>{if(!o)return;const K=o.getBoundingClientRect(),q=H-K.left,ee=F-K.top;b({x:q,y:ee}),f(Gf(q,ee,A,o,B,I,S,h))},[o,l,B,I,S,h]);a.useEffect(()=>{const H=[...t.map(A=>A.image.url),h,S].filter(A=>!!A);if(H.length===0){X.current=new Map,C(!0);return}let F=!1;return C(!1),Uf(H).then(A=>{F||(X.current=A,C(!0))}),()=>{F=!0}},[t,h,S]),a.useEffect(()=>{if(!o)return;const H=A=>{A.stopPropagation(),L.current={x:A.clientX,y:A.clientY},D(A.clientX,A.clientY)},F=()=>{$&&D(L.current.x,L.current.y)};return o.addEventListener("mousemove",H),window.addEventListener("scroll",F,!0),()=>{o.removeEventListener("mousemove",H),window.removeEventListener("scroll",F,!0)}},[o,$,D]),a.useEffect(()=>{!o||!$||D(L.current.x,L.current.y)},[l,o,$,D]),a.useEffect(()=>{$||f("none")},[$]);const U=(H,F,A,K={})=>{var ye;const q=((ye=X.current.get(H.image.url))==null?void 0:ye.aspectRatio)??1,ee=Qs(H.image.url,E,X.current),{heightPx:N}=sr(ee,q);let ue=0,v=0;return w==="same"?{x:ue,y:v}=Js(F,A,ee,q):(ue=K.x??Math.random()*F,v=K.y??Math.random()*A,{x:ue,y:v}=fa(ue,v,F,A,ee,N)),{id:m.current++,url:H.image.url,link:H.link,name:H.image.name,x:ue,y:v,xRatio:ue/F,yRatio:v/A,aspectRatio:q,widthPx:ee}},ae=()=>{if(!o)return;const H=o.getBoundingClientRect(),F=H.width,A=H.height;F===0||A===0||d(K=>K.length===0?K:K.map(q=>{const ee=E.sizeType==="random"?q.widthPx:Qs(q.url,E,X.current),{heightPx:N}=sr(ee,q.aspectRatio);if(w==="same"){const{x:ye,y:Z}=Js(F,A,ee,q.aspectRatio);return{...q,x:ye,y:Z,widthPx:ee}}const{x:ue,y:v}=fa(q.xRatio*F,q.yRatio*A,F,A,ee,N);return{...q,x:ue,y:v,widthPx:ee}}))};a.useEffect(()=>{if(!o||t.length===0||!P)return;const H=o.getBoundingClientRect(),F=H.width,A=H.height,K=U(t[0],F,A);d([K]),u(1)},[E,w,o,t,P]),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,w,E,l.length]),a.useEffect(()=>{W==="last One"&&d(H=>H.length>0?[H[H.length-1]]:[])},[W]);const Y=H=>{if(!o||t.length===0||!P)return;const F=o.getBoundingClientRect(),A=H.clientX-F.left,K=H.clientY-F.top;if(I==="image"&&!hc(A,K,l))return;let q=0,ee=0;w==="on Click"?(q=A,ee=K):w==="same"?(q=F.width/2,ee=F.height/2):(q=Math.random()*F.width,ee=Math.random()*F.height);const N=t[c],ue=U(N,F.width,F.height,{x:q,y:ee}),v=W==="all"?[...l,ue]:[ue];d(v),u(ye=>ye>=t.length-1?0:ye+1),D(H.clientX,H.clientY,v)},G=B==="custom"&&T!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:k}}),r.jsxs("div",{ref:s,onClick:Y,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!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:I==="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)),$&&G&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${T}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Yf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15392
15332
  import { CommonComponentProps } from '../props';
15393
15333
  import { useScopedStyles } from '../utils/index';
15394
15334
 
@@ -15909,7 +15849,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
15909
15849
  </>
15910
15850
  );
15911
15851
  }
15912
- `,ny={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/component-assets/Component-default-1.jpg",name:"Slider-1.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"Slider-2.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"Slider-3.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"Slider-4.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"Slider-5.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"Slider-6.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"Slider-7.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"]}]}]},iy={element:ey,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:ny,sourceCode:ty,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},oy=100,ry=70,jn="cubic-bezier(0.86, 0, 0.07, 1)";function ay(e){return`
15852
+ `,Zf={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/component-assets/Component-default-1.jpg",name:"Slider-1.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"Slider-2.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"Slider-3.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"Slider-4.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"Slider-5.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"Slider-6.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"Slider-7.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"]}]}]},Jf={element:Xf,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:Zf,sourceCode:Yf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Qf=100,ey=70,jn="cubic-bezier(0.86, 0, 0.07, 1)";function ty(e){return`
15913
15853
  .${e}-wrapper {
15914
15854
  position: relative;
15915
15855
  width: 100%;
@@ -16019,7 +15959,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
16019
15959
  display: block;
16020
15960
  pointer-events: none;
16021
15961
  }
16022
- `}function ly(e){return e==="blur"?ry:e==="greyscale"?oy:0}function Xi(e,t=1,n=1){const i=ly(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 ts(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function sy(e,t){return t<=1?0:(e-1+t)%t}function cy(e,t=1){return!e||e.height===0?t:e.width/e.height}function dy(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 c=l,d=c/n;return d>s&&(d=s,c=d*n),{widthPercent:c/e*100,heightPercent:d/t*100}}function ns(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 bc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function is(e,t,n){return{...bc(e),[`--${n}-stage-scale`]:t}}function uy(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 py({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,G,me,D,K,ae,ge;const{prefix:o}=v.useScopedStyles(),l=a.useMemo(()=>ay(o),[o]),{imageSize:s,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:m="greyscale"}=e,x=t??[],w=ts(x.length),[$,f]=a.useState(w.activeIndex),[S,L]=a.useState(w.backgroundIndex),[M,A]=a.useState(!1),[C,J]=a.useState(!1),[k,U]=a.useState(null),[I,R]=a.useState(null),[T,y]=a.useState(0),[h,F]=a.useState(1),[W,V]=a.useState("none"),[ne,X]=a.useState("next"),[z,H]=a.useState({}),[_,E]=a.useState({width:0,height:0}),q=a.useRef(null),Y=a.useRef(null),ee=!n||!!i,N=s??60,pe=Math.max(10,Math.min(100,c??N)),b=Math.max(10,Math.min(100,d??N)),ye=Math.max(100,u),Q=Xi(m),xe=a.useCallback(ce=>{const be=cy(ce?z[ce]:void 0);return dy(_.width,_.height,be,pe,b)},[_.height,_.width,z,b,pe]);a.useEffect(()=>{const ce=Y.current;if(!ce)return;const be=new ResizeObserver(([Ee])=>{const{width:Z,height:de}=Ee.contentRect;E({width:Z,height:de})});return be.observe(ce),()=>be.disconnect()},[]),a.useEffect(()=>{const ce=(t??[]).map(be=>{var Ee;return(Ee=be.image)==null?void 0:Ee.url}).filter(be=>!!be);uy(ce,(be,Ee)=>{H(Z=>{var de,We;return((de=Z[be])==null?void 0:de.width)===Ee.width&&((We=Z[be])==null?void 0:We.height)===Ee.height?Z:{...Z,[be]:Ee}})})},[t]),a.useEffect(()=>{const{backgroundIndex:ce,activeIndex:be}=ts(x.length);f(be),L(ce),A(!1),J(!1),U(null),R(null),y(0),F(1),V("none"),X("next")},[x.length,t]),a.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]);const $e=a.useCallback(ce=>{var se,O,Oe,_e;if(!ee||M||x.length<=1)return;const be=ce==="next"?($+1)%x.length:($-1+x.length)%x.length,Ee=xe((O=(se=x[$])==null?void 0:se.image)==null?void 0:O.url),Z=xe((_e=(Oe=x[be])==null?void 0:Oe.image)==null?void 0:_e.url),de=ns(_.width,_.height,Ee),We=ns(_.width,_.height,Z);q.current&&clearTimeout(q.current),X(ce),J(!0),A(!0),ce==="next"?(U($),R(be),y(0),F(1),V(Xi(m,0,1))):(L(sy(be,x.length)),U(be),R($),y(1),F(We),V(Xi(m,1,We))),requestAnimationFrame(()=>{J(!1),requestAnimationFrame(()=>{ce==="next"?(y(1),F(de),V(Xi(m,1,de))):(y(0),F(1),V(Xi(m,0,1)))})}),q.current=setTimeout(()=>{ce==="next"&&L($),f(be),U(null),R(null),A(!1)},ye)},[$,m,_.height,_.width,xe,M,ee,x,ye]),oe=x[$],ie=S!==null?x[S]:null,B=k!==null?x[k]:null,le=I!==null?x[I]:null,re=x.length<=1?0:($-1+x.length)%x.length,ke=x.length<=1?0:($+1)%x.length,fe=xe((Se=oe==null?void 0:oe.image)==null?void 0:Se.url),Pe=xe((G=B==null?void 0:B.image)==null?void 0:G.url),ve=xe((me=le==null?void 0:le.image)==null?void 0:me.url),we={[`--${o}-transition-ms`]:`${ye}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsxs("div",{ref:Y,className:at(`${o}-wrapper`,C&&`${o}-snap`,n&&!i&&`${o}-editor`),style:we,"aria-label":"Zoom gallery",children:[((D=ie==null?void 0:ie.image)==null?void 0:D.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:ie.image.url,alt:"",style:{filter:Q}})}),M&&((K=B==null?void 0:B.image)==null?void 0:K.url)&&r.jsx("div",{className:at(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${ne}`),style:is(Pe,h,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:B.image.url,alt:"",style:{filter:W}})}),M&&((ae=le==null?void 0:le.image)==null?void 0:ae.url)&&r.jsx("div",{className:at(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${ne}`),style:is(ve,T,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:le.image.url,alt:""})}),!M&&((ge=oe==null?void 0:oe.image)==null?void 0:ge.url)&&r.jsx("div",{className:at(`${o}-stage`,`${o}-foreground`),style:bc(fe),children:r.jsx("img",{className:`${o}-image`,src:oe.image.url,alt:oe.image.name??""})}),ee&&x.length>1&&!M&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:at(`${o}-nav`,`${o}-nav-prev`),onClick:()=>$e("prev"),"aria-label":`Show previous image (${re+1} of ${x.length})`}),r.jsx("button",{type:"button",className:at(`${o}-nav`,`${o}-nav-next`),onClick:()=>$e("next"),"aria-label":`Show next image (${ke+1} of ${x.length})`})]})]})]})}const my=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15962
+ `}function ny(e){return e==="blur"?ey:e==="greyscale"?Qf:0}function Ui(e,t=1,n=1){const i=ny(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 el(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function iy(e,t){return t<=1?0:(e-1+t)%t}function oy(e,t=1){return!e||e.height===0?t:e.width/e.height}function ry(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 tl(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 fc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function nl(e,t,n){return{...fc(e),[`--${n}-stage-scale`]:t}}function ay(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 sy({settings:e,content:t,isEditor:n,isPreviewMode:i}){var xe,O,se,fe,Se,Ie,we;const{prefix:o}=y.useScopedStyles(),s=a.useMemo(()=>ty(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:m="greyscale"}=e,x=t??[],b=el(x.length),[T,f]=a.useState(b.activeIndex),[L,$]=a.useState(b.backgroundIndex),[R,P]=a.useState(!1),[C,X]=a.useState(!1),[E,B]=a.useState(null),[I,w]=a.useState(null),[W,h]=a.useState(0),[S,k]=a.useState(1),[D,U]=a.useState("none"),[ae,Y]=a.useState("next"),[G,H]=a.useState({}),[F,A]=a.useState({width:0,height:0}),K=a.useRef(null),q=a.useRef(null),ee=!n||!!i,N=l??60,ue=Math.max(10,Math.min(100,d??N)),v=Math.max(10,Math.min(100,c??N)),ye=Math.max(100,u),Z=Ui(m),ce=a.useCallback(_=>{const de=oy(_?G[_]:void 0);return ry(F.width,F.height,de,ue,v)},[F.height,F.width,G,v,ue]);a.useEffect(()=>{const _=q.current;if(!_)return;const de=new ResizeObserver(([oe])=>{const{width:z,height:re}=oe.contentRect;A({width:z,height:re})});return de.observe(_),()=>de.disconnect()},[]),a.useEffect(()=>{const _=(t??[]).map(de=>{var oe;return(oe=de.image)==null?void 0:oe.url}).filter(de=>!!de);ay(_,(de,oe)=>{H(z=>{var re,ke;return((re=z[de])==null?void 0:re.width)===oe.width&&((ke=z[de])==null?void 0:ke.height)===oe.height?z:{...z,[de]:oe}})})},[t]),a.useEffect(()=>{const{backgroundIndex:_,activeIndex:de}=el(x.length);f(de),$(_),P(!1),X(!1),B(null),w(null),h(0),k(1),U("none"),Y("next")},[x.length,t]),a.useEffect(()=>()=>{K.current&&clearTimeout(K.current)},[]);const $e=a.useCallback(_=>{var ie,j,Ne,Me;if(!ee||R||x.length<=1)return;const de=_==="next"?(T+1)%x.length:(T-1+x.length)%x.length,oe=ce((j=(ie=x[T])==null?void 0:ie.image)==null?void 0:j.url),z=ce((Me=(Ne=x[de])==null?void 0:Ne.image)==null?void 0:Me.url),re=tl(F.width,F.height,oe),ke=tl(F.width,F.height,z);K.current&&clearTimeout(K.current),Y(_),X(!0),P(!0),_==="next"?(B(T),w(de),h(0),k(1),U(Ui(m,0,1))):($(iy(de,x.length)),B(de),w(T),h(1),k(ke),U(Ui(m,1,ke))),requestAnimationFrame(()=>{X(!1),requestAnimationFrame(()=>{_==="next"?(h(1),k(re),U(Ui(m,1,re))):(h(0),k(1),U(Ui(m,0,1)))})}),K.current=setTimeout(()=>{_==="next"&&$(T),f(de),B(null),w(null),P(!1)},ye)},[T,m,F.height,F.width,ce,R,ee,x,ye]),ne=x[T],ve=L!==null?x[L]:null,J=E!==null?x[E]:null,pe=I!==null?x[I]:null,he=x.length<=1?0:(T-1+x.length)%x.length,Ae=x.length<=1?0:(T+1)%x.length,be=ce((xe=ne==null?void 0:ne.image)==null?void 0:xe.url),We=ce((O=J==null?void 0:J.image)==null?void 0:O.url),Q=ce((se=pe==null?void 0:pe.image)==null?void 0:se.url),le={[`--${o}-transition-ms`]:`${ye}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:q,className:nt(`${o}-wrapper`,C&&`${o}-snap`,n&&!i&&`${o}-editor`),style:le,"aria-label":"Zoom gallery",children:[((fe=ve==null?void 0:ve.image)==null?void 0:fe.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:Z}})}),R&&((Se=J==null?void 0:J.image)==null?void 0:Se.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${ae}`),style:nl(We,S,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:J.image.url,alt:"",style:{filter:D}})}),R&&((Ie=pe==null?void 0:pe.image)==null?void 0:Ie.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${ae}`),style:nl(Q,W,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:pe.image.url,alt:""})}),!R&&((we=ne==null?void 0:ne.image)==null?void 0:we.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-foreground`),style:fc(be),children:r.jsx("img",{className:`${o}-image`,src:ne.image.url,alt:ne.image.name??""})}),ee&&x.length>1&&!R&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:nt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>$e("prev"),"aria-label":`Show previous image (${he+1} of ${x.length})`}),r.jsx("button",{type:"button",className:nt(`${o}-nav`,`${o}-nav-next`),onClick:()=>$e("next"),"aria-label":`Show next image (${Ae+1} of ${x.length})`})]})]})]})}const ly=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16023
15963
  import cn from 'classnames';
16024
15964
  import { CommonComponentProps } from '../props';
16025
15965
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16538,7 +16478,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16538
16478
  </>
16539
16479
  );
16540
16480
  }
16541
- `,gy={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/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},hy={element:py,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:gy,sourceCode:my,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},fy={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},yy=["hover","active"],Jr={left:"flex-start",center:"center",right:"flex-end"};function vy(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 by(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 xy(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,l=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,s=`${o}, ${l}`,c=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,d=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${c}, ${d}`,m=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,x=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,w=`.${e}-button:hover, ${x}`,$=f=>`.${e}-hover-effect-${f}:hover, .${e}-hover-effect-${f}:focus-visible, a:focus-visible .${e}-hover-effect-${f}`;return`
16481
+ `,cy={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/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},dy={element:sy,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:cy,sourceCode:ly,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},uy={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},py=["hover","active"],Qr={left:"flex-start",center:"center",right:"flex-end"};function my(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 gy(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 hy(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,s=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${s}`,d=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,c=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${d}, ${c}`,m=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,x=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,b=`.${e}-button:hover, ${x}`,T=f=>`.${e}-hover-effect-${f}:hover, .${e}-hover-effect-${f}:focus-visible, a:focus-visible .${e}-hover-effect-${f}`;return`
16542
16482
  .${e}-root {
16543
16483
  line-height: 0;
16544
16484
  }
@@ -16568,11 +16508,11 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16568
16508
  .${e}-wrapper.${e}-editing .${e}-button {
16569
16509
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms;
16570
16510
  }
16571
- ${$("scale-up")},
16511
+ ${T("scale-up")},
16572
16512
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-scale-up {
16573
16513
  transform: scale(1.05);
16574
16514
  }
16575
- ${$("lift")},
16515
+ ${T("lift")},
16576
16516
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-lift {
16577
16517
  transform: translateY(-2px);
16578
16518
  box-shadow: ${m};
@@ -16634,9 +16574,9 @@ a:focus-visible .${e}-hover-effect-swipe::before,
16634
16574
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe::before {
16635
16575
  transform: translateX(0);
16636
16576
  }
16637
- ${$("reveal")},
16577
+ ${T("reveal")},
16638
16578
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-reveal,
16639
- ${$("swipe")},
16579
+ ${T("swipe")},
16640
16580
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe {
16641
16581
  background-color: var(--${e}-background-color);
16642
16582
  }
@@ -16699,17 +16639,17 @@ a:focus-visible .${e}-hover-effect-content-roll .${e}-content-roll-layer-hover,
16699
16639
  transform: translateY(-50%);
16700
16640
  opacity: 1;
16701
16641
  }
16702
- ${w} {
16642
+ ${b} {
16703
16643
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
16704
16644
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
16705
16645
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
16706
- box-shadow: ${s};
16646
+ box-shadow: ${l};
16707
16647
  }
16708
16648
  .${e}-wrapper.${e}-state-hover .${e}-button {
16709
16649
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
16710
16650
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
16711
16651
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
16712
- box-shadow: ${s};
16652
+ box-shadow: ${l};
16713
16653
  }
16714
16654
  .${e}-button:focus,
16715
16655
  .${e}-button:focus-visible,
@@ -16778,7 +16718,7 @@ a:active .${e}-button .${e}-icon-image,
16778
16718
  height: calc(1em * var(--${e}-icon-scale, 1));
16779
16719
  width: calc(1em * var(--${e}-icon-scale, 1));
16780
16720
  }
16781
- `}function Qr(e,t,n="",i,o){const l=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:l}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function os(e,t,n="fill",i=100,o=0,l){if(!t)return null;const s=r.jsx(on,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:s});if(n==="fixed"&&o>0){const c=v.scalingValue(o,l);return r.jsx("span",{className:`${e}-icon`,style:{width:c,height:c},"aria-hidden":"true",children:s})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:s})}function wy({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:l}=v.useScopedStyles(),s=a.useMemo(()=>xy(l),[l]),{type:c="a",label:d="Button",icon:u,alignment:m="center",alignA:x,order:w="text-icon",gap:$=0,iconSize:f=0,iconWidthC:S=0,dimensions:L=!1,padding:M={top:0,right:0,bottom:0,left:0},cornerRadius:A=0,boxShadow:C={top:0,left:0,right:0,bottom:0},boxShadowColor:J="rgba(0, 0, 0, 0)",innerBoxShadow:k={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:U="rgba(0, 0, 0, 0)",stroke:I=0,backgroundColor:R="#000000",textColor:T="#ffffff",borderColor:y="#ffffff",iconColor:h="#ffffff",hoverEffect:F="none",fontFamily:W,fontSettings:V,fontSize:ne,lineHeight:X,letterSpacing:z=0,wordSpacing:H=0,textAppearance:_,stateOverrides:E,minWidth:q=0,minHeight:Y=0,width:ee=0,height:N=0}=e,pe=v.buildColorVars(l,{backgroundColor:R,textColor:T,borderColor:y,iconColor:h,boxShadowColor:J,innerBoxShadowColor:U},fy,yy,E),b=i&&i!=="default"?`${l}-state-${i}`:"",ye=t&&!n?`${l}-editing`:"",Q=F!=="none"&&(!t||n||i==="hover")?`${l}-hover-effect-${F}`:"",xe=F==="reveal"||F==="swipe",$e=F==="content-roll",oe=F==="reveal"&&(!t||n),ie=L===!0,le=c==="a"?x??m:m,re=c==="c",ke=c!=="b",fe={fontSettings:{fontFamily:W,fontWeight:(V==null?void 0:V.fontWeight)??400,fontStyle:(V==null?void 0:V.fontStyle)??"normal"},fontSize:ne??.01,lineHeight:X,letterSpacing:z,wordSpacing:H,textAppearance:_,color:T},ve={...ke?dn(Xt(fe,t)):{},[`--${l}-box-shadow-x`]:v.scalingValue(C.left,t),[`--${l}-box-shadow-y`]:v.scalingValue(C.top,t),[`--${l}-box-shadow-blur`]:v.scalingValue(C.right,t),[`--${l}-box-shadow-spread`]:v.scalingValue(C.bottom,t),[`--${l}-inner-box-shadow-x`]:v.scalingValue(k.left,t),[`--${l}-inner-box-shadow-y`]:v.scalingValue(k.top,t),[`--${l}-inner-box-shadow-blur`]:v.scalingValue(k.right,t),[`--${l}-inner-box-shadow-spread`]:v.scalingValue(k.bottom,t),paddingTop:v.scalingValue(M.top,t),paddingRight:v.scalingValue(M.right,t),paddingBottom:v.scalingValue(M.bottom,t),paddingLeft:v.scalingValue(M.left,t),borderRadius:v.scalingValue(A,t),borderWidth:v.scalingValue(I,t),...re?{}:{justifyContent:Jr[le],textAlign:le},...re&&!$e?{gap:v.scalingValue($,t)}:{},...ie?{width:v.scalingValue(ee,t),height:v.scalingValue(N,t)}:{minWidth:v.scalingValue(q,t),minHeight:v.scalingValue(Y,t),...re?{width:"100%"}:{}}};let we;const Se={display:"inline-flex",alignItems:"center",justifyContent:re?Jr[le]:Jr[c==="a"?le:"center"],gap:re?v.scalingValue($,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:le}:{}};if(c==="b"){const D=()=>os(l,u,f>0?"fixed":"fill",100,f,t);we=$e?Qr(l,D,`${l}-icon-roll`,void 0,Se):D()}else if(c==="c"){const D=()=>{const K=r.jsx("span",{className:`${l}-text`,style:{textAlign:le},children:d}),ae=os(l,u,S>0?"fixed":"fill",100,S,t);return w==="icon-text"?r.jsxs(r.Fragment,{children:[ae,K]}):r.jsxs(r.Fragment,{children:[K,ae]})};we=$e?Qr(l,D,`${l}-icon-text-roll`,void 0,Se):D()}else we=$e?Qr(l,()=>d,`${l}-label-roll`,void 0,Se):xe?r.jsx("span",{className:`${l}-button-inner`,children:d}):d;const G=oe?D=>vy(D,l):void 0,me=oe?D=>by(D,l):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsx("div",{className:`${l}-root`,style:pe,children:r.jsx("div",{className:`${l}-wrapper ${b} ${ye}`.trim(),children:r.jsx("div",{className:`${l}-button ${Q}`.trim(),style:ve,onMouseEnter:G,onMouseLeave:me,role:"button",tabIndex:o||t&&!n?void 0:0,children:we})})})]})}const Sy=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
16721
+ `}function ea(e,t,n="",i,o){const s=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:s}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function il(e,t,n="fill",i=100,o=0,s){if(!t)return null;const l=r.jsx(rn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const d=y.scalingValue(o,s);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function fy({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:s}=y.useScopedStyles(),l=a.useMemo(()=>hy(s),[s]),{type:d="a",label:c="Button",icon:u,alignment:m="center",alignA:x,order:b="text-icon",gap:T=0,iconSize:f=0,iconWidthC:L=0,dimensions:$=!1,padding:R={top:0,right:0,bottom:0,left:0},cornerRadius:P=0,boxShadow:C={top:0,left:0,right:0,bottom:0},boxShadowColor:X="rgba(0, 0, 0, 0)",innerBoxShadow:E={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:B="rgba(0, 0, 0, 0)",stroke:I=0,backgroundColor:w="#000000",textColor:W="#ffffff",borderColor:h="#ffffff",iconColor:S="#ffffff",hoverEffect:k="none",fontFamily:D,fontSettings:U,fontSize:ae,lineHeight:Y,letterSpacing:G=0,wordSpacing:H=0,textAppearance:F,stateOverrides:A,minWidth:K=0,minHeight:q=0,width:ee=0,height:N=0}=e,ue=y.buildColorVars(s,{backgroundColor:w,textColor:W,borderColor:h,iconColor:S,boxShadowColor:X,innerBoxShadowColor:B},uy,py,A),v=i&&i!=="default"?`${s}-state-${i}`:"",ye=t&&!n?`${s}-editing`:"",Z=k!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${k}`:"",ce=k==="reveal"||k==="swipe",$e=k==="content-roll",ne=k==="reveal"&&(!t||n),ve=$===!0,pe=d==="a"?x??m:m,he=d==="c",Ae=d!=="b",be={fontSettings:{fontFamily:D,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:ae??.01,lineHeight:Y,letterSpacing:G,wordSpacing:H,textAppearance:F,color:W},Q={...Ae?dn(Xt(be,t)):{},[`--${s}-box-shadow-x`]:y.scalingValue(C.left,t),[`--${s}-box-shadow-y`]:y.scalingValue(C.top,t),[`--${s}-box-shadow-blur`]:y.scalingValue(C.right,t),[`--${s}-box-shadow-spread`]:y.scalingValue(C.bottom,t),[`--${s}-inner-box-shadow-x`]:y.scalingValue(E.left,t),[`--${s}-inner-box-shadow-y`]:y.scalingValue(E.top,t),[`--${s}-inner-box-shadow-blur`]:y.scalingValue(E.right,t),[`--${s}-inner-box-shadow-spread`]:y.scalingValue(E.bottom,t),paddingTop:y.scalingValue(R.top,t),paddingRight:y.scalingValue(R.right,t),paddingBottom:y.scalingValue(R.bottom,t),paddingLeft:y.scalingValue(R.left,t),borderRadius:y.scalingValue(P,t),borderWidth:y.scalingValue(I,t),...he?{}:{justifyContent:Qr[pe],textAlign:pe},...he&&!$e?{gap:y.scalingValue(T,t)}:{},...ve?{width:y.scalingValue(ee,t),height:y.scalingValue(N,t)}:{minWidth:y.scalingValue(K,t),minHeight:y.scalingValue(q,t),...he?{width:"100%"}:{}}};let le;const xe={display:"inline-flex",alignItems:"center",justifyContent:he?Qr[pe]:Qr[d==="a"?pe:"center"],gap:he?y.scalingValue(T,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:pe}:{}};if(d==="b"){const fe=()=>il(s,u,f>0?"fixed":"fill",100,f,t);le=$e?ea(s,fe,`${s}-icon-roll`,void 0,xe):fe()}else if(d==="c"){const fe=()=>{const Se=r.jsx("span",{className:`${s}-text`,style:{textAlign:pe},children:c}),Ie=il(s,u,L>0?"fixed":"fill",100,L,t);return b==="icon-text"?r.jsxs(r.Fragment,{children:[Ie,Se]}):r.jsxs(r.Fragment,{children:[Se,Ie]})};le=$e?ea(s,fe,`${s}-icon-text-roll`,void 0,xe):fe()}else le=$e?ea(s,()=>c,`${s}-label-roll`,void 0,xe):ce?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const O=ne?fe=>my(fe,s):void 0,se=ne?fe=>gy(fe,s):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${s}-root`,style:ue,children:r.jsx("div",{className:`${s}-wrapper ${v} ${ye}`.trim(),children:r.jsx("div",{className:`${s}-button ${Z}`.trim(),style:Q,onMouseEnter:O,onMouseLeave:se,role:"button",tabIndex:o||t&&!n?void 0:0,children:le})})})]})}const yy=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
16782
16722
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
16783
16723
  import { CommonComponentProps } from '../props';
16784
16724
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -17405,7 +17345,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17405
17345
  </>
17406
17346
  );
17407
17347
  }
17408
- `,$y={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Cy=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Ty={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"Background Default",titleByState:{default:"Background Default",hover:"Background Hover",active:"Background Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...$y.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KY78A0YVT403B042HVWWTHBC.svg",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...Cy],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},Ly={element:wy,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:Ty,sourceCode:Sy,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Iy(e){return`
17348
+ `,vy={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},xy=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],by={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"Background Default",titleByState:{default:"Background Default",hover:"Background Hover",active:"Background Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...vy.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KY78A0YVT403B042HVWWTHBC.svg",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...xy],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},wy={element:fy,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:by,sourceCode:yy,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Sy(e){return`
17409
17349
  .${e}-titles-row {
17410
17350
  position: relative;
17411
17351
  flex: 0 1 auto;
@@ -17603,7 +17543,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17603
17543
  pointer-events: auto;
17604
17544
  flex-shrink: 0;
17605
17545
  }
17606
- `}const Tn=500,Yi=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",Ry=72,Ey=50,My=1e4,ky=650,Py=500;function Ay(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 xc(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 Fy(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?xc(i,n):null}function Wy(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 Qi(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 rs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Qi(e,i,n)}const _y=.03;function wc(e){return e.width*_y}const ea={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 as(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Hy(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function fa(e,t,n){const i=e.getBoundingClientRect(),o=i.width,l=i.height,s=t/n,c=o/l;if(s>c){const u=o/s;return{width:o,height:u,left:i.left,top:i.top+(l-u)/2}}const d=l*s;return{width:d,height:l,left:i.left+(o-d)/2,top:i.top}}function Ny(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:fa(e,t.width,t.height)}function Oy(e,t){if(Lr(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 jy(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 zy({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=>Lr(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 ji(e,t,n){const{width:i,height:o,top:l}=e,{left:s,width:c}=n,d=wc(n);return t==="left"?{left:s+d-i,top:l,width:i,height:o}:{left:s+c-d,top:l,width:i,height:o}}function lr(e,t,n){const i=ji(e,t,n);return{...i,left:2*i.left-e.left}}function By(e,t,n){const{left:i,width:o}=n,l=wc(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 Sc(e,t,n,i){const o=ji(e,"left",i),l=ji(e,"right",i),s=lr(e,"left",i),c=lr(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:c,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:c};case"far-left":return{start:s,end:o};default:return{start:e,end:e}}}function Dy(e,t,n,i){const{start:o,end:l}=Sc(e,t,n,i);return{x:l.left-o.left,y:l.top-o.top}}function Vy(e,t,n){const i=ji(e,t,n),o=lr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Lr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Gy({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:l,onTransitionEnd:s}){const c=a.useRef(null);return a.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:s,children:r.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:l,onClick:d=>d.stopPropagation(),style:o},e)})}function Do({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Lr(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 qy({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:w,resolveCloseSourceRect:$,onClose:f,onPrev:S,onNext:L}){const M=a.useRef(null),A=a.useRef(null),C=a.useRef(null),J=a.useRef(new Map),[k,U]=a.useState(0),I=a.useRef(null),R=a.useRef(0),T=a.useRef(0),y=a.useRef("none"),h=a.useRef(!1),F=a.useRef(!1),W=a.useRef(!1),V=a.useRef(null),ne=a.useRef(null),X=a.useRef(null),z=a.useRef(()=>{}),H=a.useRef(null),_=a.useRef(null),E=a.useRef(null),q=a.useRef(!1),[Y,ee]=a.useState(null),[N,pe]=a.useState(ea),[b,ye]=a.useState(0),[Q,xe]=a.useState("opening"),[$e,oe]=a.useState(0),[ie,B]=a.useState(0),[le,re]=a.useState(!1),[ke,fe]=a.useState(null),[Pe,ve]=a.useState(null),[we,Se]=a.useState(null),[G,me]=a.useState(!1),[D,K]=a.useState(null),[ae,ge]=a.useState(!1),ce=a.useRef(!1),[be,Ee]=a.useState(!1),[Z,de]=a.useState(!1),We=a.useRef(n),se=a.useRef(void 0),O=t[n],Oe=O?Lr(O):!1,_e=ie!==0||le,nt=!s&&(!l||!!c),Ue=d&&!s,Ce=u.length>1,Fe=a.useCallback((g,ue)=>t.length<=1?null:t[(g+ue+t.length)%t.length]??null,[t]),He=Ce?Qi(u,m,-1):Fe(n,-1),Ze=Ce?Qi(u,m,1):Fe(n,1),Tt=ke===-1&&_e?Ce&&Pe!==null?Qi(u,Pe,-1):we!==null?Fe(we,-1):null:null,it=ke===1&&_e?Ce&&Pe!==null?Qi(u,Pe,1):we!==null?Fe(we,1):null:null,De=Tt&&Tt.url!==(He==null?void 0:He.url)?Tt:null,et=it&&it.url!==(Ze==null?void 0:Ze.url)?it:null,dt=He&&Ue?(()=>{const g=Ce?rs(u,m,-1):t.length>2?Fe((n-1+t.length)%t.length,-1):null;return g&&g.url!==He.url?g:null})():null,lt=Ze&&Ue?(()=>{const g=Ce?rs(u,m,1):t.length>2?Fe((n+1)%t.length,1):null;return g&&g.url!==Ze.url?g:null})():null,ht=De??dt,Rt=et??lt,ot=a.useCallback((g,ue,Te)=>{if(!g||!ue||!Te)return;const Le=J.current,tt=Le.get(g);(tt==null?void 0:tt.width)===ue&&(tt==null?void 0:tt.height)===Te||(Le.set(g,{width:ue,height:Te}),U(kt=>kt+1))},[]),xt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const ue=J.current.get(g.url);return Ny(A.current,ue)},[k,b]),zt=a.useCallback(()=>{if(!O)return;const g=xt(O);if(g){ee(g);return}const ue=A.current;ue&&ee(as(ue))},[O,xt]),rt=a.useCallback(g=>{if(Ce){const ue=u.length;ve((m+g+ue)%ue),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),ve(null))},[Ce,u.length,m,t.length,n]),qe=a.useCallback(g=>{W.current=g,re(g)},[]),Ne=a.useCallback(()=>{V.current!==null&&(window.clearTimeout(V.current),V.current=null)},[]),pt=a.useCallback(()=>{Ne(),V.current=window.setTimeout(()=>{Ne(),qe(!1)},Yi+32)},[Ne,qe]),yt=a.useCallback(()=>{const g=M.current;if(!g){pe({left:0,top:0,width:typeof window<"u"?window.innerWidth:ea.width,height:typeof window<"u"?window.innerHeight:ea.height});return}const ue=g.getBoundingClientRect();pe({left:ue.left,top:ue.top,width:ue.width,height:ue.height})},[]),Mt=a.useCallback((g,ue)=>{if(_e){if(be&&!le)return`translate(${ie}px, 0px)`;if(le&&ke!==null){const Te=xt(g);if(!Te)return;const{x:Le,y:tt}=Dy(Te,ue,ke,N);return`translate(${Le}px, ${tt}px)`}if(le)return"translate(0px, 0px)"}},[_e,be,le,ie,ke,N,xt]),Dt=a.useCallback(()=>{const g=ne.current;ne.current=null,Ne(),qe(!1),fe(null),ve(null),Se(null),B(0),Ee(!1),h.current=!1,T.current=0,y.current="none",g===-1?S():g===1&&L()},[Ne,qe,S,L]),en=a.useCallback(()=>{Ne(),V.current=window.setTimeout(()=>{ne.current!==null&&Dt()},Yi+32)},[Ne,Dt]),sn=a.useCallback(()=>{Ne(),ne.current=null,qe(!1),fe(null),ve(null),Se(null),B(0),Ee(!1),h.current=!1,T.current=0,y.current="none"},[Ne,qe]),Lt=a.useCallback(g=>{if(!(!Ue||!Y)){if(W.current){if(ne.current===g){X.current=g,Dt();return}sn()}Ne(),rt(g),ne.current=g,fe(g),qe(!0),en()}},[Ue,Y,Dt,sn,Ne,rt,qe,en]);z.current=Lt;const Et=a.useCallback(()=>{H.current=null,q.current=!1,_.current!==null&&(window.clearInterval(_.current),_.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),Qt=a.useCallback(g=>{_.current!==null&&window.clearInterval(_.current);const ue=q.current?Py:ky;_.current=window.setInterval(()=>{z.current(g)},ue)},[]),Ut=a.useCallback(g=>{H.current!==g&&(Et(),H.current=g,q.current=!1,z.current(g),Qt(g),E.current=window.setTimeout(()=>{E.current=null,H.current===g&&(q.current=!0,Qt(g))},My))},[Et,Qt]),ft=a.useCallback(()=>{const g=A.current;if(!g)return;const ue=O==null?void 0:O.url,Te=ue?J.current.get(ue):void 0;if(Te!=null&&Te.width&&(Te!=null&&Te.height)){ee(fa(g,Te.width,Te.height));return}const Le=C.current;if(Le&&ue&&(Le.src===ue||Le.currentSrc===ue)){const{width:kt,height:Ke}=Hy(Le);if(kt&&Ke){ot(ue,kt,Ke),ee(fa(g,kt,Ke));return}}const tt=as(g);!tt.width||!tt.height||ee(tt)},[O==null?void 0:O.url,ot]),qt=a.useCallback(g=>{if(C.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&ft();return}g.complete&&g.naturalWidth>0&&ft()}},[ft]),Re=a.useCallback(()=>{yt(),ft(),ye(g=>g+1)},[yt,ft]);a.useEffect(()=>{Re();const g=A.current,ue=M.current,Te=new ResizeObserver(()=>Re());return g&&Te.observe(g),ue&&Te.observe(ue),window.addEventListener("resize",Re),()=>{Te.disconnect(),window.removeEventListener("resize",Re)}},[Re,n,x]),a.useLayoutEffect(()=>{if(!O)return;const g=C.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){ft();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&ft()}},[O==null?void 0:O.url,n,ft]),a.useEffect(()=>{zt()},[zt,k]),a.useEffect(()=>{const g=new Set,ue=[],Te=Le=>{!(Le!=null&&Le.url)||g.has(Le.url)||(g.add(Le.url),ue.push(Le))};t.forEach(Te),u.forEach(Le=>Le.items.forEach(Te)),ue.forEach(Le=>{J.current.has(Le.url)||Oy(Le,ot)})},[t,u,ot]),a.useEffect(()=>{if(Q!=="opening"||!Y)return;if(!w){xe("open");return}me(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{me(!0),xe("open")})});return()=>cancelAnimationFrame(g)},[Q,Y,w]),a.useEffect(()=>{if(Q!=="closing")return;const g=setTimeout(()=>f(),Tn);return()=>clearTimeout(g)},[Q,f]),a.useEffect(()=>()=>{Ne()},[Ne]),a.useLayoutEffect(()=>{We.current===n&&se.current===(O==null?void 0:O.url)||(Ne(),ne.current=null,fe(null),ve(null),Se(null),oe(0),B(0),qe(!1),de(!1),Ee(!1),R.current=0,T.current=0,y.current="none",h.current=!1,I.current=null,F.current=!1,C.current=null,zt(),We.current=n,se.current=O==null?void 0:O.url)},[n,O==null?void 0:O.url,qe,Ne,zt]),a.useLayoutEffect(()=>{const g=X.current;g!==null&&(X.current=null,requestAnimationFrame(()=>{z.current(g)}))},[n,m,O==null?void 0:O.url]),a.useLayoutEffect(()=>{if(Q==="opening"){ce.current=!1,ge(!1);return}if(Q!=="open"||ce.current)return;if(!He&&!Ze){ce.current=!0;return}ge(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ge(!0),ce.current=!0})});return()=>cancelAnimationFrame(g)},[Q,He==null?void 0:He.url,Ze==null?void 0:Ze.url]),a.useEffect(()=>{if(Q!=="open")return;const g=()=>{const Ke=st=>{st.stopPropagation(),st.preventDefault(),document.removeEventListener("click",Ke,!0)};document.addEventListener("click",Ke,!0)},ue=Ke=>{const st=Ke<0?1:-1;Ne(),rt(st),ne.current=st,fe(st),qe(!0),en()},Te=Ke=>{if(Math.abs(Ke)>Ey&&Ue){ue(Ke);return}ne.current=null,fe(null),ve(null),Se(null),qe(!0),B(0),pt()},Le=Ke=>{if(Ke.touches.length!==1||W.current)return;const st=Ke.touches[0];F.current=!0,I.current={x:st.clientX,y:st.clientY},y.current="none",T.current=0,h.current=!1},tt=Ke=>{if(!I.current||Ke.touches.length!==1||W.current)return;const st=Ke.touches[0],_t=st.clientX-I.current.x,It=st.clientY-I.current.y;if(y.current==="none"){if(Math.abs(_t)<10&&Math.abs(It)<10)return;if(Math.abs(_t)>Math.abs(It)){if(!Ue)return;y.current="horizontal"}else if(It>0){if(!nt)return;y.current="vertical"}else return}if(y.current==="horizontal"){h.current=!0,Ee(!0),T.current=_t,B(_t),Ke.preventDefault();return}y.current==="vertical"&&(h.current=!0,Ee(!0),R.current=It,oe(It),Ke.preventDefault())},kt=()=>{if(!I.current)return;const Ke=y.current,st=h.current;if(st&&Ke==="horizontal")Te(T.current),g();else if(st&&Ke==="vertical"){const _t=R.current;if(nt&&_t>Ry){const It=window.innerHeight;R.current=It,de(!0),oe(It),xe("closing")}else R.current=0,oe(0);g()}else Ke==="horizontal"&&Math.abs(T.current)>0&&(Te(T.current),g());I.current=null,y.current="none",T.current=0,h.current=!1,Ee(!1)};return document.addEventListener("touchstart",Le,{passive:!0}),document.addEventListener("touchmove",tt,{passive:!1}),document.addEventListener("touchend",kt),document.addEventListener("touchcancel",kt),()=>{document.removeEventListener("touchstart",Le),document.removeEventListener("touchmove",tt),document.removeEventListener("touchend",kt),document.removeEventListener("touchcancel",kt)}},[Q,Ue,qe,pt,Ne,nt,en,rt]);const Ve=a.useCallback(()=>{const g=($==null?void 0:$())??w??null;g&&Y&&(K(g),me(!0)),xe("closing")},[$,w,Y]);a.useEffect(()=>{const g=Le=>{if(Le.key==="Escape"){if(l&&c||Q==="closing")return;Et(),Ve();return}if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight"||Q!=="open"||!Ue)return;Le.preventDefault();const tt=Le.key==="ArrowLeft"?-1:1;Le.repeat&&H.current===tt||Ut(tt)},ue=Le=>{if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight")return;const tt=Le.key==="ArrowLeft"?-1:1;H.current===tt&&Et()},Te=()=>{Et()};return window.addEventListener("keydown",g),window.addEventListener("keyup",ue),window.addEventListener("blur",Te),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",ue),window.removeEventListener("blur",Te),Et()}},[Q,l,c,Ve,Ue,Ut,Et]),a.useEffect(()=>{Q!=="open"&&Et()},[Q,Et]);const Xe=()=>{Q==="closing"||s||Ve()},ze=Q==="open",mt=Q==="closing",Nt=$e>0?Math.max(0,1-$e/500):1,Ae=$e>0?Math.max(.35,1-$e/500):1,Ye=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!W.current)){if(ne.current!==null){Dt();return}Ne(),qe(!1)}},[Ne,qe,Dt]),Je=Q==="closing"?D??w:w,bt=Je&&Y&&(Q==="opening"||mt)?Ay(Je,Y):void 0,$t=_e&&O?Mt(O,"center"):$e>0?`translateY(${$e}px)`:bt,ut=Y?Bo(Y,N):null,Pt=!!(Je&&Y),At=Pt&&(Q==="closing"||Q==="open"&&G),Vt={position:"absolute",top:ut==null?void 0:ut.top,left:ut==null?void 0:ut.left,width:ut==null?void 0:ut.width,height:ut==null?void 0:ut.height,objectFit:"contain",transformOrigin:"top left",transform:$t,opacity:$e>0?Ae:Pt?1:Q==="opening"||mt?0:1,transition:be&&!le?"none":le?`transform ${Yi}ms ${mn}`:Z?`transform ${Tn}ms ${mn}, opacity ${Tn}ms ${mn}`:At?`transform ${Tn}ms ${mn}`:Q==="opening"||mt?`opacity ${Tn}ms ${mn}`:"none",pointerEvents:Oe&&ze&&!_e?"auto":"none",touchAction:Oe&&ze?"none":void 0,zIndex:1,overflow:Oe?"hidden":void 0},Kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:ze&&!_e?"auto":"none"},Ft=(g,ue,Te="adjacent")=>{const Le=xt(g);if(!Le)return{display:"none"};const tt=Te==="far"?ue==="left"?"far-left":"far-right":ue==="left"?"left-adjacent":"right-adjacent",{start:kt}=ke!==null?Sc(Le,tt,ke,N):{start:Te==="far"?lr(Le,ue,N):ji(Le,ue,N)},Ke=Bo(kt,N),st=Mt(g,tt),_t=!_e&&Te==="adjacent"&&ze&&!ae?Vy(Le,ue,N):null,It=Te==="far"&&_e&&ke===(ue==="left"?-1:1),cn=be&&!le?!1:le,un=Te==="adjacent"&&ze&&ae&&!_e;return{position:"absolute",top:Ke.top,left:Ke.left,width:Ke.width,height:Ke.height,objectFit:"contain",transform:st??(_t?`translate(${_t.x}px, ${_t.y}px)`:void 0),opacity:Te==="far"?ze&&It?1:0:ze?1:0,transition:cn?Te==="far"?`transform ${Yi}ms ${mn}`:`transform ${Yi}ms ${mn}, opacity ${Tn}ms ${mn}`:un?`transform ${Tn}ms ${mn}`:Q==="opening"||mt?`opacity ${Tn}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},Yt=(g,ue)=>{const Te=xt(g);return Te?By(ji(Te,ue,N),ue,N):null},wt=g=>ue=>{if(!s){if(F.current){F.current=!1;return}ue.stopPropagation(),Lt(g)}},Ot=He?Yt(He,"left"):null,jt=Ze?Yt(Ze,"right"):null,Bt=Ot?Bo(Ot,N):null,vt=jt?Bo(jt,N):null;return r.jsxs("div",{ref:M,className:[`${e}-lightbox`,l?`${e}-lightbox-editor`:"",s?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Q==="open"?"none":void 0},onClick:Xe,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:ze?Nt:0,transition:be?"none":`opacity ${Tn}ms ${mn}`,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:A,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:ze?1:0,transition:be?"none":`opacity ${Tn}ms ${mn}`,pointerEvents:"none"},children:r.jsx(nc,{prefix:e,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:c,onClose:Xe})})]}),ze&&ht&&r.jsx(Do,{media:ht,style:Ft(ht,"left","far"),onMeasure:ot,onTransitionEnd:Ye},`far-prev-${ht.url}`),ze&&He&&r.jsxs(r.Fragment,{children:[r.jsx(Do,{media:He,style:Ft(He,"left"),onMeasure:ot,onTransitionEnd:Ye},`prev-${He.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:s||be?"default":"pointer",pointerEvents:s||be?"none":"auto",zIndex:3},onClick:wt(-1)})]}),ze&&Ze&&r.jsxs(r.Fragment,{children:[r.jsx(Do,{media:Ze,style:Ft(Ze,"right"),onMeasure:ot,onTransitionEnd:Ye},`next-${Ze.url}`),vt&&r.jsx("div",{style:{position:"absolute",top:vt.top,left:vt.left,width:vt.width,height:vt.height,cursor:s||be?"default":"pointer",pointerEvents:s||be?"none":"auto",zIndex:3},onClick:wt(1)})]}),ze&&Rt&&r.jsx(Do,{media:Rt,style:Ft(Rt,"right","far"),onMeasure:ot,onTransitionEnd:Ye},`far-next-${Rt.url}`),Y&&O&&(Oe?r.jsx(Gy,{src:O.url,phase:Q,onMediaElement:qt,wrapperStyle:Vt,videoStyle:Kt,onLoadedMetadata:ft,onTransitionEnd:Ye},`${n}-${O.url}`):r.jsx("img",{ref:qt,src:O.url,alt:O.name,onLoad:ft,onTransitionEnd:Ye,style:Vt},`${n}-${O.url}`))]})}const Ky=20,Uy=.18;function Xy(e){return`
17546
+ `}const Cn=500,Xi=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",$y=72,Cy=50,Ty=1e4,Ly=650,Iy=500;function Ry(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 yc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=or(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 Ey(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?yc(i,n):null}function ky(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 Ji(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 ol(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Ji(e,i,n)}const My=.03;function vc(e){return e.width*My}const ta={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Do(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function rl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Py(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ya(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 Ay(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ya(e,t.width,t.height)}function Fy(e,t){if(Ir(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 Wy(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 _y({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=>Ir(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 ji(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=vc(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 lr(e,t,n){const i=ji(e,t,n);return{...i,left:2*i.left-e.left}}function Ny(e,t,n){const{left:i,width:o}=n,s=vc(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 xc(e,t,n,i){const o=ji(e,"left",i),s=ji(e,"right",i),l=lr(e,"left",i),d=lr(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 Hy(e,t,n,i){const{start:o,end:s}=xc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function jy(e,t,n){const i=ji(e,t,n),o=lr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ir(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Oy({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 Vo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Ir(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 zy({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:b,resolveCloseSourceRect:T,onClose:f,onPrev:L,onNext:$}){const R=a.useRef(null),P=a.useRef(null),C=a.useRef(null),X=a.useRef(new Map),[E,B]=a.useState(0),I=a.useRef(null),w=a.useRef(0),W=a.useRef(0),h=a.useRef("none"),S=a.useRef(!1),k=a.useRef(!1),D=a.useRef(!1),U=a.useRef(null),ae=a.useRef(null),Y=a.useRef(null),G=a.useRef(()=>{}),H=a.useRef(null),F=a.useRef(null),A=a.useRef(null),K=a.useRef(!1),[q,ee]=a.useState(null),[N,ue]=a.useState(ta),[v,ye]=a.useState(0),[Z,ce]=a.useState("opening"),[$e,ne]=a.useState(0),[ve,J]=a.useState(0),[pe,he]=a.useState(!1),[Ae,be]=a.useState(null),[We,Q]=a.useState(null),[le,xe]=a.useState(null),[O,se]=a.useState(!1),[fe,Se]=a.useState(null),[Ie,we]=a.useState(!1),_=a.useRef(!1),[de,oe]=a.useState(!1),[z,re]=a.useState(!1),ke=a.useRef(n),ie=a.useRef(void 0),j=t[n],Ne=j?Ir(j):!1,Me=ve!==0||pe,et=!l&&(!s||!!d),Ye=c&&!l,lt=u.length>1,mt=a.useCallback((g,me)=>t.length<=1?null:t[(g+me+t.length)%t.length]??null,[t]),De=lt?Ji(u,m,-1):mt(n,-1),ot=lt?Ji(u,m,1):mt(n,1),$t=Ae===-1&&Me?lt&&We!==null?Ji(u,We,-1):le!==null?mt(le,-1):null:null,rt=Ae===1&&Me?lt&&We!==null?Ji(u,We,1):le!==null?mt(le,1):null:null,Ue=$t&&$t.url!==(De==null?void 0:De.url)?$t:null,ht=rt&&rt.url!==(ot==null?void 0:ot.url)?rt:null,xt=De&&Ye?(()=>{const g=lt?ol(u,m,-1):t.length>2?mt((n-1+t.length)%t.length,-1):null;return g&&g.url!==De.url?g:null})():null,dt=ot&&Ye?(()=>{const g=lt?ol(u,m,1):t.length>2?mt((n+1)%t.length,1):null;return g&&g.url!==ot.url?g:null})():null,kt=Ue??xt,_t=ht??dt,Qe=a.useCallback((g,me,Re)=>{if(!g||!me||!Re)return;const Le=X.current,Ze=Le.get(g);(Ze==null?void 0:Ze.width)===me&&(Ze==null?void 0:Ze.height)===Re||(Le.set(g,{width:me,height:Re}),B(Et=>Et+1))},[]),Tt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const me=X.current.get(g.url);return Ay(P.current,me)},[E,v]),Lt=a.useCallback(()=>{if(!j)return;const g=Tt(j);if(g){ee(g);return}const me=P.current;me&&ee(rl(me))},[j,Tt]),Ge=a.useCallback(g=>{if(lt){const me=u.length;Q((m+g+me)%me),xe(null);return}t.length>1&&(xe((n+g+t.length)%t.length),Q(null))},[lt,u.length,m,t.length,n]),qe=a.useCallback(g=>{D.current=g,he(g)},[]),Pe=a.useCallback(()=>{U.current!==null&&(window.clearTimeout(U.current),U.current=null)},[]),gt=a.useCallback(()=>{Pe(),U.current=window.setTimeout(()=>{Pe(),qe(!1)},Xi+32)},[Pe,qe]),It=a.useCallback(()=>{const g=R.current;if(!g){ue({left:0,top:0,width:typeof window<"u"?window.innerWidth:ta.width,height:typeof window<"u"?window.innerHeight:ta.height});return}const me=g.getBoundingClientRect();ue({left:me.left,top:me.top,width:me.width,height:me.height})},[]),Mt=a.useCallback((g,me)=>{if(Me){if(de&&!pe)return`translate(${ve}px, 0px)`;if(pe&&Ae!==null){const Re=Tt(g);if(!Re)return;const{x:Le,y:Ze}=Hy(Re,me,Ae,N);return`translate(${Le}px, ${Ze}px)`}if(pe)return"translate(0px, 0px)"}},[Me,de,pe,ve,Ae,N,Tt]),Dt=a.useCallback(()=>{const g=ae.current;ae.current=null,Pe(),qe(!1),be(null),Q(null),xe(null),J(0),oe(!1),S.current=!1,W.current=0,h.current="none",g===-1?L():g===1&&$()},[Pe,qe,L,$]),en=a.useCallback(()=>{Pe(),U.current=window.setTimeout(()=>{ae.current!==null&&Dt()},Xi+32)},[Pe,Dt]),on=a.useCallback(()=>{Pe(),ae.current=null,qe(!1),be(null),Q(null),xe(null),J(0),oe(!1),S.current=!1,W.current=0,h.current="none"},[Pe,qe]),bt=a.useCallback(g=>{if(!(!Ye||!q)){if(D.current){if(ae.current===g){Y.current=g,Dt();return}on()}Pe(),Ge(g),ae.current=g,be(g),qe(!0),en()}},[Ye,q,Dt,on,Pe,Ge,qe,en]);G.current=bt;const Rt=a.useCallback(()=>{H.current=null,K.current=!1,F.current!==null&&(window.clearInterval(F.current),F.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Ut=a.useCallback(g=>{F.current!==null&&window.clearInterval(F.current);const me=K.current?Iy:Ly;F.current=window.setInterval(()=>{G.current(g)},me)},[]),Kt=a.useCallback(g=>{H.current!==g&&(Rt(),H.current=g,K.current=!1,G.current(g),Ut(g),A.current=window.setTimeout(()=>{A.current=null,H.current===g&&(K.current=!0,Ut(g))},Ty))},[Rt,Ut]),ft=a.useCallback(()=>{const g=P.current;if(!g)return;const me=j==null?void 0:j.url,Re=me?X.current.get(me):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){ee(ya(g,Re.width,Re.height));return}const Le=C.current;if(Le&&me&&(Le.src===me||Le.currentSrc===me)){const{width:Et,height:Ve}=Py(Le);if(Et&&Ve){Qe(me,Et,Ve),ee(ya(g,Et,Ve));return}}const Ze=rl(g);!Ze.width||!Ze.height||ee(Ze)},[j==null?void 0:j.url,Qe]),Jt=a.useCallback(g=>{if(C.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(),ye(g=>g+1)},[It,ft]);a.useEffect(()=>{Ce();const g=P.current,me=R.current,Re=new ResizeObserver(()=>Ce());return g&&Re.observe(g),me&&Re.observe(me),window.addEventListener("resize",Ce),()=>{Re.disconnect(),window.removeEventListener("resize",Ce)}},[Ce,n,x]),a.useLayoutEffect(()=>{if(!j)return;const g=C.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,E]),a.useEffect(()=>{const g=new Set,me=[],Re=Le=>{!(Le!=null&&Le.url)||g.has(Le.url)||(g.add(Le.url),me.push(Le))};t.forEach(Re),u.forEach(Le=>Le.items.forEach(Re)),me.forEach(Le=>{X.current.has(Le.url)||Fy(Le,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(Z!=="opening"||!q)return;if(!b){ce("open");return}se(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),ce("open")})});return()=>cancelAnimationFrame(g)},[Z,q,b]),a.useEffect(()=>{if(Z!=="closing")return;const g=setTimeout(()=>f(),Cn);return()=>clearTimeout(g)},[Z,f]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{ke.current===n&&ie.current===(j==null?void 0:j.url)||(Pe(),ae.current=null,be(null),Q(null),xe(null),ne(0),J(0),qe(!1),re(!1),oe(!1),w.current=0,W.current=0,h.current="none",S.current=!1,I.current=null,k.current=!1,C.current=null,Lt(),ke.current=n,ie.current=j==null?void 0:j.url)},[n,j==null?void 0:j.url,qe,Pe,Lt]),a.useLayoutEffect(()=>{const g=Y.current;g!==null&&(Y.current=null,requestAnimationFrame(()=>{G.current(g)}))},[n,m,j==null?void 0:j.url]),a.useLayoutEffect(()=>{if(Z==="opening"){_.current=!1,we(!1);return}if(Z!=="open"||_.current)return;if(!De&&!ot){_.current=!0;return}we(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{we(!0),_.current=!0})});return()=>cancelAnimationFrame(g)},[Z,De==null?void 0:De.url,ot==null?void 0:ot.url]),a.useEffect(()=>{if(Z!=="open")return;const g=()=>{const Ve=it=>{it.stopPropagation(),it.preventDefault(),document.removeEventListener("click",Ve,!0)};document.addEventListener("click",Ve,!0)},me=Ve=>{const it=Ve<0?1:-1;Pe(),Ge(it),ae.current=it,be(it),qe(!0),en()},Re=Ve=>{if(Math.abs(Ve)>Cy&&Ye){me(Ve);return}ae.current=null,be(null),Q(null),xe(null),qe(!0),J(0),gt()},Le=Ve=>{if(Ve.touches.length!==1||D.current)return;const it=Ve.touches[0];k.current=!0,I.current={x:it.clientX,y:it.clientY},h.current="none",W.current=0,S.current=!1},Ze=Ve=>{if(!I.current||Ve.touches.length!==1||D.current)return;const it=Ve.touches[0],jt=it.clientX-I.current.x,St=it.clientY-I.current.y;if(h.current==="none"){if(Math.abs(jt)<10&&Math.abs(St)<10)return;if(Math.abs(jt)>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"){S.current=!0,oe(!0),W.current=jt,J(jt),Ve.preventDefault();return}h.current==="vertical"&&(S.current=!0,oe(!0),w.current=St,ne(St),Ve.preventDefault())},Et=()=>{if(!I.current)return;const Ve=h.current,it=S.current;if(it&&Ve==="horizontal")Re(W.current),g();else if(it&&Ve==="vertical"){const jt=w.current;if(et&&jt>$y){const St=window.innerHeight;w.current=St,re(!0),ne(St),ce("closing")}else w.current=0,ne(0);g()}else Ve==="horizontal"&&Math.abs(W.current)>0&&(Re(W.current),g());I.current=null,h.current="none",W.current=0,S.current=!1,oe(!1)};return document.addEventListener("touchstart",Le,{passive:!0}),document.addEventListener("touchmove",Ze,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Le),document.removeEventListener("touchmove",Ze),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[Z,Ye,qe,gt,Pe,et,en,Ge]);const Oe=a.useCallback(()=>{const g=(T==null?void 0:T())??b??null;g&&q&&(Se(g),se(!0)),ce("closing")},[T,b,q]);a.useEffect(()=>{const g=Le=>{if(Le.key==="Escape"){if(s&&d||Z==="closing")return;Rt(),Oe();return}if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight"||Z!=="open"||!Ye)return;Le.preventDefault();const Ze=Le.key==="ArrowLeft"?-1:1;Le.repeat&&H.current===Ze||Kt(Ze)},me=Le=>{if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight")return;const Ze=Le.key==="ArrowLeft"?-1:1;H.current===Ze&&Rt()},Re=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",me),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",me),window.removeEventListener("blur",Re),Rt()}},[Z,s,d,Oe,Ye,Kt,Rt]),a.useEffect(()=>{Z!=="open"&&Rt()},[Z,Rt]);const Ke=()=>{Z==="closing"||l||Oe()},He=Z==="open",ze=Z==="closing",ut=$e>0?Math.max(0,1-$e/500):1,_e=$e>0?Math.max(.35,1-$e/500):1,Je=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!D.current)){if(ae.current!==null){Dt();return}Pe(),qe(!1)}},[Pe,qe,Dt]),tt=Z==="closing"?fe??b:b,Wt=tt&&q&&(Z==="opening"||ze)?Ry(tt,q):void 0,Ct=Me&&j?Mt(j,"center"):$e>0?`translateY(${$e}px)`:Wt,st=q?Do(q,N):null,Nt=!!(tt&&q),At=Nt&&(Z==="closing"||Z==="open"&&O),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:Nt?1:Z==="opening"||ze?0:1,transition:de&&!pe?"none":pe?`transform ${Xi}ms ${mn}`:z?`transform ${Cn}ms ${mn}, opacity ${Cn}ms ${mn}`:At?`transform ${Cn}ms ${mn}`:Z==="opening"||ze?`opacity ${Cn}ms ${mn}`:"none",pointerEvents:Ne&&He&&!Me?"auto":"none",touchAction:Ne&&He?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},zt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:He&&!Me?"auto":"none"},Pt=(g,me,Re="adjacent")=>{const Le=Tt(g);if(!Le)return{display:"none"};const Ze=Re==="far"?me==="left"?"far-left":"far-right":me==="left"?"left-adjacent":"right-adjacent",{start:Et}=Ae!==null?xc(Le,Ze,Ae,N):{start:Re==="far"?lr(Le,me,N):ji(Le,me,N)},Ve=Do(Et,N),it=Mt(g,Ze),jt=!Me&&Re==="adjacent"&&He&&!Ie?jy(Le,me,N):null,St=Re==="far"&&Me&&Ae===(me==="left"?-1:1),cn=de&&!pe?!1:pe,un=Re==="adjacent"&&He&&Ie&&!Me;return{position:"absolute",top:Ve.top,left:Ve.left,width:Ve.width,height:Ve.height,objectFit:"contain",transform:it??(jt?`translate(${jt.x}px, ${jt.y}px)`:void 0),opacity:Re==="far"?He&&St?1:0:He?1:0,transition:cn?Re==="far"?`transform ${Xi}ms ${mn}`:`transform ${Xi}ms ${mn}, opacity ${Cn}ms ${mn}`:un?`transform ${Cn}ms ${mn}`:Z==="opening"||ze?`opacity ${Cn}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},Qt=(g,me)=>{const Re=Tt(g);return Re?Ny(ji(Re,me,N),me,N):null},wt=g=>me=>{if(!l){if(k.current){k.current=!1;return}me.stopPropagation(),bt(g)}},Gt=De?Qt(De,"left"):null,pt=ot?Qt(ot,"right"):null,Ft=Gt?Do(Gt,N):null,Bt=pt?Do(pt,N):null;return r.jsxs("div",{ref:R,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Z==="open"?"none":void 0},onClick:Ke,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:He?ut:0,transition:de?"none":`opacity ${Cn}ms ${mn}`,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:P,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:He?1:0,transition:de?"none":`opacity ${Cn}ms ${mn}`,pointerEvents:"none"},children:r.jsx(Ql,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Ke})})]}),He&&kt&&r.jsx(Vo,{media:kt,style:Pt(kt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${kt.url}`),He&&De&&r.jsxs(r.Fragment,{children:[r.jsx(Vo,{media:De,style:Pt(De,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${De.url}`),Ft&&r.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:wt(-1)})]}),He&&ot&&r.jsxs(r.Fragment,{children:[r.jsx(Vo,{media:ot,style:Pt(ot,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ot.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:wt(1)})]}),He&&_t&&r.jsx(Vo,{media:_t,style:Pt(_t,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${_t.url}`),q&&j&&(Ne?r.jsx(Oy,{src:j.url,phase:Z,onMediaElement:Jt,wrapperStyle:Vt,videoStyle:zt,onLoadedMetadata:ft,onTransitionEnd:Je},`${n}-${j.url}`):r.jsx("img",{ref:Jt,src:j.url,alt:j.name,onLoad:ft,onTransitionEnd:Je,style:Vt},`${n}-${j.url}`))]})}const By=20,Dy=.18;function Vy(e){return`
17607
17547
  .${e}-wrapper {
17608
17548
  box-sizing: border-box;
17609
17549
  max-width: 100%;
@@ -17622,18 +17562,6 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17622
17562
  overflow-wrap: anywhere;
17623
17563
  word-break: break-word;
17624
17564
  }
17625
- .${e}-type-a.${e}-wrapper,
17626
- .${e}-type-a .${e}-item-title {
17627
- text-align: left;
17628
- }
17629
- .${e}-type-b.${e}-wrapper,
17630
- .${e}-type-b .${e}-item-title {
17631
- text-align: center;
17632
- }
17633
- .${e}-type-c.${e}-wrapper,
17634
- .${e}-type-c .${e}-item-title {
17635
- text-align: right;
17636
- }
17637
17565
  .${e}-item-image {
17638
17566
  display: inline-block;
17639
17567
  vertical-align: baseline;
@@ -17643,9 +17571,6 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17643
17571
  width: calc(1cap * var(--${e}-image-aspect));
17644
17572
  margin: 0 var(--${e}-image-inline-gap);
17645
17573
  }
17646
- .${e}-item-image-fit {
17647
- width: calc(1cap * var(--${e}-item-media-aspect, var(--${e}-image-aspect)));
17648
- }
17649
17574
  .${e}-item-image img,
17650
17575
  .${e}-item-image video {
17651
17576
  position: absolute;
@@ -17659,6 +17584,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17659
17584
  }
17660
17585
  .${e}-item-image-hover-scale img,
17661
17586
  .${e}-item-image-hover-scale video {
17587
+ transform-origin: center center;
17662
17588
  transition: transform 0.3s ease;
17663
17589
  }
17664
17590
  .${e}-item-image-hover-scale:hover {
@@ -17690,12 +17616,11 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17690
17616
  z-index: 2;
17691
17617
  pointer-events: auto;
17692
17618
  }
17693
- ${Iy(e)}
17694
- `}function Yy(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,l]=n.split(":").map(Number),s=i?l:o,c=i?o:l;return c>0?s/c:1}function Zy(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function Jy(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:v.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:v.scalingValue(i*Uy,n??!1),[`--${t}-image-aspect`]:Yy(e)}}function Qy(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 Xt(n,t)}function ev(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function tv(e,t,n,i,o,l){if(!(!e||!t))return s=>{var d;const c=((d=s.currentTarget.closest(`.${i}-item`))==null?void 0:d.querySelector(`[data-waterfall-index="${n}"]`))??(s.currentTarget instanceof HTMLImageElement||s.currentTarget instanceof HTMLVideoElement?s.currentTarget:null);l(n,c?xc(c,o):void 0)}}function nv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:l,portalId:s}){const{prefix:c}=v.useScopedStyles(),d=a.useMemo(()=>Xy(c),[c]),u=t??[],m=(e==null?void 0:e.type)??"a",x=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,w=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,$=v.scalingValue(w,n??!1),f=`max(${$}, ${Ky}px)`,{objectFitMode:S,imageStyle:L}=ev(e),M=Qy(e,n),A=a.useRef(null),[C,J]=a.useState(!1),[k,U]=a.useState([]),[I,R]=a.useState(0),[T,y]=a.useState(0),[h,F]=a.useState(null),[W,V]=a.useState({title1:"",title2:"",title3:""}),ne=(!n||i)&&!C,X=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},z=X.sizeType??"none",H=ne&&z!=="none"?`${c}-item-image-hover-${z}`:void 0,_=(X.value??120)/100,E=a.useCallback(ie=>{!ie||z!=="scale"||(ie.style.transformOrigin=Ep(ie))},[z]),q=a.useCallback(ie=>{if(ie){if(S==="contain"){const B=Zy(ie);if(B){const le=ie.closest(`.${c}-item-image`);le instanceof HTMLElement&&le.style.setProperty(`--${c}-item-media-aspect`,String(B))}}E(ie)}},[c,E,S]),Y={width:v.scalingValue(x,n??!1),...M,...Jy(e,c,n),[`--${c}-image-hover-scale`]:String(_)},ee=(()=>{const ie={},B=A.current?getComputedStyle(A.current).getPropertyValue("--cntrl-article-width").trim():"";return B&&(ie["--cntrl-article-width"]=B),ie})(),N=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),pe=a.useMemo(()=>Wy(u),[u]),b=a.useMemo(()=>jy(u),[u]),ye=(ie,B)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const le=pe.findIndex(ke=>ke.gridIndex===ie);if(le<0)return;const re=pe[le];y(le),U(re.items),R(0),V(re.entry),F(B??null),J(!0)},Q=a.useCallback(()=>{J(!1),F(null)},[]),xe=a.useCallback(()=>{const ie=pe[T];return!ie||!A.current?h:Fy(A.current,ie.gridIndex,S)??h},[pe,T,h,S]),$e=a.useCallback(ie=>{if(pe.length>1){const B=pe.length,le=(T+ie+B)%B,re=pe[le];y(le),U(re.items),R(0),V(re.entry);return}R(B=>(B+ie+k.length)%k.length)},[pe,T,k.length]),oe=pe.length>1||k.length>1;return a.useEffect(()=>{if(!C||typeof document>"u")return;const ie=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ie}},[C]),a.useEffect(()=>{!n||o||i||J(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&J(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),r.jsx(zy,{mediaList:b}),r.jsx("div",{ref:A,className:`${c}-wrapper ${c}-type-${m}`,style:Y,children:u.map((ie,B)=>{var ke,fe;const le=!!((ke=ie.image)!=null&&ke.url),re=tv(!!N,le,B,c,S,ye);return r.jsxs("div",{className:`${c}-item`,children:[ie.title?r.jsx("span",{className:`${c}-item-title`,onClick:re,style:re?{cursor:"pointer"}:void 0,children:ie.title}):null,(fe=ie.image)!=null&&fe.url?r.jsx("span",{className:[`${c}-item-image`,S==="contain"?`${c}-item-image-fit`:void 0,H].filter(Boolean).join(" "),children:ie.image.type==="video"?r.jsx("video",{ref:q,src:ie.image.url,"data-waterfall-index":B,style:L,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:re,onLoadedData:Pe=>q(Pe.currentTarget)}):r.jsx("img",{ref:q,src:ie.image.url,alt:ie.image.name??"","data-waterfall-index":B,style:L,onClick:re,onLoad:Pe=>q(Pe.currentTarget)})}):null,B<u.length-1&&r.jsx("div",{className:`${c}-item-gap-host`,style:{width:$},children:o&&!C&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${c}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:f,height:"100%"}})})]},B)})}),C&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ie=(s?document.getElementById(s):null)??document.body;return gi.createPortal(r.jsx("div",{style:ee,"data-selection":"none",children:r.jsx(qy,{prefix:c,items:k,index:I,entry:W,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:oe,lightboxEntries:pe,entryIdx:T,layoutId:l,sourceRect:h,resolveCloseSourceRect:xe,onClose:Q,onPrev:()=>$e(-1),onNext:()=>$e(1)})}),ie)})()]})}const iv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17619
+ ${Sy(e)}
17620
+ `}function Gy(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,s]=n.split(":").map(Number),l=i?s:o,d=i?o:s;return d>0?l/d:1}function qy(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:y.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:y.scalingValue(i*Dy,n??!1),[`--${t}-image-aspect`]:Gy(e)}}function Ky(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 Xt(n,t)}function Uy(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function Xy(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?yc(d,o):void 0)}}function Yy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),c=a.useMemo(()=>Vy(d),[d]),u=t??[],m=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,b=y.scalingValue(x,n??!1),T=`max(${b}, ${By}px)`,{objectFitMode:f,imageStyle:L}=Uy(e),$=Ky(e,n),R=a.useRef(null),[P,C]=a.useState(!1),[X,E]=a.useState([]),[B,I]=a.useState(0),[w,W]=a.useState(0),[h,S]=a.useState(null),[k,D]=a.useState({title1:"",title2:"",title3:""}),U=(!n||i)&&!P,ae=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},Y=ae.sizeType??"none",G=U&&Y!=="none"?`${d}-item-image-hover-${Y}`:void 0,H=(ae.value??120)/100,F={width:y.scalingValue(m,n??!1),...$,...qy(e,d,n),[`--${d}-image-hover-scale`]:String(H)},A=(()=>{const ce={},$e=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return $e&&(ce["--cntrl-article-width"]=$e),ce})(),K=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),q=a.useMemo(()=>ky(u),[u]),ee=a.useMemo(()=>Wy(u),[u]),N=(ce,$e)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const ne=q.findIndex(J=>J.gridIndex===ce);if(ne<0)return;const ve=q[ne];W(ne),E(ve.items),I(0),D(ve.entry),S($e??null),C(!0)},ue=a.useCallback(()=>{C(!1),S(null)},[]),v=a.useCallback(()=>{const ce=q[w];return!ce||!R.current?h:Ey(R.current,ce.gridIndex,f)??h},[q,w,h,f]),ye=a.useCallback(ce=>{if(q.length>1){const $e=q.length,ne=(w+ce+$e)%$e,ve=q[ne];W(ne),E(ve.items),I(0),D(ve.entry);return}I($e=>($e+ce+X.length)%X.length)},[q,w,X.length]),Z=q.length>1||X.length>1;return a.useEffect(()=>{if(!P||typeof document>"u")return;const ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ce}},[P]),a.useEffect(()=>{!n||o||i||C(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&C(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(_y,{mediaList:ee}),r.jsx("div",{ref:R,className:`${d}-wrapper`,style:F,children:u.map((ce,$e)=>{var J,pe;const ne=!!((J=ce.image)!=null&&J.url),ve=Xy(!!K,ne,$e,d,f,N);return r.jsxs("div",{className:`${d}-item`,children:[ce.title?r.jsx("span",{className:`${d}-item-title`,onClick:ve,style:ve?{cursor:"pointer"}:void 0,children:ce.title}):null,(pe=ce.image)!=null&&pe.url?r.jsx("span",{className:[`${d}-item-image`,G].filter(Boolean).join(" "),children:ce.image.type==="video"?r.jsx("video",{src:ce.image.url,"data-waterfall-index":$e,style:L,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:ve}):r.jsx("img",{src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":$e,style:L,onClick:ve})}):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:T,height:"100%"}})})]},$e)})}),P&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ce=(l?document.getElementById(l):null)??document.body;return gi.createPortal(r.jsx("div",{style:A,"data-selection":"none",children:r.jsx(zy,{prefix:d,items:X,index:B,entry:k,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Z,lightboxEntries:q,entryIdx:w,layoutId:s,sourceRect:h,resolveCloseSourceRect:v,onClose:ue,onPrev:()=>ye(-1),onNext:()=>ye(1)})}),ce)})()]})}const Zy=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17695
17621
  import type React from 'react';
17696
17622
  import { createPortal } from 'react-dom';
17697
17623
  import { CommonComponentProps } from '../props';
17698
- import { getContainedMediaTransformOrigin } from '../utils/getImageRect';
17699
17624
  import { scalingValue, useScopedStyles } from '../utils/index';
17700
17625
  import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
17701
17626
  import {
@@ -17719,7 +17644,6 @@ export type WaterfallContentItem = {
17719
17644
  };
17720
17645
 
17721
17646
  export type WaterfallSettings = {
17722
- type?: 'a' | 'b' | 'c';
17723
17647
  wrapperWidth?: number;
17724
17648
  imageDisplay?: {
17725
17649
  display: 'fit' | 'cover';
@@ -17777,18 +17701,6 @@ function getCSS(P: string): string {
17777
17701
  overflow-wrap: anywhere;
17778
17702
  word-break: break-word;
17779
17703
  }
17780
- .\${P}-type-a.\${P}-wrapper,
17781
- .\${P}-type-a .\${P}-item-title {
17782
- text-align: left;
17783
- }
17784
- .\${P}-type-b.\${P}-wrapper,
17785
- .\${P}-type-b .\${P}-item-title {
17786
- text-align: center;
17787
- }
17788
- .\${P}-type-c.\${P}-wrapper,
17789
- .\${P}-type-c .\${P}-item-title {
17790
- text-align: right;
17791
- }
17792
17704
  .\${P}-item-image {
17793
17705
  display: inline-block;
17794
17706
  vertical-align: baseline;
@@ -17798,9 +17710,6 @@ function getCSS(P: string): string {
17798
17710
  width: calc(1cap * var(--\${P}-image-aspect));
17799
17711
  margin: 0 var(--\${P}-image-inline-gap);
17800
17712
  }
17801
- .\${P}-item-image-fit {
17802
- width: calc(1cap * var(--\${P}-item-media-aspect, var(--\${P}-image-aspect)));
17803
- }
17804
17713
  .\${P}-item-image img,
17805
17714
  .\${P}-item-image video {
17806
17715
  position: absolute;
@@ -17814,6 +17723,7 @@ function getCSS(P: string): string {
17814
17723
  }
17815
17724
  .\${P}-item-image-hover-scale img,
17816
17725
  .\${P}-item-image-hover-scale video {
17726
+ transform-origin: center center;
17817
17727
  transition: transform 0.3s ease;
17818
17728
  }
17819
17729
  .\${P}-item-image-hover-scale:hover {
@@ -17859,13 +17769,6 @@ function getImageAspectRatio(settings: WaterfallSettings | undefined): number {
17859
17769
  return effH > 0 ? effW / effH : 1;
17860
17770
  }
17861
17771
 
17862
- function getMediaAspectRatio(media: HTMLImageElement | HTMLVideoElement): number | null {
17863
- const mediaW = media instanceof HTMLVideoElement ? media.videoWidth : media.naturalWidth;
17864
- const mediaH = media instanceof HTMLVideoElement ? media.videoHeight : media.naturalHeight;
17865
- if (!mediaW || !mediaH) return null;
17866
- return mediaW / mediaH;
17867
- }
17868
-
17869
17772
  function getWaterfallTextMetricsVars(
17870
17773
  settings: WaterfallSettings | undefined,
17871
17774
  varPrefix: string,
@@ -17952,7 +17855,6 @@ export function Waterfall({
17952
17855
  const { prefix: P } = useScopedStyles();
17953
17856
  const scopedCss = useMemo(() => getCSS(P), [P]);
17954
17857
  const items = content ?? [];
17955
- const type = settings?.type ?? 'a';
17956
17858
  const wrapperWidth = typeof settings?.wrapperWidth === 'number' ? settings.wrapperWidth : 1;
17957
17859
  const horizontalGap = typeof settings?.horizontalGap === 'number' ? settings.horizontalGap : 0;
17958
17860
  const horizontalGapScaled = scalingValue(horizontalGap, isEditor ?? false);
@@ -17976,31 +17878,6 @@ export function Waterfall({
17976
17878
  : undefined;
17977
17879
  const imageHoverScale = (imageHoverEffect.value ?? 120) / 100;
17978
17880
 
17979
- const applyScaleTransformOrigin = useCallback((
17980
- media: HTMLImageElement | HTMLVideoElement | null,
17981
- ) => {
17982
- if (!media || imageHoverType !== 'scale') return;
17983
- media.style.transformOrigin = getContainedMediaTransformOrigin(media);
17984
- }, [imageHoverType]);
17985
-
17986
- const syncFitMediaLayout = useCallback((
17987
- media: HTMLImageElement | HTMLVideoElement | null,
17988
- ) => {
17989
- if (!media) return;
17990
-
17991
- if (objectFitMode === 'contain') {
17992
- const aspect = getMediaAspectRatio(media);
17993
- if (aspect) {
17994
- const wrapper = media.closest(\`.\${P}-item-image\`);
17995
- if (wrapper instanceof HTMLElement) {
17996
- wrapper.style.setProperty(\`--\${P}-item-media-aspect\`, String(aspect));
17997
- }
17998
- }
17999
- }
18000
-
18001
- applyScaleTransformOrigin(media);
18002
- }, [P, applyScaleTransformOrigin, objectFitMode]);
18003
-
18004
17881
  const wrapperStyle = {
18005
17882
  width: scalingValue(wrapperWidth, isEditor ?? false),
18006
17883
  ...inlineTitleStyle,
@@ -18090,7 +17967,7 @@ export function Waterfall({
18090
17967
  <>
18091
17968
  <style dangerouslySetInnerHTML={{ __html: scopedCss }} />
18092
17969
  <PreloadedMediaPool mediaList={allMedia} />
18093
- <div ref={containerRef} className={\`\${P}-wrapper \${P}-type-\${type}\`} style={wrapperStyle}>
17970
+ <div ref={containerRef} className={\`\${P}-wrapper\`} style={wrapperStyle}>
18094
17971
  {items.map((item, index) => {
18095
17972
  const hasLightbox = Boolean(item.image?.url);
18096
17973
  const handleOpen = createWaterfallItemOpenHandler(
@@ -18117,16 +17994,9 @@ export function Waterfall({
18117
17994
  </span>
18118
17995
  ) : null}
18119
17996
  {item.image?.url ? (
18120
- <span
18121
- className={[
18122
- \`\${P}-item-image\`,
18123
- objectFitMode === 'contain' ? \`\${P}-item-image-fit\` : undefined,
18124
- imageHoverClass,
18125
- ].filter(Boolean).join(' ')}
18126
- >
17997
+ <span className={[\`\${P}-item-image\`, imageHoverClass].filter(Boolean).join(' ')}>
18127
17998
  {item.image.type === 'video' ? (
18128
17999
  <video
18129
- ref={syncFitMediaLayout}
18130
18000
  src={item.image.url}
18131
18001
  data-waterfall-index={index}
18132
18002
  style={imageStyle}
@@ -18135,17 +18005,14 @@ export function Waterfall({
18135
18005
  loop
18136
18006
  autoPlay
18137
18007
  onClick={handleOpen}
18138
- onLoadedData={(e) => syncFitMediaLayout(e.currentTarget)}
18139
18008
  />
18140
18009
  ) : (
18141
18010
  <img
18142
- ref={syncFitMediaLayout}
18143
18011
  src={item.image.url}
18144
18012
  alt={item.image.name ?? ''}
18145
18013
  data-waterfall-index={index}
18146
18014
  style={imageStyle}
18147
18015
  onClick={handleOpen}
18148
- onLoad={(e) => syncFitMediaLayout(e.currentTarget)}
18149
18016
  />
18150
18017
  )}
18151
18018
  </span>
@@ -18205,7 +18072,7 @@ export function Waterfall({
18205
18072
  </>
18206
18073
  );
18207
18074
  }
18208
- `,ov="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>'),zn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",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 rv(e){const t={};return t[Ge(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ge(e,"fontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ge(e,"fontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ge(e,"lineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ge(e,"letterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ge(e,"wordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ge(e,"textAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ge(e,"textAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const zi=Un.filter(e=>e!=="count"),av=zi.reduce((e,t)=>({...e,...rv(t)}),{}),lv=zi.reduce((e,t)=>({...e,[Ge(t,"fontFamily")]:"Arial",[Ge(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ge(t,"letterSpacing")]:0,[Ge(t,"wordSpacing")]:0,[Ge(t,"textAlign")]:"left",[Ge(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ta(e){return zi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ge(n,"fontSize")]=i),o!==void 0&&(t[Ge(n,"lineHeight")]=o),t},{})}const sv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(zi.map(e=>[Oa[e],ja(e)]))},Vo={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},cv=[{title:"Salton Sea from Above",...Vo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Vo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Vo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Vo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],dv={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:cv},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},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"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},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:{...zn.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"]}}},...av},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:ov,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...lv},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...ta({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...ta({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...ta({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","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__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{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:[sv]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},uv={element:nv,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...zi.map(e=>({path:`${Ge(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...zi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ge(t,"fontFamily")}`}),{})},schema:dv,sourceCode:iv},ls="500ms",ss={color:"#000000",hover:"#cccccc"},Zi={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},pv={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},na={offset:{x:0,y:0},linkColor:"#cccccc"},cs={sizeType:"drag",value:3},mv="left";function gv(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)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:mv,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function xi(e,t,n){return`${e}: ${v.scalingValue(t/1440,n)};`}function hv(e,t){return`
18075
+ `,Jy="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>'),On={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 Qy(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...On.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...On.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...On.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...On.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...On.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...On.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...On.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Oi=Kn.filter(e=>e!=="count"),ev=Oi.reduce((e,t)=>({...e,...Qy(t)}),{}),tv=Oi.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Arial",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function na(e){return Oi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const nv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Oi.map(e=>[Oa[e],za(e)]))},Go={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},iv=[{title:"Salton Sea from Above",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],ov={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:iv},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"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},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:{...On.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"]}}},...ev},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Jy,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...tv},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...na({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...na({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...na({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","wrapperWidth","imageDisplay","lightbox","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__",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{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:[nv]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},rv={element:Yy,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},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:`${Be(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Oi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})},schema:ov,sourceCode:Zy},al="500ms",sl={color:"#000000",hover:"#cccccc"},Yi={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},av={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},ia={offset:{x:0,y:0},linkColor:"#cccccc"},ll={sizeType:"drag",value:3},sv="left";function lv(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)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:sv,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function bi(e,t,n){return`${e}: ${y.scalingValue(t/1440,n)};`}function cv(e,t){return`
18209
18076
  .${e}-wrapper {
18210
18077
  position: relative;
18211
18078
  width: 100%;
@@ -18241,29 +18108,29 @@ export function Waterfall({
18241
18108
  top: 50%;
18242
18109
  z-index: 1;
18243
18110
  padding: 0;
18244
- ${xi("width",30,t)}
18245
- ${xi("height",30,t)}
18111
+ ${bi("width",30,t)}
18112
+ ${bi("height",30,t)}
18246
18113
  transition: opacity 0.15s ease-in-out;
18247
18114
  }
18248
18115
  .${e}-arrow-prev {
18249
- ${xi("left",-20,t)}
18116
+ ${bi("left",-20,t)}
18250
18117
  transform: translate3d(-50%, -50%, 0);
18251
18118
  }
18252
18119
  .${e}-arrow-next {
18253
18120
  left: unset;
18254
- ${xi("right",-20,t)}
18121
+ ${bi("right",-20,t)}
18255
18122
  transform: translate3d(50%, -50%, 0);
18256
18123
  }
18257
18124
  .${e}-arrow-prev-vertical {
18258
18125
  left: 50%;
18259
- ${xi("top",-20,t)}
18126
+ ${bi("top",-20,t)}
18260
18127
  transform: translate3d(-50%, -50%, 0);
18261
18128
  }
18262
18129
  .${e}-arrow-next-vertical {
18263
18130
  left: 50%;
18264
18131
  right: unset;
18265
18132
  top: unset;
18266
- ${xi("bottom",-20,t)}
18133
+ ${bi("bottom",-20,t)}
18267
18134
  transform: translate3d(-50%, 50%, 0);
18268
18135
  }
18269
18136
  .${e}-arrow-hidden {
@@ -18407,7 +18274,7 @@ export function Waterfall({
18407
18274
  from { clip-path: inset(100% 0 0 0); }
18408
18275
  to { clip-path: inset(0 0 0 0); }
18409
18276
  }
18410
- `}function fv({settings:e,content:t,isEditor:n}){const{prefix:i}=v.useScopedStyles(),[o,l]=a.useState(null),s=gv(e,n),[c,d]=a.useState(void 0),[u,m]=a.useState(null),[x,w]=a.useState(0),[$,f]=a.useState(!1),[S,L]=a.useState(0),M=t??[],A=(e==null?void 0:e.trigger)??cs,C=A.sizeType??"drag",J=A.value??cs.value,k=(e==null?void 0:e.direction)??"horizontal",U=(e==null?void 0:e.transition)??"slide",I=(e==null?void 0:e.nav)??"classic",R=(e==null?void 0:e.navSize)??"m",T=pv[R],y=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,h=ve=>v.scalingValue(ve*y,n),F=(e==null?void 0:e.show)??"always",W=(e==null?void 0:e.controls)??null,V=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,ne=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,X=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,z=(e==null?void 0:e.controlsColor)??ss.color,H=(e==null?void 0:e.controlsHoverColor)??ss.hover,_=(e==null?void 0:e.navColor)??Zi.colors.inactive,E=(e==null?void 0:e.navPaginationColor)??Zi.colors.pagination,q=(e==null?void 0:e.navBackgroundColor)??Zi.colors.background,Y=(e==null?void 0:e.linkColor)??na.linkColor,ee=k==="horizontal",N=C==="click",pe=C==="drag",b=C==="auto",ye=U==="fade in"||U==="reveal",Q=I==="classic",xe=F!=="never",$e=F==="on hover",oe=a.useRef(U),ie=a.useRef(C),B=a.useRef(J),le=a.useRef(k),re=a.useRef(I),ke=v.scalingValue(V,n),fe={width:ke,height:ke,maxWidth:ke},Pe=ve=>{o&&o.go(ve)};return a.useEffect(()=>{if(!$)return;const ve=window.setTimeout(()=>f(!1),300);return()=>window.clearTimeout(ve)},[$,x]),a.useEffect(()=>{if(!u)return;const ve=new ResizeObserver(we=>{if(!o)return;const[Se]=we;d({width:Math.round(Se.contentRect.width),height:Math.round(Se.contentRect.height)})});return ve.observe(u),()=>ve.unobserve(u)},[u]),a.useEffect(()=>{oe.current!==U&&(L(ve=>ve+1),oe.current=U)},[U]),a.useEffect(()=>{ie.current!==C&&(L(ve=>ve+1),ie.current=C)},[C]),a.useEffect(()=>{B.current!==J&&(L(ve=>ve+1),B.current=J)},[J]),a.useEffect(()=>{le.current!==k&&(L(ve=>ve+1),le.current=k)},[k]),a.useEffect(()=>{re.current!==I&&(L(ve=>ve+1),re.current=I)},[I]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:hv(i,n)}}),r.jsxs("div",{className:at(`${i}-wrapper`,{[`${i}-transition-reveal`]:U==="reveal",[`${i}-transition-reveal-vertical`]:U==="reveal"&&!ee}),ref:m,children:[r.jsxs("div",{className:`${i}-slider-inner`,style:{width:c?c.width:"100%",height:c?c.height:"100%",backgroundColor:"transparent"},children:[r.jsx(br,{onMove:ve=>{f(!0),w(ve.index)},ref:l,options:{arrows:!1,speed:parseInt(ls),autoplay:b,...b&&{interval:J*1e3},direction:ee||ye?"ltr":"ttb",pagination:!1,drag:pe,perPage:1,width:c?c.width:"100%",height:c?c.height:"100%",type:ye?"fade":"loop",rewind:!0},children:M.map((ve,we)=>r.jsx(xr,{children:r.jsx("div",{className:`${i}-slider-item`,children:r.jsx("div",{className:`${i}-img-wrapper`,children:r.jsx("img",{className:at(`${i}-slider-image`,{[`${i}-contain`]:ve.image.objectFit==="contain",[`${i}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.url,alt:ve.image.name??""})})})},we))},S),xe&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:at(`${i}-arrow`,{[`${i}-arrow-prev`]:ee,[`${i}-arrow-prev-vertical`]:!ee,[`${i}-hover-arrow`]:$e}),style:{color:z,"--arrow-hover-color":H,...fe},children:r.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Pe("-1")},className:`${i}-arrow-inner`,style:{transform:`translate(${v.scalingValue(ne,n)}, ${v.scalingValue(X*(ee?1:-1),n)}) rotate(${ee?"0deg":"90deg"})`},children:[W&&r.jsx(on,{url:W,fill:z,hoverFill:H,className:at(`${i}-arrow-img`,`${i}-mirror`),style:fe}),!W&&r.jsx(ds,{color:z,className:at(`${i}-arrow-icon`,`${i}-arrow-img`,`${i}-mirror`)})]})}),r.jsx("div",{className:at(`${i}-arrow`,{[`${i}-arrow-next`]:ee,[`${i}-arrow-next-vertical`]:!ee,[`${i}-hover-arrow`]:$e}),style:{color:z,"--arrow-hover-color":H,...fe},children:r.jsxs("button",{className:`${i}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Pe("+1")},style:{transform:`translate(${v.scalingValue(ne*(ee?-1:1),n)}, ${v.scalingValue(X,n)}) rotate(${ee?"0deg":"90deg"})`},children:[W&&r.jsx(on,{url:W,fill:z,hoverFill:H,className:`${i}-arrow-img`,style:fe}),!W&&r.jsx(ds,{color:z,className:at(`${i}-arrow-icon`,`${i}-arrow-img`)})]})})]}),N&&r.jsx("div",{className:`${i}-click-overlay`,onClick:()=>{o&&o.go("+1")}}),Q&&r.jsx("div",{className:at(`${i}-pagination`,{[`${i}-pagination-inside-bottom`]:ee,[`${i}-pagination-inside-left`]:!ee}),style:ee?{bottom:h(T.inset)}:{left:h(T.inset)},children:r.jsx("div",{className:at(`${i}-pagination-inner`,{[`${i}-pagination-vertical`]:!ee,[`${i}-animate-dots`]:$}),style:{backgroundColor:q,gap:h(T.gapInactive-T.activeDot+T.dot),...ee?{height:h(T.activeDot+T.paddingY*2),paddingTop:h(T.paddingY),paddingBottom:h(T.paddingY),paddingLeft:h(T.paddingActive),paddingRight:h(T.paddingActive)}:{width:h(T.activeDot+T.paddingY*2),paddingLeft:h(T.paddingY),paddingRight:h(T.paddingY),paddingTop:h(T.paddingActive),paddingBottom:h(T.paddingActive)},borderRadius:h(T.borderRadius),transform:`translate(${v.scalingValue(Zi.offset.x,n)}, ${v.scalingValue(Zi.offset.y,n)})`},children:M.map((ve,we)=>{const Se=we===x,G=Se?T.activeDot:T.dot;return r.jsx("button",{onClick:()=>{o&&o.go(we)},className:`${i}-pagination-item`,style:{width:h(T.activeDot)},children:r.jsx("div",{className:`${i}-dot`,style:{backgroundColor:Se?E:_,width:h(G)}})},we)})},`${R}-${k}`)})]}),r.jsx("div",{className:`${i}-caption-block`,children:r.jsx("div",{className:`${i}-caption-text-wrapper`,children:M.map((ve,we)=>r.jsx("div",{className:at(`${i}-caption-text`,{[`${i}-with-pointer-events`]:we===x&&n,[`${i}-active`]:we===x}),style:{...s,width:"max-content",transitionDuration:`${Math.round(parseInt(ls)/2)}ms`},children:r.jsx("div",{className:`${i}-caption-text-inner`,style:{"--link-color":Y,"--link-hover-color":Y,position:"relative",top:v.scalingValue(na.offset.y,n),left:v.scalingValue(na.offset.x,n)},children:r.jsx(mi,{content:ve.imageCaption})})},we))})})]})]})}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 yv=`import React, { useState, useEffect, useRef } from 'react';
18277
+ `}function dv({settings:e,content:t,isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,s]=a.useState(null),l=lv(e,n),[d,c]=a.useState(void 0),[u,m]=a.useState(null),[x,b]=a.useState(0),[T,f]=a.useState(!1),[L,$]=a.useState(0),R=t??[],P=(e==null?void 0:e.trigger)??ll,C=P.sizeType??"drag",X=P.value??ll.value,E=(e==null?void 0:e.direction)??"horizontal",B=(e==null?void 0:e.transition)??"slide",I=(e==null?void 0:e.nav)??"classic",w=(e==null?void 0:e.navSize)??"m",W=av[w],h=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,S=Q=>y.scalingValue(Q*h,n),k=(e==null?void 0:e.show)??"always",D=(e==null?void 0:e.controls)??null,U=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,ae=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,Y=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,G=(e==null?void 0:e.controlsColor)??sl.color,H=(e==null?void 0:e.controlsHoverColor)??sl.hover,F=(e==null?void 0:e.navColor)??Yi.colors.inactive,A=(e==null?void 0:e.navPaginationColor)??Yi.colors.pagination,K=(e==null?void 0:e.navBackgroundColor)??Yi.colors.background,q=(e==null?void 0:e.linkColor)??ia.linkColor,ee=E==="horizontal",N=C==="click",ue=C==="drag",v=C==="auto",ye=B==="fade in"||B==="reveal",Z=I==="classic",ce=k!=="never",$e=k==="on hover",ne=a.useRef(B),ve=a.useRef(C),J=a.useRef(X),pe=a.useRef(E),he=a.useRef(I),Ae=y.scalingValue(U,n),be={width:Ae,height:Ae,maxWidth:Ae},We=Q=>{o&&o.go(Q)};return a.useEffect(()=>{if(!T)return;const Q=window.setTimeout(()=>f(!1),300);return()=>window.clearTimeout(Q)},[T,x]),a.useEffect(()=>{if(!u)return;const Q=new ResizeObserver(le=>{if(!o)return;const[xe]=le;c({width:Math.round(xe.contentRect.width),height:Math.round(xe.contentRect.height)})});return Q.observe(u),()=>Q.unobserve(u)},[u]),a.useEffect(()=>{ne.current!==B&&($(Q=>Q+1),ne.current=B)},[B]),a.useEffect(()=>{ve.current!==C&&($(Q=>Q+1),ve.current=C)},[C]),a.useEffect(()=>{J.current!==X&&($(Q=>Q+1),J.current=X)},[X]),a.useEffect(()=>{pe.current!==E&&($(Q=>Q+1),pe.current=E)},[E]),a.useEffect(()=>{he.current!==I&&($(Q=>Q+1),he.current=I)},[I]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:cv(i,n)}}),r.jsxs("div",{className:nt(`${i}-wrapper`,{[`${i}-transition-reveal`]:B==="reveal",[`${i}-transition-reveal-vertical`]:B==="reveal"&&!ee}),ref:m,children:[r.jsxs("div",{className:`${i}-slider-inner`,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:"transparent"},children:[r.jsx(br,{onMove:Q=>{f(!0),b(Q.index)},ref:s,options:{arrows:!1,speed:parseInt(al),autoplay:v,...v&&{interval:X*1e3},direction:ee||ye?"ltr":"ttb",pagination:!1,drag:ue,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:ye?"fade":"loop",rewind:!0},children:R.map((Q,le)=>r.jsx(wr,{children:r.jsx("div",{className:`${i}-slider-item`,children:r.jsx("div",{className:`${i}-img-wrapper`,children:r.jsx("img",{className:nt(`${i}-slider-image`,{[`${i}-contain`]:Q.image.objectFit==="contain",[`${i}-cover`]:Q.image.objectFit==="cover"}),src:Q.image.url,alt:Q.image.name??""})})})},le))},L),ce&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(`${i}-arrow`,{[`${i}-arrow-prev`]:ee,[`${i}-arrow-prev-vertical`]:!ee,[`${i}-hover-arrow`]:$e}),style:{color:G,"--arrow-hover-color":H,...be},children:r.jsxs("button",{onClick:Q=>{Q.stopPropagation(),We("-1")},className:`${i}-arrow-inner`,style:{transform:`translate(${y.scalingValue(ae,n)}, ${y.scalingValue(Y*(ee?1:-1),n)}) rotate(${ee?"0deg":"90deg"})`},children:[D&&r.jsx(rn,{url:D,fill:G,hoverFill:H,className:nt(`${i}-arrow-img`,`${i}-mirror`),style:be}),!D&&r.jsx(cl,{color:G,className:nt(`${i}-arrow-icon`,`${i}-arrow-img`,`${i}-mirror`)})]})}),r.jsx("div",{className:nt(`${i}-arrow`,{[`${i}-arrow-next`]:ee,[`${i}-arrow-next-vertical`]:!ee,[`${i}-hover-arrow`]:$e}),style:{color:G,"--arrow-hover-color":H,...be},children:r.jsxs("button",{className:`${i}-arrow-inner`,onClick:Q=>{Q.stopPropagation(),We("+1")},style:{transform:`translate(${y.scalingValue(ae*(ee?-1:1),n)}, ${y.scalingValue(Y,n)}) rotate(${ee?"0deg":"90deg"})`},children:[D&&r.jsx(rn,{url:D,fill:G,hoverFill:H,className:`${i}-arrow-img`,style:be}),!D&&r.jsx(cl,{color:G,className:nt(`${i}-arrow-icon`,`${i}-arrow-img`)})]})})]}),N&&r.jsx("div",{className:`${i}-click-overlay`,onClick:()=>{o&&o.go("+1")}}),Z&&r.jsx("div",{className:nt(`${i}-pagination`,{[`${i}-pagination-inside-bottom`]:ee,[`${i}-pagination-inside-left`]:!ee}),style:ee?{bottom:S(W.inset)}:{left:S(W.inset)},children:r.jsx("div",{className:nt(`${i}-pagination-inner`,{[`${i}-pagination-vertical`]:!ee,[`${i}-animate-dots`]:T}),style:{backgroundColor:K,gap:S(W.gapInactive-W.activeDot+W.dot),...ee?{height:S(W.activeDot+W.paddingY*2),paddingTop:S(W.paddingY),paddingBottom:S(W.paddingY),paddingLeft:S(W.paddingActive),paddingRight:S(W.paddingActive)}:{width:S(W.activeDot+W.paddingY*2),paddingLeft:S(W.paddingY),paddingRight:S(W.paddingY),paddingTop:S(W.paddingActive),paddingBottom:S(W.paddingActive)},borderRadius:S(W.borderRadius),transform:`translate(${y.scalingValue(Yi.offset.x,n)}, ${y.scalingValue(Yi.offset.y,n)})`},children:R.map((Q,le)=>{const xe=le===x,O=xe?W.activeDot:W.dot;return r.jsx("button",{onClick:()=>{o&&o.go(le)},className:`${i}-pagination-item`,style:{width:S(W.activeDot)},children:r.jsx("div",{className:`${i}-dot`,style:{backgroundColor:xe?A:F,width:S(O)}})},le)})},`${w}-${E}`)})]}),r.jsx("div",{className:`${i}-caption-block`,children:r.jsx("div",{className:`${i}-caption-text-wrapper`,children:R.map((Q,le)=>r.jsx("div",{className:nt(`${i}-caption-text`,{[`${i}-with-pointer-events`]:le===x&&n,[`${i}-active`]:le===x}),style:{...l,width:"max-content",transitionDuration:`${Math.round(parseInt(al)/2)}ms`},children:r.jsx("div",{className:`${i}-caption-text-inner`,style:{"--link-color":q,"--link-hover-color":q,position:"relative",top:y.scalingValue(ia.offset.y,n),left:y.scalingValue(ia.offset.x,n)},children:r.jsx(mi,{content:Q.imageCaption})})},le))})})]})]})}function cl({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 uv=`import React, { useState, useEffect, useRef } from 'react';
18411
18278
  import { Splide, SplideSlide } from '@splidejs/react-splide';
18412
18279
  import '@splidejs/react-splide/css/core';
18413
18280
  import cn from 'classnames';
@@ -19151,4 +19018,4 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
19151
19018
  </svg>
19152
19019
  );
19153
19020
  }
19154
- `,vv={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},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"]}}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{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"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},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/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},bv={element:fv,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:vv,sourceCode:yv,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},xv=[Fu,zu,iy,Ap,Bp,Jp,ym,Sm,Em,Ym,Dg,Gh,ef,Hf,Uf,hy,uv,Ly,bv];exports.components=xv;exports.isSchemaV1=Tc;
19021
+ `,pv={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},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"]}}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{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"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},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/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},mv={element:dv,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:pv,sourceCode:uv,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},gv=[Mu,Hu,Jf,Lp,Wp,Gp,dm,ym,Cm,Gm,Hg,Oh,Xh,Pf,Df,dy,rv,wy,mv];exports.components=gv;exports.isSchemaV1=Sc;