@cntrl-site/components 1.0.65-alpha.3 → 1.0.65-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +458 -111
  2. package/dist/index.mjs +8954 -8468
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),pt=require("classnames"),H=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Bn=require("react-dom");function hu(e){return e.type==="object"&&e.version===1}const fu="ControlSlider-module__wrapper___sHEkd",yu="ControlSlider-module__hoverArrow___A-dOH",vu="ControlSlider-module__sliderItem___QQSkR",xu="ControlSlider-module__sliderImage___9hRl-",bu="ControlSlider-module__arrow___05ghY",wu="ControlSlider-module__arrowVertical___tBfVN",Su="ControlSlider-module__nextArrow___-30Yc",$u="ControlSlider-module__arrowInner___aEra3",Cu="ControlSlider-module__arrowIcon___S4ztF",Tu="ControlSlider-module__arrowImg___2dwJW",Iu="ControlSlider-module__mirror___brd6U",Ru="ControlSlider-module__pagination___bicLF",Lu="ControlSlider-module__paginationInner___bT-P-",Pu="ControlSlider-module__paginationVertical___zYqKw",Eu="ControlSlider-module__paginationItem___nTRbk",Mu="ControlSlider-module__dot___p1Qun",ku="ControlSlider-module__activeDot___LHFaj",Au="ControlSlider-module__paginationInsideBottom___R3FWn",Fu="ControlSlider-module__paginationInsideTop___V-qb-",_u="ControlSlider-module__paginationOutsideBottom___14w8D",Nu="ControlSlider-module__paginationOutsideTop___SCLqB",Wu="ControlSlider-module__paginationInsideLeft___yOBRZ",Hu="ControlSlider-module__paginationInsideRight___Rtt3o",Du="ControlSlider-module__paginationOutsideLeft___lahaw",Ou="ControlSlider-module__paginationOutsideRight___EtuQa",Bu="ControlSlider-module__imgWrapper___UjEgB",zu="ControlSlider-module__captionBlock___dJ6-j",ju="ControlSlider-module__captionTextWrapper___HFlpf",Vu="ControlSlider-module__captionText___uGBVc",Gu="ControlSlider-module__active___WZK4G",Xu="ControlSlider-module__withPointerEvents___t-18M",qu="ControlSlider-module__topLeftAlignment___zjnGM",Yu="ControlSlider-module__topCenterAlignment___gD1xW",Uu="ControlSlider-module__topRightAlignment___NMapS",Ku="ControlSlider-module__middleLeftAlignment___OnUrY",Zu="ControlSlider-module__middleCenterAlignment___Tdkl0",Ju="ControlSlider-module__middleRightAlignment___wEbfX",Qu="ControlSlider-module__bottomLeftAlignment___cTP2-",ep="ControlSlider-module__bottomCenterAlignment___c54fB",tp="ControlSlider-module__bottomRightAlignment___kEwrz",np="ControlSlider-module__clickOverlay___DZA28",ip="ControlSlider-module__contain___pLyq7",op="ControlSlider-module__cover___KdDat",ut={wrapper:fu,hoverArrow:yu,sliderItem:vu,sliderImage:xu,arrow:bu,arrowVertical:wu,nextArrow:Su,arrowInner:$u,arrowIcon:Cu,arrowImg:Tu,mirror:Iu,pagination:Ru,paginationInner:Lu,paginationVertical:Pu,paginationItem:Eu,dot:Mu,activeDot:ku,paginationInsideBottom:Au,paginationInsideTop:Fu,paginationOutsideBottom:_u,paginationOutsideTop:Nu,paginationInsideLeft:Wu,paginationInsideRight:Hu,paginationOutsideLeft:Du,paginationOutsideRight:Ou,imgWrapper:Bu,captionBlock:zu,captionTextWrapper:ju,captionText:Vu,active:Gu,withPointerEvents:Xu,topLeftAlignment:qu,topCenterAlignment:Yu,topRightAlignment:Uu,middleLeftAlignment:Ku,middleCenterAlignment:Zu,middleRightAlignment:Ju,bottomLeftAlignment:Qu,bottomCenterAlignment:ep,bottomRightAlignment:tp,clickOverlay:np,contain:ip,cover:op};function rp(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 ap(e,t,n){return t&&rp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ys="(prefers-reduced-motion: reduce)",Di=1,sp=2,Gi=3,oo=4,zo=5,br=6,Er=7,lp={CREATED:Di,MOUNTED:sp,IDLE:Gi,MOVING:oo,SCROLLING:zo,DRAGGING:br,DESTROYED:Er};function Dn(e){e.length=0}function oi(e,t,n){return Array.prototype.slice.call(e,t,n)}function Xt(e){return e.bind.apply(e,[null].concat(oi(arguments,1)))}var Mc=setTimeout,Xa=function(){};function Us(e){return requestAnimationFrame(e)}function Gr(e,t){return typeof t===e}function Ro(e){return!ms(e)&&Gr("object",e)}var ps=Array.isArray,kc=Xt(Gr,"function"),ei=Xt(Gr,"string"),jo=Xt(Gr,"undefined");function ms(e){return e===null}function Ac(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Vo(e){return ps(e)?e:[e]}function xn(e,t){Vo(e).forEach(t)}function gs(e,t){return e.indexOf(t)>-1}function wr(e,t){return e.push.apply(e,Vo(t)),e}function Fn(e,t,n){e&&xn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Pn(e,t){Fn(e,ei(t)?t.split(" "):t,!0)}function Go(e,t){xn(t,e.appendChild.bind(e))}function hs(e,t){xn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Lo(e,t){return Ac(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Fc(e,t){var n=e?oi(e.children):[];return t?n.filter(function(i){return Lo(i,t)}):n}function Xo(e,t){return t?Fc(e,t)[0]:e.firstElementChild}var Po=Object.keys;function wi(e,t,n){return e&&(n?Po(e).reverse():Po(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Eo(e){return oi(arguments,1).forEach(function(t){wi(t,function(n,i){e[i]=t[i]})}),e}function qn(e){return oi(arguments,1).forEach(function(t){wi(t,function(n,i){ps(n)?e[i]=n.slice():Ro(n)?e[i]=qn({},Ro(e[i])?e[i]:{},n):e[i]=n})}),e}function Ks(e,t){xn(t||Po(e),function(n){delete e[n]})}function En(e,t){xn(e,function(n){xn(t,function(i){n&&n.removeAttribute(i)})})}function $t(e,t,n){Ro(t)?wi(t,function(i,o){$t(e,o,i)}):xn(e,function(i){ms(n)||n===""?En(i,t):i.setAttribute(t,String(n))})}function Bi(e,t,n){var i=document.createElement(e);return t&&(ei(t)?Pn(i,t):$t(i,t)),n&&Go(n,i),i}function wn(e,t,n){if(jo(n))return getComputedStyle(e)[t];ms(n)||(e.style[t]=""+n)}function Mo(e,t){wn(e,"display",t)}function _c(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Sn(e,t){return e.getAttribute(t)}function Zs(e,t){return e&&e.classList.contains(t)}function hn(e){return e.getBoundingClientRect()}function $i(e){xn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Nc(e){return Xo(new DOMParser().parseFromString(e,"text/html").body)}function An(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wc(e,t){return e&&e.querySelector(t)}function fs(e,t){return t?oi(e.querySelectorAll(t)):[]}function _n(e,t){Fn(e,t,!1)}function qa(e){return e.timeStamp}function di(e){return ei(e)?e:e?e+"px":""}var qo="splide",ys="data-"+qo;function $o(e,t){if(!e)throw new Error("["+qo+"] "+(t||""))}var ti=Math.min,Mr=Math.max,kr=Math.floor,ko=Math.ceil,dn=Math.abs;function Hc(e,t,n){return dn(e-t)<n}function Sr(e,t,n,i){var o=ti(t,n),r=Mr(t,n);return i?o<e&&e<r:o<=e&&e<=r}function _i(e,t,n){var i=ti(t,n),o=Mr(t,n);return ti(Mr(i,e),o)}function Ya(e){return+(e>0)-+(e<0)}function Ua(e,t){return xn(t,function(n){e=e.replace("%s",""+n)}),e}function vs(e){return e<10?"0"+e:""+e}var Js={};function cp(e){return""+e+vs(Js[e]=(Js[e]||0)+1)}function Dc(){var e=[];function t(l,d,c,u){o(l,d,function(p,x,b){var g="addEventListener"in p,h=g?p.removeEventListener.bind(p,x,c,u):p.removeListener.bind(p,c);g?p.addEventListener(x,c,u):p.addListener(c),e.push([p,x,b,c,h])})}function n(l,d,c){o(l,d,function(u,p,x){e=e.filter(function(b){return b[0]===u&&b[1]===p&&b[2]===x&&(!c||b[3]===c)?(b[4](),!1):!0})})}function i(l,d,c){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:p,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,p,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){xn(l,function(u){u&&xn(d,function(p){p.split(" ").forEach(function(x){var b=x.split(".");c(u,b[0],b[1])})})})}function r(){e.forEach(function(l){l[4]()}),Dn(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var ri="mounted",Ka="ready",On="move",ro="moved",xs="click",Oc="active",Bc="inactive",zc="visible",jc="hidden",en="refresh",ln="updated",Xi="resize",Xr="resized",Vc="drag",Gc="dragging",Xc="dragged",qr="scroll",Ii="scrolled",dp="overflow",bs="destroy",qc="arrows:mounted",Yc="arrows:updated",Uc="pagination:mounted",Kc="pagination:updated",ws="navigation:mounted",Ss="autoplay:play",Zc="autoplay:playing",$s="autoplay:pause",Cs="lazyload:loaded",Jc="sk",Qc="sh",Ar="ei";function Kt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Dc();function i(r,l){n.bind(t,Vo(r).join(" "),function(d){l.apply(l,ps(d.detail)?d.detail:[])})}function o(r){n.dispatch(t,r,oi(arguments,1))}return e&&e.event.on(bs,n.destroy),Eo(n,{bus:t,on:i,off:Xt(n.unbind,t),emit:o})}function Yr(e,t,n,i){var o=Date.now,r,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?ti((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return b();d=Us(p)}}function x(C){C||h(),r=o()-(C?l*e:0),c=!1,d=Us(p)}function b(){c=!0}function g(){r=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function f(C){e=C}function v(){return c}return{start:x,rewind:g,pause:b,cancel:h,set:f,isPaused:v}}function up(e){var t=e;function n(o){t=o}function i(o){return gs(Vo(o),t)}return{set:n,is:i}}function pp(e,t){var n=Yr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function mp(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=Dc(),d=[];function c(){var h=n.mediaQuery==="min";Po(o).sort(function(f,v){return h?+f-+v:+v-+f}).forEach(function(f){p(o[f],"("+(h?"min":"max")+"-width:"+f+"px)")}),p(r,Ys),x()}function u(h){h&&l.destroy()}function p(h,f){var v=matchMedia(f);l.bind(v,"change",x),d.push([h,v])}function x(){var h=i.is(Er),f=n.direction,v=d.reduce(function(C,y){return qn(C,y[1].matches?y[0]:{})},{});Ks(n),g(v),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):f!==n.direction&&e.refresh()}function b(h){matchMedia(Ys).matches&&(h?qn(n,r):Ks(n,Po(r)))}function g(h,f,v){qn(n,h),f&&qn(Object.getPrototypeOf(n),h),(v||!i.is(Di))&&e.emit(ln,n)}return{setup:c,destroy:u,reduce:b,set:g}}var Ur="Arrow",Kr=Ur+"Left",Zr=Ur+"Right",ed=Ur+"Up",td=Ur+"Down",Qs="rtl",Jr="ttb",ua={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ed,Zr],ArrowRight:[td,Kr]};function gp(e,t,n){function i(r,l,d){d=d||n.direction;var c=d===Qs&&!l?1:d===Jr?0:-1;return ua[r]&&ua[r][c]||r.replace(/width|left|right/i,function(u,p){var x=ua[u.toLowerCase()][c]||u;return p>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(r){return r*(n.direction===Qs?1:-1)}return{resolve:i,orient:o}}var Nn="role",zi="tabindex",hp="disabled",$n="aria-",Yo=$n+"controls",nd=$n+"current",el=$n+"selected",yn=$n+"label",Ts=$n+"labelledby",id=$n+"hidden",Is=$n+"orientation",Ao=$n+"roledescription",tl=$n+"live",nl=$n+"busy",il=$n+"atomic",Rs=[Nn,zi,hp,Yo,nd,yn,Ts,id,Is,Ao],Mn=qo+"__",ai="is-",pa=qo,ol=Mn+"track",fp=Mn+"list",Qr=Mn+"slide",od=Qr+"--clone",yp=Qr+"__container",Ls=Mn+"arrows",ea=Mn+"arrow",rd=ea+"--prev",ad=ea+"--next",ta=Mn+"pagination",sd=ta+"__page",vp=Mn+"progress",xp=vp+"__bar",bp=Mn+"toggle",wp=Mn+"spinner",Sp=Mn+"sr",$p=ai+"initialized",Ci=ai+"active",ld=ai+"prev",cd=ai+"next",Za=ai+"visible",Ja=ai+"loading",dd=ai+"focus-in",ud=ai+"overflow",Cp=[Ci,Za,ld,cd,Ja,dd,ud],Tp={slide:Qr,clone:od,arrows:Ls,arrow:ea,prev:rd,next:ad,pagination:ta,page:sd,spinner:wp};function Ip(e,t){if(kc(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Lo(n,t);)n=n.parentElement;return n}var Rp=5,rl=200,pd="touchstart mousedown",ma="touchmove mousemove",ga="touchend touchcancel mouseup click";function Lp(e,t,n){var i=Kt(e),o=i.on,r=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],x=[],b,g,h;function f(){T(),W(),y()}function v(){o(en,C),o(en,f),o(ln,y),r(document,pd+" keydown",function(D){h=D.type==="keydown"},{capture:!0}),r(l,"focusin",function(){Fn(l,dd,!!h)})}function C(D){var w=Rs.concat("style");Dn(u),_n(l,p),_n(b,x),En([b,g],w),En(l,D?w:["style",Ao])}function y(){_n(l,p),_n(b,x),p=X(pa),x=X(ol),Pn(l,p),Pn(b,x),$t(l,yn,n.label),$t(l,Ts,n.labelledby)}function T(){b=_("."+ol),g=Xo(b,"."+fp),$o(b&&g,"A track/list element is missing."),wr(u,Fc(g,"."+Qr+":not(."+od+")")),wi({arrows:Ls,pagination:ta,prev:rd,next:ad,bar:xp,toggle:bp},function(D,w){c[w]=_("."+D)}),Eo(c,{root:l,track:b,list:g,slides:u})}function W(){var D=l.id||cp(qo),w=n.role;l.id=D,b.id=b.id||D+"-track",g.id=g.id||D+"-list",!Sn(l,Nn)&&l.tagName!=="SECTION"&&w&&$t(l,Nn,w),$t(l,Ao,d.carousel),$t(g,Nn,"presentation")}function _(D){var w=Wc(l,D);return w&&Ip(w,"."+pa)===l?w:void 0}function X(D){return[D+"--"+n.type,D+"--"+n.direction,n.drag&&D+"--draggable",n.isNavigation&&D+"--nav",D===pa&&Ci]}return Eo(c,{setup:f,mount:v,destroy:C})}var qi="slide",ao="loop",Uo="fade";function Pp(e,t,n,i){var o=Kt(e),r=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,x=p.isNavigation,b=p.updateOnMove,g=p.i18n,h=p.pagination,f=p.slideFocus,v=c.Direction.resolve,C=Sn(i,"style"),y=Sn(i,yn),T=n>-1,W=Xo(i,"."+yp),_;function X(){T||(i.id=u.id+"-slide"+vs(t+1),$t(i,Nn,h?"tabpanel":"group"),$t(i,Ao,g.slide),$t(i,yn,y||Ua(g.slideLabel,[t+1,e.length]))),D()}function D(){d(i,"click",Xt(l,xs,oe)),d(i,"keydown",Xt(l,Jc,oe)),r([ro,Qc,Ii],E),r(ws,R),b&&r(On,m)}function w(){_=!0,o.destroy(),_n(i,Cp),En(i,Rs),$t(i,"style",C),$t(i,yn,y||"")}function R(){var L=e.splides.map(function(N){var V=N.splide.Components.Slides.getAt(t);return V?V.slide.id:""}).join(" ");$t(i,yn,Ua(g.slideX,(T?n:t)+1)),$t(i,Yo,L),$t(i,Nn,f?"button":""),f&&En(i,Ao)}function m(){_||E()}function E(){if(!_){var L=e.index;I(),J(),Fn(i,ld,t===L-1),Fn(i,cd,t===L+1)}}function I(){var L=Q();L!==Zs(i,Ci)&&(Fn(i,Ci,L),$t(i,nd,x&&L||""),l(L?Oc:Bc,oe))}function J(){var L=q(),N=!L&&(!Q()||T);if(e.state.is([oo,zo])||$t(i,id,N||""),$t(fs(i,p.focusableNodes||""),zi,N?-1:""),f&&$t(i,zi,N?-1:0),L!==Zs(i,Za)&&(Fn(i,Za,L),l(L?zc:jc,oe)),!L&&document.activeElement===i){var V=c.Slides.getAt(e.index);V&&_c(V.slide)}}function A(L,N,V){wn(V&&W||i,L,N)}function Q(){var L=e.index;return L===t||p.cloneStatus&&L===n}function q(){if(e.is(Uo))return Q();var L=hn(c.Elements.track),N=hn(i),V=v("left",!0),de=v("right",!0);return kr(L[V])<=ko(N[V])&&kr(N[de])<=ko(L[de])}function Y(L,N){var V=dn(L-t);return!T&&(p.rewind||e.is(ao))&&(V=ti(V,e.length-V)),V<=N}var oe={index:t,slideIndex:n,slide:i,container:W,isClone:T,mount:X,destroy:w,update:E,style:A,isWithin:Y};return oe}function Ep(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function x(){b(),o(en,g),o(en,b)}function b(){c.forEach(function(E,I){f(E,I,-1)})}function g(){_(function(E){E.destroy()}),Dn(p)}function h(){_(function(E){E.update()})}function f(E,I,J){var A=Pp(e,I,J,E);A.mount(),p.push(A),p.sort(function(Q,q){return Q.index-q.index})}function v(E){return E?X(function(I){return!I.isClone}):p}function C(E){var I=t.Controller,J=I.toIndex(E),A=I.hasFocus()?1:n.perPage;return X(function(Q){return Sr(Q.index,J,J+A-1)})}function y(E){return X(E)[0]}function T(E,I){xn(E,function(J){if(ei(J)&&(J=Nc(J)),Ac(J)){var A=c[I];A?hs(J,A):Go(u,J),Pn(J,n.classes.slide),w(J,Xt(r,Xi))}}),r(en)}function W(E){$i(X(E).map(function(I){return I.slide})),r(en)}function _(E,I){v(I).forEach(E)}function X(E){return p.filter(kc(E)?E:function(I){return ei(E)?Lo(I.slide,E):gs(Vo(E),I.index)})}function D(E,I,J){_(function(A){A.style(E,I,J)})}function w(E,I){var J=fs(E,"img"),A=J.length;A?J.forEach(function(Q){l(Q,"load error",function(){--A||I()})}):I()}function R(E){return E?c.length:p.length}function m(){return p.length>n.perPage}return{mount:x,destroy:g,update:h,register:f,get:v,getIn:C,getAt:y,add:T,remove:W,forEach:_,filter:X,style:D,getLength:R,isEnough:m}}function Mp(e,t,n){var i=Kt(e),o=i.on,r=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,x=u.track,b=u.list,g=d.getAt,h=d.style,f,v,C;function y(){T(),r(window,"resize load",pp(Xt(l,Xi))),o([ln,en],T),o(Xi,W)}function T(){f=n.direction===Jr,wn(p,"maxWidth",di(n.width)),wn(x,c("paddingLeft"),_(!1)),wn(x,c("paddingRight"),_(!0)),W(!0)}function W(oe){var L=hn(p);(oe||v.width!==L.width||v.height!==L.height)&&(wn(x,"height",X()),h(c("marginRight"),di(n.gap)),h("width",w()),h("height",R(),!0),v=L,l(Xr),C!==(C=Y())&&(Fn(p,ud,C),l(dp,C)))}function _(oe){var L=n.padding,N=c(oe?"right":"left");return L&&di(L[N]||(Ro(L)?0:L))||"0px"}function X(){var oe="";return f&&(oe=D(),$o(oe,"height or heightRatio is missing."),oe="calc("+oe+" - "+_(!1)+" - "+_(!0)+")"),oe}function D(){return di(n.height||hn(b).width*n.heightRatio)}function w(){return n.autoWidth?null:di(n.fixedWidth)||(f?"":m())}function R(){return di(n.fixedHeight)||(f?n.autoHeight?null:m():D())}function m(){var oe=di(n.gap);return"calc((100%"+(oe&&" + "+oe)+")/"+(n.perPage||1)+(oe&&" - "+oe)+")"}function E(){return hn(b)[c("width")]}function I(oe,L){var N=g(oe||0);return N?hn(N.slide)[c("width")]+(L?0:Q()):0}function J(oe,L){var N=g(oe);if(N){var V=hn(N.slide)[c("right")],de=hn(b)[c("left")];return dn(V-de)+(L?0:Q())}return 0}function A(oe){return J(e.length-1)-J(0)+I(0,oe)}function Q(){var oe=g(0);return oe&&parseFloat(wn(oe.slide,c("marginRight")))||0}function q(oe){return parseFloat(wn(x,c("padding"+(oe?"Right":"Left"))))||0}function Y(){return e.is(Uo)||A(!0)>E()}return{mount:y,resize:W,listSize:E,slideSize:I,sliderSize:A,totalSize:J,getPadding:q,isOverflow:Y}}var kp=2;function Ap(e,t,n){var i=Kt(e),o=i.on,r=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(en,x),o([ln,Xi],g),(u=v())&&(h(u),t.Layout.resize(!0))}function x(){b(),p()}function b(){$i(c),Dn(c),i.destroy()}function g(){var C=v();u!==C&&(u<C||!C)&&i.emit(en)}function h(C){var y=l.get().slice(),T=y.length;if(T){for(;y.length<C;)wr(y,y);wr(y.slice(-C),y.slice(0,C)).forEach(function(W,_){var X=_<C,D=f(W.slide,_);X?hs(D,y[0].slide):Go(r.list,D),wr(c,D),l.register(D,_-C+(X?0:T),W.index)})}}function f(C,y){var T=C.cloneNode(!0);return Pn(T,n.classes.clone),T.id=e.root.id+"-clone"+vs(y+1),T}function v(){var C=n.clones;if(!e.is(ao))C=0;else if(jo(C)){var y=n[d("fixedWidth")]&&t.Layout.slideSize(0),T=y&&ko(hn(r.track)[d("width")]/y);C=T||n[d("autoWidth")]&&e.length||n.perPage*kp}return C}return{mount:p,destroy:b}}function Fp(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,x=d.listSize,b=d.sliderSize,g=t.Direction,h=g.resolve,f=g.orient,v=t.Elements,C=v.list,y=v.track,T;function W(){T=t.Transition,o([ri,Xr,ln,en],_)}function _(){t.Controller.isBusy()||(t.Scroll.cancel(),D(e.index),t.Slides.update())}function X(N,V,de,re){N!==V&&oe(N>de)&&(E(),w(m(A(),N>de),!0)),l(oo),r(On,V,de,N),T.start(V,function(){l(Gi),r(ro,V,de,N),re&&re()})}function D(N){w(J(N,!0))}function w(N,V){if(!e.is(Uo)){var de=V?N:R(N);wn(C,"transform","translate"+h("X")+"("+de+"px)"),N!==de&&r(Qc)}}function R(N){if(e.is(ao)){var V=I(N),de=V>t.Controller.getEnd(),re=V<0;(re||de)&&(N=m(N,de))}return N}function m(N,V){var de=N-Y(V),re=b();return N-=f(re*(ko(dn(de)/re)||1))*(V?1:-1),N}function E(){w(A(),!0),T.cancel()}function I(N){for(var V=t.Slides.get(),de=0,re=1/0,M=0;M<V.length;M++){var S=V[M].index,$=dn(J(S,!0)-N);if($<=re)re=$,de=S;else break}return de}function J(N,V){var de=f(p(N-1)-q(N));return V?Q(de):de}function A(){var N=h("left");return hn(C)[N]-hn(y)[N]+f(u(!1))}function Q(N){return n.trimSpace&&e.is(qi)&&(N=_i(N,0,f(b(!0)-x()))),N}function q(N){var V=n.focus;return V==="center"?(x()-c(N,!0))/2:+V*c(N)||0}function Y(N){return J(N?t.Controller.getEnd():0,!!n.trimSpace)}function oe(N){var V=f(m(A(),N));return N?V>=0:V<=C[h("scrollWidth")]-hn(y)[h("width")]}function L(N,V){V=jo(V)?A():V;var de=N!==!0&&f(V)<f(Y(!1)),re=N!==!1&&f(V)>f(Y(!0));return de||re}return{mount:W,move:X,jump:D,translate:w,shift:m,cancel:E,toIndex:I,toPosition:J,getPosition:A,getLimit:Y,exceededLimit:L,reposition:_}}function _p(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,x=p.isEnough,b=p.getLength,g=n.omitEnd,h=e.is(ao),f=e.is(qi),v=Xt(A,!1),C=Xt(A,!0),y=n.start||0,T,W=y,_,X,D;function w(){R(),o([ln,en,Ar],R),o(Xr,m)}function R(){_=b(!0),X=n.perMove,D=n.perPage,T=oe();var $=_i(y,0,g?T:_-1);$!==y&&(y=$,l.reposition())}function m(){T!==oe()&&r(Ar)}function E($,F,O){if(!S()){var te=J($),xe=Y(te);xe>-1&&(F||xe!==y)&&(de(xe),l.move(te,xe,W,O))}}function I($,F,O,te){t.Scroll.scroll($,F,O,function(){var xe=Y(l.toIndex(d()));de(g?ti(xe,T):xe),te&&te()})}function J($){var F=y;if(ei($)){var O=$.match(/([+\-<>])(\d+)?/)||[],te=O[1],xe=O[2];te==="+"||te==="-"?F=Q(y+ +(""+te+(+xe||1)),y):te===">"?F=xe?L(+xe):v(!0):te==="<"&&(F=C(!0))}else F=h?$:_i($,0,T);return F}function A($,F){var O=X||(M()?1:D),te=Q(y+O*($?-1:1),y,!(X||M()));return te===-1&&f&&!Hc(d(),c(!$),1)?$?0:T:F?te:Y(te)}function Q($,F,O){if(x()||M()){var te=q($);te!==$&&(F=$,$=te,O=!1),$<0||$>T?!X&&(Sr(0,$,F,!0)||Sr(T,F,$,!0))?$=L(N($)):h?$=O?$<0?-(_%D||D):_:$:n.rewind?$=$<0?T:0:$=-1:O&&$!==F&&($=L(N(F)+($<F?-1:1)))}else $=-1;return $}function q($){if(f&&n.trimSpace==="move"&&$!==y)for(var F=d();F===u($,!0)&&Sr($,0,e.length-1,!n.rewind);)$<y?--$:++$;return $}function Y($){return h?($+_)%_||0:$}function oe(){for(var $=_-(M()||h&&X?1:D);g&&$-- >0;)if(u(_-1,!0)!==u($,!0)){$++;break}return _i($,0,_-1)}function L($){return _i(M()?$:D*$,0,T)}function N($){return M()?ti($,T):kr(($>=T?_-1:$)/D)}function V($){var F=l.toIndex($);return f?_i(F,0,T):F}function de($){$!==y&&(W=y,y=$)}function re($){return $?W:y}function M(){return!jo(n.focus)||n.isNavigation}function S(){return e.state.is([oo,zo])&&!!n.waitForTransition}return{mount:w,go:E,scroll:I,getNext:v,getPrev:C,getAdjacent:A,getEnd:oe,setIndex:de,getIndex:re,toIndex:L,toPage:N,toDest:V,hasFocus:M,isBusy:S}}var Np="http://www.w3.org/2000/svg",Wp="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",ir=40;function Hp(e,t,n){var i=Kt(e),o=i.on,r=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,x=u.arrows,b=u.track,g=x,h=u.prev,f=u.next,v,C,y={};function T(){_(),o(ln,W)}function W(){X(),T()}function _(){var I=n.arrows;I&&!(h&&f)&&R(),h&&f&&(Eo(y,{prev:h,next:f}),Mo(g,I?"":"none"),Pn(g,C=Ls+"--"+n.direction),I&&(D(),E(),$t([h,f],Yo,b.id),l(qc,h,f)))}function X(){i.destroy(),_n(g,C),v?($i(x?[h,f]:g),h=f=null):En([h,f],Rs)}function D(){o([ri,ro,en,Ii,Ar],E),r(f,"click",Xt(w,">")),r(h,"click",Xt(w,"<"))}function w(I){p.go(I,!0)}function R(){g=x||Bi("div",d.arrows),h=m(!0),f=m(!1),v=!0,Go(g,[h,f]),!x&&hs(g,b)}function m(I){var J='<button class="'+d.arrow+" "+(I?d.prev:d.next)+'" type="button"><svg xmlns="'+Np+'" viewBox="0 0 '+ir+" "+ir+'" width="'+ir+'" height="'+ir+'" focusable="false"><path d="'+(n.arrowPath||Wp)+'" />';return Nc(J)}function E(){if(h&&f){var I=e.index,J=p.getPrev(),A=p.getNext(),Q=J>-1&&I<J?c.last:c.prev,q=A>-1&&I>A?c.first:c.next;h.disabled=J<0,f.disabled=A<0,$t(h,yn,Q),$t(f,yn,q),l(Yc,h,f,J,A)}}return{arrows:y,mount:T,destroy:X,update:E}}var Dp=ys+"-interval";function Op(e,t,n){var i=Kt(e),o=i.on,r=i.bind,l=i.emit,d=Yr(n.interval,e.go.bind(e,">"),D),c=d.isPaused,u=t.Elements,p=t.Elements,x=p.root,b=p.toggle,g=n.autoplay,h,f,v=g==="pause";function C(){g&&(y(),b&&$t(b,Yo,u.track.id),v||T(),X())}function y(){n.pauseOnHover&&r(x,"mouseenter mouseleave",function(R){h=R.type==="mouseenter",_()}),n.pauseOnFocus&&r(x,"focusin focusout",function(R){f=R.type==="focusin",_()}),b&&r(b,"click",function(){v?T():W(!0)}),o([On,qr,en],d.rewind),o(On,w)}function T(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),f=h=v=!1,X(),l(Ss))}function W(R){R===void 0&&(R=!0),v=!!R,X(),c()||(d.pause(),l($s))}function _(){v||(h||f?W(!1):T())}function X(){b&&(Fn(b,Ci,!v),$t(b,yn,n.i18n[v?"play":"pause"]))}function D(R){var m=u.bar;m&&wn(m,"width",R*100+"%"),l(Zc,R)}function w(R){var m=t.Slides.getAt(R);d.set(m&&+Sn(m.slide,Dp)||n.interval)}return{mount:C,destroy:d.cancel,play:T,pause:W,isPaused:c}}function Bp(e,t,n){var i=Kt(e),o=i.on;function r(){n.cover&&(o(Cs,Xt(d,!0)),o([ri,ln,en],Xt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Xo(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),Mo(u,c?"none":"")}return{mount:r,destroy:Xt(l,!1)}}var zp=10,jp=600,Vp=.6,Gp=1.5,Xp=800;function qp(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,x=d.translate,b=e.is(qi),g,h,f=1;function v(){o(On,W),o([ln,en],_)}function C(D,w,R,m,E){var I=c();if(W(),R&&(!b||!p())){var J=t.Layout.sliderSize(),A=Ya(D)*J*kr(dn(D)/J)||0;D=d.toPosition(t.Controller.toDest(D%J))+A}var Q=Hc(I,D,1);f=1,w=Q?0:w||Mr(dn(D-I)/Gp,Xp),h=m,g=Yr(w,y,Xt(T,I,D,E),1),l(zo),r(qr),g.start()}function y(){l(Gi),h&&h(),r(Ii)}function T(D,w,R,m){var E=c(),I=D+(w-D)*X(m),J=(I-E)*f;x(E+J),b&&!R&&p()&&(f*=Vp,dn(J)<zp&&C(u(p(!0)),jp,!1,h,!0))}function W(){g&&g.cancel()}function _(){g&&!g.isPaused()&&(W(),y())}function X(D){var w=n.easingFunc;return w?w(D):1-Math.pow(1-D,4)}return{mount:v,destroy:W,scroll:C,cancel:_}}var Ni={passive:!1,capture:!0};function Yp(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,x=t.Controller,b=t.Elements.track,g=t.Media.reduce,h=t.Direction,f=h.resolve,v=h.orient,C=u.getPosition,y=u.exceededLimit,T,W,_,X,D,w=!1,R,m,E;function I(){l(b,ma,Xa,Ni),l(b,ga,Xa,Ni),l(b,pd,A,Ni),l(b,"click",Y,{capture:!0}),l(b,"dragstart",An),o([ri,ln],J)}function J(){var Z=n.drag;ae(!Z),X=Z==="free"}function A(Z){if(R=!1,!m){var B=xe(Z);te(Z.target)&&(B||!Z.button)&&(x.isBusy()?An(Z,!0):(E=B?b:window,D=c.is([oo,zo]),_=null,l(E,ma,Q,Ni),l(E,ga,q,Ni),u.cancel(),p.cancel(),oe(Z)))}}function Q(Z){if(c.is(br)||(c.set(br),r(Vc)),Z.cancelable)if(D){u.translate(T+O(M(Z)));var B=S(Z)>rl,G=w!==(w=y());(B||G)&&oe(Z),R=!0,r(Gc),An(Z)}else V(Z)&&(D=N(Z),An(Z))}function q(Z){c.is(br)&&(c.set(Gi),r(Xc)),D&&(L(Z),An(Z)),d(E,ma,Q),d(E,ga,q),D=!1}function Y(Z){!m&&R&&An(Z,!0)}function oe(Z){_=W,W=Z,T=C()}function L(Z){var B=de(Z),G=re(B),$e=n.rewind&&n.rewindByDrag;g(!1),X?x.scroll(G,0,n.snap):e.is(Uo)?x.go(v(Ya(B))<0?$e?"<":"-":$e?">":"+"):e.is(qi)&&w&&$e?x.go(y(!0)?">":"<"):x.go(x.toDest(G),!0),g(!0)}function N(Z){var B=n.dragMinThreshold,G=Ro(B),$e=G&&B.mouse||0,he=(G?B.touch:+B)||10;return dn(M(Z))>(xe(Z)?he:$e)}function V(Z){return dn(M(Z))>dn(M(Z,!0))}function de(Z){if(e.is(ao)||!w){var B=S(Z);if(B&&B<rl)return M(Z)/B}return 0}function re(Z){return C()+Ya(Z)*ti(dn(Z)*(n.flickPower||600),X?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function M(Z,B){return F(Z,B)-F($(Z),B)}function S(Z){return qa(Z)-qa($(Z))}function $(Z){return W===Z&&_||W}function F(Z,B){return(xe(Z)?Z.changedTouches[0]:Z)["page"+f(B?"Y":"X")]}function O(Z){return Z/(w&&e.is(qi)?Rp:1)}function te(Z){var B=n.noDrag;return!Lo(Z,"."+sd+", ."+ea)&&(!B||!Lo(Z,B))}function xe(Z){return typeof TouchEvent<"u"&&Z instanceof TouchEvent}function ne(){return D}function ae(Z){m=Z}return{mount:I,disable:ae,isDragging:ne}}var Up={Spacebar:" ",Right:Zr,Left:Kr,Up:ed,Down:td};function Ps(e){return e=ei(e)?e:e.key,Up[e]||e}var al="keydown";function Kp(e,t,n){var i=Kt(e),o=i.on,r=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function x(){b(),o(ln,g),o(ln,b),o(On,f)}function b(){var C=n.keyboard;C&&(u=C==="global"?window:d,r(u,al,v))}function g(){l(u,al)}function h(C){p=C}function f(){var C=p;p=!0,Mc(function(){p=C})}function v(C){if(!p){var y=Ps(C);y===c(Kr)?e.go("<"):y===c(Zr)&&e.go(">")}}return{mount:x,destroy:g,disable:h}}var Co=ys+"-lazy",$r=Co+"-srcset",Zp="["+Co+"], ["+$r+"]";function Jp(e,t,n){var i=Kt(e),o=i.on,r=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[ro,Ii],p=[];function x(){n.lazyLoad&&(b(),o(en,b))}function b(){Dn(p),g(),c?C():(r(u),o(u,h),h())}function g(){t.Slides.forEach(function(y){fs(y.slide,Zp).forEach(function(T){var W=Sn(T,Co),_=Sn(T,$r);if(W!==T.src||_!==T.srcset){var X=n.classes.spinner,D=T.parentElement,w=Xo(D,"."+X)||Bi("span",X,D);p.push([T,y,w]),T.src||Mo(T,"none")}})})}function h(){p=p.filter(function(y){var T=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,T)?f(y):!0}),p.length||r(u)}function f(y){var T=y[0];Pn(y[1].slide,Ja),l(T,"load error",Xt(v,y)),$t(T,"src",Sn(T,Co)),$t(T,"srcset",Sn(T,$r)),En(T,Co),En(T,$r)}function v(y,T){var W=y[0],_=y[1];_n(_.slide,Ja),T.type!=="error"&&($i(y[2]),Mo(W,""),d(Cs,W,_),d(Xi)),c&&C()}function C(){p.length&&f(p.shift())}return{mount:x,destroy:Xt(Dn,p),check:h}}function Qp(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,x=u.getIndex,b=u.go,g=t.Direction.resolve,h=c.pagination,f=[],v,C;function y(){T(),o([ln,en,Ar],y);var m=n.pagination;h&&Mo(h,m?"":"none"),m&&(o([On,qr,Ii],R),W(),R(),r(Uc,{list:v,items:f},w(e.index)))}function T(){v&&($i(h?oi(v.children):v),_n(v,C),Dn(f),v=null),i.destroy()}function W(){var m=e.length,E=n.classes,I=n.i18n,J=n.perPage,A=p()?u.getEnd()+1:ko(m/J);v=h||Bi("ul",E.pagination,c.track.parentElement),Pn(v,C=ta+"--"+D()),$t(v,Nn,"tablist"),$t(v,yn,I.select),$t(v,Is,D()===Jr?"vertical":"");for(var Q=0;Q<A;Q++){var q=Bi("li",null,v),Y=Bi("button",{class:E.page,type:"button"},q),oe=d.getIn(Q).map(function(N){return N.slide.id}),L=!p()&&J>1?I.pageX:I.slideX;l(Y,"click",Xt(_,Q)),n.paginationKeyboard&&l(Y,"keydown",Xt(X,Q)),$t(q,Nn,"presentation"),$t(Y,Nn,"tab"),$t(Y,Yo,oe.join(" ")),$t(Y,yn,Ua(L,Q+1)),$t(Y,zi,-1),f.push({li:q,button:Y,page:Q})}}function _(m){b(">"+m,!0)}function X(m,E){var I=f.length,J=Ps(E),A=D(),Q=-1;J===g(Zr,!1,A)?Q=++m%I:J===g(Kr,!1,A)?Q=(--m+I)%I:J==="Home"?Q=0:J==="End"&&(Q=I-1);var q=f[Q];q&&(_c(q.button),b(">"+Q),An(E,!0))}function D(){return n.paginationDirection||n.direction}function w(m){return f[u.toPage(m)]}function R(){var m=w(x(!0)),E=w(x());if(m){var I=m.button;_n(I,Ci),En(I,el),$t(I,zi,-1)}if(E){var J=E.button;Pn(J,Ci),$t(J,el,!0),$t(J,zi,"")}r(Kc,{list:v,items:f},m,E)}return{items:f,mount:y,destroy:T,getAt:w,update:R}}var em=[" ","Enter"];function tm(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){r.forEach(function(h){h.destroy()}),Dn(r)}function c(){d(),l()}function u(h,f){var v=Kt(h);v.on(On,function(C,y,T){f.go(f.is(ao)?T:C)}),r.push(v)}function p(){var h=Kt(e),f=h.on;f(xs,b),f(Jc,g),f([ri,ln],x),r.push(h),h.emit(ws,e.splides)}function x(){$t(t.Elements.list,Is,n.direction===Jr?"vertical":"")}function b(h){e.go(h.index)}function g(h,f){gs(em,Ps(f))&&(b(h),An(f))}return{setup:Xt(t.Media.set,{slideFocus:jo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function nm(e,t,n){var i=Kt(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Ni)}function d(u){if(u.cancelable){var p=u.deltaY,x=p<0,b=qa(u),g=n.wheelMinThreshold||0,h=n.wheelSleep||0;dn(p)>g&&b-r>h&&(e.go(x?"<":">"),r=b),c(x)&&An(u)}}function c(u){return!n.releaseWheel||e.state.is(oo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var im=90;function om(e,t,n){var i=Kt(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,d=Bi("span",Sp),c=Yr(im,Xt(p,!1));function u(){l&&(b(!t.Autoplay.isPaused()),$t(r,il,!0),d.textContent="…",o(Ss,Xt(b,!0)),o($s,Xt(b,!1)),o([ro,Ii],Xt(p,!0)))}function p(g){$t(r,nl,g),g?(Go(r,d),c.start()):($i(d),c.cancel())}function x(){En(r,[tl,il,nl]),$i(d)}function b(g){l&&$t(r,tl,g?"off":"polite")}return{mount:u,disable:b,destroy:x}}var rm=Object.freeze({__proto__:null,Media:mp,Direction:gp,Elements:Lp,Slides:Ep,Layout:Mp,Clones:Ap,Move:Fp,Controller:_p,Arrows:Hp,Autoplay:Op,Cover:Bp,Scroll:qp,Drag:Yp,Keyboard:Kp,LazyLoad:Jp,Pagination:Qp,Sync:tm,Wheel:nm,Live:om}),am={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"},sm={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:Tp,i18n:am,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function lm(e,t,n){var i=t.Slides;function o(){Kt(e).on([ri,en],r)}function r(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Mc(c)}return{mount:o,start:l,cancel:Xa}}function cm(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,d=Xt(wn,l,"transition"),c;function u(){Kt(e).bind(l,"transitionend",function(g){g.target===l&&c&&(x(),c())})}function p(g,h){var f=i.toPosition(g,!0),v=i.getPosition(),C=b(g);dn(f-v)>=1&&C>=1?n.useScroll?r.scroll(f,C,!1,h):(d("transform "+C+"ms "+n.easing),i.translate(f,!0),c=h):(i.jump(g),h())}function x(){d(""),r.cancel()}function b(g){var h=n.rewindSpeed;if(e.is(qi)&&h){var f=o.getIndex(!0),v=o.getEnd();if(f===0&&g>=v||f>=v&&g===0)return h}return n.speed}return{mount:u,start:p,cancel:x}}var dm=(function(){function e(n,i){this.event=Kt(),this.Components={},this.state=up(Di),this.splides=[],this._o={},this._E={};var o=ei(n)?Wc(document,n):n;$o(o,o+" is invalid."),this.root=o,i=qn({label:Sn(o,yn)||"",labelledby:Sn(o,Ts)||""},sm,e.defaults,i||{});try{qn(i,JSON.parse(Sn(o,ys)))}catch{$o(!1,"Invalid JSON")}this._o=Object.create(qn({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,d=this.Components;$o(l.is([Di,Er]),"Already mounted!"),l.set(Di),this._C=d,this._T=o||this._T||(this.is(Uo)?lm:cm),this._E=i||this._E;var c=Eo({},rm,this._E,{Transition:this._T});return wi(c,function(u,p){var x=u(r,d,r._o);d[p]=x,x.setup&&x.setup()}),wi(d,function(u){u.mount&&u.mount()}),this.emit(ri),Pn(this.root,$p),l.set(Gi),this.emit(Ka),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Gi)&&(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(oi(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(en),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(Di)?Kt(this).on(Ka,this.destroy.bind(this,i)):(wi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(bs),o.destroy(),i&&Dn(this.splides),r.set(Er)),this},ap(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})(),Es=dm;Es.defaults={};Es.STATES=lp;var sl=[[ri,"onMounted"],[Ka,"onReady"],[On,"onMove"],[ro,"onMoved"],[xs,"onClick"],[Oc,"onActive"],[Bc,"onInactive"],[zc,"onVisible"],[jc,"onHidden"],[en,"onRefresh"],[ln,"onUpdated"],[Xi,"onResize"],[Xr,"onResized"],[Vc,"onDrag"],[Gc,"onDragging"],[Xc,"onDragged"],[qr,"onScroll"],[Ii,"onScrolled"],[bs,"onDestroy"],[qc,"onArrowsMounted"],[Yc,"onArrowsUpdated"],[Uc,"onPaginationMounted"],[Kc,"onPaginationUpdated"],[ws,"onNavigationMounted"],[Ss,"onAutoplayPlay"],[Zc,"onAutoplayPlaying"],[$s,"onAutoplayPause"],[Cs,"onLazyLoadLoaded"]];function Ms(...e){return e.filter(Boolean).join(" ")}function Fr(e){return e!==null&&typeof e=="object"}function Qa(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Qa(n,t[i]));if(Fr(e)&&Fr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Qa(e[o],t[o]))}return e===t}function um(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function pm(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 es(e,t){const n=e;return pm(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Fr(i)?n[o]=es(Fr(n[o])?n[o]:{},i):n[o]=i}),n}var mm=({children:e,className:t,...n})=>s.createElement("div",{className:Ms("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),ks=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Es(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=es({},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&&!Qa(this.options,e)&&(this.splide.options=e,this.options=es({},e));const t=this.getSlides();um(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 s.createElement(t,{className:Ms("splide",e),ref:this.splideRef,...this.omit(o,["options",...sl.map(r=>r[1])])},n?s.createElement(mm,null,i):i)}},As=({children:e,className:t,...n})=>s.createElement("li",{className:Ms("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),pt=require("classnames"),W=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),zn=require("react-dom");function vu(e){return e.type==="object"&&e.version===1}const xu="ControlSlider-module__wrapper___sHEkd",bu="ControlSlider-module__hoverArrow___A-dOH",wu="ControlSlider-module__sliderItem___QQSkR",Su="ControlSlider-module__sliderImage___9hRl-",Cu="ControlSlider-module__arrow___05ghY",$u="ControlSlider-module__arrowVertical___tBfVN",Tu="ControlSlider-module__nextArrow___-30Yc",Iu="ControlSlider-module__arrowInner___aEra3",Ru="ControlSlider-module__arrowIcon___S4ztF",Lu="ControlSlider-module__arrowImg___2dwJW",Pu="ControlSlider-module__mirror___brd6U",Eu="ControlSlider-module__pagination___bicLF",Mu="ControlSlider-module__paginationInner___bT-P-",ku="ControlSlider-module__paginationVertical___zYqKw",Au="ControlSlider-module__paginationItem___nTRbk",Fu="ControlSlider-module__dot___p1Qun",_u="ControlSlider-module__activeDot___LHFaj",Nu="ControlSlider-module__paginationInsideBottom___R3FWn",Wu="ControlSlider-module__paginationInsideTop___V-qb-",Hu="ControlSlider-module__paginationOutsideBottom___14w8D",Du="ControlSlider-module__paginationOutsideTop___SCLqB",Ou="ControlSlider-module__paginationInsideLeft___yOBRZ",Bu="ControlSlider-module__paginationInsideRight___Rtt3o",zu="ControlSlider-module__paginationOutsideLeft___lahaw",ju="ControlSlider-module__paginationOutsideRight___EtuQa",Vu="ControlSlider-module__imgWrapper___UjEgB",Gu="ControlSlider-module__captionBlock___dJ6-j",Xu="ControlSlider-module__captionTextWrapper___HFlpf",qu="ControlSlider-module__captionText___uGBVc",Yu="ControlSlider-module__active___WZK4G",Uu="ControlSlider-module__withPointerEvents___t-18M",Ku="ControlSlider-module__topLeftAlignment___zjnGM",Zu="ControlSlider-module__topCenterAlignment___gD1xW",Ju="ControlSlider-module__topRightAlignment___NMapS",Qu="ControlSlider-module__middleLeftAlignment___OnUrY",ep="ControlSlider-module__middleCenterAlignment___Tdkl0",tp="ControlSlider-module__middleRightAlignment___wEbfX",np="ControlSlider-module__bottomLeftAlignment___cTP2-",ip="ControlSlider-module__bottomCenterAlignment___c54fB",op="ControlSlider-module__bottomRightAlignment___kEwrz",rp="ControlSlider-module__clickOverlay___DZA28",ap="ControlSlider-module__contain___pLyq7",sp="ControlSlider-module__cover___KdDat",dt={wrapper:xu,hoverArrow:bu,sliderItem:wu,sliderImage:Su,arrow:Cu,arrowVertical:$u,nextArrow:Tu,arrowInner:Iu,arrowIcon:Ru,arrowImg:Lu,mirror:Pu,pagination:Eu,paginationInner:Mu,paginationVertical:ku,paginationItem:Au,dot:Fu,activeDot:_u,paginationInsideBottom:Nu,paginationInsideTop:Wu,paginationOutsideBottom:Hu,paginationOutsideTop:Du,paginationInsideLeft:Ou,paginationInsideRight:Bu,paginationOutsideLeft:zu,paginationOutsideRight:ju,imgWrapper:Vu,captionBlock:Gu,captionTextWrapper:Xu,captionText:qu,active:Yu,withPointerEvents:Uu,topLeftAlignment:Ku,topCenterAlignment:Zu,topRightAlignment:Ju,middleLeftAlignment:Qu,middleCenterAlignment:ep,middleRightAlignment:tp,bottomLeftAlignment:np,bottomCenterAlignment:ip,bottomRightAlignment:op,clickOverlay:rp,contain:ap,cover:sp};function lp(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 cp(e,t,n){return t&&lp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Js="(prefers-reduced-motion: reduce)",Bi=1,dp=2,qi=3,ao=4,Vo=5,Sr=6,Mr=7,up={CREATED:Bi,MOUNTED:dp,IDLE:qi,MOVING:ao,SCROLLING:Vo,DRAGGING:Sr,DESTROYED:Mr};function On(e){e.length=0}function ri(e,t,n){return Array.prototype.slice.call(e,t,n)}function Yt(e){return e.bind.apply(e,[null].concat(ri(arguments,1)))}var _c=setTimeout,Xa=function(){};function Qs(e){return requestAnimationFrame(e)}function Xr(e,t){return typeof t===e}function Po(e){return!ys(e)&&Xr("object",e)}var fs=Array.isArray,Nc=Yt(Xr,"function"),ti=Yt(Xr,"string"),Go=Yt(Xr,"undefined");function ys(e){return e===null}function Wc(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Xo(e){return fs(e)?e:[e]}function xn(e,t){Xo(e).forEach(t)}function vs(e,t){return e.indexOf(t)>-1}function Cr(e,t){return e.push.apply(e,Xo(t)),e}function _n(e,t,n){e&&xn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function En(e,t){_n(e,ti(t)?t.split(" "):t,!0)}function qo(e,t){xn(t,e.appendChild.bind(e))}function xs(e,t){xn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Eo(e,t){return Wc(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Hc(e,t){var n=e?ri(e.children):[];return t?n.filter(function(i){return Eo(i,t)}):n}function Yo(e,t){return t?Hc(e,t)[0]:e.firstElementChild}var Mo=Object.keys;function Ci(e,t,n){return e&&(n?Mo(e).reverse():Mo(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function ko(e){return ri(arguments,1).forEach(function(t){Ci(t,function(n,i){e[i]=t[i]})}),e}function Yn(e){return ri(arguments,1).forEach(function(t){Ci(t,function(n,i){fs(n)?e[i]=n.slice():Po(n)?e[i]=Yn({},Po(e[i])?e[i]:{},n):e[i]=n})}),e}function el(e,t){xn(t||Mo(e),function(n){delete e[n]})}function Mn(e,t){xn(e,function(n){xn(t,function(i){n&&n.removeAttribute(i)})})}function $t(e,t,n){Po(t)?Ci(t,function(i,o){$t(e,o,i)}):xn(e,function(i){ys(n)||n===""?Mn(i,t):i.setAttribute(t,String(n))})}function ji(e,t,n){var i=document.createElement(e);return t&&(ti(t)?En(i,t):$t(i,t)),n&&qo(n,i),i}function wn(e,t,n){if(Go(n))return getComputedStyle(e)[t];ys(n)||(e.style[t]=""+n)}function Ao(e,t){wn(e,"display",t)}function Dc(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Sn(e,t){return e.getAttribute(t)}function tl(e,t){return e&&e.classList.contains(t)}function hn(e){return e.getBoundingClientRect()}function Ti(e){xn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Oc(e){return Yo(new DOMParser().parseFromString(e,"text/html").body)}function Fn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Bc(e,t){return e&&e.querySelector(t)}function bs(e,t){return t?ri(e.querySelectorAll(t)):[]}function Nn(e,t){_n(e,t,!1)}function qa(e){return e.timeStamp}function ui(e){return ti(e)?e:e?e+"px":""}var Uo="splide",ws="data-"+Uo;function To(e,t){if(!e)throw new Error("["+Uo+"] "+(t||""))}var ni=Math.min,kr=Math.max,Ar=Math.floor,Fo=Math.ceil,dn=Math.abs;function zc(e,t,n){return dn(e-t)<n}function $r(e,t,n,i){var o=ni(t,n),r=kr(t,n);return i?o<e&&e<r:o<=e&&e<=r}function Wi(e,t,n){var i=ni(t,n),o=kr(t,n);return ni(kr(i,e),o)}function Ya(e){return+(e>0)-+(e<0)}function Ua(e,t){return xn(t,function(n){e=e.replace("%s",""+n)}),e}function Ss(e){return e<10?"0"+e:""+e}var nl={};function pp(e){return""+e+Ss(nl[e]=(nl[e]||0)+1)}function jc(){var e=[];function t(l,d,c,u){o(l,d,function(p,v,w){var m="addEventListener"in p,h=m?p.removeEventListener.bind(p,v,c,u):p.removeListener.bind(p,c);m?p.addEventListener(v,c,u):p.addListener(c),e.push([p,v,w,c,h])})}function n(l,d,c){o(l,d,function(u,p,v){e=e.filter(function(w){return w[0]===u&&w[1]===p&&w[2]===v&&(!c||w[3]===c)?(w[4](),!1):!0})})}function i(l,d,c){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:p,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,p,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){xn(l,function(u){u&&xn(d,function(p){p.split(" ").forEach(function(v){var w=v.split(".");c(u,w[0],w[1])})})})}function r(){e.forEach(function(l){l[4]()}),On(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var ai="mounted",Ka="ready",Bn="move",so="moved",Cs="click",Vc="active",Gc="inactive",Xc="visible",qc="hidden",en="refresh",ln="updated",Yi="resize",qr="resized",Yc="drag",Uc="dragging",Kc="dragged",Yr="scroll",Li="scrolled",mp="overflow",$s="destroy",Zc="arrows:mounted",Jc="arrows:updated",Qc="pagination:mounted",ed="pagination:updated",Ts="navigation:mounted",Is="autoplay:play",td="autoplay:playing",Rs="autoplay:pause",Ls="lazyload:loaded",nd="sk",id="sh",Fr="ei";function Zt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=jc();function i(r,l){n.bind(t,Xo(r).join(" "),function(d){l.apply(l,fs(d.detail)?d.detail:[])})}function o(r){n.dispatch(t,r,ri(arguments,1))}return e&&e.event.on($s,n.destroy),ko(n,{bus:t,on:i,off:Yt(n.unbind,t),emit:o})}function Ur(e,t,n,i){var o=Date.now,r,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?ni((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return w();d=Qs(p)}}function v(C){C||h(),r=o()-(C?l*e:0),c=!1,d=Qs(p)}function w(){c=!0}function m(){r=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function f(C){e=C}function x(){return c}return{start:v,rewind:m,pause:w,cancel:h,set:f,isPaused:x}}function gp(e){var t=e;function n(o){t=o}function i(o){return vs(Xo(o),t)}return{set:n,is:i}}function hp(e,t){var n=Ur(0,e,null,1);return function(){n.isPaused()&&n.start()}}function fp(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=jc(),d=[];function c(){var h=n.mediaQuery==="min";Mo(o).sort(function(f,x){return h?+f-+x:+x-+f}).forEach(function(f){p(o[f],"("+(h?"min":"max")+"-width:"+f+"px)")}),p(r,Js),v()}function u(h){h&&l.destroy()}function p(h,f){var x=matchMedia(f);l.bind(x,"change",v),d.push([h,x])}function v(){var h=i.is(Mr),f=n.direction,x=d.reduce(function(C,y){return Yn(C,y[1].matches?y[0]:{})},{});el(n),m(x),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):f!==n.direction&&e.refresh()}function w(h){matchMedia(Js).matches&&(h?Yn(n,r):el(n,Mo(r)))}function m(h,f,x){Yn(n,h),f&&Yn(Object.getPrototypeOf(n),h),(x||!i.is(Bi))&&e.emit(ln,n)}return{setup:c,destroy:u,reduce:w,set:m}}var Kr="Arrow",Zr=Kr+"Left",Jr=Kr+"Right",od=Kr+"Up",rd=Kr+"Down",il="rtl",Qr="ttb",pa={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[od,Jr],ArrowRight:[rd,Zr]};function yp(e,t,n){function i(r,l,d){d=d||n.direction;var c=d===il&&!l?1:d===Qr?0:-1;return pa[r]&&pa[r][c]||r.replace(/width|left|right/i,function(u,p){var v=pa[u.toLowerCase()][c]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(r){return r*(n.direction===il?1:-1)}return{resolve:i,orient:o}}var Wn="role",Vi="tabindex",vp="disabled",Cn="aria-",Ko=Cn+"controls",ad=Cn+"current",ol=Cn+"selected",yn=Cn+"label",Ps=Cn+"labelledby",sd=Cn+"hidden",Es=Cn+"orientation",_o=Cn+"roledescription",rl=Cn+"live",al=Cn+"busy",sl=Cn+"atomic",Ms=[Wn,Vi,vp,Ko,ad,yn,Ps,sd,Es,_o],kn=Uo+"__",si="is-",ma=Uo,ll=kn+"track",xp=kn+"list",ea=kn+"slide",ld=ea+"--clone",bp=ea+"__container",ks=kn+"arrows",ta=kn+"arrow",cd=ta+"--prev",dd=ta+"--next",na=kn+"pagination",ud=na+"__page",wp=kn+"progress",Sp=wp+"__bar",Cp=kn+"toggle",$p=kn+"spinner",Tp=kn+"sr",Ip=si+"initialized",Ii=si+"active",pd=si+"prev",md=si+"next",Za=si+"visible",Ja=si+"loading",gd=si+"focus-in",hd=si+"overflow",Rp=[Ii,Za,pd,md,Ja,gd,hd],Lp={slide:ea,clone:ld,arrows:ks,arrow:ta,prev:cd,next:dd,pagination:na,page:ud,spinner:$p};function Pp(e,t){if(Nc(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Eo(n,t);)n=n.parentElement;return n}var Ep=5,cl=200,fd="touchstart mousedown",ga="touchmove mousemove",ha="touchend touchcancel mouseup click";function Mp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],v=[],w,m,h;function f(){S(),B(),y()}function x(){o(en,C),o(en,f),o(ln,y),r(document,fd+" keydown",function(D){h=D.type==="keydown"},{capture:!0}),r(l,"focusin",function(){_n(l,gd,!!h)})}function C(D){var T=Ms.concat("style");On(u),Nn(l,p),Nn(w,v),Mn([w,m],T),Mn(l,D?T:["style",_o])}function y(){Nn(l,p),Nn(w,v),p=q(ma),v=q(ll),En(l,p),En(w,v),$t(l,yn,n.label),$t(l,Ps,n.labelledby)}function S(){w=N("."+ll),m=Yo(w,"."+xp),To(w&&m,"A track/list element is missing."),Cr(u,Hc(m,"."+ea+":not(."+ld+")")),Ci({arrows:ks,pagination:na,prev:cd,next:dd,bar:Sp,toggle:Cp},function(D,T){c[T]=N("."+D)}),ko(c,{root:l,track:w,list:m,slides:u})}function B(){var D=l.id||pp(Uo),T=n.role;l.id=D,w.id=w.id||D+"-track",m.id=m.id||D+"-list",!Sn(l,Wn)&&l.tagName!=="SECTION"&&T&&$t(l,Wn,T),$t(l,_o,d.carousel),$t(m,Wn,"presentation")}function N(D){var T=Bc(l,D);return T&&Pp(T,"."+ma)===l?T:void 0}function q(D){return[D+"--"+n.type,D+"--"+n.direction,n.drag&&D+"--draggable",n.isNavigation&&D+"--nav",D===ma&&Ii]}return ko(c,{setup:f,mount:x,destroy:C})}var Ui="slide",lo="loop",Zo="fade";function kp(e,t,n,i){var o=Zt(e),r=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,v=p.isNavigation,w=p.updateOnMove,m=p.i18n,h=p.pagination,f=p.slideFocus,x=c.Direction.resolve,C=Sn(i,"style"),y=Sn(i,yn),S=n>-1,B=Yo(i,"."+bp),N;function q(){S||(i.id=u.id+"-slide"+Ss(t+1),$t(i,Wn,h?"tabpanel":"group"),$t(i,_o,m.slide),$t(i,yn,y||Ua(m.slideLabel,[t+1,e.length]))),D()}function D(){d(i,"click",Yt(l,Cs,ie)),d(i,"keydown",Yt(l,nd,ie)),r([so,id,Li],I),r(Ts,H),w&&r(Bn,$)}function T(){N=!0,o.destroy(),Nn(i,Rp),Mn(i,Ms),$t(i,"style",C),$t(i,yn,y||"")}function H(){var L=e.splides.map(function(_){var V=_.splide.Components.Slides.getAt(t);return V?V.slide.id:""}).join(" ");$t(i,yn,Ua(m.slideX,(S?n:t)+1)),$t(i,Ko,L),$t(i,Wn,f?"button":""),f&&Mn(i,_o)}function $(){N||I()}function I(){if(!N){var L=e.index;P(),E(),_n(i,pd,t===L-1),_n(i,md,t===L+1)}}function P(){var L=z();L!==tl(i,Ii)&&(_n(i,Ii,L),$t(i,ad,v&&L||""),l(L?Vc:Gc,ie))}function E(){var L=F(),_=!L&&(!z()||S);if(e.state.is([ao,Vo])||$t(i,sd,_||""),$t(bs(i,p.focusableNodes||""),Vi,_?-1:""),f&&$t(i,Vi,_?-1:0),L!==tl(i,Za)&&(_n(i,Za,L),l(L?Xc:qc,ie)),!L&&document.activeElement===i){var V=c.Slides.getAt(e.index);V&&Dc(V.slide)}}function g(L,_,V){wn(V&&B||i,L,_)}function z(){var L=e.index;return L===t||p.cloneStatus&&L===n}function F(){if(e.is(Zo))return z();var L=hn(c.Elements.track),_=hn(i),V=x("left",!0),ae=x("right",!0);return Ar(L[V])<=Fo(_[V])&&Ar(_[ae])<=Fo(L[ae])}function X(L,_){var V=dn(L-t);return!S&&(p.rewind||e.is(lo))&&(V=ni(V,e.length-V)),V<=_}var ie={index:t,slideIndex:n,slide:i,container:B,isClone:S,mount:q,destroy:T,update:I,style:g,isWithin:X};return ie}function Ap(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function v(){w(),o(en,m),o(en,w)}function w(){c.forEach(function(I,P){f(I,P,-1)})}function m(){N(function(I){I.destroy()}),On(p)}function h(){N(function(I){I.update()})}function f(I,P,E){var g=kp(e,P,E,I);g.mount(),p.push(g),p.sort(function(z,F){return z.index-F.index})}function x(I){return I?q(function(P){return!P.isClone}):p}function C(I){var P=t.Controller,E=P.toIndex(I),g=P.hasFocus()?1:n.perPage;return q(function(z){return $r(z.index,E,E+g-1)})}function y(I){return q(I)[0]}function S(I,P){xn(I,function(E){if(ti(E)&&(E=Oc(E)),Wc(E)){var g=c[P];g?xs(E,g):qo(u,E),En(E,n.classes.slide),T(E,Yt(r,Yi))}}),r(en)}function B(I){Ti(q(I).map(function(P){return P.slide})),r(en)}function N(I,P){x(P).forEach(I)}function q(I){return p.filter(Nc(I)?I:function(P){return ti(I)?Eo(P.slide,I):vs(Xo(I),P.index)})}function D(I,P,E){N(function(g){g.style(I,P,E)})}function T(I,P){var E=bs(I,"img"),g=E.length;g?E.forEach(function(z){l(z,"load error",function(){--g||P()})}):P()}function H(I){return I?c.length:p.length}function $(){return p.length>n.perPage}return{mount:v,destroy:m,update:h,register:f,get:x,getIn:C,getAt:y,add:S,remove:B,forEach:N,filter:q,style:D,getLength:H,isEnough:$}}function Fp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,v=u.track,w=u.list,m=d.getAt,h=d.style,f,x,C;function y(){S(),r(window,"resize load",hp(Yt(l,Yi))),o([ln,en],S),o(Yi,B)}function S(){f=n.direction===Qr,wn(p,"maxWidth",ui(n.width)),wn(v,c("paddingLeft"),N(!1)),wn(v,c("paddingRight"),N(!0)),B(!0)}function B(ie){var L=hn(p);(ie||x.width!==L.width||x.height!==L.height)&&(wn(v,"height",q()),h(c("marginRight"),ui(n.gap)),h("width",T()),h("height",H(),!0),x=L,l(qr),C!==(C=X())&&(_n(p,hd,C),l(mp,C)))}function N(ie){var L=n.padding,_=c(ie?"right":"left");return L&&ui(L[_]||(Po(L)?0:L))||"0px"}function q(){var ie="";return f&&(ie=D(),To(ie,"height or heightRatio is missing."),ie="calc("+ie+" - "+N(!1)+" - "+N(!0)+")"),ie}function D(){return ui(n.height||hn(w).width*n.heightRatio)}function T(){return n.autoWidth?null:ui(n.fixedWidth)||(f?"":$())}function H(){return ui(n.fixedHeight)||(f?n.autoHeight?null:$():D())}function $(){var ie=ui(n.gap);return"calc((100%"+(ie&&" + "+ie)+")/"+(n.perPage||1)+(ie&&" - "+ie)+")"}function I(){return hn(w)[c("width")]}function P(ie,L){var _=m(ie||0);return _?hn(_.slide)[c("width")]+(L?0:z()):0}function E(ie,L){var _=m(ie);if(_){var V=hn(_.slide)[c("right")],ae=hn(w)[c("left")];return dn(V-ae)+(L?0:z())}return 0}function g(ie){return E(e.length-1)-E(0)+P(0,ie)}function z(){var ie=m(0);return ie&&parseFloat(wn(ie.slide,c("marginRight")))||0}function F(ie){return parseFloat(wn(v,c("padding"+(ie?"Right":"Left"))))||0}function X(){return e.is(Zo)||g(!0)>I()}return{mount:y,resize:B,listSize:I,slideSize:P,sliderSize:g,totalSize:E,getPadding:F,isOverflow:X}}var _p=2;function Np(e,t,n){var i=Zt(e),o=i.on,r=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(en,v),o([ln,Yi],m),(u=x())&&(h(u),t.Layout.resize(!0))}function v(){w(),p()}function w(){Ti(c),On(c),i.destroy()}function m(){var C=x();u!==C&&(u<C||!C)&&i.emit(en)}function h(C){var y=l.get().slice(),S=y.length;if(S){for(;y.length<C;)Cr(y,y);Cr(y.slice(-C),y.slice(0,C)).forEach(function(B,N){var q=N<C,D=f(B.slide,N);q?xs(D,y[0].slide):qo(r.list,D),Cr(c,D),l.register(D,N-C+(q?0:S),B.index)})}}function f(C,y){var S=C.cloneNode(!0);return En(S,n.classes.clone),S.id=e.root.id+"-clone"+Ss(y+1),S}function x(){var C=n.clones;if(!e.is(lo))C=0;else if(Go(C)){var y=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=y&&Fo(hn(r.track)[d("width")]/y);C=S||n[d("autoWidth")]&&e.length||n.perPage*_p}return C}return{mount:p,destroy:w}}function Wp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,v=d.listSize,w=d.sliderSize,m=t.Direction,h=m.resolve,f=m.orient,x=t.Elements,C=x.list,y=x.track,S;function B(){S=t.Transition,o([ai,qr,ln,en],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),D(e.index),t.Slides.update())}function q(_,V,ae,re){_!==V&&ie(_>ae)&&(I(),T($(g(),_>ae),!0)),l(ao),r(Bn,V,ae,_),S.start(V,function(){l(qi),r(so,V,ae,_),re&&re()})}function D(_){T(E(_,!0))}function T(_,V){if(!e.is(Zo)){var ae=V?_:H(_);wn(C,"transform","translate"+h("X")+"("+ae+"px)"),_!==ae&&r(id)}}function H(_){if(e.is(lo)){var V=P(_),ae=V>t.Controller.getEnd(),re=V<0;(re||ae)&&(_=$(_,ae))}return _}function $(_,V){var ae=_-X(V),re=w();return _-=f(re*(Fo(dn(ae)/re)||1))*(V?1:-1),_}function I(){T(g(),!0),S.cancel()}function P(_){for(var V=t.Slides.get(),ae=0,re=1/0,M=0;M<V.length;M++){var se=V[M].index,j=dn(E(se,!0)-_);if(j<=re)re=j,ae=se;else break}return ae}function E(_,V){var ae=f(p(_-1)-F(_));return V?z(ae):ae}function g(){var _=h("left");return hn(C)[_]-hn(y)[_]+f(u(!1))}function z(_){return n.trimSpace&&e.is(Ui)&&(_=Wi(_,0,f(w(!0)-v()))),_}function F(_){var V=n.focus;return V==="center"?(v()-c(_,!0))/2:+V*c(_)||0}function X(_){return E(_?t.Controller.getEnd():0,!!n.trimSpace)}function ie(_){var V=f($(g(),_));return _?V>=0:V<=C[h("scrollWidth")]-hn(y)[h("width")]}function L(_,V){V=Go(V)?g():V;var ae=_!==!0&&f(V)<f(X(!1)),re=_!==!1&&f(V)>f(X(!0));return ae||re}return{mount:B,move:q,jump:D,translate:T,shift:$,cancel:I,toIndex:P,toPosition:E,getPosition:g,getLimit:X,exceededLimit:L,reposition:N}}function Hp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,v=p.isEnough,w=p.getLength,m=n.omitEnd,h=e.is(lo),f=e.is(Ui),x=Yt(g,!1),C=Yt(g,!0),y=n.start||0,S,B=y,N,q,D;function T(){H(),o([ln,en,Fr],H),o(qr,$)}function H(){N=w(!0),q=n.perMove,D=n.perPage,S=ie();var j=Wi(y,0,m?S:N-1);j!==y&&(y=j,l.reposition())}function $(){S!==ie()&&r(Fr)}function I(j,b,k){if(!se()){var G=E(j),he=X(G);he>-1&&(b||he!==y)&&(ae(he),l.move(G,he,B,k))}}function P(j,b,k,G){t.Scroll.scroll(j,b,k,function(){var he=X(l.toIndex(d()));ae(m?ni(he,S):he),G&&G()})}function E(j){var b=y;if(ti(j)){var k=j.match(/([+\-<>])(\d+)?/)||[],G=k[1],he=k[2];G==="+"||G==="-"?b=z(y+ +(""+G+(+he||1)),y):G===">"?b=he?L(+he):x(!0):G==="<"&&(b=C(!0))}else b=h?j:Wi(j,0,S);return b}function g(j,b){var k=q||(M()?1:D),G=z(y+k*(j?-1:1),y,!(q||M()));return G===-1&&f&&!zc(d(),c(!j),1)?j?0:S:b?G:X(G)}function z(j,b,k){if(v()||M()){var G=F(j);G!==j&&(b=j,j=G,k=!1),j<0||j>S?!q&&($r(0,j,b,!0)||$r(S,b,j,!0))?j=L(_(j)):h?j=k?j<0?-(N%D||D):N:j:n.rewind?j=j<0?S:0:j=-1:k&&j!==b&&(j=L(_(b)+(j<b?-1:1)))}else j=-1;return j}function F(j){if(f&&n.trimSpace==="move"&&j!==y)for(var b=d();b===u(j,!0)&&$r(j,0,e.length-1,!n.rewind);)j<y?--j:++j;return j}function X(j){return h?(j+N)%N||0:j}function ie(){for(var j=N-(M()||h&&q?1:D);m&&j-- >0;)if(u(N-1,!0)!==u(j,!0)){j++;break}return Wi(j,0,N-1)}function L(j){return Wi(M()?j:D*j,0,S)}function _(j){return M()?ni(j,S):Ar((j>=S?N-1:j)/D)}function V(j){var b=l.toIndex(j);return f?Wi(b,0,S):b}function ae(j){j!==y&&(B=y,y=j)}function re(j){return j?B:y}function M(){return!Go(n.focus)||n.isNavigation}function se(){return e.state.is([ao,Vo])&&!!n.waitForTransition}return{mount:T,go:I,scroll:P,getNext:x,getPrev:C,getAdjacent:g,getEnd:ie,setIndex:ae,getIndex:re,toIndex:L,toPage:_,toDest:V,hasFocus:M,isBusy:se}}var Dp="http://www.w3.org/2000/svg",Op="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",rr=40;function Bp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,v=u.arrows,w=u.track,m=v,h=u.prev,f=u.next,x,C,y={};function S(){N(),o(ln,B)}function B(){q(),S()}function N(){var P=n.arrows;P&&!(h&&f)&&H(),h&&f&&(ko(y,{prev:h,next:f}),Ao(m,P?"":"none"),En(m,C=ks+"--"+n.direction),P&&(D(),I(),$t([h,f],Ko,w.id),l(Zc,h,f)))}function q(){i.destroy(),Nn(m,C),x?(Ti(v?[h,f]:m),h=f=null):Mn([h,f],Ms)}function D(){o([ai,so,en,Li,Fr],I),r(f,"click",Yt(T,">")),r(h,"click",Yt(T,"<"))}function T(P){p.go(P,!0)}function H(){m=v||ji("div",d.arrows),h=$(!0),f=$(!1),x=!0,qo(m,[h,f]),!v&&xs(m,w)}function $(P){var E='<button class="'+d.arrow+" "+(P?d.prev:d.next)+'" type="button"><svg xmlns="'+Dp+'" viewBox="0 0 '+rr+" "+rr+'" width="'+rr+'" height="'+rr+'" focusable="false"><path d="'+(n.arrowPath||Op)+'" />';return Oc(E)}function I(){if(h&&f){var P=e.index,E=p.getPrev(),g=p.getNext(),z=E>-1&&P<E?c.last:c.prev,F=g>-1&&P>g?c.first:c.next;h.disabled=E<0,f.disabled=g<0,$t(h,yn,z),$t(f,yn,F),l(Jc,h,f,E,g)}}return{arrows:y,mount:S,destroy:q,update:I}}var zp=ws+"-interval";function jp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.emit,d=Ur(n.interval,e.go.bind(e,">"),D),c=d.isPaused,u=t.Elements,p=t.Elements,v=p.root,w=p.toggle,m=n.autoplay,h,f,x=m==="pause";function C(){m&&(y(),w&&$t(w,Ko,u.track.id),x||S(),q())}function y(){n.pauseOnHover&&r(v,"mouseenter mouseleave",function(H){h=H.type==="mouseenter",N()}),n.pauseOnFocus&&r(v,"focusin focusout",function(H){f=H.type==="focusin",N()}),w&&r(w,"click",function(){x?S():B(!0)}),o([Bn,Yr,en],d.rewind),o(Bn,T)}function S(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),f=h=x=!1,q(),l(Is))}function B(H){H===void 0&&(H=!0),x=!!H,q(),c()||(d.pause(),l(Rs))}function N(){x||(h||f?B(!1):S())}function q(){w&&(_n(w,Ii,!x),$t(w,yn,n.i18n[x?"play":"pause"]))}function D(H){var $=u.bar;$&&wn($,"width",H*100+"%"),l(td,H)}function T(H){var $=t.Slides.getAt(H);d.set($&&+Sn($.slide,zp)||n.interval)}return{mount:C,destroy:d.cancel,play:S,pause:B,isPaused:c}}function Vp(e,t,n){var i=Zt(e),o=i.on;function r(){n.cover&&(o(Ls,Yt(d,!0)),o([ai,ln,en],Yt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Yo(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),Ao(u,c?"none":"")}return{mount:r,destroy:Yt(l,!1)}}var Gp=10,Xp=600,qp=.6,Yp=1.5,Up=800;function Kp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,v=d.translate,w=e.is(Ui),m,h,f=1;function x(){o(Bn,B),o([ln,en],N)}function C(D,T,H,$,I){var P=c();if(B(),H&&(!w||!p())){var E=t.Layout.sliderSize(),g=Ya(D)*E*Ar(dn(D)/E)||0;D=d.toPosition(t.Controller.toDest(D%E))+g}var z=zc(P,D,1);f=1,T=z?0:T||kr(dn(D-P)/Yp,Up),h=$,m=Ur(T,y,Yt(S,P,D,I),1),l(Vo),r(Yr),m.start()}function y(){l(qi),h&&h(),r(Li)}function S(D,T,H,$){var I=c(),P=D+(T-D)*q($),E=(P-I)*f;v(I+E),w&&!H&&p()&&(f*=qp,dn(E)<Gp&&C(u(p(!0)),Xp,!1,h,!0))}function B(){m&&m.cancel()}function N(){m&&!m.isPaused()&&(B(),y())}function q(D){var T=n.easingFunc;return T?T(D):1-Math.pow(1-D,4)}return{mount:x,destroy:B,scroll:C,cancel:N}}var Hi={passive:!1,capture:!0};function Zp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,v=t.Controller,w=t.Elements.track,m=t.Media.reduce,h=t.Direction,f=h.resolve,x=h.orient,C=u.getPosition,y=u.exceededLimit,S,B,N,q,D,T=!1,H,$,I;function P(){l(w,ga,Xa,Hi),l(w,ha,Xa,Hi),l(w,fd,g,Hi),l(w,"click",X,{capture:!0}),l(w,"dragstart",Fn),o([ai,ln],E)}function E(){var O=n.drag;ee(!O),q=O==="free"}function g(O){if(H=!1,!$){var Z=he(O);G(O.target)&&(Z||!O.button)&&(v.isBusy()?Fn(O,!0):(I=Z?w:window,D=c.is([ao,Vo]),N=null,l(I,ga,z,Hi),l(I,ha,F,Hi),u.cancel(),p.cancel(),ie(O)))}}function z(O){if(c.is(Sr)||(c.set(Sr),r(Yc)),O.cancelable)if(D){u.translate(S+k(M(O)));var Z=se(O)>cl,te=T!==(T=y());(Z||te)&&ie(O),H=!0,r(Uc),Fn(O)}else V(O)&&(D=_(O),Fn(O))}function F(O){c.is(Sr)&&(c.set(qi),r(Kc)),D&&(L(O),Fn(O)),d(I,ga,z),d(I,ha,F),D=!1}function X(O){!$&&H&&Fn(O,!0)}function ie(O){N=B,B=O,S=C()}function L(O){var Z=ae(O),te=re(Z),Le=n.rewind&&n.rewindByDrag;m(!1),q?v.scroll(te,0,n.snap):e.is(Zo)?v.go(x(Ya(Z))<0?Le?"<":"-":Le?">":"+"):e.is(Ui)&&T&&Le?v.go(y(!0)?">":"<"):v.go(v.toDest(te),!0),m(!0)}function _(O){var Z=n.dragMinThreshold,te=Po(Z),Le=te&&Z.mouse||0,ve=(te?Z.touch:+Z)||10;return dn(M(O))>(he(O)?ve:Le)}function V(O){return dn(M(O))>dn(M(O,!0))}function ae(O){if(e.is(lo)||!T){var Z=se(O);if(Z&&Z<cl)return M(O)/Z}return 0}function re(O){return C()+Ya(O)*ni(dn(O)*(n.flickPower||600),q?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function M(O,Z){return b(O,Z)-b(j(O),Z)}function se(O){return qa(O)-qa(j(O))}function j(O){return B===O&&N||B}function b(O,Z){return(he(O)?O.changedTouches[0]:O)["page"+f(Z?"Y":"X")]}function k(O){return O/(T&&e.is(Ui)?Ep:1)}function G(O){var Z=n.noDrag;return!Eo(O,"."+ud+", ."+ta)&&(!Z||!Eo(O,Z))}function he(O){return typeof TouchEvent<"u"&&O instanceof TouchEvent}function J(){return D}function ee(O){$=O}return{mount:P,disable:ee,isDragging:J}}var Jp={Spacebar:" ",Right:Jr,Left:Zr,Up:od,Down:rd};function As(e){return e=ti(e)?e:e.key,Jp[e]||e}var dl="keydown";function Qp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function v(){w(),o(ln,m),o(ln,w),o(Bn,f)}function w(){var C=n.keyboard;C&&(u=C==="global"?window:d,r(u,dl,x))}function m(){l(u,dl)}function h(C){p=C}function f(){var C=p;p=!0,_c(function(){p=C})}function x(C){if(!p){var y=As(C);y===c(Zr)?e.go("<"):y===c(Jr)&&e.go(">")}}return{mount:v,destroy:m,disable:h}}var Io=ws+"-lazy",Tr=Io+"-srcset",em="["+Io+"], ["+Tr+"]";function tm(e,t,n){var i=Zt(e),o=i.on,r=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[so,Li],p=[];function v(){n.lazyLoad&&(w(),o(en,w))}function w(){On(p),m(),c?C():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(y){bs(y.slide,em).forEach(function(S){var B=Sn(S,Io),N=Sn(S,Tr);if(B!==S.src||N!==S.srcset){var q=n.classes.spinner,D=S.parentElement,T=Yo(D,"."+q)||ji("span",q,D);p.push([S,y,T]),S.src||Ao(S,"none")}})})}function h(){p=p.filter(function(y){var S=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,S)?f(y):!0}),p.length||r(u)}function f(y){var S=y[0];En(y[1].slide,Ja),l(S,"load error",Yt(x,y)),$t(S,"src",Sn(S,Io)),$t(S,"srcset",Sn(S,Tr)),Mn(S,Io),Mn(S,Tr)}function x(y,S){var B=y[0],N=y[1];Nn(N.slide,Ja),S.type!=="error"&&(Ti(y[2]),Ao(B,""),d(Ls,B,N),d(Yi)),c&&C()}function C(){p.length&&f(p.shift())}return{mount:v,destroy:Yt(On,p),check:h}}function nm(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,v=u.getIndex,w=u.go,m=t.Direction.resolve,h=c.pagination,f=[],x,C;function y(){S(),o([ln,en,Fr],y);var $=n.pagination;h&&Ao(h,$?"":"none"),$&&(o([Bn,Yr,Li],H),B(),H(),r(Qc,{list:x,items:f},T(e.index)))}function S(){x&&(Ti(h?ri(x.children):x),Nn(x,C),On(f),x=null),i.destroy()}function B(){var $=e.length,I=n.classes,P=n.i18n,E=n.perPage,g=p()?u.getEnd()+1:Fo($/E);x=h||ji("ul",I.pagination,c.track.parentElement),En(x,C=na+"--"+D()),$t(x,Wn,"tablist"),$t(x,yn,P.select),$t(x,Es,D()===Qr?"vertical":"");for(var z=0;z<g;z++){var F=ji("li",null,x),X=ji("button",{class:I.page,type:"button"},F),ie=d.getIn(z).map(function(_){return _.slide.id}),L=!p()&&E>1?P.pageX:P.slideX;l(X,"click",Yt(N,z)),n.paginationKeyboard&&l(X,"keydown",Yt(q,z)),$t(F,Wn,"presentation"),$t(X,Wn,"tab"),$t(X,Ko,ie.join(" ")),$t(X,yn,Ua(L,z+1)),$t(X,Vi,-1),f.push({li:F,button:X,page:z})}}function N($){w(">"+$,!0)}function q($,I){var P=f.length,E=As(I),g=D(),z=-1;E===m(Jr,!1,g)?z=++$%P:E===m(Zr,!1,g)?z=(--$+P)%P:E==="Home"?z=0:E==="End"&&(z=P-1);var F=f[z];F&&(Dc(F.button),w(">"+z),Fn(I,!0))}function D(){return n.paginationDirection||n.direction}function T($){return f[u.toPage($)]}function H(){var $=T(v(!0)),I=T(v());if($){var P=$.button;Nn(P,Ii),Mn(P,ol),$t(P,Vi,-1)}if(I){var E=I.button;En(E,Ii),$t(E,ol,!0),$t(E,Vi,"")}r(ed,{list:x,items:f},$,I)}return{items:f,mount:y,destroy:S,getAt:T,update:H}}var im=[" ","Enter"];function om(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){r.forEach(function(h){h.destroy()}),On(r)}function c(){d(),l()}function u(h,f){var x=Zt(h);x.on(Bn,function(C,y,S){f.go(f.is(lo)?S:C)}),r.push(x)}function p(){var h=Zt(e),f=h.on;f(Cs,w),f(nd,m),f([ai,ln],v),r.push(h),h.emit(Ts,e.splides)}function v(){$t(t.Elements.list,Es,n.direction===Qr?"vertical":"")}function w(h){e.go(h.index)}function m(h,f){vs(im,As(f))&&(w(h),Fn(f))}return{setup:Yt(t.Media.set,{slideFocus:Go(o)?i:o},!0),mount:l,destroy:d,remount:c}}function rm(e,t,n){var i=Zt(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Hi)}function d(u){if(u.cancelable){var p=u.deltaY,v=p<0,w=qa(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;dn(p)>m&&w-r>h&&(e.go(v?"<":">"),r=w),c(v)&&Fn(u)}}function c(u){return!n.releaseWheel||e.state.is(ao)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var am=90;function sm(e,t,n){var i=Zt(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,d=ji("span",Tp),c=Ur(am,Yt(p,!1));function u(){l&&(w(!t.Autoplay.isPaused()),$t(r,sl,!0),d.textContent="…",o(Is,Yt(w,!0)),o(Rs,Yt(w,!1)),o([so,Li],Yt(p,!0)))}function p(m){$t(r,al,m),m?(qo(r,d),c.start()):(Ti(d),c.cancel())}function v(){Mn(r,[rl,sl,al]),Ti(d)}function w(m){l&&$t(r,rl,m?"off":"polite")}return{mount:u,disable:w,destroy:v}}var lm=Object.freeze({__proto__:null,Media:fp,Direction:yp,Elements:Mp,Slides:Ap,Layout:Fp,Clones:Np,Move:Wp,Controller:Hp,Arrows:Bp,Autoplay:jp,Cover:Vp,Scroll:Kp,Drag:Zp,Keyboard:Qp,LazyLoad:tm,Pagination:nm,Sync:om,Wheel:rm,Live:sm}),cm={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"},dm={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:Lp,i18n:cm,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function um(e,t,n){var i=t.Slides;function o(){Zt(e).on([ai,en],r)}function r(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),_c(c)}return{mount:o,start:l,cancel:Xa}}function pm(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,d=Yt(wn,l,"transition"),c;function u(){Zt(e).bind(l,"transitionend",function(m){m.target===l&&c&&(v(),c())})}function p(m,h){var f=i.toPosition(m,!0),x=i.getPosition(),C=w(m);dn(f-x)>=1&&C>=1?n.useScroll?r.scroll(f,C,!1,h):(d("transform "+C+"ms "+n.easing),i.translate(f,!0),c=h):(i.jump(m),h())}function v(){d(""),r.cancel()}function w(m){var h=n.rewindSpeed;if(e.is(Ui)&&h){var f=o.getIndex(!0),x=o.getEnd();if(f===0&&m>=x||f>=x&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var mm=(function(){function e(n,i){this.event=Zt(),this.Components={},this.state=gp(Bi),this.splides=[],this._o={},this._E={};var o=ti(n)?Bc(document,n):n;To(o,o+" is invalid."),this.root=o,i=Yn({label:Sn(o,yn)||"",labelledby:Sn(o,Ps)||""},dm,e.defaults,i||{});try{Yn(i,JSON.parse(Sn(o,ws)))}catch{To(!1,"Invalid JSON")}this._o=Object.create(Yn({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,d=this.Components;To(l.is([Bi,Mr]),"Already mounted!"),l.set(Bi),this._C=d,this._T=o||this._T||(this.is(Zo)?um:pm),this._E=i||this._E;var c=ko({},lm,this._E,{Transition:this._T});return Ci(c,function(u,p){var v=u(r,d,r._o);d[p]=v,v.setup&&v.setup()}),Ci(d,function(u){u.mount&&u.mount()}),this.emit(ai),En(this.root,Ip),l.set(qi),this.emit(Ka),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(qi)&&(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(ri(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(en),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(Bi)?Zt(this).on(Ka,this.destroy.bind(this,i)):(Ci(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit($s),o.destroy(),i&&On(this.splides),r.set(Mr)),this},cp(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})(),Fs=mm;Fs.defaults={};Fs.STATES=up;var ul=[[ai,"onMounted"],[Ka,"onReady"],[Bn,"onMove"],[so,"onMoved"],[Cs,"onClick"],[Vc,"onActive"],[Gc,"onInactive"],[Xc,"onVisible"],[qc,"onHidden"],[en,"onRefresh"],[ln,"onUpdated"],[Yi,"onResize"],[qr,"onResized"],[Yc,"onDrag"],[Uc,"onDragging"],[Kc,"onDragged"],[Yr,"onScroll"],[Li,"onScrolled"],[$s,"onDestroy"],[Zc,"onArrowsMounted"],[Jc,"onArrowsUpdated"],[Qc,"onPaginationMounted"],[ed,"onPaginationUpdated"],[Ts,"onNavigationMounted"],[Is,"onAutoplayPlay"],[td,"onAutoplayPlaying"],[Rs,"onAutoplayPause"],[Ls,"onLazyLoadLoaded"]];function _s(...e){return e.filter(Boolean).join(" ")}function _r(e){return e!==null&&typeof e=="object"}function Qa(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Qa(n,t[i]));if(_r(e)&&_r(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Qa(e[o],t[o]))}return e===t}function gm(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function hm(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 es(e,t){const n=e;return hm(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():_r(i)?n[o]=es(_r(n[o])?n[o]:{},i):n[o]=i}),n}var fm=({children:e,className:t,...n})=>s.createElement("div",{className:_s("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),Ns=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Fs(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=es({},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&&!Qa(this.options,e)&&(this.splide.options=e,this.options=es({},e));const t=this.getSlides();gm(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){ul.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 s.createElement(t,{className:_s("splide",e),ref:this.splideRef,...this.omit(o,["options",...ul.map(r=>r[1])])},n?s.createElement(fm,null,i):i)}},Ws=({children:e,className:t,...n})=>s.createElement("li",{className:_s("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 gm="RichTextRenderer-module__link___BWeZ2",hm={link:gm},fm=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))},so=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>fm(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function an(e){const{color:t,...n}=e;return n}function Yt(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:so(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:H.scalingValue(e.letterSpacing,t),wordSpacing:H.scalingValue(e.wordSpacing,t),fontSize:H.scalingValue(n,t),lineHeight:i!==void 0?H.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const Ti=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:hm.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:ym(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:t(o)},i)})})};function ym(e){return{...e.fontFamily&&{fontFamily:so(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 vm="SvgImage-module__svg___q3xE-",xm="SvgImage-module__img___VsTm-",ll={svg:vm,img:xm},bm=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},wm=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,sn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!bm(e)||!r?a.jsx("img",{src:e,alt:"",className:pt(ll.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:pt(ll.svg,i),style:{"--svg":wm(e),"--fill":t,"--hover-fill":n,...o??{}}})},Sm={"top-left":ut.topLeftAlignment,"top-center":ut.topCenterAlignment,"top-right":ut.topRightAlignment,"middle-left":ut.middleLeftAlignment,"middle-center":ut.middleCenterAlignment,"middle-right":ut.middleRightAlignment,"bottom-left":ut.bottomLeftAlignment,"bottom-center":ut.bottomCenterAlignment,"bottom-right":ut.bottomRightAlignment};function $m({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:x,textAppearance:b,color:g}=n.imageCaption??{},[h,f]=s.useState(void 0),[v,C]=s.useState(null),[y,T]=s.useState(0),[W,_]=s.useState(0),{direction:X,transition:D,controls:w,pagination:R,imageCaption:m,triggers:E}=e,I=s.useRef(D.type),{x:J,y:A}=e.controls.offset,Q=q=>{o&&o.go(q)};return s.useEffect(()=>{if(!v)return;const q=new ResizeObserver(Y=>{if(!o)return;const[oe]=Y;f({width:Math.round(oe.contentRect.width),height:Math.round(oe.contentRect.height)})});return q.observe(v),()=>q.unobserve(v)},[v]),s.useEffect(()=>{!o||I.current===D.type||(_(q=>q+1),I.current=D.type)},[D.type]),a.jsx("div",{className:pt(ut.wrapper,{[ut.editor]:i}),ref:C,children:a.jsxs("div",{className:ut.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:D.backgroundColor&&D.type==="fade in"?D.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:pt(ut.captionBlock),children:a.jsx("div",{className:ut.captionTextWrapper,children:t.map((q,Y)=>a.jsx("div",{className:pt(ut.captionText,Sm[m.alignment],{[ut.withPointerEvents]:Y===y&&i,[ut.active]:Y===y}),style:{fontFamily:so(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":H.scalingValue(l.width,i),letterSpacing:H.scalingValue(c,i),wordSpacing:H.scalingValue(p,i),textAlign:u,fontSize:H.scalingValue(x.fontSize,i),lineHeight:H.scalingValue(x.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:g,transitionDuration:D.duration?`${Math.round(parseInt(D.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ut.captionTextInner,style:{"--link-hover-color":m.linkHoverColor,"--link-color":m.linkColor,position:"relative",top:H.scalingValue(m.offset.y,i),left:H.scalingValue(m.offset.x,i)},children:a.jsx(Ti,{content:q.imageCaption})})},Y))})}),a.jsx(ks,{onMove:q=>{T(q.index)},ref:r,options:{arrows:!1,speed:D.duration?parseInt(D.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:X==="horiz"||D.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:D.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((q,Y)=>a.jsx(As,{children:a.jsx("div",{className:ut.sliderItem,children:a.jsx("div",{className:ut.imgWrapper,children:a.jsx("img",{className:pt(ut.sliderImage,{[ut.contain]:q.image.objectFit==="contain",[ut.cover]:q.image.objectFit==="cover"}),src:q.image.url,alt:q.image.name??""})})})},Y))},W),w.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(ut.arrow,{[ut.arrowVertical]:X==="vert",[ut.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:a.jsxs("button",{onClick:()=>{Q("-1")},className:ut.arrowInner,style:{transform:`translate(${H.scalingValue(J,i)}, ${H.scalingValue(A*(X==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&a.jsx(sn,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:pt(ut.arrowImg,ut.mirror)}),!w.arrowsImgUrl&&a.jsx(cl,{color:w.color,className:pt(ut.arrowIcon,ut.arrowImg,ut.mirror)})]})}),a.jsx("div",{className:pt(ut.arrow,ut.nextArrow,{[ut.arrowVertical]:X==="vert",[ut.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:a.jsxs("button",{className:ut.arrowInner,onClick:()=>Q("+1"),style:{transform:`translate(${H.scalingValue(J*(X==="horiz"?-1:1),i)}, ${H.scalingValue(A,i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&a.jsx(sn,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:ut.arrowImg}),!w.arrowsImgUrl&&a.jsx(cl,{color:w.color,className:pt(ut.arrowIcon,ut.arrowImg)})]})})]}),E.triggersList.click&&a.jsx("div",{className:ut.clickOverlay,onClick:()=>{o&&o.go("+1")}}),R.isActive&&a.jsx("div",{className:pt(ut.pagination,{[ut.paginationInsideBottom]:R.position==="inside-1"&&X==="horiz",[ut.paginationInsideTop]:R.position==="inside-2"&&X==="horiz",[ut.paginationOutsideBottom]:R.position==="outside-1"&&X==="horiz",[ut.paginationOutsideTop]:R.position==="outside-2"&&X==="horiz",[ut.paginationInsideLeft]:R.position==="inside-1"&&X==="vert",[ut.paginationInsideRight]:R.position==="inside-2"&&X==="vert",[ut.paginationOutsideLeft]:R.position==="outside-1"&&X==="vert",[ut.paginationOutsideRight]:R.position==="outside-2"&&X==="vert",[ut.paginationVertical]:X==="vert"}),children:a.jsx("div",{className:ut.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${H.scalingValue(R.offset.x,i)}, ${H.scalingValue(R.offset.y,i)}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:t.map((q,Y)=>a.jsx("button",{onClick:()=>{o&&o.go(Y)},className:pt(ut.paginationItem),children:a.jsx("div",{className:pt(ut.dot,{[ut.activeDot]:Y===y}),style:{backgroundColor:Y===y?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},Y))})})]})})}function cl({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Cm={element:$m,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"]}},Tm="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Im="ImageRevealSlider-module__image___Qjt-e",Rm="ImageRevealSlider-module__link___N-iLG",Lm="ImageRevealSlider-module__cursor___2U03d",Pi={imageRevealSlider:Tm,image:Im,link:Rm,cursor:Lm};function dl(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,d=r/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 ha(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Pm(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await ha(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await ha(e);r=l.height/l.width*o}else{const l=await ha(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Em({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[d,c]=s.useState(0),u=s.useRef(0),[p,x]=s.useState({x:0,y:0}),[b,g]=s.useState(1),[h,f]=s.useState("none"),v=s.useRef({x:0,y:0}),[C,y]=s.useState(!1),{sizeType:T,imageWidth:W,randomRangeImageWidth:_}=e.imageSize,{revealPosition:X,visible:D}=e.position,{cursorType:w,target:R,defaultCursorScale:m,defaultCursor:E,hoverCursorScale:I,hoverCursor:J}=e.cursor;s.useEffect(()=>{if(!i)return;const q=(L,N)=>{const V=i.getBoundingClientRect(),de=L-V.left,re=N-V.top;if(x({x:de,y:re}),w==="system"){f("none"),g(1);return}const M=de,S=re,$=document.elementFromPoint(V.left+M,V.top+S);if($&&$.closest("a")){f("none"),g(1);return}const F=dl(M,S,r)||R==="area"?{img:J??"none",scale:I}:{img:E??"none",scale:m};f(F.img),g(F.scale)},Y=L=>{L.stopPropagation(),v.current={x:L.clientX,y:L.clientY},q(L.clientX,L.clientY)},oe=()=>{C&&q(v.current.x,v.current.y)};return i.addEventListener("mousemove",Y),window.addEventListener("scroll",oe,!0),()=>{i.removeEventListener("mousemove",Y),window.removeEventListener("scroll",oe,!0)}},[i,C,p,w,R,J,E,I,m,r]),s.useEffect(()=>{C||(f("none"),g(0))},[C]);const A=async(q,Y,oe,L={})=>{const{width:N,height:V,finalWidth:de}=await Pm(q.image.url,T,W,_);let re=0,M=0;X==="same"?(re=Y/2,M=oe/2):(re=L.x??Math.random()*Y,M=L.y??Math.random()*oe);const S=Math.min(Math.max(re,N/2),Y-N/2),$=Math.min(Math.max(M,V/2),oe-V/2);return{id:u.current++,url:q.image.url,link:q.link,name:q.image.name,x:S,y:$,width:de}};s.useEffect(()=>{if(!i||t.length===0)return;const q=i.getBoundingClientRect(),Y=q.width,oe=q.height,L=[];(async()=>{const V=t[0],de=await A(V,Y,oe);L.push(de),l(L),c(1)})()},[T,W,_,X,i]),s.useEffect(()=>{D==="last One"&&l(q=>q.length>0?[q[q.length-1]]:[])},[D]);const Q=async q=>{if(!i)return;const Y=i.getBoundingClientRect(),oe=q.clientX-Y.left,L=q.clientY-Y.top;if(R==="image"&&!dl(oe,L,r))return;let N=0,V=0;X==="on Click"?(N=oe,V=L):X==="same"?(N=Y.width/2,V=Y.height/2):(N=Math.random()*Y.width,V=Math.random()*Y.height);const de=t[d],re=await A(de,Y.width,Y.height,{x:N,y:V});l(M=>D==="all"?[...M,re]:[re]),c(M=>M>=t.length-1?0:M+1)};return a.jsxs("div",{ref:o,onClick:Q,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:Pi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(q=>a.jsx("div",{className:Pi.wrapper,style:{top:`${q.y}px`,left:`${q.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:q.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:R==="area"&&q.link?a.jsx("a",{href:q.link,target:"_blank",className:Pi.link,children:a.jsx("img",{src:q.url,alt:q.name,className:Pi.image},q.id)}):a.jsx("img",{src:q.url,alt:q.name,className:Pi.image},q.id)},q.id)),C&&a.jsx("div",{className:Pi.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Mm={element:Em,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:""}]}}}},km="LightBox-module__hidden___9s-9x",Am="LightBox-module__heroImage___sTxNF",Fm="LightBox-module__background___rm9ml",_m="LightBox-module__editor___4ACaY",Nm="LightBox-module__contentStyle___Bgnsq",Wm="LightBox-module__imageStyle___tLIlB",Hm="LightBox-module__imgWrapper___LuFUp",Dm="LightBox-module__contain___8-yaS",Om="LightBox-module__cover___hNvOG",Bm="LightBox-module__caption___b6L2I",zm="LightBox-module__captionTextInner___rCGNH",jm="LightBox-module__lightboxSplide___XFuWC",Vm="LightBox-module__arrow___iz38X",Gm="LightBox-module__arrowVertical___Zfz81",Xm="LightBox-module__nextArrow___zkAQN",qm="LightBox-module__arrowInner___p48sW",Ym="LightBox-module__arrowIcon___3VaFf",Um="LightBox-module__arrowImg___pNV88",Km="LightBox-module__mirror___pjeXc",Zm="LightBox-module__thumbsWrapper___GB-nU",Jm="LightBox-module__thumbsContainerVertical___wttk5",Qm="LightBox-module__thumbsContainer___osSma",eg="LightBox-module__thumbsAlignStart___MO6tY",tg="LightBox-module__thumbsAlignCenter___Q4sUx",ng="LightBox-module__thumbsAlignEnd___p4y9R",ig="LightBox-module__thumbItem___HvnF3",og="LightBox-module__closeButton___g2khP",rg="LightBox-module__fadeIn___0m5GW",ag="LightBox-module__slideInLeft___gPYwC",sg="LightBox-module__slideInRight___S-pPp",lg="LightBox-module__slideInTop___DFdAj",cg="LightBox-module__slideInBottom___m27kZ",dg="LightBox-module__fadeOut___55qBR",ug="LightBox-module__slideOutLeft___NvU7P",pg="LightBox-module__slideOutRight___SK7eC",mg="LightBox-module__slideOutTop___Vgg0z",gg="LightBox-module__slideOutBottom___nJ0Ef",hg="LightBox-module__scaleSlide___vZriG",Ye={hidden:km,heroImage:Am,background:Fm,editor:_m,contentStyle:Nm,imageStyle:Wm,imgWrapper:Hm,contain:Dm,cover:Om,caption:Bm,captionTextInner:zm,lightboxSplide:jm,arrow:Vm,arrowVertical:Gm,nextArrow:Xm,arrowInner:qm,arrowIcon:Ym,arrowImg:Um,mirror:Km,thumbsWrapper:Zm,thumbsContainerVertical:Jm,thumbsContainer:Qm,thumbsAlignStart:eg,thumbsAlignCenter:tg,thumbsAlignEnd:ng,thumbItem:ig,closeButton:og,fadeIn:rg,slideInLeft:ag,slideInRight:sg,slideInTop:lg,slideInBottom:cg,fadeOut:dg,slideOutLeft:ug,slideOutRight:pg,slideOutTop:mg,slideOutBottom:gg,scaleSlide:hg},or=(e,t,n)=>{const i={},[o,r]=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"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${H.scalingValue(t.x,n)}), calc(-50% + ${H.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${H.scalingValue(t.x,n)}, calc(-50% + ${H.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${H.scalingValue(t.x,n)}), ${H.scalingValue(t.y,n)})`:i.transform=`translate(${H.scalingValue(t.x,n)}, ${H.scalingValue(t.y,n)})`,i};function md(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 fg(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 gd(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=e;return{renderedW:d,renderedH:d/r}}const l=t;return{renderedW:l*r,renderedH:l}}function yg(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=t;return{renderedW:d*r,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/r}}function hd(e,t,n,i,o){const{x:r,y:l}=fg(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function vg(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,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?yg:gd,{renderedW:u,renderedH:p}=c(n,i,o,r),{offsetX:x,offsetY:b}=hd(n,i,u,p,d),g=(x+u/2)/n*100,h=(b+p/2)/i*100;return`${g}% ${h}%`}function xg(e){return vg(e)}function _r(e){const t=e.getBoundingClientRect(),n=md(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=gd(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:x}=hd(i,o,d,c,u),b=t.left+n.left,g=t.top+n.top;return{x:p+b,y:x+g,width:d,height:c}}function ul(e){const t=e.getBoundingClientRect(),n=md(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function pl(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 bg(e,t){const n=(()=>{if(e==="fade in")return Ye.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Ye.slideInLeft;case"right":return Ye.slideInRight;case"top":return Ye.slideInTop;case"bottom":return Ye.slideInBottom;default:return Ye.slideInRight}return Ye.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Ye.fadeIn;if(e==="slide in")switch(t){case"left":return Ye.slideInLeft;case"right":return Ye.slideInRight;case"top":return Ye.slideInTop;case"bottom":return Ye.slideInBottom;default:return Ye.slideInRight}return Ye.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Ye.fadeOut;if(e==="slide in")switch(t){case"left":return Ye.slideOutLeft;case"right":return Ye.slideOutRight;case"top":return Ye.slideOutTop;case"bottom":return Ye.slideOutBottom;default:return Ye.slideOutRight}return Ye.fadeOut})(),r=(()=>{if(e==="fade in")return Ye.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Ye.slideOutLeft;case"right":return Ye.slideOutRight;case"top":return Ye.slideOutTop;case"bottom":return Ye.slideOutBottom;default:return Ye.slideOutRight}return Ye.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const wg=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[d,c]=s.useState(!1),{url:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:Ye.heroImage,onClick:()=>c(!0)}),a.jsx(Sg,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},Sg=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:d})=>{var Se;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:x,wordSpacing:b,fontSizeLineHeight:g,textAppearance:h,color:f}=i.imageCaption??{},[v,C]=s.useState(0),[y,T]=s.useState(0),[W,_]=s.useState(!1),[X,D]=s.useState(!1),[w,R]=s.useState({}),m=s.useRef(null),E=s.useRef(null),I=s.useRef(null),J=s.useRef(!1),A=s.useRef(null),Q=s.useRef(null),q=s.useRef(null),Y=s.useRef(null),oe=s.useRef(!1),L=s.useRef(null),[N,V]=s.useState(!1),{appear:de,triggers:re,slider:M,thumbnail:S,controls:$,area:F,caption:O,layout:te}=o.lightboxBlock,{appearClass:xe,backdropAppearClass:ne,backdropDisappearClass:ae,disappearClass:Z}=bg(de.type,de.direction),B=(d==null?void 0:d.itemId)??null;s.useEffect(()=>{const ee=()=>{setTimeout(()=>{var ue,Te;(Te=(ue=m.current)==null?void 0:ue.splide)==null||Te.refresh()},16)},ce=()=>{T(ue=>ue+1)};return window.addEventListener("ArticleEditor.Layout:change",ee),window.addEventListener("ArticleEditor.ComponentContent:change",ce),()=>{window.removeEventListener("ArticleEditor.Layout:change",ee),window.removeEventListener("ArticleEditor.ComponentContent:change",ce)}},[]),s.useEffect(()=>{if(!e||!S.isActive){V(!1);return}const ee=L.current;if(!ee)return;const ce=()=>{M.direction==="horiz"?V(ee.scrollWidth>ee.clientWidth):V(ee.scrollHeight>ee.clientHeight)};ce();const ue=new ResizeObserver(ce);return ue.observe(ee),()=>ue.disconnect()},[e,S.isActive,n.length,w,M.direction]);const G=s.useCallback(()=>{const ee=window.matchMedia("(max-width: 768px)").matches,ce=pl(F.color);ee&&!l&&ce>.9&&(document.body.style.backgroundColor=""),_(!0),J.current=!0;const ue=Te=>{Te.target===A.current&&Te.animationName&&(A.current&&Q.current&&A.current.removeEventListener("animationend",Q.current),Q.current=null,J.current&&(J.current=!1,t()),_(!1))};A.current&&(Q.current=ue,A.current.addEventListener("animationend",ue))},[t,F.color,l]),$e=(ee,ce,ue)=>{var Te,ke;if(ee){if(re.type==="click"&&re.switch==="image")re.repeat==="close"&&v===n.length-1?G():(Te=m.current)==null||Te.go("+1");else if(re.type==="click"&&re.switch==="50/50"){const Ce=ee.getBoundingClientRect(),U=ce-Ce.left,fe=ue-Ce.top,me=Ce.width,K=Ce.height;let z;M.direction==="horiz"?z=U<me/2?"-1":"+1":z=fe<K/2?"-1":"+1",(ke=m.current)==null||ke.go(z)}}},he=ee=>{if(oe.current){oe.current=!1;return}const ce=n[v],ue=(ce==null?void 0:ce.image.objectFit)==="cover";let Te,ke;if("changedTouches"in ee&&ee.changedTouches.length>0)Te=ee.changedTouches[0].clientX,ke=ee.changedTouches[0].clientY;else if("clientX"in ee)Te=ee.clientX,ke=ee.clientY;else return;let Ce;if(ue&&I.current){const U=ul(I.current);Ce=Te>=U.left&&Te<=U.right&&ke>=U.top&&ke<=U.bottom}else{const U=I.current?_r(I.current):null;if(!U){ee.target===ee.currentTarget&&G();return}Ce=Te>=U.x&&Te<=U.x+U.width&&ke>=U.y&&ke<=U.y+U.height}Ce?$e(I.current,Te,ke):G()},Re=ee=>{const ce=ee.target;(ce.classList.contains(Ye.thumbsWrapper)||ce.classList.contains(Ye.thumbsContainer))&&he(ee)};s.useEffect(()=>{if(!e)return;const ee=ce=>{var ue,Te;if(ce.key==="Escape"){G();return}if(ce.key==="ArrowRight"){C(ke=>(ke+1)%Math.max(n.length,1)),(ue=m.current)==null||ue.go("+1");return}ce.key==="ArrowLeft"&&(C(ke=>(ke-1+Math.max(n.length,1))%Math.max(n.length,1)),(Te=m.current)==null||Te.go("-1"))};return window.addEventListener("keydown",ee),()=>{window.removeEventListener("keydown",ee)}},[e,G,n.length]),s.useEffect(()=>{if(e){if(C(0),T(ce=>ce+1),J.current=!1,_(!1),D(!1),R({}),!B)return;const ee=new CustomEvent("page-overlay",{detail:{itemId:B}});window.dispatchEvent(ee)}return()=>{A.current&&Q.current&&(A.current.removeEventListener("animationend",Q.current),Q.current=null),D(!1)}},[e,B]),s.useEffect(()=>{E.current!==null&&E.current!==M.type&&T(ee=>ee+1),E.current=M.type},[M.type]),s.useEffect(()=>{if(!e)return;const ee=document.body.style.overflow,ce=window.matchMedia("(max-width: 768px)").matches,ue=pl(F.color);document.body.style.overflow="hidden",D(!1);const Te=Ce=>{Ce.target===A.current&&!J.current&&Ce.animationName&&(ce&&!l&&ue>.9&&(document.body.style.backgroundColor=F.color),D(!0),A.current&&q.current&&A.current.removeEventListener("animationend",q.current),q.current=null)};A.current&&(q.current=Te,A.current.addEventListener("animationend",Te));const ke=Ce=>{const U=Ce.target;U&&(U.closest(`.${Ye.thumbsWrapper}`)||U.closest(`.${Ye.thumbsContainer}`))||M.type!=="slide"&&Ce.preventDefault()};return document.addEventListener("touchmove",ke,{passive:!1}),()=>{document.body.style.overflow=ee,document.removeEventListener("touchmove",ke),A.current&&q.current&&(A.current.removeEventListener("animationend",q.current),q.current=null),D(!1)}},[e,l,F.color,M.type]),s.useEffect(()=>{if(!e)return;const ee=ce=>{var Te,ke;if(J.current){ce.stopPropagation();return}if(oe.current){oe.current=!1;return}const ue=ce.target;if(!(ue&&(ue.closest(`.${Ye.thumbsContainer}`)||ue.closest(`.${Ye.thumbItem}`)||ue.closest(`.${Ye.arrow}`)||ue.closest(`.${Ye.closeButton}`)||ue.closest(`.${Ye.caption}`)))){if(M.type==="slide"&&re.type==="drag"&&((ke=(Te=m.current)==null?void 0:Te.splide)!=null&&ke.root)){const Ce=m.current.splide.root;if(ue&&(Ce.contains(ue)||Ce===ue))return}if(ce.touches.length===0&&ce.changedTouches.length>0){const Ce=n[v],U=(Ce==null?void 0:Ce.image.objectFit)==="cover",fe=ce.changedTouches[0];let me;if(U&&I.current){const K=ul(I.current);me=fe.clientX>=K.left&&fe.clientX<=K.right&&fe.clientY>=K.top&&fe.clientY<=K.bottom}else{const K=I.current?_r(I.current):null;if(!K)return;me=fe.clientX>=K.x&&fe.clientX<=K.x+K.width&&fe.clientY>=K.y&&fe.clientY<=K.y+K.height}if(!me){ce.stopPropagation(),J.current=!0;const K=z=>{z.stopPropagation(),z.preventDefault(),document.removeEventListener("click",K,!0)};document.addEventListener("click",K,!0),G()}}}};return document.addEventListener("touchend",ee,{passive:!0}),()=>{document.removeEventListener("touchend",ee)}},[e,G,v,n]);const ge=(M.type==="scale"||M.type==="fade")&&M.direction==="vert"&&re.type==="drag";s.useEffect(()=>{var z,be;if(!e||!ge||!((be=(z=m.current)==null?void 0:z.splide)!=null&&be.root))return;const ee=m.current.splide.root,ce=30,ue=(se,j)=>{if(Y.current){const _e=Math.abs(se-Y.current.x),We=Math.abs(j-Y.current.y);(_e>0||We>0)&&(oe.current=!0)}},Te=se=>{Y.current&&(se.preventDefault(),ue(se.clientX,se.clientY))},ke=se=>{Y.current&&se.touches.length>0&&(se.preventDefault(),ue(se.touches[0].clientX,se.touches[0].clientY))},Ce=(se,j)=>{if(!Y.current||!m.current){Y.current=null;return}const _e=Math.abs(se-Y.current.x),We=Math.abs(j-Y.current.y);We>ce&&We>_e&&m.current.go(j<Y.current.y?"+1":"-1"),Y.current=null},U=se=>{Y.current&&Ce(se.clientX,se.clientY),document.removeEventListener("pointerup",U),document.removeEventListener("pointercancel",U),document.removeEventListener("pointermove",Te)},fe=se=>{if(Y.current){if(se.changedTouches.length>0){const j=se.changedTouches[0];Ce(j.clientX,j.clientY)}document.removeEventListener("touchend",fe),document.removeEventListener("touchcancel",fe),document.removeEventListener("touchmove",ke)}},me=se=>{Y.current={x:se.clientX,y:se.clientY},oe.current=!1,document.addEventListener("pointermove",Te,{passive:!1}),document.addEventListener("pointerup",U),document.addEventListener("pointercancel",U)},K=se=>{se.touches.length>0&&(Y.current={x:se.touches[0].clientX,y:se.touches[0].clientY},oe.current=!1,document.addEventListener("touchmove",ke,{passive:!1}),document.addEventListener("touchend",fe),document.addEventListener("touchcancel",fe))};return ee.addEventListener("pointerdown",me),ee.addEventListener("touchstart",K),()=>{ee.removeEventListener("pointerdown",me),ee.removeEventListener("touchstart",K),document.removeEventListener("pointermove",Te),document.removeEventListener("pointerup",U),document.removeEventListener("pointercancel",U),document.removeEventListener("touchmove",ke),document.removeEventListener("touchend",fe),document.removeEventListener("touchcancel",fe),Y.current=null,oe.current=!1}},[e,ge,y]);const ye={backgroundColor:F.color,backdropFilter:`blur(${F.blur}px)`,animationDuration:`${parseInt(de.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Bn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:A,className:pt(Ye.background,W?ae:ne,{[Ye.editor]:l},{[Ye.hidden]:!e}),style:{...ye,...X&&!l&&!W?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?A:null,className:pt(Ye.contentStyle,W?Z:xe,{[Ye.editor]:l},{[Ye.hidden]:!e}),style:{animationDuration:`${parseInt(de.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(ks,{onMove:ee=>C(ee.index),ref:m,className:Ye.lightboxSplide,options:{arrows:!1,speed:M.duration?parseInt(M.duration):500,direction:M.direction==="horiz"||M.type==="fade"||M.type==="scale"?"ltr":"ttb",pagination:!1,drag:re.type==="drag"&&!ge,perPage:1,width:"100%",height:"100%",type:M.type==="fade"||M.type==="scale"?"fade":"loop",padding:0,rewind:re.repeat!=="close",start:0},style:{"--splide-speed":M.duration},children:n.map((ee,ce)=>{const ue=or(te.position,te.offset,l),Te=`${H.scalingValue(te.padding.top,l)} ${H.scalingValue(te.padding.right,l)} ${H.scalingValue(te.padding.bottom,l)} ${H.scalingValue(te.padding.left,l)}`,ke=M.type==="scale"?(()=>{const{transform:Ce,...U}=ue;return{...U,position:"absolute",padding:Te,boxSizing:"border-box","--position-transform":Ce||"none"}})():{...ue,position:"absolute",padding:Te,boxSizing:"border-box"};return a.jsx(As,{children:a.jsx("div",{className:Ye.imgWrapper,onClick:he,children:a.jsx("img",{ref:ce===v?I:null,className:pt(Ye.imageStyle,{[Ye.contain]:ee.image.objectFit==="contain",[Ye.cover]:ee.image.objectFit==="cover",[Ye.scaleSlide]:M.type==="scale"}),src:ee.image.url,alt:ee.image.name??"",style:{...ke,pointerEvents:ee.image.objectFit==="contain"?"none":"auto"}})})},ce)})},y),$.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(Ye.arrow,{[Ye.arrowVertical]:M.direction==="vert"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:a.jsxs("button",{className:Ye.arrowInner,style:{transform:`translate(${H.scalingValue($.offset.x,l)}, ${H.scalingValue($.offset.y*(M.direction==="horiz"?1:-1),l)}) scale(${$.scale}) rotate(${M.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var ee;return(ee=m.current)==null?void 0:ee.go("-1")},"aria-label":"Previous",children:[$.arrowsImgUrl&&a.jsx(sn,{url:$.arrowsImgUrl,fill:$.color,hoverFill:$.hover,className:pt(Ye.arrowImg,Ye.mirror)}),!$.arrowsImgUrl&&a.jsx(ml,{color:$.color,className:pt(Ye.arrowIcon,Ye.arrowImg,Ye.mirror)})]})}),a.jsx("div",{className:pt(Ye.arrow,Ye.nextArrow,{[Ye.arrowVertical]:M.direction==="vert"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:a.jsxs("button",{className:Ye.arrowInner,style:{transform:`translate(${H.scalingValue($.offset.x*(M.direction==="horiz"?-1:1),l)}, ${H.scalingValue($.offset.y,l)}) scale(${$.scale}) rotate(${M.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var ee;return(ee=m.current)==null?void 0:ee.go("+1")},"aria-label":"Next",children:[$.arrowsImgUrl&&a.jsx(sn,{url:$.arrowsImgUrl,fill:$.color,hoverFill:$.hover,className:Ye.arrowImg}),!$.arrowsImgUrl&&a.jsx(ml,{color:$.color,className:pt(Ye.arrowIcon,Ye.arrowImg)})]})})]}),F.closeIconUrl&&(()=>{const ee=or(F.closeIconAlign,F.closeIconOffset,l),ce=`scale(${F.closeIconScale})`,ue=ee.transform?`${ee.transform} ${ce}`:ce;return a.jsx("button",{className:Ye.closeButton,style:{...ee,transform:ue},onClick:G,"aria-label":"Close lightbox",children:a.jsx(sn,{url:F.closeIconUrl,fill:F.closeIconColor??"#000000",hoverFill:F.closeIconHover??"#cccccc"})})})(),O&&O.isActive&&i.imageCaption&&((Se=n[v])==null?void 0:Se.imageCaption)&&a.jsx("div",{className:Ye.caption,style:{...or(O.alignment,O.offset,l),fontFamily:so(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":H.scalingValue(c.width,l),letterSpacing:H.scalingValue(p,l),wordSpacing:H.scalingValue(b,l),textAlign:x,fontSize:H.scalingValue(g.fontSize,l),lineHeight:H.scalingValue(g.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:f},onClick:ee=>ee.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:Ye.captionTextInner,style:{"--link-color":O.linkColor,"--link-hover-color":O.linkHoverColor},children:a.jsx(Ti,{content:n[v].imageCaption})})}),S.isActive&&(()=>{const[ee,ce]=S.position.split("-"),ue=M.direction==="horiz"?`${ee}-left`:S.position,Te=or(ue,S.offset,l),ke=()=>{if(M.direction==="horiz"){if(ce==="left")return"flex-start";if(ce==="center")return"center";if(ce==="right")return"flex-end"}else{if(ee==="top")return"flex-start";if(ee==="middle")return"center";if(ee==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:L,className:Ye.thumbsWrapper,onClick:Ce=>Re(Ce),style:{position:l?"absolute":"fixed",...Te,...M.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:pt(Ye.thumbsContainer,{[Ye.thumbsContainerVertical]:M.direction==="vert",[Ye.thumbsAlignStart]:S.align==="start",[Ye.thumbsAlignCenter]:S.align==="center",[Ye.thumbsAlignEnd]:S.align==="end"}),style:{gap:H.scalingValue(S.grid.gap,l),justifyContent:N?"flex-start":ke()},children:n.map((Ce,U)=>{const fe=U===v,me=w[U],z=S.grid.size*(fe?S.activeState.scale:1),be=()=>{if(S.fit!=="fit")return{};if(!me)return M.direction==="horiz"?{height:H.scalingValue(z,l)}:{width:H.scalingValue(z,l)};const se=me.width/me.height;if(M.direction==="horiz"){const j=z,_e=j*se;return{width:H.scalingValue(_e,l),height:H.scalingValue(j,l)}}else{const j=z,_e=j/se;return{width:H.scalingValue(j,l),height:H.scalingValue(_e,l)}}};return a.jsx("button",{className:Ye.thumbItem,style:{...M.direction==="horiz"&&S.fit!=="fit"?{height:H.scalingValue(z,l)}:{},...M.direction==="vert"&&S.fit!=="fit"?{width:H.scalingValue(z,l)}:{},...S.fit==="cover"?{width:H.scalingValue(z,l),height:H.scalingValue(z,l)}:{},...be(),transition:fe?"all 0.25s ease-out":"none",opacity:fe?S.activeState.opacity/100:S.opacity/100,"--thumb-hover":S.activeState.opacity/100},onClick:se=>{var j;se.stopPropagation(),C(U),(j=m.current)==null||j.go(U)},onMouseEnter:()=>{var se;S.triggers==="hov"&&((se=m.current)==null||se.go(U))},children:a.jsx("img",{src:Ce.image.url,alt:Ce.image.name??"",onLoad:se=>{const j=se.currentTarget;j.naturalWidth&&j.naturalHeight&&R(_e=>({..._e,[U]:{width:j.naturalWidth,height:j.naturalHeight}}))},style:{objectFit:S.fit==="cover"?"cover":"contain",...S.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...S.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Ce.image.name}-${U}`)})})})})()]})]}),document.getElementById(r))};function ml({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 $g={element:wg,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 rr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cg(e){return`
6
+ */const ym="RichTextRenderer-module__link___BWeZ2",vm={link:ym},xm=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))},co=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>xm(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function an(e){const{color:t,...n}=e;return n}function Ut(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:co(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:W.scalingValue(e.letterSpacing,t),wordSpacing:W.scalingValue(e.wordSpacing,t),fontSize:W.scalingValue(n,t),lineHeight:i!==void 0?W.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const Ri=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:vm.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:bm(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:t(o)},i)})})};function bm(e){return{...e.fontFamily&&{fontFamily:co(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 wm="SvgImage-module__svg___q3xE-",Sm="SvgImage-module__img___VsTm-",pl={svg:wm,img:Sm},Cm=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},$m=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,sn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Cm(e)||!r?a.jsx("img",{src:e,alt:"",className:pt(pl.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:pt(pl.svg,i),style:{"--svg":$m(e),"--fill":t,"--hover-fill":n,...o??{}}})},Tm={"top-left":dt.topLeftAlignment,"top-center":dt.topCenterAlignment,"top-right":dt.topRightAlignment,"middle-left":dt.middleLeftAlignment,"middle-center":dt.middleCenterAlignment,"middle-right":dt.middleRightAlignment,"bottom-left":dt.bottomLeftAlignment,"bottom-center":dt.bottomCenterAlignment,"bottom-right":dt.bottomRightAlignment};function Im({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:v,textAppearance:w,color:m}=n.imageCaption??{},[h,f]=s.useState(void 0),[x,C]=s.useState(null),[y,S]=s.useState(0),[B,N]=s.useState(0),{direction:q,transition:D,controls:T,pagination:H,imageCaption:$,triggers:I}=e,P=s.useRef(D.type),{x:E,y:g}=e.controls.offset,z=F=>{o&&o.go(F)};return s.useEffect(()=>{if(!x)return;const F=new ResizeObserver(X=>{if(!o)return;const[ie]=X;f({width:Math.round(ie.contentRect.width),height:Math.round(ie.contentRect.height)})});return F.observe(x),()=>F.unobserve(x)},[x]),s.useEffect(()=>{!o||P.current===D.type||(N(F=>F+1),P.current=D.type)},[D.type]),a.jsx("div",{className:pt(dt.wrapper,{[dt.editor]:i}),ref:C,children:a.jsxs("div",{className:dt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:D.backgroundColor&&D.type==="fade in"?D.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:pt(dt.captionBlock),children:a.jsx("div",{className:dt.captionTextWrapper,children:t.map((F,X)=>a.jsx("div",{className:pt(dt.captionText,Tm[$.alignment],{[dt.withPointerEvents]:X===y&&i,[dt.active]:X===y}),style:{fontFamily:co(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":W.scalingValue(l.width,i),letterSpacing:W.scalingValue(c,i),wordSpacing:W.scalingValue(p,i),textAlign:u,fontSize:W.scalingValue(v.fontSize,i),lineHeight:W.scalingValue(v.lineHeight,i),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:m,transitionDuration:D.duration?`${Math.round(parseInt(D.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:dt.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:W.scalingValue($.offset.y,i),left:W.scalingValue($.offset.x,i)},children:a.jsx(Ri,{content:F.imageCaption})})},X))})}),a.jsx(Ns,{onMove:F=>{S(F.index)},ref:r,options:{arrows:!1,speed:D.duration?parseInt(D.duration):500,autoplay:I.autoPlay!==null,...I.autoPlay!==null&&{interval:parseInt(I.autoPlay)*1e3},direction:q==="horiz"||D.type==="fade in"?"ltr":"ttb",pagination:!1,drag:I.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:D.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((F,X)=>a.jsx(Ws,{children:a.jsx("div",{className:dt.sliderItem,children:a.jsx("div",{className:dt.imgWrapper,children:a.jsx("img",{className:pt(dt.sliderImage,{[dt.contain]:F.image.objectFit==="contain",[dt.cover]:F.image.objectFit==="cover"}),src:F.image.url,alt:F.image.name??""})})})},X))},B),T.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(dt.arrow,{[dt.arrowVertical]:q==="vert",[dt.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{onClick:()=>{z("-1")},className:dt.arrowInner,style:{transform:`translate(${W.scalingValue(E,i)}, ${W.scalingValue(g*(q==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${q==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&a.jsx(sn,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:pt(dt.arrowImg,dt.mirror)}),!T.arrowsImgUrl&&a.jsx(ml,{color:T.color,className:pt(dt.arrowIcon,dt.arrowImg,dt.mirror)})]})}),a.jsx("div",{className:pt(dt.arrow,dt.nextArrow,{[dt.arrowVertical]:q==="vert",[dt.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{className:dt.arrowInner,onClick:()=>z("+1"),style:{transform:`translate(${W.scalingValue(E*(q==="horiz"?-1:1),i)}, ${W.scalingValue(g,i)}) scale(${e.controls.scale/100}) rotate(${q==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&a.jsx(sn,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:dt.arrowImg}),!T.arrowsImgUrl&&a.jsx(ml,{color:T.color,className:pt(dt.arrowIcon,dt.arrowImg)})]})})]}),I.triggersList.click&&a.jsx("div",{className:dt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),H.isActive&&a.jsx("div",{className:pt(dt.pagination,{[dt.paginationInsideBottom]:H.position==="inside-1"&&q==="horiz",[dt.paginationInsideTop]:H.position==="inside-2"&&q==="horiz",[dt.paginationOutsideBottom]:H.position==="outside-1"&&q==="horiz",[dt.paginationOutsideTop]:H.position==="outside-2"&&q==="horiz",[dt.paginationInsideLeft]:H.position==="inside-1"&&q==="vert",[dt.paginationInsideRight]:H.position==="inside-2"&&q==="vert",[dt.paginationOutsideLeft]:H.position==="outside-1"&&q==="vert",[dt.paginationOutsideRight]:H.position==="outside-2"&&q==="vert",[dt.paginationVertical]:q==="vert"}),children:a.jsx("div",{className:dt.paginationInner,style:{backgroundColor:H.colors[2],transform:`scale(${H.scale/100}) translate(${W.scalingValue(H.offset.x,i)}, ${W.scalingValue(H.offset.y,i)}) rotate(${q==="horiz"?"0deg":"90deg"})`},children:t.map((F,X)=>a.jsx("button",{onClick:()=>{o&&o.go(X)},className:pt(dt.paginationItem),children:a.jsx("div",{className:pt(dt.dot,{[dt.activeDot]:X===y}),style:{backgroundColor:X===y?H.colors[0]:H.colors[1],"--pagination-hover-color":H.hover}})},X))})})]})})}function ml({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Rm={element:Im,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"]}},Lm="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Pm="ImageRevealSlider-module__image___Qjt-e",Em="ImageRevealSlider-module__link___N-iLG",Mm="ImageRevealSlider-module__cursor___2U03d",Mi={imageRevealSlider:Lm,image:Pm,link:Em,cursor:Mm};function gl(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,d=r/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 fa(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function km(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await fa(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await fa(e);r=l.height/l.width*o}else{const l=await fa(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Am({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[d,c]=s.useState(0),u=s.useRef(0),[p,v]=s.useState({x:0,y:0}),[w,m]=s.useState(1),[h,f]=s.useState("none"),x=s.useRef({x:0,y:0}),[C,y]=s.useState(!1),{sizeType:S,imageWidth:B,randomRangeImageWidth:N}=e.imageSize,{revealPosition:q,visible:D}=e.position,{cursorType:T,target:H,defaultCursorScale:$,defaultCursor:I,hoverCursorScale:P,hoverCursor:E}=e.cursor;s.useEffect(()=>{if(!i)return;const F=(L,_)=>{const V=i.getBoundingClientRect(),ae=L-V.left,re=_-V.top;if(v({x:ae,y:re}),T==="system"){f("none"),m(1);return}const M=ae,se=re,j=document.elementFromPoint(V.left+M,V.top+se);if(j&&j.closest("a")){f("none"),m(1);return}const b=gl(M,se,r)||H==="area"?{img:E??"none",scale:P}:{img:I??"none",scale:$};f(b.img),m(b.scale)},X=L=>{L.stopPropagation(),x.current={x:L.clientX,y:L.clientY},F(L.clientX,L.clientY)},ie=()=>{C&&F(x.current.x,x.current.y)};return i.addEventListener("mousemove",X),window.addEventListener("scroll",ie,!0),()=>{i.removeEventListener("mousemove",X),window.removeEventListener("scroll",ie,!0)}},[i,C,p,T,H,E,I,P,$,r]),s.useEffect(()=>{C||(f("none"),m(0))},[C]);const g=async(F,X,ie,L={})=>{const{width:_,height:V,finalWidth:ae}=await km(F.image.url,S,B,N);let re=0,M=0;q==="same"?(re=X/2,M=ie/2):(re=L.x??Math.random()*X,M=L.y??Math.random()*ie);const se=Math.min(Math.max(re,_/2),X-_/2),j=Math.min(Math.max(M,V/2),ie-V/2);return{id:u.current++,url:F.image.url,link:F.link,name:F.image.name,x:se,y:j,width:ae}};s.useEffect(()=>{if(!i||t.length===0)return;const F=i.getBoundingClientRect(),X=F.width,ie=F.height,L=[];(async()=>{const V=t[0],ae=await g(V,X,ie);L.push(ae),l(L),c(1)})()},[S,B,N,q,i]),s.useEffect(()=>{D==="last One"&&l(F=>F.length>0?[F[F.length-1]]:[])},[D]);const z=async F=>{if(!i)return;const X=i.getBoundingClientRect(),ie=F.clientX-X.left,L=F.clientY-X.top;if(H==="image"&&!gl(ie,L,r))return;let _=0,V=0;q==="on Click"?(_=ie,V=L):q==="same"?(_=X.width/2,V=X.height/2):(_=Math.random()*X.width,V=Math.random()*X.height);const ae=t[d],re=await g(ae,X.width,X.height,{x:_,y:V});l(M=>D==="all"?[...M,re]:[re]),c(M=>M>=t.length-1?0:M+1)};return a.jsxs("div",{ref:o,onClick:z,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:Mi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(F=>a.jsx("div",{className:Mi.wrapper,style:{top:`${F.y}px`,left:`${F.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:F.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:H==="area"&&F.link?a.jsx("a",{href:F.link,target:"_blank",className:Mi.link,children:a.jsx("img",{src:F.url,alt:F.name,className:Mi.image},F.id)}):a.jsx("img",{src:F.url,alt:F.name,className:Mi.image},F.id)},F.id)),C&&a.jsx("div",{className:Mi.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${w})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Fm={element:Am,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:""}]}}}},_m="LightBox-module__hidden___9s-9x",Nm="LightBox-module__heroImage___sTxNF",Wm="LightBox-module__background___rm9ml",Hm="LightBox-module__editor___4ACaY",Dm="LightBox-module__contentStyle___Bgnsq",Om="LightBox-module__imageStyle___tLIlB",Bm="LightBox-module__imgWrapper___LuFUp",zm="LightBox-module__contain___8-yaS",jm="LightBox-module__cover___hNvOG",Vm="LightBox-module__caption___b6L2I",Gm="LightBox-module__captionTextInner___rCGNH",Xm="LightBox-module__lightboxSplide___XFuWC",qm="LightBox-module__arrow___iz38X",Ym="LightBox-module__arrowVertical___Zfz81",Um="LightBox-module__nextArrow___zkAQN",Km="LightBox-module__arrowInner___p48sW",Zm="LightBox-module__arrowIcon___3VaFf",Jm="LightBox-module__arrowImg___pNV88",Qm="LightBox-module__mirror___pjeXc",eg="LightBox-module__thumbsWrapper___GB-nU",tg="LightBox-module__thumbsContainerVertical___wttk5",ng="LightBox-module__thumbsContainer___osSma",ig="LightBox-module__thumbsAlignStart___MO6tY",og="LightBox-module__thumbsAlignCenter___Q4sUx",rg="LightBox-module__thumbsAlignEnd___p4y9R",ag="LightBox-module__thumbItem___HvnF3",sg="LightBox-module__closeButton___g2khP",lg="LightBox-module__fadeIn___0m5GW",cg="LightBox-module__slideInLeft___gPYwC",dg="LightBox-module__slideInRight___S-pPp",ug="LightBox-module__slideInTop___DFdAj",pg="LightBox-module__slideInBottom___m27kZ",mg="LightBox-module__fadeOut___55qBR",gg="LightBox-module__slideOutLeft___NvU7P",hg="LightBox-module__slideOutRight___SK7eC",fg="LightBox-module__slideOutTop___Vgg0z",yg="LightBox-module__slideOutBottom___nJ0Ef",vg="LightBox-module__scaleSlide___vZriG",Qe={hidden:_m,heroImage:Nm,background:Wm,editor:Hm,contentStyle:Dm,imageStyle:Om,imgWrapper:Bm,contain:zm,cover:jm,caption:Vm,captionTextInner:Gm,lightboxSplide:Xm,arrow:qm,arrowVertical:Ym,nextArrow:Um,arrowInner:Km,arrowIcon:Zm,arrowImg:Jm,mirror:Qm,thumbsWrapper:eg,thumbsContainerVertical:tg,thumbsContainer:ng,thumbsAlignStart:ig,thumbsAlignCenter:og,thumbsAlignEnd:rg,thumbItem:ag,closeButton:sg,fadeIn:lg,slideInLeft:cg,slideInRight:dg,slideInTop:ug,slideInBottom:pg,fadeOut:mg,slideOutLeft:gg,slideOutRight:hg,slideOutTop:fg,slideOutBottom:yg,scaleSlide:vg},ar=(e,t,n)=>{const i={},[o,r]=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"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${W.scalingValue(t.x,n)}), calc(-50% + ${W.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${W.scalingValue(t.x,n)}, calc(-50% + ${W.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${W.scalingValue(t.x,n)}), ${W.scalingValue(t.y,n)})`:i.transform=`translate(${W.scalingValue(t.x,n)}, ${W.scalingValue(t.y,n)})`,i};function yd(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 xg(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 vd(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=e;return{renderedW:d,renderedH:d/r}}const l=t;return{renderedW:l*r,renderedH:l}}function bg(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=t;return{renderedW:d*r,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/r}}function xd(e,t,n,i,o){const{x:r,y:l}=xg(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function wg(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,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?bg:vd,{renderedW:u,renderedH:p}=c(n,i,o,r),{offsetX:v,offsetY:w}=xd(n,i,u,p,d),m=(v+u/2)/n*100,h=(w+p/2)/i*100;return`${m}% ${h}%`}function Sg(e){return wg(e)}function Nr(e){const t=e.getBoundingClientRect(),n=yd(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=vd(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:v}=xd(i,o,d,c,u),w=t.left+n.left,m=t.top+n.top;return{x:p+w,y:v+m,width:d,height:c}}function hl(e){const t=e.getBoundingClientRect(),n=yd(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function fl(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 Cg(e,t){const n=(()=>{if(e==="fade in")return Qe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Qe.slideInLeft;case"right":return Qe.slideInRight;case"top":return Qe.slideInTop;case"bottom":return Qe.slideInBottom;default:return Qe.slideInRight}return Qe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Qe.fadeIn;if(e==="slide in")switch(t){case"left":return Qe.slideInLeft;case"right":return Qe.slideInRight;case"top":return Qe.slideInTop;case"bottom":return Qe.slideInBottom;default:return Qe.slideInRight}return Qe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Qe.fadeOut;if(e==="slide in")switch(t){case"left":return Qe.slideOutLeft;case"right":return Qe.slideOutRight;case"top":return Qe.slideOutTop;case"bottom":return Qe.slideOutBottom;default:return Qe.slideOutRight}return Qe.fadeOut})(),r=(()=>{if(e==="fade in")return Qe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Qe.slideOutLeft;case"right":return Qe.slideOutRight;case"top":return Qe.slideOutTop;case"bottom":return Qe.slideOutBottom;default:return Qe.slideOutRight}return Qe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const $g=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[d,c]=s.useState(!1),{url:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:Qe.heroImage,onClick:()=>c(!0)}),a.jsx(Tg,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},Tg=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:d})=>{var ye;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:w,fontSizeLineHeight:m,textAppearance:h,color:f}=i.imageCaption??{},[x,C]=s.useState(0),[y,S]=s.useState(0),[B,N]=s.useState(!1),[q,D]=s.useState(!1),[T,H]=s.useState({}),$=s.useRef(null),I=s.useRef(null),P=s.useRef(null),E=s.useRef(!1),g=s.useRef(null),z=s.useRef(null),F=s.useRef(null),X=s.useRef(null),ie=s.useRef(!1),L=s.useRef(null),[_,V]=s.useState(!1),{appear:ae,triggers:re,slider:M,thumbnail:se,controls:j,area:b,caption:k,layout:G}=o.lightboxBlock,{appearClass:he,backdropAppearClass:J,backdropDisappearClass:ee,disappearClass:O}=Cg(ae.type,ae.direction),Z=(d==null?void 0:d.itemId)??null;s.useEffect(()=>{const U=()=>{setTimeout(()=>{var le,Ce;(Ce=(le=$.current)==null?void 0:le.splide)==null||Ce.refresh()},16)},ce=()=>{S(le=>le+1)};return window.addEventListener("ArticleEditor.Layout:change",U),window.addEventListener("ArticleEditor.ComponentContent:change",ce),()=>{window.removeEventListener("ArticleEditor.Layout:change",U),window.removeEventListener("ArticleEditor.ComponentContent:change",ce)}},[]),s.useEffect(()=>{if(!e||!se.isActive){V(!1);return}const U=L.current;if(!U)return;const ce=()=>{M.direction==="horiz"?V(U.scrollWidth>U.clientWidth):V(U.scrollHeight>U.clientHeight)};ce();const le=new ResizeObserver(ce);return le.observe(U),()=>le.disconnect()},[e,se.isActive,n.length,T,M.direction]);const te=s.useCallback(()=>{const U=window.matchMedia("(max-width: 768px)").matches,ce=fl(b.color);U&&!l&&ce>.9&&(document.body.style.backgroundColor=""),N(!0),E.current=!0;const le=Ce=>{Ce.target===g.current&&Ce.animationName&&(g.current&&z.current&&g.current.removeEventListener("animationend",z.current),z.current=null,E.current&&(E.current=!1,t()),N(!1))};g.current&&(z.current=le,g.current.addEventListener("animationend",le))},[t,b.color,l]),Le=(U,ce,le)=>{var Ce,Fe;if(U){if(re.type==="click"&&re.switch==="image")re.repeat==="close"&&x===n.length-1?te():(Ce=$.current)==null||Ce.go("+1");else if(re.type==="click"&&re.switch==="50/50"){const Ee=U.getBoundingClientRect(),Y=ce-Ee.left,be=le-Ee.top,de=Ee.width,K=Ee.height;let ue;M.direction==="horiz"?ue=Y<de/2?"-1":"+1":ue=be<K/2?"-1":"+1",(Fe=$.current)==null||Fe.go(ue)}}},ve=U=>{if(ie.current){ie.current=!1;return}const ce=n[x],le=(ce==null?void 0:ce.image.objectFit)==="cover";let Ce,Fe;if("changedTouches"in U&&U.changedTouches.length>0)Ce=U.changedTouches[0].clientX,Fe=U.changedTouches[0].clientY;else if("clientX"in U)Ce=U.clientX,Fe=U.clientY;else return;let Ee;if(le&&P.current){const Y=hl(P.current);Ee=Ce>=Y.left&&Ce<=Y.right&&Fe>=Y.top&&Fe<=Y.bottom}else{const Y=P.current?Nr(P.current):null;if(!Y){U.target===U.currentTarget&&te();return}Ee=Ce>=Y.x&&Ce<=Y.x+Y.width&&Fe>=Y.y&&Fe<=Y.y+Y.height}Ee?Le(P.current,Ce,Fe):te()},Ie=U=>{const ce=U.target;(ce.classList.contains(Qe.thumbsWrapper)||ce.classList.contains(Qe.thumbsContainer))&&ve(U)};s.useEffect(()=>{if(!e)return;const U=ce=>{var le,Ce;if(ce.key==="Escape"){te();return}if(ce.key==="ArrowRight"){C(Fe=>(Fe+1)%Math.max(n.length,1)),(le=$.current)==null||le.go("+1");return}ce.key==="ArrowLeft"&&(C(Fe=>(Fe-1+Math.max(n.length,1))%Math.max(n.length,1)),(Ce=$.current)==null||Ce.go("-1"))};return window.addEventListener("keydown",U),()=>{window.removeEventListener("keydown",U)}},[e,te,n.length]),s.useEffect(()=>{if(e){if(C(0),S(ce=>ce+1),E.current=!1,N(!1),D(!1),H({}),!Z)return;const U=new CustomEvent("page-overlay",{detail:{itemId:Z}});window.dispatchEvent(U)}return()=>{g.current&&z.current&&(g.current.removeEventListener("animationend",z.current),z.current=null),D(!1)}},[e,Z]),s.useEffect(()=>{I.current!==null&&I.current!==M.type&&S(U=>U+1),I.current=M.type},[M.type]),s.useEffect(()=>{if(!e)return;const U=document.body.style.overflow,ce=window.matchMedia("(max-width: 768px)").matches,le=fl(b.color);document.body.style.overflow="hidden",D(!1);const Ce=Ee=>{Ee.target===g.current&&!E.current&&Ee.animationName&&(ce&&!l&&le>.9&&(document.body.style.backgroundColor=b.color),D(!0),g.current&&F.current&&g.current.removeEventListener("animationend",F.current),F.current=null)};g.current&&(F.current=Ce,g.current.addEventListener("animationend",Ce));const Fe=Ee=>{const Y=Ee.target;Y&&(Y.closest(`.${Qe.thumbsWrapper}`)||Y.closest(`.${Qe.thumbsContainer}`))||M.type!=="slide"&&Ee.preventDefault()};return document.addEventListener("touchmove",Fe,{passive:!1}),()=>{document.body.style.overflow=U,document.removeEventListener("touchmove",Fe),g.current&&F.current&&(g.current.removeEventListener("animationend",F.current),F.current=null),D(!1)}},[e,l,b.color,M.type]),s.useEffect(()=>{if(!e)return;const U=ce=>{var Ce,Fe;if(E.current){ce.stopPropagation();return}if(ie.current){ie.current=!1;return}const le=ce.target;if(!(le&&(le.closest(`.${Qe.thumbsContainer}`)||le.closest(`.${Qe.thumbItem}`)||le.closest(`.${Qe.arrow}`)||le.closest(`.${Qe.closeButton}`)||le.closest(`.${Qe.caption}`)))){if(M.type==="slide"&&re.type==="drag"&&((Fe=(Ce=$.current)==null?void 0:Ce.splide)!=null&&Fe.root)){const Ee=$.current.splide.root;if(le&&(Ee.contains(le)||Ee===le))return}if(ce.touches.length===0&&ce.changedTouches.length>0){const Ee=n[x],Y=(Ee==null?void 0:Ee.image.objectFit)==="cover",be=ce.changedTouches[0];let de;if(Y&&P.current){const K=hl(P.current);de=be.clientX>=K.left&&be.clientX<=K.right&&be.clientY>=K.top&&be.clientY<=K.bottom}else{const K=P.current?Nr(P.current):null;if(!K)return;de=be.clientX>=K.x&&be.clientX<=K.x+K.width&&be.clientY>=K.y&&be.clientY<=K.y+K.height}if(!de){ce.stopPropagation(),E.current=!0;const K=ue=>{ue.stopPropagation(),ue.preventDefault(),document.removeEventListener("click",K,!0)};document.addEventListener("click",K,!0),te()}}}};return document.addEventListener("touchend",U,{passive:!0}),()=>{document.removeEventListener("touchend",U)}},[e,te,x,n]);const pe=(M.type==="scale"||M.type==="fade")&&M.direction==="vert"&&re.type==="drag";s.useEffect(()=>{var ue,He;if(!e||!pe||!((He=(ue=$.current)==null?void 0:ue.splide)!=null&&He.root))return;const U=$.current.splide.root,ce=30,le=(fe,Q)=>{if(X.current){const Je=Math.abs(fe-X.current.x),Ne=Math.abs(Q-X.current.y);(Je>0||Ne>0)&&(ie.current=!0)}},Ce=fe=>{X.current&&(fe.preventDefault(),le(fe.clientX,fe.clientY))},Fe=fe=>{X.current&&fe.touches.length>0&&(fe.preventDefault(),le(fe.touches[0].clientX,fe.touches[0].clientY))},Ee=(fe,Q)=>{if(!X.current||!$.current){X.current=null;return}const Je=Math.abs(fe-X.current.x),Ne=Math.abs(Q-X.current.y);Ne>ce&&Ne>Je&&$.current.go(Q<X.current.y?"+1":"-1"),X.current=null},Y=fe=>{X.current&&Ee(fe.clientX,fe.clientY),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("pointermove",Ce)},be=fe=>{if(X.current){if(fe.changedTouches.length>0){const Q=fe.changedTouches[0];Ee(Q.clientX,Q.clientY)}document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),document.removeEventListener("touchmove",Fe)}},de=fe=>{X.current={x:fe.clientX,y:fe.clientY},ie.current=!1,document.addEventListener("pointermove",Ce,{passive:!1}),document.addEventListener("pointerup",Y),document.addEventListener("pointercancel",Y)},K=fe=>{fe.touches.length>0&&(X.current={x:fe.touches[0].clientX,y:fe.touches[0].clientY},ie.current=!1,document.addEventListener("touchmove",Fe,{passive:!1}),document.addEventListener("touchend",be),document.addEventListener("touchcancel",be))};return U.addEventListener("pointerdown",de),U.addEventListener("touchstart",K),()=>{U.removeEventListener("pointerdown",de),U.removeEventListener("touchstart",K),document.removeEventListener("pointermove",Ce),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("touchmove",Fe),document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),X.current=null,ie.current=!1}},[e,pe,y]);const oe={backgroundColor:b.color,backdropFilter:`blur(${b.blur}px)`,animationDuration:`${parseInt(ae.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:zn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:g,className:pt(Qe.background,B?ee:J,{[Qe.editor]:l},{[Qe.hidden]:!e}),style:{...oe,...q&&!l&&!B?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?g:null,className:pt(Qe.contentStyle,B?O:he,{[Qe.editor]:l},{[Qe.hidden]:!e}),style:{animationDuration:`${parseInt(ae.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Ns,{onMove:U=>C(U.index),ref:$,className:Qe.lightboxSplide,options:{arrows:!1,speed:M.duration?parseInt(M.duration):500,direction:M.direction==="horiz"||M.type==="fade"||M.type==="scale"?"ltr":"ttb",pagination:!1,drag:re.type==="drag"&&!pe,perPage:1,width:"100%",height:"100%",type:M.type==="fade"||M.type==="scale"?"fade":"loop",padding:0,rewind:re.repeat!=="close",start:0},style:{"--splide-speed":M.duration},children:n.map((U,ce)=>{const le=ar(G.position,G.offset,l),Ce=`${W.scalingValue(G.padding.top,l)} ${W.scalingValue(G.padding.right,l)} ${W.scalingValue(G.padding.bottom,l)} ${W.scalingValue(G.padding.left,l)}`,Fe=M.type==="scale"?(()=>{const{transform:Ee,...Y}=le;return{...Y,position:"absolute",padding:Ce,boxSizing:"border-box","--position-transform":Ee||"none"}})():{...le,position:"absolute",padding:Ce,boxSizing:"border-box"};return a.jsx(Ws,{children:a.jsx("div",{className:Qe.imgWrapper,onClick:ve,children:a.jsx("img",{ref:ce===x?P:null,className:pt(Qe.imageStyle,{[Qe.contain]:U.image.objectFit==="contain",[Qe.cover]:U.image.objectFit==="cover",[Qe.scaleSlide]:M.type==="scale"}),src:U.image.url,alt:U.image.name??"",style:{...Fe,pointerEvents:U.image.objectFit==="contain"?"none":"auto"}})})},ce)})},y),j.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(Qe.arrow,{[Qe.arrowVertical]:M.direction==="vert"}),style:{color:j.color,"--arrow-hover-color":j.hover},children:a.jsxs("button",{className:Qe.arrowInner,style:{transform:`translate(${W.scalingValue(j.offset.x,l)}, ${W.scalingValue(j.offset.y*(M.direction==="horiz"?1:-1),l)}) scale(${j.scale}) rotate(${M.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var U;return(U=$.current)==null?void 0:U.go("-1")},"aria-label":"Previous",children:[j.arrowsImgUrl&&a.jsx(sn,{url:j.arrowsImgUrl,fill:j.color,hoverFill:j.hover,className:pt(Qe.arrowImg,Qe.mirror)}),!j.arrowsImgUrl&&a.jsx(yl,{color:j.color,className:pt(Qe.arrowIcon,Qe.arrowImg,Qe.mirror)})]})}),a.jsx("div",{className:pt(Qe.arrow,Qe.nextArrow,{[Qe.arrowVertical]:M.direction==="vert"}),style:{color:j.color,"--arrow-hover-color":j.hover},children:a.jsxs("button",{className:Qe.arrowInner,style:{transform:`translate(${W.scalingValue(j.offset.x*(M.direction==="horiz"?-1:1),l)}, ${W.scalingValue(j.offset.y,l)}) scale(${j.scale}) rotate(${M.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var U;return(U=$.current)==null?void 0:U.go("+1")},"aria-label":"Next",children:[j.arrowsImgUrl&&a.jsx(sn,{url:j.arrowsImgUrl,fill:j.color,hoverFill:j.hover,className:Qe.arrowImg}),!j.arrowsImgUrl&&a.jsx(yl,{color:j.color,className:pt(Qe.arrowIcon,Qe.arrowImg)})]})})]}),b.closeIconUrl&&(()=>{const U=ar(b.closeIconAlign,b.closeIconOffset,l),ce=`scale(${b.closeIconScale})`,le=U.transform?`${U.transform} ${ce}`:ce;return a.jsx("button",{className:Qe.closeButton,style:{...U,transform:le},onClick:te,"aria-label":"Close lightbox",children:a.jsx(sn,{url:b.closeIconUrl,fill:b.closeIconColor??"#000000",hoverFill:b.closeIconHover??"#cccccc"})})})(),k&&k.isActive&&i.imageCaption&&((ye=n[x])==null?void 0:ye.imageCaption)&&a.jsx("div",{className:Qe.caption,style:{...ar(k.alignment,k.offset,l),fontFamily:co(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":W.scalingValue(c.width,l),letterSpacing:W.scalingValue(p,l),wordSpacing:W.scalingValue(w,l),textAlign:v,fontSize:W.scalingValue(m.fontSize,l),lineHeight:W.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:f},onClick:U=>U.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:Qe.captionTextInner,style:{"--link-color":k.linkColor,"--link-hover-color":k.linkHoverColor},children:a.jsx(Ri,{content:n[x].imageCaption})})}),se.isActive&&(()=>{const[U,ce]=se.position.split("-"),le=M.direction==="horiz"?`${U}-left`:se.position,Ce=ar(le,se.offset,l),Fe=()=>{if(M.direction==="horiz"){if(ce==="left")return"flex-start";if(ce==="center")return"center";if(ce==="right")return"flex-end"}else{if(U==="top")return"flex-start";if(U==="middle")return"center";if(U==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:L,className:Qe.thumbsWrapper,onClick:Ee=>Ie(Ee),style:{position:l?"absolute":"fixed",...Ce,...M.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:pt(Qe.thumbsContainer,{[Qe.thumbsContainerVertical]:M.direction==="vert",[Qe.thumbsAlignStart]:se.align==="start",[Qe.thumbsAlignCenter]:se.align==="center",[Qe.thumbsAlignEnd]:se.align==="end"}),style:{gap:W.scalingValue(se.grid.gap,l),justifyContent:_?"flex-start":Fe()},children:n.map((Ee,Y)=>{const be=Y===x,de=T[Y],ue=se.grid.size*(be?se.activeState.scale:1),He=()=>{if(se.fit!=="fit")return{};if(!de)return M.direction==="horiz"?{height:W.scalingValue(ue,l)}:{width:W.scalingValue(ue,l)};const fe=de.width/de.height;if(M.direction==="horiz"){const Q=ue,Je=Q*fe;return{width:W.scalingValue(Je,l),height:W.scalingValue(Q,l)}}else{const Q=ue,Je=Q/fe;return{width:W.scalingValue(Q,l),height:W.scalingValue(Je,l)}}};return a.jsx("button",{className:Qe.thumbItem,style:{...M.direction==="horiz"&&se.fit!=="fit"?{height:W.scalingValue(ue,l)}:{},...M.direction==="vert"&&se.fit!=="fit"?{width:W.scalingValue(ue,l)}:{},...se.fit==="cover"?{width:W.scalingValue(ue,l),height:W.scalingValue(ue,l)}:{},...He(),transition:be?"all 0.25s ease-out":"none",opacity:be?se.activeState.opacity/100:se.opacity/100,"--thumb-hover":se.activeState.opacity/100},onClick:fe=>{var Q;fe.stopPropagation(),C(Y),(Q=$.current)==null||Q.go(Y)},onMouseEnter:()=>{var fe;se.triggers==="hov"&&((fe=$.current)==null||fe.go(Y))},children:a.jsx("img",{src:Ee.image.url,alt:Ee.image.name??"",onLoad:fe=>{const Q=fe.currentTarget;Q.naturalWidth&&Q.naturalHeight&&H(Je=>({...Je,[Y]:{width:Q.naturalWidth,height:Q.naturalHeight}}))},style:{objectFit:se.fit==="cover"?"cover":"contain",...se.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...se.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Ee.image.name}-${Y}`)})})})})()]})]}),document.getElementById(r))};function yl({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Ig={element:$g,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 sr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rg(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${rr(48)};
11
+ min-height: ${sr(48)};
12
12
  }
13
13
  .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
14
  .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${e}-field-group.${e}-labeled {
35
- gap: ${rr(4)};
35
+ gap: ${sr(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,11 +128,11 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${rr(8)};
131
+ margin-top: ${sr(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${rr(8)};
135
+ margin-top: ${sr(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Tg({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,d=i&&t||!t,{prefix:c}=H.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:x=[],buttonLabel:b,gap:g,fieldsGap:h,buttonCorners:f,buttonStroke:v,buttonPadding:C,isButtonFullWidth:y,inputCorners:T,inputStroke:W,inputPadding:_,inputColor:X,inputTextColor:D,inputBorderColor:w,placeholderColor:R,buttonColor:m,buttonTextColor:E,buttonBorderColor:I,labelTextColor:J,successColor:A,errorColor:Q,fontFamily:q,inputFontSettings:Y,inputFontSize:oe,inputLineHeight:L,inputLetterSpacing:N,inputWordSpacing:V,inputTextAppearance:de,buttonFontSettings:re,buttonFontSize:M,buttonLineHeight:S,buttonLetterSpacing:$,buttonWordSpacing:F,buttonTextAppearance:O,labelFontSettings:te,labelFontSize:xe,labelLineHeight:ne,labelLetterSpacing:ae,labelWordSpacing:Z,labelTextAppearance:B,statusFontSettings:G,statusFontSize:$e,statusLineHeight:he,statusLetterSpacing:Re,statusWordSpacing:ge,statusTextAppearance:ye,successMessage:Se,errorMessage:ee,stateOverrides:ce}=e,ue=u==="B",Te=x.slice(0,Math.min(p,x.length)),ke={fontSettings:{fontFamily:q,fontWeight:(Y==null?void 0:Y.fontWeight)??400,fontStyle:(Y==null?void 0:Y.fontStyle)??"normal"},fontSize:oe??.01,lineHeight:L,letterSpacing:N??0,wordSpacing:V??0,textAppearance:de,color:D},Ce=an(Yt(ke,t)),U=H.scalingValue(W??0,t),fe=H.scalingValue((L??oe??.01)+((_==null?void 0:_.top)??0)+((_==null?void 0:_.bottom)??0)+(u==="C"?W??0:(W??0)*2),t),me={...Ce,borderStyle:"solid",borderRadius:u==="C"?0:H.scalingValue(T??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:U,borderLeftWidth:0}:{borderWidth:U},paddingTop:H.scalingValue((_==null?void 0:_.top)??0,t),paddingRight:H.scalingValue((_==null?void 0:_.right)??0,t),paddingBottom:H.scalingValue((_==null?void 0:_.bottom)??0,t),paddingLeft:H.scalingValue((_==null?void 0:_.left)??0,t),height:fe,minHeight:fe},K={fontSettings:{fontFamily:q,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:M??.01,lineHeight:S,letterSpacing:$??0,wordSpacing:F??0,textAppearance:O,color:E},z=an(Yt(K,t)),be=H.scalingValue(v??0,t),se={fontSettings:{fontFamily:q,fontWeight:(te==null?void 0:te.fontWeight)??400,fontStyle:(te==null?void 0:te.fontStyle)??"normal"},fontSize:xe??.01,lineHeight:ne,letterSpacing:ae??0,wordSpacing:Z??0,textAppearance:B,color:J},j=Yt(se,t),_e={fontSettings:{fontFamily:q,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:he,letterSpacing:Re??0,wordSpacing:ge??0,textAppearance:ye,color:A},We=an(Yt(_e,t)),lt=H.buildColorVars(c,{inputColor:X,inputTextColor:D,inputBorderColor:w,placeholderColor:R!=null&&R.trim()?R:"#cccccc",buttonColor:m,buttonTextColor:E,buttonBorderColor:I,labelTextColor:J,successColor:A,errorColor:Q},Ig,Rg,ce),[Je,ct]=s.useState(()=>Object.fromEntries(Te.map(Fe=>[Fe.name,""]))),[it,Ve]=s.useState("idle"),[Ie,Ne]=s.useState(null),Oe=r==="success"?"success":r==="error"?"error":it,Ue=r==="error"?ee:Ie,pe=r==="filled",we=s.useMemo(()=>{if(!pe)return Je;let Fe=null;for(const qe of Te)(Je[qe.name]??"").trim().length>0||(Fe=Fe??{...Je},Fe[qe.name]="Filled");return Fe??Je},[Je,pe,Te]),Ae=Oe==="error"?H.getFormFieldValidationError(Te,we):null,Ze=`${r&&r!=="default"?`${c}-state-${r}`:""}`.trim(),Ge=o==null?void 0:o.submitUrl,st=(Fe,qe)=>{ct(He=>({...He,[Fe]:qe}))},Qe=async Fe=>{if(Fe.preventDefault(),!d)return;const qe=Object.fromEntries(Te.map(nt=>{var at;return[nt.name,((at=Je[nt.name])==null?void 0:at.trim())??""]}).filter(([,nt])=>nt));if(!Ge){Ve("error"),Ne("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const He=H.getFormFieldValidationError(Te,Je);if(He){Ve("error"),Ne(He);return}Ve("submitting"),Ne(null);try{const nt=await fetch(Ge,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!nt.ok){const at=await nt.text();throw new Error(at||`Request failed: ${nt.status}`)}Ve("success"),ct(Object.fromEntries(Te.map(at=>[at.name,""])))}catch(nt){Ve("error"),Ne(nt instanceof Error?nt.message:"Something went wrong")}};return a.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Ze}`.trim(),style:lt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Cg(c)}}),a.jsxs("form",{onSubmit:Qe,className:`${c}-form`,children:[a.jsx("div",{className:`${c}-fields`,children:Te.map((Fe,qe)=>a.jsxs(s.Fragment,{children:[qe>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:H.scalingValue(h??0,t)}}),a.jsxs("div",{className:`${c}-field-group${ue?` ${c}-labeled`:""}`,children:[ue&&a.jsx("span",{className:`${c}-field-label`,style:j?{...j,lineHeight:j.fontSize}:void 0,children:Fe.label||Fe.name}),Fe.type==="textarea"?a.jsx("textarea",{name:Fe.name,autoComplete:"off",value:we[Fe.name]??"",onChange:He=>st(Fe.name,He.target.value),placeholder:Fe.placeholder,className:`${c}-input`,style:me,rows:1,"data-filled":pe||(we[Fe.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Fe.type==="phone"?"tel":Fe.type==="email"?"email":"text",name:Fe.name,autoComplete:"off",value:we[Fe.name]??"",onChange:He=>st(Fe.name,He.target.value),placeholder:Fe.placeholder,required:Fe.isRequired??Fe.type==="email",className:`${c}-input`,style:me,"data-filled":pe||(we[Fe.name]??"").trim().length>0})]})]},qe))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:H.scalingValue(g??0,t)}}),a.jsx("div",{className:`${c}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:H.scalingValue(f??0,t),borderWidth:be,paddingTop:H.scalingValue((C==null?void 0:C.top)??0,t),paddingRight:H.scalingValue((C==null?void 0:C.right)??0,t),paddingBottom:H.scalingValue((C==null?void 0:C.bottom)??0,t),paddingLeft:H.scalingValue((C==null?void 0:C.left)??0,t),pointerEvents:d?"auto":void 0,...z,...y?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${c}-overlay-anchor`,style:y?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:it==="submitting"?"...":b})})})]}),Oe==="success"&&a.jsx("p",{className:`${c}-success`,style:{...We},children:Se}),Oe==="error"&&a.jsx("p",{className:`${c}-error`,style:{...We},role:"alert",children:Ae??Ue??ee})]})}const Ig={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"},Rg=["hover","focus","filled","success","error"],Lg=`import React, { useMemo, useState } from 'react';
158
+ `}function Lg({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,d=i&&t||!t,{prefix:c}=W.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:v=[],buttonLabel:w,gap:m,fieldsGap:h,buttonCorners:f,buttonStroke:x,buttonPadding:C,isButtonFullWidth:y,inputCorners:S,inputStroke:B,inputPadding:N,inputColor:q,inputTextColor:D,inputBorderColor:T,placeholderColor:H,buttonColor:$,buttonTextColor:I,buttonBorderColor:P,labelTextColor:E,successColor:g,errorColor:z,fontFamily:F,inputFontSettings:X,inputFontSize:ie,inputLineHeight:L,inputLetterSpacing:_,inputWordSpacing:V,inputTextAppearance:ae,buttonFontSettings:re,buttonFontSize:M,buttonLineHeight:se,buttonLetterSpacing:j,buttonWordSpacing:b,buttonTextAppearance:k,labelFontSettings:G,labelFontSize:he,labelLineHeight:J,labelLetterSpacing:ee,labelWordSpacing:O,labelTextAppearance:Z,statusFontSettings:te,statusFontSize:Le,statusLineHeight:ve,statusLetterSpacing:Ie,statusWordSpacing:pe,statusTextAppearance:oe,successMessage:ye,errorMessage:U,stateOverrides:ce}=e,le=u==="B",Ce=v.slice(0,Math.min(p,v.length)),Fe={fontSettings:{fontFamily:F,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:L,letterSpacing:_??0,wordSpacing:V??0,textAppearance:ae,color:D},Ee=an(Ut(Fe,t)),Y=W.scalingValue(B??0,t),be=W.scalingValue((L??ie??.01)+((N==null?void 0:N.top)??0)+((N==null?void 0:N.bottom)??0)+(u==="C"?B??0:(B??0)*2),t),de={...Ee,borderStyle:"solid",borderRadius:u==="C"?0:W.scalingValue(S??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Y,borderLeftWidth:0}:{borderWidth:Y},paddingTop:W.scalingValue((N==null?void 0:N.top)??0,t),paddingRight:W.scalingValue((N==null?void 0:N.right)??0,t),paddingBottom:W.scalingValue((N==null?void 0:N.bottom)??0,t),paddingLeft:W.scalingValue((N==null?void 0:N.left)??0,t),height:be,minHeight:be},K={fontSettings:{fontFamily:F,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:M??.01,lineHeight:se,letterSpacing:j??0,wordSpacing:b??0,textAppearance:k,color:I},ue=an(Ut(K,t)),He=W.scalingValue(x??0,t),fe={fontSettings:{fontFamily:F,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:he??.01,lineHeight:J,letterSpacing:ee??0,wordSpacing:O??0,textAppearance:Z,color:E},Q=Ut(fe,t),Je={fontSettings:{fontFamily:F,fontWeight:(te==null?void 0:te.fontWeight)??400,fontStyle:(te==null?void 0:te.fontStyle)??"normal"},fontSize:Le??.01,lineHeight:ve,letterSpacing:Ie??0,wordSpacing:pe??0,textAppearance:oe,color:g},Ne=an(Ut(Je,t)),ct=W.buildColorVars(c,{inputColor:q,inputTextColor:D,inputBorderColor:T,placeholderColor:H!=null&&H.trim()?H:"#cccccc",buttonColor:$,buttonTextColor:I,buttonBorderColor:P,labelTextColor:E,successColor:g,errorColor:z},Pg,Eg,ce),[Ke,ut]=s.useState(()=>Object.fromEntries(Ce.map(Te=>[Te.name,""]))),[lt,Ye]=s.useState("idle"),[Re,We]=s.useState(null),Be=r==="success"?"success":r==="error"?"error":lt,Ue=r==="error"?U:Re,ge=r==="filled",xe=s.useMemo(()=>{if(!ge)return Ke;let Te=null;for(const Ve of Ce)(Ke[Ve.name]??"").trim().length>0||(Te=Te??{...Ke},Te[Ve.name]="Filled");return Te??Ke},[Ke,ge,Ce]),_e=Be==="error"?W.getFormFieldValidationError(Ce,xe):null,we=`${r&&r!=="default"?`${c}-state-${r}`:""}`.trim(),$e=o==null?void 0:o.submitUrl,Xe=(Te,Ve)=>{ut(De=>({...De,[Te]:Ve}))},ze=async Te=>{if(Te.preventDefault(),!d)return;const Ve=Object.fromEntries(Ce.map(tt=>{var nt;return[tt.name,((nt=Ke[tt.name])==null?void 0:nt.trim())??""]}).filter(([,tt])=>tt));if(!$e){Ye("error"),We("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const De=W.getFormFieldValidationError(Ce,Ke);if(De){Ye("error"),We(De);return}Ye("submitting"),We(null);try{const tt=await fetch($e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!tt.ok){const nt=await tt.text();throw new Error(nt||`Request failed: ${tt.status}`)}Ye("success"),ut(Object.fromEntries(Ce.map(nt=>[nt.name,""])))}catch(tt){Ye("error"),We(tt instanceof Error?tt.message:"Something went wrong")}};return a.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${we}`.trim(),style:ct,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rg(c)}}),a.jsxs("form",{onSubmit:ze,className:`${c}-form`,children:[a.jsx("div",{className:`${c}-fields`,children:Ce.map((Te,Ve)=>a.jsxs(s.Fragment,{children:[Ve>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:W.scalingValue(h??0,t)}}),a.jsxs("div",{className:`${c}-field-group${le?` ${c}-labeled`:""}`,children:[le&&a.jsx("span",{className:`${c}-field-label`,style:Q?{...Q,lineHeight:Q.fontSize}:void 0,children:Te.label||Te.name}),Te.type==="textarea"?a.jsx("textarea",{name:Te.name,autoComplete:"off",value:xe[Te.name]??"",onChange:De=>Xe(Te.name,De.target.value),placeholder:Te.placeholder,className:`${c}-input`,style:de,rows:1,"data-filled":ge||(xe[Te.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Te.type==="phone"?"tel":Te.type==="email"?"email":"text",name:Te.name,autoComplete:"off",value:xe[Te.name]??"",onChange:De=>Xe(Te.name,De.target.value),placeholder:Te.placeholder,required:Te.isRequired??Te.type==="email",className:`${c}-input`,style:de,"data-filled":ge||(xe[Te.name]??"").trim().length>0})]})]},Ve))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:W.scalingValue(m??0,t)}}),a.jsx("div",{className:`${c}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:W.scalingValue(f??0,t),borderWidth:He,paddingTop:W.scalingValue((C==null?void 0:C.top)??0,t),paddingRight:W.scalingValue((C==null?void 0:C.right)??0,t),paddingBottom:W.scalingValue((C==null?void 0:C.bottom)??0,t),paddingLeft:W.scalingValue((C==null?void 0:C.left)??0,t),pointerEvents:d?"auto":void 0,...ue,...y?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${c}-overlay-anchor`,style:y?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:lt==="submitting"?"...":w})})})]}),Be==="success"&&a.jsx("p",{className:`${c}-success`,style:{...Ne},children:ye}),Be==="error"&&a.jsx("p",{className:`${c}-error`,style:{...Ne},role:"alert",children:_e??Ue??U})]})}const Pg={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"},Eg=["hover","focus","filled","success","error"],Mg=`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
- `,Pg=[{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"}],ar={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Eg=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Mg={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:{...ar.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:{...ar.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:{...ar.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:{...ar.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:Pg,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:[...Eg],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"]},kg={element:Tg,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:Mg,sourceCode:Lg,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function sr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ag(e){return`
792
+ `,kg=[{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"}],lr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ag=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fg={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:{...lr.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:{...lr.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:{...lr.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:{...lr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:kg,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:[...Ag],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"]},_g={element:Lg,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:Fg,sourceCode:Mg,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function cr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ng(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -971,16 +971,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
971
971
  align-items: center;
972
972
  }
973
973
  .${e}-success {
974
- margin-top: ${sr(8)};
975
- font-size: ${sr(14)};
974
+ margin-top: ${cr(8)};
975
+ font-size: ${cr(14)};
976
976
  color: var(--${e}-success-success-color, var(--${e}-success-color));
977
977
  }
978
978
  .${e}-error {
979
- margin-top: ${sr(8)};
980
- font-size: ${sr(14)};
979
+ margin-top: ${cr(8)};
980
+ font-size: ${cr(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const Fg=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=H.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:x,inputFontSettings:b,inputFontSize:g,inputLineHeight:h,inputLetterSpacing:f,inputWordSpacing:v,inputTextAppearance:C,buttonFontSettings:y,buttonFontSize:T,buttonLineHeight:W,buttonLetterSpacing:_,buttonWordSpacing:X,buttonTextAppearance:D,statusFontSettings:w,statusFontSize:R,statusLineHeight:m,statusLetterSpacing:E,statusWordSpacing:I,statusTextAppearance:J,iconMaxWidth:A,minHeight:Q,corners:q,stroke:Y,stateOverrides:oe,inputPadding:L,buttonPadding:N,successMessage:V="Thanks for subscribing!",errorMessage:de="Please, fill all required fields."}=e,re=d.slice(0,Math.min(p,d.length)),[M,S]=s.useState(()=>Object.fromEntries(re.map(se=>[se.name,""]))),[$,F]=s.useState("idle"),[O,te]=s.useState(null),xe=o==="success"?"success":o==="error"?"error":$,ne=o==="error"?de:O,ae=o==="filled",Z=s.useMemo(()=>{if(!ae)return M;let se=null;for(const j of re)(M[j.name]??"").trim().length>0||(se=se??{...M},se[j.name]="Filled");return se??M},[ae,M,re]),B=xe==="error"?H.getFormFieldValidationError(re,Z):null,G=o&&o!=="default"?`${r}-state-${o}`:"",$e=re.some(se=>(Z[se.name]??"").trim().length>0),he=G!==`${r}-state-filled`&&$e?`${r}-state-filled`:"",Re=`${G} ${he}`.trim(),ge=i==null?void 0:i.submitUrl,ye=u??"",Se=(c==null?void 0:c.icon)??"",ee=(c==null?void 0:c.mode)==="On",ce=ye||"Submit",ue={fontSettings:{fontFamily:x,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:g??.01,lineHeight:h,letterSpacing:f??0,wordSpacing:v??0,textAppearance:C,color:e.inputTextColor??"#111111"},Te={fontSettings:{fontFamily:x,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:T??.01,lineHeight:W,letterSpacing:_??0,wordSpacing:X??0,textAppearance:D,color:e.buttonTextColor??"#ffffff"},ke={fontSettings:{fontFamily:x,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:R??.01,lineHeight:m,letterSpacing:E??0,wordSpacing:I??0,textAppearance:J,color:e.successColor??"#22c55e"},Ce=an(Yt(ue,t)),U=an(Yt(Te,t)),fe=an(Yt(ke,t)),me=H.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ue==null?void 0:ue.color)??"#111111",buttonTextColor:e.buttonTextColor??(Te==null?void 0:Te.color)??"#ffffff"},_g,Ng,oe),K={borderRadius:H.scalingValue(q,t),borderWidth:H.scalingValue(Y,t),borderStyle:"solid"},z={borderLeftWidth:H.scalingValue(Y,t)},be=async se=>{if(se.preventDefault(),!l)return;const j=Object.fromEntries(re.map(We=>{var lt;return[We.name,((lt=M[We.name])==null?void 0:lt.trim())??""]}).filter(([,We])=>We));if(!ge){F("error"),te("No integrations were found for this form.");return}if(Object.keys(j).length===0)return;const _e=H.getFormFieldValidationError(re,M);if(_e){F("error"),te(_e);return}F("submitting"),te(null);try{const We=await fetch(ge,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(!We.ok){const lt=await We.text();throw new Error(lt||`Request failed: ${We.status}`)}F("success"),S(Object.fromEntries(re.map(lt=>[lt.name,""])))}catch(We){F("error"),te(We instanceof Error?We.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Re}`.trim(),style:me,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ag(r)}}),a.jsxs("form",{onSubmit:be,className:`${r}-form`,style:{...K,height:H.scalingValue(Q,t),minHeight:H.scalingValue(Q,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map(se=>a.jsx("input",{type:se.type==="email"?"email":se.type==="phone"?"tel":"text",name:se.name,autoComplete:"off",value:Z[se.name]??"",onChange:j=>S(_e=>({..._e,[se.name]:j.target.value})),placeholder:se.placeholder,required:se.isRequired??se.type==="email",className:`${r}-input`,style:{...Ce,paddingRight:H.scalingValue(L.right,t),paddingLeft:H.scalingValue(L.left,t),paddingTop:H.scalingValue(L.top,t),paddingBottom:H.scalingValue(L.bottom,t)}},se.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":ce,style:{...U,...z,paddingRight:H.scalingValue(N.right,t),paddingLeft:H.scalingValue(N.left,t),paddingTop:H.scalingValue(N.top,t),paddingBottom:H.scalingValue(N.bottom,t),pointerEvents:l?"auto":void 0},children:$==="submitting"?"...":ee?Se&&a.jsx(sn,{url:Se,className:`${r}-submitBtnIcon`,style:{maxWidth:H.scalingValue(A??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ye})})]}),xe==="success"&&a.jsx("p",{className:`${r}-success`,style:{...fe},children:V}),xe==="error"&&a.jsx("p",{className:`${r}-error`,style:{...fe},role:"alert",children:B??ne??de})]})},_g={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"},Ng=["hover","focus","filled","success","error"],Wg=`import React, { useMemo, useState } from 'react';
983
+ `}const Wg=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=W.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:v,inputFontSettings:w,inputFontSize:m,inputLineHeight:h,inputLetterSpacing:f,inputWordSpacing:x,inputTextAppearance:C,buttonFontSettings:y,buttonFontSize:S,buttonLineHeight:B,buttonLetterSpacing:N,buttonWordSpacing:q,buttonTextAppearance:D,statusFontSettings:T,statusFontSize:H,statusLineHeight:$,statusLetterSpacing:I,statusWordSpacing:P,statusTextAppearance:E,iconMaxWidth:g,minHeight:z,corners:F,stroke:X,stateOverrides:ie,inputPadding:L,buttonPadding:_,successMessage:V="Thanks for subscribing!",errorMessage:ae="Please, fill all required fields."}=e,re=d.slice(0,Math.min(p,d.length)),[M,se]=s.useState(()=>Object.fromEntries(re.map(fe=>[fe.name,""]))),[j,b]=s.useState("idle"),[k,G]=s.useState(null),he=o==="success"?"success":o==="error"?"error":j,J=o==="error"?ae:k,ee=o==="filled",O=s.useMemo(()=>{if(!ee)return M;let fe=null;for(const Q of re)(M[Q.name]??"").trim().length>0||(fe=fe??{...M},fe[Q.name]="Filled");return fe??M},[ee,M,re]),Z=he==="error"?W.getFormFieldValidationError(re,O):null,te=o&&o!=="default"?`${r}-state-${o}`:"",Le=re.some(fe=>(O[fe.name]??"").trim().length>0),ve=te!==`${r}-state-filled`&&Le?`${r}-state-filled`:"",Ie=`${te} ${ve}`.trim(),pe=i==null?void 0:i.submitUrl,oe=u??"",ye=(c==null?void 0:c.icon)??"",U=(c==null?void 0:c.mode)==="On",ce=oe||"Submit",le={fontSettings:{fontFamily:v,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:m??.01,lineHeight:h,letterSpacing:f??0,wordSpacing:x??0,textAppearance:C,color:e.inputTextColor??"#111111"},Ce={fontSettings:{fontFamily:v,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:S??.01,lineHeight:B,letterSpacing:N??0,wordSpacing:q??0,textAppearance:D,color:e.buttonTextColor??"#ffffff"},Fe={fontSettings:{fontFamily:v,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:H??.01,lineHeight:$,letterSpacing:I??0,wordSpacing:P??0,textAppearance:E,color:e.successColor??"#22c55e"},Ee=an(Ut(le,t)),Y=an(Ut(Ce,t)),be=an(Ut(Fe,t)),de=W.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(le==null?void 0:le.color)??"#111111",buttonTextColor:e.buttonTextColor??(Ce==null?void 0:Ce.color)??"#ffffff"},Hg,Dg,ie),K={borderRadius:W.scalingValue(F,t),borderWidth:W.scalingValue(X,t),borderStyle:"solid"},ue={borderLeftWidth:W.scalingValue(X,t)},He=async fe=>{if(fe.preventDefault(),!l)return;const Q=Object.fromEntries(re.map(Ne=>{var ct;return[Ne.name,((ct=M[Ne.name])==null?void 0:ct.trim())??""]}).filter(([,Ne])=>Ne));if(!pe){b("error"),G("No integrations were found for this form.");return}if(Object.keys(Q).length===0)return;const Je=W.getFormFieldValidationError(re,M);if(Je){b("error"),G(Je);return}b("submitting"),G(null);try{const Ne=await fetch(pe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)});if(!Ne.ok){const ct=await Ne.text();throw new Error(ct||`Request failed: ${Ne.status}`)}b("success"),se(Object.fromEntries(re.map(ct=>[ct.name,""])))}catch(Ne){b("error"),G(Ne instanceof Error?Ne.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Ie}`.trim(),style:de,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ng(r)}}),a.jsxs("form",{onSubmit:He,className:`${r}-form`,style:{...K,height:W.scalingValue(z,t),minHeight:W.scalingValue(z,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map(fe=>a.jsx("input",{type:fe.type==="email"?"email":fe.type==="phone"?"tel":"text",name:fe.name,autoComplete:"off",value:O[fe.name]??"",onChange:Q=>se(Je=>({...Je,[fe.name]:Q.target.value})),placeholder:fe.placeholder,required:fe.isRequired??fe.type==="email",className:`${r}-input`,style:{...Ee,paddingRight:W.scalingValue(L.right,t),paddingLeft:W.scalingValue(L.left,t),paddingTop:W.scalingValue(L.top,t),paddingBottom:W.scalingValue(L.bottom,t)}},fe.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":ce,style:{...Y,...ue,paddingRight:W.scalingValue(_.right,t),paddingLeft:W.scalingValue(_.left,t),paddingTop:W.scalingValue(_.top,t),paddingBottom:W.scalingValue(_.bottom,t),pointerEvents:l?"auto":void 0},children:j==="submitting"?"...":U?ye&&a.jsx(sn,{url:ye,className:`${r}-submitBtnIcon`,style:{maxWidth:W.scalingValue(g??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):oe})})]}),he==="success"&&a.jsx("p",{className:`${r}-success`,style:{...be},children:V}),he==="error"&&a.jsx("p",{className:`${r}-error`,style:{...be},role:"alert",children:Z??J??ae})]})},Hg={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"},Dg=["hover","focus","filled","success","error"],Og=`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
- `,Hg="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>'),Dg=[{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."}],fa={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Og=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Bg={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:{...fa.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:{...fa.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:{...fa.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:Dg,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Hg},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:[...Og],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"]},zg={element:Fg,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:Bg,sourceCode:Wg};function jg(e,t){const n=t>0?`${t}px`:"0px";return`
1560
+ `,Bg="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>'),zg=[{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."}],ya={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},jg=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Vg={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:{...ya.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:{...ya.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:{...ya.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:zg,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Bg},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:[...jg],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"]},Gg={element:Wg,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:Vg,sourceCode:Og};function Xg(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 Vg=30,Gg=20,ya=3,Xg=12,qg=32,Yg=3,Ug=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")},Kg=(e,t)=>Array.from({length:t},()=>e).flat(),Zg=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},fd=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),gl=(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),r=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,p)=>e.children[p]),c=fd(d);return c<=0?0:c+r*Math.max(0,t-1)},Jg=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=fd(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},Qg=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},eh=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Qg(i,e))},th=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??"")},nh=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ih=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var I,J,A,Q;const p=s.useRef(null),x=!!((I=e.image)!=null&&I.url&&th(e.image));s.useLayoutEffect(()=>{d&&nh(p.current)&&(u==null||u())},[d,(J=e.image)==null?void 0:J.url,u]);const b=n.display==="cover",g=n.ratioValue??"1:1",h=n.reversed??!1,[f,v]=g.split(":").map(Number),T=(h?v:f)/(h?f:v),W=i/T,_=W>o?o:W,X=W>o?o*T:i,D=c(X),w=c(_),R={borderRadius:c(r)},m=b?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...R}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...R},E=((A=e.image)==null?void 0:A.url)&&(x?a.jsx("video",{ref:q=>{p.current=q},src:e.image.url,style:m,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):a.jsx("img",{ref:q=>{p.current=q},src:e.image.url,alt:((Q=e.image)==null?void 0:Q.name)??"",style:m,onLoad:d?u:void 0,onError:d?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...b?{width:D}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...b?{width:D,height:w,overflow:"hidden",...R}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:E&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:pt(`${t}-marquee-link`,!b&&`${t}-marquee-link-contain`),children:E}):E})})},oh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=H.useScopedStyles(),[l,d]=s.useState(0),c=l>0?Math.round(l):0,u=s.useMemo(()=>jg(r,c),[r,c]),{speed:p,direction:x,pauseOnHover:b,gap:g,imageMaxWidth:h,imageMaxHeight:f,hoverEffect:v,cornerRadius:C=0}=e,y=s.useMemo(()=>Zg(e.imageFit),[e.imageFit]),T=(t==null?void 0:t.length)??0,W=!!o,_=!n||!!i,X=_&&v!=="off"&&v!=="randomize"?`${r}-image-hover-${v}`:void 0,D=n?!!i:!0,R=((t==null?void 0:t.length)??0)>0&&(D||!!n),m=Math.max(0,p)*Vg,E=he=>H.scalingValue(he,n??!1),I=s.useRef(null),J=s.useRef(null),A=s.useRef(null),[Q,q]=s.useState(0),Y=D&&b==="on",[oe,L]=s.useState(!1),[N,V]=s.useState({}),de=s.useRef(N);de.current=N;const re=s.useRef(null),M=s.useRef(0),S=s.useRef(null),$=s.useMemo(()=>(t??[]).map(he=>{var Re;return((Re=he.image)==null?void 0:Re.url)??""}).join("\0"),[t]),[F,O]=s.useState(ya),te=s.useMemo(()=>{const he=t??[];return he.length===0||!(D||!!n)?he:Kg(he,F)},[t,D,F,n]),xe=s.useMemo(()=>(t??[]).filter(he=>{var Re;return!!((Re=he.image)!=null&&Re.url)}).length,[t]),ne=R?Yg:1;s.useLayoutEffect(()=>{M.current=0,V({}),re.current=null,O(ya),d(0)},[$]),s.useEffect(()=>{if(!_||v!=="randomize")return;const he=I.current;if(!he)return;const Re=ee=>{V(ce=>{const ue=Array.from(ee).filter(ke=>ke in ce&&!eh(he,ke));if(ue.length===0)return ce;const Te={...ce};return ue.forEach(ke=>{delete Te[ke]}),Te})},ge=new IntersectionObserver(ee=>{const ce=new Set;for(const ue of ee){const Te=ue.target.dataset.marqueeItemIndex,ke=Te!==void 0?Number(Te):NaN;Number.isNaN(ke)||ce.add(ke)}ce.size>0&&Re(ce)},{root:he,threshold:0});Object.keys(N).forEach(ee=>{const ce=Number(ee);he.querySelectorAll(`[data-marquee-item-index="${ce}"]`).forEach(ue=>ge.observe(ue))});const ye={current:0},Se=()=>{const ee=Object.keys(de.current);ee.length!==0&&(Re(ee.map(Number)),ye.current=requestAnimationFrame(Se))};return Object.keys(de.current).length>0&&(ye.current=requestAnimationFrame(Se)),()=>{cancelAnimationFrame(ye.current),ge.disconnect()}},[v,N,_]),s.useLayoutEffect(()=>{if(!R)return;const he=I.current,Re=A.current;if(!he||!Re)return;const ge={current:0},ye=()=>{const ce=he.getBoundingClientRect().width||he.offsetWidth,ue=Jg(Re),Te=re.current,ke=typeof Te=="number"&&Math.abs(Te-ue)<=.25;re.current=ue;let Ce=F,U=0;if((D||n)&&T>0&&ce>0){const K=gl(Re,T);if(K>=qg){U=K;const z=Math.min(Xg,Math.max(ya,Math.ceil(ce/K)+1));Ce=z,z!==F&&O(z)}}const me=Ce!==F&&U>0?U*Ce:ue>0?ue:U>0?U*Ce:(()=>{const K=gl(Re,T);return K>0?K*Ce:0})();me>0?d(K=>K<=0?me:!ke||Math.round(K)===Math.round(me)?K:me):!ke&&l<=0&&(cancelAnimationFrame(ge.current),ge.current=requestAnimationFrame(ye))},Se=()=>{cancelAnimationFrame(ge.current),ge.current=requestAnimationFrame(ye)};S.current=Se,Se();const ee=new ResizeObserver(Se);return ee.observe(he),ee.observe(Re),()=>{S.current=null,cancelAnimationFrame(ge.current),ee.disconnect()}},[D,R,l,$,F,T,n]),s.useLayoutEffect(()=>{if(!R||c<=0)return;const he=J.current;he&&Ug(he)},[R,c,x,m]),s.useLayoutEffect(()=>{if(!R||l<=0){q(0);return}const he=J.current,Re=A.current;if(!he||!Re)return;const ge=()=>{const Se=he.offsetHeight||he.getBoundingClientRect().height,ee=Array.from(Re.children).reduce((ue,Te)=>Math.max(ue,Te.offsetHeight||Te.getBoundingClientRect().height),0),ce=Se>0?Se:ee;q(ce>0?ce:0)};ge();const ye=new ResizeObserver(ge);return ye.observe(he),ye.observe(Re),()=>ye.disconnect()},[R,ne,te,n,g,h,f,l,y,N]),s.useLayoutEffect(()=>{if(!n||!W||!R||typeof window>"u")return;const he=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(he)},[n,W,R,x,l,Q,g,te]);const ae=()=>{Y&&L(!0)},Z=()=>{Y&&L(!1)},B=s.useCallback(()=>{var he;M.current=Math.min(xe,M.current+1),(he=S.current)==null||he.call(S)},[xe]),G=s.useCallback((he,Re)=>{V(ge=>{const ye=ge[he]??Re,Se=(t??[]).filter(ce=>ce!==ye);if(Se.length===0)return ge;const ee=Se[Math.floor(Math.random()*Se.length)];return{...ge,[he]:ee}})},[t]),$e=(he,Re,ge,ye)=>{const Se=_&&v==="randomize"&&y.display==="cover"?N[ge]??he:he,ee=`max(${E(g)}, ${Gg}px)`,ce=`calc(-0.5 * (${ee} + ${E(g)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":ge,onMouseEnter:_&&v==="randomize"&&y.display==="cover"?()=>G(ge,he):void 0,children:[a.jsx(ih,{item:Se,prefix:r,imageFit:y,imageMaxWidth:h,imageMaxHeight:f,cornerRadius:C,imageHoverClass:X,isEditor:n,isFirstSet:ye,scaled:E,onFirstSetImageDone:B}),W&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:ce,width:ee,height:"100%"}})]},`${Re}-${ge}`)};if(R){const he=D?Y&&oe?"paused":"running":"paused",Re=c>0&&m>0?c/m*1e3:0,ge=`${Math.max(0,Re)/1e3}s`;return a.jsxs("div",{ref:I,className:pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:Q>0?{height:Q}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:J,className:`${r}-marquee-track`,"data-direction":x,onMouseEnter:ae,onMouseLeave:Z,style:{WebkitAnimationDuration:ge,animationDuration:ge,WebkitAnimationPlayState:he,animationPlayState:he},children:Array.from({length:ne},(ye,Se)=>a.jsx("div",{ref:Se===0?A:void 0,className:pt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:E(g),paddingRight:E(g)},"aria-hidden":Se>0,children:te.map((ee,ce)=>$e(ee,Se,ce,Se===0&&ce<T))},`set-${Se}`))})]})}return a.jsxs("div",{ref:I,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:pt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:E(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((he,Re)=>$e(he,0,Re))},"marquee-static")]})},rh=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1692
+ `}const qg=30,Yg=20,va=3,Ug=12,Kg=32,Zg=3,Jg=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")},Qg=(e,t)=>Array.from({length:t},()=>e).flat(),eh=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},bd=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),vl=(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),r=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,p)=>e.children[p]),c=bd(d);return c<=0?0:c+r*Math.max(0,t-1)},th=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=bd(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},nh=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},ih=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>nh(i,e))},oh=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??"")},rh=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ah=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var P,E,g,z;const p=s.useRef(null),v=!!((P=e.image)!=null&&P.url&&oh(e.image));s.useLayoutEffect(()=>{d&&rh(p.current)&&(u==null||u())},[d,(E=e.image)==null?void 0:E.url,u]);const w=n.display==="cover",m=n.ratioValue??"1:1",h=n.reversed??!1,[f,x]=m.split(":").map(Number),S=(h?x:f)/(h?f:x),B=i/S,N=B>o?o:B,q=B>o?o*S:i,D=c(q),T=c(N),H={borderRadius:c(r)},$=w?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...H}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...H},I=((g=e.image)==null?void 0:g.url)&&(v?a.jsx("video",{ref:F=>{p.current=F},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):a.jsx("img",{ref:F=>{p.current=F},src:e.image.url,alt:((z=e.image)==null?void 0:z.name)??"",style:$,onLoad:d?u:void 0,onError:d?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...w?{width:D}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...w?{width:D,height:T,overflow:"hidden",...H}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:I&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:pt(`${t}-marquee-link`,!w&&`${t}-marquee-link-contain`),children:I}):I})})},sh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=W.useScopedStyles(),[l,d]=s.useState(0),c=l>0?Math.round(l):0,u=s.useMemo(()=>Xg(r,c),[r,c]),{speed:p,direction:v,pauseOnHover:w,gap:m,imageMaxWidth:h,imageMaxHeight:f,hoverEffect:x,cornerRadius:C=0}=e,y=s.useMemo(()=>eh(e.imageFit),[e.imageFit]),S=(t==null?void 0:t.length)??0,B=!!o,N=!n||!!i,q=N&&x!=="off"&&x!=="randomize"?`${r}-image-hover-${x}`:void 0,D=n?!!i:!0,H=((t==null?void 0:t.length)??0)>0&&(D||!!n),$=Math.max(0,p)*qg,I=ve=>W.scalingValue(ve,n??!1),P=s.useRef(null),E=s.useRef(null),g=s.useRef(null),[z,F]=s.useState(0),X=D&&w==="on",[ie,L]=s.useState(!1),[_,V]=s.useState({}),ae=s.useRef(_);ae.current=_;const re=s.useRef(null),M=s.useRef(0),se=s.useRef(null),j=s.useMemo(()=>(t??[]).map(ve=>{var Ie;return((Ie=ve.image)==null?void 0:Ie.url)??""}).join("\0"),[t]),[b,k]=s.useState(va),G=s.useMemo(()=>{const ve=t??[];return ve.length===0||!(D||!!n)?ve:Qg(ve,b)},[t,D,b,n]),he=s.useMemo(()=>(t??[]).filter(ve=>{var Ie;return!!((Ie=ve.image)!=null&&Ie.url)}).length,[t]),J=H?Zg:1;s.useLayoutEffect(()=>{M.current=0,V({}),re.current=null,k(va),d(0)},[j]),s.useEffect(()=>{if(!N||x!=="randomize")return;const ve=P.current;if(!ve)return;const Ie=U=>{V(ce=>{const le=Array.from(U).filter(Fe=>Fe in ce&&!ih(ve,Fe));if(le.length===0)return ce;const Ce={...ce};return le.forEach(Fe=>{delete Ce[Fe]}),Ce})},pe=new IntersectionObserver(U=>{const ce=new Set;for(const le of U){const Ce=le.target.dataset.marqueeItemIndex,Fe=Ce!==void 0?Number(Ce):NaN;Number.isNaN(Fe)||ce.add(Fe)}ce.size>0&&Ie(ce)},{root:ve,threshold:0});Object.keys(_).forEach(U=>{const ce=Number(U);ve.querySelectorAll(`[data-marquee-item-index="${ce}"]`).forEach(le=>pe.observe(le))});const oe={current:0},ye=()=>{const U=Object.keys(ae.current);U.length!==0&&(Ie(U.map(Number)),oe.current=requestAnimationFrame(ye))};return Object.keys(ae.current).length>0&&(oe.current=requestAnimationFrame(ye)),()=>{cancelAnimationFrame(oe.current),pe.disconnect()}},[x,_,N]),s.useLayoutEffect(()=>{if(!H)return;const ve=P.current,Ie=g.current;if(!ve||!Ie)return;const pe={current:0},oe=()=>{const ce=ve.getBoundingClientRect().width||ve.offsetWidth,le=th(Ie),Ce=re.current,Fe=typeof Ce=="number"&&Math.abs(Ce-le)<=.25;re.current=le;let Ee=b,Y=0;if((D||n)&&S>0&&ce>0){const K=vl(Ie,S);if(K>=Kg){Y=K;const ue=Math.min(Ug,Math.max(va,Math.ceil(ce/K)+1));Ee=ue,ue!==b&&k(ue)}}const de=Ee!==b&&Y>0?Y*Ee:le>0?le:Y>0?Y*Ee:(()=>{const K=vl(Ie,S);return K>0?K*Ee:0})();de>0?d(K=>K<=0?de:!Fe||Math.round(K)===Math.round(de)?K:de):!Fe&&l<=0&&(cancelAnimationFrame(pe.current),pe.current=requestAnimationFrame(oe))},ye=()=>{cancelAnimationFrame(pe.current),pe.current=requestAnimationFrame(oe)};se.current=ye,ye();const U=new ResizeObserver(ye);return U.observe(ve),U.observe(Ie),()=>{se.current=null,cancelAnimationFrame(pe.current),U.disconnect()}},[D,H,l,j,b,S,n]),s.useLayoutEffect(()=>{if(!H||c<=0)return;const ve=E.current;ve&&Jg(ve)},[H,c,v,$]),s.useLayoutEffect(()=>{if(!H||l<=0){F(0);return}const ve=E.current,Ie=g.current;if(!ve||!Ie)return;const pe=()=>{const ye=ve.offsetHeight||ve.getBoundingClientRect().height,U=Array.from(Ie.children).reduce((le,Ce)=>Math.max(le,Ce.offsetHeight||Ce.getBoundingClientRect().height),0),ce=ye>0?ye:U;F(ce>0?ce:0)};pe();const oe=new ResizeObserver(pe);return oe.observe(ve),oe.observe(Ie),()=>oe.disconnect()},[H,J,G,n,m,h,f,l,y,_]),s.useLayoutEffect(()=>{if(!n||!B||!H||typeof window>"u")return;const ve=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(ve)},[n,B,H,v,l,z,m,G]);const ee=()=>{X&&L(!0)},O=()=>{X&&L(!1)},Z=s.useCallback(()=>{var ve;M.current=Math.min(he,M.current+1),(ve=se.current)==null||ve.call(se)},[he]),te=s.useCallback((ve,Ie)=>{V(pe=>{const oe=pe[ve]??Ie,ye=(t??[]).filter(ce=>ce!==oe);if(ye.length===0)return pe;const U=ye[Math.floor(Math.random()*ye.length)];return{...pe,[ve]:U}})},[t]),Le=(ve,Ie,pe,oe)=>{const ye=N&&x==="randomize"&&y.display==="cover"?_[pe]??ve:ve,U=`max(${I(m)}, ${Yg}px)`,ce=`calc(-0.5 * (${U} + ${I(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":pe,onMouseEnter:N&&x==="randomize"&&y.display==="cover"?()=>te(pe,ve):void 0,children:[a.jsx(ah,{item:ye,prefix:r,imageFit:y,imageMaxWidth:h,imageMaxHeight:f,cornerRadius:C,imageHoverClass:q,isEditor:n,isFirstSet:oe,scaled:I,onFirstSetImageDone:Z}),B&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:ce,width:U,height:"100%"}})]},`${Ie}-${pe}`)};if(H){const ve=D?X&&ie?"paused":"running":"paused",Ie=c>0&&$>0?c/$*1e3:0,pe=`${Math.max(0,Ie)/1e3}s`;return a.jsxs("div",{ref:P,className:pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:z>0?{height:z}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:E,className:`${r}-marquee-track`,"data-direction":v,onMouseEnter:ee,onMouseLeave:O,style:{WebkitAnimationDuration:pe,animationDuration:pe,WebkitAnimationPlayState:ve,animationPlayState:ve},children:Array.from({length:J},(oe,ye)=>a.jsx("div",{ref:ye===0?g:void 0,className:pt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:I(m),paddingRight:I(m)},"aria-hidden":ye>0,children:G.map((U,ce)=>Le(U,ye,ce,ye===0&&ce<S))},`set-${ye}`))})]})}return a.jsxs("div",{ref:P,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:pt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:I(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((ve,Ie)=>Le(ve,0,Ie))},"marquee-static")]})},lh=`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
- `,ah={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:""}]}},sh={element:oh,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:ah,sourceCode:rh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function lh(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2475
+ `,ch={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:""}]}},dh={element:sh,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:ch,sourceCode:lh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function uh(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2476
2476
  .${e}-item-image-wrap {
2477
2477
  display: flex;
2478
2478
  flex: 0 0 auto;
@@ -2601,7 +2601,7 @@ ${o}
2601
2601
  left: -9999px;
2602
2602
  top: 0;
2603
2603
  }
2604
- `}const ch=30,va=3,dh=12,uh=3,ts=.72,ph=100,mh=10,gh=e=>Math.max(0,e)/ph,hh=e=>Math.max(0,e)/mh,fh=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")},yh=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),Ei={ctx:void 0},vh=()=>Ei.ctx!==void 0?Ei.ctx:typeof document>"u"?(Ei.ctx=null,Ei.ctx):(Ei.ctx=document.createElement("canvas").getContext("2d"),Ei.ctx),xh=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},bh=e=>{e.style.transform=""},wh=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},Sh=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},$h=96,Ch=(e,t,n)=>{if(t<=0||e<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,d=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),c=i/n;return Array.from({length:n},(u,p)=>{const x=p*c,b=x+c;o[p+1]=b,r[p+1]=r[p]+(d(x)+d(b))*.5*c}),{wavelength:i,periodArc:r[n],x:o,s:r}},Th=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:d}=e,c=(g,h)=>{if(h-g<=1)return[g,h];const f=g+h>>1;return l[f]<=r?c(f,h):c(g,f)},[u,p]=c(0,l.length-1),x=l[p]-l[u],b=x>0?(r-l[u])/x:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*b)},Ih=(e,t,n,i)=>{const o=Math.max(0,n),r=e>0?2*Math.PI*o/e:0,l=p=>i+t*Math.sin(r*p),d=p=>t*r*Math.cos(r*p),c=Math.max(4,Math.ceil(o*4)),u=Array.from({length:c},(p,x)=>{const b=x/c*e,g=(x+1)/c*e,h=g-b,f=l(b),v=l(g),C=b+h/3,y=f+d(b)*h/3,T=g-h/3,W=v-d(g)*h/3;return`C${C.toFixed(2)} ${y.toFixed(2)} ${T.toFixed(2)} ${W.toFixed(2)} ${g.toFixed(2)} ${v.toFixed(2)}`});return[`M0 ${l(0).toFixed(2)}`,...u].join(" ")},Rh=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var g;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ts}em`},u=((g=e.image)==null?void 0:g.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),x=l?a.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,f)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},f))}):a.jsx("span",{className:`${t}-text`,style:d,children:e.text}),b=a.jsxs(a.Fragment,{children:[p,x]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:b}):b})},Lh=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=H.useScopedStyles(),[r,l]=s.useState(0),d=r>0?Math.round(r):0,{speed:c,direction:u,pauseOnHover:p,gap:x,layoutType:b,curveAmplitude:g,curveFrequency:h,textFontFamily:f,textFontSettings:v,textFontSize:C,textLineHeight:y,textLetterSpacing:T,textWordSpacing:W,textTextAppearance:_,textColor:X,backgroundColor:D,ribbonWidth:w}=e,R=w??y,m=b==="curve",E=gh(g),I=hh(h),J=s.useMemo(()=>lh(o,d,m),[o,d,m]),A=s.useMemo(()=>Yt({fontSettings:{fontFamily:f,fontWeight:v.fontWeight,fontStyle:v.fontStyle},letterSpacing:T,wordSpacing:W,fontSize:C,lineHeight:y,textAppearance:_,color:X},n),[f,v,T,W,C,y,_,X,n]),Q=pe=>H.scalingValue(pe,n??!1),q=((t==null?void 0:t.length)??0)>0,Y=n?!!i:!0,oe=q&&(Y||!!n),L=Math.max(0,c)*ch,N=Y&&p==="on",[V,de]=s.useState(!1),re=Y?N&&V?"paused":"running":"paused",M=re==="running"&&L>0&&d>0,S=s.useRef(null),$=s.useRef(null),F=s.useRef(null),O=s.useRef(null),te=s.useRef(null),xe=s.useRef(null),ne=s.useRef(M),ae=s.useRef(null);ne.current=M;const[Z,B]=s.useState(0),[G,$e]=s.useState(0),[he,Re]=s.useState(0),[ge,ye]=s.useState(0),[Se,ee]=s.useState(0),ce=s.useMemo(()=>(t??[]).map(pe=>{var we;return`${pe.text}\0${((we=pe.image)==null?void 0:we.url)??""}`}).join("\0"),[t]),[ue,Te]=s.useState(va),ke=s.useMemo(()=>{const pe=t??[];return pe.length===0||!(Y||n)?pe:yh(pe,ue)},[t,Y,ue,n]),Ce=oe?uh:1;s.useLayoutEffect(()=>{Te(va),l(0)},[ce]),s.useLayoutEffect(()=>{var Ze;const pe=xe.current;if(!pe)return;const we=()=>{const Ge=getComputedStyle(pe),st=parseFloat(Ge.fontSize)||0;if(st<=0)return;const Qe=vh();if(!Qe){B(st*ts),$e(0);return}Qe.font=`${Ge.fontStyle} ${Ge.fontWeight} ${st}px ${Ge.fontFamily}`;const Fe=Qe.measureText("H"),qe=Fe.actualBoundingBoxAscent>0?Fe.actualBoundingBoxAscent:st*ts,He=Math.max(0,Fe.actualBoundingBoxDescent||0),nt=Fe.fontBoundingBoxAscent||0,at=Fe.fontBoundingBoxDescent||0;B(Tt=>Math.abs(Tt-qe)>.5?qe:Tt);const dt=nt>0||at>0?(at-He-(nt-qe))/2:0;$e(Tt=>Math.abs(Tt-dt)>.25?dt:Tt)};we();const Ae=typeof document<"u"?document.fonts:void 0;(Ze=Ae==null?void 0:Ae.ready)==null||Ze.then(we).catch(()=>{});const Xe=new ResizeObserver(we);return Xe.observe(pe),()=>Xe.disconnect()},[A.fontFamily,A.fontWeight,A.fontStyle,A.fontSize,A.lineHeight]),s.useLayoutEffect(()=>{if(!oe)return;const pe=S.current,we=O.current;if(!pe||!we)return;const Ae={id:0},Xe=()=>{const Ge=pe.offsetWidth||pe.getBoundingClientRect().width,st=we.offsetWidth||we.getBoundingClientRect().width;if(q&&Ge>0&&st>0){const Qe=st/ue;if(Qe>0){const Fe=Math.min(dh,Math.max(va,Math.ceil(Ge/Qe)+1));if(Fe!==ue){Te(Fe);return}}}st>0&&l(st)};Ae.id=requestAnimationFrame(Xe);const Ze=new ResizeObserver(()=>{cancelAnimationFrame(Ae.id),Ae.id=requestAnimationFrame(Xe)});return Ze.observe(pe),Ze.observe(we),()=>{cancelAnimationFrame(Ae.id),Ze.disconnect()}},[oe,ce,ue,q,Z]),s.useLayoutEffect(()=>{const pe=te.current;if(!pe)return;const we={id:0},Ae=()=>{const Ze=pe.offsetHeight;Ze>0&&ee(Ge=>Math.abs(Ge-Ze)>.5?Ze:Ge)};we.id=requestAnimationFrame(Ae);const Xe=new ResizeObserver(()=>{cancelAnimationFrame(we.id),we.id=requestAnimationFrame(Ae)});return Xe.observe(pe),()=>{cancelAnimationFrame(we.id),Xe.disconnect()}},[R,n]),s.useLayoutEffect(()=>{if(!m){Re(0),ye(0);return}const pe=S.current,we=O.current;if(!pe||!we)return;const Ae={id:0},Xe=()=>{const Ge=pe.offsetWidth,st=we.offsetHeight;Ge>0&&ye(Qe=>Math.abs(Qe-Ge)>.5?Ge:Qe),st>0&&Re(Qe=>Math.abs(Qe-st)>.5?st:Qe)};Ae.id=requestAnimationFrame(Xe);const Ze=new ResizeObserver(()=>{cancelAnimationFrame(Ae.id),Ae.id=requestAnimationFrame(Xe)});return Ze.observe(pe),Ze.observe(we),()=>{cancelAnimationFrame(Ae.id),Ze.disconnect()}},[m,ce,Z,y,C,oe]),s.useLayoutEffect(()=>{if(!oe||d<=0)return;const pe=F.current;pe&&fh(pe)},[oe,d,u,L]),s.useLayoutEffect(()=>{if(!m||!q)return;const pe=S.current;if(!pe)return;const we={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Ae=()=>{for(const Fe of we.itemsCache)for(const qe of Fe.glyphs)bh(qe.inner)},Xe=()=>{const Fe=$.current??pe;we.itemsCache=Array.from(pe.querySelectorAll("[data-marquee-text-item]"),qe=>{const He=[];return qe.querySelectorAll("[data-marquee-wave-node]").forEach(nt=>{const at=nt.firstElementChild;at&&He.push({inner:at,layoutLocalX:Sh(nt,Fe)})}),{item:qe,glyphs:He}}),we.cacheDirty=!1},Ze=()=>{we.cacheDirty&&Xe();const qe=($.current??pe).offsetWidth||1,He=qe*E,nt=2*Math.PI*I/qe,at=`${qe}|${He}|${nt}`;at!==we.lutKey&&(we.lutKey=at,we.lut=Ch(He,nt,$h));const dt=F.current,Tt=dt?wh(getComputedStyle(dt).transform):0,qt=pe.getBoundingClientRect(),Zt=qt.left,xt=qt.right,wt=we.lut&&we.lut.wavelength>0?Math.max(0,(we.lut.periodArc/we.lut.wavelength-1)*qe):0;for(const{item:Bt,glyphs:At}of we.itemsCache){const vt=Bt.getBoundingClientRect();if(!(vt.right<Zt||vt.left>xt+wt))for(const Ft of At){const Nt=Ft.layoutLocalX+Tt,Ut=we.lut?Th(we.lut,Nt):Nt,Jt=nt*Ut,Ct=He*Math.sin(Jt),Wt=He*nt*Math.cos(Jt),rn=Math.atan(Wt)*(180/Math.PI);xh(Ft.inner,Ut-Nt,Ct,rn)}}},Ge=()=>{we.cancelled||(we.raf=0,Ze(),ne.current&&!document.hidden&&(we.raf=requestAnimationFrame(Ge)))},st=()=>{we.cancelled||we.raf||(we.raf=requestAnimationFrame(Ge))};ae.current=st,st();const Qe=()=>{if(document.hidden){cancelAnimationFrame(we.raf),we.raf=0;return}st()};return document.addEventListener("visibilitychange",Qe),()=>{we.cancelled=!0,ae.current=null,cancelAnimationFrame(we.raf),document.removeEventListener("visibilitychange",Qe),Ae()}},[m,E,I,q,r,ce,ue,Z]),s.useLayoutEffect(()=>{var pe;(pe=ae.current)==null||pe.call(ae)},[M]);const U=()=>{N&&de(!0)},fe=()=>{N&&de(!1)},me=m?E*100:0,K=Q(R),z={minHeight:K,...m?{paddingTop:`${me}%`,paddingBottom:`${me}%`}:{}},be={height:K,...m?{visibility:"hidden"}:{backgroundColor:D}},se={gap:Q(x),minHeight:K},j=ge*E,_e=Se>0?Se:he,We=Math.max(he,_e),lt=m&&ge>0&&We>0?Ih(ge,j,I,j+We/2):"",Je=j*2+We,ct=lt?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${ge} ${Je}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:lt,fill:"none",stroke:D,strokeWidth:_e,strokeLinecap:"round",strokeLinejoin:"round"})}):null,it=a.jsx("div",{ref:te,className:`${o}-ribbon`,style:be,"aria-hidden":!0}),Ve=(pe,we,Ae)=>a.jsx(Rh,{item:pe,prefix:o,textCss:A,capHeightPx:Z,opticalOffsetY:G,imageGapPx:Q(x),isCurve:m},`${we}-${Ae}`),Ie=a.jsx("span",{ref:xe,"aria-hidden":!0,className:`${o}-cap-ref`,style:A,children:"H"}),Ne=d>0&&L>0?d/L*1e3:0,Oe=`${Math.max(0,Ne)/1e3}s`,Ue=oe?a.jsx("div",{ref:F,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:U,onMouseLeave:fe,style:{WebkitAnimationDuration:Oe,animationDuration:Oe,WebkitAnimationPlayState:re,animationPlayState:re},children:Array.from({length:Ce},(pe,we)=>a.jsx("div",{ref:we===0?O:void 0,className:`${o}-marquee-set`,style:{...se,paddingRight:Q(x)},"aria-hidden":we>0,children:ke.map((Ae,Xe)=>Ve(Ae,we,Xe))},`set-${we}`))}):a.jsx("div",{ref:O,className:pt(`${o}-marquee-set`,`${o}-marquee-static`),style:se,children:t==null?void 0:t.map((pe,we)=>Ve(pe,0,we))});return a.jsxs("div",{ref:S,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:J}}),Ie,a.jsxs("div",{ref:$,className:`${o}-marquee-wrapper`,style:z,children:[it,ct,Ue]})]})},Ph=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2604
+ `}const ph=30,xa=3,mh=12,gh=3,ts=.72,hh=100,fh=10,yh=e=>Math.max(0,e)/hh,vh=e=>Math.max(0,e)/fh,xh=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")},bh=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),ki={ctx:void 0},wh=()=>ki.ctx!==void 0?ki.ctx:typeof document>"u"?(ki.ctx=null,ki.ctx):(ki.ctx=document.createElement("canvas").getContext("2d"),ki.ctx),Sh=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},Ch=e=>{e.style.transform=""},$h=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},Th=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},Ih=96,Rh=(e,t,n)=>{if(t<=0||e<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,d=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),c=i/n;return Array.from({length:n},(u,p)=>{const v=p*c,w=v+c;o[p+1]=w,r[p+1]=r[p]+(d(v)+d(w))*.5*c}),{wavelength:i,periodArc:r[n],x:o,s:r}},Lh=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:d}=e,c=(m,h)=>{if(h-m<=1)return[m,h];const f=m+h>>1;return l[f]<=r?c(f,h):c(m,f)},[u,p]=c(0,l.length-1),v=l[p]-l[u],w=v>0?(r-l[u])/v:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*w)},Ph=(e,t,n,i)=>{const o=Math.max(0,n),r=e>0?2*Math.PI*o/e:0,l=p=>i+t*Math.sin(r*p),d=p=>t*r*Math.cos(r*p),c=Math.max(4,Math.ceil(o*4)),u=Array.from({length:c},(p,v)=>{const w=v/c*e,m=(v+1)/c*e,h=m-w,f=l(w),x=l(m),C=w+h/3,y=f+d(w)*h/3,S=m-h/3,B=x-d(m)*h/3;return`C${C.toFixed(2)} ${y.toFixed(2)} ${S.toFixed(2)} ${B.toFixed(2)} ${m.toFixed(2)} ${x.toFixed(2)}`});return[`M0 ${l(0).toFixed(2)}`,...u].join(" ")},Eh=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ts}em`},u=((m=e.image)==null?void 0:m.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),v=l?a.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,f)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},f))}):a.jsx("span",{className:`${t}-text`,style:d,children:e.text}),w=a.jsxs(a.Fragment,{children:[p,v]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:w}):w})},Mh=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=W.useScopedStyles(),[r,l]=s.useState(0),d=r>0?Math.round(r):0,{speed:c,direction:u,pauseOnHover:p,gap:v,layoutType:w,curveAmplitude:m,curveFrequency:h,textFontFamily:f,textFontSettings:x,textFontSize:C,textLineHeight:y,textLetterSpacing:S,textWordSpacing:B,textTextAppearance:N,textColor:q,backgroundColor:D,ribbonWidth:T}=e,H=T??y,$=w==="curve",I=yh(m),P=vh(h),E=s.useMemo(()=>uh(o,d,$),[o,d,$]),g=s.useMemo(()=>Ut({fontSettings:{fontFamily:f,fontWeight:x.fontWeight,fontStyle:x.fontStyle},letterSpacing:S,wordSpacing:B,fontSize:C,lineHeight:y,textAppearance:N,color:q},n),[f,x,S,B,C,y,N,q,n]),z=ge=>W.scalingValue(ge,n??!1),F=((t==null?void 0:t.length)??0)>0,X=n?!!i:!0,ie=F&&(X||!!n),L=Math.max(0,c)*ph,_=X&&p==="on",[V,ae]=s.useState(!1),re=X?_&&V?"paused":"running":"paused",M=re==="running"&&L>0&&d>0,se=s.useRef(null),j=s.useRef(null),b=s.useRef(null),k=s.useRef(null),G=s.useRef(null),he=s.useRef(null),J=s.useRef(M),ee=s.useRef(null);J.current=M;const[O,Z]=s.useState(0),[te,Le]=s.useState(0),[ve,Ie]=s.useState(0),[pe,oe]=s.useState(0),[ye,U]=s.useState(0),ce=s.useMemo(()=>(t??[]).map(ge=>{var xe;return`${ge.text}\0${((xe=ge.image)==null?void 0:xe.url)??""}`}).join("\0"),[t]),[le,Ce]=s.useState(xa),Fe=s.useMemo(()=>{const ge=t??[];return ge.length===0||!(X||n)?ge:bh(ge,le)},[t,X,le,n]),Ee=ie?gh:1;s.useLayoutEffect(()=>{Ce(xa),l(0)},[ce]),s.useLayoutEffect(()=>{var we;const ge=he.current;if(!ge)return;const xe=()=>{const $e=getComputedStyle(ge),Xe=parseFloat($e.fontSize)||0;if(Xe<=0)return;const ze=wh();if(!ze){Z(Xe*ts),Le(0);return}ze.font=`${$e.fontStyle} ${$e.fontWeight} ${Xe}px ${$e.fontFamily}`;const Te=ze.measureText("H"),Ve=Te.actualBoundingBoxAscent>0?Te.actualBoundingBoxAscent:Xe*ts,De=Math.max(0,Te.actualBoundingBoxDescent||0),tt=Te.fontBoundingBoxAscent||0,nt=Te.fontBoundingBoxDescent||0;Z(St=>Math.abs(St-Ve)>.5?Ve:St);const st=tt>0||nt>0?(nt-De-(tt-Ve))/2:0;Le(St=>Math.abs(St-st)>.25?st:St)};xe();const _e=typeof document<"u"?document.fonts:void 0;(we=_e==null?void 0:_e.ready)==null||we.then(xe).catch(()=>{});const Ze=new ResizeObserver(xe);return Ze.observe(ge),()=>Ze.disconnect()},[g.fontFamily,g.fontWeight,g.fontStyle,g.fontSize,g.lineHeight]),s.useLayoutEffect(()=>{if(!ie)return;const ge=se.current,xe=k.current;if(!ge||!xe)return;const _e={id:0},Ze=()=>{const $e=ge.offsetWidth||ge.getBoundingClientRect().width,Xe=xe.offsetWidth||xe.getBoundingClientRect().width;if(F&&$e>0&&Xe>0){const ze=Xe/le;if(ze>0){const Te=Math.min(mh,Math.max(xa,Math.ceil($e/ze)+1));if(Te!==le){Ce(Te);return}}}Xe>0&&l(Xe)};_e.id=requestAnimationFrame(Ze);const we=new ResizeObserver(()=>{cancelAnimationFrame(_e.id),_e.id=requestAnimationFrame(Ze)});return we.observe(ge),we.observe(xe),()=>{cancelAnimationFrame(_e.id),we.disconnect()}},[ie,ce,le,F,O]),s.useLayoutEffect(()=>{const ge=G.current;if(!ge)return;const xe={id:0},_e=()=>{const we=ge.offsetHeight;we>0&&U($e=>Math.abs($e-we)>.5?we:$e)};xe.id=requestAnimationFrame(_e);const Ze=new ResizeObserver(()=>{cancelAnimationFrame(xe.id),xe.id=requestAnimationFrame(_e)});return Ze.observe(ge),()=>{cancelAnimationFrame(xe.id),Ze.disconnect()}},[H,n]),s.useLayoutEffect(()=>{if(!$){Ie(0),oe(0);return}const ge=se.current,xe=k.current;if(!ge||!xe)return;const _e={id:0},Ze=()=>{const $e=ge.offsetWidth,Xe=xe.offsetHeight;$e>0&&oe(ze=>Math.abs(ze-$e)>.5?$e:ze),Xe>0&&Ie(ze=>Math.abs(ze-Xe)>.5?Xe:ze)};_e.id=requestAnimationFrame(Ze);const we=new ResizeObserver(()=>{cancelAnimationFrame(_e.id),_e.id=requestAnimationFrame(Ze)});return we.observe(ge),we.observe(xe),()=>{cancelAnimationFrame(_e.id),we.disconnect()}},[$,ce,O,y,C,ie]),s.useLayoutEffect(()=>{if(!ie||d<=0)return;const ge=b.current;ge&&xh(ge)},[ie,d,u,L]),s.useLayoutEffect(()=>{if(!$||!F)return;const ge=se.current;if(!ge)return;const xe={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},_e=()=>{for(const Te of xe.itemsCache)for(const Ve of Te.glyphs)Ch(Ve.inner)},Ze=()=>{const Te=j.current??ge;xe.itemsCache=Array.from(ge.querySelectorAll("[data-marquee-text-item]"),Ve=>{const De=[];return Ve.querySelectorAll("[data-marquee-wave-node]").forEach(tt=>{const nt=tt.firstElementChild;nt&&De.push({inner:nt,layoutLocalX:Th(tt,Te)})}),{item:Ve,glyphs:De}}),xe.cacheDirty=!1},we=()=>{xe.cacheDirty&&Ze();const Ve=(j.current??ge).offsetWidth||1,De=Ve*I,tt=2*Math.PI*P/Ve,nt=`${Ve}|${De}|${tt}`;nt!==xe.lutKey&&(xe.lutKey=nt,xe.lut=Rh(De,tt,Ih));const st=b.current,St=st?$h(getComputedStyle(st).transform):0,Bt=ge.getBoundingClientRect(),zt=Bt.left,ft=Bt.right,wt=xe.lut&&xe.lut.wavelength>0?Math.max(0,(xe.lut.periodArc/xe.lut.wavelength-1)*Ve):0;for(const{item:jt,glyphs:At}of xe.itemsCache){const xt=jt.getBoundingClientRect();if(!(xt.right<zt||xt.left>ft+wt))for(const Ft of At){const Nt=Ft.layoutLocalX+St,Kt=xe.lut?Lh(xe.lut,Nt):Nt,Jt=tt*Kt,Tt=De*Math.sin(Jt),Wt=De*tt*Math.cos(Jt),rn=Math.atan(Wt)*(180/Math.PI);Sh(Ft.inner,Kt-Nt,Tt,rn)}}},$e=()=>{xe.cancelled||(xe.raf=0,we(),J.current&&!document.hidden&&(xe.raf=requestAnimationFrame($e)))},Xe=()=>{xe.cancelled||xe.raf||(xe.raf=requestAnimationFrame($e))};ee.current=Xe,Xe();const ze=()=>{if(document.hidden){cancelAnimationFrame(xe.raf),xe.raf=0;return}Xe()};return document.addEventListener("visibilitychange",ze),()=>{xe.cancelled=!0,ee.current=null,cancelAnimationFrame(xe.raf),document.removeEventListener("visibilitychange",ze),_e()}},[$,I,P,F,r,ce,le,O]),s.useLayoutEffect(()=>{var ge;(ge=ee.current)==null||ge.call(ee)},[M]);const Y=()=>{_&&ae(!0)},be=()=>{_&&ae(!1)},de=$?I*100:0,K=z(H),ue={minHeight:K,...$?{paddingTop:`${de}%`,paddingBottom:`${de}%`}:{}},He={height:K,...$?{visibility:"hidden"}:{backgroundColor:D}},fe={gap:z(v),minHeight:K},Q=pe*I,Je=ye>0?ye:ve,Ne=Math.max(ve,Je),ct=$&&pe>0&&Ne>0?Ph(pe,Q,P,Q+Ne/2):"",Ke=Q*2+Ne,ut=ct?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${pe} ${Ke}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:ct,fill:"none",stroke:D,strokeWidth:Je,strokeLinecap:"round",strokeLinejoin:"round"})}):null,lt=a.jsx("div",{ref:G,className:`${o}-ribbon`,style:He,"aria-hidden":!0}),Ye=(ge,xe,_e)=>a.jsx(Eh,{item:ge,prefix:o,textCss:g,capHeightPx:O,opticalOffsetY:te,imageGapPx:z(v),isCurve:$},`${xe}-${_e}`),Re=a.jsx("span",{ref:he,"aria-hidden":!0,className:`${o}-cap-ref`,style:g,children:"H"}),We=d>0&&L>0?d/L*1e3:0,Be=`${Math.max(0,We)/1e3}s`,Ue=ie?a.jsx("div",{ref:b,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:Y,onMouseLeave:be,style:{WebkitAnimationDuration:Be,animationDuration:Be,WebkitAnimationPlayState:re,animationPlayState:re},children:Array.from({length:Ee},(ge,xe)=>a.jsx("div",{ref:xe===0?k:void 0,className:`${o}-marquee-set`,style:{...fe,paddingRight:z(v)},"aria-hidden":xe>0,children:Fe.map((_e,Ze)=>Ye(_e,xe,Ze))},`set-${xe}`))}):a.jsx("div",{ref:k,className:pt(`${o}-marquee-set`,`${o}-marquee-static`),style:fe,children:t==null?void 0:t.map((ge,xe)=>Ye(ge,0,xe))});return a.jsxs("div",{ref:se,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),Re,a.jsxs("div",{ref:j,className:`${o}-marquee-wrapper`,style:ue,children:[lt,ut,Ue]})]})},kh=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2605
2605
  import cn from 'classnames';
2606
2606
  import { CommonComponentProps } from '../props';
2607
2607
  import { scalingValue } from '../utils/scalingValue';
@@ -3442,7 +3442,7 @@ type MarqueeTextProps = {
3442
3442
  isPreviewMode?: boolean;
3443
3443
  isEditMode?: boolean;
3444
3444
  } & CommonComponentProps;
3445
- `,Eh={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Mh={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"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:0,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Eh.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08,textLineHeight:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07,textLineHeight:.05},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071,textLineHeight:.035}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-input"}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}}},default:[{text:"NEW WORK",image:{url:"https://cdn.cntrl.site/component-assets/marquee_text_icon.svg",name:""},link:""}]}},kh={element:Lh,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:Mh,sourceCode:Ph,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function Ah(e,t){const n=t>0?`${t}px`:"0px";return`
3445
+ `,Ah={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Fh={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"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:0,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ah.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08,textLineHeight:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07,textLineHeight:.05},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071,textLineHeight:.035}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-input"}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}}},default:[{text:"NEW WORK",image:{url:"https://cdn.cntrl.site/component-assets/marquee_text_icon.svg",name:""},link:""}]}},_h={element:Mh,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:Fh,sourceCode:kh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function Nh(e,t){const n=t>0?`${t}px`:"0px";return`
3446
3446
  .${e}-marquee-wrapper {
3447
3447
  overflow: hidden;
3448
3448
  width: 100%;
@@ -3531,7 +3531,7 @@ type MarqueeTextProps = {
3531
3531
  pointer-events: auto;
3532
3532
  z-index: 10;
3533
3533
  }
3534
- `}const Fh=30,hl=2,_h=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")},Nh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=H.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:x,corners:b,stroke:g,strokeColor:h,bgColor:f,padding:v,logoMarginTop:C,logoWidth:y,logoHeight:T,captionMarginTop:W}=e,_=!!o,X=((t==null?void 0:t.length)??0)>0,D=d>0&&(!n||i),w=X&&(D||n),R=Math.max(0,d)*Fh,m=U=>H.scalingValue(U,n??!1),E=s.useRef(null),I=s.useRef(null),J=s.useRef(null),[A,Q]=s.useState(0),[q,Y]=s.useState(0),oe=q>0?q:0,L=s.useMemo(()=>Ah(r,oe),[r,oe]),[N,V]=s.useState(0),de=D&&u==="on",[re,M]=s.useState(!1),S=s.useRef(null),[$,F]=s.useState(0),[O,te]=s.useState(0),xe=s.useRef(null),ne=U=>{var me,K,z,be,se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${U}FontFamily`])??"Arial",fontWeight:((me=e==null?void 0:e[`${U}FontSettings`])==null?void 0:me.fontWeight)??400,fontStyle:((K=e==null?void 0:e[`${U}FontSettings`])==null?void 0:K.fontStyle)??"normal"},textAppearance:{textTransform:((z=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:z.textTransform)??"none",textDecoration:((be=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:be.textDecoration)??"none",fontVariant:((se=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:se.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${U}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${U}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${U}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${U}LineHeight`])??.01,color:(e==null?void 0:e[`${U}Color`])??"#000000"}},ae=ne("text"),Z=ne("caption"),B=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(U=>{var fe,me;return(((fe=U.text)==null?void 0:fe.length)??0)>0||(((me=U.caption)==null?void 0:me.length)??0)>0}),[t]),G=s.useMemo(()=>!w||(t==null?void 0:t.length)===0?1:q<=0||A<=0?hl:Math.max(hl,Math.ceil(A/q)+1),[w,t==null?void 0:t.length,q,A]);s.useLayoutEffect(()=>{if(!w)return;const U=E.current,fe=J.current;if(!U||!fe)return;let me=0;const K=()=>{const se=U.getBoundingClientRect().width,j=fe.getBoundingClientRect().width,_e=xe.current,We=typeof _e=="number"&&Math.abs(_e-j)<=.25;if(xe.current=j,Q(se),typeof j=="number"&&j>0&&q<=0){Y(j);return}We&&j!==q?Y(j):!We&&q<=0&&(cancelAnimationFrame(me),me=requestAnimationFrame(K))},z=()=>{cancelAnimationFrame(me),me=requestAnimationFrame(K)};z();const be=new ResizeObserver(z);return be.observe(U),be.observe(fe),()=>{cancelAnimationFrame(me),be.disconnect()}},[D,w,q]);const $e=oe>0&&R>0?oe/R*1e3:0,he=`${Math.max(0,$e)/1e3}s`;s.useLayoutEffect(()=>{if(!w||oe<=0)return;const U=I.current;U&&_h(U)},[w,oe,c]),s.useLayoutEffect(()=>{if(!w){V(0);return}const U=J.current,fe=I.current;if(!U||!fe)return;const me=()=>{let z=0;for(let be=0;be<U.children.length;be++){const j=U.children[be].firstElementChild;j&&(z=Math.max(z,j.offsetHeight))}z<=0&&(z=fe.offsetHeight),V(z>0?z:0)};me();const K=new ResizeObserver(me);return K.observe(U),K.observe(fe),()=>{K.disconnect()}},[w,G,t,n,p,x,v,g,b,y,T,$,O]);const Re=()=>{de&&M(!0)},ge=()=>{de&&M(!1)},ye=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),Se=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),ee=s.useCallback((U,fe,me,K)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ye,width:"100%"},children:[a.jsx("div",{"data-controls":_?K==null?void 0:K.controlsName:void 0,"data-controls-axis":_?"y":void 0,className:_?`${r}-control`:void 0,style:{height:m((K==null?void 0:K.marginTop)??0)}}),a.jsx("div",{...K!=null&&K.dataMeasureKind?{"data-testimonial-measure":K.dataMeasureKind}:{},style:{...Yt(U,n),textAlign:Se,pointerEvents:"auto",...typeof(K==null?void 0:K.minHeightPx)=="number"&&K.minHeightPx>0?{minHeight:K.minHeightPx}:{}},children:a.jsx(Ti,{content:fe})})]},me),[ye,Se,n,_,r,m]),ce=s.useCallback((U,fe,me)=>{var K,z,be;return a.jsxs("div",{style:{padding:`${m(v.top)} ${m(v.right)} ${m(v.bottom)} ${m(v.left)}`,width:m(x+g*2),height:"100%",borderRadius:m(b),border:`${m(g)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:f}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:ye,textAlign:Se},children:[U.text&&ee(ae,U.text,"text",me!=null&&me.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(me==null?void 0:me.textMinHeightPx)=="number"&&me.textMinHeightPx>0?{minHeightPx:me.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ye,width:"100%"},children:[a.jsx("div",{"data-controls":_&&!(me!=null&&me.dataMeasureAttrs)?"logoMarginTop":void 0,className:_&&!(me!=null&&me.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:m(C)}}),a.jsx("div",{style:{width:m(y),height:m(T)},children:((K=U.logo)==null?void 0:K.url)&&a.jsx("img",{src:U.logo.url,alt:((z=U.logo)==null?void 0:z.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((be=U.logo)==null?void 0:be.objectFit)||"contain"}})})]}),U.caption&&ee(Z,U.caption,"caption",{...me!=null&&me.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:W,...me!=null&&me.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(me==null?void 0:me.captionMinHeightPx)=="number"&&me.captionMinHeightPx>0?{minHeightPx:me.captionMinHeightPx}:{}})]})]},fe)},[f,W,Z,x,b,T,C,y,ye,Se,v.bottom,v.left,v.right,v.top,ee,g,h,ae,n,_,r]),ue=s.useCallback(U=>{F(U.maxTextPx),te(U.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!B){ue({maxTextPx:0,maxCaptionPx:0});return}const U=S.current;if(!U)return;const fe=()=>{H.readTestimonialTextMeasure(U,ue)};fe();const me=new ResizeObserver(fe);return me.observe(U),()=>{me.disconnect()}},[B,ue,t,ce]);const Te=B?{textMinHeightPx:$,captionMinHeightPx:O}:void 0,ke=B?a.jsx("div",{ref:S,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((U,fe)=>ce(U,`measure-${fe}`,{dataMeasureAttrs:!0}))}):null,Ce=(U,fe)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[ce(U,`card-${fe}`,Te),_&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${m(p)})`,width:m(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},fe);if(w){const U=D?de&&re?"paused":"running":"paused";return a.jsxs("div",{ref:E,className:pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...N>0?{height:N}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),ke,a.jsx("div",{ref:I,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:Re,onMouseLeave:ge,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:he,WebkitAnimationDuration:he,animationPlayState:U,WebkitAnimationPlayState:U},children:Array.from({length:G},(fe,me)=>a.jsx("div",{ref:me===0?J:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:m(p),paddingRight:m(p)},"aria-hidden":me>0,children:t==null?void 0:t.map((K,z)=>Ce(K,`${me}-${z}`))},`set-${me}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),ke,a.jsx("div",{style:{gap:m(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((U,fe)=>Ce(U,fe))})]})},Wh=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3534
+ `}const Wh=30,xl=2,Hh=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")},Dh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=W.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:v,corners:w,stroke:m,strokeColor:h,bgColor:f,padding:x,logoMarginTop:C,logoWidth:y,logoHeight:S,captionMarginTop:B}=e,N=!!o,q=((t==null?void 0:t.length)??0)>0,D=d>0&&(!n||i),T=q&&(D||n),H=Math.max(0,d)*Wh,$=Y=>W.scalingValue(Y,n??!1),I=s.useRef(null),P=s.useRef(null),E=s.useRef(null),[g,z]=s.useState(0),[F,X]=s.useState(0),ie=F>0?F:0,L=s.useMemo(()=>Nh(r,ie),[r,ie]),[_,V]=s.useState(0),ae=D&&u==="on",[re,M]=s.useState(!1),se=s.useRef(null),[j,b]=s.useState(0),[k,G]=s.useState(0),he=s.useRef(null),J=Y=>{var de,K,ue,He,fe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Y}FontFamily`])??"Arial",fontWeight:((de=e==null?void 0:e[`${Y}FontSettings`])==null?void 0:de.fontWeight)??400,fontStyle:((K=e==null?void 0:e[`${Y}FontSettings`])==null?void 0:K.fontStyle)??"normal"},textAppearance:{textTransform:((ue=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:ue.textTransform)??"none",textDecoration:((He=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:He.textDecoration)??"none",fontVariant:((fe=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:fe.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${Y}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Y}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${Y}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Y}LineHeight`])??.01,color:(e==null?void 0:e[`${Y}Color`])??"#000000"}},ee=J("text"),O=J("caption"),Z=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(Y=>{var be,de;return(((be=Y.text)==null?void 0:be.length)??0)>0||(((de=Y.caption)==null?void 0:de.length)??0)>0}),[t]),te=s.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:F<=0||g<=0?xl:Math.max(xl,Math.ceil(g/F)+1),[T,t==null?void 0:t.length,F,g]);s.useLayoutEffect(()=>{if(!T)return;const Y=I.current,be=E.current;if(!Y||!be)return;let de=0;const K=()=>{const fe=Y.getBoundingClientRect().width,Q=be.getBoundingClientRect().width,Je=he.current,Ne=typeof Je=="number"&&Math.abs(Je-Q)<=.25;if(he.current=Q,z(fe),typeof Q=="number"&&Q>0&&F<=0){X(Q);return}Ne&&Q!==F?X(Q):!Ne&&F<=0&&(cancelAnimationFrame(de),de=requestAnimationFrame(K))},ue=()=>{cancelAnimationFrame(de),de=requestAnimationFrame(K)};ue();const He=new ResizeObserver(ue);return He.observe(Y),He.observe(be),()=>{cancelAnimationFrame(de),He.disconnect()}},[D,T,F]);const Le=ie>0&&H>0?ie/H*1e3:0,ve=`${Math.max(0,Le)/1e3}s`;s.useLayoutEffect(()=>{if(!T||ie<=0)return;const Y=P.current;Y&&Hh(Y)},[T,ie,c]),s.useLayoutEffect(()=>{if(!T){V(0);return}const Y=E.current,be=P.current;if(!Y||!be)return;const de=()=>{let ue=0;for(let He=0;He<Y.children.length;He++){const Q=Y.children[He].firstElementChild;Q&&(ue=Math.max(ue,Q.offsetHeight))}ue<=0&&(ue=be.offsetHeight),V(ue>0?ue:0)};de();const K=new ResizeObserver(de);return K.observe(Y),K.observe(be),()=>{K.disconnect()}},[T,te,t,n,p,v,x,m,w,y,S,j,k]);const Ie=()=>{ae&&M(!0)},pe=()=>{ae&&M(!1)},oe=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),ye=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),U=s.useCallback((Y,be,de,K)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:oe,width:"100%"},children:[a.jsx("div",{"data-controls":N?K==null?void 0:K.controlsName:void 0,"data-controls-axis":N?"y":void 0,className:N?`${r}-control`:void 0,style:{height:$((K==null?void 0:K.marginTop)??0)}}),a.jsx("div",{...K!=null&&K.dataMeasureKind?{"data-testimonial-measure":K.dataMeasureKind}:{},style:{...Ut(Y,n),textAlign:ye,pointerEvents:"auto",...typeof(K==null?void 0:K.minHeightPx)=="number"&&K.minHeightPx>0?{minHeight:K.minHeightPx}:{}},children:a.jsx(Ri,{content:be})})]},de),[oe,ye,n,N,r,$]),ce=s.useCallback((Y,be,de)=>{var K,ue,He;return a.jsxs("div",{style:{padding:`${$(x.top)} ${$(x.right)} ${$(x.bottom)} ${$(x.left)}`,width:$(v+m*2),height:"100%",borderRadius:$(w),border:`${$(m)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:f}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:oe,textAlign:ye},children:[Y.text&&U(ee,Y.text,"text",de!=null&&de.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(de==null?void 0:de.textMinHeightPx)=="number"&&de.textMinHeightPx>0?{minHeightPx:de.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:oe,width:"100%"},children:[a.jsx("div",{"data-controls":N&&!(de!=null&&de.dataMeasureAttrs)?"logoMarginTop":void 0,className:N&&!(de!=null&&de.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(C)}}),a.jsx("div",{style:{width:$(y),height:$(S)},children:((K=Y.logo)==null?void 0:K.url)&&a.jsx("img",{src:Y.logo.url,alt:((ue=Y.logo)==null?void 0:ue.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((He=Y.logo)==null?void 0:He.objectFit)||"contain"}})})]}),Y.caption&&U(O,Y.caption,"caption",{...de!=null&&de.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:B,...de!=null&&de.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(de==null?void 0:de.captionMinHeightPx)=="number"&&de.captionMinHeightPx>0?{minHeightPx:de.captionMinHeightPx}:{}})]})]},be)},[f,B,O,v,w,S,C,y,oe,ye,x.bottom,x.left,x.right,x.top,U,m,h,ee,n,N,r]),le=s.useCallback(Y=>{b(Y.maxTextPx),G(Y.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!Z){le({maxTextPx:0,maxCaptionPx:0});return}const Y=se.current;if(!Y)return;const be=()=>{W.readTestimonialTextMeasure(Y,le)};be();const de=new ResizeObserver(be);return de.observe(Y),()=>{de.disconnect()}},[Z,le,t,ce]);const Ce=Z?{textMinHeightPx:j,captionMinHeightPx:k}:void 0,Fe=Z?a.jsx("div",{ref:se,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((Y,be)=>ce(Y,`measure-${be}`,{dataMeasureAttrs:!0}))}):null,Ee=(Y,be)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[ce(Y,`card-${be}`,Ce),N&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},be);if(T){const Y=D?ae&&re?"paused":"running":"paused";return a.jsxs("div",{ref:I,className:pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",..._>0?{height:_}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),Fe,a.jsx("div",{ref:P,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:Ie,onMouseLeave:pe,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:ve,WebkitAnimationDuration:ve,animationPlayState:Y,WebkitAnimationPlayState:Y},children:Array.from({length:te},(be,de)=>a.jsx("div",{ref:de===0?E:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":de>0,children:t==null?void 0:t.map((K,ue)=>Ee(K,`${de}-${ue}`))},`set-${de}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),Fe,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((Y,be)=>Ee(Y,be))})]})},Oh=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3535
3535
  import cn from 'classnames';
3536
3536
  import { CommonComponentProps } from '../props';
3537
3537
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4162,7 +4162,7 @@ type TestimonialsSettings = {
4162
4162
  logoHeight: number;
4163
4163
  captionMarginTop: number;
4164
4164
  };
4165
- `,fl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Hh={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:{...fl.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:{...fl.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"}]}]}]}},Dh={element:Nh,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:Hh,sourceCode:Wh,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Oh(e){return`
4165
+ `,bl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Bh={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:{...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"}},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"}}},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"}]}]}]}},zh={element:Dh,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:Bh,sourceCode:Oh,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function jh(e){return`
4166
4166
  .${e}-container {
4167
4167
  position: relative;
4168
4168
  overflow-x: clip;
@@ -4286,7 +4286,7 @@ type TestimonialsSettings = {
4286
4286
  width: 100%;
4287
4287
  height: 100%;
4288
4288
  }
4289
- `}const Bh=3e3,zh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=H.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:x,captionMarginTop:b,imageWidth:g,imageHeight:h,controlsWidth:f,controlsColor:v,controlsHoverColor:C}=e,y=d>0&&(!n||!!i),[T,W]=s.useState(0),[_,X]=s.useState(null),[D,w]=s.useState(!1),R=s.useRef(null),m=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),E=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);s.useEffect(()=>{W(0),X(null),w(!1)},[l.length]);const I=l[T],J=_===null?null:l[_],A=ne=>{var Z,B,G,$e,he;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ne}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((B=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:B.fontStyle)??"normal"},textAppearance:{textTransform:((G=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:G.textTransform)??"none",textDecoration:(($e=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:$e.textDecoration)??"none",fontVariant:((he=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:he.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"}},Q=A("text"),q=A("caption"),Y=l.length>1&&l.some(ne=>{var ae,Z;return(((ae=ne.text)==null?void 0:ae.length)??0)>0||(((Z=ne.caption)==null?void 0:Z.length)??0)>0}),oe=s.useRef(null),[L,N]=s.useState(0),[V,de]=s.useState(0),re=e.controls??{mode:"Off",icon:null},M=l.length>1,S=s.useCallback((ne,ae)=>!M||ae===ne?ne:(R.current&&window.clearTimeout(R.current),X(ne),w(!0),R.current=window.setTimeout(()=>{X(null),w(!1),R.current=null},300),ae),[M]),$=s.useCallback(()=>{M&&W(ne=>S(ne,(ne-1+l.length)%l.length))},[M,S,l.length]),F=s.useCallback(()=>{M&&W(ne=>S(ne,(ne+1)%l.length))},[M,S,l.length]);s.useEffect(()=>{if(!y||!M)return;const ne=Math.max(300,Bh/d),ae=window.setInterval(()=>{W(Z=>S(Z,(Z+1)%l.length))},ne);return()=>{window.clearInterval(ae)}},[y,M,S,l.length,d]),s.useEffect(()=>()=>{R.current&&window.clearTimeout(R.current)},[]);const O=(ne,ae)=>{var he,Re,ge,ye;const Z=ae==null?void 0:ae.textMinHeightPx,B=ae==null?void 0:ae.captionMinHeightPx,G=ae==null?void 0:ae.dataMeasureAttrs,$e=o&&!(ae!=null&&ae.dataMeasureAttrs)&&!(ae!=null&&ae.hideControls);return a.jsxs(a.Fragment,{children:[ne.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:m,width:"100%"},children:[a.jsx("div",{"data-controls":$e?"textMarginTop":void 0,className:$e?`${r}-control`:void 0,style:{height:H.scalingValue(x??0,n??!1)}}),a.jsx("div",{...G&&{"data-testimonial-measure":"text"},style:{...Yt(Q,n),...Z&&Z>0?{minHeight:Z}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Ti,{content:ne.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:m,width:"100%"},children:[a.jsx("div",{"data-controls":$e?"imageMarginTop":void 0,className:$e?`${r}-control`:void 0,style:{height:H.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:H.scalingValue(g??0,n??!1),height:H.scalingValue(h??0,n??!1)},children:((he=ne.image)==null?void 0:he.url)&&a.jsx("img",{src:(Re=ne.image)==null?void 0:Re.url,alt:((ge=ne.image)==null?void 0:ge.name)??"",className:`${r}-icon`,style:{objectFit:((ye=ne.image)==null?void 0:ye.objectFit)||"contain"}})})]}),ne.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:m,width:"100%"},children:[a.jsx("div",{"data-controls":$e?"captionMarginTop":void 0,className:$e?`${r}-control`:void 0,style:{height:H.scalingValue(b??0,n??!1)}}),a.jsx("div",{...G?{"data-testimonial-measure":"caption"}:{},style:{...Yt(q,n),...B&&B>0?{minHeight:B}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Ti,{content:ne.caption})})]})]})},te=s.useCallback(ne=>{N(ne.maxTextPx),de(ne.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!Y){te({maxTextPx:0,maxCaptionPx:0});return}const ne=oe.current;if(!ne)return;const ae=()=>{H.readTestimonialTextMeasure(ne,te)};ae();const Z=new ResizeObserver(ae);return Z.observe(ne),()=>{Z.disconnect()}},[Y,te,t]),!I)return a.jsx(a.Fragment,{});const xe=Y?{textMinHeightPx:L,captionMinHeightPx:V}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Oh(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:H.scalingValue(u??0,n??!1),alignItems:m},children:[Y&&a.jsx("div",{ref:oe,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ne,ae)=>a.jsx("div",{style:{width:"100%"},children:O(ne,{dataMeasureAttrs:!0})},ae))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[J&&D&&a.jsx("div",{className:pt(`${r}-fade-item-prev`,`${r}-fade-out`),children:O(J,{...xe,hideControls:!0})}),a.jsx("div",{className:pt(`${r}-fade-item-current`,D?`${r}-fade-in`:void 0),children:O(I,xe)})]})]}),re.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:H.scalingValue(f??.02,n??!1),height:H.scalingValue(f??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:$,disabled:!M,"aria-label":"Previous testimonial",children:re.icon&&a.jsx(sn,{url:re.icon,fill:v,hoverFill:C,className:pt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:pt(`${r}-arrow`,`${r}-next-arrow`),style:{width:H.scalingValue(f??.02,n??!1),height:H.scalingValue(f??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:F,disabled:!M,"aria-label":"Next testimonial",children:re.icon&&a.jsx(sn,{url:re.icon,fill:v,hoverFill:C,className:`${r}-arrow-img`})})})]})]})})},jh=`import cn from 'classnames';
4289
+ `}const Vh=3e3,Gh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=W.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:v,captionMarginTop:w,imageWidth:m,imageHeight:h,controlsWidth:f,controlsColor:x,controlsHoverColor:C}=e,y=d>0&&(!n||!!i),[S,B]=s.useState(0),[N,q]=s.useState(null),[D,T]=s.useState(!1),H=s.useRef(null),$=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),I=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);s.useEffect(()=>{B(0),q(null),T(!1)},[l.length]);const P=l[S],E=N===null?null:l[N],g=J=>{var O,Z,te,Le,ve;return{fontSettings:{fontFamily:(e==null?void 0:e[`${J}FontFamily`])??"Arial",fontWeight:((O=e==null?void 0:e[`${J}FontSettings`])==null?void 0:O.fontWeight)??400,fontStyle:((Z=e==null?void 0:e[`${J}FontSettings`])==null?void 0:Z.fontStyle)??"normal"},textAppearance:{textTransform:((te=e==null?void 0:e[`${J}TextAppearance`])==null?void 0:te.textTransform)??"none",textDecoration:((Le=e==null?void 0:e[`${J}TextAppearance`])==null?void 0:Le.textDecoration)??"none",fontVariant:((ve=e==null?void 0:e[`${J}TextAppearance`])==null?void 0:ve.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${J}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${J}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${J}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${J}WordSpacing`])??0,color:(e==null?void 0:e[`${J}Color`])??"#000000"}},z=g("text"),F=g("caption"),X=l.length>1&&l.some(J=>{var ee,O;return(((ee=J.text)==null?void 0:ee.length)??0)>0||(((O=J.caption)==null?void 0:O.length)??0)>0}),ie=s.useRef(null),[L,_]=s.useState(0),[V,ae]=s.useState(0),re=e.controls??{mode:"Off",icon:null},M=l.length>1,se=s.useCallback((J,ee)=>!M||ee===J?J:(H.current&&window.clearTimeout(H.current),q(J),T(!0),H.current=window.setTimeout(()=>{q(null),T(!1),H.current=null},300),ee),[M]),j=s.useCallback(()=>{M&&B(J=>se(J,(J-1+l.length)%l.length))},[M,se,l.length]),b=s.useCallback(()=>{M&&B(J=>se(J,(J+1)%l.length))},[M,se,l.length]);s.useEffect(()=>{if(!y||!M)return;const J=Math.max(300,Vh/d),ee=window.setInterval(()=>{B(O=>se(O,(O+1)%l.length))},J);return()=>{window.clearInterval(ee)}},[y,M,se,l.length,d]),s.useEffect(()=>()=>{H.current&&window.clearTimeout(H.current)},[]);const k=(J,ee)=>{var ve,Ie,pe,oe;const O=ee==null?void 0:ee.textMinHeightPx,Z=ee==null?void 0:ee.captionMinHeightPx,te=ee==null?void 0:ee.dataMeasureAttrs,Le=o&&!(ee!=null&&ee.dataMeasureAttrs)&&!(ee!=null&&ee.hideControls);return a.jsxs(a.Fragment,{children:[J.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Le?"textMarginTop":void 0,className:Le?`${r}-control`:void 0,style:{height:W.scalingValue(v??0,n??!1)}}),a.jsx("div",{...te&&{"data-testimonial-measure":"text"},style:{...Ut(z,n),...O&&O>0?{minHeight:O}:{},textAlign:I,pointerEvents:"auto"},children:a.jsx(Ri,{content:J.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Le?"imageMarginTop":void 0,className:Le?`${r}-control`:void 0,style:{height:W.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:W.scalingValue(m??0,n??!1),height:W.scalingValue(h??0,n??!1)},children:((ve=J.image)==null?void 0:ve.url)&&a.jsx("img",{src:(Ie=J.image)==null?void 0:Ie.url,alt:((pe=J.image)==null?void 0:pe.name)??"",className:`${r}-icon`,style:{objectFit:((oe=J.image)==null?void 0:oe.objectFit)||"contain"}})})]}),J.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Le?"captionMarginTop":void 0,className:Le?`${r}-control`:void 0,style:{height:W.scalingValue(w??0,n??!1)}}),a.jsx("div",{...te?{"data-testimonial-measure":"caption"}:{},style:{...Ut(F,n),...Z&&Z>0?{minHeight:Z}:{},textAlign:I,pointerEvents:"auto"},children:a.jsx(Ri,{content:J.caption})})]})]})},G=s.useCallback(J=>{_(J.maxTextPx),ae(J.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!X){G({maxTextPx:0,maxCaptionPx:0});return}const J=ie.current;if(!J)return;const ee=()=>{W.readTestimonialTextMeasure(J,G)};ee();const O=new ResizeObserver(ee);return O.observe(J),()=>{O.disconnect()}},[X,G,t]),!P)return a.jsx(a.Fragment,{});const he=X?{textMinHeightPx:L,captionMinHeightPx:V}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:jh(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:W.scalingValue(u??0,n??!1),alignItems:$},children:[X&&a.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((J,ee)=>a.jsx("div",{style:{width:"100%"},children:k(J,{dataMeasureAttrs:!0})},ee))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[E&&D&&a.jsx("div",{className:pt(`${r}-fade-item-prev`,`${r}-fade-out`),children:k(E,{...he,hideControls:!0})}),a.jsx("div",{className:pt(`${r}-fade-item-current`,D?`${r}-fade-in`:void 0),children:k(P,he)})]})]}),re.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:W.scalingValue(f??.02,n??!1),height:W.scalingValue(f??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:j,disabled:!M,"aria-label":"Previous testimonial",children:re.icon&&a.jsx(sn,{url:re.icon,fill:x,hoverFill:C,className:pt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:pt(`${r}-arrow`,`${r}-next-arrow`),style:{width:W.scalingValue(f??.02,n??!1),height:W.scalingValue(f??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:b,disabled:!M,"aria-label":"Next testimonial",children:re.icon&&a.jsx(sn,{url:re.icon,fill:x,hoverFill:C,className:`${r}-arrow-img`})})})]})]})})},Xh=`import cn from 'classnames';
4290
4290
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4291
4291
  import { CommonComponentProps } from '../props';
4292
4292
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4782,12 +4782,12 @@ type TestimonialsSettings = {
4782
4782
  icon?: string | null;
4783
4783
  };
4784
4784
  };
4785
- `,Vh="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>'),yl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Gh={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:{...yl.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:{...yl.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:Vh},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"}]}]}]}},Xh={element:zh,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:Gh,sourceCode:jh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function qh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function vl(e){return((e==null?void 0:e.trim().length)??0)>0}function xa(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ba(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:H.scalingValue((o-t)/2,i)}}function Yh(e){return`
4785
+ `,qh="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>'),wl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Yh={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:{...wl.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:{...wl.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:qh},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"}]}]}]}},Uh={element:Gh,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:Yh,sourceCode:Xh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Kh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sl(e){return((e==null?void 0:e.trim().length)??0)>0}function ba(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function wa(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:W.scalingValue((o-t)/2,i)}}function Zh(e){return`
4786
4786
  .${e}-wrapper {
4787
4787
  display: grid;
4788
4788
  align-items: start;
4789
4789
  justify-content: center;
4790
- min-height: ${qh(48)};
4790
+ min-height: ${Kh(48)};
4791
4791
  }
4792
4792
  .${e}-item {
4793
4793
  display: flex;
@@ -5129,7 +5129,7 @@ type TestimonialsSettings = {
5129
5129
  z-index: 2;
5130
5130
  width: 100%;
5131
5131
  }
5132
- `}function Uh(){return Math.random()<.5?"ltr":"ttb"}function Kh(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Zh(e){const t=Uh();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Kh(e)})})}const bn=500,Jh=750,zn="cubic-bezier(0.22, 1, 0.36, 1)",Qh=72,ef=50;function tf(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 nf(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function of(e){const[t]=e.media;return t!=null&&t.url?t:null}function yd(e){return!Array.isArray(e)||e.length===0?[]:tf(e)?e.flatMap(t=>{const n=nf(t);if(!n)return[];const i=of(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 Si(e){return e.type==="video"}function rf(e){const t=new Set,n=[];for(const i of e){const o=yd(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function af({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Si(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function sf(e){e.pause(),e.removeAttribute("src"),e.load()}function xl({media:e,className:t,style:n,onMediaClick:i}){return Si(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function bl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function lf(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 r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function cf({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{sf(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function df({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",x=s.useRef(null),b=s.useRef(null),g=s.useRef(null),h=s.useRef(null),f=s.useRef(0),v=s.useRef(0),C=s.useRef("none"),y=s.useRef(!1),T=s.useRef(!1),W=s.useRef(null),_=s.useRef(0),X=s.useRef(null),D=s.useRef(!1),w=s.useRef(null),R=s.useRef(null),m=s.useRef(null),E=s.useRef(()=>{}),[I,J]=s.useState(null),[A,Q]=s.useState(null),[q,Y]=s.useState("opening"),[oe,L]=s.useState(0),[N,V]=s.useState(0),[de,re]=s.useState(null),[M,S]=s.useState(!1),[$,F]=s.useState(!1),[O,te]=s.useState(!1),[xe,ne]=s.useState(null),ae=s.useRef(n),Z=s.useRef(void 0),B=t[n],G=B?Si(B):!1,$e=N!==0||M,he=de!==null,Re=s.useCallback(pe=>{const we=pe.currentTarget,Ae=we instanceof HTMLVideoElement?{width:we.videoWidth,height:we.videoHeight}:{width:we.naturalWidth,height:we.naturalHeight};!Ae.width||!Ae.height||ne(Ae)},[]);s.useEffect(()=>{W.current=A},[A]),s.useEffect(()=>{const pe=x.current;if(!pe)return;const we=()=>Q(bl(pe));we();const Ae=new ResizeObserver(we);return Ae.observe(pe),()=>Ae.disconnect()},[]);const ge=s.useCallback(()=>{w.current!==null&&(window.clearTimeout(w.current),w.current=null)},[]),ye=s.useCallback(()=>{const pe=R.current;R.current=null,ge(),X.current=null,D.current=!1,re(null),S(!1),V(0),_.current=0,F(!1),y.current=!1,v.current=0,C.current="none",pe===1?d():pe===-1&&l()},[ge,d,l]),Se=s.useCallback(()=>{ge(),R.current=null,X.current=null,D.current=!1,re(null),S(!1),V(0),_.current=0},[ge]),ee=s.useCallback(()=>{ge(),w.current=window.setTimeout(()=>{R.current!==null&&ye()},bn+32)},[ge,ye]),ce=s.useCallback((pe,we)=>{var Xe;const Ae=((Xe=W.current)==null?void 0:Xe.width)??0;if(ge(),X.current=pe,re(pe),D.current=!0,S(!0),we){R.current=pe;const Ze=-pe*Ae;_.current=Ze,V(Ze),ee();return}_.current=0,V(0),w.current=window.setTimeout(()=>{w.current=null,Se()},bn+32)},[ge,Se,ee]),ue=s.useCallback(pe=>{if(!(t.length<=1)){if(D.current){if(R.current===pe){m.current=pe,ye();return}Se()}ge(),X.current=pe,re(pe),D.current=!1,S(!1),_.current=0,V(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(pe,!0)})})}},[t.length,ce,ye,Se,ge]);E.current=ue;const Te=s.useCallback(pe=>{pe.propertyName!=="transform"||!D.current||R.current!==null&&ye()},[ye]),ke=s.useCallback(()=>{const pe=b.current;if(!pe)return;const we=bl(pe);!we.width||!we.height||J(we)},[]);s.useEffect(()=>{ke();const pe=b.current;if(!pe)return;const we=new ResizeObserver(()=>ke());return we.observe(pe),()=>we.disconnect()},[ke]),s.useEffect(()=>{q==="opening"&&I&&Y("open")},[q,I]),s.useEffect(()=>{if(q!=="closing")return;const pe=setTimeout(()=>r(),bn);return()=>clearTimeout(pe)},[q,r]),s.useEffect(()=>()=>{ge()},[ge]),s.useLayoutEffect(()=>{ae.current===n&&Z.current===(B==null?void 0:B.url)||(ge(),R.current=null,re(null),L(0),V(0),S(!1),te(!1),F(!1),ne(null),f.current=0,v.current=0,C.current="none",y.current=!1,D.current=!1,_.current=0,X.current=null,h.current=null,T.current=!1,ae.current=n,Z.current=B==null?void 0:B.url)},[n,B==null?void 0:B.url,ge]),s.useLayoutEffect(()=>{const pe=m.current;pe!==null&&(m.current=null,requestAnimationFrame(()=>{E.current(pe)}))},[n,B==null?void 0:B.url]),s.useEffect(()=>{if(q!=="open")return;let pe=null;const we=()=>{pe&&(document.removeEventListener("click",pe,!0),pe=null)},Ae=()=>{we(),pe=Qe=>{Qe.stopPropagation(),Qe.preventDefault(),we()},document.addEventListener("click",pe,!0)},Xe=Qe=>{const Fe=Qe<0?1:-1;if(Math.abs(Qe)>ef&&t.length>1){ce(Fe,!0);return}ce(Fe,!1)},Ze=Qe=>{if(Qe.touches.length!==1||D.current)return;const Fe=Qe.touches[0];T.current=!0,h.current={x:Fe.clientX,y:Fe.clientY},C.current="none",v.current=0,y.current=!1},Ge=Qe=>{if(!h.current||Qe.touches.length!==1||D.current)return;const Fe=Qe.touches[0],qe=Fe.clientX-h.current.x,He=Fe.clientY-h.current.y;if(C.current==="none"){if(Math.abs(qe)<10&&Math.abs(He)<10)return;if(Math.abs(qe)>Math.abs(He)){if(t.length<=1)return;C.current="horizontal"}else if(He>0)C.current="vertical";else return}if(C.current==="horizontal"){y.current=!0,F(!0),v.current=qe;const nt=qe<0?1:-1;X.current!==nt&&(X.current=nt,re(nt)),_.current=qe,V(qe),Qe.preventDefault();return}C.current==="vertical"&&(y.current=!0,F(!0),f.current=He,L(He),Qe.preventDefault())},st=()=>{if(!h.current)return;const Qe=C.current,Fe=y.current;if(Fe&&Qe==="horizontal")Xe(v.current),Ae();else if(Fe&&Qe==="vertical")if(f.current>Qh){const He=window.innerHeight;f.current=He,te(!0),L(He),Y("closing")}else f.current=0,L(0),Ae();else Qe==="horizontal"&&Math.abs(v.current)>0&&(Xe(v.current),Ae());h.current=null,C.current="none",v.current=0,y.current=!1,F(!1)};return document.addEventListener("touchstart",Ze,{passive:!0}),document.addEventListener("touchmove",Ge,{passive:!1}),document.addEventListener("touchend",st),document.addEventListener("touchcancel",st),()=>{document.removeEventListener("touchstart",Ze),document.removeEventListener("touchmove",Ge),document.removeEventListener("touchend",st),document.removeEventListener("touchcancel",st),we()}},[q,t.length,ce]),s.useEffect(()=>{const pe=we=>{we.key==="Escape"&&(we.preventDefault(),we.stopPropagation(),q!=="closing"&&Y("closing"))};return window.addEventListener("keydown",pe,!0),()=>window.removeEventListener("keydown",pe,!0)},[q]);const Ce=()=>{q!=="closing"&&Y("closing")},U=q==="open",fe=q==="closing",me=oe>0?Math.max(0,1-oe/500):1,K=oe>0?Math.max(.35,1-oe/500):1,z=I?p?I:lf(I,xe):null,be=pe=>{if(pe.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const we=z??pe.currentTarget.getBoundingClientRect(),Ae=pe.clientY-we.top,Xe=Math.min(52,we.height*.2);if(!(Ae>we.height-Xe)){if(pe.clientX-we.left<we.width/2){ue(-1);return}ue(1)}},se=pe=>{if(t.length<=1)return;const we=z??pe.currentTarget.getBoundingClientRect(),Ae=pe.clientX-we.left,Xe=pe.clientY-we.top,Ze=Math.min(52,we.height*.2);if(Xe>we.height-Ze){pe.currentTarget.style.cursor="default";return}pe.currentTarget.style.cursor=Ae<we.width/2?"w-resize":"e-resize"},j={position:"fixed",top:A==null?void 0:A.top,left:A==null?void 0:A.left,width:A==null?void 0:A.width,height:A==null?void 0:A.height,zIndex:9998},_e=p?"cover":"contain",We=N!==0||oe>0?`translate(${N}px, ${oe}px)`:void 0,lt=$&&!M?"none":M?`transform ${bn}ms ${zn}`:O?`transform ${bn}ms ${zn}, opacity ${bn}ms ${zn}`:q==="opening"||fe?`opacity ${bn}ms ${zn}`:"none",Je={...j,transform:We,opacity:oe>0?K:q==="opening"||fe?0:1,transition:lt,pointerEvents:"none"},ct={position:"absolute",top:((z==null?void 0:z.top)??0)-((A==null?void 0:A.top)??0),left:((z==null?void 0:z.left)??0)-((A==null?void 0:A.left)??0),width:z==null?void 0:z.width,height:z==null?void 0:z.height,objectFit:_e,pointerEvents:G&&U&&!$e?"auto":"none",touchAction:G&&U?"none":void 0},it=(A==null?void 0:A.width)??0,Ve=he?(n+de+t.length)%t.length:null,Ie=Ve!==null?t[Ve]:null,Ne={...j,transform:he?`translateX(${de*it+N}px)`:void 0,opacity:1,transition:M?`transform ${bn}ms ${zn}`:"none",pointerEvents:"none"},Oe={position:"absolute",top:((I==null?void 0:I.top)??0)-((A==null?void 0:A.top)??0),left:((I==null?void 0:I.left)??0)-((A==null?void 0:A.left)??0),width:I==null?void 0:I.width,height:I==null?void 0:I.height,objectFit:_e,pointerEvents:"none"},Ue=z?{position:"fixed",top:z.top,height:z.height,width:z.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:x,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:q==="open"?"none":void 0},onClick:Ce,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:U?me:0,transition:$?"none":`opacity ${bn}ms ${zn}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:U?1:0,transition:`opacity ${bn}ms ${zn}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:U?1:0,transition:`opacity ${bn}ms ${zn}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),I&&A&&Ie&&a.jsx("div",{style:Ne,onTransitionEnd:Te,children:Si(Ie)?a.jsx("video",{src:Ie.url,muted:!0,playsInline:!0,preload:"auto",style:Oe},`neighbor-${Ve}-${Ie.url}`):a.jsx("img",{src:Ie.url,alt:Ie.name,style:Oe},`neighbor-${Ve}-${Ie.url}`)}),I&&A&&B&&a.jsx("div",{style:Je,onTransitionEnd:Te,children:G?a.jsx(cf,{src:B.url,phase:q,mediaRef:g,mediaStyle:ct,onLoadedMetadata:Re,onClick:be,onMouseMove:se},`${n}-${B.url}`):a.jsx("img",{ref:g,src:B.url,alt:B.name,onLoad:Re,style:ct},`${n}-${B.url}`)}),U&&Ue&&t.length>1&&!G&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ue,left:z.left,cursor:"w-resize",pointerEvents:$?"none":"auto"},onClick:pe=>{if(T.current){T.current=!1;return}pe.stopPropagation(),ue(-1)}}),a.jsx("div",{style:{...Ue,left:z.left+z.width/2,cursor:"e-resize",pointerEvents:$?"none":"auto"},onClick:pe=>{if(T.current){T.current=!1;return}pe.stopPropagation(),ue(1)}})]})]})}function uf(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function pf({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=H.useScopedStyles(),{type:p="a",gridLayout:x,textBoxWidth:b=100,verticalGap:g,entriesCount:h,lightbox:f,imageDisplay:v,imageCorners:C,lightboxImageDisplay:y,slider:T,sliderTiming:W,direction:_,transition:X,titleMarginTop:D,subtitleMarginTop:w,titleColor:R,subtitleColor:m,lightboxCounterColor:E,titleFontFamily:I,titleFontSettings:J,titleFontSize:A,titleLineHeight:Q,titleLetterSpacing:q,titleWordSpacing:Y,titleTextAppearance:oe,subtitleFontFamily:L,subtitleFontSettings:N,subtitleFontSize:V,subtitleLineHeight:de,subtitleLetterSpacing:re,subtitleWordSpacing:M,subtitleTextAppearance:S,lightboxCounterFontFamily:$,lightboxCounterFontSettings:F,lightboxCounterFontSize:O,lightboxCounterLineHeight:te,lightboxCounterLetterSpacing:xe,lightboxCounterWordSpacing:ne,lightboxCounterTextAppearance:ae,showText:Z="always",alignEntries:B="off",align:G="top"}=e,$e={fontSettings:{fontFamily:I,fontWeight:(J==null?void 0:J.fontWeight)??400,fontStyle:(J==null?void 0:J.fontStyle)??"normal"},fontSize:A??.01,lineHeight:Q,letterSpacing:q??0,wordSpacing:Y??0,textAppearance:oe,color:R},Re={...an(Yt($e,n))},ge={fontSettings:{fontFamily:L,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:V??.01,lineHeight:de,letterSpacing:re??0,wordSpacing:M??0,textAppearance:S,color:m},Se={...an(Yt(ge,n))},ee={fontSettings:{fontFamily:$,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:O??.01,lineHeight:te,letterSpacing:xe??0,wordSpacing:ne??0,textAppearance:ae,color:E},ue={...an(Yt(ee,n)),...ba(O,te,u,n)},Te=xa(A,Q,`${u}-item-title`,`${u}-text-tight-leading`),ke=xa(V,de,`${u}-item-subtitle`,`${u}-text-tight-leading`),Ce=ba(A,Q,u,n),U=ba(V,de,u,n),fe=xa(O,te,`${u}-lightbox-counter`,`${u}-text-tight-leading`),me=H.buildColorVars(u,{titleColor:R,subtitleColor:m,lightboxCounterColor:E},mf,gf),be=`${l&&l!=="default"?`${u}-state-${l}`:""}${Z==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),se=h===0?1/0:h,j=(t??[]).slice(0,se),_e=s.useMemo(()=>f==="on"?rf(j):[],[j,f]),We=x.entryWidth??.2,lt=(v==null?void 0:v.display)==="cover",Je=(v==null?void 0:v.ratioValue)??"1:1",ct=(v==null?void 0:v.reversed)??!1,[it,Ve]=Je.split(":").map(Number),Oe=`${ct?Ve:it} / ${ct?it:Ve}`,Ue=x.columnsCount,pe=H.scalingValue(We??0,n),we=pe,Ae=!lt&&T!=="off",Xe=j.length%Ue||Ue,Ze=Xe<Ue&&j.length>0,Ge=j.length-Xe,st=Ze?Math.floor((Ue-Xe)/2)+1:1,Qe=C?H.scalingValue(C,n):void 0,Fe={width:we,...lt?{aspectRatio:Oe,height:"auto",overflow:"hidden"}:{height:"auto"},...Qe?{borderRadius:Qe,overflow:"hidden"}:{}},qe=`${u}-item-image-wrapper${Ae?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),He=p==="d"||p==="e"||p==="f",nt=B==="on",at=`calc(${H.scalingValue(We??0,n)} * (${b} / 100))`,dt=H.scalingValue(We*b/100,n),Tt=lt?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Qe?{borderRadius:Qe}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Qe?{borderRadius:Qe}:{}},[qt,Zt]=s.useState(0),xt=s.useRef(null),wt=X==="fade"||_==="horizontal"?"ltr":_==="vertical"?"ttb":"ltr";s.useEffect(()=>{const gt=xt.current;if(!gt)return;const Ee=new ResizeObserver(ze=>{Zt(Math.round(ze[0].contentRect.width))});return Ee.observe(gt),()=>Ee.disconnect()},[]);const Bt=(()=>{const gt={...me},Ee=xt.current?getComputedStyle(xt.current).getPropertyValue("--cntrl-article-width").trim():"";return Ee&&(gt["--cntrl-article-width"]=Ee),gt})(),[At,vt]=s.useState(!1),[Ft,Nt]=s.useState([]),[Ut,Jt]=s.useState(0),Ct=f==="on"&&(!n||i),Wt=(gt,Ee)=>{n&&!i||f!=="off"&&(Nt(gt),Jt(Ee),vt(!0))};s.useEffect(()=>{if(!At||f!=="on"||typeof document>"u")return;const gt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=gt}},[At,f]),s.useEffect(()=>{!n||i||vt(!1)},[n,i]);const rn=s.useMemo(()=>Yh(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),f==="on"&&a.jsx(af,{mediaList:_e}),a.jsx("div",{style:me,children:a.jsx("div",{ref:xt,className:`${u}-wrapper ${u}-type-${p}${nt?` ${u}-align-entries`:""} ${u}-image-align-${G} ${be}`.trim(),style:{gridTemplateColumns:`repeat(${Ue}, ${pe})`,rowGap:nt?0:H.scalingValue(g??0,n),columnGap:H.scalingValue(x.horizontalGap??0,n),width:H.scalingValue(x.wrapperWidth??0,n),...nt?{[`--${u}-align-entries-row-gap`]:H.scalingValue(g??0,n)}:{}},children:j.map((gt,Ee)=>{var _t;const ze=vl(gt.title),ot=vl(gt.subtitle),ht=(((_t=gt.link)==null?void 0:_t.length)??0)>0&&f==="off"?gt.link:void 0,ft=Math.floor(Ee/Ue)===Math.ceil(j.length/Ue)-1,Lt=Ze&&Ee>=Ge?`${st+(Ee-Ge)}`:void 0,mt=He?a.jsxs("div",{className:`${u}-item-text-block`,children:[ze&&a.jsx("p",{className:Te,style:{width:at,...Re,...Ce},children:gt.title}),ze&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:H.scalingValue(D??0,n),width:dt}}),ot&&a.jsx("p",{className:ke,style:{width:at,...Se,...U},children:gt.subtitle}),ot&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:H.scalingValue(w??0,n),width:dt}})]}):null,zt=nt?a.jsxs("div",{className:`${u}-item-title-row`,children:[!He&&a.jsx("div",{"data-controls":o&&ze?"titleMarginTop":void 0,className:o&&ze?`${u}-control`:void 0,style:{height:ze?H.scalingValue(D??0,n):0,width:dt}}),ze&&a.jsx("p",{className:Te,style:{width:at,...Re,...Ce},children:gt.title}),He&&ze&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:H.scalingValue(D??0,n),width:dt}})]}):null,kt=nt?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!He&&a.jsx("div",{"data-controls":o&&ot?"subtitleMarginTop":void 0,className:o&&ot?`${u}-control`:void 0,style:{height:ot?H.scalingValue(w??0,n):0,width:dt}}),ot&&a.jsx("p",{className:ke,style:{width:at,...Se,...U},children:gt.subtitle}),He&&ot&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:H.scalingValue(w??0,n),width:dt}})]}):null,Mt=ht?a.jsxs("a",{href:ht,target:"_blank",className:`${u}-item-text-link`,children:[zt,kt]}):a.jsxs(a.Fragment,{children:[zt,kt]}),Vt=yd(gt.gallery),Gt=Vt.filter(St=>St.lightboxMedia).map(St=>St.lightboxMedia),Ht=a.jsx("div",{className:qe,style:Fe,children:Vt.length===0?null:T==="off"?(()=>{const{displayMedia:St,lightboxMedia:k}=Vt[0],Le=k?Gt.findIndex(Me=>Me.url===k.url):-1;return a.jsx(xl,{media:St,className:`${u}-item-${Si(St)?"video":"image"}`.trim(),style:Tt,onMediaClick:Ct&&Le>=0?()=>Wt(Gt,Le):void 0})})():a.jsxs(a.Fragment,{children:[Ae&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Vt.map(({displayMedia:St})=>Si(St)?a.jsx("video",{src:St.url,muted:!0,playsInline:!0},`sizer-${St.url}`):a.jsx("img",{src:St.url,alt:""},`sizer-${St.url}`))}),a.jsx(ks,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:W*1e3,width:"100%",height:"100%",speed:Jh,type:X==="fade"?"fade":"loop",rewind:X==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:wt},onMoved:St=>{_!=="random"||X==="fade"||Zh(St)},children:Vt.map(({displayMedia:St,lightboxMedia:k},Le)=>{const Me=k?Gt.findIndex(De=>De.url===k.url):-1;return a.jsx(As,{children:a.jsx(xl,{media:St,className:`${u}-item-${Si(St)?"video":"image"}`.trim(),style:Tt,onMediaClick:Ct&&Me>=0?()=>Wt(Gt,Me):void 0})},Le)})},`${X}-${We}-${_}-${W}-${qt}-${d}`)]})}),Dt=He?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&ze?"titleMarginTop":void 0,className:o&&ze?`${u}-control`:void 0,style:{height:ze?H.scalingValue(D??0,n):0,width:dt}}),a.jsx("p",{className:Te,style:{width:at,...Re,...Ce},children:gt.title}),a.jsx("div",{"data-controls":o&&ot?"subtitleMarginTop":void 0,className:o&&ot?`${u}-control`:void 0,style:{height:ot?H.scalingValue(w??0,n):0,width:dt}}),a.jsx("p",{className:ke,style:{width:at,...Se,...U},children:gt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Lt&&!nt?{gridColumn:Lt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${nt&&ft?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(b??0)>100?`calc(${pe} * (${b} / 100))`:pe,...Lt&&nt?{gridColumn:Lt}:{}},children:nt?a.jsx(a.Fragment,{children:He?a.jsxs(a.Fragment,{children:[Mt,a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:Ht})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:Ht}),Mt]})}):ht?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:[mt,Ht]}),!He&&a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-text-link`,children:Dt})]}):a.jsxs(a.Fragment,{children:[mt,Ht,Dt]})})},Ee)})})}),(!n||i)&&At&&typeof document<"u"&&f==="on"&&(()=>{const gt=(c?document.getElementById(c):null)??document.body;return Bn.createPortal(a.jsx("div",{style:Bt,"data-selection":"none",children:a.jsx(df,{prefix:u,items:Ft,index:Ut,imageDisplay:uf(y),isEditor:n,onClose:()=>vt(!1),onPrev:()=>Jt(Ee=>(Ee-1+Ft.length)%Ft.length),onNext:()=>Jt(Ee=>(Ee+1)%Ft.length),counterClassName:fe,counterStyle:ue})}),gt)})()]})}const mf={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},gf=["hover","focus","filled","success","error"],hf=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5132
+ `}function Jh(){return Math.random()<.5?"ltr":"ttb"}function Qh(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function ef(e){const t=Jh();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Qh(e)})})}const bn=500,tf=750,jn="cubic-bezier(0.22, 1, 0.36, 1)",nf=72,of=50;function rf(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 af(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function sf(e){const[t]=e.media;return t!=null&&t.url?t:null}function wd(e){return!Array.isArray(e)||e.length===0?[]:rf(e)?e.flatMap(t=>{const n=af(t);if(!n)return[];const i=sf(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 $i(e){return e.type==="video"}function lf(e){const t=new Set,n=[];for(const i of e){const o=wd(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function cf({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>$i(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function df(e){e.pause(),e.removeAttribute("src"),e.load()}function Cl({media:e,className:t,style:n,onMediaClick:i}){return $i(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function $l(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function uf(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 r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function pf({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{df(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function mf({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",v=s.useRef(null),w=s.useRef(null),m=s.useRef(null),h=s.useRef(null),f=s.useRef(0),x=s.useRef(0),C=s.useRef("none"),y=s.useRef(!1),S=s.useRef(!1),B=s.useRef(null),N=s.useRef(0),q=s.useRef(null),D=s.useRef(!1),T=s.useRef(null),H=s.useRef(null),$=s.useRef(null),I=s.useRef(()=>{}),[P,E]=s.useState(null),[g,z]=s.useState(null),[F,X]=s.useState("opening"),[ie,L]=s.useState(0),[_,V]=s.useState(0),[ae,re]=s.useState(null),[M,se]=s.useState(!1),[j,b]=s.useState(!1),[k,G]=s.useState(!1),[he,J]=s.useState(null),ee=s.useRef(n),O=s.useRef(void 0),Z=t[n],te=Z?$i(Z):!1,Le=_!==0||M,ve=ae!==null,Ie=s.useCallback(ge=>{const xe=ge.currentTarget,_e=xe instanceof HTMLVideoElement?{width:xe.videoWidth,height:xe.videoHeight}:{width:xe.naturalWidth,height:xe.naturalHeight};!_e.width||!_e.height||J(_e)},[]);s.useEffect(()=>{B.current=g},[g]),s.useEffect(()=>{const ge=v.current;if(!ge)return;const xe=()=>z($l(ge));xe();const _e=new ResizeObserver(xe);return _e.observe(ge),()=>_e.disconnect()},[]);const pe=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),oe=s.useCallback(()=>{const ge=H.current;H.current=null,pe(),q.current=null,D.current=!1,re(null),se(!1),V(0),N.current=0,b(!1),y.current=!1,x.current=0,C.current="none",ge===1?d():ge===-1&&l()},[pe,d,l]),ye=s.useCallback(()=>{pe(),H.current=null,q.current=null,D.current=!1,re(null),se(!1),V(0),N.current=0},[pe]),U=s.useCallback(()=>{pe(),T.current=window.setTimeout(()=>{H.current!==null&&oe()},bn+32)},[pe,oe]),ce=s.useCallback((ge,xe)=>{var Ze;const _e=((Ze=B.current)==null?void 0:Ze.width)??0;if(pe(),q.current=ge,re(ge),D.current=!0,se(!0),xe){H.current=ge;const we=-ge*_e;N.current=we,V(we),U();return}N.current=0,V(0),T.current=window.setTimeout(()=>{T.current=null,ye()},bn+32)},[pe,ye,U]),le=s.useCallback(ge=>{if(!(t.length<=1)){if(D.current){if(H.current===ge){$.current=ge,oe();return}ye()}pe(),q.current=ge,re(ge),D.current=!1,se(!1),N.current=0,V(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(ge,!0)})})}},[t.length,ce,oe,ye,pe]);I.current=le;const Ce=s.useCallback(ge=>{ge.propertyName!=="transform"||!D.current||H.current!==null&&oe()},[oe]),Fe=s.useCallback(()=>{const ge=w.current;if(!ge)return;const xe=$l(ge);!xe.width||!xe.height||E(xe)},[]);s.useEffect(()=>{Fe();const ge=w.current;if(!ge)return;const xe=new ResizeObserver(()=>Fe());return xe.observe(ge),()=>xe.disconnect()},[Fe]),s.useEffect(()=>{F==="opening"&&P&&X("open")},[F,P]),s.useEffect(()=>{if(F!=="closing")return;const ge=setTimeout(()=>r(),bn);return()=>clearTimeout(ge)},[F,r]),s.useEffect(()=>()=>{pe()},[pe]),s.useLayoutEffect(()=>{ee.current===n&&O.current===(Z==null?void 0:Z.url)||(pe(),H.current=null,re(null),L(0),V(0),se(!1),G(!1),b(!1),J(null),f.current=0,x.current=0,C.current="none",y.current=!1,D.current=!1,N.current=0,q.current=null,h.current=null,S.current=!1,ee.current=n,O.current=Z==null?void 0:Z.url)},[n,Z==null?void 0:Z.url,pe]),s.useLayoutEffect(()=>{const ge=$.current;ge!==null&&($.current=null,requestAnimationFrame(()=>{I.current(ge)}))},[n,Z==null?void 0:Z.url]),s.useEffect(()=>{if(F!=="open")return;let ge=null;const xe=()=>{ge&&(document.removeEventListener("click",ge,!0),ge=null)},_e=()=>{xe(),ge=ze=>{ze.stopPropagation(),ze.preventDefault(),xe()},document.addEventListener("click",ge,!0)},Ze=ze=>{const Te=ze<0?1:-1;if(Math.abs(ze)>of&&t.length>1){ce(Te,!0);return}ce(Te,!1)},we=ze=>{if(ze.touches.length!==1||D.current)return;const Te=ze.touches[0];S.current=!0,h.current={x:Te.clientX,y:Te.clientY},C.current="none",x.current=0,y.current=!1},$e=ze=>{if(!h.current||ze.touches.length!==1||D.current)return;const Te=ze.touches[0],Ve=Te.clientX-h.current.x,De=Te.clientY-h.current.y;if(C.current==="none"){if(Math.abs(Ve)<10&&Math.abs(De)<10)return;if(Math.abs(Ve)>Math.abs(De)){if(t.length<=1)return;C.current="horizontal"}else if(De>0)C.current="vertical";else return}if(C.current==="horizontal"){y.current=!0,b(!0),x.current=Ve;const tt=Ve<0?1:-1;q.current!==tt&&(q.current=tt,re(tt)),N.current=Ve,V(Ve),ze.preventDefault();return}C.current==="vertical"&&(y.current=!0,b(!0),f.current=De,L(De),ze.preventDefault())},Xe=()=>{if(!h.current)return;const ze=C.current,Te=y.current;if(Te&&ze==="horizontal")Ze(x.current),_e();else if(Te&&ze==="vertical")if(f.current>nf){const De=window.innerHeight;f.current=De,G(!0),L(De),X("closing")}else f.current=0,L(0),_e();else ze==="horizontal"&&Math.abs(x.current)>0&&(Ze(x.current),_e());h.current=null,C.current="none",x.current=0,y.current=!1,b(!1)};return document.addEventListener("touchstart",we,{passive:!0}),document.addEventListener("touchmove",$e,{passive:!1}),document.addEventListener("touchend",Xe),document.addEventListener("touchcancel",Xe),()=>{document.removeEventListener("touchstart",we),document.removeEventListener("touchmove",$e),document.removeEventListener("touchend",Xe),document.removeEventListener("touchcancel",Xe),xe()}},[F,t.length,ce]),s.useEffect(()=>{const ge=xe=>{xe.key==="Escape"&&(xe.preventDefault(),xe.stopPropagation(),F!=="closing"&&X("closing"))};return window.addEventListener("keydown",ge,!0),()=>window.removeEventListener("keydown",ge,!0)},[F]);const Ee=()=>{F!=="closing"&&X("closing")},Y=F==="open",be=F==="closing",de=ie>0?Math.max(0,1-ie/500):1,K=ie>0?Math.max(.35,1-ie/500):1,ue=P?p?P:uf(P,he):null,He=ge=>{if(ge.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const xe=ue??ge.currentTarget.getBoundingClientRect(),_e=ge.clientY-xe.top,Ze=Math.min(52,xe.height*.2);if(!(_e>xe.height-Ze)){if(ge.clientX-xe.left<xe.width/2){le(-1);return}le(1)}},fe=ge=>{if(t.length<=1)return;const xe=ue??ge.currentTarget.getBoundingClientRect(),_e=ge.clientX-xe.left,Ze=ge.clientY-xe.top,we=Math.min(52,xe.height*.2);if(Ze>xe.height-we){ge.currentTarget.style.cursor="default";return}ge.currentTarget.style.cursor=_e<xe.width/2?"w-resize":"e-resize"},Q={position:"fixed",top:g==null?void 0:g.top,left:g==null?void 0:g.left,width:g==null?void 0:g.width,height:g==null?void 0:g.height,zIndex:9998},Je=p?"cover":"contain",Ne=_!==0||ie>0?`translate(${_}px, ${ie}px)`:void 0,ct=j&&!M?"none":M?`transform ${bn}ms ${jn}`:k?`transform ${bn}ms ${jn}, opacity ${bn}ms ${jn}`:F==="opening"||be?`opacity ${bn}ms ${jn}`:"none",Ke={...Q,transform:Ne,opacity:ie>0?K:F==="opening"||be?0:1,transition:ct,pointerEvents:"none"},ut={position:"absolute",top:((ue==null?void 0:ue.top)??0)-((g==null?void 0:g.top)??0),left:((ue==null?void 0:ue.left)??0)-((g==null?void 0:g.left)??0),width:ue==null?void 0:ue.width,height:ue==null?void 0:ue.height,objectFit:Je,pointerEvents:te&&Y&&!Le?"auto":"none",touchAction:te&&Y?"none":void 0},lt=(g==null?void 0:g.width)??0,Ye=ve?(n+ae+t.length)%t.length:null,Re=Ye!==null?t[Ye]:null,We={...Q,transform:ve?`translateX(${ae*lt+_}px)`:void 0,opacity:1,transition:M?`transform ${bn}ms ${jn}`:"none",pointerEvents:"none"},Be={position:"absolute",top:((P==null?void 0:P.top)??0)-((g==null?void 0:g.top)??0),left:((P==null?void 0:P.left)??0)-((g==null?void 0:g.left)??0),width:P==null?void 0:P.width,height:P==null?void 0:P.height,objectFit:Je,pointerEvents:"none"},Ue=ue?{position:"fixed",top:ue.top,height:ue.height,width:ue.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:F==="open"?"none":void 0},onClick:Ee,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Y?de:0,transition:j?"none":`opacity ${bn}ms ${jn}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:w,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Y?1:0,transition:`opacity ${bn}ms ${jn}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:w,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Y?1:0,transition:`opacity ${bn}ms ${jn}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),P&&g&&Re&&a.jsx("div",{style:We,onTransitionEnd:Ce,children:$i(Re)?a.jsx("video",{src:Re.url,muted:!0,playsInline:!0,preload:"auto",style:Be},`neighbor-${Ye}-${Re.url}`):a.jsx("img",{src:Re.url,alt:Re.name,style:Be},`neighbor-${Ye}-${Re.url}`)}),P&&g&&Z&&a.jsx("div",{style:Ke,onTransitionEnd:Ce,children:te?a.jsx(pf,{src:Z.url,phase:F,mediaRef:m,mediaStyle:ut,onLoadedMetadata:Ie,onClick:He,onMouseMove:fe},`${n}-${Z.url}`):a.jsx("img",{ref:m,src:Z.url,alt:Z.name,onLoad:Ie,style:ut},`${n}-${Z.url}`)}),Y&&Ue&&t.length>1&&!te&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ue,left:ue.left,cursor:"w-resize",pointerEvents:j?"none":"auto"},onClick:ge=>{if(S.current){S.current=!1;return}ge.stopPropagation(),le(-1)}}),a.jsx("div",{style:{...Ue,left:ue.left+ue.width/2,cursor:"e-resize",pointerEvents:j?"none":"auto"},onClick:ge=>{if(S.current){S.current=!1;return}ge.stopPropagation(),le(1)}})]})]})}function gf(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function hf({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=W.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:w=100,verticalGap:m,entriesCount:h,lightbox:f,imageDisplay:x,imageCorners:C,lightboxImageDisplay:y,slider:S,sliderTiming:B,direction:N,transition:q,titleMarginTop:D,subtitleMarginTop:T,titleColor:H,subtitleColor:$,lightboxCounterColor:I,titleFontFamily:P,titleFontSettings:E,titleFontSize:g,titleLineHeight:z,titleLetterSpacing:F,titleWordSpacing:X,titleTextAppearance:ie,subtitleFontFamily:L,subtitleFontSettings:_,subtitleFontSize:V,subtitleLineHeight:ae,subtitleLetterSpacing:re,subtitleWordSpacing:M,subtitleTextAppearance:se,lightboxCounterFontFamily:j,lightboxCounterFontSettings:b,lightboxCounterFontSize:k,lightboxCounterLineHeight:G,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:J,lightboxCounterTextAppearance:ee,showText:O="always",alignEntries:Z="off",align:te="top"}=e,Le={fontSettings:{fontFamily:P,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:g??.01,lineHeight:z,letterSpacing:F??0,wordSpacing:X??0,textAppearance:ie,color:H},Ie={...an(Ut(Le,n))},pe={fontSettings:{fontFamily:L,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:V??.01,lineHeight:ae,letterSpacing:re??0,wordSpacing:M??0,textAppearance:se,color:$},ye={...an(Ut(pe,n))},U={fontSettings:{fontFamily:j,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:k??.01,lineHeight:G,letterSpacing:he??0,wordSpacing:J??0,textAppearance:ee,color:I},le={...an(Ut(U,n)),...wa(k,G,u,n)},Ce=ba(g,z,`${u}-item-title`,`${u}-text-tight-leading`),Fe=ba(V,ae,`${u}-item-subtitle`,`${u}-text-tight-leading`),Ee=wa(g,z,u,n),Y=wa(V,ae,u,n),be=ba(k,G,`${u}-lightbox-counter`,`${u}-text-tight-leading`),de=W.buildColorVars(u,{titleColor:H,subtitleColor:$,lightboxCounterColor:I},ff,yf),He=`${l&&l!=="default"?`${u}-state-${l}`:""}${O==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),fe=h===0?1/0:h,Q=(t??[]).slice(0,fe),Je=s.useMemo(()=>f==="on"?lf(Q):[],[Q,f]),Ne=v.entryWidth??.2,ct=(x==null?void 0:x.display)==="cover",Ke=(x==null?void 0:x.ratioValue)??"1:1",ut=(x==null?void 0:x.reversed)??!1,[lt,Ye]=Ke.split(":").map(Number),Be=`${ut?Ye:lt} / ${ut?lt:Ye}`,Ue=v.columnsCount,ge=W.scalingValue(Ne??0,n),xe=ge,_e=!ct&&S!=="off",Ze=Q.length%Ue||Ue,we=Ze<Ue&&Q.length>0,$e=Q.length-Ze,Xe=we?Math.floor((Ue-Ze)/2)+1:1,ze=C?W.scalingValue(C,n):void 0,Te={width:xe,...ct?{aspectRatio:Be,height:"auto",overflow:"hidden"}:{height:"auto"},...ze?{borderRadius:ze,overflow:"hidden"}:{}},Ve=`${u}-item-image-wrapper${_e?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),De=p==="d"||p==="e"||p==="f",tt=Z==="on",nt=`calc(${W.scalingValue(Ne??0,n)} * (${w} / 100))`,st=W.scalingValue(Ne*w/100,n),St=ct?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...ze?{borderRadius:ze}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...ze?{borderRadius:ze}:{}},[Bt,zt]=s.useState(0),ft=s.useRef(null),wt=q==="fade"||N==="horizontal"?"ltr":N==="vertical"?"ttb":"ltr";s.useEffect(()=>{const gt=ft.current;if(!gt)return;const ke=new ResizeObserver(Ge=>{zt(Math.round(Ge[0].contentRect.width))});return ke.observe(gt),()=>ke.disconnect()},[]);const jt=(()=>{const gt={...de},ke=ft.current?getComputedStyle(ft.current).getPropertyValue("--cntrl-article-width").trim():"";return ke&&(gt["--cntrl-article-width"]=ke),gt})(),[At,xt]=s.useState(!1),[Ft,Nt]=s.useState([]),[Kt,Jt]=s.useState(0),Tt=f==="on"&&(!n||i),Wt=(gt,ke)=>{n&&!i||f!=="off"&&(Nt(gt),Jt(ke),xt(!0))};s.useEffect(()=>{if(!At||f!=="on"||typeof document>"u")return;const gt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=gt}},[At,f]),s.useEffect(()=>{!n||i||xt(!1)},[n,i]);const rn=s.useMemo(()=>Zh(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),f==="on"&&a.jsx(cf,{mediaList:Je}),a.jsx("div",{style:de,children:a.jsx("div",{ref:ft,className:`${u}-wrapper ${u}-type-${p}${tt?` ${u}-align-entries`:""} ${u}-image-align-${te} ${He}`.trim(),style:{gridTemplateColumns:`repeat(${Ue}, ${ge})`,rowGap:tt?0:W.scalingValue(m??0,n),columnGap:W.scalingValue(v.horizontalGap??0,n),width:W.scalingValue(v.wrapperWidth??0,n),...tt?{[`--${u}-align-entries-row-gap`]:W.scalingValue(m??0,n)}:{}},children:Q.map((gt,ke)=>{var _t;const Ge=Sl(gt.title),rt=Sl(gt.subtitle),ht=(((_t=gt.link)==null?void 0:_t.length)??0)>0&&f==="off"?gt.link:void 0,yt=Math.floor(ke/Ue)===Math.ceil(Q.length/Ue)-1,Lt=we&&ke>=$e?`${Xe+(ke-$e)}`:void 0,mt=De?a.jsxs("div",{className:`${u}-item-text-block`,children:[Ge&&a.jsx("p",{className:Ce,style:{width:nt,...Ie,...Ee},children:gt.title}),Ge&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:W.scalingValue(D??0,n),width:st}}),rt&&a.jsx("p",{className:Fe,style:{width:nt,...ye,...Y},children:gt.subtitle}),rt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:W.scalingValue(T??0,n),width:st}})]}):null,Vt=tt?a.jsxs("div",{className:`${u}-item-title-row`,children:[!De&&a.jsx("div",{"data-controls":o&&Ge?"titleMarginTop":void 0,className:o&&Ge?`${u}-control`:void 0,style:{height:Ge?W.scalingValue(D??0,n):0,width:st}}),Ge&&a.jsx("p",{className:Ce,style:{width:nt,...Ie,...Ee},children:gt.title}),De&&Ge&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:W.scalingValue(D??0,n),width:st}})]}):null,kt=tt?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!De&&a.jsx("div",{"data-controls":o&&rt?"subtitleMarginTop":void 0,className:o&&rt?`${u}-control`:void 0,style:{height:rt?W.scalingValue(T??0,n):0,width:st}}),rt&&a.jsx("p",{className:Fe,style:{width:nt,...ye,...Y},children:gt.subtitle}),De&&rt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:W.scalingValue(T??0,n),width:st}})]}):null,Mt=ht?a.jsxs("a",{href:ht,target:"_blank",className:`${u}-item-text-link`,children:[Vt,kt]}):a.jsxs(a.Fragment,{children:[Vt,kt]}),Xt=wd(gt.gallery),qt=Xt.filter(Ct=>Ct.lightboxMedia).map(Ct=>Ct.lightboxMedia),Ht=a.jsx("div",{className:Ve,style:Te,children:Xt.length===0?null:S==="off"?(()=>{const{displayMedia:Ct,lightboxMedia:A}=Xt[0],Pe=A?qt.findIndex(Ae=>Ae.url===A.url):-1;return a.jsx(Cl,{media:Ct,className:`${u}-item-${$i(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:Tt&&Pe>=0?()=>Wt(qt,Pe):void 0})})():a.jsxs(a.Fragment,{children:[_e&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Xt.map(({displayMedia:Ct})=>$i(Ct)?a.jsx("video",{src:Ct.url,muted:!0,playsInline:!0},`sizer-${Ct.url}`):a.jsx("img",{src:Ct.url,alt:""},`sizer-${Ct.url}`))}),a.jsx(Ns,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:B*1e3,width:"100%",height:"100%",speed:tf,type:q==="fade"?"fade":"loop",rewind:q==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:wt},onMoved:Ct=>{N!=="random"||q==="fade"||ef(Ct)},children:Xt.map(({displayMedia:Ct,lightboxMedia:A},Pe)=>{const Ae=A?qt.findIndex(Oe=>Oe.url===A.url):-1;return a.jsx(Ws,{children:a.jsx(Cl,{media:Ct,className:`${u}-item-${$i(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:Tt&&Ae>=0?()=>Wt(qt,Ae):void 0})},Pe)})},`${q}-${Ne}-${N}-${B}-${Bt}-${d}`)]})}),Dt=De?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Ge?"titleMarginTop":void 0,className:o&&Ge?`${u}-control`:void 0,style:{height:Ge?W.scalingValue(D??0,n):0,width:st}}),a.jsx("p",{className:Ce,style:{width:nt,...Ie,...Ee},children:gt.title}),a.jsx("div",{"data-controls":o&&rt?"subtitleMarginTop":void 0,className:o&&rt?`${u}-control`:void 0,style:{height:rt?W.scalingValue(T??0,n):0,width:st}}),a.jsx("p",{className:Fe,style:{width:nt,...ye,...Y},children:gt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Lt&&!tt?{gridColumn:Lt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${tt&&yt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${ge} * (${w} / 100))`:ge,...Lt&&tt?{gridColumn:Lt}:{}},children:tt?a.jsx(a.Fragment,{children:De?a.jsxs(a.Fragment,{children:[Mt,a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:Ht})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:Ht}),Mt]})}):ht?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:[mt,Ht]}),!De&&a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-text-link`,children:Dt})]}):a.jsxs(a.Fragment,{children:[mt,Ht,Dt]})})},ke)})})}),(!n||i)&&At&&typeof document<"u"&&f==="on"&&(()=>{const gt=(c?document.getElementById(c):null)??document.body;return zn.createPortal(a.jsx("div",{style:jt,"data-selection":"none",children:a.jsx(mf,{prefix:u,items:Ft,index:Kt,imageDisplay:gf(y),isEditor:n,onClose:()=>xt(!1),onPrev:()=>Jt(ke=>(ke-1+Ft.length)%Ft.length),onNext:()=>Jt(ke=>(ke+1)%Ft.length),counterClassName:be,counterStyle:le})}),gt)})()]})}const ff={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},yf=["hover","focus","filled","success","error"],vf=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5133
5133
  import '@splidejs/react-splide/css/core';
5134
5134
  import { CommonComponentProps } from '../props';
5135
5135
  import {
@@ -7182,12 +7182,12 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7182
7182
  };
7183
7183
 
7184
7184
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7185
- `,wa={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ff=["titleColor","subtitleColor","lightboxCounterColor"],yf={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:{...wa.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:{...wa.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:{...wa.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:[...ff],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},vf={element:pf,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:yf,sourceCode:hf},xf=50,wl=10,Fs="cntrl-lightbox-journal",na=Fs,ns=`${Fs}-`,ia=e=>`${Fs}-${e}`,_s=e=>e===na||e.startsWith(ns),Sl=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},$l=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Sl(t.get(ia(e)));if(i)return i}const n=Sl(t.get(na));if(n)return n;for(const[i]of t){if(!i.startsWith(ns))continue;const o=i.slice(ns.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Cl=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},vd=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{_s(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(ia(t),String(e)):i.searchParams.set(na,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},bf=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===ia(e)||i===na:_s(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)}},xd=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(ia(e)):[...t.keys()].some(n=>_s(n))},wf=(e,t)=>{if(xd(t)){if(e){window.history.back();return}bf(t)}},Sf=20,$f=2,Sa=e=>`max(${e}, ${Sf}px)`,Yi=e=>((e==null?void 0:e.image)??[]).slice(0,$f),bd=e=>e.reduce((t,n)=>t+Yi(n).length,0),Cf=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Yi(r).length,1),i=Yi(e[t]).length;return{start:n,end:n+i-1}},Tf=(e,t)=>{const n=bd(e),{start:i,end:o}=Cf(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Cr=(e,t)=>t==="B"?e.flatMap((n,i)=>Yi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Yi(n)})),If=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return Tf(i,o)},Tl=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Rf=(e,t,n)=>e==="B"?t.length>1:bd(n)>1,fn=.004,Yn=.004,ji={title1Width:.13,title2Width:.13,title3Width:.14},Un=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Ui=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},Fo=(e,t)=>Ui(e,t),cn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Kn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ui(e.length,n),effective:Fo(e.length,n)}},wd=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Sd=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ni=["title1","title2","title3","count"],tt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Ns={title1:"1",title2:"2",title3:"3",count:"Count"},Ws=e=>[tt(e,"fontFamily"),tt(e,"fontSettings"),{type:"row",items:[tt(e,"fontSize"),tt(e,"lineHeight"),tt(e,"letterSpacing"),tt(e,"wordSpacing")]},tt(e,"textAlign"),tt(e,"textAppearance")],Lf=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ni.map(e=>[Ns[e],Ws(e)]))}),Pf={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Ef={title1:.02,title2:.02,title3:.02,count:.017},vi=(e,t)=>{const n=i=>{const o=tt(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[Pf[t]]}},xi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Ef[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Yt(i,n)};function $d({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:x=0,title3MarginLeft:b=0,titleRowMarginBottom:g=0,titleHeaderLayout:h="desktop",contentMarginTop:f=0,iconMarginRight:v=0,closeIcon:C=null,closeIconMaxWidth:y=0,closeIconColor:T="#000000",closeIconHoverColor:W="#cccccc"}=n,_=H.scalingValue(f,i),X=H.scalingValue(v,i),D=H.scalingValue(g,i),w=h==="mobile",R=xi("title1",vi(n,"title1"),i),m=xi("title2",vi(n,"title2"),i),E=xi("title3",vi(n,"title3"),i),I=s.useMemo(()=>({title1Width:d??ji.title1Width,title2Width:c??ji.title2Width,title3Width:u??ji.title3Width}),[d,c,u]),J=s.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:b}),[x,b]),A=s.useMemo(()=>Un(e,t,R,m,E),[e,t,R,m,E]),Q=s.useMemo(()=>A.map(K=>I[K.widthKey]),[A,I]),q=s.useMemo(()=>Ui(A.length,Q),[A.length,Q]),Y=s.useMemo(()=>Fo(A.length,Q),[A.length,Q]),oe=s.useMemo(()=>A.filter(K=>K.prefix==="title1"),[A]),L=s.useMemo(()=>A.filter(K=>K.prefix==="title2"||K.prefix==="title3"),[A]),N=s.useMemo(()=>Kn(oe,I),[oe,I]),V=s.useMemo(()=>Kn(L,I),[L,I]),de=!!(t.title1||t.title2||t.title3),re=C!==null;if(!(de||re))return null;const S=(p??0)>0||o,$=(K,z)=>{const be=A.findIndex(j=>j.prefix===K.prefix);if(!w||z==="single-row")return{effectiveWidth:Y[be]??0,resolvedWidth:q[be]??0,maxWidth:cn(be,q)};if(z==="two-row-top"){const j=oe.findIndex(_e=>_e.prefix===K.prefix);return{effectiveWidth:N.effective[j]??0,resolvedWidth:N.resolved[j]??0,maxWidth:cn(j,N.resolved)}}const se=L.findIndex(j=>j.prefix===K.prefix);return{effectiveWidth:V.effective[se]??0,resolvedWidth:V.resolved[se]??0,maxWidth:cn(se,V.resolved)}},F=(K,z,be)=>{if(!w||be==="single-row"){const lt=K.findIndex(Ve=>Ve.prefix===z.prefix),Je=K.map(Ve=>I[Ve.widthKey]),ct=Ui(K.length,Je);return{effectiveWidth:Fo(K.length,Je)[lt]??0,resolvedWidth:ct[lt]??0,maxWidth:cn(lt,ct)}}if(be==="two-row-top"){const lt=K.filter(Ve=>Ve.prefix==="title1"),Je=lt.findIndex(Ve=>Ve.prefix===z.prefix),{resolved:ct,effective:it}=Kn(lt,I);return{effectiveWidth:it[Je]??0,resolvedWidth:ct[Je]??0,maxWidth:cn(Je,ct)}}const se=K.filter(lt=>lt.prefix==="title2"||lt.prefix==="title3"),j=se.findIndex(lt=>lt.prefix===z.prefix),{resolved:_e,effective:We}=Kn(se,I);return{effectiveWidth:We[j]??0,resolvedWidth:_e[j]??0,maxWidth:cn(j,_e)}},O=K=>Sd(A,q,J,K)+(w?0:p??0),te=()=>w?0:p??0,xe=K=>L.slice(0,K).reduce((z,be,se)=>z+(be.marginLeftKey?J[be.marginLeftKey]??0:0)+(V.resolved[se]??0),0),ne=K=>{const z=L[K];return xe(K)+(z.marginLeftKey?J[z.marginLeftKey]??0:0)+(V.resolved[K]??0)},ae=(K,z,be)=>{const se=K.marginLeftKey?J[K.marginLeftKey]??0:0,{effectiveWidth:j,resolvedWidth:_e,maxWidth:We}=be??$(K,z),lt=Math.max(se,Yn),Je=o&&z==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":K.prefix,style:{width:H.scalingValue(j,i),...se>0?{marginLeft:H.scalingValue(se,i)}:{}},children:[a.jsx("p",{className:K.className,style:K.style,children:K.text}),Je&&K.marginLeftKey?a.jsx("div",{"data-controls":K.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(_e),style:{position:"absolute",top:0,left:H.scalingValue(-se,i),width:H.scalingValue(lt,i),height:"100%",pointerEvents:"auto"}}):null,Je?a.jsx("div",{"data-controls":K.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(We),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:H.scalingValue(-fn/2,i),width:H.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}}):null]},K.className)},Z=(K="two-row")=>{const z=A.findIndex(j=>j.prefix==="title1"),be=z>=0?q[z]:I.title1Width,se=K==="two-row"&&o;return a.jsx("div",{...se?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(be)}:{},style:{width:H.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...se?{pointerEvents:"auto"}:{}}})},B=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:R,"aria-hidden":"true",children:" "}),G=K=>{const z=Un(e,K,R,m,E);return a.jsx(a.Fragment,{children:z.map(be=>ae(be,"single-row",F(z,be,"single-row")))})},$e=K=>{const z=Un(e,K,R,m,E),be=z.find(se=>se.prefix==="title1");return be?ae(be,"two-row-top",F(z,be,"two-row-top")):null},he=(K,z=!1)=>{const be=Un(e,K,R,m,E),se=be.filter(We=>We.prefix==="title2"||We.prefix==="title3"),j=o&&z;return se.length>0||j||(g??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:se.map(We=>ae(We,"two-row-bottom",F(be,We,"two-row-bottom")))}),z&&o?a.jsxs(a.Fragment,{children:[Te(),ke()]}):null]}):null,(g??0)>0||j?a.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:D,width:"100%",flexShrink:0,pointerEvents:j?"auto":"none"}}):null]}):null},Re=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:H.scalingValue(y??0,i),height:H.scalingValue(y??0,i),marginRight:X,"--close-icon-hover-color":W},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:K=>{K.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(sn,{url:C??"",fill:T,hoverFill:i&&!r?T:W,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:X,height:"100%",pointerEvents:"auto"}})]}),ge=()=>re?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Re()}):null,ye=K=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:K})}),Se=K=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[re||de?B():null,S?Z("two-row"):null,ye(K),ge()]}),ee=(K,z=!1)=>a.jsxs(a.Fragment,{children:[Se($e(K)),he(K,z)]}),ce=()=>{const K=w?-1:A.findIndex(se=>se.prefix==="title1"),z=!w&&(o||(p??0)>0)?(()=>{const se=p??0,j=K>=0?q[K]:I.title1Width,_e=Math.max(se,Yn);return a.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:H.scalingValue(_e,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,be=A.flatMap((se,j)=>{if(!se.marginLeftKey)return[];const _e=J[se.marginLeftKey]??0,We=wd(A,q,J,j)+te(),lt=Math.max(_e,Yn);return a.jsx("div",{"data-controls":se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q[j]),style:{position:"absolute",top:0,left:H.scalingValue(We,i),width:H.scalingValue(lt,i),height:"100%",pointerEvents:"auto"}},se.marginLeftKey)});return z?[z,...be]:be},ue=()=>A.map((K,z)=>{const be=cn(z,q),j=O(z)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":K.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,left:H.scalingValue(j,i),width:H.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}})},`${K.widthKey}-junction`)}),Te=()=>L.flatMap((K,z)=>{if(!K.marginLeftKey)return[];const be=J[K.marginLeftKey]??0,se=xe(z),j=Math.max(be,Yn),{resolvedWidth:_e}=$(K,"two-row-bottom");return a.jsx("div",{"data-controls":K.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(_e),style:{position:"absolute",top:0,left:H.scalingValue(se,i),width:H.scalingValue(j,i),height:"100%",pointerEvents:"auto"}},K.marginLeftKey)}),ke=()=>L.map((K,z)=>{const{maxWidth:be}=$(K,"two-row-bottom"),j=ne(z)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":K.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,left:H.scalingValue(j,i),width:H.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}})},`${K.widthKey}-junction`)}),Ce=()=>!o||w?null:a.jsxs(a.Fragment,{children:[ce(),ue()]}),U=!!(t.title2||t.title3||(g??0)>0||o),fe=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[re||de?B():null,S?Z("single-row"):null,de?ye(G(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ge(),Ce()]}),me=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...U?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:U?void 0:{flex:"0 0 auto",height:"auto"},children:ee(t,!0)}),Ce()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:_,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...w?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${w?` ${e}-lightbox-content-area-stacked`:""}`,children:a.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?me():fe()})})})]})}function Mf(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function kf(e){return`
7185
+ `,Sa={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},xf=["titleColor","subtitleColor","lightboxCounterColor"],bf={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:{...Sa.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:{...Sa.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:{...Sa.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:[...xf],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},wf={element:hf,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:bf,sourceCode:vf},Sf=50,Tl=10,Hs="cntrl-lightbox-journal",ia=Hs,ns=`${Hs}-`,oa=e=>`${Hs}-${e}`,Ds=e=>e===ia||e.startsWith(ns),Il=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Rl=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Il(t.get(oa(e)));if(i)return i}const n=Il(t.get(ia));if(n)return n;for(const[i]of t){if(!i.startsWith(ns))continue;const o=i.slice(ns.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Ll=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Sd=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Ds(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(oa(t),String(e)):i.searchParams.set(ia,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},Cf=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===oa(e)||i===ia:Ds(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)}},Cd=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(oa(e)):[...t.keys()].some(n=>Ds(n))},$f=(e,t)=>{if(Cd(t)){if(e){window.history.back();return}Cf(t)}},Tf=20,If=2,Ca=e=>`max(${e}, ${Tf}px)`,Ki=e=>((e==null?void 0:e.image)??[]).slice(0,If),$d=e=>e.reduce((t,n)=>t+Ki(n).length,0),Rf=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Ki(r).length,1),i=Ki(e[t]).length;return{start:n,end:n+i-1}},Lf=(e,t)=>{const n=$d(e),{start:i,end:o}=Rf(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Ir=(e,t)=>t==="B"?e.flatMap((n,i)=>Ki(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Ki(n)})),Pf=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return Lf(i,o)},Pl=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Ef=(e,t,n)=>e==="B"?t.length>1:$d(n)>1,fn=.004,Un=.004,Gi={title1Width:.13,title2Width:.13,title3Width:.14},Kn=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Zi=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},No=(e,t)=>Zi(e,t),cn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Zn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Zi(e.length,n),effective:No(e.length,n)}},Td=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Id=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ii=["title1","title2","title3","count"],ot=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Os={title1:"1",title2:"2",title3:"3",count:"Count"},Bs=e=>[ot(e,"fontFamily"),ot(e,"fontSettings"),{type:"row",items:[ot(e,"fontSize"),ot(e,"lineHeight"),ot(e,"letterSpacing"),ot(e,"wordSpacing")]},ot(e,"textAlign"),ot(e,"textAppearance")],Mf=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ii.map(e=>[Os[e],Bs(e)]))}),kf={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Af={title1:.02,title2:.02,title3:.02,count:.017},xi=(e,t)=>{const n=i=>{const o=ot(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[kf[t]]}},bi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Af[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Ut(i,n)};function Rd({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:v=0,title3MarginLeft:w=0,titleRowMarginBottom:m=0,titleHeaderLayout:h="desktop",contentMarginTop:f=0,iconMarginRight:x=0,closeIcon:C=null,closeIconMaxWidth:y=0,closeIconColor:S="#000000",closeIconHoverColor:B="#cccccc"}=n,N=W.scalingValue(f,i),q=W.scalingValue(x,i),D=W.scalingValue(m,i),T=h==="mobile",H=bi("title1",xi(n,"title1"),i),$=bi("title2",xi(n,"title2"),i),I=bi("title3",xi(n,"title3"),i),P=s.useMemo(()=>({title1Width:d??Gi.title1Width,title2Width:c??Gi.title2Width,title3Width:u??Gi.title3Width}),[d,c,u]),E=s.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:w}),[v,w]),g=s.useMemo(()=>Kn(e,t,H,$,I),[e,t,H,$,I]),z=s.useMemo(()=>g.map(K=>P[K.widthKey]),[g,P]),F=s.useMemo(()=>Zi(g.length,z),[g.length,z]),X=s.useMemo(()=>No(g.length,z),[g.length,z]),ie=s.useMemo(()=>g.filter(K=>K.prefix==="title1"),[g]),L=s.useMemo(()=>g.filter(K=>K.prefix==="title2"||K.prefix==="title3"),[g]),_=s.useMemo(()=>Zn(ie,P),[ie,P]),V=s.useMemo(()=>Zn(L,P),[L,P]),ae=!!(t.title1||t.title2||t.title3),re=C!==null;if(!(ae||re))return null;const se=(p??0)>0||o,j=(K,ue)=>{const He=g.findIndex(Q=>Q.prefix===K.prefix);if(!T||ue==="single-row")return{effectiveWidth:X[He]??0,resolvedWidth:F[He]??0,maxWidth:cn(He,F)};if(ue==="two-row-top"){const Q=ie.findIndex(Je=>Je.prefix===K.prefix);return{effectiveWidth:_.effective[Q]??0,resolvedWidth:_.resolved[Q]??0,maxWidth:cn(Q,_.resolved)}}const fe=L.findIndex(Q=>Q.prefix===K.prefix);return{effectiveWidth:V.effective[fe]??0,resolvedWidth:V.resolved[fe]??0,maxWidth:cn(fe,V.resolved)}},b=(K,ue,He)=>{if(!T||He==="single-row"){const ct=K.findIndex(Ye=>Ye.prefix===ue.prefix),Ke=K.map(Ye=>P[Ye.widthKey]),ut=Zi(K.length,Ke);return{effectiveWidth:No(K.length,Ke)[ct]??0,resolvedWidth:ut[ct]??0,maxWidth:cn(ct,ut)}}if(He==="two-row-top"){const ct=K.filter(Ye=>Ye.prefix==="title1"),Ke=ct.findIndex(Ye=>Ye.prefix===ue.prefix),{resolved:ut,effective:lt}=Zn(ct,P);return{effectiveWidth:lt[Ke]??0,resolvedWidth:ut[Ke]??0,maxWidth:cn(Ke,ut)}}const fe=K.filter(ct=>ct.prefix==="title2"||ct.prefix==="title3"),Q=fe.findIndex(ct=>ct.prefix===ue.prefix),{resolved:Je,effective:Ne}=Zn(fe,P);return{effectiveWidth:Ne[Q]??0,resolvedWidth:Je[Q]??0,maxWidth:cn(Q,Je)}},k=K=>Id(g,F,E,K)+(T?0:p??0),G=()=>T?0:p??0,he=K=>L.slice(0,K).reduce((ue,He,fe)=>ue+(He.marginLeftKey?E[He.marginLeftKey]??0:0)+(V.resolved[fe]??0),0),J=K=>{const ue=L[K];return he(K)+(ue.marginLeftKey?E[ue.marginLeftKey]??0:0)+(V.resolved[K]??0)},ee=(K,ue,He)=>{const fe=K.marginLeftKey?E[K.marginLeftKey]??0:0,{effectiveWidth:Q,resolvedWidth:Je,maxWidth:Ne}=He??j(K,ue),ct=Math.max(fe,Un),Ke=o&&ue==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":K.prefix,style:{width:W.scalingValue(Q,i),...fe>0?{marginLeft:W.scalingValue(fe,i)}:{}},children:[a.jsx("p",{className:K.className,style:K.style,children:K.text}),Ke&&K.marginLeftKey?a.jsx("div",{"data-controls":K.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Je),style:{position:"absolute",top:0,left:W.scalingValue(-fe,i),width:W.scalingValue(ct,i),height:"100%",pointerEvents:"auto"}}):null,Ke?a.jsx("div",{"data-controls":K.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ne),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:W.scalingValue(-fn/2,i),width:W.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}}):null]},K.className)},O=(K="two-row")=>{const ue=g.findIndex(Q=>Q.prefix==="title1"),He=ue>=0?F[ue]:P.title1Width,fe=K==="two-row"&&o;return a.jsx("div",{...fe?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He)}:{},style:{width:W.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...fe?{pointerEvents:"auto"}:{}}})},Z=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:H,"aria-hidden":"true",children:" "}),te=K=>{const ue=Kn(e,K,H,$,I);return a.jsx(a.Fragment,{children:ue.map(He=>ee(He,"single-row",b(ue,He,"single-row")))})},Le=K=>{const ue=Kn(e,K,H,$,I),He=ue.find(fe=>fe.prefix==="title1");return He?ee(He,"two-row-top",b(ue,He,"two-row-top")):null},ve=(K,ue=!1)=>{const He=Kn(e,K,H,$,I),fe=He.filter(Ne=>Ne.prefix==="title2"||Ne.prefix==="title3"),Q=o&&ue;return fe.length>0||Q||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[fe.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:fe.map(Ne=>ee(Ne,"two-row-bottom",b(He,Ne,"two-row-bottom")))}),ue&&o?a.jsxs(a.Fragment,{children:[Ce(),Fe()]}):null]}):null,(m??0)>0||Q?a.jsx("div",{"data-controls":Q?"titleRowMarginBottom":void 0,"data-controls-axis":Q?"y":void 0,"data-controls-reverse":Q?"":void 0,className:Q?`${e}-control`:void 0,style:{height:D,width:"100%",flexShrink:0,pointerEvents:Q?"auto":"none"}}):null]}):null},Ie=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:W.scalingValue(y??0,i),height:W.scalingValue(y??0,i),marginRight:q,"--close-icon-hover-color":B},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:K=>{K.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(sn,{url:C??"",fill:S,hoverFill:i&&!r?S:B,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:q,height:"100%",pointerEvents:"auto"}})]}),pe=()=>re?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Ie()}):null,oe=K=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:K})}),ye=K=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[re||ae?Z():null,se?O("two-row"):null,oe(K),pe()]}),U=(K,ue=!1)=>a.jsxs(a.Fragment,{children:[ye(Le(K)),ve(K,ue)]}),ce=()=>{const K=T?-1:g.findIndex(fe=>fe.prefix==="title1"),ue=!T&&(o||(p??0)>0)?(()=>{const fe=p??0,Q=K>=0?F[K]:P.title1Width,Je=Math.max(fe,Un);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Q),style:{position:"absolute",top:0,left:0,width:W.scalingValue(Je,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,He=g.flatMap((fe,Q)=>{if(!fe.marginLeftKey)return[];const Je=E[fe.marginLeftKey]??0,Ne=Td(g,F,E,Q)+G(),ct=Math.max(Je,Un);return a.jsx("div",{"data-controls":fe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F[Q]),style:{position:"absolute",top:0,left:W.scalingValue(Ne,i),width:W.scalingValue(ct,i),height:"100%",pointerEvents:"auto"}},fe.marginLeftKey)});return ue?[ue,...He]:He},le=()=>g.map((K,ue)=>{const He=cn(ue,F),Q=k(ue)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":K.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(He),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:W.scalingValue(Q,i),width:W.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}})},`${K.widthKey}-junction`)}),Ce=()=>L.flatMap((K,ue)=>{if(!K.marginLeftKey)return[];const He=E[K.marginLeftKey]??0,fe=he(ue),Q=Math.max(He,Un),{resolvedWidth:Je}=j(K,"two-row-bottom");return a.jsx("div",{"data-controls":K.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Je),style:{position:"absolute",top:0,left:W.scalingValue(fe,i),width:W.scalingValue(Q,i),height:"100%",pointerEvents:"auto"}},K.marginLeftKey)}),Fe=()=>L.map((K,ue)=>{const{maxWidth:He}=j(K,"two-row-bottom"),Q=J(ue)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":K.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(He),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:W.scalingValue(Q,i),width:W.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}})},`${K.widthKey}-junction`)}),Ee=()=>!o||T?null:a.jsxs(a.Fragment,{children:[ce(),le()]}),Y=!!(t.title2||t.title3||(m??0)>0||o),be=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[re||ae?Z():null,se?O("single-row"):null,ae?oe(te(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),pe(),Ee()]}),de=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Y?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Y?void 0:{flex:"0 0 auto",height:"auto"},children:U(t,!0)}),Ee()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:N,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...T?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${T?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${T?` ${e}-text-bar-cell-stacked`:""}`,style:T?void 0:{flex:1,minWidth:0,width:"100%"},children:T?de():be()})})})]})}function Ff(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _f(e){return`
7186
7186
  .${e}-wrapper {
7187
7187
  display: grid;
7188
7188
  align-items: start;
7189
7189
  justify-content: center;
7190
- min-height: ${Mf(48)};
7190
+ min-height: ${Ff(48)};
7191
7191
  }
7192
7192
  .${e}-item {
7193
7193
  display: flex;
@@ -7502,7 +7502,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7502
7502
  pointer-events: auto;
7503
7503
  flex-shrink: 0;
7504
7504
  }
7505
- `}const Il={url:"",name:"",objectFit:"cover"},Tn=500,po=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Af=72,Ff=50,_f=1e4,Nf=650,Wf=500;function Hf(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Cd(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=_r(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 Df(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Cd(i,n):null}function Of(e){return e.reduce((t,n,i)=>{const o=Hs(n.gallery),l=Ds(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 bo(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 Rl(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return bo(e,i,n)}const Bf=.03;function Td(e){return e.width*Bf}const $a={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function lr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Ll(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function zf(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function is(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function jf(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:is(e,t.width,t.height)}function Vf(e,t){if(lo(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 Gf(e){const t=new Set,n=[];for(const i of e){const o=Hs(i.gallery),r=Ds(o);for(const l of r)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 Xf({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>lo(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Ki(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Td(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function Nr(e,t,n){const i=Ki(e,t,n);return{...i,left:2*i.left-e.left}}function qf(e,t,n){const{left:i,width:o}=n,r=Td(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Id(e,t,n,i){const o=Ki(e,"left",i),r=Ki(e,"right",i),l=Nr(e,"left",i),d=Nr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Yf(e,t,n,i){const{start:o,end:r}=Id(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Uf(e,t,n){const i=Ki(e,t,n),o=Nr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Rd(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 Hs(e){if(!e)return;if(Rd(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??Il,i??o??Il]}]}function Kf(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Zf(e){const[t]=e.media;return t!=null&&t.url?t:null}function Ds(e){if(!Array.isArray(e)||e.length===0)return[];if(Rd(e)){const t=[];for(const n of e){const i=Kf(n);if(!i)continue;const o=Zf(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 lo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Jf({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return lo(e)?a.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}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Qf({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function cr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return lo(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function ey({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:x,sourceRect:b,resolveCloseSourceRect:g,onClose:h,onPrev:f,onNext:v}){const C=s.useRef(null),y=s.useRef(null),T=s.useRef(null),W=s.useRef(new Map),[_,X]=s.useState(0),D=s.useRef(null),w=s.useRef(0),R=s.useRef(0),m=s.useRef("none"),E=s.useRef(!1),I=s.useRef(!1),J=s.useRef(!1),A=s.useRef(null),Q=s.useRef(null),q=s.useRef(null),Y=s.useRef(()=>{}),oe=s.useRef(null),L=s.useRef(null),N=s.useRef(null),V=s.useRef(!1),[de,re]=s.useState(null),[M,S]=s.useState($a),[$,F]=s.useState(0),[O,te]=s.useState("opening"),[xe,ne]=s.useState(0),[ae,Z]=s.useState(0),[B,G]=s.useState(!1),[$e,he]=s.useState(null),[Re,ge]=s.useState(null),[ye,Se]=s.useState(null),[ee,ce]=s.useState(!1),[ue,Te]=s.useState(null),[ke,Ce]=s.useState(!1),U=s.useRef(!1),[fe,me]=s.useState(!1),[K,z]=s.useState(!1),be=s.useRef(n),se=s.useRef(void 0),j=t[n],_e=j?lo(j):!1,We=ae!==0||B,lt=!l&&(!r||!!d),Je=c&&!l,ct=u.length>1,it=s.useCallback((k,Le)=>t.length<=1?null:t[(k+Le+t.length)%t.length]??null,[t]),Ve=ct?bo(u,p,-1):it(n,-1),Ie=ct?bo(u,p,1):it(n,1),Ne=$e===-1&&We?ct&&Re!==null?bo(u,Re,-1):ye!==null?it(ye,-1):null:null,Oe=$e===1&&We?ct&&Re!==null?bo(u,Re,1):ye!==null?it(ye,1):null:null,Ue=Ne&&Ne.url!==(Ve==null?void 0:Ve.url)?Ne:null,pe=Oe&&Oe.url!==(Ie==null?void 0:Ie.url)?Oe:null,we=Ve&&Je?(()=>{const k=ct?Rl(u,p,-1):t.length>2?it((n-1+t.length)%t.length,-1):null;return k&&k.url!==Ve.url?k:null})():null,Ae=Ie&&Je?(()=>{const k=ct?Rl(u,p,1):t.length>2?it((n+1)%t.length,1):null;return k&&k.url!==Ie.url?k:null})():null,Xe=Ue??we,Ze=pe??Ae,Ge=s.useCallback((k,Le,Me)=>{if(!k||!Le||!Me)return;const De=W.current,rt=De.get(k);(rt==null?void 0:rt.width)===Le&&(rt==null?void 0:rt.height)===Me||(De.set(k,{width:Le,height:Me}),X(Et=>Et+1))},[]),st=s.useCallback(k=>{if(!(k!=null&&k.url))return null;const Le=W.current.get(k.url);return jf(y.current,Le)},[_,$]),Qe=s.useCallback(()=>{if(!j)return;const k=st(j);if(k){re(k);return}const Le=y.current;Le&&re(Ll(Le))},[j,st]),Fe=s.useCallback(k=>{if(ct){const Le=u.length;ge((p+k+Le)%Le),Se(null);return}t.length>1&&(Se((n+k+t.length)%t.length),ge(null))},[ct,u.length,p,t.length,n]),qe=s.useCallback(k=>{J.current=k,G(k)},[]),He=s.useCallback(()=>{A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),nt=s.useCallback(()=>{He(),A.current=window.setTimeout(()=>{He(),qe(!1)},po+32)},[He,qe]),at=s.useCallback(()=>{const k=C.current;if(!k){S({left:0,top:0,width:typeof window<"u"?window.innerWidth:$a.width,height:typeof window<"u"?window.innerHeight:$a.height});return}const Le=k.getBoundingClientRect();S({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),dt=s.useCallback((k,Le)=>{if(We){if(fe&&!B)return`translate(${ae}px, 0px)`;if(B&&$e!==null){const Me=st(k);if(!Me)return;const{x:De,y:rt}=Yf(Me,Le,$e,M);return`translate(${De}px, ${rt}px)`}if(B)return"translate(0px, 0px)"}},[We,fe,B,ae,$e,M,st]),Tt=s.useCallback(()=>{const k=Q.current;Q.current=null,He(),qe(!1),he(null),ge(null),Se(null),Z(0),me(!1),E.current=!1,R.current=0,m.current="none",k===-1?f():k===1&&v()},[He,qe,f,v]),qt=s.useCallback(()=>{He(),A.current=window.setTimeout(()=>{Q.current!==null&&Tt()},po+32)},[He,Tt]),Zt=s.useCallback(()=>{He(),Q.current=null,qe(!1),he(null),ge(null),Se(null),Z(0),me(!1),E.current=!1,R.current=0,m.current="none"},[He,qe]),xt=s.useCallback(k=>{if(!(!Je||!de)){if(J.current){if(Q.current===k){q.current=k,Tt();return}Zt()}He(),Fe(k),Q.current=k,he(k),qe(!0),qt()}},[Je,de,Tt,Zt,He,Fe,qe,qt]);Y.current=xt;const wt=s.useCallback(()=>{oe.current=null,V.current=!1,L.current!==null&&(window.clearInterval(L.current),L.current=null),N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),Bt=s.useCallback(k=>{L.current!==null&&window.clearInterval(L.current);const Le=V.current?Wf:Nf;L.current=window.setInterval(()=>{Y.current(k)},Le)},[]),At=s.useCallback(k=>{oe.current!==k&&(wt(),oe.current=k,V.current=!1,Y.current(k),Bt(k),N.current=window.setTimeout(()=>{N.current=null,oe.current===k&&(V.current=!0,Bt(k))},_f))},[wt,Bt]),vt=s.useCallback(()=>{const k=y.current;if(!k)return;const Le=j==null?void 0:j.url,Me=Le?W.current.get(Le):void 0;if(Me!=null&&Me.width&&(Me!=null&&Me.height)){re(is(k,Me.width,Me.height));return}const De=T.current;if(De&&Le&&(De.src===Le||De.currentSrc===Le)){const{width:Et,height:et}=zf(De);if(Et&&et){Ge(Le,Et,et),re(is(k,Et,et));return}}const rt=Ll(k);!rt.width||!rt.height||re(rt)},[j==null?void 0:j.url,Ge]),Ft=s.useCallback(k=>{if(T.current=k,!!k){if(k instanceof HTMLVideoElement){k.readyState>=1&&k.videoWidth>0&&vt();return}k.complete&&k.naturalWidth>0&&vt()}},[vt]),Nt=s.useCallback(()=>{at(),vt(),F(k=>k+1)},[at,vt]);s.useEffect(()=>{Nt();const k=y.current,Le=C.current,Me=new ResizeObserver(()=>Nt());return k&&Me.observe(k),Le&&Me.observe(Le),window.addEventListener("resize",Nt),()=>{Me.disconnect(),window.removeEventListener("resize",Nt)}},[Nt,n,x]),s.useLayoutEffect(()=>{if(!j)return;const k=T.current;if(k){if(k instanceof HTMLImageElement&&k.complete&&k.naturalWidth>0){vt();return}k instanceof HTMLVideoElement&&k.readyState>=1&&k.videoWidth>0&&vt()}},[j==null?void 0:j.url,n,vt]),s.useEffect(()=>{Qe()},[Qe,_]),s.useEffect(()=>{const k=new Set,Le=[],Me=De=>{!(De!=null&&De.url)||k.has(De.url)||(k.add(De.url),Le.push(De))};t.forEach(Me),u.forEach(De=>De.items.forEach(Me)),Le.forEach(De=>{W.current.has(De.url)||Vf(De,Ge)})},[t,u,Ge]),s.useEffect(()=>{if(O!=="opening"||!de)return;if(!b){te("open");return}ce(!1);const k=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(!0),te("open")})});return()=>cancelAnimationFrame(k)},[O,de,b]),s.useEffect(()=>{if(O!=="closing")return;const k=setTimeout(()=>h(),Tn);return()=>clearTimeout(k)},[O,h]),s.useEffect(()=>()=>{He()},[He]),s.useLayoutEffect(()=>{be.current===n&&se.current===(j==null?void 0:j.url)||(He(),Q.current=null,he(null),ge(null),Se(null),ne(0),Z(0),qe(!1),z(!1),me(!1),w.current=0,R.current=0,m.current="none",E.current=!1,D.current=null,I.current=!1,T.current=null,Qe(),be.current=n,se.current=j==null?void 0:j.url)},[n,j==null?void 0:j.url,qe,He,Qe]),s.useLayoutEffect(()=>{const k=q.current;k!==null&&(q.current=null,requestAnimationFrame(()=>{Y.current(k)}))},[n,p,j==null?void 0:j.url]),s.useLayoutEffect(()=>{if(O==="opening"){U.current=!1,Ce(!1);return}if(O!=="open"||U.current)return;if(!Ve&&!Ie){U.current=!0;return}Ce(!1);const k=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ce(!0),U.current=!0})});return()=>cancelAnimationFrame(k)},[O,Ve==null?void 0:Ve.url,Ie==null?void 0:Ie.url]),s.useEffect(()=>{if(O!=="open")return;const k=()=>{const et=yt=>{yt.stopPropagation(),yt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},Le=et=>{const yt=et<0?1:-1;He(),Fe(yt),Q.current=yt,he(yt),qe(!0),qt()},Me=et=>{if(Math.abs(et)>Ff&&Je){Le(et);return}Q.current=null,he(null),ge(null),Se(null),qe(!0),Z(0),nt()},De=et=>{if(et.touches.length!==1||J.current)return;const yt=et.touches[0];I.current=!0,D.current={x:yt.clientX,y:yt.clientY},m.current="none",R.current=0,E.current=!1},rt=et=>{if(!D.current||et.touches.length!==1||J.current)return;const yt=et.touches[0],Ot=yt.clientX-D.current.x,It=yt.clientY-D.current.y;if(m.current==="none"){if(Math.abs(Ot)<10&&Math.abs(It)<10)return;if(Math.abs(Ot)>Math.abs(It)){if(!Je)return;m.current="horizontal"}else if(It>0){if(!lt)return;m.current="vertical"}else return}if(m.current==="horizontal"){E.current=!0,me(!0),R.current=Ot,Z(Ot),et.preventDefault();return}m.current==="vertical"&&(E.current=!0,me(!0),w.current=It,ne(It),et.preventDefault())},Et=()=>{if(!D.current)return;const et=m.current,yt=E.current;if(yt&&et==="horizontal")Me(R.current),k();else if(yt&&et==="vertical"){const Ot=w.current;if(lt&&Ot>Af){const It=window.innerHeight;w.current=It,z(!0),ne(It),te("closing")}else w.current=0,ne(0);k()}else et==="horizontal"&&Math.abs(R.current)>0&&(Me(R.current),k());D.current=null,m.current="none",R.current=0,E.current=!1,me(!1)};return document.addEventListener("touchstart",De,{passive:!0}),document.addEventListener("touchmove",rt,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",De),document.removeEventListener("touchmove",rt),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[O,Je,qe,nt,He,lt,qt,Fe]);const Ut=s.useCallback(()=>{const k=(g==null?void 0:g())??b??null;k&&de&&(Te(k),ce(!0)),te("closing")},[g,b,de]);s.useEffect(()=>{const k=De=>{if(De.key==="Escape"){if(r&&d||O==="closing")return;wt(),Ut();return}if(De.key!=="ArrowLeft"&&De.key!=="ArrowRight"||O!=="open"||!Je)return;De.preventDefault();const rt=De.key==="ArrowLeft"?-1:1;De.repeat&&oe.current===rt||At(rt)},Le=De=>{if(De.key!=="ArrowLeft"&&De.key!=="ArrowRight")return;const rt=De.key==="ArrowLeft"?-1:1;oe.current===rt&&wt()},Me=()=>{wt()};return window.addEventListener("keydown",k),window.addEventListener("keyup",Le),window.addEventListener("blur",Me),()=>{window.removeEventListener("keydown",k),window.removeEventListener("keyup",Le),window.removeEventListener("blur",Me),wt()}},[O,r,d,Ut,Je,At,wt]),s.useEffect(()=>{O!=="open"&&wt()},[O,wt]);const Jt=()=>{O==="closing"||l||Ut()},Ct=O==="open",Wt=O==="closing",rn=xe>0?Math.max(0,1-xe/500):1,gt=xe>0?Math.max(.35,1-xe/500):1,Ee=s.useCallback(k=>{if(!(k.propertyName!=="transform"||!J.current)){if(Q.current!==null){Tt();return}He(),qe(!1)}},[He,qe,Tt]),ze=O==="closing"?ue??b:b,ot=ze&&de&&(O==="opening"||Wt)?Hf(ze,de):void 0,ht=We&&j?dt(j,"center"):xe>0?`translateY(${xe}px)`:ot,ft=de?lr(de,M):null,Lt=!!(ze&&de),mt=Lt&&(O==="closing"||O==="open"&&ee),zt={position:"absolute",top:ft==null?void 0:ft.top,left:ft==null?void 0:ft.left,width:ft==null?void 0:ft.width,height:ft==null?void 0:ft.height,objectFit:"contain",transformOrigin:"top left",transform:ht,opacity:xe>0?gt:Lt?1:O==="opening"||Wt?0:1,transition:fe&&!B?"none":B?`transform ${po}ms ${pn}`:K?`transform ${Tn}ms ${pn}, opacity ${Tn}ms ${pn}`:mt?`transform ${Tn}ms ${pn}`:O==="opening"||Wt?`opacity ${Tn}ms ${pn}`:"none",pointerEvents:_e&&Ct&&!We?"auto":"none",touchAction:_e&&Ct?"none":void 0,zIndex:1,overflow:_e?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!We?"auto":"none"},Mt=(k,Le,Me="adjacent")=>{const De=st(k);if(!De)return{display:"none"};const rt=Me==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Et}=$e!==null?Id(De,rt,$e,M):{start:Me==="far"?Nr(De,Le,M):Ki(De,Le,M)},et=lr(Et,M),yt=dt(k,rt),Ot=!We&&Me==="adjacent"&&Ct&&!ke?Uf(De,Le,M):null,It=Me==="far"&&We&&$e===(Le==="left"?-1:1),nn=fe&&!B?!1:B,un=Me==="adjacent"&&Ct&&ke&&!We;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:yt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Me==="far"?Ct&&It?1:0:Ct?1:0,transition:nn?Me==="far"?`transform ${po}ms ${pn}`:`transform ${po}ms ${pn}, opacity ${Tn}ms ${pn}`:un?`transform ${Tn}ms ${pn}`:O==="opening"||Wt?`opacity ${Tn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Vt=(k,Le)=>{const Me=st(k);return Me?qf(Ki(Me,Le,M),Le,M):null},Gt=k=>Le=>{if(!l){if(I.current){I.current=!1;return}Le.stopPropagation(),xt(k)}},Ht=Ve?Vt(Ve,"left"):null,Dt=Ie?Vt(Ie,"right"):null,_t=Ht?lr(Ht,M):null,St=Dt?lr(Dt,M):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:O==="open"?"none":void 0},onClick:Jt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?rn:0,transition:fe?"none":`opacity ${Tn}ms ${pn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Ct?1:0,transition:fe?"none":`opacity ${Tn}ms ${pn}`,pointerEvents:"none"},children:a.jsx($d,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Ct&&Xe&&a.jsx(cr,{media:Xe,style:Mt(Xe,"left","far"),onMeasure:Ge,onTransitionEnd:Ee},`far-prev-${Xe.url}`),Ct&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(cr,{media:Ve,style:Mt(Ve,"left"),onMeasure:Ge,onTransitionEnd:Ee},`prev-${Ve.url}`),_t&&a.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:l||fe?"default":"pointer",pointerEvents:l||fe?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),Ct&&Ie&&a.jsxs(a.Fragment,{children:[a.jsx(cr,{media:Ie,style:Mt(Ie,"right"),onMeasure:Ge,onTransitionEnd:Ee},`next-${Ie.url}`),St&&a.jsx("div",{style:{position:"absolute",top:St.top,left:St.left,width:St.width,height:St.height,cursor:l||fe?"default":"pointer",pointerEvents:l||fe?"none":"auto",zIndex:3},onClick:Gt(1)})]}),Ct&&Ze&&a.jsx(cr,{media:Ze,style:Mt(Ze,"right","far"),onMeasure:Ge,onTransitionEnd:Ee},`far-next-${Ze.url}`),de&&j&&(_e?a.jsx(Qf,{src:j.url,phase:O,onMediaElement:Ft,wrapperStyle:zt,videoStyle:kt,onLoadedMetadata:vt,onTransitionEnd:Ee},`${n}-${j.url}`):a.jsx("img",{ref:Ft,src:j.url,alt:j.name,onLoad:vt,onTransitionEnd:Ee,style:zt},`${n}-${j.url}`))]})}function ty({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=H.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:x}=e,b=(x==null?void 0:x.display)==="cover",g=(x==null?void 0:x.ratioValue)??"1:1",h=(x==null?void 0:x.reversed)??!1,[f,v]=g.split(":").map(Number),T=`${h?v:f} / ${h?f:v}`,W=c.entryWidth??.2,_=c.columnsCount,X=H.scalingValue(W,n),D=H.scalingValue(c.horizontalGap??0,n),w=X,R=X,m={width:w,...b?{aspectRatio:T,height:"auto",overflow:"hidden"}:{height:"auto"}},E=b?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},I=s.useRef(null),[J,A]=s.useState(!1),[Q,q]=s.useState([]),[Y,oe]=s.useState(0),[L,N]=s.useState(0),[V,de]=s.useState(null),[re,M]=s.useState({title1:"",title2:"",title3:""}),S=(()=>{const ye={},Se=I.current?getComputedStyle(I.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(ye["--cntrl-article-width"]=Se),ye})(),$=!n||i||o,F=s.useMemo(()=>kf(d),[d]),O=t??[],te=O.length%_||_,xe=te<_&&O.length>0,ne=O.length-te,ae=xe?Math.floor((_-te)/2)+1:1,Z=s.useMemo(()=>Of(O),[O]),B=s.useMemo(()=>Gf(O),[O]),G=(ye,Se,ee)=>{if(n&&!o&&!i)return;const ce=Z.findIndex(Te=>Te.gridIndex===ye);if(ce<0)return;const ue=Z[ce];N(ce),q(ue.items),oe(Se),M(ue.entry),de(ee??null),A(!0)},$e=s.useCallback(()=>{A(!1),de(null)},[]),he=s.useCallback(()=>{const ye=Z[L];return!ye||!I.current?V:Df(I.current,ye.gridIndex,b?"cover":"contain")??V},[Z,L,V,b]),Re=s.useCallback(ye=>{if(Z.length>1){const Se=Z.length,ee=(L+ye+Se)%Se,ce=Z[ee],ue=Math.min(Y,ce.items.length-1);N(ee),q(ce.items),oe(ue),M(ce.entry);return}oe(Se=>(Se+ye+Q.length)%Q.length)},[Z,L,Y,Q.length]),ge=Z.length>1||Q.length>1;return s.useEffect(()=>{if(!J||typeof document>"u")return;const ye=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ye}},[J]),s.useEffect(()=>{!n||o||i||A(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:F}}),a.jsx(Xf,{mediaList:B}),a.jsx("div",{ref:I,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${_}, ${X})`,rowGap:0,columnGap:D,width:H.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:H.scalingValue(u??0,n)},children:O.map((ye,Se)=>{const ee=Hs(ye.gallery),ce=Ds(ee),ue=ce.filter(me=>me.lightboxMedia).map(me=>me.lightboxMedia),Te=Math.floor(Se/_)===Math.ceil(O.length/_)-1,ke=xe&&Se>=ne?`${ae+(Se-ne)}`:void 0,Ce=ce[0],U=Ce!=null&&Ce.lightboxMedia?ue.findIndex(me=>me.url===Ce.lightboxMedia.url):-1,fe=a.jsx("div",{className:`${d}-item-image-wrapper`,style:m,children:ce.length>0&&a.jsx(Jf,{media:Ce.displayMedia,gridIndex:Se,className:`${d}-item-${lo(Ce.displayMedia)?"video":"image"}`.trim(),style:E,onMediaClick:$&&U>=0?me=>G(Se,U,Cd(me.currentTarget,b?"cover":"contain")):void 0})});return a.jsx("div",{className:`${d}-item`,children:a.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,Te?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:X,...ke?{gridColumn:ke}:{}},children:[a.jsx("div",{className:`${d}-item-title-row`,children:a.jsx("div",{style:{height:0,width:R}})}),a.jsx("a",{className:`${d}-item-image-link`,children:fe}),a.jsx("div",{className:`${d}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:R}})})]})},Se)})}),J&&typeof document<"u"&&(()=>{const ye=(l?document.getElementById(l):null)??document.body;return Bn.createPortal(a.jsx("div",{style:S,"data-selection":"none",children:a.jsx(ey,{prefix:d,items:Q,index:Y,entry:re,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ge,lightboxEntries:Z,entryIdx:L,layoutId:r,sourceRect:V,resolveCloseSourceRect:he,onClose:$e,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),ye)})()]})}const ny=`import { CommonComponentProps } from '../props';
7505
+ `}const El={url:"",name:"",objectFit:"cover"},Tn=500,go=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Nf=72,Wf=50,Hf=1e4,Df=650,Of=500;function Bf(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Ld(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Nr(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 zf(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Ld(i,n):null}function jf(e){return e.reduce((t,n,i)=>{const o=zs(n.gallery),l=js(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 So(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 Ml(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return So(e,i,n)}const Vf=.03;function Pd(e){return e.width*Vf}const $a={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function dr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function kl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Gf(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function is(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function Xf(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:is(e,t.width,t.height)}function qf(e,t){if(uo(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 Yf(e){const t=new Set,n=[];for(const i of e){const o=zs(i.gallery),r=js(o);for(const l of r)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 Uf({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>uo(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Ji(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Pd(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function Wr(e,t,n){const i=Ji(e,t,n);return{...i,left:2*i.left-e.left}}function Kf(e,t,n){const{left:i,width:o}=n,r=Pd(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Ed(e,t,n,i){const o=Ji(e,"left",i),r=Ji(e,"right",i),l=Wr(e,"left",i),d=Wr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Zf(e,t,n,i){const{start:o,end:r}=Ed(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Jf(e,t,n){const i=Ji(e,t,n),o=Wr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Md(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 zs(e){if(!e)return;if(Md(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??El,i??o??El]}]}function Qf(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function ey(e){const[t]=e.media;return t!=null&&t.url?t:null}function js(e){if(!Array.isArray(e)||e.length===0)return[];if(Md(e)){const t=[];for(const n of e){const i=Qf(n);if(!i)continue;const o=ey(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 uo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function ty({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return uo(e)?a.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}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function ny({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function ur({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return uo(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function iy({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:w,resolveCloseSourceRect:m,onClose:h,onPrev:f,onNext:x}){const C=s.useRef(null),y=s.useRef(null),S=s.useRef(null),B=s.useRef(new Map),[N,q]=s.useState(0),D=s.useRef(null),T=s.useRef(0),H=s.useRef(0),$=s.useRef("none"),I=s.useRef(!1),P=s.useRef(!1),E=s.useRef(!1),g=s.useRef(null),z=s.useRef(null),F=s.useRef(null),X=s.useRef(()=>{}),ie=s.useRef(null),L=s.useRef(null),_=s.useRef(null),V=s.useRef(!1),[ae,re]=s.useState(null),[M,se]=s.useState($a),[j,b]=s.useState(0),[k,G]=s.useState("opening"),[he,J]=s.useState(0),[ee,O]=s.useState(0),[Z,te]=s.useState(!1),[Le,ve]=s.useState(null),[Ie,pe]=s.useState(null),[oe,ye]=s.useState(null),[U,ce]=s.useState(!1),[le,Ce]=s.useState(null),[Fe,Ee]=s.useState(!1),Y=s.useRef(!1),[be,de]=s.useState(!1),[K,ue]=s.useState(!1),He=s.useRef(n),fe=s.useRef(void 0),Q=t[n],Je=Q?uo(Q):!1,Ne=ee!==0||Z,ct=!l&&(!r||!!d),Ke=c&&!l,ut=u.length>1,lt=s.useCallback((A,Pe)=>t.length<=1?null:t[(A+Pe+t.length)%t.length]??null,[t]),Ye=ut?So(u,p,-1):lt(n,-1),Re=ut?So(u,p,1):lt(n,1),We=Le===-1&&Ne?ut&&Ie!==null?So(u,Ie,-1):oe!==null?lt(oe,-1):null:null,Be=Le===1&&Ne?ut&&Ie!==null?So(u,Ie,1):oe!==null?lt(oe,1):null:null,Ue=We&&We.url!==(Ye==null?void 0:Ye.url)?We:null,ge=Be&&Be.url!==(Re==null?void 0:Re.url)?Be:null,xe=Ye&&Ke?(()=>{const A=ut?Ml(u,p,-1):t.length>2?lt((n-1+t.length)%t.length,-1):null;return A&&A.url!==Ye.url?A:null})():null,_e=Re&&Ke?(()=>{const A=ut?Ml(u,p,1):t.length>2?lt((n+1)%t.length,1):null;return A&&A.url!==Re.url?A:null})():null,Ze=Ue??xe,we=ge??_e,$e=s.useCallback((A,Pe,Ae)=>{if(!A||!Pe||!Ae)return;const Oe=B.current,at=Oe.get(A);(at==null?void 0:at.width)===Pe&&(at==null?void 0:at.height)===Ae||(Oe.set(A,{width:Pe,height:Ae}),q(Et=>Et+1))},[]),Xe=s.useCallback(A=>{if(!(A!=null&&A.url))return null;const Pe=B.current.get(A.url);return Xf(y.current,Pe)},[N,j]),ze=s.useCallback(()=>{if(!Q)return;const A=Xe(Q);if(A){re(A);return}const Pe=y.current;Pe&&re(kl(Pe))},[Q,Xe]),Te=s.useCallback(A=>{if(ut){const Pe=u.length;pe((p+A+Pe)%Pe),ye(null);return}t.length>1&&(ye((n+A+t.length)%t.length),pe(null))},[ut,u.length,p,t.length,n]),Ve=s.useCallback(A=>{E.current=A,te(A)},[]),De=s.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),tt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{De(),Ve(!1)},go+32)},[De,Ve]),nt=s.useCallback(()=>{const A=C.current;if(!A){se({left:0,top:0,width:typeof window<"u"?window.innerWidth:$a.width,height:typeof window<"u"?window.innerHeight:$a.height});return}const Pe=A.getBoundingClientRect();se({left:Pe.left,top:Pe.top,width:Pe.width,height:Pe.height})},[]),st=s.useCallback((A,Pe)=>{if(Ne){if(be&&!Z)return`translate(${ee}px, 0px)`;if(Z&&Le!==null){const Ae=Xe(A);if(!Ae)return;const{x:Oe,y:at}=Zf(Ae,Pe,Le,M);return`translate(${Oe}px, ${at}px)`}if(Z)return"translate(0px, 0px)"}},[Ne,be,Z,ee,Le,M,Xe]),St=s.useCallback(()=>{const A=z.current;z.current=null,De(),Ve(!1),ve(null),pe(null),ye(null),O(0),de(!1),I.current=!1,H.current=0,$.current="none",A===-1?f():A===1&&x()},[De,Ve,f,x]),Bt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{z.current!==null&&St()},go+32)},[De,St]),zt=s.useCallback(()=>{De(),z.current=null,Ve(!1),ve(null),pe(null),ye(null),O(0),de(!1),I.current=!1,H.current=0,$.current="none"},[De,Ve]),ft=s.useCallback(A=>{if(!(!Ke||!ae)){if(E.current){if(z.current===A){F.current=A,St();return}zt()}De(),Te(A),z.current=A,ve(A),Ve(!0),Bt()}},[Ke,ae,St,zt,De,Te,Ve,Bt]);X.current=ft;const wt=s.useCallback(()=>{ie.current=null,V.current=!1,L.current!==null&&(window.clearInterval(L.current),L.current=null),_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),jt=s.useCallback(A=>{L.current!==null&&window.clearInterval(L.current);const Pe=V.current?Of:Df;L.current=window.setInterval(()=>{X.current(A)},Pe)},[]),At=s.useCallback(A=>{ie.current!==A&&(wt(),ie.current=A,V.current=!1,X.current(A),jt(A),_.current=window.setTimeout(()=>{_.current=null,ie.current===A&&(V.current=!0,jt(A))},Hf))},[wt,jt]),xt=s.useCallback(()=>{const A=y.current;if(!A)return;const Pe=Q==null?void 0:Q.url,Ae=Pe?B.current.get(Pe):void 0;if(Ae!=null&&Ae.width&&(Ae!=null&&Ae.height)){re(is(A,Ae.width,Ae.height));return}const Oe=S.current;if(Oe&&Pe&&(Oe.src===Pe||Oe.currentSrc===Pe)){const{width:Et,height:it}=Gf(Oe);if(Et&&it){$e(Pe,Et,it),re(is(A,Et,it));return}}const at=kl(A);!at.width||!at.height||re(at)},[Q==null?void 0:Q.url,$e]),Ft=s.useCallback(A=>{if(S.current=A,!!A){if(A instanceof HTMLVideoElement){A.readyState>=1&&A.videoWidth>0&&xt();return}A.complete&&A.naturalWidth>0&&xt()}},[xt]),Nt=s.useCallback(()=>{nt(),xt(),b(A=>A+1)},[nt,xt]);s.useEffect(()=>{Nt();const A=y.current,Pe=C.current,Ae=new ResizeObserver(()=>Nt());return A&&Ae.observe(A),Pe&&Ae.observe(Pe),window.addEventListener("resize",Nt),()=>{Ae.disconnect(),window.removeEventListener("resize",Nt)}},[Nt,n,v]),s.useLayoutEffect(()=>{if(!Q)return;const A=S.current;if(A){if(A instanceof HTMLImageElement&&A.complete&&A.naturalWidth>0){xt();return}A instanceof HTMLVideoElement&&A.readyState>=1&&A.videoWidth>0&&xt()}},[Q==null?void 0:Q.url,n,xt]),s.useEffect(()=>{ze()},[ze,N]),s.useEffect(()=>{const A=new Set,Pe=[],Ae=Oe=>{!(Oe!=null&&Oe.url)||A.has(Oe.url)||(A.add(Oe.url),Pe.push(Oe))};t.forEach(Ae),u.forEach(Oe=>Oe.items.forEach(Ae)),Pe.forEach(Oe=>{B.current.has(Oe.url)||qf(Oe,$e)})},[t,u,$e]),s.useEffect(()=>{if(k!=="opening"||!ae)return;if(!w){G("open");return}ce(!1);const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(!0),G("open")})});return()=>cancelAnimationFrame(A)},[k,ae,w]),s.useEffect(()=>{if(k!=="closing")return;const A=setTimeout(()=>h(),Tn);return()=>clearTimeout(A)},[k,h]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{He.current===n&&fe.current===(Q==null?void 0:Q.url)||(De(),z.current=null,ve(null),pe(null),ye(null),J(0),O(0),Ve(!1),ue(!1),de(!1),T.current=0,H.current=0,$.current="none",I.current=!1,D.current=null,P.current=!1,S.current=null,ze(),He.current=n,fe.current=Q==null?void 0:Q.url)},[n,Q==null?void 0:Q.url,Ve,De,ze]),s.useLayoutEffect(()=>{const A=F.current;A!==null&&(F.current=null,requestAnimationFrame(()=>{X.current(A)}))},[n,p,Q==null?void 0:Q.url]),s.useLayoutEffect(()=>{if(k==="opening"){Y.current=!1,Ee(!1);return}if(k!=="open"||Y.current)return;if(!Ye&&!Re){Y.current=!0;return}Ee(!1);const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ee(!0),Y.current=!0})});return()=>cancelAnimationFrame(A)},[k,Ye==null?void 0:Ye.url,Re==null?void 0:Re.url]),s.useEffect(()=>{if(k!=="open")return;const A=()=>{const it=vt=>{vt.stopPropagation(),vt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0)},Pe=it=>{const vt=it<0?1:-1;De(),Te(vt),z.current=vt,ve(vt),Ve(!0),Bt()},Ae=it=>{if(Math.abs(it)>Wf&&Ke){Pe(it);return}z.current=null,ve(null),pe(null),ye(null),Ve(!0),O(0),tt()},Oe=it=>{if(it.touches.length!==1||E.current)return;const vt=it.touches[0];P.current=!0,D.current={x:vt.clientX,y:vt.clientY},$.current="none",H.current=0,I.current=!1},at=it=>{if(!D.current||it.touches.length!==1||E.current)return;const vt=it.touches[0],Ot=vt.clientX-D.current.x,It=vt.clientY-D.current.y;if($.current==="none"){if(Math.abs(Ot)<10&&Math.abs(It)<10)return;if(Math.abs(Ot)>Math.abs(It)){if(!Ke)return;$.current="horizontal"}else if(It>0){if(!ct)return;$.current="vertical"}else return}if($.current==="horizontal"){I.current=!0,de(!0),H.current=Ot,O(Ot),it.preventDefault();return}$.current==="vertical"&&(I.current=!0,de(!0),T.current=It,J(It),it.preventDefault())},Et=()=>{if(!D.current)return;const it=$.current,vt=I.current;if(vt&&it==="horizontal")Ae(H.current),A();else if(vt&&it==="vertical"){const Ot=T.current;if(ct&&Ot>Nf){const It=window.innerHeight;T.current=It,ue(!0),J(It),G("closing")}else T.current=0,J(0);A()}else it==="horizontal"&&Math.abs(H.current)>0&&(Ae(H.current),A());D.current=null,$.current="none",H.current=0,I.current=!1,de(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[k,Ke,Ve,tt,De,ct,Bt,Te]);const Kt=s.useCallback(()=>{const A=(m==null?void 0:m())??w??null;A&&ae&&(Ce(A),ce(!0)),G("closing")},[m,w,ae]);s.useEffect(()=>{const A=Oe=>{if(Oe.key==="Escape"){if(r&&d||k==="closing")return;wt(),Kt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||k!=="open"||!Ke)return;Oe.preventDefault();const at=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&ie.current===at||At(at)},Pe=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const at=Oe.key==="ArrowLeft"?-1:1;ie.current===at&&wt()},Ae=()=>{wt()};return window.addEventListener("keydown",A),window.addEventListener("keyup",Pe),window.addEventListener("blur",Ae),()=>{window.removeEventListener("keydown",A),window.removeEventListener("keyup",Pe),window.removeEventListener("blur",Ae),wt()}},[k,r,d,Kt,Ke,At,wt]),s.useEffect(()=>{k!=="open"&&wt()},[k,wt]);const Jt=()=>{k==="closing"||l||Kt()},Tt=k==="open",Wt=k==="closing",rn=he>0?Math.max(0,1-he/500):1,gt=he>0?Math.max(.35,1-he/500):1,ke=s.useCallback(A=>{if(!(A.propertyName!=="transform"||!E.current)){if(z.current!==null){St();return}De(),Ve(!1)}},[De,Ve,St]),Ge=k==="closing"?le??w:w,rt=Ge&&ae&&(k==="opening"||Wt)?Bf(Ge,ae):void 0,ht=Ne&&Q?st(Q,"center"):he>0?`translateY(${he}px)`:rt,yt=ae?dr(ae,M):null,Lt=!!(Ge&&ae),mt=Lt&&(k==="closing"||k==="open"&&U),Vt={position:"absolute",top:yt==null?void 0:yt.top,left:yt==null?void 0:yt.left,width:yt==null?void 0:yt.width,height:yt==null?void 0:yt.height,objectFit:"contain",transformOrigin:"top left",transform:ht,opacity:he>0?gt:Lt?1:k==="opening"||Wt?0:1,transition:be&&!Z?"none":Z?`transform ${go}ms ${pn}`:K?`transform ${Tn}ms ${pn}, opacity ${Tn}ms ${pn}`:mt?`transform ${Tn}ms ${pn}`:k==="opening"||Wt?`opacity ${Tn}ms ${pn}`:"none",pointerEvents:Je&&Tt&&!Ne?"auto":"none",touchAction:Je&&Tt?"none":void 0,zIndex:1,overflow:Je?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Tt&&!Ne?"auto":"none"},Mt=(A,Pe,Ae="adjacent")=>{const Oe=Xe(A);if(!Oe)return{display:"none"};const at=Ae==="far"?Pe==="left"?"far-left":"far-right":Pe==="left"?"left-adjacent":"right-adjacent",{start:Et}=Le!==null?Ed(Oe,at,Le,M):{start:Ae==="far"?Wr(Oe,Pe,M):Ji(Oe,Pe,M)},it=dr(Et,M),vt=st(A,at),Ot=!Ne&&Ae==="adjacent"&&Tt&&!Fe?Jf(Oe,Pe,M):null,It=Ae==="far"&&Ne&&Le===(Pe==="left"?-1:1),nn=be&&!Z?!1:Z,un=Ae==="adjacent"&&Tt&&Fe&&!Ne;return{position:"absolute",top:it.top,left:it.left,width:it.width,height:it.height,objectFit:"contain",transform:vt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Ae==="far"?Tt&&It?1:0:Tt?1:0,transition:nn?Ae==="far"?`transform ${go}ms ${pn}`:`transform ${go}ms ${pn}, opacity ${Tn}ms ${pn}`:un?`transform ${Tn}ms ${pn}`:k==="opening"||Wt?`opacity ${Tn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Xt=(A,Pe)=>{const Ae=Xe(A);return Ae?Kf(Ji(Ae,Pe,M),Pe,M):null},qt=A=>Pe=>{if(!l){if(P.current){P.current=!1;return}Pe.stopPropagation(),ft(A)}},Ht=Ye?Xt(Ye,"left"):null,Dt=Re?Xt(Re,"right"):null,_t=Ht?dr(Ht,M):null,Ct=Dt?dr(Dt,M):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:k==="open"?"none":void 0},onClick:Jt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Tt?rn:0,transition:be?"none":`opacity ${Tn}ms ${pn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Tt?1:0,transition:be?"none":`opacity ${Tn}ms ${pn}`,pointerEvents:"none"},children:a.jsx(Rd,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Tt&&Ze&&a.jsx(ur,{media:Ze,style:Mt(Ze,"left","far"),onMeasure:$e,onTransitionEnd:ke},`far-prev-${Ze.url}`),Tt&&Ye&&a.jsxs(a.Fragment,{children:[a.jsx(ur,{media:Ye,style:Mt(Ye,"left"),onMeasure:$e,onTransitionEnd:ke},`prev-${Ye.url}`),_t&&a.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:l||be?"default":"pointer",pointerEvents:l||be?"none":"auto",zIndex:3},onClick:qt(-1)})]}),Tt&&Re&&a.jsxs(a.Fragment,{children:[a.jsx(ur,{media:Re,style:Mt(Re,"right"),onMeasure:$e,onTransitionEnd:ke},`next-${Re.url}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||be?"default":"pointer",pointerEvents:l||be?"none":"auto",zIndex:3},onClick:qt(1)})]}),Tt&&we&&a.jsx(ur,{media:we,style:Mt(we,"right","far"),onMeasure:$e,onTransitionEnd:ke},`far-next-${we.url}`),ae&&Q&&(Je?a.jsx(ny,{src:Q.url,phase:k,onMediaElement:Ft,wrapperStyle:Vt,videoStyle:kt,onLoadedMetadata:xt,onTransitionEnd:ke},`${n}-${Q.url}`):a.jsx("img",{ref:Ft,src:Q.url,alt:Q.name,onLoad:xt,onTransitionEnd:ke,style:Vt},`${n}-${Q.url}`))]})}function oy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=W.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:v}=e,w=(v==null?void 0:v.display)==="cover",m=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[f,x]=m.split(":").map(Number),S=`${h?x:f} / ${h?f:x}`,B=c.entryWidth??.2,N=c.columnsCount,q=W.scalingValue(B,n),D=W.scalingValue(c.horizontalGap??0,n),T=q,H=q,$={width:T,...w?{aspectRatio:S,height:"auto",overflow:"hidden"}:{height:"auto"}},I=w?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},P=s.useRef(null),[E,g]=s.useState(!1),[z,F]=s.useState([]),[X,ie]=s.useState(0),[L,_]=s.useState(0),[V,ae]=s.useState(null),[re,M]=s.useState({title1:"",title2:"",title3:""}),se=(()=>{const oe={},ye=P.current?getComputedStyle(P.current).getPropertyValue("--cntrl-article-width").trim():"";return ye&&(oe["--cntrl-article-width"]=ye),oe})(),j=!n||i||o,b=s.useMemo(()=>_f(d),[d]),k=t??[],G=k.length%N||N,he=G<N&&k.length>0,J=k.length-G,ee=he?Math.floor((N-G)/2)+1:1,O=s.useMemo(()=>jf(k),[k]),Z=s.useMemo(()=>Yf(k),[k]),te=(oe,ye,U)=>{if(n&&!o&&!i)return;const ce=O.findIndex(Ce=>Ce.gridIndex===oe);if(ce<0)return;const le=O[ce];_(ce),F(le.items),ie(ye),M(le.entry),ae(U??null),g(!0)},Le=s.useCallback(()=>{g(!1),ae(null)},[]),ve=s.useCallback(()=>{const oe=O[L];return!oe||!P.current?V:zf(P.current,oe.gridIndex,w?"cover":"contain")??V},[O,L,V,w]),Ie=s.useCallback(oe=>{if(O.length>1){const ye=O.length,U=(L+oe+ye)%ye,ce=O[U],le=Math.min(X,ce.items.length-1);_(U),F(ce.items),ie(le),M(ce.entry);return}ie(ye=>(ye+oe+z.length)%z.length)},[O,L,X,z.length]),pe=O.length>1||z.length>1;return s.useEffect(()=>{if(!E||typeof document>"u")return;const oe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=oe}},[E]),s.useEffect(()=>{!n||o||i||g(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:b}}),a.jsx(Uf,{mediaList:Z}),a.jsx("div",{ref:P,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${N}, ${q})`,rowGap:0,columnGap:D,width:W.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:W.scalingValue(u??0,n)},children:k.map((oe,ye)=>{const U=zs(oe.gallery),ce=js(U),le=ce.filter(de=>de.lightboxMedia).map(de=>de.lightboxMedia),Ce=Math.floor(ye/N)===Math.ceil(k.length/N)-1,Fe=he&&ye>=J?`${ee+(ye-J)}`:void 0,Ee=ce[0],Y=Ee!=null&&Ee.lightboxMedia?le.findIndex(de=>de.url===Ee.lightboxMedia.url):-1,be=a.jsx("div",{className:`${d}-item-image-wrapper`,style:$,children:ce.length>0&&a.jsx(ty,{media:Ee.displayMedia,gridIndex:ye,className:`${d}-item-${uo(Ee.displayMedia)?"video":"image"}`.trim(),style:I,onMediaClick:j&&Y>=0?de=>te(ye,Y,Ld(de.currentTarget,w?"cover":"contain")):void 0})});return a.jsx("div",{className:`${d}-item`,children:a.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,Ce?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:q,...Fe?{gridColumn:Fe}:{}},children:[a.jsx("div",{className:`${d}-item-title-row`,children:a.jsx("div",{style:{height:0,width:H}})}),a.jsx("a",{className:`${d}-item-image-link`,children:be}),a.jsx("div",{className:`${d}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:H}})})]})},ye)})}),E&&typeof document<"u"&&(()=>{const oe=(l?document.getElementById(l):null)??document.body;return zn.createPortal(a.jsx("div",{style:se,"data-selection":"none",children:a.jsx(iy,{prefix:d,items:z,index:X,entry:re,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:pe,lightboxEntries:O,entryIdx:L,layoutId:r,sourceRect:V,resolveCloseSourceRect:ve,onClose:Le,onPrev:()=>Ie(-1),onNext:()=>Ie(1)})}),oe)})()]})}const ry=`import { CommonComponentProps } from '../props';
7506
7506
  import { scalingValue, useScopedStyles } from '../utils/index';
7507
7507
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7508
7508
  import { createPortal } from 'react-dom';
@@ -9845,11 +9845,11 @@ export function Hive({
9845
9845
  </>
9846
9846
  );
9847
9847
  }
9848
- `,iy="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ui={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 oy(e){const t={};return t[tt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[tt(e,"fontSettings")]={...ui.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[tt(e,"fontSize")]={...ui.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[tt(e,"lineHeight")]={...ui.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[tt(e,"letterSpacing")]={...ui.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[tt(e,"wordSpacing")]={...ui.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[tt(e,"textAlign")]={...ui.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[tt(e,"textAppearance")]={...ui.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Zi=ni.filter(e=>e!=="count"),ry=Zi.reduce((e,t)=>({...e,...oy(t)}),{}),ay=Zi.reduce((e,t)=>({...e,[tt(t,"fontFamily")]:"Arial",[tt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[tt(t,"letterSpacing")]:0,[tt(t,"wordSpacing")]:0,[tt(t,"textAlign")]:"left",[tt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ca(e){return Zi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[tt(n,"fontSize")]=i),o!==void 0&&(t[tt(n,"lineHeight")]=o),t},{})}const sy={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Zi.map(e=>[Ns[e],Ws(e)]))},ly={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},cy=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...ly,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),dy={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:cy},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"}},...ry},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:iy,closeIconColor:"#000000",closeIconHoverColor:"#999999",...ay},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,...Ca({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,...Ca({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,...Ca({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:[sy]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},uy={element:ty,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:[...Zi.map(e=>({path:`${tt(e,"fontFamily")}`}))]},fontRelations:{...Zi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${tt(t,"fontFamily")}`}),{})},schema:dy,sourceCode:ny};function py(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 my({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Ta(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function gy(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 El(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 Ml(e,t,n,i,o,r,l){const d=H.scalingValue(r,l),c=H.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function hy(e,t,n){const i=H.scalingValue(t,n),o=H.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const kl=10,Al=10,mo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function fy(e,t,n){return Math.max(t,Math.min(n,e))}function Ia(e,t,n){return e+(t-e)*n}function yy(e,t,n,i){if(!t)return{x:0,y:0};const o=t.offsetWidth,l=t.offsetHeight/2;if(e==="cursor"&&n){const d=t.getBoundingClientRect();return{x:n.clientX-d.left+kl,y:n.clientY-d.top+kl}}switch(e){case"left":return{x:Al+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Al-i/2,y:l};default:return{x:o/2,y:l}}}function vy(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const g=n.current,h=i.current;g&&(g.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=s.useCallback(()=>{const g=i.current;t?(g.x=Ia(g.x,g.targetX,mo.positionEase),g.y=Ia(g.y,g.targetY,mo.positionEase),g.rotation=Ia(g.rotation,g.targetRotation,mo.rotationEase)):(g.x=g.targetX,g.y=g.targetY,g.rotation=g.targetRotation),r();const h=Math.abs(g.x-g.targetX)<.4&&Math.abs(g.y-g.targetY)<.4,f=Math.abs(g.rotation-g.targetRotation)<.08;!h||!f?o.current=requestAnimationFrame(d):o.current=null},[r,t]),c=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=s.useCallback((g,h)=>{const f=i.current;f.targetX=g,f.targetY=h,f.targetRotation=0,f.x=g,f.y=h,f.rotation=0,f.lastX=g,f.hasLastX=!0,r(),t&&c()},[r,t,c]),p=s.useCallback((g,h)=>{if(!e)return;const f=i.current;if(t&&f.hasLastX){const v=g-f.lastX;f.targetRotation=fy(v*mo.rotationFactor,-20,mo.maxRotation)}else f.targetRotation=0;if(f.lastX=g,f.hasLastX=!0,f.targetX=g,f.targetY=h,t){c();return}f.x=g,f.y=h,f.rotation=f.targetRotation,r()},[e,r,t,c]),x=s.useCallback(g=>{l(),i.current.hasLastX=!1,g==null||g()},[l]),b=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||b(),l),[e,b,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:x,reset:b}}function xy(e){return`
9848
+ `,ay="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>'),pi={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 sy(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...pi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...pi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...pi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...pi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...pi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...pi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...pi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Qi=ii.filter(e=>e!=="count"),ly=Qi.reduce((e,t)=>({...e,...sy(t)}),{}),cy=Qi.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Arial",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ta(e){return Qi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const dy={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Qi.map(e=>[Os[e],Bs(e)]))},uy={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},py=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...uy,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),my={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:py},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"}},...ly},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:ay,closeIconColor:"#000000",closeIconHoverColor:"#999999",...cy},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,...Ta({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,...Ta({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,...Ta({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:[dy]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},gy={element:oy,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:[...Qi.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{...Qi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})},schema:my,sourceCode:ry};function hy(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 fy({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Ia(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function yy(e){return String(e??"").trim().length>0}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){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function _l(e,t,n,i,o,r,l){const d=W.scalingValue(r,l),c=W.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function vy(e,t,n){const i=W.scalingValue(t,n),o=W.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Nl=10,Wl=10,ho={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function xy(e,t,n){return Math.max(t,Math.min(n,e))}function Ra(e,t,n){return e+(t-e)*n}function by(e,t,n,i){if(!t)return{x:0,y:0};const o=t.offsetWidth,l=t.offsetHeight/2;if(e==="cursor"&&n){const d=t.getBoundingClientRect();return{x:n.clientX-d.left+Nl,y:n.clientY-d.top+Nl}}switch(e){case"left":return{x:Wl+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Wl-i/2,y:l};default:return{x:o/2,y:l}}}function wy(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,h=i.current;m&&(m.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=s.useCallback(()=>{const m=i.current;t?(m.x=Ra(m.x,m.targetX,ho.positionEase),m.y=Ra(m.y,m.targetY,ho.positionEase),m.rotation=Ra(m.rotation,m.targetRotation,ho.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const h=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,f=Math.abs(m.rotation-m.targetRotation)<.08;!h||!f?o.current=requestAnimationFrame(d):o.current=null},[r,t]),c=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=s.useCallback((m,h)=>{const f=i.current;f.targetX=m,f.targetY=h,f.targetRotation=0,f.x=m,f.y=h,f.rotation=0,f.lastX=m,f.hasLastX=!0,r(),t&&c()},[r,t,c]),p=s.useCallback((m,h)=>{if(!e)return;const f=i.current;if(t&&f.hasLastX){const x=m-f.lastX;f.targetRotation=xy(x*ho.rotationFactor,-20,ho.maxRotation)}else f.targetRotation=0;if(f.lastX=m,f.hasLastX=!0,f.targetX=m,f.targetY=h,t){c();return}f.x=m,f.y=h,f.rotation=f.targetRotation,r()},[e,r,t,c]),v=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),w=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||w(),l),[e,w,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:v,reset:w}}function Sy(e){return`
9849
9849
  .${e}-wrapper {
9850
9850
  display: grid;
9851
9851
  align-items: start;
9852
- min-height: ${Ta(48)};
9852
+ min-height: ${Ia(48)};
9853
9853
  position: relative;
9854
9854
  overflow: visible;
9855
9855
  box-sizing: border-box;
@@ -9978,7 +9978,7 @@ a.${e}-list-item {
9978
9978
  flex-shrink: 0;
9979
9979
  overflow: visible;
9980
9980
  box-sizing: border-box;
9981
- min-width: ${Ta(50)};
9981
+ min-width: ${Ia(50)};
9982
9982
  position: relative;
9983
9983
  display: flex;
9984
9984
  align-items: flex-start;
@@ -9986,7 +9986,7 @@ a.${e}-list-item {
9986
9986
 
9987
9987
  .${e}-list-col-last {
9988
9988
  flex: 1 1 auto;
9989
- min-width: ${Ta(50)};
9989
+ min-width: ${Ia(50)};
9990
9990
  }
9991
9991
 
9992
9992
  .${e}-list-col-title {
@@ -10221,7 +10221,7 @@ a.${e}-list-item {
10221
10221
  overflow-wrap: anywhere;
10222
10222
  word-break: break-word;
10223
10223
  }
10224
- `}const ii=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Os=["AColumn","BColumn","CColumn","DColumn","EColumn"],Wn="cutLabel",_o=[...Os,Wn],oa=["A","B","C","D","E"];function Ld(e){return`${e}ColumnVerticalAlign`}const os=["Top","Center","Bottom"];function Bs(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return oa.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function by(e){const t=Bs(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function wy(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return oa.includes(n)?n:null}function Pd(e,t,n){const i=wy(e);return i?i===t?!1:by(n[Ld(i)]):!0}function No(e){const t=Bs(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return oa.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Sy(e,t,n){if(Ed(e,t,n))return No(e);const i=No(e);return i.kind==="baseline"?{kind:"top"}:i}function $y(e){const t=No(e);return t.kind==="baseline"?{kind:"top"}:t}function Ed(e,t,n){return Pd(e,n,t)?No(e).kind==="baseline":!1}function Cy(e){const t={};let n=!1;for(const i of oa){const o=Ld(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}Pd(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Ty(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Iy(e){const t=No(e).kind;return t==="baseline"?"center":t}function Ry(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Fl(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Ly(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(),r=o-i;return n.remove(),r}function Ra(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=Ly(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=r.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 Py(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function Ey(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const My={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Pt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const ky={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Ay(e){return[Pt(e,"textFontFamily"),Pt(e,"textFontSettings"),{type:"row",items:[Pt(e,"textFontSize"),Pt(e,"textLineHeight"),Pt(e,"textLetterSpacing"),Pt(e,"textWordSpacing")]},Pt(e,"textTextAlign"),Pt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Fy(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(_o.map(e=>[ky[e],Ay(e)]))}}function Wr(e,t){const n=i=>{const o=Pt(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===Wn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function _l(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 an(Yt(n,t))}function Nl(e,t,n,i){const o=Wr(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Wl(e,t,n,i){const o=Wr(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:H.scalingValue((r-l)/2,i)}}const vn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ji=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Qi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],eo=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],_y={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Ny=["hover","focus","filled","success","error"],Hl=.004,Wi=.004,La=Wi,zs=50,Wo=1440,Ho=zs/Wo;function Md(e){const t=typeof e=="number"&&e>0?e:Wo;return zs/t}function Wy(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 Wo}const kd={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function To(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Hy(e,t=1){const n=t/e;return Object.fromEntries(vn.map(i=>[i,n]))}function Dy(){return Object.fromEntries([...Ji.map(e=>[e,0]),...Qi.map(e=>[e,0])])}function Oy(){return Object.fromEntries(eo.map(e=>[e,0]))}function dr(e){return Object.fromEntries(vn.map(t=>[t,typeof e[t]=="number"?e[t]:kd[t]]))}function Ad(e,t,n){const i=e-Ho,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function Tr(e,t,n){const i=js(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function By(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Ji[o],l=Qi[o],d=typeof n[r]=="number"?n[r]:0,c=typeof n[l]=="number"?n[l]:0,u=Ad(t[o]??0,d,c);u.paddingLeft!==d&&(i[r]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function js(e,t,n){if(e<=0)return[];const i=vn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+Ho;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 p=d[u]-Ho;if(p<=0)continue;const x=Math.min(c,p);d[u]-=x,c-=x}return[...d,i[e-1]]}function zy(e,t,n){if(e<=1)return{};const i=js(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=vn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Dl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...ii]}function jy(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Vy(e,t,n,i){const o=Math.min(i,e.length,vn.length),r={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=vn[c],p=Ji[c],x=Qi[c],b=eo[c],g=vn[l],h=Ji[l],f=Qi[l],v=eo[l],C=n[u],y=n[p],T=n[x],W=n[b];typeof C=="number"&&(r[g]=C),typeof y=="number"&&(r[h]=y),typeof T=="number"&&(r[f]=T),typeof W=="number"&&(r[v]=W)}return r}function Fd(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 Gy(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=To(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...Hy(n,o),...Dy()};if(r)for(const d of eo)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,Oy());return Fd(e,l)?l:e}function Xy(e,t,n){const i=Cy(e);i&&(e={...e,...i});const o=Md(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,d=To(e),c=To(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:ii.length,x=T=>{if(u)return T;const W=dr({...t,...T}),_=To(T),X=Tr(p,_,W),D=By(p,X,{...t,...T});return Object.keys(D).length===0?T:{...T,...D}};if(typeof r=="number"&&r!==l)return e;const b=Dl(e),g=Dl(t);if(!jy(b,g))return x({...e,...Vy(b,g,t,p)});if(d<c&&typeof p=="number"&&!u){const T=dr({...t,...e});return x({...e,...zy(p,d,T)})}if(u){const T=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,W=Math.max(0,(d-o)/2);return T>W?{...e,textPaddingLR:W}:e}const h=dr({...t,...e}),f=Tr(p,c,dr(t)),C=Tr(p,d,h).some((T,W)=>T<(f[W]??T)),y=vn.some(T=>{const W=e[T],_=t[T];return typeof W=="number"&&typeof _=="number"&&W!==_});return C||y?x(e):e}function qy(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),r=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(Ho,i-o-r-Ho)}function Yy(e,t){return Math.random()*(t-e)+e}function Uy(e){return Object.fromEntries(vn.map(t=>[t,typeof e[t]=="number"?e[t]:kd[t]]))}function Pa(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Ky(e,t,n,i,o,r){return e.slice(0,t).map((l,d)=>{const c=Ji[d],u=Qi[d],p=eo[d];return{key:l,textPrefix:My[l],widthKey:vn[d],width:n[vn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:r[p]}})}function Zy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,onUpdateSettings:d}){const{prefix:c}=H.useScopedStyles(),u=!!o,{columns:p,type:x,wrapperWidth:b,entriesCount:g,cellMinHeight:h,dividerWidth:f,showVisibility:v,cut:C,showCut:y,cutCellMinHeight:T,cutLabel:W,imageSize:_,imageOnHover:X,imagePosition:D="cursor",imageInterpolation:w="on",entryHoverEffect:R,entryHoverShowOption:m,rowPaddingTop:E,rowPaddingBottom:I,rowPaddingTopB:J,columnsOrder:A,textPaddingLR:Q,textColor:q,backgroundColor:Y,dividerColor:oe,textHoverColor:L,backgroundHoverColor:N,dividerHoverColor:V}=e,[de,re]=s.useState(void 0),[M,S]=s.useState(null),$=s.useRef(null),F=X==="on"&&(!n||i),O=D==="cursor",te=O&&w==="on",{anchorRef:xe,onShow:ne,onCursorMove:ae,exit:Z}=vy(!!(F&&M!==null),te),B=(C??0)>0,G=x==="b",$e=s.useRef(null),he=s.useRef(null),[Re,ge]=s.useState(null),[ye,Se]=s.useState(Wo),ee=Md(ye),ce=Math.max(0,((b??0)-ee)/2),ue=Math.min(Q??0,ce),Te=Math.max(ue,Wi),ke=((b??0)+ee)/2;s.useLayoutEffect(()=>{if(!n){Se(Wo);return}const Ee=()=>{Se(Wy($e.current))};Ee();const ze=$e.current;if(!ze)return;const ot=new ResizeObserver(Ee);ot.observe(ze);let ht=ze;for(;ht&&!ht.style.getPropertyValue("--cntrl-article-width");)ht=ht.parentElement;return ht&&ot.observe(ht),()=>ot.disconnect()},[n,l]),s.useEffect(()=>{re(void 0)},[C,y,t,g]),s.useEffect(()=>{n&&!i&&re(void 0)},[n,i]);const Ce=H.buildColorVars(c,{textColor:q,backgroundColor:Y,dividerColor:oe,textHoverColor:L,backgroundHoverColor:N,dividerHoverColor:V},_y,Ny),U=r&&r!=="default"?`${c}-state-${r}`:"",me=`${!n||i?R==="default"?`${c}-entry-hover-default`:R==="blinds"?`${c}-entry-hover-blinds`:R==="reveal"?`${c}-entry-hover-reveal`:"":""} ${U}`.trim(),K=R==="reveal"&&(!n||i),z=(v==null?void 0:v[0])??!1,be=(v==null?void 0:v[1])??!1,se=s.useRef(e),j=s.useRef(l);s.useEffect(()=>{if(!d||!n){se.current=e,j.current=l;return}if(j.current!==l){se.current=e,j.current=l;return}const Ee=se.current;if(!(Ee!==e))return;if(typeof Ee.columns=="number"&&typeof e.columns=="number"&&Ee.columns!==e.columns){se.current=e;return}const ot=Xy(e,Ee,{designWidth:ye});se.current=e,Fd(e,ot)&&d(ot)},[e,d,n,l,ye]);const _e=s.useMemo(()=>Uy(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),We=s.useMemo(()=>Pa(e,Ji),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),lt=s.useMemo(()=>Pa(e,Qi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Je=s.useMemo(()=>Pa(e,eo),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ct=s.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...ii],[A]),it=s.useMemo(()=>Ky(ct,p,_e,We,lt,Je),[ct,p,_e,We,lt,Je]),Ve=To(e),Ie=s.useMemo(()=>vn.slice(0,p).map(Ee=>_e[Ee]),[p,_e]),Ne=s.useMemo(()=>js(p,Ve,_e),[p,Ve,_e]),Oe=s.useMemo(()=>Tr(p,Ve,_e),[p,Ve,_e]),Ue=s.useMemo(()=>it.map((Ee,ze)=>Ad(Oe[ze]??0,Ee.paddingLeft,Ee.paddingRight)),[it,Oe]),pe=s.useMemo(()=>{const Ee=g===0?1/0:g;return(t??[]).slice(0,Ee).map((ot,ht)=>({id:ht,cells:Object.fromEntries(ii.map(ft=>[ft,ot[ft]??""])),image:ot.image,link:ot.link}))},[t,g]),we=B?de??C:pe.length,Ae=s.useMemo(()=>B?pe.slice(0,we):pe,[pe,B,we]),Xe=B&&we<pe.length,Ze=Ae.length>1||Xe,Ge=[z?`${c}-divider-top`:"",be||Ze?`${c}-divider-bottom`:""].filter(Boolean).join(" "),st=!n||i,Qe=()=>{if(!st)return;const Ee=de??C;if(!y){re(pe.length);return}re(Math.min(Ee+y,pe.length))},Fe=Ee=>H.scalingValue(Ee,n??!1),qe=G?J??0:E??0,He=I??0,nt=h??0,at=Math.max(He,La),dt=Ml(0,Ae.length,z,be,Xe,f??0,n??!1).borderTopWidth,Tt=G?"rowPaddingTopB":"rowPaddingTop",qt=it[0],Zt=it[it.length-1],xt=Ue[0],wt=Ue[Ue.length-1],Bt=qt&&xt?Math.max(xt.paddingLeft,Wi):0,At=Zt&&wt?Math.max(wt.paddingRight,Wi):0,vt=Ve,Ft=(Ee,ze)=>yy(D,$e.current,O?Ee:null,ze),Nt=(Ee,ze)=>{if(!F)return;const ot=Ee.image;if(!(ot!=null&&ot.url)){Z(()=>S(null));return}const ht=(_==null?void 0:_.min)??80,ft=(_==null?void 0:_.max)??320,Lt=(M==null?void 0:M.rowId)===Ee.id,mt=Lt?M.widthPx:Yy(ht,ft),{x:zt,y:kt}=Ft(ze,mt);if(Lt&&O){ae(zt,kt);return}S({rowId:Ee.id,url:ot.url,objectFit:"contain",isVideo:py(ot),widthPx:mt}),$.current={x:zt,y:kt}},Ut=Ee=>{if(!F||!M||!O)return;const{x:ze,y:ot}=Ft(Ee,M.widthPx);ae(ze,ot)},Jt=()=>{M&&Z(()=>S(null))},Ct=Ee=>{K&&Pl(Ee,c),!(!F||!M)&&Z(()=>S(null))},Wt=Ee=>{K&&El(Ee,c)};s.useLayoutEffect(()=>{if(!M||!$.current)return;const{x:Ee,y:ze}=$.current;$.current=null,ne(Ee,ze)},[M==null?void 0:M.rowId,M==null?void 0:M.url,ne]),s.useLayoutEffect(()=>{if(!u||G){ge(null);return}const Ee=he.current,ze=Ee==null?void 0:Ee.parentElement;if(!Ee||!ze){ge(null);return}const ot=()=>{const ft=Ee.querySelector("[data-list-row]");if(!ft){ge(null);return}const Lt=ze.getBoundingClientRect(),mt=ft.getBoundingClientRect();ge(mt.top-Lt.top+mt.height/2)};ot();const ht=new ResizeObserver(ot);return ht.observe(Ee),ht.observe(ze),()=>ht.disconnect()},[u,G,Ae,qe,He,nt,t,e,it,Oe,ye,f,z,be,Xe]);const rn=s.useMemo(()=>!G&&Os.some(Ee=>{const ze=Ee.charAt(0),ot=e[`${Ee}VerticalAlign`];return Ed(ot,e,ze)}),[G,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var zt;const Ee=$e.current;if(!Ee)return;const ze=()=>{Ee.querySelectorAll("[data-list-col]").forEach(kt=>{kt.style.transform="";const Mt=kt.querySelector(`.${c}-list-col`);Mt&&(Mt.style.minHeight="",Mt.style.height="");const Vt=kt.querySelector(`.${c}-list-col-title`);Vt&&(Vt.style.transform="")})};if(G||!rn){ze();return}const ot=()=>{const kt=Array.from(Ee.querySelectorAll("[data-list-row]")),Mt=`${c}-list-col`,Vt=`${c}-baseline-probe`;kt.forEach(Gt=>{Gt.querySelectorAll("[data-list-col]").forEach(Ht=>{Ht.style.transform="";const Dt=Ht.querySelector(`.${Mt}`);Dt&&(Dt.style.minHeight="",Dt.style.height="");const _t=Ht.querySelector(`.${c}-list-col-title`);_t&&(_t.style.transform="")})}),kt.forEach(Gt=>{const Ht=Array.from(Gt.querySelectorAll("[data-list-col]"));Py(Gt,Ht,Mt)}),Ee.offsetHeight,kt.forEach(Gt=>{const Ht=Array.from(Gt.querySelectorAll("[data-list-col]")),Dt=Gt.getBoundingClientRect().top,_t=new Map,St=Ht.map(Me=>{const De=Me.querySelector(`.${c}-list-col-title`),rt={el:Me,titleEl:De,letter:Me.getAttribute("data-col-letter")??"",kind:Me.getAttribute("data-valign")??"top",anchor:Me.getAttribute("data-valign-anchor")};return _t.set(rt.letter,rt),rt}),k=new Map,Le=(Me,De)=>{const rt=k.get(Me.letter);if(rt!==void 0)return rt;const Et=Me.anchor?_t.get(Me.anchor):void 0;if(Me.kind!=="baseline"||!Et||De.has(Me.letter)){const nn=Ra(Me,Dt,Mt,Vt);return k.set(Me.letter,nn),nn}De.add(Me.letter);const et=Le(Et,De);De.delete(Me.letter);const yt=Ra(Me,Dt,Mt,Vt),Ot=et-yt;Ey(Me.titleEl,Ot);const It=Ra(Me,Dt,Mt,Vt);return k.set(Me.letter,It),It};St.forEach(Me=>Le(Me,new Set))})};let ht=null;const ft=()=>{ht===null&&(ht=requestAnimationFrame(()=>{ht=null,ot()}))};ot();const Lt=new ResizeObserver(()=>ft());Lt.observe(Ee);let mt=!1;return typeof document<"u"&&((zt=document.fonts)!=null&&zt.ready)&&document.fonts.ready.then(()=>{mt||ft()}),()=>{mt=!0,ht!==null&&(cancelAnimationFrame(ht),ht=null),Lt.disconnect(),ze()}},[rn,G,e,t,ye,Ae,Oe]);const gt=s.useMemo(()=>xy(c),[c]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:gt}}),a.jsx("div",{style:Ce,children:a.jsxs("div",{ref:$e,className:`${c}-wrapper ${me}${Ge?` ${Ge}`:""}${G?` ${c}-type-b`:""}`.trim(),style:{width:H.scalingValue(b??0,n)},onMouseMove:F?Ut:void 0,onMouseLeave:F?Jt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ae.map((Ee,ze)=>{var Lt;const ot=(((Lt=Ee.link)==null?void 0:Lt.length)??0)>0,ht=ot&&(!n||i)?"a":"div",ft=Ml(ze,Ae.length,z,be,Xe,f??0,n??!1);return a.jsxs(ht,{ref:ze===0?mt=>{he.current=mt}:void 0,className:`${c}-list-item${ot||m==="always"?` ${c}-list-item-has-link`:""}${Xe&&ze===Ae.length-1?` ${c}-list-item-before-cut`:""}`,...ot?{href:Ee.link,target:"_blank"}:{},style:ft,onMouseEnter:mt=>{K&&(ot||m==="always")&&Pl(mt,c),F&&Nt(Ee,mt)},onMouseLeave:mt=>{K&&(ot||m==="always")&&El(mt,c)},children:[qe>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Fe(qe)}}),a.jsxs("div",{className:`${c}-list-cols-row${G?"":` ${c}-list-cols-row-h`}${u&&ze===0&&G?` ${c}-list-cols-row-controls`:""}`,...G?{}:{"data-list-row":""},style:G?void 0:{minHeight:Fe(nt)},children:[it.map((mt,zt)=>{const kt=zt===it.length-1,Mt=Ue[zt],Vt=mt.paddingBottom,Gt=gy(Ee.cells[mt.key]),Ht=G&&Gt&&Vt>0,Dt=G?{minHeight:Fe(nt)}:{width:Fe(Oe[zt])},_t=G?{paddingLeft:Fe(ue),paddingRight:Fe(ue)}:{paddingLeft:Fe(Mt.paddingLeft),paddingRight:Fe(Mt.paddingRight)},St=mt.textPrefix.charAt(0),k=G?$y(e[`${mt.textPrefix}VerticalAlign`]):Sy(e[`${mt.textPrefix}VerticalAlign`],e,St),Le=G&&Gt&&u&&ze===0;return G&&!Gt?null:a.jsxs("div",{className:G?`${c}-list-col-wrap`:void 0,...G?{}:{"data-list-col":"","data-col-letter":St,"data-valign":k.kind,...k.kind==="baseline"?{"data-valign-anchor":k.anchorLetter}:{}},children:[a.jsx("div",{className:`${c}-list-col${kt?` ${c}-list-col-last`:""}`,style:{..._t,...Dt,...G?{justifyContent:Fl(k.kind)}:{}},"data-test":mt.width,children:a.jsx("span",{className:Nl(e,mt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{..._l(Wr(e,mt.textPrefix),n),...Wl(e,mt.textPrefix,c,n),...G?{}:Ty(k.kind)},children:Ee.cells[mt.key]??null})}),Ht&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Fe(Vt)}}),Le&&a.jsx("div",{"data-controls":mt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Fe(Math.max(Vt,La))}})]},mt.key)}),u&&ze===0&&G&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ke),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Fe(Te),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ke),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Fe(Math.max(Te,Ve-Te)),width:Fe(Te),height:"100%"}})]})]}),!G&&He>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Fe(He)}}),u&&ze===0&&!G&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Fe(at)}})]},Ee.id)}),u&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Tt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":G?"center":"left-y",className:`${c}-control-anchor`,style:{top:dt,left:0,width:"100%",height:Fe(Math.max(qe,La))}})},"row-padding-handles"),u&&!G&&qt&&Zt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":qt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Oe[0]-((xt==null?void 0:xt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Fe(Bt),height:"100%"}}),a.jsx("div",{"data-controls":Zt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Oe[it.length-1]-((wt==null?void 0:wt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${c}-control-anchor`,style:{top:0,left:Fe(vt-At),width:Fe(At),height:"100%"}})]},"column-edge-padding-handles"),u&&!G&&it.slice(0,-1).map((Ee,ze)=>{const ot=it[ze+1],ht=Ne.slice(0,ze+1).reduce((kt,Mt)=>kt+Mt,0),ft=Ue[ze],Lt=Ue[ze+1],mt=Math.max(ft.paddingRight,Wi),zt=Math.max(Lt.paddingLeft,Wi);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ee.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Oe[ze]-ft.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${c}-control-anchor`,style:{top:0,left:Fe(ht-mt),width:Fe(mt),height:"100%"}}),a.jsx("div",{"data-controls":ot.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Oe[ze+1]-Lt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${c}-control-anchor`,style:{top:0,left:Fe(ht),width:Fe(zt),height:"100%"}})]},`${Ee.paddingRightKey}-padding`)}),u&&!G&&it.slice(0,-1).map((Ee,ze)=>{const ot=qy(ze,Ne,Ie,Ve),ft=Ne.slice(0,ze+1).reduce((Lt,mt)=>Lt+mt,0)-Hl/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ee.widthKey,"data-controls-axis":"x","data-controls-min":String(zs),"data-controls-max-fraction":String(ot),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Fe(ft),width:Fe(Hl),height:"calc(100%)",pointerEvents:"auto"}})},`${Ee.widthKey}-junction`)})]}),Xe&&(()=>{const Ee=Wr(e,Wn),ze=Iy(e.cutLabelVerticalAlign),ot=Ee.textTextAlign==="justify"||G;return a.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Fe(T??0),cursor:st?"pointer":"default",...hy(be,f??0,n??!1)},onClick:st?Qe:void 0,onMouseEnter:K||F?Ct:void 0,onMouseLeave:K?Wt:void 0,children:a.jsx("div",{className:`${c}-list-cols-row`,style:{...G?{paddingLeft:Fe(ue),paddingRight:Fe(ue)}:{},justifyContent:Ry(Ee.textTextAlign),alignItems:Fl(ze)},children:a.jsx("span",{className:Nl(e,Wn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{..._l(Ee,n),...Wl(e,Wn,c,n),...ot?{width:"100%"}:{}},children:W})})})})(),F&&M&&(()=>{const Ee=`${M.widthPx}px`,ze={width:Ee,height:"auto",maxHeight:Ee,objectFit:"contain"};return a.jsx("div",{ref:xe,className:`${c}-hover-media-anchor`,children:a.jsx(my,{media:M,className:M.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:ze},`${M.rowId}-${M.url}`)})})()]})})]})}const Jy=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10224
+ `}const oi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Vs=["AColumn","BColumn","CColumn","DColumn","EColumn"],Hn="cutLabel",Wo=[...Vs,Hn],ra=["A","B","C","D","E"];function kd(e){return`${e}ColumnVerticalAlign`}const os=["Top","Center","Bottom"];function Gs(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return ra.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Cy(e){const t=Gs(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function $y(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return ra.includes(n)?n:null}function Ad(e,t,n){const i=$y(e);return i?i===t?!1:Cy(n[kd(i)]):!0}function Ho(e){const t=Gs(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return ra.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Ty(e,t,n){if(Fd(e,t,n))return Ho(e);const i=Ho(e);return i.kind==="baseline"?{kind:"top"}:i}function Iy(e){const t=Ho(e);return t.kind==="baseline"?{kind:"top"}:t}function Fd(e,t,n){return Ad(e,n,t)?Ho(e).kind==="baseline":!1}function Ry(e){const t={};let n=!1;for(const i of ra){const o=kd(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}Ad(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Ly(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Py(e){const t=Ho(e).kind;return t==="baseline"?"center":t}function Ey(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Hl(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function My(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(),r=o-i;return n.remove(),r}function La(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=My(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=r.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 ky(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function Ay(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Fy={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Pt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const _y={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Ny(e){return[Pt(e,"textFontFamily"),Pt(e,"textFontSettings"),{type:"row",items:[Pt(e,"textFontSize"),Pt(e,"textLineHeight"),Pt(e,"textLetterSpacing"),Pt(e,"textWordSpacing")]},Pt(e,"textTextAlign"),Pt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Wy(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Wo.map(e=>[_y[e],Ny(e)]))}}function Hr(e,t){const n=i=>{const o=Pt(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===Hn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Dl(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 an(Ut(n,t))}function Ol(e,t,n,i){const o=Hr(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Bl(e,t,n,i){const o=Hr(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:W.scalingValue((r-l)/2,i)}}const vn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],eo=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],to=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],no=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Hy={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Dy=["hover","focus","filled","success","error"],zl=.004,Di=.004,Pa=Di,Xs=50,Do=1440,Oo=Xs/Do;function _d(e){const t=typeof e=="number"&&e>0?e:Do;return Xs/t}function Oy(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 Do}const Nd={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ro(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function By(e,t=1){const n=t/e;return Object.fromEntries(vn.map(i=>[i,n]))}function zy(){return Object.fromEntries([...eo.map(e=>[e,0]),...to.map(e=>[e,0])])}function jy(){return Object.fromEntries(no.map(e=>[e,0]))}function pr(e){return Object.fromEntries(vn.map(t=>[t,typeof e[t]=="number"?e[t]:Nd[t]]))}function Wd(e,t,n){const i=e-Oo,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function Rr(e,t,n){const i=qs(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Vy(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=eo[o],l=to[o],d=typeof n[r]=="number"?n[r]:0,c=typeof n[l]=="number"?n[l]:0,u=Wd(t[o]??0,d,c);u.paddingLeft!==d&&(i[r]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function qs(e,t,n){if(e<=0)return[];const i=vn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+Oo;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 p=d[u]-Oo;if(p<=0)continue;const v=Math.min(c,p);d[u]-=v,c-=v}return[...d,i[e-1]]}function Gy(e,t,n){if(e<=1)return{};const i=qs(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=vn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function jl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...oi]}function Xy(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function qy(e,t,n,i){const o=Math.min(i,e.length,vn.length),r={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=vn[c],p=eo[c],v=to[c],w=no[c],m=vn[l],h=eo[l],f=to[l],x=no[l],C=n[u],y=n[p],S=n[v],B=n[w];typeof C=="number"&&(r[m]=C),typeof y=="number"&&(r[h]=y),typeof S=="number"&&(r[f]=S),typeof B=="number"&&(r[x]=B)}return r}function Hd(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 Yy(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ro(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...By(n,o),...zy()};if(r)for(const d of no)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,jy());return Hd(e,l)?l:e}function Uy(e,t,n){const i=Ry(e);i&&(e={...e,...i});const o=_d(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,d=Ro(e),c=Ro(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:oi.length,v=S=>{if(u)return S;const B=pr({...t,...S}),N=Ro(S),q=Rr(p,N,B),D=Vy(p,q,{...t,...S});return Object.keys(D).length===0?S:{...S,...D}};if(typeof r=="number"&&r!==l)return e;const w=jl(e),m=jl(t);if(!Xy(w,m))return v({...e,...qy(w,m,t,p)});if(d<c&&typeof p=="number"&&!u){const S=pr({...t,...e});return v({...e,...Gy(p,d,S)})}if(u){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,B=Math.max(0,(d-o)/2);return S>B?{...e,textPaddingLR:B}:e}const h=pr({...t,...e}),f=Rr(p,c,pr(t)),C=Rr(p,d,h).some((S,B)=>S<(f[B]??S)),y=vn.some(S=>{const B=e[S],N=t[S];return typeof B=="number"&&typeof N=="number"&&B!==N});return C||y?v(e):e}function Ky(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),r=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(Oo,i-o-r-Oo)}function Zy(e,t){return Math.random()*(t-e)+e}function Jy(e){return Object.fromEntries(vn.map(t=>[t,typeof e[t]=="number"?e[t]:Nd[t]]))}function Ea(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Qy(e,t,n,i,o,r){return e.slice(0,t).map((l,d)=>{const c=eo[d],u=to[d],p=no[d];return{key:l,textPrefix:Fy[l],widthKey:vn[d],width:n[vn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:r[p]}})}function ev({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,onUpdateSettings:d}){const{prefix:c}=W.useScopedStyles(),u=!!o,{columns:p,type:v,wrapperWidth:w,entriesCount:m,cellMinHeight:h,dividerWidth:f,showVisibility:x,cut:C,showCut:y,cutCellMinHeight:S,cutLabel:B,imageSize:N,imageOnHover:q,imagePosition:D="cursor",imageInterpolation:T="on",entryHoverEffect:H,entryHoverShowOption:$,rowPaddingTop:I,rowPaddingBottom:P,rowPaddingTopB:E,columnsOrder:g,textPaddingLR:z,textColor:F,backgroundColor:X,dividerColor:ie,textHoverColor:L,backgroundHoverColor:_,dividerHoverColor:V}=e,[ae,re]=s.useState(void 0),[M,se]=s.useState(null),j=s.useRef(null),b=q==="on"&&(!n||i),k=D==="cursor",G=k&&T==="on",{anchorRef:he,onShow:J,onCursorMove:ee,exit:O}=wy(!!(b&&M!==null),G),Z=(C??0)>0,te=v==="b",Le=s.useRef(null),ve=s.useRef(null),[Ie,pe]=s.useState(null),[oe,ye]=s.useState(Do),U=_d(oe),ce=Math.max(0,((w??0)-U)/2),le=Math.min(z??0,ce),Ce=Math.max(le,Di),Fe=((w??0)+U)/2;s.useLayoutEffect(()=>{if(!n){ye(Do);return}const ke=()=>{ye(Oy(Le.current))};ke();const Ge=Le.current;if(!Ge)return;const rt=new ResizeObserver(ke);rt.observe(Ge);let ht=Ge;for(;ht&&!ht.style.getPropertyValue("--cntrl-article-width");)ht=ht.parentElement;return ht&&rt.observe(ht),()=>rt.disconnect()},[n,l]),s.useEffect(()=>{re(void 0)},[C,y,t,m]),s.useEffect(()=>{n&&!i&&re(void 0)},[n,i]);const Ee=W.buildColorVars(c,{textColor:F,backgroundColor:X,dividerColor:ie,textHoverColor:L,backgroundHoverColor:_,dividerHoverColor:V},Hy,Dy),Y=r&&r!=="default"?`${c}-state-${r}`:"",de=`${!n||i?H==="default"?`${c}-entry-hover-default`:H==="blinds"?`${c}-entry-hover-blinds`:H==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Y}`.trim(),K=H==="reveal"&&(!n||i),ue=(x==null?void 0:x[0])??!1,He=(x==null?void 0:x[1])??!1,fe=s.useRef(e),Q=s.useRef(l);s.useEffect(()=>{if(!d||!n){fe.current=e,Q.current=l;return}if(Q.current!==l){fe.current=e,Q.current=l;return}const ke=fe.current;if(!(ke!==e))return;if(typeof ke.columns=="number"&&typeof e.columns=="number"&&ke.columns!==e.columns){fe.current=e;return}const rt=Uy(e,ke,{designWidth:oe});fe.current=e,Hd(e,rt)&&d(rt)},[e,d,n,l,oe]);const Je=s.useMemo(()=>Jy(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Ne=s.useMemo(()=>Ea(e,eo),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),ct=s.useMemo(()=>Ea(e,to),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ke=s.useMemo(()=>Ea(e,no),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ut=s.useMemo(()=>Array.isArray(g)&&g.length>0?g:[...oi],[g]),lt=s.useMemo(()=>Qy(ut,p,Je,Ne,ct,Ke),[ut,p,Je,Ne,ct,Ke]),Ye=Ro(e),Re=s.useMemo(()=>vn.slice(0,p).map(ke=>Je[ke]),[p,Je]),We=s.useMemo(()=>qs(p,Ye,Je),[p,Ye,Je]),Be=s.useMemo(()=>Rr(p,Ye,Je),[p,Ye,Je]),Ue=s.useMemo(()=>lt.map((ke,Ge)=>Wd(Be[Ge]??0,ke.paddingLeft,ke.paddingRight)),[lt,Be]),ge=s.useMemo(()=>{const ke=m===0?1/0:m;return(t??[]).slice(0,ke).map((rt,ht)=>({id:ht,cells:Object.fromEntries(oi.map(yt=>[yt,rt[yt]??""])),image:rt.image,link:rt.link}))},[t,m]),xe=Z?ae??C:ge.length,_e=s.useMemo(()=>Z?ge.slice(0,xe):ge,[ge,Z,xe]),Ze=Z&&xe<ge.length,we=_e.length>1||Ze,$e=[ue?`${c}-divider-top`:"",He||we?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Xe=!n||i,ze=()=>{if(!Xe)return;const ke=ae??C;if(!y){re(ge.length);return}re(Math.min(ke+y,ge.length))},Te=ke=>W.scalingValue(ke,n??!1),Ve=te?E??0:I??0,De=P??0,tt=h??0,nt=Math.max(De,Pa),st=_l(0,_e.length,ue,He,Ze,f??0,n??!1).borderTopWidth,St=te?"rowPaddingTopB":"rowPaddingTop",Bt=lt[0],zt=lt[lt.length-1],ft=Ue[0],wt=Ue[Ue.length-1],jt=Bt&&ft?Math.max(ft.paddingLeft,Di):0,At=zt&&wt?Math.max(wt.paddingRight,Di):0,xt=Ye,Ft=(ke,Ge)=>by(D,Le.current,k?ke:null,Ge),Nt=(ke,Ge)=>{if(!b)return;const rt=ke.image;if(!(rt!=null&&rt.url)){O(()=>se(null));return}const ht=(N==null?void 0:N.min)??80,yt=(N==null?void 0:N.max)??320,Lt=(M==null?void 0:M.rowId)===ke.id,mt=Lt?M.widthPx:Zy(ht,yt),{x:Vt,y:kt}=Ft(Ge,mt);if(Lt&&k){ee(Vt,kt);return}se({rowId:ke.id,url:rt.url,objectFit:"contain",isVideo:hy(rt),widthPx:mt}),j.current={x:Vt,y:kt}},Kt=ke=>{if(!b||!M||!k)return;const{x:Ge,y:rt}=Ft(ke,M.widthPx);ee(Ge,rt)},Jt=()=>{M&&O(()=>se(null))},Tt=ke=>{K&&Al(ke,c),!(!b||!M)&&O(()=>se(null))},Wt=ke=>{K&&Fl(ke,c)};s.useLayoutEffect(()=>{if(!M||!j.current)return;const{x:ke,y:Ge}=j.current;j.current=null,J(ke,Ge)},[M==null?void 0:M.rowId,M==null?void 0:M.url,J]),s.useLayoutEffect(()=>{if(!u||te){pe(null);return}const ke=ve.current,Ge=ke==null?void 0:ke.parentElement;if(!ke||!Ge){pe(null);return}const rt=()=>{const yt=ke.querySelector("[data-list-row]");if(!yt){pe(null);return}const Lt=Ge.getBoundingClientRect(),mt=yt.getBoundingClientRect();pe(mt.top-Lt.top+mt.height/2)};rt();const ht=new ResizeObserver(rt);return ht.observe(ke),ht.observe(Ge),()=>ht.disconnect()},[u,te,_e,Ve,De,tt,t,e,lt,Be,oe,f,ue,He,Ze]);const rn=s.useMemo(()=>!te&&Vs.some(ke=>{const Ge=ke.charAt(0),rt=e[`${ke}VerticalAlign`];return Fd(rt,e,Ge)}),[te,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Vt;const ke=Le.current;if(!ke)return;const Ge=()=>{ke.querySelectorAll("[data-list-col]").forEach(kt=>{kt.style.transform="";const Mt=kt.querySelector(`.${c}-list-col`);Mt&&(Mt.style.minHeight="",Mt.style.height="");const Xt=kt.querySelector(`.${c}-list-col-title`);Xt&&(Xt.style.transform="")})};if(te||!rn){Ge();return}const rt=()=>{const kt=Array.from(ke.querySelectorAll("[data-list-row]")),Mt=`${c}-list-col`,Xt=`${c}-baseline-probe`;kt.forEach(qt=>{qt.querySelectorAll("[data-list-col]").forEach(Ht=>{Ht.style.transform="";const Dt=Ht.querySelector(`.${Mt}`);Dt&&(Dt.style.minHeight="",Dt.style.height="");const _t=Ht.querySelector(`.${c}-list-col-title`);_t&&(_t.style.transform="")})}),kt.forEach(qt=>{const Ht=Array.from(qt.querySelectorAll("[data-list-col]"));ky(qt,Ht,Mt)}),ke.offsetHeight,kt.forEach(qt=>{const Ht=Array.from(qt.querySelectorAll("[data-list-col]")),Dt=qt.getBoundingClientRect().top,_t=new Map,Ct=Ht.map(Ae=>{const Oe=Ae.querySelector(`.${c}-list-col-title`),at={el:Ae,titleEl:Oe,letter:Ae.getAttribute("data-col-letter")??"",kind:Ae.getAttribute("data-valign")??"top",anchor:Ae.getAttribute("data-valign-anchor")};return _t.set(at.letter,at),at}),A=new Map,Pe=(Ae,Oe)=>{const at=A.get(Ae.letter);if(at!==void 0)return at;const Et=Ae.anchor?_t.get(Ae.anchor):void 0;if(Ae.kind!=="baseline"||!Et||Oe.has(Ae.letter)){const nn=La(Ae,Dt,Mt,Xt);return A.set(Ae.letter,nn),nn}Oe.add(Ae.letter);const it=Pe(Et,Oe);Oe.delete(Ae.letter);const vt=La(Ae,Dt,Mt,Xt),Ot=it-vt;Ay(Ae.titleEl,Ot);const It=La(Ae,Dt,Mt,Xt);return A.set(Ae.letter,It),It};Ct.forEach(Ae=>Pe(Ae,new Set))})};let ht=null;const yt=()=>{ht===null&&(ht=requestAnimationFrame(()=>{ht=null,rt()}))};rt();const Lt=new ResizeObserver(()=>yt());Lt.observe(ke);let mt=!1;return typeof document<"u"&&((Vt=document.fonts)!=null&&Vt.ready)&&document.fonts.ready.then(()=>{mt||yt()}),()=>{mt=!0,ht!==null&&(cancelAnimationFrame(ht),ht=null),Lt.disconnect(),Ge()}},[rn,te,e,t,oe,_e,Be]);const gt=s.useMemo(()=>Sy(c),[c]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:gt}}),a.jsx("div",{style:Ee,children:a.jsxs("div",{ref:Le,className:`${c}-wrapper ${de}${$e?` ${$e}`:""}${te?` ${c}-type-b`:""}`.trim(),style:{width:W.scalingValue(w??0,n)},onMouseMove:b?Kt:void 0,onMouseLeave:b?Jt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[_e.map((ke,Ge)=>{var Lt;const rt=(((Lt=ke.link)==null?void 0:Lt.length)??0)>0,ht=rt&&(!n||i)?"a":"div",yt=_l(Ge,_e.length,ue,He,Ze,f??0,n??!1);return a.jsxs(ht,{ref:Ge===0?mt=>{ve.current=mt}:void 0,className:`${c}-list-item${rt||$==="always"?` ${c}-list-item-has-link`:""}${Ze&&Ge===_e.length-1?` ${c}-list-item-before-cut`:""}`,...rt?{href:ke.link,target:"_blank"}:{},style:yt,onMouseEnter:mt=>{K&&(rt||$==="always")&&Al(mt,c),b&&Nt(ke,mt)},onMouseLeave:mt=>{K&&(rt||$==="always")&&Fl(mt,c)},children:[Ve>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Te(Ve)}}),a.jsxs("div",{className:`${c}-list-cols-row${te?"":` ${c}-list-cols-row-h`}${u&&Ge===0&&te?` ${c}-list-cols-row-controls`:""}`,...te?{}:{"data-list-row":""},style:te?void 0:{minHeight:Te(tt)},children:[lt.map((mt,Vt)=>{const kt=Vt===lt.length-1,Mt=Ue[Vt],Xt=mt.paddingBottom,qt=yy(ke.cells[mt.key]),Ht=te&&qt&&Xt>0,Dt=te?{minHeight:Te(tt)}:{width:Te(Be[Vt])},_t=te?{paddingLeft:Te(le),paddingRight:Te(le)}:{paddingLeft:Te(Mt.paddingLeft),paddingRight:Te(Mt.paddingRight)},Ct=mt.textPrefix.charAt(0),A=te?Iy(e[`${mt.textPrefix}VerticalAlign`]):Ty(e[`${mt.textPrefix}VerticalAlign`],e,Ct),Pe=te&&qt&&u&&Ge===0;return te&&!qt?null:a.jsxs("div",{className:te?`${c}-list-col-wrap`:void 0,...te?{}:{"data-list-col":"","data-col-letter":Ct,"data-valign":A.kind,...A.kind==="baseline"?{"data-valign-anchor":A.anchorLetter}:{}},children:[a.jsx("div",{className:`${c}-list-col${kt?` ${c}-list-col-last`:""}`,style:{..._t,...Dt,...te?{justifyContent:Hl(A.kind)}:{}},"data-test":mt.width,children:a.jsx("span",{className:Ol(e,mt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Dl(Hr(e,mt.textPrefix),n),...Bl(e,mt.textPrefix,c,n),...te?{}:Ly(A.kind)},children:ke.cells[mt.key]??null})}),Ht&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Te(Xt)}}),Pe&&a.jsx("div",{"data-controls":mt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Te(Math.max(Xt,Pa))}})]},mt.key)}),u&&Ge===0&&te&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Fe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Te(Ce),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","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),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Te(Math.max(Ce,Ye-Ce)),width:Te(Ce),height:"100%"}})]})]}),!te&&De>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Te(De)}}),u&&Ge===0&&!te&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Te(nt)}})]},ke.id)}),u&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":St,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":te?"center":"left-y",className:`${c}-control-anchor`,style:{top:st,left:0,width:"100%",height:Te(Math.max(Ve,Pa))}})},"row-padding-handles"),u&&!te&&Bt&&zt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Bt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[0]-((ft==null?void 0:ft.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ie??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Te(jt),height:"100%"}}),a.jsx("div",{"data-controls":zt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[lt.length-1]-((wt==null?void 0:wt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ie??void 0,className:`${c}-control-anchor`,style:{top:0,left:Te(xt-At),width:Te(At),height:"100%"}})]},"column-edge-padding-handles"),u&&!te&&lt.slice(0,-1).map((ke,Ge)=>{const rt=lt[Ge+1],ht=We.slice(0,Ge+1).reduce((kt,Mt)=>kt+Mt,0),yt=Ue[Ge],Lt=Ue[Ge+1],mt=Math.max(yt.paddingRight,Di),Vt=Math.max(Lt.paddingLeft,Di);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":ke.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[Ge]-yt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ie??void 0,className:`${c}-control-anchor`,style:{top:0,left:Te(ht-mt),width:Te(mt),height:"100%"}}),a.jsx("div",{"data-controls":rt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[Ge+1]-Lt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ie??void 0,className:`${c}-control-anchor`,style:{top:0,left:Te(ht),width:Te(Vt),height:"100%"}})]},`${ke.paddingRightKey}-padding`)}),u&&!te&&lt.slice(0,-1).map((ke,Ge)=>{const rt=Ky(Ge,We,Re,Ye),yt=We.slice(0,Ge+1).reduce((Lt,mt)=>Lt+mt,0)-zl/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":ke.widthKey,"data-controls-axis":"x","data-controls-min":String(Xs),"data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Te(yt),width:Te(zl),height:"calc(100%)",pointerEvents:"auto"}})},`${ke.widthKey}-junction`)})]}),Ze&&(()=>{const ke=Hr(e,Hn),Ge=Py(e.cutLabelVerticalAlign),rt=ke.textTextAlign==="justify"||te;return a.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Te(S??0),cursor:Xe?"pointer":"default",...vy(He,f??0,n??!1)},onClick:Xe?ze:void 0,onMouseEnter:K||b?Tt:void 0,onMouseLeave:K?Wt:void 0,children:a.jsx("div",{className:`${c}-list-cols-row`,style:{...te?{paddingLeft:Te(le),paddingRight:Te(le)}:{},justifyContent:Ey(ke.textTextAlign),alignItems:Hl(Ge)},children:a.jsx("span",{className:Ol(e,Hn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Dl(ke,n),...Bl(e,Hn,c,n),...rt?{width:"100%"}:{}},children:B})})})})(),b&&M&&(()=>{const ke=`${M.widthPx}px`,Ge={width:ke,height:"auto",maxHeight:ke,objectFit:"contain"};return a.jsx("div",{ref:he,className:`${c}-hover-media-anchor`,children:a.jsx(fy,{media:M,className:M.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ge},`${M.rowId}-${M.url}`)})})()]})})]})}const tv=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10225
10225
  import { CommonComponentProps } from '../props';
10226
10226
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
10227
10227
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -13309,7 +13309,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13309
13309
  </>
13310
13310
  );
13311
13311
  }
13312
- `,co=["A","B","C","D","E"],Ol=[...os,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],pi={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 Qy(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function ur(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function ev(){return Object.fromEntries(co.map((e,t)=>{const n=ii[t],i=`${e} column`;return[n,Qy(i)]}))}function tv(){const e={};for(const t of co)e[`${t}ColumnWidth`]=ur(`${t} column width`),e[`${t}ColumnPaddingLeft`]=ur(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=ur(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=ur(`${t} column padding bottom`);return e}function Bl(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...ii]};for(const r of co)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function nv(e){const t={};if(e===Wn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...os]},enum:[...os]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ol],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Ol]}}return t[Pt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Pt(e,"textFontSettings")]={...pi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Pt(e,"textFontSize")]={...pi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Pt(e,"textLineHeight")]={...pi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Pt(e,"textLetterSpacing")]={...pi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Pt(e,"textWordSpacing")]={...pi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Pt(e,"textTextAlign")]={...pi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Pt(e,"textTextAppearance")]={...pi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const iv=_o.reduce((e,t)=>({...e,...nv(t)}),{});function ov(e){return{verticalAlign:e===Wn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Wn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function rv(e,t={}){var n;return{...ov(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const zl=new Set(["textFontFamily","textFontSettings"]);function av(e,t,n){const i=r=>n===void 0?!0:n==="common"?zl.has(r):!zl.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Bs(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Pt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Pt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Pt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Pt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Pt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Pt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Pt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Pt(e,"textTextAppearance")]=t.textTextAppearance),o}function Ir(e={},t){return _o.reduce((n,i)=>({...n,...av(i,rv(i,e),t)}),{})}const sv=Ir(),lv=Fy();function _d(e){return[Pt(e,"textFontFamily"),Pt(e,"textFontSettings"),Pt(e,"textFontSize"),Pt(e,"textLineHeight"),Pt(e,"textLetterSpacing"),Pt(e,"textWordSpacing"),Pt(e,"textTextAlign"),Pt(e,"textTextAppearance"),`${e}VerticalAlign`]}function cv(){const e=[];return Os.forEach((t,n)=>{const i=ii[n],o=_d(t);for(let r=1;r<ii.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(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 dv=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];_d(Wn);const uv=[...co.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],mi=[{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"}],pv=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:mi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:mi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:mi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:mi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:mi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:mi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:mi[6],link:""}],mv=[...co.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],gv={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:{...ev(),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:pv},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"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",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"}},...tv(),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"}},...iv,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",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...sv,...Ir({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Bl({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},...Ir({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Bl({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},...Ir({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...cv(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...uv.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}},...co.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...mv]},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:"",items:["imagePosition","imageInterpolation"]},{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__",lv]}],paletteBookmark:{items:[...dv],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},hv={element:Zy,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Gy(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:[..._o.map(e=>({path:`${Pt(e,"textFontFamily")}`}))]},fontRelations:{..._o.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Pt(t,"textFontFamily")}`}),{})},schema:gv,sourceCode:Jy},jl=300,jn=.004,fv={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"},yv=["hover","focus","filled","success","error"];function vv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Vl(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Gl(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:H.scalingValue((o-t)/2,i)}}function xv(e){return`
13312
+ `,po=["A","B","C","D","E"],Vl=[...os,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],mi={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 nv(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function mr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function iv(){return Object.fromEntries(po.map((e,t)=>{const n=oi[t],i=`${e} column`;return[n,nv(i)]}))}function ov(){const e={};for(const t of po)e[`${t}ColumnWidth`]=mr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=mr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=mr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=mr(`${t} column padding bottom`);return e}function Gl(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...oi]};for(const r of po)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function rv(e){const t={};if(e===Hn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...os]},enum:[...os]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Vl],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Vl]}}return t[Pt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Pt(e,"textFontSettings")]={...mi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Pt(e,"textFontSize")]={...mi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Pt(e,"textLineHeight")]={...mi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Pt(e,"textLetterSpacing")]={...mi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Pt(e,"textWordSpacing")]={...mi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Pt(e,"textTextAlign")]={...mi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Pt(e,"textTextAppearance")]={...mi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const av=Wo.reduce((e,t)=>({...e,...rv(t)}),{});function sv(e){return{verticalAlign:e===Hn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Hn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function lv(e,t={}){var n;return{...sv(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Xl=new Set(["textFontFamily","textFontSettings"]);function cv(e,t,n){const i=r=>n===void 0?!0:n==="common"?Xl.has(r):!Xl.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Gs(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Pt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Pt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Pt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Pt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Pt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Pt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Pt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Pt(e,"textTextAppearance")]=t.textTextAppearance),o}function Lr(e={},t){return Wo.reduce((n,i)=>({...n,...cv(i,lv(i,e),t)}),{})}const dv=Lr(),uv=Wy();function Dd(e){return[Pt(e,"textFontFamily"),Pt(e,"textFontSettings"),Pt(e,"textFontSize"),Pt(e,"textLineHeight"),Pt(e,"textLetterSpacing"),Pt(e,"textWordSpacing"),Pt(e,"textTextAlign"),Pt(e,"textTextAppearance"),`${e}VerticalAlign`]}function pv(){const e=[];return Vs.forEach((t,n)=>{const i=oi[n],o=Dd(t);for(let r=1;r<oi.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(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 mv=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Dd(Hn);const gv=[...po.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],gi=[{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"}],hv=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:gi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:gi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:gi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:gi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:gi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:gi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:gi[6],link:""}],fv=[...po.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],yv={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:{...iv(),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:hv},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"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",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"}},...ov(),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"}},...av,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",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...dv,...Lr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Gl({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},...Lr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Gl({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},...Lr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...pv(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...gv.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}},...po.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...fv]},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:"",items:["imagePosition","imageInterpolation"]},{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__",uv]}],paletteBookmark:{items:[...mv],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},vv={element:ev,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Yy(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:[...Wo.map(e=>({path:`${Pt(e,"textFontFamily")}`}))]},fontRelations:{...Wo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Pt(t,"textFontFamily")}`}),{})},schema:yv,sourceCode:tv},ql=300,Vn=.004,xv={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"},bv=["hover","focus","filled","success","error"];function wv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Yl(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ul(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:W.scalingValue((o-t)/2,i)}}function Sv(e){return`
13313
13313
  .${e}-wrapper {
13314
13314
  box-sizing: border-box;
13315
13315
  display: flex;
@@ -13371,7 +13371,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13371
13371
  display: flex;
13372
13372
  align-items: center;
13373
13373
  justify-content: space-between;
13374
- gap: ${vv(20)};
13374
+ gap: ${wv(20)};
13375
13375
  width: 100%;
13376
13376
  min-width: 0;
13377
13377
  min-height: var(--${e}-question-min-height, unset);
@@ -13399,7 +13399,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13399
13399
  width: var(--${e}-icon-max-width);
13400
13400
  height: var(--${e}-icon-max-width);
13401
13401
  position: relative;
13402
- transition: transform ${jl}ms ease;
13402
+ transition: transform ${ql}ms ease;
13403
13403
  }
13404
13404
  .${e}-icon-custom {
13405
13405
  display: flex;
@@ -13436,7 +13436,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13436
13436
  .${e}-panel {
13437
13437
  display: grid;
13438
13438
  grid-template-rows: 0fr;
13439
- transition: grid-template-rows ${jl}ms ease;
13439
+ transition: grid-template-rows ${ql}ms ease;
13440
13440
  }
13441
13441
  .${e}-item-open .${e}-panel {
13442
13442
  grid-template-rows: 1fr;
@@ -13474,7 +13474,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13474
13474
  pointer-events: none;
13475
13475
  z-index: 2;
13476
13476
  }
13477
- `}function Xl(e,t,n,i,o,r,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:r??0,textAppearance:l,color:d??"#000000"}}function bv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=H.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:x="solid",entryHoverEffect:b="default",autoclose:g="off",icon:h,iconMaxWidth:f=.00833,iconPaddingRight:v=0,iconAnimation:C="rotate 45",questionColor:y="#000000",answerColor:T="#000000",dividerColor:W="#0000001F",iconColor:_="#000000",questionHoverColor:X="#666666",iconHoverColor:D="#666666",iconActiveColor:w="#000000",dividerHoverColor:R="#000000",questionFontFamily:m,questionFontSettings:E,questionFontSize:I,questionLineHeight:J,questionLetterSpacing:A,questionWordSpacing:Q,questionTextAppearance:q,answerFontFamily:Y,answerFontSettings:oe,answerFontSize:L,answerLineHeight:N,answerLetterSpacing:V,answerWordSpacing:de,answerTextAppearance:re,questionPaddingLeft:M=0,questionPaddingTop:S=0,questionPaddingBottom:$=0,answerPaddingLeft:F=0,answerPaddingRight:O=0,answerPaddingTop:te=0,answerPaddingBottom:xe=0}=e,ne=t??[],[ae,Z]=s.useState(()=>new Set),B=!n||i;s.useEffect(()=>{Z(new Set)},[g]),s.useEffect(()=>{n&&!o&&!i&&Z(new Set)},[n,o,i]);const G=Ue=>H.scalingValue(Ue,n??!1),$e=Math.max(M,jn),he=Math.max(S,jn),Re=Math.max($,jn),ge=Math.max(F,jn),ye=Math.max(O,jn),Se=Math.max(te,jn),ee=Math.max(xe,jn),ce=Math.max(0,(c??1)-v-f),ue=Math.max(0,(c??1)-O),Te=Math.max(0,(c??1)-F),ke=Math.max(v,jn),Ce=Math.max(0,(c??1)-M-f),U=s.useMemo(()=>ae.size===0?0:Math.min(...ae),[ae]),fe=s.useCallback(Ue=>ae.has(Ue),[ae]),me=B&&b==="default"?`${l}-entry-hover-default`:"",K=h??"",z=K!=="",be=C.replace(/^rotate /,""),se=`${l}-icon-anim-${be}`,j=an(Yt(Xl(m,E,I,J,A,Q,q,y),n)),_e=an(Yt(Xl(Y,oe,L,N,V,de,re,T),n)),We=Vl(I,J,`${l}-question`,`${l}-text-tight-leading`),lt=Vl(L,N,`${l}-answer-text`,`${l}-text-tight-leading`),Je=Gl(I,J,l,n),ct=Gl(L,N,l,n),it=H.buildColorVars(l,{questionColor:y,answerColor:T,dividerColor:W,iconColor:_,questionHoverColor:X,iconHoverColor:D,iconActiveColor:w,dividerHoverColor:R},fv,yv),Ve=r&&r!=="default"?`${l}-state-${r}`:"",Ie=s.useCallback(Ue=>{B&&Z(pe=>{if(pe.has(Ue)){const Ae=new Set(pe);return Ae.delete(Ue),Ae}if(g==="on")return new Set([Ue]);const we=new Set(pe);return we.add(Ue),we})},[B,g]),Ne=s.useMemo(()=>xv(l),[l]),Oe={[`--${l}-divider-width`]:H.scalingValue(p,n??!1),[`--${l}-divider-style`]:x,[`--${l}-icon-max-width`]:H.scalingValue(f,n??!1),...u>0?{[`--${l}-question-min-height`]:H.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ne}}),a.jsx("div",{style:it,children:a.jsx("div",{className:pt(`${l}-wrapper`,n&&!i&&`${l}-editor`,me,Ve),style:{width:H.scalingValue(c,n??!1),maxWidth:"100%",...Oe},children:ne.map((Ue,pe)=>{var st;const we=fe(pe),Ae=((st=Ue.question)==null?void 0:st.trim())??"",Xe=Ue.answer,Ze=((Xe==null?void 0:Xe.length)??0)>0,Ge=d&&pe===U;return a.jsxs("div",{className:pt(`${l}-item`,we&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[Ge&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:G(he)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ce),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:G($e),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ce),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:G(ke),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":we,style:{...j,...Je,paddingLeft:G(M),paddingRight:G(v)},onClick:()=>Ie(pe),children:[S>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:G(S)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:We,children:Ae}),Ze&&(z?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${se}`,"aria-hidden":"true",children:a.jsx(sn,{url:K,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${se}`,"aria-hidden":"true"}))]}),$>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:G($)},"aria-hidden":"true"})]}),Ge&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:G(Re)}})]}),Ze&&Xe&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!we,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[Ge&&we&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:G(Se)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ue),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:G(ge),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Te),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:G(ye),height:"100%"}})]}),te>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:G(te)}}),a.jsx("div",{className:`${l}-answer`,style:{..._e,...ct,paddingLeft:G(F),paddingRight:G(O)},children:a.jsx("div",{className:lt,children:a.jsx(Ti,{content:Xe})})}),xe>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:G(xe)}}),Ge&&we&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:G(ee)}})]})})})]},pe)})})})]})}const wv=`import { useCallback, useEffect, useMemo, useState } from 'react';
13477
+ `}function Kl(e,t,n,i,o,r,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:r??0,textAppearance:l,color:d??"#000000"}}function Cv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=W.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:v="solid",entryHoverEffect:w="default",autoclose:m="off",icon:h,iconMaxWidth:f=.00833,iconPaddingRight:x=0,iconAnimation:C="rotate 45",questionColor:y="#000000",answerColor:S="#000000",dividerColor:B="#0000001F",iconColor:N="#000000",questionHoverColor:q="#666666",iconHoverColor:D="#666666",iconActiveColor:T="#000000",dividerHoverColor:H="#000000",questionFontFamily:$,questionFontSettings:I,questionFontSize:P,questionLineHeight:E,questionLetterSpacing:g,questionWordSpacing:z,questionTextAppearance:F,answerFontFamily:X,answerFontSettings:ie,answerFontSize:L,answerLineHeight:_,answerLetterSpacing:V,answerWordSpacing:ae,answerTextAppearance:re,questionPaddingLeft:M=0,questionPaddingTop:se=0,questionPaddingBottom:j=0,answerPaddingLeft:b=0,answerPaddingRight:k=0,answerPaddingTop:G=0,answerPaddingBottom:he=0}=e,J=t??[],[ee,O]=s.useState(()=>new Set),Z=!n||i;s.useEffect(()=>{O(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&O(new Set)},[n,o,i]);const te=Ue=>W.scalingValue(Ue,n??!1),Le=Math.max(M,Vn),ve=Math.max(se,Vn),Ie=Math.max(j,Vn),pe=Math.max(b,Vn),oe=Math.max(k,Vn),ye=Math.max(G,Vn),U=Math.max(he,Vn),ce=Math.max(0,(c??1)-x-f),le=Math.max(0,(c??1)-k),Ce=Math.max(0,(c??1)-b),Fe=Math.max(x,Vn),Ee=Math.max(0,(c??1)-M-f),Y=s.useMemo(()=>ee.size===0?0:Math.min(...ee),[ee]),be=s.useCallback(Ue=>ee.has(Ue),[ee]),de=Z&&w==="default"?`${l}-entry-hover-default`:"",K=h??"",ue=K!=="",He=C.replace(/^rotate /,""),fe=`${l}-icon-anim-${He}`,Q=an(Ut(Kl($,I,P,E,g,z,F,y),n)),Je=an(Ut(Kl(X,ie,L,_,V,ae,re,S),n)),Ne=Yl(P,E,`${l}-question`,`${l}-text-tight-leading`),ct=Yl(L,_,`${l}-answer-text`,`${l}-text-tight-leading`),Ke=Ul(P,E,l,n),ut=Ul(L,_,l,n),lt=W.buildColorVars(l,{questionColor:y,answerColor:S,dividerColor:B,iconColor:N,questionHoverColor:q,iconHoverColor:D,iconActiveColor:T,dividerHoverColor:H},xv,bv),Ye=r&&r!=="default"?`${l}-state-${r}`:"",Re=s.useCallback(Ue=>{Z&&O(ge=>{if(ge.has(Ue)){const _e=new Set(ge);return _e.delete(Ue),_e}if(m==="on")return new Set([Ue]);const xe=new Set(ge);return xe.add(Ue),xe})},[Z,m]),We=s.useMemo(()=>Sv(l),[l]),Be={[`--${l}-divider-width`]:W.scalingValue(p,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:W.scalingValue(f,n??!1),...u>0?{[`--${l}-question-min-height`]:W.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:We}}),a.jsx("div",{style:lt,children:a.jsx("div",{className:pt(`${l}-wrapper`,n&&!i&&`${l}-editor`,de,Ye),style:{width:W.scalingValue(c,n??!1),maxWidth:"100%",...Be},children:J.map((Ue,ge)=>{var Xe;const xe=be(ge),_e=((Xe=Ue.question)==null?void 0:Xe.trim())??"",Ze=Ue.answer,we=((Ze==null?void 0:Ze.length)??0)>0,$e=d&&ge===Y;return a.jsxs("div",{className:pt(`${l}-item`,xe&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[$e&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:te(ve)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ce),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:te(Le),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ee),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:te(Fe),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":xe,style:{...Q,...Ke,paddingLeft:te(M),paddingRight:te(x)},onClick:()=>Re(ge),children:[se>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:te(se)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Ne,children:_e}),we&&(ue?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${fe}`,"aria-hidden":"true",children:a.jsx(sn,{url:K,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${fe}`,"aria-hidden":"true"}))]}),j>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:te(j)},"aria-hidden":"true"})]}),$e&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:te(Ie)}})]}),we&&Ze&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!xe,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[$e&&xe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:te(ye)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(le),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:te(pe),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ce),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:te(oe),height:"100%"}})]}),G>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:te(G)}}),a.jsx("div",{className:`${l}-answer`,style:{...Je,...ut,paddingLeft:te(b),paddingRight:te(k)},children:a.jsx("div",{className:ct,children:a.jsx(Ri,{content:Ze})})}),he>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:te(he)}}),$e&&xe&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:te(U)}})]})})})]},ge)})})})]})}const $v=`import { useCallback, useEffect, useMemo, useState } from 'react';
13478
13478
  import cn from 'classnames';
13479
13479
  import { CommonComponentProps } from '../props';
13480
13480
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14222,7 +14222,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14222
14222
  </>
14223
14223
  );
14224
14224
  }
14225
- `;function Vn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ql={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Sv=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],$v={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:Vn("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:{...ql.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:{...ql.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:Vn("Question Padding Left"),questionPaddingTop:Vn("Question Padding Top"),questionPaddingBottom:Vn("Question Padding Bottom"),answerPaddingLeft:Vn("Answer Padding Left"),answerPaddingRight:Vn("Answer Padding Right"),answerPaddingTop:Vn("Answer Padding Top"),answerPaddingBottom:Vn("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.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:[...Sv],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Cv={element:bv,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:$v,sourceCode:wv},Hn=e=>e.display==="cover",ra=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,Tv=.2,Ul=8,Nd=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,d]=s.useState(!1),c=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?Yl:Math.max(Yl,window.innerHeight*Tv),[]),x=s.useCallback(m=>Math.max(0,1-m/(p*1.5)),[p]),b=s.useCallback(m=>Math.max(0,1-m/(p*.45)),[p]),g=s.useCallback(m=>{const E=typeof window<"u"?window.innerHeight:800,I=Math.max(.88,1-m/E*.12);return`translateY(${m}px) scale(${I})`},[]),h=s.useCallback(()=>{c.current=null},[]),f=s.useCallback(()=>{d(!0),r(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),v=s.useCallback(()=>{const m=typeof window<"u"?window.innerHeight:800;d(!0),r(m),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),C=s.useCallback(m=>{!e||l||m.pointerType==="touch"&&(i!=null&&i(m.target)||(c.current={startX:m.clientX,startY:m.clientY,isLocked:null,pointerId:m.pointerId}))},[e,l,i]),y=s.useCallback(m=>{const E=c.current;if(!e||!E||m.pointerType!=="touch"||E.pointerId!==m.pointerId)return;const I=m.clientX-E.startX,J=m.clientY-E.startY;if(E.isLocked===null){if(Math.abs(I)<Ul&&Math.abs(J)<Ul)return;if(J>0&&J>Math.abs(I))E.isLocked=!0,m.currentTarget.setPointerCapture(m.pointerId);else{E.isLocked=!1,h();return}}if(!E.isLocked)return;m.preventDefault();const A=Math.max(0,J);u.current=A,r(A)},[e,h]),T=s.useCallback(m=>{const E=c.current;if(!e||!E||m.pointerType!=="touch"||E.pointerId!==m.pointerId)return;const I=E.isLocked===!0;if(m.currentTarget.hasPointerCapture(m.pointerId)&&m.currentTarget.releasePointerCapture(m.pointerId),!I){h();return}m.clientY-E.startY>=p?v():f()},[p,v,e,h,f]),W=s.useCallback(m=>{T(m)},[T]),_=s.useCallback(m=>{T(m)},[T]),X=o>0,D=l?`transform ${n}ms ease`:"none",w=l?`opacity ${n}ms ease`:"none",R=o>0||l;return{isSwipeDragging:X,backdropStyle:{opacity:x(o),transition:w},mediaAreaStyle:{transform:g(o),transition:D,touchAction:X?"none":void 0,willChange:X?"transform":void 0},overlayContentStyle:R?{opacity:b(o),transition:w}:void 0,swipeHandlers:e?{onPointerDown:C,onPointerMove:y,onPointerUp:W,onPointerCancel:_}:{},dismissAreaStyle:e?{touchAction:X?"none":"pan-x"}:void 0}},Iv="[data-lightbox-scrollable]",Wd=()=>{s.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,r=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(Iv)||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=r,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},Rv=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Lv=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Pv=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Ev=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,f)=>{Lv(t),e.scrollLeft=h,f&&(r==null||r())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,x=0;const b=()=>{t.removeEventListener("transitionend",g),clearTimeout(x)},g=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,b(),u(n,!0))};return t.addEventListener("transitionend",g),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{p||(p=!0,b(),u(n,!0))},i+64),()=>{p||(p=!0,b(),u(l-Pv(t),!1))}},Io=300,Mv=900,kv=1500,Av="cubic-bezier(0.16, 1, 0.3, 1)",Fv=3e3,_v=2,Nv=16,Wv=.05,Hv=1,pr=.3,Dv=50,Ov=20,Mi=.004,to=["title1","title2","title3"],Bv={title1:"1",title2:"2",title3:"3"},zv={title1:"title1Color",title2:"title2Color",title3:"title3Color"},jv={title1:.02,title2:.02,title3:.02},mr=e=>`max(${e}, ${Ov}px)`,Vv=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]}},Gv=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=Vv(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},jt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Xv=e=>[jt(e,"fontFamily"),jt(e,"fontSettings"),{type:"row",items:[jt(e,"fontSize"),jt(e,"lineHeight"),jt(e,"letterSpacing"),jt(e,"wordSpacing")]},jt(e,"textAlign"),jt(e,"textAppearance")],qv=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(to.map(e=>[Bv[e],Xv(e)]))}),Vs=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},Hd=(e,t)=>Vs(e,t),gr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Kl=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Vs(e.length,n),effective:Hd(e.length,n)}},Yv=(e,t,n,i,o,r,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:r,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},Ea=(e,t)=>{const n=i=>{const o=jt(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[zv[t]]}},Uv=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Ma=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??jv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Yt(i,n)},Kv=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:x,closeIcon:b,closeIconMaxWidth:g,closeIconColor:h,closeIconHoverColor:f,thumbnailTrigger:v,thumbnailVisibility:C,thumbnailObjectFit:y,thumbnailActive:T,thumbnailActiveColor:W,title1Width:_,title2Width:X,title3Width:D,title1MarginLeft:w=0,title2MarginLeft:R=0,title3MarginLeft:m=0,titleRowMarginBottom:E=0,titleHeaderLayout:I="desktop",contentMarginTop:J,iconMarginLeft:A}=n,Q=P=>H.scalingValue(P,i??!1),q=c??n.thumnailSize??.03,Y=Q(q),oe=Q(u),L=Q(p??.02),N=Q(x??0),V=Q(J??0),de=mr(V),re=Q(A??0),[M,S]=s.useState(0),$=s.useRef(M);$.current=M;const F=t[M],{title1:O,title2:te,title3:xe}=Gv(F),ne=Ma("title1",Ea(n,"title1"),i),ae=Ma("title2",Ea(n,"title2"),i),Z=Ma("title3",Ea(n,"title3"),i),B=I==="mobile",G=!o&&(!i||r),$e=G,he=G,Re=G,ge=Hn(y),ye=ge?{"--image-aspect-ratio":ra(y)}:void 0,Se=!!(O||te||xe),ee=s.useMemo(()=>Yv(e,O,te,xe,ne,ae,Z),[e,M,O,te,xe,ne,ae,Z]),ce=s.useMemo(()=>({title1Width:_,title2Width:X,title3Width:D}),[_,X,D]),ue=s.useMemo(()=>ee.map(P=>ce[P.widthKey]),[ee,ce]),Te=s.useMemo(()=>Vs(ee.length,ue),[ee.length,ue]),ke=s.useMemo(()=>Hd(ee.length,ue),[ee.length,ue]),Ce=s.useMemo(()=>ee.filter(P=>P.prefix==="title1"),[ee]),U=s.useMemo(()=>ee.filter(P=>P.prefix==="title2"||P.prefix==="title3"),[ee]),fe=s.useMemo(()=>Kl(Ce,ce),[Ce,ce]),me=s.useMemo(()=>Kl(U,ce),[U,ce]),K=s.useCallback((P,ie)=>{const le=ee.indexOf(P);if(!B||ie==="single-row")return{effectiveWidth:ke[le]??0,resolvedWidth:Te[le]??0,maxWidth:gr(le,Te)};if(ie==="two-row-top"){const Be=Ce.indexOf(P);return{effectiveWidth:fe.effective[Be]??0,resolvedWidth:fe.resolved[Be]??0,maxWidth:gr(Be,fe.resolved)}}const Pe=U.indexOf(P);return{effectiveWidth:me.effective[Pe]??0,resolvedWidth:me.resolved[Pe]??0,maxWidth:gr(Pe,me.resolved)}},[U,me,ke,Te,ee,Ce,fe,B]),z=s.useCallback(P=>H.scalingValue(P,i??!1),[i]),be=z(E??0),se=s.useMemo(()=>({title1MarginLeft:w,title2MarginLeft:R,title3MarginLeft:m}),[w,R,m]),j=s.useCallback(P=>ee.slice(0,P+1).reduce((ie,le,Pe)=>ie+(le!=null&&le.marginLeftKey?se[le.marginLeftKey]??0:0)+(Te[Pe]??0),0)+(B?0:w??0),[ee,se,Te,B,w]),_e=s.useCallback(()=>B?0:w??0,[B,w]),We=s.useCallback(P=>U.slice(0,P).reduce((ie,le,Pe)=>ie+(le.marginLeftKey?se[le.marginLeftKey]??0:0)+(me.resolved[Pe]??0),0),[U,me.resolved,se]),lt=s.useCallback(P=>{const ie=U[P];return We(P)+(ie.marginLeftKey?se[ie.marginLeftKey]??0:0)+(me.resolved[P]??0)},[U,me.resolved,We,se]),Je=(P,ie)=>{const le=P.marginLeftKey?se[P.marginLeftKey]??0:0,{effectiveWidth:Pe,resolvedWidth:Be,maxWidth:Ke}=K(P,ie),bt=o&&ie==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":P.prefix,style:{...ie==="single-row"?{gridArea:P.prefix}:{},width:z(Pe),...le>0?{marginLeft:z(le)}:{}},children:[a.jsx("p",{className:P.className,style:P.style,children:P.text}),bt&&P.marginLeftKey&&a.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:z(-le),width:`max(${z(le)}, 10px)`,height:"100%",pointerEvents:"auto"}}),bt&&a.jsx("div",{"data-controls":P.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,right:z(-Mi/2),width:z(Mi),height:"100%",pointerEvents:"auto"}})]},P.className)},ct=()=>{const P=B?-1:ee.findIndex(Pe=>Pe.prefix==="title1"),ie=!B&&(o||(w??0)>0)?(()=>{const Pe=w??0,Be=P>=0?Te[P]:_??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:0,width:`max(${z(Pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,le=ee.flatMap((Pe,Be)=>{if(!Pe.marginLeftKey)return[];const Ke=se[Pe.marginLeftKey]??0,bt=Uv(ee,Te,se,Be)+_e();return a.jsx("div",{"data-controls":Pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Te[Be]),style:{position:"absolute",top:0,left:z(bt),width:`max(${z(Ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},Pe.marginLeftKey)});return ie?[ie,...le]:le},it=()=>ee.map((P,ie)=>{const le=gr(ie,Te),Be=j(ie)-Mi/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(Be),width:z(Mi),height:"100%",pointerEvents:"auto"}})},`${P.widthKey}-junction`)}),Ve=()=>U.flatMap((P,ie)=>{if(!P.marginLeftKey)return[];const le=se[P.marginLeftKey]??0,Pe=We(ie),{resolvedWidth:Be}=K(P,"two-row-bottom");return a.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:z(Pe),width:`max(${z(le)}, 10px)`,height:"100%",pointerEvents:"auto"}},P.marginLeftKey)}),Ie=()=>U.map((P,ie)=>{const{maxWidth:le}=K(P,"two-row-bottom"),Be=lt(ie)-Mi/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(Be),width:z(Mi),height:"100%",pointerEvents:"auto"}})},`${P.widthKey}-junction`)}),Ne=s.useRef(null),Oe=s.useRef(null),Ue=s.useRef(null),pe=s.useRef(null),we=s.useRef([]),Ae=s.useRef([]),Xe=s.useRef(0),Ze=s.useRef(null),Ge=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),st=s.useRef(null),Qe=s.useRef(null),Fe=s.useRef(0),qe=s.useRef("forward"),He=s.useRef(0),nt=s.useRef(null),at=s.useRef(!1),dt=t.length>1&&(!o||!!r),Tt=dt?3:1,qt=s.useMemo(()=>Array.from({length:Tt},()=>t).flat(),[t,Tt]),[Zt,xt]=s.useState(!1),[wt,Bt]=s.useState(!1),[At,vt]=s.useState(!0),Ft=s.useRef(null),Nt=s.useRef(null),Ut=s.useRef(!1),Jt=s.useRef(!1),Ct=s.useRef(null),Wt=s.useRef(null),rn=$e&&!At,gt=s.useCallback(()=>{$e&&(vt(!0),Wt.current&&clearTimeout(Wt.current),Wt.current=setTimeout(()=>{Ge.current.isActive||vt(!1)},Fv))},[$e]),Ee=s.useCallback(()=>{o||Jt.current||(Jt.current=!0,Bt(!1),Ct.current=setTimeout(()=>{l()},Io))},[o,l]),ze=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:H.scalingValue(g??0,i),height:H.scalingValue(g??0,i),marginRight:re,"--close-icon-hover-color":f},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ee,"aria-label":"Close",children:a.jsx(sn,{url:b,fill:h,hoverFill:i&&!r?h:f,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),ot=(P="two-row")=>a.jsx("div",{...P==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:z(w??0),flexShrink:0,...P==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...P==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ht=()=>{const P=ee.find(Pe=>Pe.prefix==="title1"),ie=ee.filter(Pe=>Pe.prefix==="title2"||Pe.prefix==="title3"),le=ie.length>0||o||(E??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(w??0)>0||o?ot():null,P&&Je(P,"two-row-top"),b&&ze()]}),le?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[ie.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[ie.map(Pe=>Je(Pe,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ve(),Ie()]})]}):null,a.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:be,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ft=()=>a.jsxs(a.Fragment,{children:[(w??0)>0||o?ot("single-row"):null,ee.map(P=>Je(P,"single-row")),o?a.jsxs(a.Fragment,{children:[ct(),it()]}):null,b?ze():null]}),Lt=s.useCallback(P=>!!(P.closest("[data-controls]")||P.closest(`.${e}-thumbnails`)||P.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:mt,backdropStyle:zt,mediaAreaStyle:kt,overlayContentStyle:Mt,swipeHandlers:Vt,dismissAreaStyle:Gt}=Nd({enabled:G??!1,onClose:Ee,animMs:Io,isBlockedTarget:Lt}),Ht=()=>{if(!dt||t.length===0)return Xe.current=0,0;const P=Ae.current[0],ie=Ae.current[t.length];if(!P||!ie)return Xe.current;const le=ie.offsetLeft-P.offsetLeft;return le>0&&(Xe.current=le),Xe.current},Dt=(P=!1)=>{if(!dt)return;const ie=Oe.current,le=Ht();!ie||le<=0||le<ie.clientWidth*.25||(ie.scrollLeft<=0?(ie.scrollLeft+=le,P&&(Ge.current.scrollLeft+=le),at.current&&(He.current+=le)):ie.scrollLeft>=le*2&&(ie.scrollLeft-=le,P&&(Ge.current.scrollLeft-=le),at.current&&(He.current-=le)))},_t=(P,ie=(le=>(le=Oe.current)==null?void 0:le.scrollLeft)()??0)=>{if(!dt)return P;let Pe=t.length+P,Be=1/0;for(let Ke=0;Ke<Tt;Ke++){const bt=Ke*t.length+P,Rt=Ae.current[bt];if(!Rt)continue;const tn=Math.abs(Rt.offsetLeft-ie);tn<Be&&(Be=tn,Pe=bt)}return Pe},St=P=>{const ie=Oe.current;return!P||!ie?!1:P.offsetWidth>ie.clientWidth+1},k=P=>{const ie=Oe.current;if(!P||!ie||!St(P))return!1;const le=P.offsetLeft,Pe=le+P.offsetWidth;return ie.scrollLeft>=le-1&&ie.scrollLeft+ie.clientWidth<=Pe+1},Le=(P=(ie=>(ie=Oe.current)==null?void 0:ie.scrollLeft)()??0)=>{for(let Pe=0;Pe<Ae.current.length;Pe+=1){const Be=Ae.current[Pe];if(Be&&k(Be))return Pe}let le={flatIndex:0,distance:1/0};return Ae.current.forEach((Pe,Be)=>{if(!Pe)return;const Ke=Math.abs(Pe.offsetLeft-P);Ke<le.distance&&(le={flatIndex:Be,distance:Ke})}),le.flatIndex},Me=P=>{Oe.current&&Ae.current.forEach(ie=>{ie&&(ie.style.scrollSnapAlign=St(ie)&&P==="backward"?"end":"start")})},De=(P,ie,le)=>{const Pe=P-ie,Be=Le(ie),Ke=Ae.current[Be];if(k(Ke))return Le(P)%t.length;const bt=Ae.current[Be+1],Rt=Ke?bt?bt.offsetLeft-Ke.offsetLeft:Ke.offsetWidth:0,tn=Rt>0?Pe>Rt*pr?1:Pe<-Rt*pr?-1:0:0;return tn===0?le:dt?(le+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,le+tn))},rt=s.useCallback((P=!1)=>{if(C!=="on"||o)return;const ie=pe.current,le=$.current,Pe=we.current[le];if(!ie||!Pe||ie.scrollWidth<=ie.clientWidth)return;const Be=ie.scrollLeft,Ke=Be+ie.clientWidth,bt=Pe.offsetLeft,Rt=bt+Pe.offsetWidth;if(bt>=Be&&Rt<=Ke)return;const tn=ie.scrollWidth-ie.clientWidth;let Qt=Be;if(!P&&Ft.current===null){const Li=we.current[le-1],uo=we.current[le+1],nr=Li?Pe.offsetLeft-Li.offsetLeft:uo?uo.offsetLeft-Pe.offsetLeft:Pe.offsetWidth;Rt>Ke?Qt+=nr:bt<Be&&(Qt-=nr)}else Rt>Ke?Qt=Rt-ie.clientWidth:Qt=bt;ie.scrollLeft=Math.max(0,Math.min(tn,Qt))},[o,C]),Et=s.useCallback((P=!1)=>{P&&(Ut.current=!0),Nt.current===null&&(Nt.current=requestAnimationFrame(()=>{Nt.current=null;const ie=Ut.current;Ut.current=!1,rt(ie)}))},[rt]),et=s.useCallback(P=>{if(P===$.current)return;const ie=$.current;$.current=P;const le=Math.abs(P-ie)>1,Pe=dt&&t.length>1&&(ie===t.length-1&&P===0||ie===0&&P===t.length-1);S(P),Et(le||Pe)},[t.length,dt,Et]),yt=()=>{if(!Oe.current||t.length===0||Ft.current!==null||Ge.current.isActive&&Ge.current.hasMoved)return;const P=Oe.current.scrollLeft,ie=Le(P)%t.length;ie!==$.current&&et(ie)},Ot=()=>{Ft.current=null},It=P=>{const ie=Oe.current;ie&&(ie.style.scrollSnapType=P?"":"none")},nn=()=>{var P;(P=Qe.current)==null||P.call(Qe),Qe.current=null},un=()=>{nt.current!==null&&(cancelAnimationFrame(nt.current),nt.current=null),at.current=!1},si=()=>{const P=Oe.current;if(!P){nt.current=null,at.current=!1;return}const ie=He.current-P.scrollLeft;if(Math.abs(ie)<.5){P.scrollLeft=He.current,Dt(),yt(),nt.current=null,at.current=!1;return}P.scrollLeft+=ie*Wv,Dt(),yt(),gt(),nt.current=requestAnimationFrame(si)},li=()=>{const P=Ue.current;P&&(P.style.transition="",P.style.transform="",P.style.willChange="")},Jo=(P,ie,le,Pe)=>{li(),P.scrollLeft=ie,Fe.current=P.scrollLeft,Dt(),le!==void 0?($.current=le,S(le)):yt(),It(!0),Pe==null||Pe()},Qo=(P,{behavior:ie="smooth",activeIndex:le,onComplete:Pe}={})=>{const Be=Oe.current,Ke=Ue.current;if(!Be||!Ke)return;if(un(),nn(),It(!1),ie==="auto"){Jo(Be,P,le,Pe);return}const bt=Math.abs(P-Be.scrollLeft),Rt=Rv(bt,Mv,kv,Be.clientWidth*.55);Qe.current=Ev(Be,Ke,P,{duration:Rt,easing:Av,onComplete:()=>{Qe.current=null,Jo(Be,P,le,Pe)}})},sa=(P="smooth")=>{const ie=Oe.current;if(!ie||t.length===0)return;const le=Le()%t.length,Pe=_t(le,ie.scrollLeft),Be=Ae.current[Pe];Be&&Qo(Be.offsetLeft,{behavior:P,activeIndex:le})},la=(P,ie="smooth",le,Pe)=>{const Be=Oe.current;if(!Be||t.length===0)return;const Ke=(Pe??Be.scrollLeft)-P,bt=Le(P),Rt=Ae.current[bt];if(k(Rt)){It(!0),yt();return}const tn=Ae.current[bt+1],Qt=Rt?tn?tn.offsetLeft-Rt.offsetLeft:Rt.offsetWidth:0;if((Qt>0?Ke>Qt*pr?1:Ke<-Qt*pr?-1:0:0)!==0){const mu=le??bt%t.length,gu=De(Pe??Be.scrollLeft,P,mu);Cn(gu,ie);return}const uo=Pe??Be.scrollLeft,nr=Le(uo),qs=Ae.current[nr];if(qs&&Math.abs(qs.offsetLeft-uo)<1){It(!0),yt();return}sa("auto")},Cn=(P,ie="smooth")=>{const le=Oe.current;if(!le||t.length===0)return;const Pe=_t(P,le.scrollLeft),Be=Ae.current[Pe];Be&&(ie==="smooth"?Ft.current=P:Ft.current=null,$.current=P,S(P),Et(!0),Qo(Be.offsetLeft,{behavior:ie,activeIndex:P,onComplete:ie==="smooth"?Ot:void 0}))},Ri=()=>{st.current&&(window.removeEventListener("pointerup",st.current),window.removeEventListener("pointercancel",st.current),st.current=null)},er=(P,ie,le,Pe,Be)=>{const Ke=le-P,bt=Pe-ie,Rt=Math.abs(Ke),tn=Math.abs(bt);if(Rt<Dv||Rt<=tn)return!1;const Qt=Ke<0?1:-1,Li=dt?(Be+Qt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Be+Qt));return Li===Be?!1:(Cn(Li),!0)},ci=P=>{if(!Ge.current.isActive)return;Ri();const ie=Oe.current;if(!ie)return;const{scrollLeft:le,startActiveIndex:Pe,hasMoved:Be}=Ge.current,Ke=ie.scrollLeft;Dt(!0),Ge.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},xt(!1),P!==void 0&&ie.hasPointerCapture(P)&&ie.releasePointerCapture(P),Be?la(le,"smooth",Pe,Ke):(It(!0),yt()),gt()},tr=(P,ie)=>{const le=Ze.current;Ze.current=null,le&&(er(le.startX,le.startY,P,ie,le.startActiveIndex),gt())},ca=P=>{if(!he)return;if(P.pointerType==="touch"){if(un(),It(!0),Lt(P.target))return;Ze.current={startX:P.clientX,startY:P.clientY,startActiveIndex:$.current};return}if(P.pointerType!=="mouse"||P.button!==0||Lt(P.target))return;const ie=Oe.current;if(!ie)return;un(),nn(),li(),Ft.current=null,Ge.current={isActive:!0,startX:P.clientX,scrollLeft:ie.scrollLeft,startActiveIndex:$.current,hasMoved:!1},It(!1),gt(),ie.setPointerCapture(P.pointerId),Ri();const le=Pe=>{Pe.pointerType==="mouse"&&ci(Pe.pointerId)};st.current=le,window.addEventListener("pointerup",le),window.addEventListener("pointercancel",le)},da=P=>{if(!he||P.pointerType!=="mouse")return;const ie=Oe.current;if(!ie||!Ge.current.isActive)return;if(P.buttons===0){ci(P.pointerId);return}const le=P.clientX-Ge.current.startX;Math.abs(le)>Hv&&(Ge.current.hasMoved=!0,xt(!0)),Ge.current.hasMoved&&(P.preventDefault(),ie.scrollLeft=Ge.current.scrollLeft-le,Dt(!0),yt(),gt())},ve=P=>{if(he){if(P.pointerType==="touch"){P.type==="pointerup"?tr(P.clientX,P.clientY):Ze.current=null;return}P.pointerType==="mouse"&&ci(P.pointerId)}},je=P=>{!he||P.pointerType!=="mouse"||ci(P.pointerId)};return Wd(),s.useEffect(()=>{const P=requestAnimationFrame(()=>Bt(!0));return()=>{cancelAnimationFrame(P),nn(),Ri(),Nt.current!==null&&(cancelAnimationFrame(Nt.current),Nt.current=null),Ct.current&&clearTimeout(Ct.current),Wt.current&&clearTimeout(Wt.current)}},[]),s.useEffect(()=>{if(!$e){vt(!0);return}gt();const P=Ne.current;if(!P)return;const ie=()=>gt();return P.addEventListener("pointermove",ie),P.addEventListener("pointerdown",ie),()=>{P.removeEventListener("pointermove",ie),P.removeEventListener("pointerdown",ie),Wt.current&&clearTimeout(Wt.current)}},[$e,gt]),s.useEffect(()=>{const P=ie=>{ie.key==="Escape"&&Ee()};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[Ee]),s.useLayoutEffect(()=>{Ht()},[N,t.length,dt]),s.useLayoutEffect(()=>{o||Cn($.current,"auto")},[N,o]),s.useLayoutEffect(()=>{Cn(0,"auto")},[t.length,dt]),s.useEffect(()=>{const P=Oe.current;if(!P||o||!G)return;const ie=le=>{if(le.preventDefault(),Math.abs(le.deltaY)<=Math.abs(le.deltaX))return;const Pe=le.deltaMode===1?Nv:le.deltaMode===2?P.clientHeight:1,Be=le.deltaY*Pe*_v;if(Be!==0){if(nn(),at.current||(at.current=!0,He.current=P.scrollLeft,Ft.current=null,It(!1)),He.current+=Be,!dt){const Ke=P.scrollWidth-P.clientWidth;He.current=Math.max(0,Math.min(Ke,He.current))}gt(),nt.current===null&&(nt.current=requestAnimationFrame(si))}};return P.addEventListener("wheel",ie,{passive:!1}),()=>{P.removeEventListener("wheel",ie),un()}},[o,G,dt]),s.useEffect(()=>{const P=Oe.current;if(!P)return;const ie=()=>{Dt(Ge.current.isActive);const Pe=P.scrollLeft,Be=Pe-Fe.current;Fe.current=Pe;const Ke=Xe.current>0?Xe.current*.5:1/0;if(Be!==0&&Math.abs(Be)<Ke){const bt=Be>0?"forward":"backward";bt!==qe.current&&(qe.current=bt,Me(bt))}Ge.current.isActive&&Ge.current.hasMoved||yt()};P.addEventListener("scroll",ie,{passive:!0});const le=new ResizeObserver(()=>{Ht(),Dt(Ge.current.isActive),Me(qe.current),yt()});return le.observe(P),()=>{nn(),P.removeEventListener("scroll",ie),le.disconnect()}},[t.length,dt]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{mt||Ee()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:wt?1:0,transition:`opacity ${Io}ms ease`,pointerEvents:wt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...zt}}),a.jsxs("div",{ref:Ne,className:`${e}-lightbox-dismiss-area`,style:Gt,...Vt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:kt,onClick:P=>P.stopPropagation(),children:a.jsx("div",{ref:Oe,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":he&&t.length>0?"true":"false","data-mouse-dragging":Zt?"true":"false",onPointerDown:ca,onPointerMove:da,onPointerUp:ve,onPointerCancel:ve,onLostPointerCapture:je,children:a.jsx("div",{ref:Ue,className:`${e}-lightbox-strip-track`,style:{gap:N},children:qt.map((P,ie)=>{const le=P.image.objectFit??"contain",Pe=ie%t.length,Be=Math.floor(ie/t.length),Ke=mr(N),bt=`calc(-0.5 * (${Ke} + ${N}))`;return a.jsxs("div",{ref:Rt=>Ae.current[ie]=Rt,className:`${e}-strip-item`,style:{height:I==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:P.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:le}}),o&&Pe<t.length-1&&Be===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:bt,width:Ke,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Be}-${P.image.url}-${Pe}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:Mt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:V,flexShrink:0,pointerEvents:"none"},children:o&&a.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:de,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${B?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||b)&&a.jsx("div",{className:`${e}-header ${B?`${e}-header-two-row`:`${e}-header-single-row`}`,children:B?ht():Se||b?ft():null})})})]}),t.length>1&&C==="on"&&(()=>{const P=mr(L),ie=`calc(-0.5 * (${L} + ${P}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:L},children:a.jsx("div",{ref:pe,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:le=>le.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":T,style:{gap:oe,"--thumbnail-active-color":W},children:[t.map((le,Pe)=>{const Be=mr(oe),Ke=`calc(-0.5 * (${Be} + ${oe}))`;return a.jsxs("div",{ref:bt=>{we.current[Pe]=bt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":M===Pe?"true":"false",onClick:()=>G&&v==="click"&&Cn(Pe),onMouseEnter:()=>Re&&v==="hover"&&Cn(Pe),"aria-label":le.image.name?`View ${le.image.name}`:`View image ${Pe+1}`,"aria-current":M===Pe?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${ge?` ${e}-thumb-image-cover`:""}`,src:le.image.url,alt:"",draggable:!1,style:{...ye,maxWidth:Y,maxHeight:Y,width:y.display==="cover"?"auto":"100%",height:"auto",objectFit:y.display==="cover"?"cover":"contain"}})}),o&&Pe<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ke,width:Be,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${le.image.url}-${Pe}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:ie,height:P,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Zv(e){return`
14225
+ `;function Gn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Zl={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Tv=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Iv={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:Gn("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:{...Zl.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:{...Zl.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:Gn("Question Padding Left"),questionPaddingTop:Gn("Question Padding Top"),questionPaddingBottom:Gn("Question Padding Bottom"),answerPaddingLeft:Gn("Answer Padding Left"),answerPaddingRight:Gn("Answer Padding Right"),answerPaddingTop:Gn("Answer Padding Top"),answerPaddingBottom:Gn("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.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:[...Tv],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Rv={element:Cv,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:Iv,sourceCode:$v},Dn=e=>e.display==="cover",aa=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Jl=100,Lv=.2,Ql=8,Od=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,d]=s.useState(!1),c=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?Jl:Math.max(Jl,window.innerHeight*Lv),[]),v=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),w=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const I=typeof window<"u"?window.innerHeight:800,P=Math.max(.88,1-$/I*.12);return`translateY(${$}px) scale(${P})`},[]),h=s.useCallback(()=>{c.current=null},[]),f=s.useCallback(()=>{d(!0),r(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),x=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;d(!0),r($),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),C=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(c.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),y=s.useCallback($=>{const I=c.current;if(!e||!I||$.pointerType!=="touch"||I.pointerId!==$.pointerId)return;const P=$.clientX-I.startX,E=$.clientY-I.startY;if(I.isLocked===null){if(Math.abs(P)<Ql&&Math.abs(E)<Ql)return;if(E>0&&E>Math.abs(P))I.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{I.isLocked=!1,h();return}}if(!I.isLocked)return;$.preventDefault();const g=Math.max(0,E);u.current=g,r(g)},[e,h]),S=s.useCallback($=>{const I=c.current;if(!e||!I||$.pointerType!=="touch"||I.pointerId!==$.pointerId)return;const P=I.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!P){h();return}$.clientY-I.startY>=p?x():f()},[p,x,e,h,f]),B=s.useCallback($=>{S($)},[S]),N=s.useCallback($=>{S($)},[S]),q=o>0,D=l?`transform ${n}ms ease`:"none",T=l?`opacity ${n}ms ease`:"none",H=o>0||l;return{isSwipeDragging:q,backdropStyle:{opacity:v(o),transition:T},mediaAreaStyle:{transform:m(o),transition:D,touchAction:q?"none":void 0,willChange:q?"transform":void 0},overlayContentStyle:H?{opacity:w(o),transition:T}:void 0,swipeHandlers:e?{onPointerDown:C,onPointerMove:y,onPointerUp:B,onPointerCancel:N}:{},dismissAreaStyle:e?{touchAction:q?"none":"pan-x"}:void 0}},Pv="[data-lightbox-scrollable]",Bd=()=>{s.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,r=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(Pv)||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=r,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},Ev=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Mv=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},kv=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Av=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,f)=>{Mv(t),e.scrollLeft=h,f&&(r==null||r())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,v=0;const w=()=>{t.removeEventListener("transitionend",m),clearTimeout(v)},m=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,w(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,v=window.setTimeout(()=>{p||(p=!0,w(),u(n,!0))},i+64),()=>{p||(p=!0,w(),u(l-kv(t),!1))}},Lo=300,Fv=900,_v=1500,Nv="cubic-bezier(0.16, 1, 0.3, 1)",Wv=3e3,Hv=2,Dv=16,Ov=.05,Bv=1,gr=.3,zv=50,jv=20,Ai=.004,io=["title1","title2","title3"],Vv={title1:"1",title2:"2",title3:"3"},Gv={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Xv={title1:.02,title2:.02,title3:.02},hr=e=>`max(${e}, ${jv}px)`,qv=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]}},Yv=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=qv(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Gt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Uv=e=>[Gt(e,"fontFamily"),Gt(e,"fontSettings"),{type:"row",items:[Gt(e,"fontSize"),Gt(e,"lineHeight"),Gt(e,"letterSpacing"),Gt(e,"wordSpacing")]},Gt(e,"textAlign"),Gt(e,"textAppearance")],Kv=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(io.map(e=>[Vv[e],Uv(e)]))}),Ys=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},zd=(e,t)=>Ys(e,t),fr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},ec=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ys(e.length,n),effective:zd(e.length,n)}},Zv=(e,t,n,i,o,r,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:r,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},Ma=(e,t)=>{const n=i=>{const o=Gt(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[Gv[t]]}},Jv=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ka=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Xv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Ut(i,n)},Qv=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:v,closeIcon:w,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:f,thumbnailTrigger:x,thumbnailVisibility:C,thumbnailObjectFit:y,thumbnailActive:S,thumbnailActiveColor:B,title1Width:N,title2Width:q,title3Width:D,title1MarginLeft:T=0,title2MarginLeft:H=0,title3MarginLeft:$=0,titleRowMarginBottom:I=0,titleHeaderLayout:P="desktop",contentMarginTop:E,iconMarginLeft:g}=n,z=R=>W.scalingValue(R,i??!1),F=c??n.thumnailSize??.03,X=z(F),ie=z(u),L=z(p??.02),_=z(v??0),V=z(E??0),ae=hr(V),re=z(g??0),[M,se]=s.useState(0),j=s.useRef(M);j.current=M;const b=t[M],{title1:k,title2:G,title3:he}=Yv(b),J=ka("title1",Ma(n,"title1"),i),ee=ka("title2",Ma(n,"title2"),i),O=ka("title3",Ma(n,"title3"),i),Z=P==="mobile",te=!o&&(!i||r),Le=te,ve=te,Ie=te,pe=Dn(y),oe=pe?{"--image-aspect-ratio":aa(y)}:void 0,ye=!!(k||G||he),U=s.useMemo(()=>Zv(e,k,G,he,J,ee,O),[e,M,k,G,he,J,ee,O]),ce=s.useMemo(()=>({title1Width:N,title2Width:q,title3Width:D}),[N,q,D]),le=s.useMemo(()=>U.map(R=>ce[R.widthKey]),[U,ce]),Ce=s.useMemo(()=>Ys(U.length,le),[U.length,le]),Fe=s.useMemo(()=>zd(U.length,le),[U.length,le]),Ee=s.useMemo(()=>U.filter(R=>R.prefix==="title1"),[U]),Y=s.useMemo(()=>U.filter(R=>R.prefix==="title2"||R.prefix==="title3"),[U]),be=s.useMemo(()=>ec(Ee,ce),[Ee,ce]),de=s.useMemo(()=>ec(Y,ce),[Y,ce]),K=s.useCallback((R,ne)=>{const me=U.indexOf(R);if(!Z||ne==="single-row")return{effectiveWidth:Fe[me]??0,resolvedWidth:Ce[me]??0,maxWidth:fr(me,Ce)};if(ne==="two-row-top"){const je=Ee.indexOf(R);return{effectiveWidth:be.effective[je]??0,resolvedWidth:be.resolved[je]??0,maxWidth:fr(je,be.resolved)}}const Me=Y.indexOf(R);return{effectiveWidth:de.effective[Me]??0,resolvedWidth:de.resolved[Me]??0,maxWidth:fr(Me,de.resolved)}},[Y,de,Fe,Ce,U,Ee,be,Z]),ue=s.useCallback(R=>W.scalingValue(R,i??!1),[i]),He=ue(I??0),fe=s.useMemo(()=>({title1MarginLeft:T,title2MarginLeft:H,title3MarginLeft:$}),[T,H,$]),Q=s.useCallback(R=>U.slice(0,R+1).reduce((ne,me,Me)=>ne+(me!=null&&me.marginLeftKey?fe[me.marginLeftKey]??0:0)+(Ce[Me]??0),0)+(Z?0:T??0),[U,fe,Ce,Z,T]),Je=s.useCallback(()=>Z?0:T??0,[Z,T]),Ne=s.useCallback(R=>Y.slice(0,R).reduce((ne,me,Me)=>ne+(me.marginLeftKey?fe[me.marginLeftKey]??0:0)+(de.resolved[Me]??0),0),[Y,de.resolved,fe]),ct=s.useCallback(R=>{const ne=Y[R];return Ne(R)+(ne.marginLeftKey?fe[ne.marginLeftKey]??0:0)+(de.resolved[R]??0)},[Y,de.resolved,Ne,fe]),Ke=(R,ne)=>{const me=R.marginLeftKey?fe[R.marginLeftKey]??0:0,{effectiveWidth:Me,resolvedWidth:je,maxWidth:et}=K(R,ne),bt=o&&ne==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":R.prefix,style:{...ne==="single-row"?{gridArea:R.prefix}:{},width:ue(Me),...me>0?{marginLeft:ue(me)}:{}},children:[a.jsx("p",{className:R.className,style:R.style,children:R.text}),bt&&R.marginLeftKey&&a.jsx("div",{"data-controls":R.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:ue(-me),width:`max(${ue(me)}, 10px)`,height:"100%",pointerEvents:"auto"}}),bt&&a.jsx("div",{"data-controls":R.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(et),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:ue(-Ai/2),width:ue(Ai),height:"100%",pointerEvents:"auto"}})]},R.className)},ut=()=>{const R=Z?-1:U.findIndex(Me=>Me.prefix==="title1"),ne=!Z&&(o||(T??0)>0)?(()=>{const Me=T??0,je=R>=0?Ce[R]:N??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:0,width:`max(${ue(Me)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,me=U.flatMap((Me,je)=>{if(!Me.marginLeftKey)return[];const et=fe[Me.marginLeftKey]??0,bt=Jv(U,Ce,fe,je)+Je();return a.jsx("div",{"data-controls":Me.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce[je]),style:{position:"absolute",top:0,left:ue(bt),width:`max(${ue(et)}, 10px)`,height:"100%",pointerEvents:"auto"}},Me.marginLeftKey)});return ne?[ne,...me]:me},lt=()=>U.map((R,ne)=>{const me=fr(ne,Ce),je=Q(ne)-Ai/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":R.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,left:ue(je),width:ue(Ai),height:"100%",pointerEvents:"auto"}})},`${R.widthKey}-junction`)}),Ye=()=>Y.flatMap((R,ne)=>{if(!R.marginLeftKey)return[];const me=fe[R.marginLeftKey]??0,Me=Ne(ne),{resolvedWidth:je}=K(R,"two-row-bottom");return a.jsx("div",{"data-controls":R.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:ue(Me),width:`max(${ue(me)}, 10px)`,height:"100%",pointerEvents:"auto"}},R.marginLeftKey)}),Re=()=>Y.map((R,ne)=>{const{maxWidth:me}=K(R,"two-row-bottom"),je=ct(ne)-Ai/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":R.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,left:ue(je),width:ue(Ai),height:"100%",pointerEvents:"auto"}})},`${R.widthKey}-junction`)}),We=s.useRef(null),Be=s.useRef(null),Ue=s.useRef(null),ge=s.useRef(null),xe=s.useRef([]),_e=s.useRef([]),Ze=s.useRef(0),we=s.useRef(null),$e=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Xe=s.useRef(null),ze=s.useRef(null),Te=s.useRef(0),Ve=s.useRef("forward"),De=s.useRef(0),tt=s.useRef(null),nt=s.useRef(!1),st=t.length>1&&(!o||!!r),St=st?3:1,Bt=s.useMemo(()=>Array.from({length:St},()=>t).flat(),[t,St]),[zt,ft]=s.useState(!1),[wt,jt]=s.useState(!1),[At,xt]=s.useState(!0),Ft=s.useRef(null),Nt=s.useRef(null),Kt=s.useRef(!1),Jt=s.useRef(!1),Tt=s.useRef(null),Wt=s.useRef(null),rn=Le&&!At,gt=s.useCallback(()=>{Le&&(xt(!0),Wt.current&&clearTimeout(Wt.current),Wt.current=setTimeout(()=>{$e.current.isActive||xt(!1)},Wv))},[Le]),ke=s.useCallback(()=>{o||Jt.current||(Jt.current=!0,jt(!1),Tt.current=setTimeout(()=>{l()},Lo))},[o,l]),Ge=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:W.scalingValue(m??0,i),height:W.scalingValue(m??0,i),marginRight:re,"--close-icon-hover-color":f},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ke,"aria-label":"Close",children:a.jsx(sn,{url:w,fill:h,hoverFill:i&&!r?h:f,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),rt=(R="two-row")=>a.jsx("div",{...R==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:ue(T??0),flexShrink:0,...R==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...R==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ht=()=>{const R=U.find(Me=>Me.prefix==="title1"),ne=U.filter(Me=>Me.prefix==="title2"||Me.prefix==="title3"),me=ne.length>0||o||(I??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(T??0)>0||o?rt():null,R&&Ke(R,"two-row-top"),w&&Ge()]}),me?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[ne.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[ne.map(Me=>Ke(Me,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ye(),Re()]})]}):null,a.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:He,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},yt=()=>a.jsxs(a.Fragment,{children:[(T??0)>0||o?rt("single-row"):null,U.map(R=>Ke(R,"single-row")),o?a.jsxs(a.Fragment,{children:[ut(),lt()]}):null,w?Ge():null]}),Lt=s.useCallback(R=>!!(R.closest("[data-controls]")||R.closest(`.${e}-thumbnails`)||R.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:mt,backdropStyle:Vt,mediaAreaStyle:kt,overlayContentStyle:Mt,swipeHandlers:Xt,dismissAreaStyle:qt}=Od({enabled:te??!1,onClose:ke,animMs:Lo,isBlockedTarget:Lt}),Ht=()=>{if(!st||t.length===0)return Ze.current=0,0;const R=_e.current[0],ne=_e.current[t.length];if(!R||!ne)return Ze.current;const me=ne.offsetLeft-R.offsetLeft;return me>0&&(Ze.current=me),Ze.current},Dt=(R=!1)=>{if(!st)return;const ne=Be.current,me=Ht();!ne||me<=0||me<ne.clientWidth*.25||(ne.scrollLeft<=0?(ne.scrollLeft+=me,R&&($e.current.scrollLeft+=me),nt.current&&(De.current+=me)):ne.scrollLeft>=me*2&&(ne.scrollLeft-=me,R&&($e.current.scrollLeft-=me),nt.current&&(De.current-=me)))},_t=(R,ne=(me=>(me=Be.current)==null?void 0:me.scrollLeft)()??0)=>{if(!st)return R;let Me=t.length+R,je=1/0;for(let et=0;et<St;et++){const bt=et*t.length+R,Rt=_e.current[bt];if(!Rt)continue;const tn=Math.abs(Rt.offsetLeft-ne);tn<je&&(je=tn,Me=bt)}return Me},Ct=R=>{const ne=Be.current;return!R||!ne?!1:R.offsetWidth>ne.clientWidth+1},A=R=>{const ne=Be.current;if(!R||!ne||!Ct(R))return!1;const me=R.offsetLeft,Me=me+R.offsetWidth;return ne.scrollLeft>=me-1&&ne.scrollLeft+ne.clientWidth<=Me+1},Pe=(R=(ne=>(ne=Be.current)==null?void 0:ne.scrollLeft)()??0)=>{for(let Me=0;Me<_e.current.length;Me+=1){const je=_e.current[Me];if(je&&A(je))return Me}let me={flatIndex:0,distance:1/0};return _e.current.forEach((Me,je)=>{if(!Me)return;const et=Math.abs(Me.offsetLeft-R);et<me.distance&&(me={flatIndex:je,distance:et})}),me.flatIndex},Ae=R=>{Be.current&&_e.current.forEach(ne=>{ne&&(ne.style.scrollSnapAlign=Ct(ne)&&R==="backward"?"end":"start")})},Oe=(R,ne,me)=>{const Me=R-ne,je=Pe(ne),et=_e.current[je];if(A(et))return Pe(R)%t.length;const bt=_e.current[je+1],Rt=et?bt?bt.offsetLeft-et.offsetLeft:et.offsetWidth:0,tn=Rt>0?Me>Rt*gr?1:Me<-Rt*gr?-1:0:0;return tn===0?me:st?(me+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,me+tn))},at=s.useCallback((R=!1)=>{if(C!=="on"||o)return;const ne=ge.current,me=j.current,Me=xe.current[me];if(!ne||!Me||ne.scrollWidth<=ne.clientWidth)return;const je=ne.scrollLeft,et=je+ne.clientWidth,bt=Me.offsetLeft,Rt=bt+Me.offsetWidth;if(bt>=je&&Rt<=et)return;const tn=ne.scrollWidth-ne.clientWidth;let Qt=je;if(!R&&Ft.current===null){const Ei=xe.current[me-1],mo=xe.current[me+1],or=Ei?Me.offsetLeft-Ei.offsetLeft:mo?mo.offsetLeft-Me.offsetLeft:Me.offsetWidth;Rt>et?Qt+=or:bt<je&&(Qt-=or)}else Rt>et?Qt=Rt-ne.clientWidth:Qt=bt;ne.scrollLeft=Math.max(0,Math.min(tn,Qt))},[o,C]),Et=s.useCallback((R=!1)=>{R&&(Kt.current=!0),Nt.current===null&&(Nt.current=requestAnimationFrame(()=>{Nt.current=null;const ne=Kt.current;Kt.current=!1,at(ne)}))},[at]),it=s.useCallback(R=>{if(R===j.current)return;const ne=j.current;j.current=R;const me=Math.abs(R-ne)>1,Me=st&&t.length>1&&(ne===t.length-1&&R===0||ne===0&&R===t.length-1);se(R),Et(me||Me)},[t.length,st,Et]),vt=()=>{if(!Be.current||t.length===0||Ft.current!==null||$e.current.isActive&&$e.current.hasMoved)return;const R=Be.current.scrollLeft,ne=Pe(R)%t.length;ne!==j.current&&it(ne)},Ot=()=>{Ft.current=null},It=R=>{const ne=Be.current;ne&&(ne.style.scrollSnapType=R?"":"none")},nn=()=>{var R;(R=ze.current)==null||R.call(ze),ze.current=null},un=()=>{tt.current!==null&&(cancelAnimationFrame(tt.current),tt.current=null),nt.current=!1},li=()=>{const R=Be.current;if(!R){tt.current=null,nt.current=!1;return}const ne=De.current-R.scrollLeft;if(Math.abs(ne)<.5){R.scrollLeft=De.current,Dt(),vt(),tt.current=null,nt.current=!1;return}R.scrollLeft+=ne*Ov,Dt(),vt(),gt(),tt.current=requestAnimationFrame(li)},ci=()=>{const R=Ue.current;R&&(R.style.transition="",R.style.transform="",R.style.willChange="")},er=(R,ne,me,Me)=>{ci(),R.scrollLeft=ne,Te.current=R.scrollLeft,Dt(),me!==void 0?(j.current=me,se(me)):vt(),It(!0),Me==null||Me()},tr=(R,{behavior:ne="smooth",activeIndex:me,onComplete:Me}={})=>{const je=Be.current,et=Ue.current;if(!je||!et)return;if(un(),nn(),It(!1),ne==="auto"){er(je,R,me,Me);return}const bt=Math.abs(R-je.scrollLeft),Rt=Ev(bt,Fv,_v,je.clientWidth*.55);ze.current=Av(je,et,R,{duration:Rt,easing:Nv,onComplete:()=>{ze.current=null,er(je,R,me,Me)}})},la=(R="smooth")=>{const ne=Be.current;if(!ne||t.length===0)return;const me=Pe()%t.length,Me=_t(me,ne.scrollLeft),je=_e.current[Me];je&&tr(je.offsetLeft,{behavior:R,activeIndex:me})},ca=(R,ne="smooth",me,Me)=>{const je=Be.current;if(!je||t.length===0)return;const et=(Me??je.scrollLeft)-R,bt=Pe(R),Rt=_e.current[bt];if(A(Rt)){It(!0),vt();return}const tn=_e.current[bt+1],Qt=Rt?tn?tn.offsetLeft-Rt.offsetLeft:Rt.offsetWidth:0;if((Qt>0?et>Qt*gr?1:et<-Qt*gr?-1:0:0)!==0){const fu=me??bt%t.length,yu=Oe(Me??je.scrollLeft,R,fu);$n(yu,ne);return}const mo=Me??je.scrollLeft,or=Pe(mo),Zs=_e.current[or];if(Zs&&Math.abs(Zs.offsetLeft-mo)<1){It(!0),vt();return}la("auto")},$n=(R,ne="smooth")=>{const me=Be.current;if(!me||t.length===0)return;const Me=_t(R,me.scrollLeft),je=_e.current[Me];je&&(ne==="smooth"?Ft.current=R:Ft.current=null,j.current=R,se(R),Et(!0),tr(je.offsetLeft,{behavior:ne,activeIndex:R,onComplete:ne==="smooth"?Ot:void 0}))},Pi=()=>{Xe.current&&(window.removeEventListener("pointerup",Xe.current),window.removeEventListener("pointercancel",Xe.current),Xe.current=null)},nr=(R,ne,me,Me,je)=>{const et=me-R,bt=Me-ne,Rt=Math.abs(et),tn=Math.abs(bt);if(Rt<zv||Rt<=tn)return!1;const Qt=et<0?1:-1,Ei=st?(je+Qt+t.length)%t.length:Math.max(0,Math.min(t.length-1,je+Qt));return Ei===je?!1:($n(Ei),!0)},di=R=>{if(!$e.current.isActive)return;Pi();const ne=Be.current;if(!ne)return;const{scrollLeft:me,startActiveIndex:Me,hasMoved:je}=$e.current,et=ne.scrollLeft;Dt(!0),$e.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ft(!1),R!==void 0&&ne.hasPointerCapture(R)&&ne.releasePointerCapture(R),je?ca(me,"smooth",Me,et):(It(!0),vt()),gt()},ir=(R,ne)=>{const me=we.current;we.current=null,me&&(nr(me.startX,me.startY,R,ne,me.startActiveIndex),gt())},da=R=>{if(!ve)return;if(R.pointerType==="touch"){if(un(),It(!0),Lt(R.target))return;we.current={startX:R.clientX,startY:R.clientY,startActiveIndex:j.current};return}if(R.pointerType!=="mouse"||R.button!==0||Lt(R.target))return;const ne=Be.current;if(!ne)return;un(),nn(),ci(),Ft.current=null,$e.current={isActive:!0,startX:R.clientX,scrollLeft:ne.scrollLeft,startActiveIndex:j.current,hasMoved:!1},It(!1),gt(),ne.setPointerCapture(R.pointerId),Pi();const me=Me=>{Me.pointerType==="mouse"&&di(Me.pointerId)};Xe.current=me,window.addEventListener("pointerup",me),window.addEventListener("pointercancel",me)},ua=R=>{if(!ve||R.pointerType!=="mouse")return;const ne=Be.current;if(!ne||!$e.current.isActive)return;if(R.buttons===0){di(R.pointerId);return}const me=R.clientX-$e.current.startX;Math.abs(me)>Bv&&($e.current.hasMoved=!0,ft(!0)),$e.current.hasMoved&&(R.preventDefault(),ne.scrollLeft=$e.current.scrollLeft-me,Dt(!0),vt(),gt())},Se=R=>{if(ve){if(R.pointerType==="touch"){R.type==="pointerup"?ir(R.clientX,R.clientY):we.current=null;return}R.pointerType==="mouse"&&di(R.pointerId)}},qe=R=>{!ve||R.pointerType!=="mouse"||di(R.pointerId)};return Bd(),s.useEffect(()=>{const R=requestAnimationFrame(()=>jt(!0));return()=>{cancelAnimationFrame(R),nn(),Pi(),Nt.current!==null&&(cancelAnimationFrame(Nt.current),Nt.current=null),Tt.current&&clearTimeout(Tt.current),Wt.current&&clearTimeout(Wt.current)}},[]),s.useEffect(()=>{if(!Le){xt(!0);return}gt();const R=We.current;if(!R)return;const ne=()=>gt();return R.addEventListener("pointermove",ne),R.addEventListener("pointerdown",ne),()=>{R.removeEventListener("pointermove",ne),R.removeEventListener("pointerdown",ne),Wt.current&&clearTimeout(Wt.current)}},[Le,gt]),s.useEffect(()=>{const R=ne=>{ne.key==="Escape"&&ke()};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[ke]),s.useLayoutEffect(()=>{Ht()},[_,t.length,st]),s.useLayoutEffect(()=>{o||$n(j.current,"auto")},[_,o]),s.useLayoutEffect(()=>{$n(0,"auto")},[t.length,st]),s.useEffect(()=>{const R=Be.current;if(!R||o||!te)return;const ne=me=>{if(me.preventDefault(),Math.abs(me.deltaY)<=Math.abs(me.deltaX))return;const Me=me.deltaMode===1?Dv:me.deltaMode===2?R.clientHeight:1,je=me.deltaY*Me*Hv;if(je!==0){if(nn(),nt.current||(nt.current=!0,De.current=R.scrollLeft,Ft.current=null,It(!1)),De.current+=je,!st){const et=R.scrollWidth-R.clientWidth;De.current=Math.max(0,Math.min(et,De.current))}gt(),tt.current===null&&(tt.current=requestAnimationFrame(li))}};return R.addEventListener("wheel",ne,{passive:!1}),()=>{R.removeEventListener("wheel",ne),un()}},[o,te,st]),s.useEffect(()=>{const R=Be.current;if(!R)return;const ne=()=>{Dt($e.current.isActive);const Me=R.scrollLeft,je=Me-Te.current;Te.current=Me;const et=Ze.current>0?Ze.current*.5:1/0;if(je!==0&&Math.abs(je)<et){const bt=je>0?"forward":"backward";bt!==Ve.current&&(Ve.current=bt,Ae(bt))}$e.current.isActive&&$e.current.hasMoved||vt()};R.addEventListener("scroll",ne,{passive:!0});const me=new ResizeObserver(()=>{Ht(),Dt($e.current.isActive),Ae(Ve.current),vt()});return me.observe(R),()=>{nn(),R.removeEventListener("scroll",ne),me.disconnect()}},[t.length,st]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{mt||ke()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:wt?1:0,transition:`opacity ${Lo}ms ease`,pointerEvents:wt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Vt}}),a.jsxs("div",{ref:We,className:`${e}-lightbox-dismiss-area`,style:qt,...Xt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:kt,onClick:R=>R.stopPropagation(),children:a.jsx("div",{ref:Be,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":ve&&t.length>0?"true":"false","data-mouse-dragging":zt?"true":"false",onPointerDown:da,onPointerMove:ua,onPointerUp:Se,onPointerCancel:Se,onLostPointerCapture:qe,children:a.jsx("div",{ref:Ue,className:`${e}-lightbox-strip-track`,style:{gap:_},children:Bt.map((R,ne)=>{const me=R.image.objectFit??"contain",Me=ne%t.length,je=Math.floor(ne/t.length),et=hr(_),bt=`calc(-0.5 * (${et} + ${_}))`;return a.jsxs("div",{ref:Rt=>_e.current[ne]=Rt,className:`${e}-strip-item`,style:{height:P==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:R.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:me}}),o&&Me<t.length-1&&je===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:bt,width:et,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${je}-${R.image.url}-${Me}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:Mt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:V,flexShrink:0,pointerEvents:"none"},children:o&&a.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:ae,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${Z?` ${e}-lightbox-content-area-stacked`:""}`,children:(ye||w)&&a.jsx("div",{className:`${e}-header ${Z?`${e}-header-two-row`:`${e}-header-single-row`}`,children:Z?ht():ye||w?yt():null})})})]}),t.length>1&&C==="on"&&(()=>{const R=hr(L),ne=`calc(-0.5 * (${L} + ${R}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:L},children:a.jsx("div",{ref:ge,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:me=>me.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:ie,"--thumbnail-active-color":B},children:[t.map((me,Me)=>{const je=hr(ie),et=`calc(-0.5 * (${je} + ${ie}))`;return a.jsxs("div",{ref:bt=>{xe.current[Me]=bt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":M===Me?"true":"false",onClick:()=>te&&x==="click"&&$n(Me),onMouseEnter:()=>Ie&&x==="hover"&&$n(Me),"aria-label":me.image.name?`View ${me.image.name}`:`View image ${Me+1}`,"aria-current":M===Me?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${pe?` ${e}-thumb-image-cover`:""}`,src:me.image.url,alt:"",draggable:!1,style:{...oe,maxWidth:X,maxHeight:X,width:y.display==="cover"?"auto":"100%",height:"auto",objectFit:y.display==="cover"?"cover":"contain"}})}),o&&Me<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:et,width:je,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${me.image.url}-${Me}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:ne,height:R,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function ex(e){return`
14226
14226
  .${e}-wrapper {
14227
14227
  position: relative;
14228
14228
  width: 100%;
@@ -14453,7 +14453,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14453
14453
  background-color: transparent;
14454
14454
  padding: 0;
14455
14455
  opacity: 1;
14456
- transition: opacity ${Io}ms ease;
14456
+ transition: opacity ${Lo}ms ease;
14457
14457
  }
14458
14458
 
14459
14459
  .${e}-close-icon[data-overlay-content-hidden="true"] {
@@ -14566,7 +14566,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14566
14566
  display: flex;
14567
14567
  flex-direction: column;
14568
14568
  opacity: 1;
14569
- transition: opacity ${Io}ms ease;
14569
+ transition: opacity ${Lo}ms ease;
14570
14570
  }
14571
14571
 
14572
14572
  .${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
@@ -14607,7 +14607,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14607
14607
  pointer-events: auto;
14608
14608
  z-index: 10;
14609
14609
  }
14610
- `}const Jv=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=H.useScopedStyles(),{cover:d,coverFit:c}=e,u=s.useRef(null),[p,x]=s.useState(!1),b=t??[],g=p&&b.length>0,h=()=>{b.length!==0&&x(!0)};return s.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Zv(l)}}),d&&a.jsx("div",{className:`${l}-cover ${Hn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...Hn(c)?{"--image-aspect-ratio":ra(c)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${Hn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),g&&typeof document<"u"&&(()=>{const f=(r?document.getElementById(r):null)??document.body;return Bn.createPortal(a.jsx(Kv,{prefix:l,images:b,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),f)})()]})},Qv=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14610
+ `}const tx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=W.useScopedStyles(),{cover:d,coverFit:c}=e,u=s.useRef(null),[p,v]=s.useState(!1),w=t??[],m=p&&w.length>0,h=()=>{w.length!==0&&v(!0)};return s.useEffect(()=>{!n||i||o||v(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ex(l)}}),d&&a.jsx("div",{className:`${l}-cover ${Dn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...Dn(c)?{"--image-aspect-ratio":aa(c)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${Dn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const f=(r?document.getElementById(r):null)??document.body;return zn.createPortal(a.jsx(Qv,{prefix:l,images:w,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>v(!1)}),f)})()]})},nx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14611
14611
  import { createPortal } from 'react-dom';
14612
14612
  import { CommonComponentProps } from '../props';
14613
14613
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15153,7 +15153,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15153
15153
  </>
15154
15154
  );
15155
15155
  };
15156
- `,ex="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>'),gi={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 tx(e){const t={};return t[jt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[jt(e,"fontSettings")]={...gi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[jt(e,"fontSize")]={...gi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[jt(e,"lineHeight")]={...gi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[jt(e,"letterSpacing")]={...gi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[jt(e,"wordSpacing")]={...gi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[jt(e,"textAlign")]={...gi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[jt(e,"textAppearance")]={...gi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const nx=to.reduce((e,t)=>({...e,...tx(t)}),{}),ix=to.reduce((e,t)=>({...e,[jt(t,"fontFamily")]:"Goudy Bookletter 1911",[jt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[jt(t,"letterSpacing")]:0,[jt(t,"wordSpacing")]:0,[jt(t,"textAlign")]:"left",[jt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ka(e){return to.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[jt(n,"fontSize")]=i),o!==void 0&&(t[jt(n,"lineHeight")]=o),t},{})}const ox=qv(),rx={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"}},...nx,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:ex,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...ix},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,...ka({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,...ka({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,...ka({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:[ox]}],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"}]}},ax={element:Jv,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:rx,sourceCode:Qv,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...to.map(e=>({path:`${jt(e,"fontFamily")}`}))]},fontRelations:{...to.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${jt(t,"fontFamily")}`}),{})}},sx=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:x,coverFit:b,backgroundColor:g,imageGap:h,maxWidth:f,maxHeight:v,textTransition:C,title1Width:y,title2Width:T,title3Width:W,title1MarginLeft:_=0,title2MarginLeft:X=0,title3MarginLeft:D=0,titleRowMarginBottom:w=0,titleHeaderLayout:R="single-row",countCloseGap:m=0,closeIcon:E,closeIconMaxWidth:I,closeIconColor:J,closeIconHoverColor:A,contentMarginTop:Q=0,iconMarginRight:q=0}=n,Y=s.useCallback(ve=>H.scalingValue(ve,i??!1),[i]),oe=Y(h??0),L=`${f}%`,N=`${v}%`,V=Y(m),de=Y(Q),re=Y(q),M=xi("title1",vi(n,"title1"),i),S=xi("title2",vi(n,"title2"),i),$=xi("title3",vi(n,"title3"),i),F=xi("count",vi(n,"count"),i),O=R==="mobile",te=!i||!!r,xe=!o&&(!i||!!r),ne=s.useMemo(()=>Cr(t,x),[t,x]),[ae,Z]=s.useState(l),B=ne[ae],G=B==null?void 0:B.entry,[$e,he]=s.useState(!1),[Re,ge]=s.useState(null),[ye,Se]=s.useState(!1),[ee,ce]=s.useState(null),[ue,Te]=s.useState(!1),[ke,Ce]=s.useState(0),[U,fe]=s.useState(),[me,K]=s.useState(),[z,be]=s.useState(null),se=s.useRef(null),j=s.useRef(0),_e=s.useRef(0),We=s.useRef(0),lt=s.useRef(!1),Je=s.useRef(null),ct=s.useRef(null),it=s.useRef(null),Ve=s.useRef(null),Ie=s.useRef(null),Ne=s.useRef(null),Oe=s.useRef(null),Ue=s.useCallback(()=>{const ve=ct.current;if(!ve)return;const je=ve.closest(`.${e}-lightbox-content-area`);if(!je)return ve.getBoundingClientRect().width;const P=Array.from(je.children).reduce((ie,le)=>!(le instanceof HTMLElement)||le.contains(ve)?ie:ie+le.getBoundingClientRect().width,0);return je.getBoundingClientRect().width-P},[e]),pe=s.useCallback(()=>{se.current&&(clearTimeout(se.current),se.current=null)},[]),we=s.useCallback(ve=>{ve===j.current&&(ce(null),Te(!1))},[]),Ae=s.useCallback(()=>{o||lt.current||(lt.current=!0,u==null||u(),he(!1),Je.current=setTimeout(()=>{p()},300))},[o,u,p]),Xe=s.useCallback(ve=>!!(ve.closest("[data-controls]")||ve.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ze,backdropStyle:Ge,mediaAreaStyle:st,overlayContentStyle:Qe,swipeHandlers:Fe,dismissAreaStyle:qe}=Nd({enabled:xe,onClose:Ae,animMs:300,isBlockedTarget:Xe}),He=s.useCallback(ve=>{d&&vd(ve+1,c,!0)},[d,c]),nt=s.useCallback(ve=>{if(ve)return ve.getBoundingClientRect().height},[]),at=s.useCallback(ve=>{if(ne.length===0)return;const je=(ve%ne.length+ne.length)%ne.length;if(je===ae)return;const P=ne[ae],ie=ne[je];j.current+=1;const le=j.current,Pe=C==="fade"&&Tl(P==null?void 0:P.entry)!==Tl(ie==null?void 0:ie.entry),Be=nt(it.current),Ke=Pe?(()=>{const Rt=Ue();Bn.flushSync(()=>{be(ie.entry)}),it.current&&Rt&&(it.current.style.width=`${Rt}px`);const tn=nt(it.current);return it.current&&(it.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:Rt}})():void 0,bt=Math.max(Be??0,(Ke==null?void 0:Ke.measuredIncomingTitlesHeight)??0)||void 0;Ce(le),ce(ae),Te(!0),Z(je),He(je),We.current=je,Pe?(pe(),bt&&fe(bt),Ke!=null&&Ke.incomingTitlesMeasureWidth&&K(Ke.incomingTitlesMeasureWidth),ge((P==null?void 0:P.entryIndex)??null),Se(!0),_e.current=ie.entryIndex,se.current=setTimeout(()=>{ge(null),Se(!1),fe(void 0),K(void 0),be(null),se.current=null},400)):(pe(),ge(null),Se(!1),fe(void 0),K(void 0),be(null),_e.current=ie.entryIndex)},[ae,pe,Ue,nt,ne,He,C]),dt=s.useCallback(()=>{Oe.current=null},[]),Tt=s.useCallback(ve=>{!te||ne.length<=1||ve.pointerType==="mouse"&&ve.button!==0||ve.target.closest("[data-controls]")||(Oe.current={startX:ve.clientX,startY:ve.clientY,pointerId:ve.pointerId})},[te,ne.length]),qt=s.useCallback(ve=>{var Rt;if(!te||ne.length<=1||ve.pointerType==="mouse"&&ve.button!==0)return;if(Ze){dt();return}const je=Oe.current;if(!je||je.pointerId!==ve.pointerId||(dt(),ve.target.closest("[data-controls]")))return;const ie=ve.clientX-je.startX,le=ve.clientY-je.startY,Pe=Math.abs(ie),Be=Math.abs(le);if(Pe>=xf&&Pe>Be){at(ie>0?ae-1:ae+1);return}if(Pe>wl||Be>wl)return;const Ke=(Rt=Ve.current)==null?void 0:Rt.getBoundingClientRect(),bt=Ke?Ke.left+Ke.width/2:window.innerWidth/2;at(ve.clientX<bt?ae-1:ae+1)},[ae,te,at,Ze,dt,ne.length]),Zt=s.useCallback(ve=>{const je=Oe.current;(je==null?void 0:je.pointerId)===ve.pointerId&&dt()},[dt]);Wd(),s.useEffect(()=>{Ne.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const ve=requestAnimationFrame(()=>{he(!0),requestAnimationFrame(()=>{Ie.current?Ie.current.focus():Ve.current&&Ve.current.focus()})});return()=>{cancelAnimationFrame(ve),Je.current&&clearTimeout(Je.current),se.current&&clearTimeout(se.current);const je=Ne.current;je&&document.contains(je)&&je.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var ve;C!=="fade"&&(_e.current=((ve=ne[ae])==null?void 0:ve.entryIndex)??0,pe(),ge(null),Se(!1),fe(void 0),K(void 0))},[ae,pe,ne,C]),s.useEffect(()=>{const ve=je=>{if(je.key==="Escape"){Ae();return}if(je.key==="ArrowLeft"&&ne.length>1){at(ae-1);return}if(je.key==="ArrowRight"&&ne.length>1){at(ae+1);return}if(je.key==="Tab"&&Ve.current){const P=Ve.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),ie=Array.from(P).filter(Ke=>!Ke.closest('[aria-hidden="true"]'));if(ie.length===0)return;const le=ie[0],Pe=ie[ie.length-1],Be=document.activeElement;je.shiftKey?(Be===le||!Ve.current.contains(Be))&&(je.preventDefault(),Pe.focus()):(Be===Pe||!Ve.current.contains(Be))&&(je.preventDefault(),le.focus())}};return window.addEventListener("keydown",ve),()=>window.removeEventListener("keydown",ve)},[at,Ae,ae,ne.length]),s.useLayoutEffect(()=>{pe(),j.current=0,Ce(0),ce(null),Te(!1),ge(null),Se(!1),fe(void 0),K(void 0),be(null),Z(ve=>{const je=Math.max(0,ne.length-1);return Math.min(ve,je)})},[pe,t.length,x,ne.length]),s.useLayoutEffect(()=>{var P;const ve=Math.max(0,ne.length-1),je=Math.min(Math.max(0,l),ve);We.current=je,_e.current=((P=ne[je])==null?void 0:P.entryIndex)??0,Z(je)},[l]);const xt=Re!==null?t[Re]:null,wt=ee!==null?ne[ee]:null,Bt=(G==null?void 0:G.title1)||(G==null?void 0:G.title2)||(G==null?void 0:G.title3)||(xt==null?void 0:xt.title1)||(xt==null?void 0:xt.title2)||(xt==null?void 0:xt.title3),At=Rf(x,ne,t),vt=E!==null,Ft=Bt||At||vt,Nt=At&&vt?{gap:V}:void 0,Ut=`${e}-titles-stack${O?` ${e}-titles-stack-stacked`:""}`,Jt=`${e}-titles-layer-out${O?` ${e}-titles-layer-out-stacked`:""}`,Ct=`${e}-titles-layer-out`,Wt=(_??0)>0||o,rn=Y(w),gt=s.useMemo(()=>({title1Width:y??ji.title1Width,title2Width:T??ji.title2Width,title3Width:W??ji.title3Width}),[y,T,W]),Ee=s.useMemo(()=>({title2MarginLeft:X,title3MarginLeft:D}),[X,D]),ze=s.useMemo(()=>G?Un(e,G,M,S,$):[],[e,G,M,S,$]),ot=s.useMemo(()=>ze.map(ve=>gt[ve.widthKey]),[ze,gt]),ht=s.useMemo(()=>Ui(ze.length,ot),[ze.length,ot]),ft=s.useMemo(()=>Fo(ze.length,ot),[ze.length,ot]),Lt=s.useMemo(()=>ze.filter(ve=>ve.prefix==="title1"),[ze]),mt=s.useMemo(()=>ze.filter(ve=>ve.prefix==="title2"||ve.prefix==="title3"),[ze]),zt=s.useMemo(()=>Kn(Lt,gt),[Lt,gt]),kt=s.useMemo(()=>Kn(mt,gt),[mt,gt]),Mt=s.useCallback((ve,je)=>{const P=ze.findIndex(le=>le.prefix===ve.prefix);if(!O||je==="single-row")return{effectiveWidth:ft[P]??0,resolvedWidth:ht[P]??0,maxWidth:cn(P,ht)};if(je==="two-row-top"){const le=Lt.findIndex(Pe=>Pe.prefix===ve.prefix);return{effectiveWidth:zt.effective[le]??0,resolvedWidth:zt.resolved[le]??0,maxWidth:cn(le,zt.resolved)}}const ie=mt.findIndex(le=>le.prefix===ve.prefix);return{effectiveWidth:kt.effective[ie]??0,resolvedWidth:kt.resolved[ie]??0,maxWidth:cn(ie,kt.resolved)}},[ze,mt,kt,ft,ht,Lt,zt,O]),Vt=s.useCallback(ve=>Sd(ze,ht,Ee,ve)+(O?0:_??0),[ze,ht,Ee,O,_]),Gt=s.useCallback(()=>O?0:_??0,[O,_]),Ht=s.useCallback(ve=>mt.slice(0,ve).reduce((je,P,ie)=>je+(P.marginLeftKey?Ee[P.marginLeftKey]??0:0)+(kt.resolved[ie]??0),0),[mt,kt.resolved,Ee]),Dt=s.useCallback(ve=>{const je=mt[ve];return Ht(ve)+(je.marginLeftKey?Ee[je.marginLeftKey]??0:0)+(kt.resolved[ve]??0)},[mt,kt.resolved,Ht,Ee]),_t=s.useCallback((ve,je,P)=>{if(!O||P==="single-row"){const Ke=ve.findIndex(Qt=>Qt.prefix===je.prefix),bt=ve.map(Qt=>gt[Qt.widthKey]),Rt=Ui(ve.length,bt);return{effectiveWidth:Fo(ve.length,bt)[Ke]??0,resolvedWidth:Rt[Ke]??0,maxWidth:cn(Ke,Rt)}}if(P==="two-row-top"){const Ke=ve.filter(Qt=>Qt.prefix==="title1"),bt=Ke.findIndex(Qt=>Qt.prefix===je.prefix),{resolved:Rt,effective:tn}=Kn(Ke,gt);return{effectiveWidth:tn[bt]??0,resolvedWidth:Rt[bt]??0,maxWidth:cn(bt,Rt)}}const ie=ve.filter(Ke=>Ke.prefix==="title2"||Ke.prefix==="title3"),le=ie.findIndex(Ke=>Ke.prefix===je.prefix),{resolved:Pe,effective:Be}=Kn(ie,gt);return{effectiveWidth:Be[le]??0,resolvedWidth:Pe[le]??0,maxWidth:cn(le,Pe)}},[gt,O]),St=(ve,je,P)=>{const ie=ve.marginLeftKey?Ee[ve.marginLeftKey]??0:0,{effectiveWidth:le,resolvedWidth:Pe,maxWidth:Be}=P??Mt(ve,je),Ke=Math.max(ie,Yn),bt=o&&je==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":ve.prefix,style:{width:Y(le),...ie>0?{marginLeft:Y(ie)}:{}},children:[a.jsx("p",{className:ve.className,style:ve.style,children:ve.text}),bt&&ve.marginLeftKey?a.jsx("div",{"data-controls":ve.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:Y(-ie),width:Y(Ke),height:"100%",pointerEvents:"auto"}}):null,bt?a.jsx("div",{"data-controls":ve.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:Y(-fn/2),width:Y(fn),height:"100%",pointerEvents:"auto"}}):null]},ve.className)},k=(ve="two-row")=>{const je=ze.findIndex(le=>le.prefix==="title1"),P=je>=0?ht[je]:gt.title1Width,ie=ve==="two-row"&&o;return a.jsx("div",{...ie?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(P)}:{},style:{width:Y(_??0),flexShrink:0,alignSelf:"stretch",...ie?{pointerEvents:"auto"}:{}}})},Le=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:M,"aria-hidden":"true",children:" "}),Me=()=>a.jsx("span",{className:`${e}-entry-counter`,style:F,"aria-live":"polite","aria-atomic":"true",children:If(ne,ae,x,t)}),De=()=>At?o&&vt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Me(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Sa(V)} + ${V}))`,width:Sa(V),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Me():null,rt=()=>!At&&!vt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Nt,children:[De(),vt?yt():null]}),Et=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||Bt?Le():null,Wt?k("single-row"):null,It(G),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),rt(),Cn()]}),et=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||Bt?Le():null,Wt?k("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:ye&&U?{minHeight:U}:void 0,children:[a.jsx("div",{ref:it,className:Ut,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:li(z||G)}),a.jsxs("div",{ref:ct,className:Ut,style:{position:ye?"absolute":"relative",inset:ye?0:void 0,width:"100%",...ye&&me?{width:me,maxWidth:"100%"}:void 0},children:[xt&&ye?a.jsx("div",{className:`${Jt} ${e}-titles-fade-out`,children:li(xt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${ye?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:li(G)})]})]}),rt(),Cn()]}),yt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:H.scalingValue(I??0,i),height:H.scalingValue(I??0,i),marginRight:re,"--close-icon-hover-color":A},children:[a.jsx("button",{ref:Ie,type:"button",className:`${e}-close-icon-inner`,onClick:Ae,"aria-label":"Close",children:a.jsx(sn,{url:E??"",fill:J,hoverFill:i&&!r?J:A,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),Ot=(ve,je)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[At||Bt?Le():null,Wt?k("two-row"):null,je!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:je},children:ve}):a.jsxs(a.Fragment,{children:[ve,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),rt()]}),It=ve=>{if(!ve)return null;const je=Un(e,ve,M,S,$);return a.jsx(a.Fragment,{children:je.map(P=>St(P,"single-row",_t(je,P,"single-row")))})},nn=ve=>{if(!ve)return null;const je=Un(e,ve,M,S,$),P=je.find(ie=>ie.prefix==="title1");return P?St(P,"two-row-top",_t(je,P,"two-row-top")):null},un=(ve,je=!1)=>{const P=ve?Un(e,ve,M,S,$):[],ie=P.filter(Be=>Be.prefix==="title2"||Be.prefix==="title3"),le=o&&je;return ie.length>0||le||(w??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ie.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[ie.map(Be=>St(Be,"two-row-bottom",_t(P,Be,"two-row-bottom"))),je&&o?a.jsxs(a.Fragment,{children:[sa(),la()]}):null]}):null,(w??0)>0||le?a.jsx("div",{"data-controls":le?"titleRowMarginBottom":void 0,"data-controls-axis":le?"y":void 0,"data-controls-reverse":le?"":void 0,className:le?`${e}-control`:void 0,style:{height:rn,width:"100%",flexShrink:0,pointerEvents:le?"auto":"none"}}):null]}):null},si=(ve,je=!1)=>a.jsxs(a.Fragment,{children:[Ot(nn(ve)),un(ve,je)]}),li=ve=>O?a.jsx("div",{className:`${e}-titles-row-two-row`,children:si(ve)}):ve?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:It(ve)}):null,Jo=()=>{const ve=O?-1:ze.findIndex(ie=>ie.prefix==="title1"),je=!O&&(o||(_??0)>0)?(()=>{const ie=_??0,le=ve>=0?ht[ve]:gt.title1Width,Pe=Math.max(ie,Yn);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(le),style:{position:"absolute",top:0,left:0,width:Y(Pe),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,P=ze.flatMap((ie,le)=>{if(!ie.marginLeftKey)return[];const Pe=Ee[ie.marginLeftKey]??0,Be=wd(ze,ht,Ee,le)+Gt(),Ke=Math.max(Pe,Yn);return a.jsx("div",{"data-controls":ie.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ht[le]),style:{position:"absolute",top:0,left:Y(Be),width:Y(Ke),height:"100%",pointerEvents:"auto"}},ie.marginLeftKey)});return je?[je,...P]:P},Qo=()=>ze.map((ve,je)=>{const P=cn(je,ht),le=Vt(je)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":ve.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:Y(le),width:Y(fn),height:"100%",pointerEvents:"auto"}})},`${ve.widthKey}-junction`)}),sa=()=>mt.flatMap((ve,je)=>{if(!ve.marginLeftKey)return[];const P=Ee[ve.marginLeftKey]??0,ie=Ht(je),le=Math.max(P,Yn),{resolvedWidth:Pe}=Mt(ve,"two-row-bottom");return a.jsx("div",{"data-controls":ve.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:Y(ie),width:Y(le),height:"100%",pointerEvents:"auto"}},ve.marginLeftKey)}),la=()=>mt.map((ve,je)=>{const{maxWidth:P}=Mt(ve,"two-row-bottom"),le=Dt(je)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":ve.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:Y(le),width:Y(fn),height:"100%",pointerEvents:"auto"}})},`${ve.widthKey}-junction`)}),Cn=()=>!o||O?null:a.jsxs(a.Fragment,{children:[Jo(),Qo()]}),Ri=ve=>{const je=!ve.objectFit&&Hn(b);return{className:`${e}-slide-image-cell${je?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:L,maxHeight:N,...je?{"--image-aspect-ratio":ra(b)}:{}}}},er=ve=>ve.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":ve.objectFit}}:Hn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ci=ve=>{if(ve.length===0)return null;const je=ve.length>1,P=Sa(oe),ie=`calc(-0.5 * (${P} + ${oe}))`;if(ve.length===1){const le=ve[0];return a.jsx("div",{...Ri(le),children:a.jsx("img",{...er(le),src:le.url,alt:le.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:je?{gap:oe}:void 0,children:ve.map((le,Pe)=>a.jsxs("div",{...Ri(le),children:[a.jsx("img",{...er(le),src:le.url,alt:le.name??"",draggable:!1}),o&&je&&Pe<ve.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ie,width:P,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${le.url}-${Pe}`))})},tr=!!(G!=null&&G.title2||G!=null&&G.title3||xt!=null&&xt.title2||xt!=null&&xt.title3||(w??0)>0||o),ca=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:it,className:Ut,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:si(z||G)}),a.jsxs("div",{ref:ct,className:`${e}-titles-row-two-row`,style:{...ye&&U?{minHeight:U}:void 0,...ye&&me?{width:me,maxWidth:"100%"}:void 0},children:[Ot(a.jsxs("div",{className:Ut,style:{position:ye?"absolute":"relative",inset:ye?0:void 0,width:"100%"},children:[xt&&ye?a.jsx("div",{className:`${Ct} ${e}-titles-fade-out`,children:nn(xt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${ye?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:nn(G)})]}),ye&&U?U:void 0),tr?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[xt&&ye?a.jsx("div",{className:`${Jt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:un(xt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${ye?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${O?` ${e}-titles-layer-in-stacked`:""}`,children:un(G,!0)})]}):null]})]}),da=()=>{const ve=tr;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ve?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:ve?void 0:{flex:"0 0 auto",height:"auto"},children:si(G,!0)}),Cn()]})};return a.jsxs("div",{ref:Ve,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ze||Ae()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:vt?void 0:-1,style:{opacity:$e?1:0,transition:"opacity 300ms ease",pointerEvents:$e?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:g,...Ge}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...Fe,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:st,onClick:ve=>ve.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":te&&ne.length>1?"true":"false",onPointerDown:te?Tt:void 0,onPointerUp:te?qt:void 0,onPointerCancel:te?Zt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[wt&&ue?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:ve=>{ve.target===ve.currentTarget&&we(ke)},children:a.jsx("div",{className:`${e}-slide-area`,children:ci(wt.images)})},`slide-out-${ke}`):null,a.jsx("div",{className:`${e}-slide-layer-in${ue?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:B?ci(B.images):null})},`slide-in-${ke}-${ae}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Qe,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:de,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...O?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${O?` ${e}-lightbox-content-area-stacked`:""}`,children:Ft&&a.jsx("div",{className:`${e}-text-bar-cell${O?` ${e}-text-bar-cell-stacked`:""}`,style:O?void 0:{flex:1,minWidth:0,width:"100%"},children:O?C==="fade"?ca():da():C==="fade"?et():Et()})})})]})]})]})};function lx(e){return`
15156
+ `,ix="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>'),hi={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 ox(e){const t={};return t[Gt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Gt(e,"fontSettings")]={...hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Gt(e,"fontSize")]={...hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Gt(e,"lineHeight")]={...hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Gt(e,"letterSpacing")]={...hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Gt(e,"wordSpacing")]={...hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Gt(e,"textAlign")]={...hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Gt(e,"textAppearance")]={...hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const rx=io.reduce((e,t)=>({...e,...ox(t)}),{}),ax=io.reduce((e,t)=>({...e,[Gt(t,"fontFamily")]:"Goudy Bookletter 1911",[Gt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Gt(t,"letterSpacing")]:0,[Gt(t,"wordSpacing")]:0,[Gt(t,"textAlign")]:"left",[Gt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Aa(e){return io.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Gt(n,"fontSize")]=i),o!==void 0&&(t[Gt(n,"lineHeight")]=o),t},{})}const sx=Kv(),lx={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"}},...rx,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:ix,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...ax},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,...Aa({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,...Aa({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,...Aa({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:[sx]}],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"}]}},cx={element:tx,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:lx,sourceCode:nx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...io.map(e=>({path:`${Gt(e,"fontFamily")}`}))]},fontRelations:{...io.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Gt(t,"fontFamily")}`}),{})}},dx=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:v,coverFit:w,backgroundColor:m,imageGap:h,maxWidth:f,maxHeight:x,textTransition:C,title1Width:y,title2Width:S,title3Width:B,title1MarginLeft:N=0,title2MarginLeft:q=0,title3MarginLeft:D=0,titleRowMarginBottom:T=0,titleHeaderLayout:H="single-row",countCloseGap:$=0,closeIcon:I,closeIconMaxWidth:P,closeIconColor:E,closeIconHoverColor:g,contentMarginTop:z=0,iconMarginRight:F=0}=n,X=s.useCallback(Se=>W.scalingValue(Se,i??!1),[i]),ie=X(h??0),L=`${f}%`,_=`${x}%`,V=X($),ae=X(z),re=X(F),M=bi("title1",xi(n,"title1"),i),se=bi("title2",xi(n,"title2"),i),j=bi("title3",xi(n,"title3"),i),b=bi("count",xi(n,"count"),i),k=H==="mobile",G=!i||!!r,he=!o&&(!i||!!r),J=s.useMemo(()=>Ir(t,v),[t,v]),[ee,O]=s.useState(l),Z=J[ee],te=Z==null?void 0:Z.entry,[Le,ve]=s.useState(!1),[Ie,pe]=s.useState(null),[oe,ye]=s.useState(!1),[U,ce]=s.useState(null),[le,Ce]=s.useState(!1),[Fe,Ee]=s.useState(0),[Y,be]=s.useState(),[de,K]=s.useState(),[ue,He]=s.useState(null),fe=s.useRef(null),Q=s.useRef(0),Je=s.useRef(0),Ne=s.useRef(0),ct=s.useRef(!1),Ke=s.useRef(null),ut=s.useRef(null),lt=s.useRef(null),Ye=s.useRef(null),Re=s.useRef(null),We=s.useRef(null),Be=s.useRef(null),Ue=s.useCallback(()=>{const Se=ut.current;if(!Se)return;const qe=Se.closest(`.${e}-lightbox-content-area`);if(!qe)return Se.getBoundingClientRect().width;const R=Array.from(qe.children).reduce((ne,me)=>!(me instanceof HTMLElement)||me.contains(Se)?ne:ne+me.getBoundingClientRect().width,0);return qe.getBoundingClientRect().width-R},[e]),ge=s.useCallback(()=>{fe.current&&(clearTimeout(fe.current),fe.current=null)},[]),xe=s.useCallback(Se=>{Se===Q.current&&(ce(null),Ce(!1))},[]),_e=s.useCallback(()=>{o||ct.current||(ct.current=!0,u==null||u(),ve(!1),Ke.current=setTimeout(()=>{p()},300))},[o,u,p]),Ze=s.useCallback(Se=>!!(Se.closest("[data-controls]")||Se.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:we,backdropStyle:$e,mediaAreaStyle:Xe,overlayContentStyle:ze,swipeHandlers:Te,dismissAreaStyle:Ve}=Od({enabled:he,onClose:_e,animMs:300,isBlockedTarget:Ze}),De=s.useCallback(Se=>{d&&Sd(Se+1,c,!0)},[d,c]),tt=s.useCallback(Se=>{if(Se)return Se.getBoundingClientRect().height},[]),nt=s.useCallback(Se=>{if(J.length===0)return;const qe=(Se%J.length+J.length)%J.length;if(qe===ee)return;const R=J[ee],ne=J[qe];Q.current+=1;const me=Q.current,Me=C==="fade"&&Pl(R==null?void 0:R.entry)!==Pl(ne==null?void 0:ne.entry),je=tt(lt.current),et=Me?(()=>{const Rt=Ue();zn.flushSync(()=>{He(ne.entry)}),lt.current&&Rt&&(lt.current.style.width=`${Rt}px`);const tn=tt(lt.current);return lt.current&&(lt.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:Rt}})():void 0,bt=Math.max(je??0,(et==null?void 0:et.measuredIncomingTitlesHeight)??0)||void 0;Ee(me),ce(ee),Ce(!0),O(qe),De(qe),Ne.current=qe,Me?(ge(),bt&&be(bt),et!=null&&et.incomingTitlesMeasureWidth&&K(et.incomingTitlesMeasureWidth),pe((R==null?void 0:R.entryIndex)??null),ye(!0),Je.current=ne.entryIndex,fe.current=setTimeout(()=>{pe(null),ye(!1),be(void 0),K(void 0),He(null),fe.current=null},400)):(ge(),pe(null),ye(!1),be(void 0),K(void 0),He(null),Je.current=ne.entryIndex)},[ee,ge,Ue,tt,J,De,C]),st=s.useCallback(()=>{Be.current=null},[]),St=s.useCallback(Se=>{!G||J.length<=1||Se.pointerType==="mouse"&&Se.button!==0||Se.target.closest("[data-controls]")||(Be.current={startX:Se.clientX,startY:Se.clientY,pointerId:Se.pointerId})},[G,J.length]),Bt=s.useCallback(Se=>{var Rt;if(!G||J.length<=1||Se.pointerType==="mouse"&&Se.button!==0)return;if(we){st();return}const qe=Be.current;if(!qe||qe.pointerId!==Se.pointerId||(st(),Se.target.closest("[data-controls]")))return;const ne=Se.clientX-qe.startX,me=Se.clientY-qe.startY,Me=Math.abs(ne),je=Math.abs(me);if(Me>=Sf&&Me>je){nt(ne>0?ee-1:ee+1);return}if(Me>Tl||je>Tl)return;const et=(Rt=Ye.current)==null?void 0:Rt.getBoundingClientRect(),bt=et?et.left+et.width/2:window.innerWidth/2;nt(Se.clientX<bt?ee-1:ee+1)},[ee,G,nt,we,st,J.length]),zt=s.useCallback(Se=>{const qe=Be.current;(qe==null?void 0:qe.pointerId)===Se.pointerId&&st()},[st]);Bd(),s.useEffect(()=>{We.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Se=requestAnimationFrame(()=>{ve(!0),requestAnimationFrame(()=>{Re.current?Re.current.focus():Ye.current&&Ye.current.focus()})});return()=>{cancelAnimationFrame(Se),Ke.current&&clearTimeout(Ke.current),fe.current&&clearTimeout(fe.current);const qe=We.current;qe&&document.contains(qe)&&qe.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Se;C!=="fade"&&(Je.current=((Se=J[ee])==null?void 0:Se.entryIndex)??0,ge(),pe(null),ye(!1),be(void 0),K(void 0))},[ee,ge,J,C]),s.useEffect(()=>{const Se=qe=>{if(qe.key==="Escape"){_e();return}if(qe.key==="ArrowLeft"&&J.length>1){nt(ee-1);return}if(qe.key==="ArrowRight"&&J.length>1){nt(ee+1);return}if(qe.key==="Tab"&&Ye.current){const R=Ye.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),ne=Array.from(R).filter(et=>!et.closest('[aria-hidden="true"]'));if(ne.length===0)return;const me=ne[0],Me=ne[ne.length-1],je=document.activeElement;qe.shiftKey?(je===me||!Ye.current.contains(je))&&(qe.preventDefault(),Me.focus()):(je===Me||!Ye.current.contains(je))&&(qe.preventDefault(),me.focus())}};return window.addEventListener("keydown",Se),()=>window.removeEventListener("keydown",Se)},[nt,_e,ee,J.length]),s.useLayoutEffect(()=>{ge(),Q.current=0,Ee(0),ce(null),Ce(!1),pe(null),ye(!1),be(void 0),K(void 0),He(null),O(Se=>{const qe=Math.max(0,J.length-1);return Math.min(Se,qe)})},[ge,t.length,v,J.length]),s.useLayoutEffect(()=>{var R;const Se=Math.max(0,J.length-1),qe=Math.min(Math.max(0,l),Se);Ne.current=qe,Je.current=((R=J[qe])==null?void 0:R.entryIndex)??0,O(qe)},[l]);const ft=Ie!==null?t[Ie]:null,wt=U!==null?J[U]:null,jt=(te==null?void 0:te.title1)||(te==null?void 0:te.title2)||(te==null?void 0:te.title3)||(ft==null?void 0:ft.title1)||(ft==null?void 0:ft.title2)||(ft==null?void 0:ft.title3),At=Ef(v,J,t),xt=I!==null,Ft=jt||At||xt,Nt=At&&xt?{gap:V}:void 0,Kt=`${e}-titles-stack${k?` ${e}-titles-stack-stacked`:""}`,Jt=`${e}-titles-layer-out${k?` ${e}-titles-layer-out-stacked`:""}`,Tt=`${e}-titles-layer-out`,Wt=(N??0)>0||o,rn=X(T),gt=s.useMemo(()=>({title1Width:y??Gi.title1Width,title2Width:S??Gi.title2Width,title3Width:B??Gi.title3Width}),[y,S,B]),ke=s.useMemo(()=>({title2MarginLeft:q,title3MarginLeft:D}),[q,D]),Ge=s.useMemo(()=>te?Kn(e,te,M,se,j):[],[e,te,M,se,j]),rt=s.useMemo(()=>Ge.map(Se=>gt[Se.widthKey]),[Ge,gt]),ht=s.useMemo(()=>Zi(Ge.length,rt),[Ge.length,rt]),yt=s.useMemo(()=>No(Ge.length,rt),[Ge.length,rt]),Lt=s.useMemo(()=>Ge.filter(Se=>Se.prefix==="title1"),[Ge]),mt=s.useMemo(()=>Ge.filter(Se=>Se.prefix==="title2"||Se.prefix==="title3"),[Ge]),Vt=s.useMemo(()=>Zn(Lt,gt),[Lt,gt]),kt=s.useMemo(()=>Zn(mt,gt),[mt,gt]),Mt=s.useCallback((Se,qe)=>{const R=Ge.findIndex(me=>me.prefix===Se.prefix);if(!k||qe==="single-row")return{effectiveWidth:yt[R]??0,resolvedWidth:ht[R]??0,maxWidth:cn(R,ht)};if(qe==="two-row-top"){const me=Lt.findIndex(Me=>Me.prefix===Se.prefix);return{effectiveWidth:Vt.effective[me]??0,resolvedWidth:Vt.resolved[me]??0,maxWidth:cn(me,Vt.resolved)}}const ne=mt.findIndex(me=>me.prefix===Se.prefix);return{effectiveWidth:kt.effective[ne]??0,resolvedWidth:kt.resolved[ne]??0,maxWidth:cn(ne,kt.resolved)}},[Ge,mt,kt,yt,ht,Lt,Vt,k]),Xt=s.useCallback(Se=>Id(Ge,ht,ke,Se)+(k?0:N??0),[Ge,ht,ke,k,N]),qt=s.useCallback(()=>k?0:N??0,[k,N]),Ht=s.useCallback(Se=>mt.slice(0,Se).reduce((qe,R,ne)=>qe+(R.marginLeftKey?ke[R.marginLeftKey]??0:0)+(kt.resolved[ne]??0),0),[mt,kt.resolved,ke]),Dt=s.useCallback(Se=>{const qe=mt[Se];return Ht(Se)+(qe.marginLeftKey?ke[qe.marginLeftKey]??0:0)+(kt.resolved[Se]??0)},[mt,kt.resolved,Ht,ke]),_t=s.useCallback((Se,qe,R)=>{if(!k||R==="single-row"){const et=Se.findIndex(Qt=>Qt.prefix===qe.prefix),bt=Se.map(Qt=>gt[Qt.widthKey]),Rt=Zi(Se.length,bt);return{effectiveWidth:No(Se.length,bt)[et]??0,resolvedWidth:Rt[et]??0,maxWidth:cn(et,Rt)}}if(R==="two-row-top"){const et=Se.filter(Qt=>Qt.prefix==="title1"),bt=et.findIndex(Qt=>Qt.prefix===qe.prefix),{resolved:Rt,effective:tn}=Zn(et,gt);return{effectiveWidth:tn[bt]??0,resolvedWidth:Rt[bt]??0,maxWidth:cn(bt,Rt)}}const ne=Se.filter(et=>et.prefix==="title2"||et.prefix==="title3"),me=ne.findIndex(et=>et.prefix===qe.prefix),{resolved:Me,effective:je}=Zn(ne,gt);return{effectiveWidth:je[me]??0,resolvedWidth:Me[me]??0,maxWidth:cn(me,Me)}},[gt,k]),Ct=(Se,qe,R)=>{const ne=Se.marginLeftKey?ke[Se.marginLeftKey]??0:0,{effectiveWidth:me,resolvedWidth:Me,maxWidth:je}=R??Mt(Se,qe),et=Math.max(ne,Un),bt=o&&qe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Se.prefix,style:{width:X(me),...ne>0?{marginLeft:X(ne)}:{}},children:[a.jsx("p",{className:Se.className,style:Se.style,children:Se.text}),bt&&Se.marginLeftKey?a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me),style:{position:"absolute",top:0,left:X(-ne),width:X(et),height:"100%",pointerEvents:"auto"}}):null,bt?a.jsx("div",{"data-controls":Se.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:X(-fn/2),width:X(fn),height:"100%",pointerEvents:"auto"}}):null]},Se.className)},A=(Se="two-row")=>{const qe=Ge.findIndex(me=>me.prefix==="title1"),R=qe>=0?ht[qe]:gt.title1Width,ne=Se==="two-row"&&o;return a.jsx("div",{...ne?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(R)}:{},style:{width:X(N??0),flexShrink:0,alignSelf:"stretch",...ne?{pointerEvents:"auto"}:{}}})},Pe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:M,"aria-hidden":"true",children:" "}),Ae=()=>a.jsx("span",{className:`${e}-entry-counter`,style:b,"aria-live":"polite","aria-atomic":"true",children:Pf(J,ee,v,t)}),Oe=()=>At?o&&xt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Ae(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Ca(V)} + ${V}))`,width:Ca(V),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Ae():null,at=()=>!At&&!xt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Nt,children:[Oe(),xt?vt():null]}),Et=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||jt?Pe():null,Wt?A("single-row"):null,It(te),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),at(),$n()]}),it=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||jt?Pe():null,Wt?A("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:oe&&Y?{minHeight:Y}:void 0,children:[a.jsx("div",{ref:lt,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ci(ue||te)}),a.jsxs("div",{ref:ut,className:Kt,style:{position:oe?"absolute":"relative",inset:oe?0:void 0,width:"100%",...oe&&de?{width:de,maxWidth:"100%"}:void 0},children:[ft&&oe?a.jsx("div",{className:`${Jt} ${e}-titles-fade-out`,children:ci(ft)}):null,a.jsx("div",{className:`${e}-titles-layer-in${oe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ci(te)})]})]}),at(),$n()]}),vt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:W.scalingValue(P??0,i),height:W.scalingValue(P??0,i),marginRight:re,"--close-icon-hover-color":g},children:[a.jsx("button",{ref:Re,type:"button",className:`${e}-close-icon-inner`,onClick:_e,"aria-label":"Close",children:a.jsx(sn,{url:I??"",fill:E,hoverFill:i&&!r?E:g,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),Ot=(Se,qe)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[At||jt?Pe():null,Wt?A("two-row"):null,qe!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:qe},children:Se}):a.jsxs(a.Fragment,{children:[Se,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),at()]}),It=Se=>{if(!Se)return null;const qe=Kn(e,Se,M,se,j);return a.jsx(a.Fragment,{children:qe.map(R=>Ct(R,"single-row",_t(qe,R,"single-row")))})},nn=Se=>{if(!Se)return null;const qe=Kn(e,Se,M,se,j),R=qe.find(ne=>ne.prefix==="title1");return R?Ct(R,"two-row-top",_t(qe,R,"two-row-top")):null},un=(Se,qe=!1)=>{const R=Se?Kn(e,Se,M,se,j):[],ne=R.filter(je=>je.prefix==="title2"||je.prefix==="title3"),me=o&&qe;return ne.length>0||me||(T??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ne.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[ne.map(je=>Ct(je,"two-row-bottom",_t(R,je,"two-row-bottom"))),qe&&o?a.jsxs(a.Fragment,{children:[la(),ca()]}):null]}):null,(T??0)>0||me?a.jsx("div",{"data-controls":me?"titleRowMarginBottom":void 0,"data-controls-axis":me?"y":void 0,"data-controls-reverse":me?"":void 0,className:me?`${e}-control`:void 0,style:{height:rn,width:"100%",flexShrink:0,pointerEvents:me?"auto":"none"}}):null]}):null},li=(Se,qe=!1)=>a.jsxs(a.Fragment,{children:[Ot(nn(Se)),un(Se,qe)]}),ci=Se=>k?a.jsx("div",{className:`${e}-titles-row-two-row`,children:li(Se)}):Se?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:It(Se)}):null,er=()=>{const Se=k?-1:Ge.findIndex(ne=>ne.prefix==="title1"),qe=!k&&(o||(N??0)>0)?(()=>{const ne=N??0,me=Se>=0?ht[Se]:gt.title1Width,Me=Math.max(ne,Un);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(me),style:{position:"absolute",top:0,left:0,width:X(Me),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,R=Ge.flatMap((ne,me)=>{if(!ne.marginLeftKey)return[];const Me=ke[ne.marginLeftKey]??0,je=Td(Ge,ht,ke,me)+qt(),et=Math.max(Me,Un);return a.jsx("div",{"data-controls":ne.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ht[me]),style:{position:"absolute",top:0,left:X(je),width:X(et),height:"100%",pointerEvents:"auto"}},ne.marginLeftKey)});return qe?[qe,...R]:R},tr=()=>Ge.map((Se,qe)=>{const R=cn(qe,ht),me=Xt(qe)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(R),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(me),width:X(fn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),la=()=>mt.flatMap((Se,qe)=>{if(!Se.marginLeftKey)return[];const R=ke[Se.marginLeftKey]??0,ne=Ht(qe),me=Math.max(R,Un),{resolvedWidth:Me}=Mt(Se,"two-row-bottom");return a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me),style:{position:"absolute",top:0,left:X(ne),width:X(me),height:"100%",pointerEvents:"auto"}},Se.marginLeftKey)}),ca=()=>mt.map((Se,qe)=>{const{maxWidth:R}=Mt(Se,"two-row-bottom"),me=Dt(qe)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(R),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(me),width:X(fn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),$n=()=>!o||k?null:a.jsxs(a.Fragment,{children:[er(),tr()]}),Pi=Se=>{const qe=!Se.objectFit&&Dn(w);return{className:`${e}-slide-image-cell${qe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:L,maxHeight:_,...qe?{"--image-aspect-ratio":aa(w)}:{}}}},nr=Se=>Se.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Se.objectFit}}:Dn(w)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},di=Se=>{if(Se.length===0)return null;const qe=Se.length>1,R=Ca(ie),ne=`calc(-0.5 * (${R} + ${ie}))`;if(Se.length===1){const me=Se[0];return a.jsx("div",{...Pi(me),children:a.jsx("img",{...nr(me),src:me.url,alt:me.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:qe?{gap:ie}:void 0,children:Se.map((me,Me)=>a.jsxs("div",{...Pi(me),children:[a.jsx("img",{...nr(me),src:me.url,alt:me.name??"",draggable:!1}),o&&qe&&Me<Se.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ne,width:R,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${me.url}-${Me}`))})},ir=!!(te!=null&&te.title2||te!=null&&te.title3||ft!=null&&ft.title2||ft!=null&&ft.title3||(T??0)>0||o),da=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:lt,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:li(ue||te)}),a.jsxs("div",{ref:ut,className:`${e}-titles-row-two-row`,style:{...oe&&Y?{minHeight:Y}:void 0,...oe&&de?{width:de,maxWidth:"100%"}:void 0},children:[Ot(a.jsxs("div",{className:Kt,style:{position:oe?"absolute":"relative",inset:oe?0:void 0,width:"100%"},children:[ft&&oe?a.jsx("div",{className:`${Tt} ${e}-titles-fade-out`,children:nn(ft)}):null,a.jsx("div",{className:`${e}-titles-layer-in${oe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:nn(te)})]}),oe&&Y?Y:void 0),ir?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ft&&oe?a.jsx("div",{className:`${Jt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:un(ft)}):null,a.jsx("div",{className:`${e}-titles-layer-in${oe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${k?` ${e}-titles-layer-in-stacked`:""}`,children:un(te,!0)})]}):null]})]}),ua=()=>{const Se=ir;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Se?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Se?void 0:{flex:"0 0 auto",height:"auto"},children:li(te,!0)}),$n()]})};return a.jsxs("div",{ref:Ye,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{we||_e()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:xt?void 0:-1,style:{opacity:Le?1:0,transition:"opacity 300ms ease",pointerEvents:Le?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...$e}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ve,...Te,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Xe,onClick:Se=>Se.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":G&&J.length>1?"true":"false",onPointerDown:G?St:void 0,onPointerUp:G?Bt:void 0,onPointerCancel:G?zt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[wt&&le?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Se=>{Se.target===Se.currentTarget&&xe(Fe)},children:a.jsx("div",{className:`${e}-slide-area`,children:di(wt.images)})},`slide-out-${Fe}`):null,a.jsx("div",{className:`${e}-slide-layer-in${le?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:Z?di(Z.images):null})},`slide-in-${Fe}-${ee}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:ze,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ae,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...k?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${k?` ${e}-lightbox-content-area-stacked`:""}`,children:Ft&&a.jsx("div",{className:`${e}-text-bar-cell${k?` ${e}-text-bar-cell-stacked`:""}`,style:k?void 0:{flex:1,minWidth:0,width:"100%"},children:k?C==="fade"?da():ua():C==="fade"?it():Et()})})})]})]})]})};function ux(e){return`
15157
15157
  .${e}-wrapper {
15158
15158
  position: relative;
15159
15159
  width: 100%;
@@ -15675,7 +15675,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15675
15675
  pointer-events: auto;
15676
15676
  z-index: 10;
15677
15677
  }
15678
- `}const cx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:d}=H.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:x}=e,b=s.useRef(null),[g,h]=s.useState(!1),[f,v]=s.useState(0),C=s.useRef(!1),y=s.useRef(!1),T=s.useRef(!1),W=s.useMemo(()=>(t??[]).filter(m=>Yi(m).length>0),[t]),_=g&&W.length>0,X=!n,D=s.useCallback(()=>{X&&(T.current=!0,wf(y.current,c),y.current=!1)},[X,c]),w=(m=0)=>{if(W.length===0||n&&!i&&!o)return;const E=Cr(W,x),I=Math.max(0,Math.min(m,E.length-1));if(v(I),X){const J=xd();vd(I+1,c,J),y.current=!J}h(!0)},R=s.useCallback(()=>{h(!1),T.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!X||C.current)return;C.current=!0;const m=$l(c);if(!m)return;const E=Cl(m,Cr(W,x).length);E<0||(v(E),h(!0))},[W,c,X,x]),s.useEffect(()=>{if(!X)return;const m=()=>{if(T.current){T.current=!1,h(!1);return}const E=$l(c);if(!E){h(!1);return}const I=Cl(E,Cr(W,x).length);if(I<0){h(!1);return}y.current=!1,v(I),h(!0)};return window.addEventListener("popstate",m),()=>window.removeEventListener("popstate",m)},[W,c,X,x]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:b,className:`${d}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:lx(d)}}),u?a.jsx("button",{type:"button",className:`${d}-cover ${Hn(p)?`${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,...Hn(p)?{"--image-aspect-ratio":ra(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${d}-cover-image ${Hn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),_&&typeof document<"u"&&(()=>{const m=(r?document.getElementById(r):null)??document.body;return Bn.createPortal(a.jsx(sx,{prefix:d,entries:W,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:f,enableUrlSync:X,journalItemId:c,onBeforeClose:D,onClose:R}),m)})()]})},dx=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15678
+ `}const px=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:d}=W.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:v}=e,w=s.useRef(null),[m,h]=s.useState(!1),[f,x]=s.useState(0),C=s.useRef(!1),y=s.useRef(!1),S=s.useRef(!1),B=s.useMemo(()=>(t??[]).filter($=>Ki($).length>0),[t]),N=m&&B.length>0,q=!n,D=s.useCallback(()=>{q&&(S.current=!0,$f(y.current,c),y.current=!1)},[q,c]),T=($=0)=>{if(B.length===0||n&&!i&&!o)return;const I=Ir(B,v),P=Math.max(0,Math.min($,I.length-1));if(x(P),q){const E=Cd();Sd(P+1,c,E),y.current=!E}h(!0)},H=s.useCallback(()=>{h(!1),S.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!q||C.current)return;C.current=!0;const $=Rl(c);if(!$)return;const I=Ll($,Ir(B,v).length);I<0||(x(I),h(!0))},[B,c,q,v]),s.useEffect(()=>{if(!q)return;const $=()=>{if(S.current){S.current=!1,h(!1);return}const I=Rl(c);if(!I){h(!1);return}const P=Ll(I,Ir(B,v).length);if(P<0){h(!1);return}y.current=!1,x(P),h(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[B,c,q,v]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:w,className:`${d}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ux(d)}}),u?a.jsx("button",{type:"button",className:`${d}-cover ${Dn(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>T(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Dn(p)?{"--image-aspect-ratio":aa(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${d}-cover-image ${Dn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),N&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return zn.createPortal(a.jsx(dx,{prefix:d,entries:B,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:f,enableUrlSync:q,journalItemId:c,onBeforeClose:D,onClose:H}),$)})()]})},mx=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15679
15679
  import { createPortal } from 'react-dom';
15680
15680
  import { CommonComponentProps } from '../props';
15681
15681
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16431,7 +16431,7 @@ export type LightboxJournalSettings = {
16431
16431
  closeIconColor: string;
16432
16432
  closeIconHoverColor: string;
16433
16433
  };
16434
- `,ux="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>'),hi={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 px(e){const t={};return t[tt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[tt(e,"fontSettings")]={...hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[tt(e,"fontSize")]={...hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[tt(e,"lineHeight")]={...hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[tt(e,"letterSpacing")]={...hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[tt(e,"wordSpacing")]={...hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[tt(e,"textAlign")]={...hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[tt(e,"textAppearance")]={...hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const mx=ni.reduce((e,t)=>({...e,...px(t)}),{}),gx=ni.reduce((e,t)=>({...e,[tt(t,"fontFamily")]:"Goudy Bookletter 1911",[tt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[tt(t,"letterSpacing")]:0,[tt(t,"wordSpacing")]:0,[tt(t,"textAlign")]:"left",[tt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Aa(e){return ni.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[tt(n,"fontSize")]=i),o!==void 0&&(t[tt(n,"lineHeight")]=o),t},{})}const hx=Lf(),fx={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"}},...mx,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:ux,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...gx,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,...Aa({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,...Aa({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,...Aa({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:[hx]}],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"}]}]}},yx={element:cx,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:fx,sourceCode:dx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...ni.map(e=>({path:`${tt(e,"fontFamily")}`}))]},fontRelations:{...ni.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${tt(t,"fontFamily")}`}),{})}},vx={sizeType:"custom",value:700,min:400,max:700};function Hr(e,t){return{widthPx:e,heightPx:e*t}}function rs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function Zl(e,t,n,i){const{heightPx:o}=Hr(n,i);return rs(e/2,t/2,e,t,n,o)}function Dd(e,t,n){for(const i of n){const{heightPx:o}=Hr(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function xx(e,t,n,i,o,r,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":Dd(e,t,n)||r==="area"?l??"none":d??"none"}function Jl(e,t,n){var d;const{sizeType:i,value:o,min:r,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-r)+r)}function bx(e){return`
16434
+ `,gx="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>'),fi={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 hx(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const fx=ii.reduce((e,t)=>({...e,...hx(t)}),{}),yx=ii.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Goudy Bookletter 1911",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Fa(e){return ii.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const vx=Mf(),xx={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"}},...fx,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:gx,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...yx,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,...Fa({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,...Fa({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,...Fa({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:[vx]}],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"}]}]}},bx={element:px,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:xx,sourceCode:mx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...ii.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{...ii.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})}},wx={sizeType:"custom",value:700,min:400,max:700};function Dr(e,t){return{widthPx:e,heightPx:e*t}}function rs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function tc(e,t,n,i){const{heightPx:o}=Dr(n,i);return rs(e/2,t/2,e,t,n,o)}function jd(e,t,n){for(const i of n){const{heightPx:o}=Dr(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Sx(e,t,n,i,o,r,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":jd(e,t,n)||r==="area"?l??"none":d??"none"}function nc(e,t,n){var d;const{sizeType:i,value:o,min:r,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-r)+r)}function Cx(e){return`
16435
16435
  .${e}-root {
16436
16436
  position: absolute;
16437
16437
  top: 0;
@@ -16466,7 +16466,7 @@ export type LightboxJournalSettings = {
16466
16466
  width: 32px;
16467
16467
  height: 32px;
16468
16468
  }
16469
- `}function wx(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 Sx(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await wx(i)]));return new Map(n)}function $x({settings:e,content:t=[],isEditor:n}){const{prefix:i}=H.useScopedStyles(),[o,r]=s.useState(null),[l,d]=s.useState([]),[c,u]=s.useState(0),p=s.useRef(0),[x,b]=s.useState({x:0,y:0}),[g,h]=s.useState("none"),f=s.useRef({x:0,y:0}),[v,C]=s.useState(!1),[y,T]=s.useState(!1),W=s.useRef(new Map),{imageSize:_=vx,cursor:X="system",target:D="area",position:w="random",visible:R="all",defaultCursor:m=null,hoverCursor:E=null}=e,I=t.filter(L=>{var N;return!!((N=L==null?void 0:L.image)!=null&&N.url)}),J=s.useMemo(()=>bx(i),[i]),A=s.useCallback((L,N,V=l)=>{if(!o)return;const de=o.getBoundingClientRect(),re=L-de.left,M=N-de.top;b({x:re,y:M}),h(xx(re,M,V,o,X,D,E,m))},[o,l,X,D,E,m]);s.useEffect(()=>{const L=[...I.map(V=>V.image.url),m,E].filter(V=>!!V);if(L.length===0){W.current=new Map,T(!0);return}let N=!1;return T(!1),Sx(L).then(V=>{N||(W.current=V,T(!0))}),()=>{N=!0}},[t,m,E]),s.useEffect(()=>{if(!o)return;const L=V=>{V.stopPropagation(),f.current={x:V.clientX,y:V.clientY},A(V.clientX,V.clientY)},N=()=>{v&&A(f.current.x,f.current.y)};return o.addEventListener("mousemove",L),window.addEventListener("scroll",N,!0),()=>{o.removeEventListener("mousemove",L),window.removeEventListener("scroll",N,!0)}},[o,v,A]),s.useEffect(()=>{!o||!v||A(f.current.x,f.current.y)},[l,o,v,A]),s.useEffect(()=>{v||h("none")},[v]);const Q=(L,N,V,de={})=>{var O,te;if(!((O=L==null?void 0:L.image)!=null&&O.url))return null;const re=((te=W.current.get(L.image.url))==null?void 0:te.aspectRatio)??1,M=Jl(L.image.url,_,W.current),{heightPx:S}=Hr(M,re);let $=0,F=0;return w==="same"?{x:$,y:F}=Zl(N,V,M,re):($=de.x??Math.random()*N,F=de.y??Math.random()*V,{x:$,y:F}=rs($,F,N,V,M,S)),{id:p.current++,url:L.image.url,link:L.link,name:L.image.name,x:$,y:F,xRatio:$/N,yRatio:F/V,aspectRatio:re,widthPx:M}},q=()=>{if(!o)return;const L=o.getBoundingClientRect(),N=L.width,V=L.height;N===0||V===0||d(de=>de.length===0?de:de.map(re=>{const M=_.sizeType==="random"?re.widthPx:Jl(re.url,_,W.current),{heightPx:S}=Hr(M,re.aspectRatio);if(w==="same"){const{x:O,y:te}=Zl(N,V,M,re.aspectRatio);return{...re,x:O,y:te,widthPx:M}}const{x:$,y:F}=rs(re.xRatio*N,re.yRatio*V,N,V,M,S);return{...re,x:$,y:F,widthPx:M}}))};s.useEffect(()=>{if(!o||I.length===0||!y)return;const L=o.getBoundingClientRect(),N=L.width,V=L.height,de=Q(I[0],N,V);de&&(d([de]),u(I.length>1?1:0))},[_,w,o,t,y]),s.useEffect(()=>{if(!o)return;q();const L=new ResizeObserver(q);return L.observe(o),window.addEventListener("resize",q),()=>{L.disconnect(),window.removeEventListener("resize",q)}},[o,w,_,l.length]),s.useEffect(()=>{R==="last One"&&d(L=>L.length>0?[L[L.length-1]]:[])},[R]);const Y=L=>{if(!o||I.length===0||!y)return;const N=o.getBoundingClientRect(),V=L.clientX-N.left,de=L.clientY-N.top;if(D==="image"&&!Dd(V,de,l))return;let re=0,M=0;w==="on Click"?(re=V,M=de):w==="same"?(re=N.width/2,M=N.height/2):(re=Math.random()*N.width,M=Math.random()*N.height);const S=I[c%I.length],$=Q(S,N.width,N.height,{x:re,y:M});if(!$)return;const F=R==="all"?[...l,$]:[$];d(F),u(O=>(O+1)%I.length),A(L.clientX,L.clientY,F)},oe=X==="custom"&&g!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:J}}),a.jsxs("div",{ref:r,onClick:Y,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:`${i}-root`,style:{cursor:oe?"none":"default"},children:[l.map(L=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${L.y}px`,left:`${L.x}px`,width:`${L.widthPx}px`,cursor:oe?"none":"default"},children:D==="area"&&L.link?a.jsx("a",{href:L.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:L.url,alt:L.name,className:`${i}-image`})}):a.jsx("img",{src:L.url,alt:L.name,className:`${i}-image`})},L.id)),v&&oe&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Cx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16469
+ `}function $x(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 Tx(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await $x(i)]));return new Map(n)}function Ix({settings:e,content:t=[],isEditor:n}){const{prefix:i}=W.useScopedStyles(),[o,r]=s.useState(null),[l,d]=s.useState([]),[c,u]=s.useState(0),p=s.useRef(0),[v,w]=s.useState({x:0,y:0}),[m,h]=s.useState("none"),f=s.useRef({x:0,y:0}),[x,C]=s.useState(!1),[y,S]=s.useState(!1),B=s.useRef(new Map),{imageSize:N=wx,cursor:q="system",target:D="area",position:T="random",visible:H="all",defaultCursor:$=null,hoverCursor:I=null}=e,P=t.filter(L=>{var _;return!!((_=L==null?void 0:L.image)!=null&&_.url)}),E=s.useMemo(()=>Cx(i),[i]),g=s.useCallback((L,_,V=l)=>{if(!o)return;const ae=o.getBoundingClientRect(),re=L-ae.left,M=_-ae.top;w({x:re,y:M}),h(Sx(re,M,V,o,q,D,I,$))},[o,l,q,D,I,$]);s.useEffect(()=>{const L=[...P.map(V=>V.image.url),$,I].filter(V=>!!V);if(L.length===0){B.current=new Map,S(!0);return}let _=!1;return S(!1),Tx(L).then(V=>{_||(B.current=V,S(!0))}),()=>{_=!0}},[t,$,I]),s.useEffect(()=>{if(!o)return;const L=V=>{V.stopPropagation(),f.current={x:V.clientX,y:V.clientY},g(V.clientX,V.clientY)},_=()=>{x&&g(f.current.x,f.current.y)};return o.addEventListener("mousemove",L),window.addEventListener("scroll",_,!0),()=>{o.removeEventListener("mousemove",L),window.removeEventListener("scroll",_,!0)}},[o,x,g]),s.useEffect(()=>{!o||!x||g(f.current.x,f.current.y)},[l,o,x,g]),s.useEffect(()=>{x||h("none")},[x]);const z=(L,_,V,ae={})=>{var k,G;if(!((k=L==null?void 0:L.image)!=null&&k.url))return null;const re=((G=B.current.get(L.image.url))==null?void 0:G.aspectRatio)??1,M=nc(L.image.url,N,B.current),{heightPx:se}=Dr(M,re);let j=0,b=0;return T==="same"?{x:j,y:b}=tc(_,V,M,re):(j=ae.x??Math.random()*_,b=ae.y??Math.random()*V,{x:j,y:b}=rs(j,b,_,V,M,se)),{id:p.current++,url:L.image.url,link:L.link,name:L.image.name,x:j,y:b,xRatio:j/_,yRatio:b/V,aspectRatio:re,widthPx:M}},F=()=>{if(!o)return;const L=o.getBoundingClientRect(),_=L.width,V=L.height;_===0||V===0||d(ae=>ae.length===0?ae:ae.map(re=>{const M=N.sizeType==="random"?re.widthPx:nc(re.url,N,B.current),{heightPx:se}=Dr(M,re.aspectRatio);if(T==="same"){const{x:k,y:G}=tc(_,V,M,re.aspectRatio);return{...re,x:k,y:G,widthPx:M}}const{x:j,y:b}=rs(re.xRatio*_,re.yRatio*V,_,V,M,se);return{...re,x:j,y:b,widthPx:M}}))};s.useEffect(()=>{if(!o||P.length===0||!y)return;const L=o.getBoundingClientRect(),_=L.width,V=L.height,ae=z(P[0],_,V);ae&&(d([ae]),u(P.length>1?1:0))},[N,T,o,t,y]),s.useEffect(()=>{if(!o)return;F();const L=new ResizeObserver(F);return L.observe(o),window.addEventListener("resize",F),()=>{L.disconnect(),window.removeEventListener("resize",F)}},[o,T,N,l.length]),s.useEffect(()=>{H==="last One"&&d(L=>L.length>0?[L[L.length-1]]:[])},[H]);const X=L=>{if(!o||P.length===0||!y)return;const _=o.getBoundingClientRect(),V=L.clientX-_.left,ae=L.clientY-_.top;if(D==="image"&&!jd(V,ae,l))return;let re=0,M=0;T==="on Click"?(re=V,M=ae):T==="same"?(re=_.width/2,M=_.height/2):(re=Math.random()*_.width,M=Math.random()*_.height);const se=P[c%P.length],j=z(se,_.width,_.height,{x:re,y:M});if(!j)return;const b=H==="all"?[...l,j]:[j];d(b),u(k=>(k+1)%P.length),g(L.clientX,L.clientY,b)},ie=q==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),a.jsxs("div",{ref:r,onClick:X,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:`${i}-root`,style:{cursor:ie?"none":"default"},children:[l.map(L=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${L.y}px`,left:`${L.x}px`,width:`${L.widthPx}px`,cursor:ie?"none":"default"},children:D==="area"&&L.link?a.jsx("a",{href:L.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:L.url,alt:L.name,className:`${i}-image`})}):a.jsx("img",{src:L.url,alt:L.name,className:`${i}-image`})},L.id)),x&&ie&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Rx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16470
16470
  import { CommonComponentProps } from '../props';
16471
16471
  import { useScopedStyles } from '../utils/index';
16472
16472
 
@@ -16996,7 +16996,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
16996
16996
  </>
16997
16997
  );
16998
16998
  }
16999
- `,Tx={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"]}]}]},Ix={element:$x,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:Tx,sourceCode:Cx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Rx=100,Lx=70,Gn="cubic-bezier(0.86, 0, 0.07, 1)";function Px(e){return`
16999
+ `,Lx={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"]}]}]},Px={element:Ix,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:Lx,sourceCode:Rx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Ex=100,Mx=70,Xn="cubic-bezier(0.86, 0, 0.07, 1)";function kx(e){return`
17000
17000
  .${e}-wrapper {
17001
17001
  position: relative;
17002
17002
  width: 100%;
@@ -17031,34 +17031,34 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17031
17031
  }
17032
17032
  .${e}-incoming-next {
17033
17033
  z-index: 4;
17034
- transition: transform var(--${e}-transition-ms) ${Gn};
17034
+ transition: transform var(--${e}-transition-ms) ${Xn};
17035
17035
  }
17036
17036
  .${e}-incoming-prev {
17037
17037
  z-index: 4;
17038
- transition: transform var(--${e}-transition-ms) ${Gn};
17038
+ transition: transform var(--${e}-transition-ms) ${Xn};
17039
17039
  }
17040
17040
  .${e}-outgoing {
17041
17041
  will-change: transform;
17042
17042
  }
17043
17043
  .${e}-outgoing-next {
17044
17044
  z-index: 3;
17045
- transition: transform var(--${e}-transition-ms) ${Gn};
17045
+ transition: transform var(--${e}-transition-ms) ${Xn};
17046
17046
  }
17047
17047
  .${e}-outgoing-prev {
17048
17048
  z-index: 3;
17049
- transition: transform var(--${e}-transition-ms) ${Gn};
17049
+ transition: transform var(--${e}-transition-ms) ${Xn};
17050
17050
  }
17051
17051
  .${e}-outgoing-next .${e}-effect-image {
17052
- transition: filter var(--${e}-transition-ms) ${Gn};
17052
+ transition: filter var(--${e}-transition-ms) ${Xn};
17053
17053
  }
17054
17054
  .${e}-outgoing-prev .${e}-effect-image {
17055
- transition: filter var(--${e}-transition-ms) ${Gn};
17055
+ transition: filter var(--${e}-transition-ms) ${Xn};
17056
17056
  }
17057
17057
  .${e}-incoming .${e}-effect-image {
17058
- transition: filter var(--${e}-transition-ms) ${Gn};
17058
+ transition: filter var(--${e}-transition-ms) ${Xn};
17059
17059
  }
17060
17060
  .${e}-background .${e}-effect-image {
17061
- transition: filter var(--${e}-transition-ms) ${Gn};
17061
+ transition: filter var(--${e}-transition-ms) ${Xn};
17062
17062
  }
17063
17063
  .${e}-snap .${e}-incoming,
17064
17064
  .${e}-snap .${e}-outgoing,
@@ -17106,7 +17106,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17106
17106
  display: block;
17107
17107
  pointer-events: none;
17108
17108
  }
17109
- `}function Ex(e){return e==="blur"?Lx:e==="greyscale"?Rx:0}function go(e,t=1,n=1){const i=Ex(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 Ql(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Mx(e,t){return t<=1?0:(e-1+t)%t}function kx(e,t=1){return!e||e.height===0?t:e.width/e.height}function Ax(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let d=r,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function ec(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 Od(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function tc(e,t,n){return{...Od(e),[`--${n}-stage-scale`]:t}}function Fx(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 _x({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,ee,ce,ue,Te,ke,Ce;const{prefix:o}=H.useScopedStyles(),r=s.useMemo(()=>Px(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,x=t??[],b=Ql(x.length),[g,h]=s.useState(b.activeIndex),[f,v]=s.useState(b.backgroundIndex),[C,y]=s.useState(!1),[T,W]=s.useState(!1),[_,X]=s.useState(null),[D,w]=s.useState(null),[R,m]=s.useState(0),[E,I]=s.useState(1),[J,A]=s.useState("none"),[Q,q]=s.useState("next"),[Y,oe]=s.useState({}),[L,N]=s.useState({width:0,height:0}),V=s.useRef(null),de=s.useRef(null),re=!n||!!i,M=l??60,S=Math.max(10,Math.min(100,d??M)),$=Math.max(10,Math.min(100,c??M)),F=Math.max(100,u),O=go(p),te=s.useCallback(U=>{const fe=kx(U?Y[U]:void 0);return Ax(L.width,L.height,fe,S,$)},[L.height,L.width,Y,$,S]);s.useEffect(()=>{const U=de.current;if(!U)return;const fe=new ResizeObserver(([me])=>{const{width:K,height:z}=me.contentRect;N({width:K,height:z})});return fe.observe(U),()=>fe.disconnect()},[]),s.useEffect(()=>{const U=(t??[]).map(fe=>{var me;return(me=fe.image)==null?void 0:me.url}).filter(fe=>!!fe);Fx(U,(fe,me)=>{oe(K=>{var z,be;return((z=K[fe])==null?void 0:z.width)===me.width&&((be=K[fe])==null?void 0:be.height)===me.height?K:{...K,[fe]:me}})})},[t]),s.useEffect(()=>{const{backgroundIndex:U,activeIndex:fe}=Ql(x.length);h(fe),v(U),y(!1),W(!1),X(null),w(null),m(0),I(1),A("none"),q("next")},[x.length,t]),s.useEffect(()=>()=>{V.current&&clearTimeout(V.current)},[]);const xe=s.useCallback(U=>{var se,j,_e,We;if(!re||C||x.length<=1)return;const fe=U==="next"?(g+1)%x.length:(g-1+x.length)%x.length,me=te((j=(se=x[g])==null?void 0:se.image)==null?void 0:j.url),K=te((We=(_e=x[fe])==null?void 0:_e.image)==null?void 0:We.url),z=ec(L.width,L.height,me),be=ec(L.width,L.height,K);V.current&&clearTimeout(V.current),q(U),W(!0),y(!0),U==="next"?(X(g),w(fe),m(0),I(1),A(go(p,0,1))):(v(Mx(fe,x.length)),X(fe),w(g),m(1),I(be),A(go(p,1,be))),requestAnimationFrame(()=>{W(!1),requestAnimationFrame(()=>{U==="next"?(m(1),I(z),A(go(p,1,z))):(m(0),I(1),A(go(p,0,1)))})}),V.current=setTimeout(()=>{U==="next"&&v(g),h(fe),X(null),w(null),y(!1)},F)},[g,p,L.height,L.width,te,C,re,x,F]),ne=x[g],ae=f!==null?x[f]:null,Z=_!==null?x[_]:null,B=D!==null?x[D]:null,G=x.length<=1?0:(g-1+x.length)%x.length,$e=x.length<=1?0:(g+1)%x.length,he=te((Se=ne==null?void 0:ne.image)==null?void 0:Se.url),Re=te((ee=Z==null?void 0:Z.image)==null?void 0:ee.url),ge=te((ce=B==null?void 0:B.image)==null?void 0:ce.url),ye={[`--${o}-transition-ms`]:`${F}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:de,className:pt(`${o}-wrapper`,T&&`${o}-snap`,n&&!i&&`${o}-editor`),style:ye,"aria-label":"Zoom gallery",children:[((ue=ae==null?void 0:ae.image)==null?void 0:ue.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ae.image.url,alt:"",style:{filter:O}})}),C&&((Te=Z==null?void 0:Z.image)==null?void 0:Te.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${Q}`),style:tc(Re,E,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Z.image.url,alt:"",style:{filter:J}})}),C&&((ke=B==null?void 0:B.image)==null?void 0:ke.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${Q}`),style:tc(ge,R,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:B.image.url,alt:""})}),!C&&((Ce=ne==null?void 0:ne.image)==null?void 0:Ce.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-foreground`),style:Od(he),children:a.jsx("img",{className:`${o}-image`,src:ne.image.url,alt:ne.image.name??""})}),re&&x.length>1&&!C&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:pt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>xe("prev"),"aria-label":`Show previous image (${G+1} of ${x.length})`}),a.jsx("button",{type:"button",className:pt(`${o}-nav`,`${o}-nav-next`),onClick:()=>xe("next"),"aria-label":`Show next image (${$e+1} of ${x.length})`})]})]})]})}const Nx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17109
+ `}function Ax(e){return e==="blur"?Mx:e==="greyscale"?Ex:0}function fo(e,t=1,n=1){const i=Ax(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 ic(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Fx(e,t){return t<=1?0:(e-1+t)%t}function _x(e,t=1){return!e||e.height===0?t:e.width/e.height}function Nx(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let d=r,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function oc(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 Vd(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function rc(e,t,n){return{...Vd(e),[`--${n}-stage-scale`]:t}}function Wx(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 Hx({settings:e,content:t,isEditor:n,isPreviewMode:i}){var ye,U,ce,le,Ce,Fe,Ee;const{prefix:o}=W.useScopedStyles(),r=s.useMemo(()=>kx(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,v=t??[],w=ic(v.length),[m,h]=s.useState(w.activeIndex),[f,x]=s.useState(w.backgroundIndex),[C,y]=s.useState(!1),[S,B]=s.useState(!1),[N,q]=s.useState(null),[D,T]=s.useState(null),[H,$]=s.useState(0),[I,P]=s.useState(1),[E,g]=s.useState("none"),[z,F]=s.useState("next"),[X,ie]=s.useState({}),[L,_]=s.useState({width:0,height:0}),V=s.useRef(null),ae=s.useRef(null),re=!n||!!i,M=l??60,se=Math.max(10,Math.min(100,d??M)),j=Math.max(10,Math.min(100,c??M)),b=Math.max(100,u),k=fo(p),G=s.useCallback(Y=>{const be=_x(Y?X[Y]:void 0);return Nx(L.width,L.height,be,se,j)},[L.height,L.width,X,j,se]);s.useEffect(()=>{const Y=ae.current;if(!Y)return;const be=new ResizeObserver(([de])=>{const{width:K,height:ue}=de.contentRect;_({width:K,height:ue})});return be.observe(Y),()=>be.disconnect()},[]),s.useEffect(()=>{const Y=(t??[]).map(be=>{var de;return(de=be.image)==null?void 0:de.url}).filter(be=>!!be);Wx(Y,(be,de)=>{ie(K=>{var ue,He;return((ue=K[be])==null?void 0:ue.width)===de.width&&((He=K[be])==null?void 0:He.height)===de.height?K:{...K,[be]:de}})})},[t]),s.useEffect(()=>{const{backgroundIndex:Y,activeIndex:be}=ic(v.length);h(be),x(Y),y(!1),B(!1),q(null),T(null),$(0),P(1),g("none"),F("next")},[v.length,t]),s.useEffect(()=>()=>{V.current&&clearTimeout(V.current)},[]);const he=s.useCallback(Y=>{var fe,Q,Je,Ne;if(!re||C||v.length<=1)return;const be=Y==="next"?(m+1)%v.length:(m-1+v.length)%v.length,de=G((Q=(fe=v[m])==null?void 0:fe.image)==null?void 0:Q.url),K=G((Ne=(Je=v[be])==null?void 0:Je.image)==null?void 0:Ne.url),ue=oc(L.width,L.height,de),He=oc(L.width,L.height,K);V.current&&clearTimeout(V.current),F(Y),B(!0),y(!0),Y==="next"?(q(m),T(be),$(0),P(1),g(fo(p,0,1))):(x(Fx(be,v.length)),q(be),T(m),$(1),P(He),g(fo(p,1,He))),requestAnimationFrame(()=>{B(!1),requestAnimationFrame(()=>{Y==="next"?($(1),P(ue),g(fo(p,1,ue))):($(0),P(1),g(fo(p,0,1)))})}),V.current=setTimeout(()=>{Y==="next"&&x(m),h(be),q(null),T(null),y(!1)},b)},[m,p,L.height,L.width,G,C,re,v,b]),J=v[m],ee=f!==null?v[f]:null,O=N!==null?v[N]:null,Z=D!==null?v[D]:null,te=v.length<=1?0:(m-1+v.length)%v.length,Le=v.length<=1?0:(m+1)%v.length,ve=G((ye=J==null?void 0:J.image)==null?void 0:ye.url),Ie=G((U=O==null?void 0:O.image)==null?void 0:U.url),pe=G((ce=Z==null?void 0:Z.image)==null?void 0:ce.url),oe={[`--${o}-transition-ms`]:`${b}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:ae,className:pt(`${o}-wrapper`,S&&`${o}-snap`,n&&!i&&`${o}-editor`),style:oe,"aria-label":"Zoom gallery",children:[((le=ee==null?void 0:ee.image)==null?void 0:le.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ee.image.url,alt:"",style:{filter:k}})}),C&&((Ce=O==null?void 0:O.image)==null?void 0:Ce.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${z}`),style:rc(Ie,I,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:O.image.url,alt:"",style:{filter:E}})}),C&&((Fe=Z==null?void 0:Z.image)==null?void 0:Fe.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${z}`),style:rc(pe,H,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:Z.image.url,alt:""})}),!C&&((Ee=J==null?void 0:J.image)==null?void 0:Ee.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-foreground`),style:Vd(ve),children:a.jsx("img",{className:`${o}-image`,src:J.image.url,alt:J.image.name??""})}),re&&v.length>1&&!C&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:pt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>he("prev"),"aria-label":`Show previous image (${te+1} of ${v.length})`}),a.jsx("button",{type:"button",className:pt(`${o}-nav`,`${o}-nav-next`),onClick:()=>he("next"),"aria-label":`Show next image (${Le+1} of ${v.length})`})]})]})]})}const Dx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17110
17110
  import cn from 'classnames';
17111
17111
  import { CommonComponentProps } from '../props';
17112
17112
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -17625,7 +17625,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
17625
17625
  </>
17626
17626
  );
17627
17627
  }
17628
- `,Wx={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:""}}]}},Hx={element:_x,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:Wx,sourceCode:Nx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Dx={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Ox=["hover","active"],Fa={left:"flex-start",center:"center",right:"flex-end"};function Bx(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 zx(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 jx(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))`,r=`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}, ${r}`,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}`,p=`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}`,g=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
17628
+ `,Ox={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:""}}]}},Bx={element:Hx,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:Ox,sourceCode:Dx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},zx={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},jx=["hover","active"],_a={left:"flex-start",center:"center",right:"flex-end"};function Vx(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 Gx(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 Xx(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))`,r=`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}, ${r}`,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}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,v=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,w=`.${e}-button:hover, ${v}`,m=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
17629
17629
  .${e}-root {
17630
17630
  line-height: 0;
17631
17631
  }
@@ -17655,11 +17655,11 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
17655
17655
  .${e}-wrapper.${e}-editing .${e}-button {
17656
17656
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms;
17657
17657
  }
17658
- ${g("scale-up")},
17658
+ ${m("scale-up")},
17659
17659
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-scale-up {
17660
17660
  transform: scale(1.05);
17661
17661
  }
17662
- ${g("lift")},
17662
+ ${m("lift")},
17663
17663
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-lift {
17664
17664
  transform: translateY(-2px);
17665
17665
  box-shadow: ${p};
@@ -17721,9 +17721,9 @@ a:focus-visible .${e}-hover-effect-swipe::before,
17721
17721
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe::before {
17722
17722
  transform: translateX(0);
17723
17723
  }
17724
- ${g("reveal")},
17724
+ ${m("reveal")},
17725
17725
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-reveal,
17726
- ${g("swipe")},
17726
+ ${m("swipe")},
17727
17727
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe {
17728
17728
  background-color: var(--${e}-background-color);
17729
17729
  }
@@ -17786,7 +17786,7 @@ a:focus-visible .${e}-hover-effect-content-roll .${e}-content-roll-layer-hover,
17786
17786
  transform: translateY(-50%);
17787
17787
  opacity: 1;
17788
17788
  }
17789
- ${b} {
17789
+ ${w} {
17790
17790
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
17791
17791
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
17792
17792
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
@@ -17865,7 +17865,7 @@ a:active .${e}-button .${e}-icon-image,
17865
17865
  height: calc(1em * var(--${e}-icon-scale, 1));
17866
17866
  width: calc(1em * var(--${e}-icon-scale, 1));
17867
17867
  }
17868
- `}function _a(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function nc(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(sn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.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=H.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Vx({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=H.useScopedStyles(),l=s.useMemo(()=>jx(r),[r]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:x,order:b="text-icon",gap:g=0,iconSize:h=0,iconWidthC:f=0,dimensions:v=!1,padding:C={top:0,right:0,bottom:0,left:0},cornerRadius:y=0,boxShadow:T={top:0,left:0,right:0,bottom:0},boxShadowColor:W="rgba(0, 0, 0, 0)",innerBoxShadow:_={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:X="rgba(0, 0, 0, 0)",stroke:D=0,backgroundColor:w="#000000",textColor:R="#ffffff",borderColor:m="#ffffff",iconColor:E="#ffffff",hoverEffect:I="none",fontFamily:J,fontSettings:A,fontSize:Q,lineHeight:q,letterSpacing:Y=0,wordSpacing:oe=0,textAppearance:L,stateOverrides:N,minWidth:V=0,minHeight:de=0,width:re=0,height:M=0}=e,S=H.buildColorVars(r,{backgroundColor:w,textColor:R,borderColor:m,iconColor:E,boxShadowColor:W,innerBoxShadowColor:X},Dx,Ox,N),$=i&&i!=="default"?`${r}-state-${i}`:"",F=t&&!n?`${r}-editing`:"",O=I!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${I}`:"",te=I==="reveal"||I==="swipe",xe=I==="content-roll",ne=I==="reveal"&&(!t||n),ae=v===!0,B=d==="a"?x??p:p,G=d==="c",$e=d!=="b",he={fontSettings:{fontFamily:J,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:q,letterSpacing:Y,wordSpacing:oe,textAppearance:L,color:R},ge={...$e?an(Yt(he,t)):{},[`--${r}-box-shadow-x`]:H.scalingValue(T.left,t),[`--${r}-box-shadow-y`]:H.scalingValue(T.top,t),[`--${r}-box-shadow-blur`]:H.scalingValue(T.right,t),[`--${r}-box-shadow-spread`]:H.scalingValue(T.bottom,t),[`--${r}-inner-box-shadow-x`]:H.scalingValue(_.left,t),[`--${r}-inner-box-shadow-y`]:H.scalingValue(_.top,t),[`--${r}-inner-box-shadow-blur`]:H.scalingValue(_.right,t),[`--${r}-inner-box-shadow-spread`]:H.scalingValue(_.bottom,t),paddingTop:H.scalingValue(C.top,t),paddingRight:H.scalingValue(C.right,t),paddingBottom:H.scalingValue(C.bottom,t),paddingLeft:H.scalingValue(C.left,t),borderRadius:H.scalingValue(y,t),borderWidth:H.scalingValue(D,t),...G?{}:{justifyContent:Fa[B],textAlign:B},...G&&!xe?{gap:H.scalingValue(g,t)}:{},...ae?{width:H.scalingValue(re,t),height:H.scalingValue(M,t)}:{minWidth:H.scalingValue(V,t),minHeight:H.scalingValue(de,t),...G?{width:"100%"}:{}}};let ye;const Se={display:"inline-flex",alignItems:"center",justifyContent:G?Fa[B]:Fa[d==="a"?B:"center"],gap:G?H.scalingValue(g,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:B}:{}};if(d==="b"){const ue=()=>nc(r,u,h>0?"fixed":"fill",100,h,t);ye=xe?_a(r,ue,`${r}-icon-roll`,void 0,Se):ue()}else if(d==="c"){const ue=()=>{const Te=a.jsx("span",{className:`${r}-text`,style:{textAlign:B},children:c}),ke=nc(r,u,f>0?"fixed":"fill",100,f,t);return b==="icon-text"?a.jsxs(a.Fragment,{children:[ke,Te]}):a.jsxs(a.Fragment,{children:[Te,ke]})};ye=xe?_a(r,ue,`${r}-icon-text-roll`,void 0,Se):ue()}else ye=xe?_a(r,()=>c,`${r}-label-roll`,void 0,Se):te?a.jsx("span",{className:`${r}-button-inner`,children:c}):c;const ee=ne?ue=>Bx(ue,r):void 0,ce=ne?ue=>zx(ue,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:S,children:a.jsx("div",{className:`${r}-wrapper ${$} ${F}`.trim(),children:a.jsx("div",{className:`${r}-button ${O}`.trim(),style:ge,onMouseEnter:ee,onMouseLeave:ce,role:"button",tabIndex:o||t&&!n?void 0:0,children:ye})})})]})}const Gx=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17868
+ `}function Na(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function ac(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(sn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.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=W.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function qx({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=W.useScopedStyles(),l=s.useMemo(()=>Xx(r),[r]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:v,order:w="text-icon",gap:m=0,iconSize:h=0,iconWidthC:f=0,dimensions:x=!1,padding:C={top:0,right:0,bottom:0,left:0},cornerRadius:y=0,boxShadow:S={top:0,left:0,right:0,bottom:0},boxShadowColor:B="rgba(0, 0, 0, 0)",innerBoxShadow:N={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:q="rgba(0, 0, 0, 0)",stroke:D=0,backgroundColor:T="#000000",textColor:H="#ffffff",borderColor:$="#ffffff",iconColor:I="#ffffff",hoverEffect:P="none",fontFamily:E,fontSettings:g,fontSize:z,lineHeight:F,letterSpacing:X=0,wordSpacing:ie=0,textAppearance:L,stateOverrides:_,minWidth:V=0,minHeight:ae=0,width:re=0,height:M=0}=e,se=W.buildColorVars(r,{backgroundColor:T,textColor:H,borderColor:$,iconColor:I,boxShadowColor:B,innerBoxShadowColor:q},zx,jx,_),j=i&&i!=="default"?`${r}-state-${i}`:"",b=t&&!n?`${r}-editing`:"",k=P!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${P}`:"",G=P==="reveal"||P==="swipe",he=P==="content-roll",J=P==="reveal"&&(!t||n),ee=x===!0,Z=d==="a"?v??p:p,te=d==="c",Le=d!=="b",ve={fontSettings:{fontFamily:E,fontWeight:(g==null?void 0:g.fontWeight)??400,fontStyle:(g==null?void 0:g.fontStyle)??"normal"},fontSize:z??.01,lineHeight:F,letterSpacing:X,wordSpacing:ie,textAppearance:L,color:H},pe={...Le?an(Ut(ve,t)):{},[`--${r}-box-shadow-x`]:W.scalingValue(S.left,t),[`--${r}-box-shadow-y`]:W.scalingValue(S.top,t),[`--${r}-box-shadow-blur`]:W.scalingValue(S.right,t),[`--${r}-box-shadow-spread`]:W.scalingValue(S.bottom,t),[`--${r}-inner-box-shadow-x`]:W.scalingValue(N.left,t),[`--${r}-inner-box-shadow-y`]:W.scalingValue(N.top,t),[`--${r}-inner-box-shadow-blur`]:W.scalingValue(N.right,t),[`--${r}-inner-box-shadow-spread`]:W.scalingValue(N.bottom,t),paddingTop:W.scalingValue(C.top,t),paddingRight:W.scalingValue(C.right,t),paddingBottom:W.scalingValue(C.bottom,t),paddingLeft:W.scalingValue(C.left,t),borderRadius:W.scalingValue(y,t),borderWidth:W.scalingValue(D,t),...te?{}:{justifyContent:_a[Z],textAlign:Z},...te&&!he?{gap:W.scalingValue(m,t)}:{},...ee?{width:W.scalingValue(re,t),height:W.scalingValue(M,t)}:{minWidth:W.scalingValue(V,t),minHeight:W.scalingValue(ae,t),...te?{width:"100%"}:{}}};let oe;const ye={display:"inline-flex",alignItems:"center",justifyContent:te?_a[Z]:_a[d==="a"?Z:"center"],gap:te?W.scalingValue(m,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:Z}:{}};if(d==="b"){const le=()=>ac(r,u,h>0?"fixed":"fill",100,h,t);oe=he?Na(r,le,`${r}-icon-roll`,void 0,ye):le()}else if(d==="c"){const le=()=>{const Ce=a.jsx("span",{className:`${r}-text`,style:{textAlign:Z},children:c}),Fe=ac(r,u,f>0?"fixed":"fill",100,f,t);return w==="icon-text"?a.jsxs(a.Fragment,{children:[Fe,Ce]}):a.jsxs(a.Fragment,{children:[Ce,Fe]})};oe=he?Na(r,le,`${r}-icon-text-roll`,void 0,ye):le()}else oe=he?Na(r,()=>c,`${r}-label-roll`,void 0,ye):G?a.jsx("span",{className:`${r}-button-inner`,children:c}):c;const U=J?le=>Vx(le,r):void 0,ce=J?le=>Gx(le,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:se,children:a.jsx("div",{className:`${r}-wrapper ${j} ${b}`.trim(),children:a.jsx("div",{className:`${r}-button ${k}`.trim(),style:pe,onMouseEnter:U,onMouseLeave:ce,role:"button",tabIndex:o||t&&!n?void 0:0,children:oe})})})]})}const Yx=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17869
17869
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
17870
17870
  import { CommonComponentProps } from '../props';
17871
17871
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -18492,7 +18492,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18492
18492
  </>
18493
18493
  );
18494
18494
  }
18495
- `,Xx={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qx=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Yx={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:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG 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:{...Xx.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:[...qx],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"]},Ux={element:Vx,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:Yx,sourceCode:Gx,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Kx(e){return`
18495
+ `,Ux={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Kx=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Zx={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:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG 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:{...Ux.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:[...Kx],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"]},Jx={element:qx,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:Zx,sourceCode:Yx,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Qx(e){return`
18496
18496
  .${e}-titles-row {
18497
18497
  position: relative;
18498
18498
  flex: 0 1 auto;
@@ -18690,7 +18690,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18690
18690
  pointer-events: auto;
18691
18691
  flex-shrink: 0;
18692
18692
  }
18693
- `}const In=500,ho=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",Zx=72,Jx=50,Qx=1e4,e0=650,t0=500;function n0(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Bd(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=_r(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 i0(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Bd(i,n):null}function o0(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 wo(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 ic(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return wo(e,i,n)}const r0=.03;function zd(e){return e.width*r0}const Na={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function hr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function oc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function a0(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function as(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function s0(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:as(e,t.width,t.height)}function l0(e,t){if(aa(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 c0(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 d0({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>aa(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function no(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=zd(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function Dr(e,t,n){const i=no(e,t,n);return{...i,left:2*i.left-e.left}}function u0(e,t,n){const{left:i,width:o}=n,r=zd(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function jd(e,t,n,i){const o=no(e,"left",i),r=no(e,"right",i),l=Dr(e,"left",i),d=Dr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function p0(e,t,n,i){const{start:o,end:r}=jd(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function m0(e,t,n){const i=no(e,t,n),o=Dr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function aa(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function g0({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function fr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return aa(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function h0({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:x,sourceRect:b,resolveCloseSourceRect:g,onClose:h,onPrev:f,onNext:v}){const C=s.useRef(null),y=s.useRef(null),T=s.useRef(null),W=s.useRef(new Map),[_,X]=s.useState(0),D=s.useRef(null),w=s.useRef(0),R=s.useRef(0),m=s.useRef("none"),E=s.useRef(!1),I=s.useRef(!1),J=s.useRef(!1),A=s.useRef(null),Q=s.useRef(null),q=s.useRef(null),Y=s.useRef(()=>{}),oe=s.useRef(null),L=s.useRef(null),N=s.useRef(null),V=s.useRef(!1),[de,re]=s.useState(null),[M,S]=s.useState(Na),[$,F]=s.useState(0),[O,te]=s.useState("opening"),[xe,ne]=s.useState(0),[ae,Z]=s.useState(0),[B,G]=s.useState(!1),[$e,he]=s.useState(null),[Re,ge]=s.useState(null),[ye,Se]=s.useState(null),[ee,ce]=s.useState(!1),[ue,Te]=s.useState(null),[ke,Ce]=s.useState(!1),U=s.useRef(!1),[fe,me]=s.useState(!1),[K,z]=s.useState(!1),be=s.useRef(n),se=s.useRef(void 0),j=t[n],_e=j?aa(j):!1,We=ae!==0||B,lt=!l&&(!r||!!d),Je=c&&!l,ct=u.length>1,it=s.useCallback((k,Le)=>t.length<=1?null:t[(k+Le+t.length)%t.length]??null,[t]),Ve=ct?wo(u,p,-1):it(n,-1),Ie=ct?wo(u,p,1):it(n,1),Ne=$e===-1&&We?ct&&Re!==null?wo(u,Re,-1):ye!==null?it(ye,-1):null:null,Oe=$e===1&&We?ct&&Re!==null?wo(u,Re,1):ye!==null?it(ye,1):null:null,Ue=Ne&&Ne.url!==(Ve==null?void 0:Ve.url)?Ne:null,pe=Oe&&Oe.url!==(Ie==null?void 0:Ie.url)?Oe:null,we=Ve&&Je?(()=>{const k=ct?ic(u,p,-1):t.length>2?it((n-1+t.length)%t.length,-1):null;return k&&k.url!==Ve.url?k:null})():null,Ae=Ie&&Je?(()=>{const k=ct?ic(u,p,1):t.length>2?it((n+1)%t.length,1):null;return k&&k.url!==Ie.url?k:null})():null,Xe=Ue??we,Ze=pe??Ae,Ge=s.useCallback((k,Le,Me)=>{if(!k||!Le||!Me)return;const De=W.current,rt=De.get(k);(rt==null?void 0:rt.width)===Le&&(rt==null?void 0:rt.height)===Me||(De.set(k,{width:Le,height:Me}),X(Et=>Et+1))},[]),st=s.useCallback(k=>{if(!(k!=null&&k.url))return null;const Le=W.current.get(k.url);return s0(y.current,Le)},[_,$]),Qe=s.useCallback(()=>{if(!j)return;const k=st(j);if(k){re(k);return}const Le=y.current;Le&&re(oc(Le))},[j,st]),Fe=s.useCallback(k=>{if(ct){const Le=u.length;ge((p+k+Le)%Le),Se(null);return}t.length>1&&(Se((n+k+t.length)%t.length),ge(null))},[ct,u.length,p,t.length,n]),qe=s.useCallback(k=>{J.current=k,G(k)},[]),He=s.useCallback(()=>{A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),nt=s.useCallback(()=>{He(),A.current=window.setTimeout(()=>{He(),qe(!1)},ho+32)},[He,qe]),at=s.useCallback(()=>{const k=C.current;if(!k){S({left:0,top:0,width:typeof window<"u"?window.innerWidth:Na.width,height:typeof window<"u"?window.innerHeight:Na.height});return}const Le=k.getBoundingClientRect();S({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),dt=s.useCallback((k,Le)=>{if(We){if(fe&&!B)return`translate(${ae}px, 0px)`;if(B&&$e!==null){const Me=st(k);if(!Me)return;const{x:De,y:rt}=p0(Me,Le,$e,M);return`translate(${De}px, ${rt}px)`}if(B)return"translate(0px, 0px)"}},[We,fe,B,ae,$e,M,st]),Tt=s.useCallback(()=>{const k=Q.current;Q.current=null,He(),qe(!1),he(null),ge(null),Se(null),Z(0),me(!1),E.current=!1,R.current=0,m.current="none",k===-1?f():k===1&&v()},[He,qe,f,v]),qt=s.useCallback(()=>{He(),A.current=window.setTimeout(()=>{Q.current!==null&&Tt()},ho+32)},[He,Tt]),Zt=s.useCallback(()=>{He(),Q.current=null,qe(!1),he(null),ge(null),Se(null),Z(0),me(!1),E.current=!1,R.current=0,m.current="none"},[He,qe]),xt=s.useCallback(k=>{if(!(!Je||!de)){if(J.current){if(Q.current===k){q.current=k,Tt();return}Zt()}He(),Fe(k),Q.current=k,he(k),qe(!0),qt()}},[Je,de,Tt,Zt,He,Fe,qe,qt]);Y.current=xt;const wt=s.useCallback(()=>{oe.current=null,V.current=!1,L.current!==null&&(window.clearInterval(L.current),L.current=null),N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),Bt=s.useCallback(k=>{L.current!==null&&window.clearInterval(L.current);const Le=V.current?t0:e0;L.current=window.setInterval(()=>{Y.current(k)},Le)},[]),At=s.useCallback(k=>{oe.current!==k&&(wt(),oe.current=k,V.current=!1,Y.current(k),Bt(k),N.current=window.setTimeout(()=>{N.current=null,oe.current===k&&(V.current=!0,Bt(k))},Qx))},[wt,Bt]),vt=s.useCallback(()=>{const k=y.current;if(!k)return;const Le=j==null?void 0:j.url,Me=Le?W.current.get(Le):void 0;if(Me!=null&&Me.width&&(Me!=null&&Me.height)){re(as(k,Me.width,Me.height));return}const De=T.current;if(De&&Le&&(De.src===Le||De.currentSrc===Le)){const{width:Et,height:et}=a0(De);if(Et&&et){Ge(Le,Et,et),re(as(k,Et,et));return}}const rt=oc(k);!rt.width||!rt.height||re(rt)},[j==null?void 0:j.url,Ge]),Ft=s.useCallback(k=>{if(T.current=k,!!k){if(k instanceof HTMLVideoElement){k.readyState>=1&&k.videoWidth>0&&vt();return}k.complete&&k.naturalWidth>0&&vt()}},[vt]),Nt=s.useCallback(()=>{at(),vt(),F(k=>k+1)},[at,vt]);s.useEffect(()=>{Nt();const k=y.current,Le=C.current,Me=new ResizeObserver(()=>Nt());return k&&Me.observe(k),Le&&Me.observe(Le),window.addEventListener("resize",Nt),()=>{Me.disconnect(),window.removeEventListener("resize",Nt)}},[Nt,n,x]),s.useLayoutEffect(()=>{if(!j)return;const k=T.current;if(k){if(k instanceof HTMLImageElement&&k.complete&&k.naturalWidth>0){vt();return}k instanceof HTMLVideoElement&&k.readyState>=1&&k.videoWidth>0&&vt()}},[j==null?void 0:j.url,n,vt]),s.useEffect(()=>{Qe()},[Qe,_]),s.useEffect(()=>{const k=new Set,Le=[],Me=De=>{!(De!=null&&De.url)||k.has(De.url)||(k.add(De.url),Le.push(De))};t.forEach(Me),u.forEach(De=>De.items.forEach(Me)),Le.forEach(De=>{W.current.has(De.url)||l0(De,Ge)})},[t,u,Ge]),s.useEffect(()=>{if(O!=="opening"||!de)return;if(!b){te("open");return}ce(!1);const k=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(!0),te("open")})});return()=>cancelAnimationFrame(k)},[O,de,b]),s.useEffect(()=>{if(O!=="closing")return;const k=setTimeout(()=>h(),In);return()=>clearTimeout(k)},[O,h]),s.useEffect(()=>()=>{He()},[He]),s.useLayoutEffect(()=>{be.current===n&&se.current===(j==null?void 0:j.url)||(He(),Q.current=null,he(null),ge(null),Se(null),ne(0),Z(0),qe(!1),z(!1),me(!1),w.current=0,R.current=0,m.current="none",E.current=!1,D.current=null,I.current=!1,T.current=null,Qe(),be.current=n,se.current=j==null?void 0:j.url)},[n,j==null?void 0:j.url,qe,He,Qe]),s.useLayoutEffect(()=>{const k=q.current;k!==null&&(q.current=null,requestAnimationFrame(()=>{Y.current(k)}))},[n,p,j==null?void 0:j.url]),s.useLayoutEffect(()=>{if(O==="opening"){U.current=!1,Ce(!1);return}if(O!=="open"||U.current)return;if(!Ve&&!Ie){U.current=!0;return}Ce(!1);const k=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ce(!0),U.current=!0})});return()=>cancelAnimationFrame(k)},[O,Ve==null?void 0:Ve.url,Ie==null?void 0:Ie.url]),s.useEffect(()=>{if(O!=="open")return;const k=()=>{const et=yt=>{yt.stopPropagation(),yt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},Le=et=>{const yt=et<0?1:-1;He(),Fe(yt),Q.current=yt,he(yt),qe(!0),qt()},Me=et=>{if(Math.abs(et)>Jx&&Je){Le(et);return}Q.current=null,he(null),ge(null),Se(null),qe(!0),Z(0),nt()},De=et=>{if(et.touches.length!==1||J.current)return;const yt=et.touches[0];I.current=!0,D.current={x:yt.clientX,y:yt.clientY},m.current="none",R.current=0,E.current=!1},rt=et=>{if(!D.current||et.touches.length!==1||J.current)return;const yt=et.touches[0],Ot=yt.clientX-D.current.x,It=yt.clientY-D.current.y;if(m.current==="none"){if(Math.abs(Ot)<10&&Math.abs(It)<10)return;if(Math.abs(Ot)>Math.abs(It)){if(!Je)return;m.current="horizontal"}else if(It>0){if(!lt)return;m.current="vertical"}else return}if(m.current==="horizontal"){E.current=!0,me(!0),R.current=Ot,Z(Ot),et.preventDefault();return}m.current==="vertical"&&(E.current=!0,me(!0),w.current=It,ne(It),et.preventDefault())},Et=()=>{if(!D.current)return;const et=m.current,yt=E.current;if(yt&&et==="horizontal")Me(R.current),k();else if(yt&&et==="vertical"){const Ot=w.current;if(lt&&Ot>Zx){const It=window.innerHeight;w.current=It,z(!0),ne(It),te("closing")}else w.current=0,ne(0);k()}else et==="horizontal"&&Math.abs(R.current)>0&&(Me(R.current),k());D.current=null,m.current="none",R.current=0,E.current=!1,me(!1)};return document.addEventListener("touchstart",De,{passive:!0}),document.addEventListener("touchmove",rt,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",De),document.removeEventListener("touchmove",rt),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[O,Je,qe,nt,He,lt,qt,Fe]);const Ut=s.useCallback(()=>{const k=(g==null?void 0:g())??b??null;k&&de&&(Te(k),ce(!0)),te("closing")},[g,b,de]);s.useEffect(()=>{const k=De=>{if(De.key==="Escape"){if(r&&d||O==="closing")return;wt(),Ut();return}if(De.key!=="ArrowLeft"&&De.key!=="ArrowRight"||O!=="open"||!Je)return;De.preventDefault();const rt=De.key==="ArrowLeft"?-1:1;De.repeat&&oe.current===rt||At(rt)},Le=De=>{if(De.key!=="ArrowLeft"&&De.key!=="ArrowRight")return;const rt=De.key==="ArrowLeft"?-1:1;oe.current===rt&&wt()},Me=()=>{wt()};return window.addEventListener("keydown",k),window.addEventListener("keyup",Le),window.addEventListener("blur",Me),()=>{window.removeEventListener("keydown",k),window.removeEventListener("keyup",Le),window.removeEventListener("blur",Me),wt()}},[O,r,d,Ut,Je,At,wt]),s.useEffect(()=>{O!=="open"&&wt()},[O,wt]);const Jt=()=>{O==="closing"||l||Ut()},Ct=O==="open",Wt=O==="closing",rn=xe>0?Math.max(0,1-xe/500):1,gt=xe>0?Math.max(.35,1-xe/500):1,Ee=s.useCallback(k=>{if(!(k.propertyName!=="transform"||!J.current)){if(Q.current!==null){Tt();return}He(),qe(!1)}},[He,qe,Tt]),ze=O==="closing"?ue??b:b,ot=ze&&de&&(O==="opening"||Wt)?n0(ze,de):void 0,ht=We&&j?dt(j,"center"):xe>0?`translateY(${xe}px)`:ot,ft=de?hr(de,M):null,Lt=!!(ze&&de),mt=Lt&&(O==="closing"||O==="open"&&ee),zt={position:"absolute",top:ft==null?void 0:ft.top,left:ft==null?void 0:ft.left,width:ft==null?void 0:ft.width,height:ft==null?void 0:ft.height,objectFit:"contain",transformOrigin:"top left",transform:ht,opacity:xe>0?gt:Lt?1:O==="opening"||Wt?0:1,transition:fe&&!B?"none":B?`transform ${ho}ms ${mn}`:K?`transform ${In}ms ${mn}, opacity ${In}ms ${mn}`:mt?`transform ${In}ms ${mn}`:O==="opening"||Wt?`opacity ${In}ms ${mn}`:"none",pointerEvents:_e&&Ct&&!We?"auto":"none",touchAction:_e&&Ct?"none":void 0,zIndex:1,overflow:_e?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!We?"auto":"none"},Mt=(k,Le,Me="adjacent")=>{const De=st(k);if(!De)return{display:"none"};const rt=Me==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Et}=$e!==null?jd(De,rt,$e,M):{start:Me==="far"?Dr(De,Le,M):no(De,Le,M)},et=hr(Et,M),yt=dt(k,rt),Ot=!We&&Me==="adjacent"&&Ct&&!ke?m0(De,Le,M):null,It=Me==="far"&&We&&$e===(Le==="left"?-1:1),nn=fe&&!B?!1:B,un=Me==="adjacent"&&Ct&&ke&&!We;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:yt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Me==="far"?Ct&&It?1:0:Ct?1:0,transition:nn?Me==="far"?`transform ${ho}ms ${mn}`:`transform ${ho}ms ${mn}, opacity ${In}ms ${mn}`:un?`transform ${In}ms ${mn}`:O==="opening"||Wt?`opacity ${In}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},Vt=(k,Le)=>{const Me=st(k);return Me?u0(no(Me,Le,M),Le,M):null},Gt=k=>Le=>{if(!l){if(I.current){I.current=!1;return}Le.stopPropagation(),xt(k)}},Ht=Ve?Vt(Ve,"left"):null,Dt=Ie?Vt(Ie,"right"):null,_t=Ht?hr(Ht,M):null,St=Dt?hr(Dt,M):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:O==="open"?"none":void 0},onClick:Jt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?rn:0,transition:fe?"none":`opacity ${In}ms ${mn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Ct?1:0,transition:fe?"none":`opacity ${In}ms ${mn}`,pointerEvents:"none"},children:a.jsx($d,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Ct&&Xe&&a.jsx(fr,{media:Xe,style:Mt(Xe,"left","far"),onMeasure:Ge,onTransitionEnd:Ee},`far-prev-${Xe.url}`),Ct&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(fr,{media:Ve,style:Mt(Ve,"left"),onMeasure:Ge,onTransitionEnd:Ee},`prev-${Ve.url}`),_t&&a.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:l||fe?"default":"pointer",pointerEvents:l||fe?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),Ct&&Ie&&a.jsxs(a.Fragment,{children:[a.jsx(fr,{media:Ie,style:Mt(Ie,"right"),onMeasure:Ge,onTransitionEnd:Ee},`next-${Ie.url}`),St&&a.jsx("div",{style:{position:"absolute",top:St.top,left:St.left,width:St.width,height:St.height,cursor:l||fe?"default":"pointer",pointerEvents:l||fe?"none":"auto",zIndex:3},onClick:Gt(1)})]}),Ct&&Ze&&a.jsx(fr,{media:Ze,style:Mt(Ze,"right","far"),onMeasure:Ge,onTransitionEnd:Ee},`far-next-${Ze.url}`),de&&j&&(_e?a.jsx(g0,{src:j.url,phase:O,onMediaElement:Ft,wrapperStyle:zt,videoStyle:kt,onLoadedMetadata:vt,onTransitionEnd:Ee},`${n}-${j.url}`):a.jsx("img",{ref:Ft,src:j.url,alt:j.name,onLoad:vt,onTransitionEnd:Ee,style:zt},`${n}-${j.url}`))]})}const f0=20,y0=.18;function v0(e){return`
18693
+ `}const In=500,yo=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",e0=72,t0=50,n0=1e4,i0=650,o0=500;function r0(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Gd(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Nr(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 a0(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Gd(i,n):null}function s0(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 Co(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 sc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Co(e,i,n)}const l0=.03;function Xd(e){return e.width*l0}const Wa={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function yr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function lc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function c0(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function as(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function d0(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:as(e,t.width,t.height)}function u0(e,t){if(sa(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 p0(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 m0({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>sa(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function oo(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Xd(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function Or(e,t,n){const i=oo(e,t,n);return{...i,left:2*i.left-e.left}}function g0(e,t,n){const{left:i,width:o}=n,r=Xd(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function qd(e,t,n,i){const o=oo(e,"left",i),r=oo(e,"right",i),l=Or(e,"left",i),d=Or(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function h0(e,t,n,i){const{start:o,end:r}=qd(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function f0(e,t,n){const i=oo(e,t,n),o=Or(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function sa(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function y0({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function vr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return sa(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function v0({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:w,resolveCloseSourceRect:m,onClose:h,onPrev:f,onNext:x}){const C=s.useRef(null),y=s.useRef(null),S=s.useRef(null),B=s.useRef(new Map),[N,q]=s.useState(0),D=s.useRef(null),T=s.useRef(0),H=s.useRef(0),$=s.useRef("none"),I=s.useRef(!1),P=s.useRef(!1),E=s.useRef(!1),g=s.useRef(null),z=s.useRef(null),F=s.useRef(null),X=s.useRef(()=>{}),ie=s.useRef(null),L=s.useRef(null),_=s.useRef(null),V=s.useRef(!1),[ae,re]=s.useState(null),[M,se]=s.useState(Wa),[j,b]=s.useState(0),[k,G]=s.useState("opening"),[he,J]=s.useState(0),[ee,O]=s.useState(0),[Z,te]=s.useState(!1),[Le,ve]=s.useState(null),[Ie,pe]=s.useState(null),[oe,ye]=s.useState(null),[U,ce]=s.useState(!1),[le,Ce]=s.useState(null),[Fe,Ee]=s.useState(!1),Y=s.useRef(!1),[be,de]=s.useState(!1),[K,ue]=s.useState(!1),He=s.useRef(n),fe=s.useRef(void 0),Q=t[n],Je=Q?sa(Q):!1,Ne=ee!==0||Z,ct=!l&&(!r||!!d),Ke=c&&!l,ut=u.length>1,lt=s.useCallback((A,Pe)=>t.length<=1?null:t[(A+Pe+t.length)%t.length]??null,[t]),Ye=ut?Co(u,p,-1):lt(n,-1),Re=ut?Co(u,p,1):lt(n,1),We=Le===-1&&Ne?ut&&Ie!==null?Co(u,Ie,-1):oe!==null?lt(oe,-1):null:null,Be=Le===1&&Ne?ut&&Ie!==null?Co(u,Ie,1):oe!==null?lt(oe,1):null:null,Ue=We&&We.url!==(Ye==null?void 0:Ye.url)?We:null,ge=Be&&Be.url!==(Re==null?void 0:Re.url)?Be:null,xe=Ye&&Ke?(()=>{const A=ut?sc(u,p,-1):t.length>2?lt((n-1+t.length)%t.length,-1):null;return A&&A.url!==Ye.url?A:null})():null,_e=Re&&Ke?(()=>{const A=ut?sc(u,p,1):t.length>2?lt((n+1)%t.length,1):null;return A&&A.url!==Re.url?A:null})():null,Ze=Ue??xe,we=ge??_e,$e=s.useCallback((A,Pe,Ae)=>{if(!A||!Pe||!Ae)return;const Oe=B.current,at=Oe.get(A);(at==null?void 0:at.width)===Pe&&(at==null?void 0:at.height)===Ae||(Oe.set(A,{width:Pe,height:Ae}),q(Et=>Et+1))},[]),Xe=s.useCallback(A=>{if(!(A!=null&&A.url))return null;const Pe=B.current.get(A.url);return d0(y.current,Pe)},[N,j]),ze=s.useCallback(()=>{if(!Q)return;const A=Xe(Q);if(A){re(A);return}const Pe=y.current;Pe&&re(lc(Pe))},[Q,Xe]),Te=s.useCallback(A=>{if(ut){const Pe=u.length;pe((p+A+Pe)%Pe),ye(null);return}t.length>1&&(ye((n+A+t.length)%t.length),pe(null))},[ut,u.length,p,t.length,n]),Ve=s.useCallback(A=>{E.current=A,te(A)},[]),De=s.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),tt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{De(),Ve(!1)},yo+32)},[De,Ve]),nt=s.useCallback(()=>{const A=C.current;if(!A){se({left:0,top:0,width:typeof window<"u"?window.innerWidth:Wa.width,height:typeof window<"u"?window.innerHeight:Wa.height});return}const Pe=A.getBoundingClientRect();se({left:Pe.left,top:Pe.top,width:Pe.width,height:Pe.height})},[]),st=s.useCallback((A,Pe)=>{if(Ne){if(be&&!Z)return`translate(${ee}px, 0px)`;if(Z&&Le!==null){const Ae=Xe(A);if(!Ae)return;const{x:Oe,y:at}=h0(Ae,Pe,Le,M);return`translate(${Oe}px, ${at}px)`}if(Z)return"translate(0px, 0px)"}},[Ne,be,Z,ee,Le,M,Xe]),St=s.useCallback(()=>{const A=z.current;z.current=null,De(),Ve(!1),ve(null),pe(null),ye(null),O(0),de(!1),I.current=!1,H.current=0,$.current="none",A===-1?f():A===1&&x()},[De,Ve,f,x]),Bt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{z.current!==null&&St()},yo+32)},[De,St]),zt=s.useCallback(()=>{De(),z.current=null,Ve(!1),ve(null),pe(null),ye(null),O(0),de(!1),I.current=!1,H.current=0,$.current="none"},[De,Ve]),ft=s.useCallback(A=>{if(!(!Ke||!ae)){if(E.current){if(z.current===A){F.current=A,St();return}zt()}De(),Te(A),z.current=A,ve(A),Ve(!0),Bt()}},[Ke,ae,St,zt,De,Te,Ve,Bt]);X.current=ft;const wt=s.useCallback(()=>{ie.current=null,V.current=!1,L.current!==null&&(window.clearInterval(L.current),L.current=null),_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),jt=s.useCallback(A=>{L.current!==null&&window.clearInterval(L.current);const Pe=V.current?o0:i0;L.current=window.setInterval(()=>{X.current(A)},Pe)},[]),At=s.useCallback(A=>{ie.current!==A&&(wt(),ie.current=A,V.current=!1,X.current(A),jt(A),_.current=window.setTimeout(()=>{_.current=null,ie.current===A&&(V.current=!0,jt(A))},n0))},[wt,jt]),xt=s.useCallback(()=>{const A=y.current;if(!A)return;const Pe=Q==null?void 0:Q.url,Ae=Pe?B.current.get(Pe):void 0;if(Ae!=null&&Ae.width&&(Ae!=null&&Ae.height)){re(as(A,Ae.width,Ae.height));return}const Oe=S.current;if(Oe&&Pe&&(Oe.src===Pe||Oe.currentSrc===Pe)){const{width:Et,height:it}=c0(Oe);if(Et&&it){$e(Pe,Et,it),re(as(A,Et,it));return}}const at=lc(A);!at.width||!at.height||re(at)},[Q==null?void 0:Q.url,$e]),Ft=s.useCallback(A=>{if(S.current=A,!!A){if(A instanceof HTMLVideoElement){A.readyState>=1&&A.videoWidth>0&&xt();return}A.complete&&A.naturalWidth>0&&xt()}},[xt]),Nt=s.useCallback(()=>{nt(),xt(),b(A=>A+1)},[nt,xt]);s.useEffect(()=>{Nt();const A=y.current,Pe=C.current,Ae=new ResizeObserver(()=>Nt());return A&&Ae.observe(A),Pe&&Ae.observe(Pe),window.addEventListener("resize",Nt),()=>{Ae.disconnect(),window.removeEventListener("resize",Nt)}},[Nt,n,v]),s.useLayoutEffect(()=>{if(!Q)return;const A=S.current;if(A){if(A instanceof HTMLImageElement&&A.complete&&A.naturalWidth>0){xt();return}A instanceof HTMLVideoElement&&A.readyState>=1&&A.videoWidth>0&&xt()}},[Q==null?void 0:Q.url,n,xt]),s.useEffect(()=>{ze()},[ze,N]),s.useEffect(()=>{const A=new Set,Pe=[],Ae=Oe=>{!(Oe!=null&&Oe.url)||A.has(Oe.url)||(A.add(Oe.url),Pe.push(Oe))};t.forEach(Ae),u.forEach(Oe=>Oe.items.forEach(Ae)),Pe.forEach(Oe=>{B.current.has(Oe.url)||u0(Oe,$e)})},[t,u,$e]),s.useEffect(()=>{if(k!=="opening"||!ae)return;if(!w){G("open");return}ce(!1);const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ce(!0),G("open")})});return()=>cancelAnimationFrame(A)},[k,ae,w]),s.useEffect(()=>{if(k!=="closing")return;const A=setTimeout(()=>h(),In);return()=>clearTimeout(A)},[k,h]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{He.current===n&&fe.current===(Q==null?void 0:Q.url)||(De(),z.current=null,ve(null),pe(null),ye(null),J(0),O(0),Ve(!1),ue(!1),de(!1),T.current=0,H.current=0,$.current="none",I.current=!1,D.current=null,P.current=!1,S.current=null,ze(),He.current=n,fe.current=Q==null?void 0:Q.url)},[n,Q==null?void 0:Q.url,Ve,De,ze]),s.useLayoutEffect(()=>{const A=F.current;A!==null&&(F.current=null,requestAnimationFrame(()=>{X.current(A)}))},[n,p,Q==null?void 0:Q.url]),s.useLayoutEffect(()=>{if(k==="opening"){Y.current=!1,Ee(!1);return}if(k!=="open"||Y.current)return;if(!Ye&&!Re){Y.current=!0;return}Ee(!1);const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ee(!0),Y.current=!0})});return()=>cancelAnimationFrame(A)},[k,Ye==null?void 0:Ye.url,Re==null?void 0:Re.url]),s.useEffect(()=>{if(k!=="open")return;const A=()=>{const it=vt=>{vt.stopPropagation(),vt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0)},Pe=it=>{const vt=it<0?1:-1;De(),Te(vt),z.current=vt,ve(vt),Ve(!0),Bt()},Ae=it=>{if(Math.abs(it)>t0&&Ke){Pe(it);return}z.current=null,ve(null),pe(null),ye(null),Ve(!0),O(0),tt()},Oe=it=>{if(it.touches.length!==1||E.current)return;const vt=it.touches[0];P.current=!0,D.current={x:vt.clientX,y:vt.clientY},$.current="none",H.current=0,I.current=!1},at=it=>{if(!D.current||it.touches.length!==1||E.current)return;const vt=it.touches[0],Ot=vt.clientX-D.current.x,It=vt.clientY-D.current.y;if($.current==="none"){if(Math.abs(Ot)<10&&Math.abs(It)<10)return;if(Math.abs(Ot)>Math.abs(It)){if(!Ke)return;$.current="horizontal"}else if(It>0){if(!ct)return;$.current="vertical"}else return}if($.current==="horizontal"){I.current=!0,de(!0),H.current=Ot,O(Ot),it.preventDefault();return}$.current==="vertical"&&(I.current=!0,de(!0),T.current=It,J(It),it.preventDefault())},Et=()=>{if(!D.current)return;const it=$.current,vt=I.current;if(vt&&it==="horizontal")Ae(H.current),A();else if(vt&&it==="vertical"){const Ot=T.current;if(ct&&Ot>e0){const It=window.innerHeight;T.current=It,ue(!0),J(It),G("closing")}else T.current=0,J(0);A()}else it==="horizontal"&&Math.abs(H.current)>0&&(Ae(H.current),A());D.current=null,$.current="none",H.current=0,I.current=!1,de(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[k,Ke,Ve,tt,De,ct,Bt,Te]);const Kt=s.useCallback(()=>{const A=(m==null?void 0:m())??w??null;A&&ae&&(Ce(A),ce(!0)),G("closing")},[m,w,ae]);s.useEffect(()=>{const A=Oe=>{if(Oe.key==="Escape"){if(r&&d||k==="closing")return;wt(),Kt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||k!=="open"||!Ke)return;Oe.preventDefault();const at=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&ie.current===at||At(at)},Pe=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const at=Oe.key==="ArrowLeft"?-1:1;ie.current===at&&wt()},Ae=()=>{wt()};return window.addEventListener("keydown",A),window.addEventListener("keyup",Pe),window.addEventListener("blur",Ae),()=>{window.removeEventListener("keydown",A),window.removeEventListener("keyup",Pe),window.removeEventListener("blur",Ae),wt()}},[k,r,d,Kt,Ke,At,wt]),s.useEffect(()=>{k!=="open"&&wt()},[k,wt]);const Jt=()=>{k==="closing"||l||Kt()},Tt=k==="open",Wt=k==="closing",rn=he>0?Math.max(0,1-he/500):1,gt=he>0?Math.max(.35,1-he/500):1,ke=s.useCallback(A=>{if(!(A.propertyName!=="transform"||!E.current)){if(z.current!==null){St();return}De(),Ve(!1)}},[De,Ve,St]),Ge=k==="closing"?le??w:w,rt=Ge&&ae&&(k==="opening"||Wt)?r0(Ge,ae):void 0,ht=Ne&&Q?st(Q,"center"):he>0?`translateY(${he}px)`:rt,yt=ae?yr(ae,M):null,Lt=!!(Ge&&ae),mt=Lt&&(k==="closing"||k==="open"&&U),Vt={position:"absolute",top:yt==null?void 0:yt.top,left:yt==null?void 0:yt.left,width:yt==null?void 0:yt.width,height:yt==null?void 0:yt.height,objectFit:"contain",transformOrigin:"top left",transform:ht,opacity:he>0?gt:Lt?1:k==="opening"||Wt?0:1,transition:be&&!Z?"none":Z?`transform ${yo}ms ${mn}`:K?`transform ${In}ms ${mn}, opacity ${In}ms ${mn}`:mt?`transform ${In}ms ${mn}`:k==="opening"||Wt?`opacity ${In}ms ${mn}`:"none",pointerEvents:Je&&Tt&&!Ne?"auto":"none",touchAction:Je&&Tt?"none":void 0,zIndex:1,overflow:Je?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Tt&&!Ne?"auto":"none"},Mt=(A,Pe,Ae="adjacent")=>{const Oe=Xe(A);if(!Oe)return{display:"none"};const at=Ae==="far"?Pe==="left"?"far-left":"far-right":Pe==="left"?"left-adjacent":"right-adjacent",{start:Et}=Le!==null?qd(Oe,at,Le,M):{start:Ae==="far"?Or(Oe,Pe,M):oo(Oe,Pe,M)},it=yr(Et,M),vt=st(A,at),Ot=!Ne&&Ae==="adjacent"&&Tt&&!Fe?f0(Oe,Pe,M):null,It=Ae==="far"&&Ne&&Le===(Pe==="left"?-1:1),nn=be&&!Z?!1:Z,un=Ae==="adjacent"&&Tt&&Fe&&!Ne;return{position:"absolute",top:it.top,left:it.left,width:it.width,height:it.height,objectFit:"contain",transform:vt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Ae==="far"?Tt&&It?1:0:Tt?1:0,transition:nn?Ae==="far"?`transform ${yo}ms ${mn}`:`transform ${yo}ms ${mn}, opacity ${In}ms ${mn}`:un?`transform ${In}ms ${mn}`:k==="opening"||Wt?`opacity ${In}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},Xt=(A,Pe)=>{const Ae=Xe(A);return Ae?g0(oo(Ae,Pe,M),Pe,M):null},qt=A=>Pe=>{if(!l){if(P.current){P.current=!1;return}Pe.stopPropagation(),ft(A)}},Ht=Ye?Xt(Ye,"left"):null,Dt=Re?Xt(Re,"right"):null,_t=Ht?yr(Ht,M):null,Ct=Dt?yr(Dt,M):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:k==="open"?"none":void 0},onClick:Jt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Tt?rn:0,transition:be?"none":`opacity ${In}ms ${mn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Tt?1:0,transition:be?"none":`opacity ${In}ms ${mn}`,pointerEvents:"none"},children:a.jsx(Rd,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Tt&&Ze&&a.jsx(vr,{media:Ze,style:Mt(Ze,"left","far"),onMeasure:$e,onTransitionEnd:ke},`far-prev-${Ze.url}`),Tt&&Ye&&a.jsxs(a.Fragment,{children:[a.jsx(vr,{media:Ye,style:Mt(Ye,"left"),onMeasure:$e,onTransitionEnd:ke},`prev-${Ye.url}`),_t&&a.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:l||be?"default":"pointer",pointerEvents:l||be?"none":"auto",zIndex:3},onClick:qt(-1)})]}),Tt&&Re&&a.jsxs(a.Fragment,{children:[a.jsx(vr,{media:Re,style:Mt(Re,"right"),onMeasure:$e,onTransitionEnd:ke},`next-${Re.url}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||be?"default":"pointer",pointerEvents:l||be?"none":"auto",zIndex:3},onClick:qt(1)})]}),Tt&&we&&a.jsx(vr,{media:we,style:Mt(we,"right","far"),onMeasure:$e,onTransitionEnd:ke},`far-next-${we.url}`),ae&&Q&&(Je?a.jsx(y0,{src:Q.url,phase:k,onMediaElement:Ft,wrapperStyle:Vt,videoStyle:kt,onLoadedMetadata:xt,onTransitionEnd:ke},`${n}-${Q.url}`):a.jsx("img",{ref:Ft,src:Q.url,alt:Q.name,onLoad:xt,onTransitionEnd:ke,style:Vt},`${n}-${Q.url}`))]})}const x0=20,b0=.18;function w0(e){return`
18694
18694
  .${e}-wrapper {
18695
18695
  box-sizing: border-box;
18696
18696
  max-width: 100%;
@@ -18777,8 +18777,8 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18777
18777
  z-index: 2;
18778
18778
  pointer-events: auto;
18779
18779
  }
18780
- ${Kx(e)}
18781
- `}function x0(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,d=i?o:r;return d>0?l/d:1}function b0(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 w0(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:H.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:H.scalingValue(i*y0,n??!1),[`--${t}-image-aspect`]:x0(e)}}function S0(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 Yt(n,t)}function $0(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 C0(e,t,n,i,o,r){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);r(n,d?Bd(d,o):void 0)}}function T0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=H.useScopedStyles(),c=s.useMemo(()=>v0(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",x=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,b=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,g=H.scalingValue(b,n??!1),h=`max(${g}, ${f0}px)`,{objectFitMode:f,imageStyle:v}=$0(e),C=S0(e,n),y=s.useRef(null),[T,W]=s.useState(!1),[_,X]=s.useState([]),[D,w]=s.useState(0),[R,m]=s.useState(0),[E,I]=s.useState(null),[J,A]=s.useState({title1:"",title2:"",title3:""}),Q=(!n||i)&&!T,q=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},Y=q.sizeType??"none",oe=Q&&Y!=="none"?`${d}-item-image-hover-${Y}`:void 0,L=(q.value??120)/100,N=s.useCallback(ae=>{!ae||Y!=="scale"||(ae.style.transformOrigin=xg(ae))},[Y]),V=s.useCallback(ae=>{if(ae){if(f==="contain"){const Z=b0(ae);if(Z){const B=ae.closest(`.${d}-item-image`);B instanceof HTMLElement&&B.style.setProperty(`--${d}-item-media-aspect`,String(Z))}}N(ae)}},[d,N,f]),de={width:H.scalingValue(x,n??!1),...C,...w0(e,d,n),[`--${d}-image-hover-scale`]:String(L)},re=(()=>{const ae={},Z=y.current?getComputedStyle(y.current).getPropertyValue("--cntrl-article-width").trim():"";return Z&&(ae["--cntrl-article-width"]=Z),ae})(),M=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),S=s.useMemo(()=>o0(u),[u]),$=s.useMemo(()=>c0(u),[u]),F=(ae,Z)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const B=S.findIndex($e=>$e.gridIndex===ae);if(B<0)return;const G=S[B];m(B),X(G.items),w(0),A(G.entry),I(Z??null),W(!0)},O=s.useCallback(()=>{W(!1),I(null)},[]),te=s.useCallback(()=>{const ae=S[R];return!ae||!y.current?E:i0(y.current,ae.gridIndex,f)??E},[S,R,E,f]),xe=s.useCallback(ae=>{if(S.length>1){const Z=S.length,B=(R+ae+Z)%Z,G=S[B];m(B),X(G.items),w(0),A(G.entry);return}w(Z=>(Z+ae+_.length)%_.length)},[S,R,_.length]),ne=S.length>1||_.length>1;return s.useEffect(()=>{if(!T||typeof document>"u")return;const ae=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ae}},[T]),s.useEffect(()=>{!n||o||i||W(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&W(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx(d0,{mediaList:$}),a.jsx("div",{ref:y,className:`${d}-wrapper ${d}-type-${p}`,style:de,children:u.map((ae,Z)=>{var $e,he;const B=!!(($e=ae.image)!=null&&$e.url),G=C0(!!M,B,Z,d,f,F);return a.jsxs("div",{className:`${d}-item`,children:[ae.title?a.jsx("span",{className:`${d}-item-title`,onClick:G,style:G?{cursor:"pointer"}:void 0,children:ae.title}):null,(he=ae.image)!=null&&he.url?a.jsx("span",{className:[`${d}-item-image`,f==="contain"?`${d}-item-image-fit`:void 0,oe].filter(Boolean).join(" "),children:ae.image.type==="video"?a.jsx("video",{ref:V,src:ae.image.url,"data-waterfall-index":Z,style:v,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:G,onLoadedData:Re=>V(Re.currentTarget)}):a.jsx("img",{ref:V,src:ae.image.url,alt:ae.image.name??"","data-waterfall-index":Z,style:v,onClick:G,onLoad:Re=>V(Re.currentTarget)})}):null,Z<u.length-1&&a.jsx("div",{className:`${d}-item-gap-host`,style:{width:g},children:o&&!T&&a.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:h,height:"100%"}})})]},Z)})}),T&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ae=(l?document.getElementById(l):null)??document.body;return Bn.createPortal(a.jsx("div",{style:re,"data-selection":"none",children:a.jsx(h0,{prefix:d,items:_,index:D,entry:J,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ne,lightboxEntries:S,entryIdx:R,layoutId:r,sourceRect:E,resolveCloseSourceRect:te,onClose:O,onPrev:()=>xe(-1),onNext:()=>xe(1)})}),ae)})()]})}const I0=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18780
+ ${Qx(e)}
18781
+ `}function S0(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,d=i?o:r;return d>0?l/d:1}function C0(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 $0(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:W.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:W.scalingValue(i*b0,n??!1),[`--${t}-image-aspect`]:S0(e)}}function T0(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 Ut(n,t)}function I0(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 R0(e,t,n,i,o,r){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);r(n,d?Gd(d,o):void 0)}}function L0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=W.useScopedStyles(),c=s.useMemo(()=>w0(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",v=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,w=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=W.scalingValue(w,n??!1),h=`max(${m}, ${x0}px)`,{objectFitMode:f,imageStyle:x}=I0(e),C=T0(e,n),y=s.useRef(null),[S,B]=s.useState(!1),[N,q]=s.useState([]),[D,T]=s.useState(0),[H,$]=s.useState(0),[I,P]=s.useState(null),[E,g]=s.useState({title1:"",title2:"",title3:""}),z=(!n||i)&&!S,F=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},X=F.sizeType??"none",ie=z&&X!=="none"?`${d}-item-image-hover-${X}`:void 0,L=(F.value??120)/100,_=s.useCallback(ee=>{!ee||X!=="scale"||(ee.style.transformOrigin=Sg(ee))},[X]),V=s.useCallback(ee=>{if(ee){if(f==="contain"){const O=C0(ee);if(O){const Z=ee.closest(`.${d}-item-image`);Z instanceof HTMLElement&&Z.style.setProperty(`--${d}-item-media-aspect`,String(O))}}_(ee)}},[d,_,f]),ae={width:W.scalingValue(v,n??!1),...C,...$0(e,d,n),[`--${d}-image-hover-scale`]:String(L)},re=(()=>{const ee={},O=y.current?getComputedStyle(y.current).getPropertyValue("--cntrl-article-width").trim():"";return O&&(ee["--cntrl-article-width"]=O),ee})(),M=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),se=s.useMemo(()=>s0(u),[u]),j=s.useMemo(()=>p0(u),[u]),b=(ee,O)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const Z=se.findIndex(Le=>Le.gridIndex===ee);if(Z<0)return;const te=se[Z];$(Z),q(te.items),T(0),g(te.entry),P(O??null),B(!0)},k=s.useCallback(()=>{B(!1),P(null)},[]),G=s.useCallback(()=>{const ee=se[H];return!ee||!y.current?I:a0(y.current,ee.gridIndex,f)??I},[se,H,I,f]),he=s.useCallback(ee=>{if(se.length>1){const O=se.length,Z=(H+ee+O)%O,te=se[Z];$(Z),q(te.items),T(0),g(te.entry);return}T(O=>(O+ee+N.length)%N.length)},[se,H,N.length]),J=se.length>1||N.length>1;return s.useEffect(()=>{if(!S||typeof document>"u")return;const ee=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ee}},[S]),s.useEffect(()=>{!n||o||i||B(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&B(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx(m0,{mediaList:j}),a.jsx("div",{ref:y,className:`${d}-wrapper ${d}-type-${p}`,style:ae,children:u.map((ee,O)=>{var Le,ve;const Z=!!((Le=ee.image)!=null&&Le.url),te=R0(!!M,Z,O,d,f,b);return a.jsxs("div",{className:`${d}-item`,children:[ee.title?a.jsx("span",{className:`${d}-item-title`,onClick:te,style:te?{cursor:"pointer"}:void 0,children:ee.title}):null,(ve=ee.image)!=null&&ve.url?a.jsx("span",{className:[`${d}-item-image`,f==="contain"?`${d}-item-image-fit`:void 0,ie].filter(Boolean).join(" "),children:ee.image.type==="video"?a.jsx("video",{ref:V,src:ee.image.url,"data-waterfall-index":O,style:x,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:te,onLoadedData:Ie=>V(Ie.currentTarget)}):a.jsx("img",{ref:V,src:ee.image.url,alt:ee.image.name??"","data-waterfall-index":O,style:x,onClick:te,onLoad:Ie=>V(Ie.currentTarget)})}):null,O<u.length-1&&a.jsx("div",{className:`${d}-item-gap-host`,style:{width:m},children:o&&!S&&a.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:h,height:"100%"}})})]},O)})}),S&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ee=(l?document.getElementById(l):null)??document.body;return zn.createPortal(a.jsx("div",{style:re,"data-selection":"none",children:a.jsx(v0,{prefix:d,items:N,index:D,entry:E,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:J,lightboxEntries:se,entryIdx:H,layoutId:r,sourceRect:I,resolveCloseSourceRect:G,onClose:k,onPrev:()=>he(-1),onNext:()=>he(1)})}),ee)})()]})}const P0=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18782
18782
  import type React from 'react';
18783
18783
  import { createPortal } from 'react-dom';
18784
18784
  import { CommonComponentProps } from '../props';
@@ -19292,7 +19292,7 @@ export function Waterfall({
19292
19292
  </>
19293
19293
  );
19294
19294
  }
19295
- `,R0="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>'),Xn={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 L0(e){const t={};return t[tt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[tt(e,"fontSettings")]={...Xn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[tt(e,"fontSize")]={...Xn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[tt(e,"lineHeight")]={...Xn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[tt(e,"letterSpacing")]={...Xn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[tt(e,"wordSpacing")]={...Xn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[tt(e,"textAlign")]={...Xn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[tt(e,"textAppearance")]={...Xn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const io=ni.filter(e=>e!=="count"),P0=io.reduce((e,t)=>({...e,...L0(t)}),{}),E0=io.reduce((e,t)=>({...e,[tt(t,"fontFamily")]:"Arial",[tt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[tt(t,"letterSpacing")]:0,[tt(t,"wordSpacing")]:0,[tt(t,"textAlign")]:"left",[tt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Wa(e){return io.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[tt(n,"fontSize")]=i),o!==void 0&&(t[tt(n,"lineHeight")]=o),t},{})}const M0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(io.map(e=>[Ns[e],Ws(e)]))},yr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},k0=[{title:"Salton Sea from Above",...yr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...yr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...yr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...yr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],A0={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:k0},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:{...Xn.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"]}}},...P0},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:R0,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...E0},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,...Wa({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,...Wa({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,...Wa({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:[M0]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},F0={element:T0,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"},...io.map(e=>({path:`${tt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...io.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${tt(t,"fontFamily")}`}),{})},schema:A0,sourceCode:I0},Vi=500,Vd="cubic-bezier(0.25, 1, 0.5, 1)",_0=300,N0=5,W0=.15,H0=.4,D0=100,ki=100,rc={color:"#000000",hover:"#cccccc"},fo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},O0={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}},Ha={offset:{x:0,y:0},linkColor:"#cccccc"},ac={sizeType:"drag",value:3},B0="left";function z0(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:B0,color:(e==null?void 0:e.titleColor)??"#000000"};return Yt(n,t)}function Ai(e,t,n){return`${e}: ${H.scalingValue(t/1440,n)};`}function So(e,t){return t<=0?0:(e%t+t)%t}function j0(e,t,n,i){if(!i)return{position:So(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function V0(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function G0(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,x)=>{n.style.transform=`translate(${p}px, ${x}px)`;const b=n.getBoundingClientRect();return{x:b.left,y:b.top}},o=i(0,0),r=i(ki,0),l=i(0,ki);e.removeChild(n);const d={x:(r.x-o.x)/ki,y:(r.y-o.y)/ki},c={x:(l.x-o.x)/ki,y:(l.y-o.y)/ki},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function X0(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function q0(e,t){return`
19295
+ `,E0="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),qn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function M0(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...qn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...qn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...qn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...qn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...qn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...qn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...qn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ro=ii.filter(e=>e!=="count"),k0=ro.reduce((e,t)=>({...e,...M0(t)}),{}),A0=ro.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Arial",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ha(e){return ro.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const F0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ro.map(e=>[Os[e],Bs(e)]))},xr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},_0=[{title:"Salton Sea from Above",...xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],N0={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:_0},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:{...qn.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"]}}},...k0},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:E0,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...A0},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,...Ha({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,...Ha({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,...Ha({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:[F0]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},W0={element:L0,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"},...ro.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...ro.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})},schema:N0,sourceCode:P0},Xi=500,Yd="cubic-bezier(0.25, 1, 0.5, 1)",H0=300,D0=5,O0=.15,B0=.4,z0=100,Fi=100,cc={color:"#000000",hover:"#cccccc"},vo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},j0={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}},Da={offset:{x:0,y:0},linkColor:"#cccccc"},dc={sizeType:"drag",value:3},V0="left";function G0(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:V0,color:(e==null?void 0:e.titleColor)??"#000000"};return Ut(n,t)}function _i(e,t,n){return`${e}: ${W.scalingValue(t/1440,n)};`}function $o(e,t){return t<=0?0:(e%t+t)%t}function X0(e,t,n,i){if(!i)return{position:$o(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function q0(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function Y0(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,v)=>{n.style.transform=`translate(${p}px, ${v}px)`;const w=n.getBoundingClientRect();return{x:w.left,y:w.top}},o=i(0,0),r=i(Fi,0),l=i(0,Fi);e.removeChild(n);const d={x:(r.x-o.x)/Fi,y:(r.y-o.y)/Fi},c={x:(l.x-o.x)/Fi,y:(l.y-o.y)/Fi},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function U0(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function K0(e,t){return`
19296
19296
  .${e}-wrapper {
19297
19297
  position: relative;
19298
19298
  width: 100%;
@@ -19364,7 +19364,7 @@ export function Waterfall({
19364
19364
  top: 0;
19365
19365
  left: 0;
19366
19366
  opacity: 0;
19367
- transition: opacity ${Vi}ms ${Vd};
19367
+ transition: opacity ${Xi}ms ${Yd};
19368
19368
  }
19369
19369
  .${e}-list-fade .${e}-slide.${e}-is-active {
19370
19370
  opacity: 1;
@@ -19391,29 +19391,29 @@ export function Waterfall({
19391
19391
  top: 50%;
19392
19392
  z-index: 1;
19393
19393
  padding: 0;
19394
- ${Ai("width",30,t)}
19395
- ${Ai("height",30,t)}
19394
+ ${_i("width",30,t)}
19395
+ ${_i("height",30,t)}
19396
19396
  transition: opacity 0.15s ease-in-out;
19397
19397
  }
19398
19398
  .${e}-arrow-prev {
19399
- ${Ai("left",-20,t)}
19399
+ ${_i("left",-20,t)}
19400
19400
  transform: translate3d(-50%, -50%, 0);
19401
19401
  }
19402
19402
  .${e}-arrow-next {
19403
19403
  left: unset;
19404
- ${Ai("right",-20,t)}
19404
+ ${_i("right",-20,t)}
19405
19405
  transform: translate3d(50%, -50%, 0);
19406
19406
  }
19407
19407
  .${e}-arrow-prev-vertical {
19408
19408
  left: 50%;
19409
- ${Ai("top",-20,t)}
19409
+ ${_i("top",-20,t)}
19410
19410
  transform: translate3d(-50%, -50%, 0);
19411
19411
  }
19412
19412
  .${e}-arrow-next-vertical {
19413
19413
  left: 50%;
19414
19414
  right: unset;
19415
19415
  top: unset;
19416
- ${Ai("bottom",-20,t)}
19416
+ ${_i("bottom",-20,t)}
19417
19417
  transform: translate3d(-50%, 50%, 0);
19418
19418
  }
19419
19419
  .${e}-arrow-hidden {
@@ -19549,10 +19549,10 @@ export function Waterfall({
19549
19549
  object-fit: cover;
19550
19550
  }
19551
19551
  .${e}-transition-reveal .${e}-slide.${e}-is-active .${e}-slider-image {
19552
- animation: ${e}-reveal-horizontal ${Vi}ms ease;
19552
+ animation: ${e}-reveal-horizontal ${Xi}ms ease;
19553
19553
  }
19554
19554
  .${e}-transition-reveal-vertical .${e}-slide.${e}-is-active .${e}-slider-image {
19555
- animation: ${e}-reveal-vertical ${Vi}ms ease;
19555
+ animation: ${e}-reveal-vertical ${Xi}ms ease;
19556
19556
  }
19557
19557
  @keyframes ${e}-reveal-horizontal {
19558
19558
  from { clip-path: inset(0 100% 0 0); }
@@ -19562,7 +19562,7 @@ export function Waterfall({
19562
19562
  from { clip-path: inset(100% 0 0 0); }
19563
19563
  to { clip-path: inset(0 0 0 0); }
19564
19564
  }
19565
- `}function Y0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=H.useScopedStyles(),l=z0(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??ac,p=u.sizeType??"drag",x=u.value??ac.value,b=(e==null?void 0:e.direction)??"horizontal",g=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",f=(e==null?void 0:e.navSize)??"m",v=O0[f],C=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,y=Ie=>H.scalingValue(Ie*C,n),T=(e==null?void 0:e.show)??"always",W=(e==null?void 0:e.controls)??null,_=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,X=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,D=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,w=(e==null?void 0:e.controlsColor)??rc.color,R=(e==null?void 0:e.controlsHoverColor)??rc.hover,m=(e==null?void 0:e.navColor)??fo.colors.inactive,E=(e==null?void 0:e.navPaginationColor)??fo.colors.pagination,I=(e==null?void 0:e.navBackgroundColor)??fo.colors.background,J=(e==null?void 0:e.linkColor)??Ha.linkColor,A=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,Q=b==="horizontal",q=p==="click",Y=p==="drag",oe=p==="auto"&&(!n||!!i),L=!n,N=g==="slide",V=h==="classic",de=T!=="never",re=T==="on hover",M=H.scalingValue(_,n),S={width:M,height:M,maxWidth:M},$=N&&c>1,[F,O]=s.useState(0),[te,xe]=s.useState($?1:0),[ne,ae]=s.useState(!1),[Z,B]=s.useState(!1),[G,$e]=s.useState(!1),[he,Re]=s.useState(0),[ge,ye]=s.useState(!1),[Se,ee]=s.useState(!1),ce=s.useRef(!1),ue=s.useRef(te);ue.current=te;const Te=s.useRef(null),ke=s.useRef(0),Ce=s.useRef(null),U=s.useRef(null),fe=s.useRef(null),me=s.useRef(null),K=s.useCallback(Ie=>{ce.current=Ie,ae(Ie)},[]),z=s.useCallback(Ie=>{if(c<2||Ie===0)return;const Ne=Ie>0?1:-1,Oe=Math.abs(Ie);if(ye(!0),K(!0),!N){O(Ze=>So(Ze+Ie,c));return}let Ue=ue.current;const pe=$&&(Ue===0||Ue===c+1),we=pe?F+1:null;pe&&(Ue=F+1);let Ae=Oe;for(;Ae>0;){const Ze=j0(Ue,Ne,c,$);if(Ue=Ze.position,Ae-=1,Ze.hitBoundary){ke.current=Ae*Ne;break}}const Xe=Oe-Ae;if(Xe>0&&O(Ze=>So(Ze+Xe*Ne,c)),ue.current=Ue,we!==null){if(ue.current=we,Ue===we){B(!0),xe(Ue);return}Te.current=Ue,B(!0),xe(we);return}B(!1),xe(Ue)},[F,c,$,N,K]),be=s.useCallback(Ie=>{z(Ie)},[z]),se=s.useCallback(Ie=>{if(c<2)return;const Ne=So(Ie,c);if(!(Ne===F&&!ce.current)&&(ye(!0),K(!0),O(Ne),N)){const Oe=Ne+($?1:0);Te.current=null,ke.current=0,ue.current=Oe,B(!1),xe(Oe)}},[F,c,$,N,K]);s.useEffect(()=>{if(!ne)return;const Ie=window.setTimeout(()=>{if($&&(te===0||te===c+1)){Te.current=null,B(!0),xe(F+1);return}K(!1)},Vi);return()=>window.clearTimeout(Ie)},[F,c,$,ne,K,te]),s.useEffect(()=>{if(!Z)return;let Ie=0;const Ne=requestAnimationFrame(()=>{Ie=requestAnimationFrame(()=>{const Oe=Te.current;Te.current=null;const Ue=ke.current;if(ke.current=0,B(!1),Oe!==null){ue.current=Oe,xe(Oe);return}if(Ue!==0){z(Ue);return}K(!1)})});return()=>{cancelAnimationFrame(Ne),cancelAnimationFrame(Ie)}},[z,K,Z]);const j=`${$}:${c}`,_e=s.useRef(j);s.useEffect(()=>{if(_e.current===j)return;_e.current=j;const Ie=c>0?Math.min(F,c-1):0;fe.current=null,me.current=null,$e(!1),Re(0),O(Ie),B(!0),xe(Ie+($?1:0))},[F,c,$,j]),s.useEffect(()=>{if(!ge)return;const Ie=window.setTimeout(()=>ye(!1),_0);return()=>window.clearTimeout(Ie)},[ge,F]),s.useEffect(()=>{if(!oe||c<2)return;const Ie=Math.max(x,.1)*1e3,Ne=window.setInterval(()=>{L&&Se||be(1)},Ie);return()=>window.clearInterval(Ne)},[x,c,be,oe,Se,L]);const We=s.useCallback(Ie=>{const Ne=fe.current;if(!Ne||Ne.pointerId!==Ie.pointerId)return;fe.current=null,me.current=null;const Oe=Ce.current;if(Oe!=null&&Oe.hasPointerCapture(Ie.pointerId)&&Oe.releasePointerCapture(Ie.pointerId),!Ne.isActive){N&&Re(0);return}const pe=!(Ie.timeStamp-Ne.lastTime>D0)&&Math.abs(Ne.velocity)>H0,we=Ne.size>0&&Math.abs(Ne.offset-Ne.baseOffset)>Ne.size*W0;if($e(!1),!pe&&!we){Re(0);return}const Ae=we?Ne.offset-Ne.baseOffset:Ne.velocity;let Xe=1;we&&Ne.size>0&&(Xe=Math.max(1,Math.round(Math.abs(Ae)/Ne.size))),Re(0),z(Ae<0?Xe:-Xe)},[z,N]);s.useEffect(()=>{const Ie=Ne=>{me.current===null||Ne.pointerId!==me.current||We(Ne)};return window.addEventListener("pointerup",Ie),window.addEventListener("pointercancel",Ie),()=>{window.removeEventListener("pointerup",Ie),window.removeEventListener("pointercancel",Ie)}},[We]);const lt=Ie=>{const Ne=Ce.current;if(!Y||c<2||!Ne||Ie.pointerType==="mouse"&&Ie.button!==0)return;Te.current=null,ke.current=0,ce.current&&K(!1);let Oe=0;const Ue=U.current;if(N&&Ue){const pe=Q?Ue.offsetWidth:Ue.offsetHeight;if(pe>0){const we=V0(Ue,Q);let Ae=ue.current;$&&(Ae===0||Ae===c+1)?(Ae=F+1,ue.current=Ae,B(!0),xe(Ae),Oe=0):Oe=we+Ae*pe,Re(Oe)}}Ne.setPointerCapture(Ie.pointerId),me.current=Ie.pointerId,fe.current={pointerId:Ie.pointerId,startClientX:Ie.clientX,startClientY:Ie.clientY,axes:G0(Ne,`${r}-axis-probe`),size:Q?Ne.offsetWidth:Ne.offsetHeight,isActive:!1,baseOffset:Oe,offset:Oe,lastTime:Ie.timeStamp,velocity:0}},Je=Ie=>{const Ne=fe.current;if(!Ne||Ne.pointerId!==Ie.pointerId)return;if(Ie.pointerType==="mouse"&&Ie.buttons===0){We(Ie);return}const Oe=Ie.clientX-Ne.startClientX,Ue=Ie.clientY-Ne.startClientY,pe=Ne.axes?X0(Ne.axes,Oe,Ue):{x:Oe,y:Ue},we=Q?pe.x:pe.y,Ae=Q?pe.y:pe.x,Xe=Ne.baseOffset+we;if(!Ne.isActive){if(Math.max(Math.abs(we),Math.abs(Ae))<N0)return;if(Math.abs(Ae)>Math.abs(we)){const Ge=Ce.current;Ge!=null&&Ge.hasPointerCapture(Ne.pointerId)&&Ge.releasePointerCapture(Ne.pointerId),fe.current=null,me.current=null,N&&Re(0);return}Ne.isActive=!0,$e(!0)}const Ze=Ie.timeStamp-Ne.lastTime;Ze>0&&(Ne.velocity=(Xe-Ne.offset)/Ze,Ne.lastTime=Ie.timeStamp),Ne.offset=Xe,N&&Re(Xe)},ct=Ie=>{We(Ie)},it=Q?`translate3d(calc(${-te*100}% + ${he}px), 0, 0)`:`translate3d(0, calc(${-te*100}% + ${he}px), 0)`,Ve=$?[d[c-1],...d,d[0]]:d;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:q0(r,n)}}),a.jsxs("div",{className:pt(`${r}-wrapper`,{[`${r}-transition-reveal`]:g==="reveal",[`${r}-transition-reveal-vertical`]:g==="reveal"&&!Q}),onMouseEnter:()=>ee(!0),onMouseLeave:()=>ee(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:Ce,className:pt(`${r}-track`,{[`${r}-track-draggable`]:Y,[`${r}-track-draggable-vertical`]:Y&&!Q}),onPointerDown:lt,onPointerMove:Je,onPointerUp:ct,onPointerCancel:ct,onLostPointerCapture:Ie=>{me.current===Ie.pointerId&&We(Ie)},children:a.jsx("div",{ref:U,className:pt(`${r}-list`,{[`${r}-list-slide`]:N,[`${r}-list-slide-vertical`]:N&&!Q,[`${r}-list-fade`]:!N}),style:N?{transform:it,transition:G||Z?"none":`transform ${Vi}ms ${Vd}`}:void 0,children:Ve.map((Ie,Ne)=>{const Oe=$?So(Ne-1,c):Ne,pe=$&&(Ne===0||Ne===c+1)?`clone-${Ne===0?"start":"end"}`:`slide-${Oe}`;return a.jsx("div",{className:pt(`${r}-slide`,{[`${r}-is-active`]:!N&&Oe===F}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:pt(`${r}-slider-image`,{[`${r}-contain`]:Ie.image.objectFit==="contain",[`${r}-cover`]:Ie.image.objectFit==="cover"}),src:Ie.image.url,alt:Ie.image.name??"",draggable:!1})})})},pe)})})}),de&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(`${r}-arrow`,{[`${r}-arrow-prev`]:Q,[`${r}-arrow-prev-vertical`]:!Q,[`${r}-hover-arrow`]:re}),style:{color:w,"--arrow-hover-color":R,...S},children:a.jsxs("button",{onClick:Ie=>{Ie.stopPropagation(),be(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${H.scalingValue(X,n)}, ${H.scalingValue(D*(Q?1:-1),n)}) rotate(${Q?"0deg":"90deg"})`},children:[W&&a.jsx(sn,{url:W,fill:w,hoverFill:R,className:pt(`${r}-arrow-img`,`${r}-mirror`),style:S}),!W&&a.jsx(sc,{color:w,className:pt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:pt(`${r}-arrow`,{[`${r}-arrow-next`]:Q,[`${r}-arrow-next-vertical`]:!Q,[`${r}-hover-arrow`]:re}),style:{color:w,"--arrow-hover-color":R,...S},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:Ie=>{Ie.stopPropagation(),be(1)},style:{transform:`translate(${H.scalingValue(X*(Q?-1:1),n)}, ${H.scalingValue(D,n)}) rotate(${Q?"0deg":"90deg"})`},children:[W&&a.jsx(sn,{url:W,fill:w,hoverFill:R,className:`${r}-arrow-img`,style:S}),!W&&a.jsx(sc,{color:w,className:pt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),q&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>be(1)}),V&&a.jsx("div",{className:pt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:Q,[`${r}-pagination-inside-left`]:!Q}),style:Q?{bottom:y(v.inset)}:{left:y(v.inset)},children:a.jsx("div",{className:pt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!Q,[`${r}-animate-dots`]:ge}),style:{backgroundColor:I,gap:y(v.gapInactive-v.activeDot+v.dot),...Q?{height:y(v.activeDot+v.paddingY*2),paddingTop:y(v.paddingY),paddingBottom:y(v.paddingY),paddingLeft:y(v.paddingActive),paddingRight:y(v.paddingActive)}:{width:y(v.activeDot+v.paddingY*2),paddingLeft:y(v.paddingY),paddingRight:y(v.paddingY),paddingTop:y(v.paddingActive),paddingBottom:y(v.paddingActive)},borderRadius:y(v.borderRadius),transform:`translate(${H.scalingValue(fo.offset.x,n)}, ${H.scalingValue(fo.offset.y,n)})`},children:d.map((Ie,Ne)=>{const Oe=Ne===F,Ue=Oe?v.activeDot:v.dot;return a.jsx("button",{onClick:()=>se(Ne),className:`${r}-pagination-item`,style:{width:y(v.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Oe?E:m,width:y(Ue)}})},Ne)})},`${f}-${b}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:H.scalingValue(A,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:d.map((Ie,Ne)=>a.jsx("div",{className:pt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:Ne===F&&n,[`${r}-active`]:Ne===F}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Vi/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":J,"--link-hover-color":J,position:"relative",top:H.scalingValue(Ha.offset.y,n),left:H.scalingValue(Ha.offset.x,n)},children:a.jsx(Ti,{content:Ie.imageCaption})})},Ne))})]})]})]})}function sc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 U0=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19565
+ `}function Z0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=W.useScopedStyles(),l=G0(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??dc,p=u.sizeType??"drag",v=u.value??dc.value,w=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",f=(e==null?void 0:e.navSize)??"m",x=j0[f],C=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,y=Re=>W.scalingValue(Re*C,n),S=(e==null?void 0:e.show)??"always",B=(e==null?void 0:e.controls)??null,N=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,q=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,D=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,T=(e==null?void 0:e.controlsColor)??cc.color,H=(e==null?void 0:e.controlsHoverColor)??cc.hover,$=(e==null?void 0:e.navColor)??vo.colors.inactive,I=(e==null?void 0:e.navPaginationColor)??vo.colors.pagination,P=(e==null?void 0:e.navBackgroundColor)??vo.colors.background,E=(e==null?void 0:e.linkColor)??Da.linkColor,g=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,z=w==="horizontal",F=p==="click",X=p==="drag",ie=p==="auto"&&(!n||!!i),L=!n,_=m==="slide",V=h==="classic",ae=S!=="never",re=S==="on hover",M=W.scalingValue(N,n),se={width:M,height:M,maxWidth:M},j=_&&c>1,[b,k]=s.useState(0),[G,he]=s.useState(j?1:0),[J,ee]=s.useState(!1),[O,Z]=s.useState(!1),[te,Le]=s.useState(!1),[ve,Ie]=s.useState(0),[pe,oe]=s.useState(!1),[ye,U]=s.useState(!1),ce=s.useRef(!1),le=s.useRef(G);le.current=G;const Ce=s.useRef(null),Fe=s.useRef(0),Ee=s.useRef(null),Y=s.useRef(null),be=s.useRef(null),de=s.useRef(null),K=s.useCallback(Re=>{ce.current=Re,ee(Re)},[]),ue=s.useCallback(Re=>{if(c<2||Re===0)return;const We=Re>0?1:-1,Be=Math.abs(Re);if(oe(!0),K(!0),!_){k(we=>$o(we+Re,c));return}let Ue=le.current;const ge=j&&(Ue===0||Ue===c+1),xe=ge?b+1:null;ge&&(Ue=b+1);let _e=Be;for(;_e>0;){const we=X0(Ue,We,c,j);if(Ue=we.position,_e-=1,we.hitBoundary){Fe.current=_e*We;break}}const Ze=Be-_e;if(Ze>0&&k(we=>$o(we+Ze*We,c)),le.current=Ue,xe!==null){if(le.current=xe,Ue===xe){Z(!0),he(Ue);return}Ce.current=Ue,Z(!0),he(xe);return}Z(!1),he(Ue)},[b,c,j,_,K]),He=s.useCallback(Re=>{ue(Re)},[ue]),fe=s.useCallback(Re=>{if(c<2)return;const We=$o(Re,c);if(!(We===b&&!ce.current)&&(oe(!0),K(!0),k(We),_)){const Be=We+(j?1:0);Ce.current=null,Fe.current=0,le.current=Be,Z(!1),he(Be)}},[b,c,j,_,K]);s.useEffect(()=>{if(!J)return;const Re=window.setTimeout(()=>{if(j&&(G===0||G===c+1)){Ce.current=null,Z(!0),he(b+1);return}K(!1)},Xi);return()=>window.clearTimeout(Re)},[b,c,j,J,K,G]),s.useEffect(()=>{if(!O)return;let Re=0;const We=requestAnimationFrame(()=>{Re=requestAnimationFrame(()=>{const Be=Ce.current;Ce.current=null;const Ue=Fe.current;if(Fe.current=0,Z(!1),Be!==null){le.current=Be,he(Be);return}if(Ue!==0){ue(Ue);return}K(!1)})});return()=>{cancelAnimationFrame(We),cancelAnimationFrame(Re)}},[ue,K,O]);const Q=`${j}:${c}`,Je=s.useRef(Q);s.useEffect(()=>{if(Je.current===Q)return;Je.current=Q;const Re=c>0?Math.min(b,c-1):0;be.current=null,de.current=null,Le(!1),Ie(0),k(Re),Z(!0),he(Re+(j?1:0))},[b,c,j,Q]),s.useEffect(()=>{if(!pe)return;const Re=window.setTimeout(()=>oe(!1),H0);return()=>window.clearTimeout(Re)},[pe,b]),s.useEffect(()=>{if(!ie||c<2)return;const Re=Math.max(v,.1)*1e3,We=window.setInterval(()=>{L&&ye||He(1)},Re);return()=>window.clearInterval(We)},[v,c,He,ie,ye,L]);const Ne=s.useCallback(Re=>{const We=be.current;if(!We||We.pointerId!==Re.pointerId)return;be.current=null,de.current=null;const Be=Ee.current;if(Be!=null&&Be.hasPointerCapture(Re.pointerId)&&Be.releasePointerCapture(Re.pointerId),!We.isActive){_&&Ie(0);return}const ge=!(Re.timeStamp-We.lastTime>z0)&&Math.abs(We.velocity)>B0,xe=We.size>0&&Math.abs(We.offset-We.baseOffset)>We.size*O0;if(Le(!1),!ge&&!xe){Ie(0);return}const _e=xe?We.offset-We.baseOffset:We.velocity;let Ze=1;xe&&We.size>0&&(Ze=Math.max(1,Math.round(Math.abs(_e)/We.size))),Ie(0),ue(_e<0?Ze:-Ze)},[ue,_]);s.useEffect(()=>{const Re=We=>{de.current===null||We.pointerId!==de.current||Ne(We)};return window.addEventListener("pointerup",Re),window.addEventListener("pointercancel",Re),()=>{window.removeEventListener("pointerup",Re),window.removeEventListener("pointercancel",Re)}},[Ne]);const ct=Re=>{const We=Ee.current;if(!X||c<2||!We||Re.pointerType==="mouse"&&Re.button!==0)return;Ce.current=null,Fe.current=0,ce.current&&K(!1);let Be=0;const Ue=Y.current;if(_&&Ue){const ge=z?Ue.offsetWidth:Ue.offsetHeight;if(ge>0){const xe=q0(Ue,z);let _e=le.current;j&&(_e===0||_e===c+1)?(_e=b+1,le.current=_e,Z(!0),he(_e),Be=0):Be=xe+_e*ge,Ie(Be)}}We.setPointerCapture(Re.pointerId),de.current=Re.pointerId,be.current={pointerId:Re.pointerId,startClientX:Re.clientX,startClientY:Re.clientY,axes:Y0(We,`${r}-axis-probe`),size:z?We.offsetWidth:We.offsetHeight,isActive:!1,baseOffset:Be,offset:Be,lastTime:Re.timeStamp,velocity:0}},Ke=Re=>{const We=be.current;if(!We||We.pointerId!==Re.pointerId)return;if(Re.pointerType==="mouse"&&Re.buttons===0){Ne(Re);return}const Be=Re.clientX-We.startClientX,Ue=Re.clientY-We.startClientY,ge=We.axes?U0(We.axes,Be,Ue):{x:Be,y:Ue},xe=z?ge.x:ge.y,_e=z?ge.y:ge.x,Ze=We.baseOffset+xe;if(!We.isActive){if(Math.max(Math.abs(xe),Math.abs(_e))<D0)return;if(Math.abs(_e)>Math.abs(xe)){const $e=Ee.current;$e!=null&&$e.hasPointerCapture(We.pointerId)&&$e.releasePointerCapture(We.pointerId),be.current=null,de.current=null,_&&Ie(0);return}We.isActive=!0,Le(!0)}const we=Re.timeStamp-We.lastTime;we>0&&(We.velocity=(Ze-We.offset)/we,We.lastTime=Re.timeStamp),We.offset=Ze,_&&Ie(Ze)},ut=Re=>{Ne(Re)},lt=z?`translate3d(calc(${-G*100}% + ${ve}px), 0, 0)`:`translate3d(0, calc(${-G*100}% + ${ve}px), 0)`,Ye=j?[d[c-1],...d,d[0]]:d;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:K0(r,n)}}),a.jsxs("div",{className:pt(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!z}),onMouseEnter:()=>U(!0),onMouseLeave:()=>U(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:Ee,className:pt(`${r}-track`,{[`${r}-track-draggable`]:X,[`${r}-track-draggable-vertical`]:X&&!z}),onPointerDown:ct,onPointerMove:Ke,onPointerUp:ut,onPointerCancel:ut,onLostPointerCapture:Re=>{de.current===Re.pointerId&&Ne(Re)},children:a.jsx("div",{ref:Y,className:pt(`${r}-list`,{[`${r}-list-slide`]:_,[`${r}-list-slide-vertical`]:_&&!z,[`${r}-list-fade`]:!_}),style:_?{transform:lt,transition:te||O?"none":`transform ${Xi}ms ${Yd}`}:void 0,children:Ye.map((Re,We)=>{const Be=j?$o(We-1,c):We,ge=j&&(We===0||We===c+1)?`clone-${We===0?"start":"end"}`:`slide-${Be}`;return a.jsx("div",{className:pt(`${r}-slide`,{[`${r}-is-active`]:!_&&Be===b}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:pt(`${r}-slider-image`,{[`${r}-contain`]:Re.image.objectFit==="contain",[`${r}-cover`]:Re.image.objectFit==="cover"}),src:Re.image.url,alt:Re.image.name??"",draggable:!1})})})},ge)})})}),ae&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(`${r}-arrow`,{[`${r}-arrow-prev`]:z,[`${r}-arrow-prev-vertical`]:!z,[`${r}-hover-arrow`]:re}),style:{color:T,"--arrow-hover-color":H,...se},children:a.jsxs("button",{onClick:Re=>{Re.stopPropagation(),He(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${W.scalingValue(q,n)}, ${W.scalingValue(D*(z?1:-1),n)}) rotate(${z?"0deg":"90deg"})`},children:[B&&a.jsx(sn,{url:B,fill:T,hoverFill:H,className:pt(`${r}-arrow-img`,`${r}-mirror`),style:se}),!B&&a.jsx(uc,{color:T,className:pt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:pt(`${r}-arrow`,{[`${r}-arrow-next`]:z,[`${r}-arrow-next-vertical`]:!z,[`${r}-hover-arrow`]:re}),style:{color:T,"--arrow-hover-color":H,...se},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:Re=>{Re.stopPropagation(),He(1)},style:{transform:`translate(${W.scalingValue(q*(z?-1:1),n)}, ${W.scalingValue(D,n)}) rotate(${z?"0deg":"90deg"})`},children:[B&&a.jsx(sn,{url:B,fill:T,hoverFill:H,className:`${r}-arrow-img`,style:se}),!B&&a.jsx(uc,{color:T,className:pt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),F&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>He(1)}),V&&a.jsx("div",{className:pt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:z,[`${r}-pagination-inside-left`]:!z}),style:z?{bottom:y(x.inset)}:{left:y(x.inset)},children:a.jsx("div",{className:pt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!z,[`${r}-animate-dots`]:pe}),style:{backgroundColor:P,gap:y(x.gapInactive-x.activeDot+x.dot),...z?{height:y(x.activeDot+x.paddingY*2),paddingTop:y(x.paddingY),paddingBottom:y(x.paddingY),paddingLeft:y(x.paddingActive),paddingRight:y(x.paddingActive)}:{width:y(x.activeDot+x.paddingY*2),paddingLeft:y(x.paddingY),paddingRight:y(x.paddingY),paddingTop:y(x.paddingActive),paddingBottom:y(x.paddingActive)},borderRadius:y(x.borderRadius),transform:`translate(${W.scalingValue(vo.offset.x,n)}, ${W.scalingValue(vo.offset.y,n)})`},children:d.map((Re,We)=>{const Be=We===b,Ue=Be?x.activeDot:x.dot;return a.jsx("button",{onClick:()=>fe(We),className:`${r}-pagination-item`,style:{width:y(x.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Be?I:$,width:y(Ue)}})},We)})},`${f}-${w}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:W.scalingValue(g,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:d.map((Re,We)=>a.jsx("div",{className:pt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:We===b&&n,[`${r}-active`]:We===b}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Xi/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":E,"--link-hover-color":E,position:"relative",top:W.scalingValue(Da.offset.y,n),left:W.scalingValue(Da.offset.x,n)},children:a.jsx(Ri,{content:Re.imageCaption})})},We))})]})]})]})}function uc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 J0=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19566
19566
  import cn from 'classnames';
19567
19567
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19568
19568
  import { scalingValue } from '../utils/scalingValue';
@@ -20743,14 +20743,14 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
20743
20743
  </svg>
20744
20744
  );
20745
20745
  }
20746
- `,K0={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"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},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,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,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","captionMarginTop","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"}]}]}]}},Z0={element:Y0,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:K0,sourceCode:U0,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},Hi=300/1440,J0=8/1440,yi=.004;function Q0(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function lc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function cc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:H.scalingValue((o-t)/2,i)}}function eb(e){return`
20746
+ `,Q0={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"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},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,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,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","captionMarginTop","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"}]}]}]}},eb={element:Z0,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:Q0,sourceCode:J0,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},Oi=300/1440,tb=8/1440,vi=.004;function nb(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function pc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function mc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:W.scalingValue((o-t)/2,i)}}function ib(e){return`
20747
20747
  .${e}-wrapper {
20748
20748
  box-sizing: border-box;
20749
20749
  display: flex;
20750
20750
  flex-direction: column;
20751
20751
  position: relative;
20752
20752
  width: 100%;
20753
- min-height: ${Q0(48)};
20753
+ min-height: ${nb(48)};
20754
20754
  }
20755
20755
  .${e}-single-title-layer {
20756
20756
  position: absolute;
@@ -20960,7 +20960,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
20960
20960
  width: var(--cntrl-article-width, 100vw) !important;
20961
20961
  height: var(--cntrl-viewport-height, 100vh) !important;
20962
20962
  }
20963
- `}const tb="rgba(28,31,34,0.9)",kn=500,fi="cubic-bezier(0.22, 1, 0.36, 1)",nb=72,ib=50,ob={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},rb=[];function ab(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 sb(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function lb(e){const[t]=e.media;return t!=null&&t.url?t:null}function cb(e){if(!Array.isArray(e)||e.length===0)return[];if(ab(e)){const t=[];for(const n of e){const i=sb(n);if(!i)continue;const o=lb(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 ss(e){return e.type==="video"}function db(e){e.pause(),e.removeAttribute("src"),e.load()}function vr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function ub(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const pb=1140/1440;function mb(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function gb(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function hb(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function fb({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{db(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d,style:i})}function yb({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const x=i==="cover",b=s.useRef(null),g=s.useRef(null),h=s.useRef(null),f=s.useRef(0),v=s.useRef(0),C=s.useRef("none"),y=s.useRef(!1),T=s.useRef(!1),W=s.useRef(!1),_=s.useRef(null),[X,D]=s.useState(null),[w,R]=s.useState("opening"),[m,E]=s.useState(0),[I,J]=s.useState(0),[A,Q]=s.useState(!1),[q,Y]=s.useState(!1),[oe,L]=s.useState(!1),N=s.useRef(n),V=t[n],de=V?ss(V):!1,re=I!==0||A,M=s.useCallback(ge=>{W.current=ge,Q(ge)},[]),S=s.useCallback(()=>{_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),$=s.useCallback(()=>{S(),_.current=window.setTimeout(()=>{S(),M(!1)},kn+32)},[S,M]),F=s.useCallback(()=>{const ge=b.current,ye=g.current;if(!ge)return;const Se=ge.getBoundingClientRect(),ee=Se.width,ce=Se.height;if(!ee||!ce)return;if(i==="cover"){D({width:ee,height:ce,left:Se.left,top:Se.top});return}if(!ye){D(vr(ge));return}const{width:ue,height:Te}=ub(ye);if(!ue||!Te){D(vr(ge));return}const ke=ue/Te,Ce=ee/ce;if(ke>Ce){const U=ee/ke;D({width:ee,height:U,left:Se.left,top:Se.top+(ce-U)/2})}else{const U=ce*ke;D({width:U,height:ce,left:Se.left+(ee-U)/2,top:Se.top})}},[i]);s.useEffect(()=>{F();const ge=b.current;if(!ge)return;const ye=new ResizeObserver(()=>F());return ye.observe(ge),()=>ye.disconnect()},[F,n]),s.useEffect(()=>{w==="opening"&&X&&R("open")},[w,X]),s.useEffect(()=>{if(w!=="closing")return;const ge=setTimeout(()=>r(),kn);return()=>clearTimeout(ge)},[w,r]),s.useEffect(()=>()=>{S()},[S]),s.useLayoutEffect(()=>{if(N.current===n)return;S(),E(0),J(0),M(!1),L(!1),Y(!1),f.current=0,v.current=0,C.current="none",y.current=!1,h.current=null,T.current=!1;const ge=b.current;ge&&D(vr(ge)),N.current=n},[n,M,S]),s.useEffect(()=>{if(w!=="open")return;let ge=null;const ye=()=>{ge&&(document.removeEventListener("click",ge,!0),ge=null)},Se=()=>{ye(),ge=Ce=>{Ce.stopPropagation(),Ce.preventDefault(),ye()},document.addEventListener("click",ge,!0)},ee=Ce=>{S(),W.current=!1,Q(!1),J(0),Y(!1),y.current=!1,v.current=0,C.current="none";const U=b.current;U&&D(vr(U)),Ce<0?d():l()},ce=Ce=>{if(Math.abs(Ce)>ib&&t.length>1){ee(Ce);return}M(!0),J(0),$()},ue=Ce=>{if(Ce.touches.length!==1||W.current)return;const U=Ce.touches[0];T.current=!0,h.current={x:U.clientX,y:U.clientY},C.current="none",v.current=0,y.current=!1},Te=Ce=>{if(!h.current||Ce.touches.length!==1||W.current)return;const U=Ce.touches[0],fe=U.clientX-h.current.x,me=U.clientY-h.current.y;if(C.current==="none"){if(Math.abs(fe)<10&&Math.abs(me)<10)return;if(Math.abs(fe)>Math.abs(me)){if(t.length<=1)return;C.current="horizontal"}else if(me>0)C.current="vertical";else return}if(C.current==="horizontal"){y.current=!0,Y(!0),v.current=fe,J(fe),Ce.preventDefault();return}C.current==="vertical"&&(y.current=!0,Y(!0),f.current=me,E(me),Ce.preventDefault())},ke=()=>{if(!h.current)return;const Ce=C.current,U=y.current;if(U&&Ce==="horizontal")ce(v.current),Se();else if(U&&Ce==="vertical")if(f.current>nb){const me=window.innerHeight;f.current=me,L(!0),E(me),R("closing")}else f.current=0,E(0),Se();else Ce==="horizontal"&&Math.abs(v.current)>0&&(ce(v.current),Se());h.current=null,C.current="none",v.current=0,y.current=!1,Y(!1)};return document.addEventListener("touchstart",ue,{passive:!0}),document.addEventListener("touchmove",Te,{passive:!1}),document.addEventListener("touchend",ke),document.addEventListener("touchcancel",ke),()=>{document.removeEventListener("touchstart",ue),document.removeEventListener("touchmove",Te),document.removeEventListener("touchend",ke),document.removeEventListener("touchcancel",ke),ye()}},[w,t.length,d,l,M,$,S]),s.useEffect(()=>{const ge=ye=>{ye.key==="Escape"&&(ye.preventDefault(),ye.stopPropagation(),w!=="closing"&&R("closing"))};return window.addEventListener("keydown",ge,!0),()=>window.removeEventListener("keydown",ge,!0)},[w]);const O=()=>{w!=="closing"&&R("closing")},te=w==="open",xe=w==="closing",ne=m>0?Math.max(0,1-m/500):1,ae=m>0?Math.max(.35,1-m/500):1,Z=ge=>{if(ge.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const ye=ge.currentTarget.getBoundingClientRect(),Se=ge.clientY-ye.top,ee=Math.min(52,ye.height*.2);if(!(Se>ye.height-ee)){if(ge.clientX-ye.left<ye.width/2){l();return}d()}},B=ge=>{if(t.length<=1)return;const ye=ge.currentTarget.getBoundingClientRect(),Se=ge.clientX-ye.left,ee=ge.clientY-ye.top,ce=Math.min(52,ye.height*.2);if(ee>ye.height-ce){ge.currentTarget.style.cursor="default";return}ge.currentTarget.style.cursor=Se<ye.width/2?"w-resize":"e-resize"},G=s.useCallback(ge=>{ge.propertyName!=="transform"||!W.current||(S(),M(!1))},[S,M]),$e=re?`translateX(${I}px)`:m>0?`translateY(${m}px)`:void 0,he={position:"fixed",top:X==null?void 0:X.top,left:X==null?void 0:X.left,width:X==null?void 0:X.width,height:X==null?void 0:X.height,objectFit:i==="cover"?"cover":"contain",transform:$e,opacity:m>0?ae:w==="opening"||xe?0:1,transition:q&&!A?"none":A?`transform ${kn}ms ${fi}`:oe?`transform ${kn}ms ${fi}, opacity ${kn}ms ${fi}`:w==="opening"||xe?`opacity ${kn}ms ${fi}`:"none",pointerEvents:de&&te&&!re?"auto":"none",touchAction:de&&te?"none":void 0,zIndex:9998},Re=X?{position:"fixed",top:X.top,height:X.height,width:X.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:w==="open"?"none":void 0},onClick:O,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:te?ne:0,transition:q?"none":`opacity ${kn}ms ${fi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:x?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:te?1:0,transition:`opacity ${kn}ms ${fi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:te?1:0,transition:`opacity ${kn}ms ${fi}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),X&&V&&(de?a.jsx(fb,{src:V.url,phase:w,mediaRef:g,mediaStyle:he,onLoadedMetadata:F,onClick:Z,onMouseMove:B,onTransitionEnd:G},`${n}-${V.url}`):a.jsx("img",{ref:g,src:V.url,alt:V.name,onLoad:F,onTransitionEnd:G,style:he},`${n}-${V.url}`)),te&&Re&&t.length>1&&!de&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Re,left:X.left,cursor:"w-resize",pointerEvents:re?"none":"auto"},onClick:ge=>{if(T.current){T.current=!1;return}ge.stopPropagation(),l()}}),a.jsx("div",{style:{...Re,left:X.left+X.width/2,cursor:"e-resize",pointerEvents:re?"none":"auto"},onClick:ge=>{if(T.current){T.current=!1;return}ge.stopPropagation(),d()}})]})]})}function dc({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const x=`${e}-gallery-${ss(t)?"video":"image"}`,b=r.display==="cover",g=gb(r),h=w=>H.scalingValue(w,l??!1),f=n??Hi,v=o?{width:"100%",maxWidth:"100%"}:{width:h(f),maxWidth:"100%"},C=i?{borderRadius:h(i)}:{},y={...v,...b?{aspectRatio:g,height:"auto",overflow:"hidden"}:{},...C},T={...b?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(f)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...b?{}:C},_={className:x,style:T,onClick:p?w=>{w.stopPropagation(),p()}:void 0},X=Math.max(d,yi),D=ss(t)?a.jsx("video",{..._,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{..._,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[b?a.jsx("div",{style:y,children:D}):D,c&&d>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(X)}})]})}function vb({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const x=t==="a"?i:t==="c"?o:0,b=x>0||c;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&b&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(x)},"aria-hidden":"true"}),c&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&b&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(x)},"aria-hidden":"true"}),c&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function xb(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function uc({P:e,scaled:t,height:n,paired:i}){return a.jsx("div",{"data-controls":"titleTopPadding",...i?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:t(n)}})}function pc({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:d}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function Da({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:r,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=s.useRef(null),[x,b]=s.useState(0),g=t??"",h=n==="left"||n==="center"||n==="right";return s.useLayoutEffect(()=>{if(!h)return;const f=p.current;if(!f||typeof ResizeObserver>"u")return;const v=()=>b(f.offsetHeight);v();const C=new ResizeObserver(v);return C.observe(f),()=>C.disconnect()},[g,h]),a.jsx("div",{ref:f=>{p.current=f,i(f)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${x}px`}:{},...r},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,a.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("span",{className:`${e}-title-text`,style:d,children:g})})]})})}const mc=45;function gc(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function bb(e){const t=gc(e,"--cntrl-viewport-height",window.innerHeight),n=gc(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function wb(e,t,n){const{top:i,centerY:o}=bb(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const r=e.top+e.height/2;return Math.abs(r-o)}function Sb(e,t,n){const i=Array.from({length:t},(l,d)=>{const c=e.current[d];if(!c)return 0;const u=c.getBoundingClientRect(),p=wb(u,n,c);return Math.exp(-(p*p)/(2*mc*mc))});let o=0,r=-1;return i.forEach((l,d)=>{l>r&&(r=l,o=d)}),{opacities:i,dominantIndex:o}}function $b(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(Sb(i,e,n))},p=()=>{c||(c=window.requestAnimationFrame(()=>{c=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{c&&window.cancelAnimationFrame(c),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:c=>u=>{i.current[c]=u},opacities:o,dominantIndex:r}}function Cb(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),d=Math.max(r.length,l.length);if(d===0||o.current===e)return;let c=0;const u=window.setInterval(()=>{c+=1;const p=[...l.slice(0,c),...r.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function Tb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var nt;const{prefix:l}=H.useScopedStyles(),d=s.useMemo(()=>eb(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",x=(e==null?void 0:e.imgWidth)??Hi,b=(e==null?void 0:e.titleWidth)??pb,g=mb(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??J0,f=(e==null?void 0:e.position)??"center",v=(e==null?void 0:e.titleTopPadding)??0,C=(e==null?void 0:e.titleLeftPadding)??0,y=(e==null?void 0:e.titleRightPadding)??0,T=xb(e==null?void 0:e.transition),W=(e==null?void 0:e.lightbox)??"on",_=p==="b",X=T==="fade"||T==="retype",{setTitleRef:D,dominantIndex:w}=$b(c.length,X,f),R=((nt=c[w])==null?void 0:nt.title)??"",m=Cb(R,T==="retype"),E=T==="fade"||T==="retype",I=T==="retype"?m:R,J=_?void 0:{width:H.scalingValue(x,n??!1)},A=W==="on"&&(!n||i||o),Q=o??!1,q=(e==null?void 0:e.galleryPaddingRight)??0,Y=(e==null?void 0:e.galleryPaddingLeft)??0,oe=(e==null?void 0:e.galleryPaddingBetween)??0,L=at=>H.scalingValue(at,n??!1),V={width:L(b)},de=p==="a"?q:Y,re=_?{width:"100%"}:{width:`calc(100% - ${L(x)} - ${L(de)})`,...p==="c"?{marginLeft:"auto"}:{}},M=Math.max(q,yi),S=Math.max(Y,yi),$=Math.max(oe,yi),F=Math.max(v,yi),O=Math.max(C,yi),te=Math.max(y,yi),xe=Math.max(0,(u??1)-(x??Hi)),ne=p==="a"?Math.max(0,(u??1)-(x??Hi)-q):p==="c"?Math.max(0,(u??1)-(x??Hi)-Y):p==="b"?u??1:1,ae=Q&&(p==="a"||p==="b"||p==="c")&&f==="top",Z=Q&&((p==="a"||p==="b")&&(f==="left"||f==="top")||p==="c"&&(f==="left"||f==="top")),B=Q&&((p==="c"||p==="b")&&f==="right"||p==="a"&&f==="right"),G=c.length>1,$e=_?void 0:L((p==="c"?Y:q)+(x??Hi)),he=p==="c"&&$e?{left:$e}:void 0,Re=p==="a"&&$e?{right:$e}:void 0,ge=_?{left:0,width:"100%"}:p==="a"?{right:L(q),width:L(x)}:{left:L(Y),width:L(x)},{titleColor:ye,titleFontFamily:Se,titleFontSettings:ee,titleFontSize:ce,titleLineHeight:ue,titleLetterSpacing:Te,titleWordSpacing:ke,titleAlign:Ce,titleTextAppearance:U,lightboxCounterColor:fe,lightboxCounterFontFamily:me,lightboxCounterFontSettings:K,lightboxCounterFontSize:z,lightboxCounterLineHeight:be,lightboxCounterLetterSpacing:se,lightboxCounterWordSpacing:j,lightboxCounterTextAppearance:_e}=e??{},We={fontSettings:{fontFamily:Se,fontWeight:(ee==null?void 0:ee.fontWeight)??400,fontStyle:(ee==null?void 0:ee.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:ue,letterSpacing:Te??0,wordSpacing:ke??0,textAlign:Ce??"left",textAppearance:U,color:ye??"#000000"},Je=an(Yt(We,n)),ct=V,it=cc(ce,ue,l,n),Ve=lc(ce,ue,`${l}-title`,`${l}-text-tight-leading`),Ie={fontSettings:{fontFamily:me,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:z??.01,lineHeight:be,letterSpacing:se??0,wordSpacing:j??0,textAppearance:_e,color:fe??"#DEDDDD"},Oe={...an(Yt(Ie,n)),...cc(z,be,l,n)},Ue=lc(z,be,`${l}-lightbox-counter`,`${l}-text-tight-leading`),pe=H.buildColorVars(l,{titleColor:ye??"#000000",lightboxCounterColor:fe??"#DEDDDD"},ob,rb),we=s.useRef(null),[Ae,Xe]=s.useState(!1),[Ze,Ge]=s.useState([]),[st,Qe]=s.useState(0),Fe=s.useCallback((at,dt)=>{A&&(Ge(at),Qe(dt),Xe(!0))},[A]),qe=s.useCallback(()=>{Xe(!1)},[]),He=s.useMemo(()=>{const at={...pe},dt=we.current?getComputedStyle(we.current).getPropertyValue("--cntrl-article-width").trim():"";return dt&&(at["--cntrl-article-width"]=dt),at},[pe,Ae]);return s.useEffect(()=>{if(!Ae||W!=="on"||typeof document>"u")return;const at=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=at}},[Ae,W]),s.useEffect(()=>{!n||o||i||Xe(!1)},[n,o,i]),s.useEffect(()=>{W==="off"&&Xe(!1)},[W]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{style:pe,children:a.jsxs("div",{ref:we,className:`${l}-wrapper`,style:{width:H.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&f==="top"?L(v):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(f==="left"||f==="top")||p==="c"&&(f==="left"||f==="top")?L(C):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&f==="right"||p==="a"&&f==="right"?L(y):void 0},children:[E&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Da,{P:l,title:I,position:f,titleRef:()=>{},titleClassName:`${Ve} ${l}-single-title`,titleContainerStyle:{...it,...re},titleTextBoxStyle:ct,titleStyle:Je,showTextBoxOutline:Q,topPaddingControl:ae?uc({P:l,scaled:L,height:F,paired:!1}):void 0})}),c.map((at,dt)=>{const Tt=cb(at.gallery),qt=dt<c.length-1,Zt=Tt.filter(wt=>wt.lightboxMedia).map(wt=>wt.lightboxMedia),xt={P:l,position:f,titleRef:D(dt),titleClassName:Ve,titleContainerStyle:it,titleTextBoxStyle:E?{maxWidth:"100%"}:ct,titleStyle:Je,showTextBoxOutline:Q&&!E,topPaddingControl:ae&&!E?uc({P:l,scaled:L,height:F,paired:G}):void 0};return a.jsxs("div",{"data-item-index":dt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:qt?L(oe):void 0},children:[Z&&pc({P:l,controlKey:"titleLeftPadding",scaled:L,width:O,maxFraction:ne,side:"left",paired:G,anchorStyle:he}),B&&pc({P:l,controlKey:"titleRightPadding",scaled:L,width:te,maxFraction:ne,side:"right",paired:G,anchorStyle:Re}),Q&&qt&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:L($),...ge}}),_?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Tt.map(({displayMedia:wt,lightboxMedia:Bt},At)=>{const vt=Bt?Zt.findIndex(Ft=>Ft.url===Bt.url):-1;return a.jsx(dc,{P:l,media:wt,imgWidth:x||void 0,cornerRadius:h||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:oe,showPaddingAfter:At<Tt.length-1,showControls:Q,onMediaClick:A&&vt>=0?()=>Fe(Zt,vt):void 0},`${wt.url}-${At}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Da,{...xt,title:E?"":at.title})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Da,{...xt,title:E?"":at.title}),Tt.length>0&&a.jsx(vb,{P:l,layoutType:p,galleryWidthStyle:J,galleryPaddingRight:q,galleryPaddingLeft:Y,galleryPaddingRightWidth:M,galleryPaddingLeftWidth:S,galleryPaddingMaxFraction:xe,showControls:Q,scaled:L,children:Tt.map(({displayMedia:wt,lightboxMedia:Bt},At)=>{const vt=Bt?Zt.findIndex(Ft=>Ft.url===Bt.url):-1;return a.jsx(dc,{P:l,media:wt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:oe,showPaddingAfter:At<Tt.length-1,showControls:Q,onMediaClick:A&&vt>=0?()=>Fe(Zt,vt):void 0},`${wt.url}-${At}`)})})]})]},dt)})]})}),Ae&&W==="on"&&typeof document<"u"&&e&&(()=>{const at=(r?document.getElementById(r):null)??document.body;return Bn.createPortal(a.jsx("div",{style:He,"data-selection":"none",children:a.jsx(yb,{prefix:l,items:Ze,index:st,imageDisplay:hb(e.lightboxImageDisplay),isEditor:n,onClose:qe,onPrev:()=>Qe(dt=>(dt-1+Ze.length)%Ze.length),onNext:()=>Qe(dt=>(dt+1)%Ze.length),counterClassName:Ue,counterStyle:Oe,backgroundColor:e.backgroundColor??tb})}),at)})()]})}const Ib=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
20963
+ `}const ob="rgba(28,31,34,0.9)",An=500,yi="cubic-bezier(0.22, 1, 0.36, 1)",rb=72,ab=50,sb={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},lb=[];function cb(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 db(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function ub(e){const[t]=e.media;return t!=null&&t.url?t:null}function pb(e){if(!Array.isArray(e)||e.length===0)return[];if(cb(e)){const t=[];for(const n of e){const i=db(n);if(!i)continue;const o=ub(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 ss(e){return e.type==="video"}function mb(e){e.pause(),e.removeAttribute("src"),e.load()}function br(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function gb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const hb=1140/1440;function fb(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function yb(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function vb(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function xb({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{mb(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d,style:i})}function bb({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const v=i==="cover",w=s.useRef(null),m=s.useRef(null),h=s.useRef(null),f=s.useRef(0),x=s.useRef(0),C=s.useRef("none"),y=s.useRef(!1),S=s.useRef(!1),B=s.useRef(!1),N=s.useRef(null),[q,D]=s.useState(null),[T,H]=s.useState("opening"),[$,I]=s.useState(0),[P,E]=s.useState(0),[g,z]=s.useState(!1),[F,X]=s.useState(!1),[ie,L]=s.useState(!1),_=s.useRef(n),V=t[n],ae=V?ss(V):!1,re=P!==0||g,M=s.useCallback(pe=>{B.current=pe,z(pe)},[]),se=s.useCallback(()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),j=s.useCallback(()=>{se(),N.current=window.setTimeout(()=>{se(),M(!1)},An+32)},[se,M]),b=s.useCallback(()=>{const pe=w.current,oe=m.current;if(!pe)return;const ye=pe.getBoundingClientRect(),U=ye.width,ce=ye.height;if(!U||!ce)return;if(i==="cover"){D({width:U,height:ce,left:ye.left,top:ye.top});return}if(!oe){D(br(pe));return}const{width:le,height:Ce}=gb(oe);if(!le||!Ce){D(br(pe));return}const Fe=le/Ce,Ee=U/ce;if(Fe>Ee){const Y=U/Fe;D({width:U,height:Y,left:ye.left,top:ye.top+(ce-Y)/2})}else{const Y=ce*Fe;D({width:Y,height:ce,left:ye.left+(U-Y)/2,top:ye.top})}},[i]);s.useEffect(()=>{b();const pe=w.current;if(!pe)return;const oe=new ResizeObserver(()=>b());return oe.observe(pe),()=>oe.disconnect()},[b,n]),s.useEffect(()=>{T==="opening"&&q&&H("open")},[T,q]),s.useEffect(()=>{if(T!=="closing")return;const pe=setTimeout(()=>r(),An);return()=>clearTimeout(pe)},[T,r]),s.useEffect(()=>()=>{se()},[se]),s.useLayoutEffect(()=>{if(_.current===n)return;se(),I(0),E(0),M(!1),L(!1),X(!1),f.current=0,x.current=0,C.current="none",y.current=!1,h.current=null,S.current=!1;const pe=w.current;pe&&D(br(pe)),_.current=n},[n,M,se]),s.useEffect(()=>{if(T!=="open")return;let pe=null;const oe=()=>{pe&&(document.removeEventListener("click",pe,!0),pe=null)},ye=()=>{oe(),pe=Ee=>{Ee.stopPropagation(),Ee.preventDefault(),oe()},document.addEventListener("click",pe,!0)},U=Ee=>{se(),B.current=!1,z(!1),E(0),X(!1),y.current=!1,x.current=0,C.current="none";const Y=w.current;Y&&D(br(Y)),Ee<0?d():l()},ce=Ee=>{if(Math.abs(Ee)>ab&&t.length>1){U(Ee);return}M(!0),E(0),j()},le=Ee=>{if(Ee.touches.length!==1||B.current)return;const Y=Ee.touches[0];S.current=!0,h.current={x:Y.clientX,y:Y.clientY},C.current="none",x.current=0,y.current=!1},Ce=Ee=>{if(!h.current||Ee.touches.length!==1||B.current)return;const Y=Ee.touches[0],be=Y.clientX-h.current.x,de=Y.clientY-h.current.y;if(C.current==="none"){if(Math.abs(be)<10&&Math.abs(de)<10)return;if(Math.abs(be)>Math.abs(de)){if(t.length<=1)return;C.current="horizontal"}else if(de>0)C.current="vertical";else return}if(C.current==="horizontal"){y.current=!0,X(!0),x.current=be,E(be),Ee.preventDefault();return}C.current==="vertical"&&(y.current=!0,X(!0),f.current=de,I(de),Ee.preventDefault())},Fe=()=>{if(!h.current)return;const Ee=C.current,Y=y.current;if(Y&&Ee==="horizontal")ce(x.current),ye();else if(Y&&Ee==="vertical")if(f.current>rb){const de=window.innerHeight;f.current=de,L(!0),I(de),H("closing")}else f.current=0,I(0),ye();else Ee==="horizontal"&&Math.abs(x.current)>0&&(ce(x.current),ye());h.current=null,C.current="none",x.current=0,y.current=!1,X(!1)};return document.addEventListener("touchstart",le,{passive:!0}),document.addEventListener("touchmove",Ce,{passive:!1}),document.addEventListener("touchend",Fe),document.addEventListener("touchcancel",Fe),()=>{document.removeEventListener("touchstart",le),document.removeEventListener("touchmove",Ce),document.removeEventListener("touchend",Fe),document.removeEventListener("touchcancel",Fe),oe()}},[T,t.length,d,l,M,j,se]),s.useEffect(()=>{const pe=oe=>{oe.key==="Escape"&&(oe.preventDefault(),oe.stopPropagation(),T!=="closing"&&H("closing"))};return window.addEventListener("keydown",pe,!0),()=>window.removeEventListener("keydown",pe,!0)},[T]);const k=()=>{T!=="closing"&&H("closing")},G=T==="open",he=T==="closing",J=$>0?Math.max(0,1-$/500):1,ee=$>0?Math.max(.35,1-$/500):1,O=pe=>{if(pe.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const oe=pe.currentTarget.getBoundingClientRect(),ye=pe.clientY-oe.top,U=Math.min(52,oe.height*.2);if(!(ye>oe.height-U)){if(pe.clientX-oe.left<oe.width/2){l();return}d()}},Z=pe=>{if(t.length<=1)return;const oe=pe.currentTarget.getBoundingClientRect(),ye=pe.clientX-oe.left,U=pe.clientY-oe.top,ce=Math.min(52,oe.height*.2);if(U>oe.height-ce){pe.currentTarget.style.cursor="default";return}pe.currentTarget.style.cursor=ye<oe.width/2?"w-resize":"e-resize"},te=s.useCallback(pe=>{pe.propertyName!=="transform"||!B.current||(se(),M(!1))},[se,M]),Le=re?`translateX(${P}px)`:$>0?`translateY(${$}px)`:void 0,ve={position:"fixed",top:q==null?void 0:q.top,left:q==null?void 0:q.left,width:q==null?void 0:q.width,height:q==null?void 0:q.height,objectFit:i==="cover"?"cover":"contain",transform:Le,opacity:$>0?ee:T==="opening"||he?0:1,transition:F&&!g?"none":g?`transform ${An}ms ${yi}`:ie?`transform ${An}ms ${yi}, opacity ${An}ms ${yi}`:T==="opening"||he?`opacity ${An}ms ${yi}`:"none",pointerEvents:ae&&G&&!re?"auto":"none",touchAction:ae&&G?"none":void 0,zIndex:9998},Ie=q?{position:"fixed",top:q.top,height:q.height,width:q.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:T==="open"?"none":void 0},onClick:k,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:G?J:0,transition:F?"none":`opacity ${An}ms ${yi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:w,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:G?1:0,transition:`opacity ${An}ms ${yi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:w,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:G?1:0,transition:`opacity ${An}ms ${yi}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),q&&V&&(ae?a.jsx(xb,{src:V.url,phase:T,mediaRef:m,mediaStyle:ve,onLoadedMetadata:b,onClick:O,onMouseMove:Z,onTransitionEnd:te},`${n}-${V.url}`):a.jsx("img",{ref:m,src:V.url,alt:V.name,onLoad:b,onTransitionEnd:te,style:ve},`${n}-${V.url}`)),G&&Ie&&t.length>1&&!ae&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ie,left:q.left,cursor:"w-resize",pointerEvents:re?"none":"auto"},onClick:pe=>{if(S.current){S.current=!1;return}pe.stopPropagation(),l()}}),a.jsx("div",{style:{...Ie,left:q.left+q.width/2,cursor:"e-resize",pointerEvents:re?"none":"auto"},onClick:pe=>{if(S.current){S.current=!1;return}pe.stopPropagation(),d()}})]})]})}function gc({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const v=`${e}-gallery-${ss(t)?"video":"image"}`,w=r.display==="cover",m=yb(r),h=T=>W.scalingValue(T,l??!1),f=n??Oi,x=o?{width:"100%",maxWidth:"100%"}:{width:h(f),maxWidth:"100%"},C=i?{borderRadius:h(i)}:{},y={...x,...w?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...C},S={...w?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(f)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...w?{}:C},N={className:v,style:S,onClick:p?T=>{T.stopPropagation(),p()}:void 0},q=Math.max(d,vi),D=ss(t)?a.jsx("video",{...N,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...N,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[w?a.jsx("div",{style:y,children:D}):D,c&&d>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(q)}})]})}function wb({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const v=t==="a"?i:t==="c"?o:0,w=v>0||c;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&w&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&w&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function Sb(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function hc({P:e,scaled:t,height:n,paired:i}){return a.jsx("div",{"data-controls":"titleTopPadding",...i?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:t(n)}})}function fc({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:d}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function Oa({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:r,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=s.useRef(null),[v,w]=s.useState(0),m=t??"",h=n==="left"||n==="center"||n==="right";return s.useLayoutEffect(()=>{if(!h)return;const f=p.current;if(!f||typeof ResizeObserver>"u")return;const x=()=>w(f.offsetHeight);x();const C=new ResizeObserver(x);return C.observe(f),()=>C.disconnect()},[m,h]),a.jsx("div",{ref:f=>{p.current=f,i(f)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${v}px`}:{},...r},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,a.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("span",{className:`${e}-title-text`,style:d,children:m})})]})})}const yc=45;function vc(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function Cb(e){const t=vc(e,"--cntrl-viewport-height",window.innerHeight),n=vc(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function $b(e,t,n){const{top:i,centerY:o}=Cb(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const r=e.top+e.height/2;return Math.abs(r-o)}function Tb(e,t,n){const i=Array.from({length:t},(l,d)=>{const c=e.current[d];if(!c)return 0;const u=c.getBoundingClientRect(),p=$b(u,n,c);return Math.exp(-(p*p)/(2*yc*yc))});let o=0,r=-1;return i.forEach((l,d)=>{l>r&&(r=l,o=d)}),{opacities:i,dominantIndex:o}}function Ib(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(Tb(i,e,n))},p=()=>{c||(c=window.requestAnimationFrame(()=>{c=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{c&&window.cancelAnimationFrame(c),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:c=>u=>{i.current[c]=u},opacities:o,dominantIndex:r}}function Rb(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),d=Math.max(r.length,l.length);if(d===0||o.current===e)return;let c=0;const u=window.setInterval(()=>{c+=1;const p=[...l.slice(0,c),...r.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function Lb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var tt;const{prefix:l}=W.useScopedStyles(),d=s.useMemo(()=>ib(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",v=(e==null?void 0:e.imgWidth)??Oi,w=(e==null?void 0:e.titleWidth)??hb,m=fb(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??tb,f=(e==null?void 0:e.position)??"center",x=(e==null?void 0:e.titleTopPadding)??0,C=(e==null?void 0:e.titleLeftPadding)??0,y=(e==null?void 0:e.titleRightPadding)??0,S=Sb(e==null?void 0:e.transition),B=(e==null?void 0:e.lightbox)??"on",N=p==="b",q=S==="fade"||S==="retype",{setTitleRef:D,dominantIndex:T}=Ib(c.length,q,f),H=((tt=c[T])==null?void 0:tt.title)??"",$=Rb(H,S==="retype"),I=S==="fade"||S==="retype",P=S==="retype"?$:H,E=N?void 0:{width:W.scalingValue(v,n??!1)},g=B==="on"&&(!n||i||o),z=o??!1,F=(e==null?void 0:e.galleryPaddingRight)??0,X=(e==null?void 0:e.galleryPaddingLeft)??0,ie=(e==null?void 0:e.galleryPaddingBetween)??0,L=nt=>W.scalingValue(nt,n??!1),V={width:L(w)},ae=p==="a"?F:X,re=N?{width:"100%"}:{width:`calc(100% - ${L(v)} - ${L(ae)})`,...p==="c"?{marginLeft:"auto"}:{}},M=Math.max(F,vi),se=Math.max(X,vi),j=Math.max(ie,vi),b=Math.max(x,vi),k=Math.max(C,vi),G=Math.max(y,vi),he=Math.max(0,(u??1)-(v??Oi)),J=p==="a"?Math.max(0,(u??1)-(v??Oi)-F):p==="c"?Math.max(0,(u??1)-(v??Oi)-X):p==="b"?u??1:1,ee=z&&(p==="a"||p==="b"||p==="c")&&f==="top",O=z&&((p==="a"||p==="b")&&(f==="left"||f==="top")||p==="c"&&(f==="left"||f==="top")),Z=z&&((p==="c"||p==="b")&&f==="right"||p==="a"&&f==="right"),te=c.length>1,Le=N?void 0:L((p==="c"?X:F)+(v??Oi)),ve=p==="c"&&Le?{left:Le}:void 0,Ie=p==="a"&&Le?{right:Le}:void 0,pe=N?{left:0,width:"100%"}:p==="a"?{right:L(F),width:L(v)}:{left:L(X),width:L(v)},{titleColor:oe,titleFontFamily:ye,titleFontSettings:U,titleFontSize:ce,titleLineHeight:le,titleLetterSpacing:Ce,titleWordSpacing:Fe,titleAlign:Ee,titleTextAppearance:Y,lightboxCounterColor:be,lightboxCounterFontFamily:de,lightboxCounterFontSettings:K,lightboxCounterFontSize:ue,lightboxCounterLineHeight:He,lightboxCounterLetterSpacing:fe,lightboxCounterWordSpacing:Q,lightboxCounterTextAppearance:Je}=e??{},Ne={fontSettings:{fontFamily:ye,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:le,letterSpacing:Ce??0,wordSpacing:Fe??0,textAlign:Ee??"left",textAppearance:Y,color:oe??"#000000"},Ke=an(Ut(Ne,n)),ut=V,lt=mc(ce,le,l,n),Ye=pc(ce,le,`${l}-title`,`${l}-text-tight-leading`),Re={fontSettings:{fontFamily:de,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:ue??.01,lineHeight:He,letterSpacing:fe??0,wordSpacing:Q??0,textAppearance:Je,color:be??"#DEDDDD"},Be={...an(Ut(Re,n)),...mc(ue,He,l,n)},Ue=pc(ue,He,`${l}-lightbox-counter`,`${l}-text-tight-leading`),ge=W.buildColorVars(l,{titleColor:oe??"#000000",lightboxCounterColor:be??"#DEDDDD"},sb,lb),xe=s.useRef(null),[_e,Ze]=s.useState(!1),[we,$e]=s.useState([]),[Xe,ze]=s.useState(0),Te=s.useCallback((nt,st)=>{g&&($e(nt),ze(st),Ze(!0))},[g]),Ve=s.useCallback(()=>{Ze(!1)},[]),De=s.useMemo(()=>{const nt={...ge},st=xe.current?getComputedStyle(xe.current).getPropertyValue("--cntrl-article-width").trim():"";return st&&(nt["--cntrl-article-width"]=st),nt},[ge,_e]);return s.useEffect(()=>{if(!_e||B!=="on"||typeof document>"u")return;const nt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=nt}},[_e,B]),s.useEffect(()=>{!n||o||i||Ze(!1)},[n,o,i]),s.useEffect(()=>{B==="off"&&Ze(!1)},[B]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{style:ge,children:a.jsxs("div",{ref:xe,className:`${l}-wrapper`,style:{width:W.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&f==="top"?L(x):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(f==="left"||f==="top")||p==="c"&&(f==="left"||f==="top")?L(C):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&f==="right"||p==="a"&&f==="right"?L(y):void 0},children:[I&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Oa,{P:l,title:P,position:f,titleRef:()=>{},titleClassName:`${Ye} ${l}-single-title`,titleContainerStyle:{...lt,...re},titleTextBoxStyle:ut,titleStyle:Ke,showTextBoxOutline:z,topPaddingControl:ee?hc({P:l,scaled:L,height:b,paired:!1}):void 0})}),c.map((nt,st)=>{const St=pb(nt.gallery),Bt=st<c.length-1,zt=St.filter(wt=>wt.lightboxMedia).map(wt=>wt.lightboxMedia),ft={P:l,position:f,titleRef:D(st),titleClassName:Ye,titleContainerStyle:lt,titleTextBoxStyle:I?{maxWidth:"100%"}:ut,titleStyle:Ke,showTextBoxOutline:z&&!I,topPaddingControl:ee&&!I?hc({P:l,scaled:L,height:b,paired:te}):void 0};return a.jsxs("div",{"data-item-index":st,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Bt?L(ie):void 0},children:[O&&fc({P:l,controlKey:"titleLeftPadding",scaled:L,width:k,maxFraction:J,side:"left",paired:te,anchorStyle:ve}),Z&&fc({P:l,controlKey:"titleRightPadding",scaled:L,width:G,maxFraction:J,side:"right",paired:te,anchorStyle:Ie}),z&&Bt&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:L(j),...pe}}),N?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:St.map(({displayMedia:wt,lightboxMedia:jt},At)=>{const xt=jt?zt.findIndex(Ft=>Ft.url===jt.url):-1;return a.jsx(gc,{P:l,media:wt,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:At<St.length-1,showControls:z,onMediaClick:g&&xt>=0?()=>Te(zt,xt):void 0},`${wt.url}-${At}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Oa,{...ft,title:I?"":nt.title})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Oa,{...ft,title:I?"":nt.title}),St.length>0&&a.jsx(wb,{P:l,layoutType:p,galleryWidthStyle:E,galleryPaddingRight:F,galleryPaddingLeft:X,galleryPaddingRightWidth:M,galleryPaddingLeftWidth:se,galleryPaddingMaxFraction:he,showControls:z,scaled:L,children:St.map(({displayMedia:wt,lightboxMedia:jt},At)=>{const xt=jt?zt.findIndex(Ft=>Ft.url===jt.url):-1;return a.jsx(gc,{P:l,media:wt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:At<St.length-1,showControls:z,onMediaClick:g&&xt>=0?()=>Te(zt,xt):void 0},`${wt.url}-${At}`)})})]})]},st)})]})}),_e&&B==="on"&&typeof document<"u"&&e&&(()=>{const nt=(r?document.getElementById(r):null)??document.body;return zn.createPortal(a.jsx("div",{style:De,"data-selection":"none",children:a.jsx(bb,{prefix:l,items:we,index:Xe,imageDisplay:vb(e.lightboxImageDisplay),isEditor:n,onClose:Ve,onPrev:()=>ze(st=>(st-1+we.length)%we.length),onNext:()=>ze(st=>(st+1)%we.length),counterClassName:Ue,counterStyle:Be,backgroundColor:e.backgroundColor??ob})}),nt)})()]})}const Pb=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
20964
20964
  import { createPortal } from 'react-dom';
20965
20965
  import type React from 'react';
20966
20966
  import { CommonComponentProps } from '../props';
@@ -23010,7 +23010,7 @@ export function Mercury({
23010
23010
  </>
23011
23011
  );
23012
23012
  }
23013
- `;function Fi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Oa={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},Rb={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"}},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"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.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"}]},{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-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-12.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{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"}}},galleryPaddingRight:Fi("Gallery Padding Right"),galleryPaddingLeft:Fi("Gallery Padding Left"),galleryPaddingBetween:Fi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right","top"]}},titleTopPadding:Fi("Title Top Padding"),titleLeftPadding:Fi("Title Left Padding"),titleRightPadding:Fi("Title Right Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Oa.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"}},titleAlign:{...Oa.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Oa.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:{type:"a",position:"left",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,cornerRadius:8/375,position:"left",titleFontSize:30/375,titleLineHeight:25/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{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"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},Lb={element:Tb,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:Rb,sourceCode:Ib,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},hc=48,Pb=10,Eb=400,Mb=1,kb=1120/1440,Ab=140/1440,Fb=550/1440,_b=13,Nb=4,Wb=38/100,Hb=28/100,Gd=2.8,Db=.9,Xd=.22,Ob=.5,Bb=1,zb=1.5,jb=0,Vb=.85;function Gb(e,t){return`
23013
+ `;function Ni(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ba={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},Eb={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"}},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"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.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"}]},{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-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-12.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{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"}}},galleryPaddingRight:Ni("Gallery Padding Right"),galleryPaddingLeft:Ni("Gallery Padding Left"),galleryPaddingBetween:Ni("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right","top"]}},titleTopPadding:Ni("Title Top Padding"),titleLeftPadding:Ni("Title Left Padding"),titleRightPadding:Ni("Title Right Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Ba.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"}},titleAlign:{...Ba.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Ba.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:{type:"a",position:"left",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,cornerRadius:8/375,position:"left",titleFontSize:30/375,titleLineHeight:25/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{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"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},Mb={element:Lb,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:Eb,sourceCode:Pb,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},xc=48,kb=10,Ab=400,Fb=1,_b=1120/1440,Nb=140/1440,Wb=550/1440,Hb=13,Db=4,Ob=38/100,Bb=28/100,Ud=2.8,zb=.9,Kd=.22,jb=.5,Vb=1,Gb=1.5,Xb=0,qb=.85;function Yb(e,t){return`
23014
23014
  .${e}-wrapper {
23015
23015
  position: relative;
23016
23016
  box-sizing: border-box;
@@ -23055,10 +23055,10 @@ export function Mercury({
23055
23055
  object-position: center;
23056
23056
  }
23057
23057
  ${t}
23058
- `}function Ko(e){return Number(e.toFixed(4))}function fc(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Ba(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Xb(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function qb(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Yb(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function qd(e,t){return(1-e)/(1-e*Math.cos(t))}function Ub(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*qd(e,i)))}return t||1}function Kb(e,t){return e?1:1+Xd*(.35+t)}function Zb(e,t,n,i){const o=t*Kb(n,i);return Math.max(0,(e-o)/2)}function Yd(e,t,n){const i=qd(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function Ud(e,t,n){return e/2+t*n}function Jb(e,t,n){return e(t-n/2)}function Qb(e,t){return e*t}function Kd(e){return Math.round(e*1e3)}function Zd(e,t,n){const i=Math.cos(e),o=Math.cos(Vb*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Ko(t+(n-t)*r)}function Jd(e){return Zd(e,Ob,Bb)}function ew(e){return Zd(e,zb,jb)}function Qd(e,t){if(!t)return"none";const n=ew(e);return n<=0?"none":`blur(${n}px)`}function tw(e,t,n,i,o,r,l,d){const{offset:c,scale:u}=Yd(i,o,r*Math.PI*2),p=r*Math.PI*2,x=Ud(t,n,c),b=Ko(u),g=`calc(${e(x)} - var(--helix-base-w) * ${b} / 2)`,h=`calc(var(--helix-base-w) * ${b})`,f=l?`height: calc(var(--helix-base-h) * ${b});`:"";return`left: ${g}; width: ${h}; ${f} z-index: ${Kd(u)}; transform: translateY(-50%); opacity: ${Jd(p)}; filter: ${Qd(p,d)};`}function nw(e,t,n,i,o,r,l,d){const c=[];for(let u=0;u<=hc;u+=1){const p=u/hc;c.push(` ${Ko(p*100)}% { ${tw(t,n,i,o,r,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23058
+ `}function Jo(e){return Number(e.toFixed(4))}function bc(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function za(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Ub(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function Kb(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Zb(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function Zd(e,t){return(1-e)/(1-e*Math.cos(t))}function Jb(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*Zd(e,i)))}return t||1}function Qb(e,t){return e?1:1+Kd*(.35+t)}function ew(e,t,n,i){const o=t*Qb(n,i);return Math.max(0,(e-o)/2)}function Jd(e,t,n){const i=Zd(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function Qd(e,t,n){return e/2+t*n}function tw(e,t,n){return e(t-n/2)}function nw(e,t){return e*t}function eu(e){return Math.round(e*1e3)}function tu(e,t,n){const i=Math.cos(e),o=Math.cos(qb*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Jo(t+(n-t)*r)}function nu(e){return tu(e,jb,Vb)}function iw(e){return tu(e,Gb,Xb)}function iu(e,t){if(!t)return"none";const n=iw(e);return n<=0?"none":`blur(${n}px)`}function ow(e,t,n,i,o,r,l,d){const{offset:c,scale:u}=Jd(i,o,r*Math.PI*2),p=r*Math.PI*2,v=Qd(t,n,c),w=Jo(u),m=`calc(${e(v)} - var(--helix-base-w) * ${w} / 2)`,h=`calc(var(--helix-base-w) * ${w})`,f=l?`height: calc(var(--helix-base-h) * ${w});`:"";return`left: ${m}; width: ${h}; ${f} z-index: ${eu(u)}; transform: translateY(-50%); opacity: ${nu(p)}; filter: ${iu(p,d)};`}function rw(e,t,n,i,o,r,l,d){const c=[];for(let u=0;u<=xc;u+=1){const p=u/xc;c.push(` ${Jo(p*100)}% { ${ow(t,n,i,o,r,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23059
23059
  ${c.join(`
23060
23060
  `)}
23061
- }`}function eu(e,t){return(e%t+t)%t}function iw(e,t){return Gs(e,t)/t}function Gs(e,t){return eu(e,t)}function ow(e,t){return Math.floor(e/t)}function rw(e,t,n,i){return ow(e,t)*n+Gs(e,t)*i}function aw(e,t,n){const i=n==="left"?1-e:e;return`${Ko(-i*t)}s`}function yc(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function tu(e){const t=e%1;return t<0?t+1:t}function sw(e,t,n){const i=t/Gd,o=n==="left"?-e*i:e*i;return tu(o)}function lw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=H.useScopedStyles(),r=s.useRef(null),l=Ba((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),kb),d=Ba(e==null?void 0:e.imageWidth,Ab),c=Ba(e==null?void 0:e.turnHeight,Fb),u=fc(e==null?void 0:e.itemsPerTurn,_b,3,40),p=fc(e==null?void 0:e.turns,Nb,1,30),x=Math.min(Db,Math.max(0,Wb)),b=Math.min(1,Math.max(0,Hb)),g=Math.max(0,(e==null?void 0:e.speed)??Gd),h=(e==null?void 0:e.direction)==="left"?"left":"right",f=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",v=(e==null?void 0:e.cornerRadius)??0,C=(e==null?void 0:e.blur)!=="off",y=s.useMemo(()=>Xb(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),T=y.display==="cover",W=re=>H.scalingValue(re,n??!1),_=s.useMemo(()=>Ub(x),[x]),X=s.useMemo(()=>Zb(l,d,T,b),[l,d,T,b]),D=s.useMemo(()=>Gb(o,nw(o,W,l,X,x,_,T,C)),[o,l,X,x,_,T,C,n]),w=s.useMemo(()=>(t??[]).filter(re=>{var M;return!!((M=re.image)!=null&&M.url)}),[t]),R=c/u,m=d*qb(y),E=Math.min(Eb,p*u),I=Mb*u,J=E+I*2,Q=Math.max(0,p-1)*c+(u-1)*R,q=g>0,Y=f==="scroll"&&q,oe=f==="autoplay"&&q&&(n?!!i:!0),[L,N]=s.useState(0);s.useEffect(()=>{if(!Y)return;const re=r.current;if(!re)return;const M=()=>{const $=re.getBoundingClientRect(),F=window.innerHeight||document.documentElement.clientHeight,O=F+$.height;O<=0||N(Math.min(1,Math.max(0,(F-$.top)/O)))};M(),window.addEventListener("scroll",M,{passive:!0}),window.addEventListener("resize",M);const S=new ResizeObserver(M);return S.observe(re),()=>{window.removeEventListener("scroll",M),window.removeEventListener("resize",M),S.disconnect()}},[Y]);const V=Y?sw(L,g,h):0,de=q&&f==="autoplay"?360/(g*Pb):0;return w.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:W(l),marginInline:"auto"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:W(l),height:W(Q),marginInline:"auto"},children:Array.from({length:J},(re,M)=>{const S=M-I,F=w[eu(S,w.length)].image,O=Gs(S,u),te=iw(S,u),xe=Y?tu(te+V):te,ne=rw(S,u,c,R),ae=b===0?0:(yc(O+7.3)-.5)*b*R,Z=T?1:1+(yc(O+3.1)-.5)*2*Xd*(.35+b),B=xe*Math.PI*2,{offset:G,scale:$e}=Yd(x,_,B),he=d*Z,Re=Qb(he,$e),ge=Ud(l,X,G),ye={"--helix-base-w":W(he),...T?{"--helix-base-h":W(m)}:{}},Se={top:W(ne+ae),transform:"translateY(-50%)",...ye,...oe?{animationDuration:`${Ko(de)}s`,animationDelay:aw(te,de,h),animationDirection:h==="left"?"reverse":"normal"}:{left:Jb(W,ge,Re),width:W(Re),...T?{height:W(m*$e)}:{},zIndex:Kd($e),opacity:Jd(B),filter:Qd(B,C)}},ee=v>0?{borderRadius:W(v)}:{},ce=T?{...ee,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:ee,ue=Yb(F)?a.jsx("video",{className:`${o}-media`,style:ce,src:F.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:ce,src:F.url,alt:F.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{className:oe?`${o}-item`:`${o}-item ${o}-item-static`,style:Se,children:T?a.jsx("div",{className:`${o}-cover`,style:ee,children:ue}):ue},`${p}-${u}-${S}`)})})]})}const cw=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23061
+ }`}function ou(e,t){return(e%t+t)%t}function aw(e,t){return Us(e,t)/t}function Us(e,t){return ou(e,t)}function sw(e,t){return Math.floor(e/t)}function lw(e,t,n,i){return sw(e,t)*n+Us(e,t)*i}function cw(e,t,n){const i=n==="left"?1-e:e;return`${Jo(-i*t)}s`}function wc(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ru(e){const t=e%1;return t<0?t+1:t}function dw(e,t,n){const i=t/Ud,o=n==="left"?-e*i:e*i;return ru(o)}function uw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=W.useScopedStyles(),r=s.useRef(null),l=za((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),_b),d=za(e==null?void 0:e.imageWidth,Nb),c=za(e==null?void 0:e.turnHeight,Wb),u=bc(e==null?void 0:e.itemsPerTurn,Hb,3,40),p=bc(e==null?void 0:e.turns,Db,1,30),v=Math.min(zb,Math.max(0,Ob)),w=Math.min(1,Math.max(0,Bb)),m=Math.max(0,(e==null?void 0:e.speed)??Ud),h=(e==null?void 0:e.direction)==="left"?"left":"right",f=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",x=(e==null?void 0:e.cornerRadius)??0,C=(e==null?void 0:e.blur)!=="off",y=s.useMemo(()=>Ub(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),S=y.display==="cover",B=re=>W.scalingValue(re,n??!1),N=s.useMemo(()=>Jb(v),[v]),q=s.useMemo(()=>ew(l,d,S,w),[l,d,S,w]),D=s.useMemo(()=>Yb(o,rw(o,B,l,q,v,N,S,C)),[o,l,q,v,N,S,C,n]),T=s.useMemo(()=>(t??[]).filter(re=>{var M;return!!((M=re.image)!=null&&M.url)}),[t]),H=c/u,$=d*Kb(y),I=Math.min(Ab,p*u),P=Fb*u,E=I+P*2,z=Math.max(0,p-1)*c+(u-1)*H,F=m>0,X=f==="scroll"&&F,ie=f==="autoplay"&&F&&(n?!!i:!0),[L,_]=s.useState(0);s.useEffect(()=>{if(!X)return;const re=r.current;if(!re)return;const M=()=>{const j=re.getBoundingClientRect(),b=window.innerHeight||document.documentElement.clientHeight,k=b+j.height;k<=0||_(Math.min(1,Math.max(0,(b-j.top)/k)))};M(),window.addEventListener("scroll",M,{passive:!0}),window.addEventListener("resize",M);const se=new ResizeObserver(M);return se.observe(re),()=>{window.removeEventListener("scroll",M),window.removeEventListener("resize",M),se.disconnect()}},[X]);const V=X?dw(L,m,h):0,ae=F&&f==="autoplay"?360/(m*kb):0;return T.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:B(l),marginInline:"auto"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:B(l),height:B(z),marginInline:"auto"},children:Array.from({length:E},(re,M)=>{const se=M-P,b=T[ou(se,T.length)].image,k=Us(se,u),G=aw(se,u),he=X?ru(G+V):G,J=lw(se,u,c,H),ee=w===0?0:(wc(k+7.3)-.5)*w*H,O=S?1:1+(wc(k+3.1)-.5)*2*Kd*(.35+w),Z=he*Math.PI*2,{offset:te,scale:Le}=Jd(v,N,Z),ve=d*O,Ie=nw(ve,Le),pe=Qd(l,q,te),oe={"--helix-base-w":B(ve),...S?{"--helix-base-h":B($)}:{}},ye={top:B(J+ee),transform:"translateY(-50%)",...oe,...ie?{animationDuration:`${Jo(ae)}s`,animationDelay:cw(G,ae,h),animationDirection:h==="left"?"reverse":"normal"}:{left:tw(B,pe,Ie),width:B(Ie),...S?{height:B($*Le)}:{},zIndex:eu(Le),opacity:nu(Z),filter:iu(Z,C)}},U=x>0?{borderRadius:B(x)}:{},ce=S?{...U,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:U,le=Zb(b)?a.jsx("video",{className:`${o}-media`,style:ce,src:b.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:ce,src:b.url,alt:b.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{className:ie?`${o}-item`:`${o}-item ${o}-item-static`,style:ye,children:S?a.jsx("div",{className:`${o}-cover`,style:U,children:le}):le},`${p}-${u}-${se}`)})})]})}const pw=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23062
23062
  import { CommonComponentProps } from '../props';
23063
23063
  import { scalingValue } from '../utils/scalingValue';
23064
23064
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -23596,7 +23596,7 @@ export function Helix({
23596
23596
  </>
23597
23597
  );
23598
23598
  }
23599
- `,dw=["https://cdn.cntrl.site/component-assets/Helix-default-1.png","https://cdn.cntrl.site/component-assets/Helix-default-2.png","https://cdn.cntrl.site/component-assets/Helix-default-3.png","https://cdn.cntrl.site/component-assets/Helix-default-4.png","https://cdn.cntrl.site/component-assets/Helix-default-5.png"],uw={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},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"]}}}}},default:dw.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},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"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},pw={element:lw,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:uw,sourceCode:cw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},za=typeof window>"u"?s.useEffect:s.useLayoutEffect,Do=120,vc=3,mw=.12,ja=.25,gw=10,hw=4e3,fw=.12,yw=3,vw=3,nu=["rectangle","ellipse","circle","triangle-up","triangle-down","diamond","hourglass","teardrop","leaf","wave","custom"];function Or(e){return e<0?0:e>1?1:e}function xw(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function bw(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const c of e)for(const u of c){const p=u.x*t.width,x=u.y*t.height;p<n&&(n=p),p>o&&(o=p),x<i&&(i=x),x>r&&(r=x)}const l=o-n,d=r-i;return!isFinite(l)||!isFinite(d)||l<=0||d<=0?null:{x:n,y:i,width:l,height:d}}function yo(e){return e.map(([t,n])=>({x:t,y:n}))}function Va(e,t=Do){const n=[];for(let i=0;i<t;i+=1)n.push(e(i/t));return n}function Rr(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const d of e)for(const c of d)c.x<t&&(t=c.x),c.x>i&&(i=c.x),c.y<n&&(n=c.y),c.y>o&&(o=c.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(d=>d.map(c=>({x:(c.x-t)/r,y:(c.y-n)/l})))}function iu(e,t){switch(e){case"ellipse":return[Va(n=>{const i=n*Math.PI*2;return{x:.5+Math.cos(i)*.5,y:.5+Math.sin(i)*.5}})];case"circle":{const n=t>=1?.5/t:.5,i=t>=1?.5:.5*t;return[Va(o=>{const r=o*Math.PI*2;return{x:.5+Math.cos(r)*n,y:.5+Math.sin(r)*i}})]}case"triangle-up":return[yo([[.5,0],[1,1],[0,1]])];case"triangle-down":return[yo([[0,0],[1,0],[.5,1]])];case"diamond":return[yo([[.5,0],[1,.5],[.5,1],[0,.5]])];case"hourglass":return[yo([[0,0],[1,0],[.56,.5],[1,1],[0,1],[.44,.5]])];case"teardrop":return Rr([Va(n=>{const i=n*Math.PI*2,o=Math.cos(i);return{x:.5+Math.sin(i)*Math.pow(Math.sin(i/2),2)*.5,y:.5-o*.5}})]);case"leaf":{const n=Math.round(Do/2),i=[];for(let o=0;o<=n;o+=1){const r=o/n;i.push({x:.5+Math.sin(Math.PI*r)*.5,y:r})}for(let o=n;o>=0;o-=1){const r=o/n;i.push({x:.5-Math.sin(Math.PI*r)*.5,y:r})}return[i]}case"wave":{const o=Do,r=[];for(let l=0;l<=o;l+=1){const d=l/o;r.push({x:.09+Math.sin(Math.PI*2*2*d)*.09,y:d})}for(let l=o;l>=0;l-=1){const d=l/o;r.push({x:1-.09+Math.sin(Math.PI*2*2*d+Math.PI/3)*.09,y:d})}return[r]}case"rectangle":case"custom":default:return[yo([[0,0],[1,0],[1,1],[0,1]])]}}const ou={x:0,y:0,width:100,height:100};function ww(e){const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?ou:{x:t[0],y:t[1],width:t[2],height:t[3]}}function Lr(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}const ls=16,Sw=12,$w=16,Br="0 0 100 100",zr=100,Ga=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,Cw=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;function Tw(e){const t=e.match(Cw);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function gn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function cs(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function on(e){return{x:e.x,y:e.y}}function Iw(e){return{p:on(e.p),in:e.in?on(e.in):null,out:e.out?on(e.out):null}}function Ln(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(Iw)}))}function Qn(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function xc(e,t,n,i=n){return Qn(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function Rw(e,t,n,i,o,r,l){let d=Math.abs(t),c=Math.abs(n);if(!d||!c||e.x===l.x&&e.y===l.y)return[{c1:on(e),c2:on(l),p:on(l)}];const u=i*Math.PI/180,p=Math.cos(u),x=Math.sin(u),b=(e.x-l.x)/2,g=(e.y-l.y)/2,h=p*b+x*g,f=-x*b+p*g,v=h*h/(d*d)+f*f/(c*c);if(v>1){const oe=Math.sqrt(v);d*=oe,c*=oe}const C=o===r?-1:1,y=d*d*f*f+c*c*h*h,T=Math.max(0,d*d*c*c-y),W=y===0?0:C*Math.sqrt(T/y),_=W*d*f/c,X=-W*c*h/d,D=p*_-x*X+(e.x+l.x)/2,w=x*_+p*X+(e.y+l.y)/2,R=Math.atan2((f-X)/c,(h-_)/d);let E=Math.atan2((-f-X)/c,(-h-_)/d)-R;!r&&E>0&&(E-=Math.PI*2),r&&E<0&&(E+=Math.PI*2);const I=Math.max(1,Math.ceil(Math.abs(E)/(Math.PI/2))),J=E/I,A=4/3*Math.tan(J/4),Q=(oe,L)=>({x:D+p*d*oe-x*c*L,y:w+x*d*oe+p*c*L}),q=[];let Y=R;for(let oe=0;oe<I;oe+=1){const L=Y+J,N=Math.cos(Y),V=Math.sin(Y),de=Math.cos(L),re=Math.sin(L);q.push({c1:Q(N-A*V,V+A*N),c2:Q(de+A*re,re-A*de),p:oe===I-1?on(l):Q(de,re)}),Y=L}return q}function Oo(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},d=null,c=null;const u=()=>{if(o&&i.length>2){const g=i[0],h=i[i.length-1];Math.abs(g.p.x-h.p.x)<1e-6&&Math.abs(g.p.y-h.p.y)<1e-6&&(g.in=h.in??g.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(g,h)=>{i.push({p:g,in:h??null,out:null}),r=g},x=g=>{i.length&&(i[i.length-1].out=g)};Ga.lastIndex=0;let b=Ga.exec(t);for(;b!==null;){const g=b[1],h=g.toUpperCase(),f=g!==h,v=Tw(b[2]),C=y=>f?{x:r.x+v[y],y:r.y+v[y+1]}:{x:v[y],y:v[y+1]};if(h==="Z")o=!0,u(),r=on(l),d=null,c=null;else if(h==="M"){for(let y=0;y+1<v.length;y+=2){const T=C(y);y===0&&(u(),l=on(T)),p(T)}d=null,c=null}else if(h==="L"){for(let y=0;y+1<v.length;y+=2)p(C(y));d=null,c=null}else if(h==="H"){for(const y of v)p({x:f?r.x+y:y,y:r.y});d=null,c=null}else if(h==="V"){for(const y of v)p({x:r.x,y:f?r.y+y:y});d=null,c=null}else if(h==="C"){for(let y=0;y+5<v.length;y+=6){const T=C(y),W=C(y+2),_=C(y+4);x(T),p(_,W),d=W}c=null}else if(h==="S"){for(let y=0;y+3<v.length;y+=4){const T=d?cs(d,r):on(r),W=C(y),_=C(y+2);x(T),p(_,W),d=W}c=null}else if(h==="Q")for(let y=0;y+3<v.length;y+=4){const T=C(y),W=C(y+2);x(gn(r,T,2/3)),p(W,gn(W,T,2/3)),c=T,d=null}else if(h==="T")for(let y=0;y+1<v.length;y+=2){const T=c?cs(c,r):on(r),W=C(y);x(gn(r,T,2/3)),p(W,gn(W,T,2/3)),c=T,d=null}else if(h==="A")for(let y=0;y+6<v.length;y+=7){const T=f?{x:r.x+v[y+5],y:r.y+v[y+6]}:{x:v[y+5],y:v[y+6]};for(const W of Rw(r,v[y],v[y+1],v[y+2],v[y+3]!==0,v[y+4]!==0,T))x(W.c1),p(W.p,W.c2);d=null,c=null}b=Ga.exec(t)}return u(),n}function Rn(e){return`${Number(e.toFixed(2))}`}function Zo(e,t){return!e.out&&!t.in}function bc(e,t){if(Zo(e,t))return`L${Rn(t.p.x)},${Rn(t.p.y)}`;const n=e.out??e.p,i=t.in??t.p;return`C${Rn(n.x)},${Rn(n.y)} ${Rn(i.x)},${Rn(i.y)} ${Rn(t.p.x)},${Rn(t.p.y)}`}function Bo(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Rn(i.p.x)},${Rn(i.p.y)}`);let r=i;for(const l of o)t.push(bc(r,l)),r=l;if(n.closed){const l=bc(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function ru(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function ds(e,t,n){if(Zo(e,t))return gn(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,d=3*r*r*n,c=3*r*n*n,u=n*n*n;return{x:l*e.p.x+d*i.x+c*o.x+u*t.p.x,y:l*e.p.y+d*i.y+c*o.y+u*t.p.y}}function Xs(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of ru(n)){if(Zo(o.from,o.to)){i.push(on(o.from.p));continue}for(let r=0;r<ls;r+=1)i.push(ds(o.from,o.to,r/ls))}n.closed||i.push(on(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function bi(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of Xs(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function au(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function su(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=Sw)return{closed:!0,nodes:t.map(r=>({p:on(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/$w)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:on(r),...au(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Lw(e){const t={x:0,y:0,width:zr,height:zr};if(!e||e.pathFit!=="viewbox"||e.pathViewBox!==Br||!e.customPath)return t;const n=Oo(e.customPath);if(!n.length)return t;const i=bi(n),o=i.maxX-i.minX,r=i.maxY-i.minY;return!isFinite(i.minX)||!isFinite(i.minY)||!(o>0)||!(r>0)?t:{x:i.minX,y:i.minY,width:o,height:r}}function lu(e,t,n=1){if(!e.length)return!1;const i=bi(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=Math.max(n,t.width*.5),r=Math.max(n,t.height*.5);return i.minX<t.x-o||i.minY<t.y-r||i.maxX>t.x+t.width+o||i.maxY>t.y+t.height+r}function Pw(e,t){if(!e.length)return e;const n=bi(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),d=t.x+(t.width-i*l)/2,c=t.y+(t.height-o*l)/2;return Qn(e,u=>({x:d+(u.x-n.minX)*l,y:c+(u.y-n.minY)*l}))}function Ew(e,t=1,n){const i=Lw(n),o=iu(e==="custom"?"rectangle":e,t),r=Pw(Qn(su(o),l=>({x:l.x*i.width+i.x,y:l.y*i.height+i.y})),i);return{shape:e,customPath:Bo(r),pathFit:"viewbox",pathViewBox:Br}}function wc(e,t){return t>0?Math.round(e/t)*t:e}function Mw(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,d=Ln(e),c=d[t].nodes[n];return c.p={x:o.p.x+r,y:o.p.y+l},c.in&&(c.in={x:c.in.x+r,y:c.in.y+l}),c.out&&(c.out={x:c.out.x+r,y:c.out.y+l}),d}function Sc(e,t,n,i){var r;if(!t.length)return e;const o=Ln(e);for(const{contour:l,node:d}of t){const c=(r=o[l])==null?void 0:r.nodes[d];c&&(c.p={x:c.p.x+n,y:c.p.y+i},c.in&&(c.in={x:c.in.x+n,y:c.in.y+i}),c.out&&(c.out={x:c.out.x+n,y:c.out.y+i}))}return o}function kw(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((d,c)=>c-d);for(const d of l)i=cu(i,r,d)}),i}function Aw(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const d=Ln(e),c=d[t].nodes[n];if(c[i]=on(o),r){const p=i==="in"?"out":"in";c[p]=cs(o,c.p)}return d}function Fw(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Ln(e);return r[t].nodes[n][i]=null,r}function _w(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const d=Ln(e),c=d[t].nodes,u=n+1;if(Zo(r,l))return c.splice(u,0,{p:gn(r.p,l.p,i),in:null,out:null}),{contours:d,nodeIndex:u};const p=r.out??r.p,x=l.in??l.p,b=gn(r.p,p,i),g=gn(p,x,i),h=gn(x,l.p,i),f=gn(b,g,i),v=gn(g,h,i),C=gn(f,v,i),y=(n+1)%o.nodes.length;return c[n].out=b,c[y].in=h,c.splice(u,0,{p:C,in:f,out:v}),{contours:d,nodeIndex:u}}function cu(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Ln(e);return o[t].nodes.splice(n,1),o}function Nw(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Ln(e),l=r[t].nodes[n];if(l.in||l.out)return l.in=null,l.out=null,r;const d=i.nodes.length,c=i.nodes[(n-1+d)%d].p,u=i.nodes[(n+1)%d].p,p=au(c,l.p,u);return l.in=p.in,l.out=p.out,r}function Ww(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),d={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-d.x,e.y-d.y)}}function Hw(e,t){let n=null;return e.forEach((i,o)=>{for(const r of ru(i)){const l=Zo(r.from,r.to)?1:ls;for(let d=0;d<l;d+=1){const c=d/l,u=(d+1)/l,p=Ww(t,ds(r.from,r.to,c),ds(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:c+(u-c)*p.t,distance:p.distance})}}}),n}function du(e){return!e.in&&!e.out}function Dw(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||du(r)&&n.push(r.p)})}),n}function $c(e,t,n,i,o){const r=i(t);let l=null,d=o;for(const c of e){const u=i(c),p=Math.abs(u[n]-r[n]);p<=d&&(d=p,l=c[n])}return l}function Ow(e,t="stretch",n=ou){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Oo(i),d=Xs(l);if(d.length)return t==="viewbox"?Lr(d,n):Rr(d);if(typeof document>"u")return null;const c=i.split(/(?=[Mm])/).map(x=>x.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const x of c){const b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("d",x),u.appendChild(b);let g=0;try{g=b.getTotalLength()}catch{g=0}if(!g)continue;const h=[];for(let f=0;f<Do;f+=1){const v=b.getPointAtLength(f/Do*g);h.push({x:v.x,y:v.y})}p.push(h)}return p.length?t==="viewbox"?Lr(p,n):Rr(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?Lr([r],n):Rr([r])}function Bw(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],d=o[(r+1)%o.length];(l.y<=t&&d.y>t||d.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(d.y-l.y)*(d.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=Or(n[o]),l=Or(n[o+1]);l>r&&i.push({x0:r,x1:l})}return zw(i)}function zw(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function jw(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function Vw(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function Gw(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function Xw(e,t,n,i){let o=null;for(let r=0;r<vc;r+=1){const l=Or(t+(n-t)*r/Math.max(1,vc-1)),d=Bw(e,l),c=i==="avoid"?Vw(d):d;if(o=o===null?c:jw(o,c),o.length===0)return[]}return o??[]}function uu(e){return!!e&&typeof e=="object"&&e.type==="link"}function qw(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,d)=>{for(const c of r){if(uu(c)){o(c.children??[],c.value,c.target);continue}const u=c,p=(u==null?void 0:u.text)??"";if(p.trim())for(const x of p.split(/\s+/))x&&t.push({text:x,leaf:u,href:l,target:d,para:i})}};o((n==null?void 0:n.children)??[])}),t}function Cc(e){return{...e.fontFamily&&{fontFamily:so(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"}}}function Yw(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(uu(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function Tc(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:d,height:c,allowOverflow:u,capInset:p,capLines:x}=e,b=e.lineHeight*l,g=e.spaceWidth*l,h=[];if(!t.length||d<=0||b<=0)return{segments:h,placed:0,height:0,capLeft:0,capTop:0};const f=Math.max(1,g*.5),v=b*mw;let C=0,y=0,T=0,W=t[0].para,_=0,X=0,D=null;for(;C<t.length&&T<hw;){const w=y+b>c;if(w&&!u)break;const R=t[C].para;if(R>W+1){y+=b*(R-W-1),W=R-1,T+=1;continue}let m=w?[{x0:0,x1:d}]:Xw(i,(y+v)/c,(y+b-v)/c,o).map(I=>({x0:I.x0*d,x1:I.x1*d}));p>0&&x>0&&!w&&m.length&&(D===null&&(D=T,_=m[0].x0,X=y),T-D<x&&(m=Gw(m,{x0:_,x1:_+p})));const E=m.reduce((I,J)=>Math.max(I,J.x1-J.x0),0);for(const I of m){const J=I.x1-I.x0;if(J<f)continue;if(C>=t.length||t[C].para!==R)break;const A=C;let Q=0;for(;C<t.length&&t[C].para===R;){const q=n[C]*l,Y=C===A?q:g+q;if(Q+Y>J&&!(C===A&&J>=E-.5&&q>d-.5))break;Q+=Y,C+=1}if(C>A){const q=C>=t.length||t[C].para!==R;h.push({top:y,left:I.x0,width:J,from:A,to:C,justify:r==="justify"&&!q})}if(C>=t.length||t[C].para!==R)break}W=R,y+=b,T+=1}return{segments:h,placed:C,height:h.length?y:0,capLeft:_,capTop:X}}function Uw(e){return`
23599
+ `,mw=["https://cdn.cntrl.site/component-assets/Helix-default-1.png","https://cdn.cntrl.site/component-assets/Helix-default-2.png","https://cdn.cntrl.site/component-assets/Helix-default-3.png","https://cdn.cntrl.site/component-assets/Helix-default-4.png","https://cdn.cntrl.site/component-assets/Helix-default-5.png"],gw={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},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"]}}}}},default:mw.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},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"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},hw={element:uw,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:gw,sourceCode:pw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},wr=typeof window>"u"?s.useEffect:s.useLayoutEffect,Bo=120,Sc=3,fw=.12,ja=.25,yw=10,vw=4e3,xw=.12,bw=3,ww=3,au=["rectangle","ellipse","circle","triangle-up","triangle-down","diamond","hourglass","teardrop","leaf","wave","custom"];function Br(e){return e<0?0:e>1?1:e}function Sw(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function Cw(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const c of e)for(const u of c){const p=u.x*t.width,v=u.y*t.height;p<n&&(n=p),p>o&&(o=p),v<i&&(i=v),v>r&&(r=v)}const l=o-n,d=r-i;return!isFinite(l)||!isFinite(d)||l<=0||d<=0?null:{x:n,y:i,width:l,height:d}}function xo(e){return e.map(([t,n])=>({x:t,y:n}))}function Va(e,t=Bo){const n=[];for(let i=0;i<t;i+=1)n.push(e(i/t));return n}function Pr(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const d of e)for(const c of d)c.x<t&&(t=c.x),c.x>i&&(i=c.x),c.y<n&&(n=c.y),c.y>o&&(o=c.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(d=>d.map(c=>({x:(c.x-t)/r,y:(c.y-n)/l})))}function ls(e,t){switch(e){case"ellipse":return[Va(n=>{const i=n*Math.PI*2;return{x:.5+Math.cos(i)*.5,y:.5+Math.sin(i)*.5}})];case"circle":{const n=t>=1?.5/t:.5,i=t>=1?.5:.5*t;return[Va(o=>{const r=o*Math.PI*2;return{x:.5+Math.cos(r)*n,y:.5+Math.sin(r)*i}})]}case"triangle-up":return[xo([[.5,0],[1,1],[0,1]])];case"triangle-down":return[xo([[0,0],[1,0],[.5,1]])];case"diamond":return[xo([[.5,0],[1,.5],[.5,1],[0,.5]])];case"hourglass":return[xo([[0,0],[1,0],[.56,.5],[1,1],[0,1],[.44,.5]])];case"teardrop":return Pr([Va(n=>{const i=n*Math.PI*2,o=Math.cos(i);return{x:.5+Math.sin(i)*Math.pow(Math.sin(i/2),2)*.5,y:.5-o*.5}})]);case"leaf":{const n=Math.round(Bo/2),i=[];for(let o=0;o<=n;o+=1){const r=o/n;i.push({x:.5+Math.sin(Math.PI*r)*.5,y:r})}for(let o=n;o>=0;o-=1){const r=o/n;i.push({x:.5-Math.sin(Math.PI*r)*.5,y:r})}return[i]}case"wave":{const o=Bo,r=[];for(let l=0;l<=o;l+=1){const d=l/o;r.push({x:.09+Math.sin(Math.PI*2*2*d)*.09,y:d})}for(let l=o;l>=0;l-=1){const d=l/o;r.push({x:1-.09+Math.sin(Math.PI*2*2*d+Math.PI/3)*.09,y:d})}return[r]}case"rectangle":case"custom":default:return[xo([[0,0],[1,0],[1,1],[0,1]])]}}const su={x:0,y:0,width:100,height:100};function $w(e){const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?su:{x:t[0],y:t[1],width:t[2],height:t[3]}}function Er(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}const cs=16,Tw=12,Iw=16,zr="0 0 100 100",jr=100,Ga=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,Rw=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;function Lw(e){const t=e.match(Rw);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function gn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function ds(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function on(e){return{x:e.x,y:e.y}}function Pw(e){return{p:on(e.p),in:e.in?on(e.in):null,out:e.out?on(e.out):null}}function Pn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(Pw)}))}function ei(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Cc(e,t,n,i=n){return ei(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function Ew(e,t,n,i,o,r,l){let d=Math.abs(t),c=Math.abs(n);if(!d||!c||e.x===l.x&&e.y===l.y)return[{c1:on(e),c2:on(l),p:on(l)}];const u=i*Math.PI/180,p=Math.cos(u),v=Math.sin(u),w=(e.x-l.x)/2,m=(e.y-l.y)/2,h=p*w+v*m,f=-v*w+p*m,x=h*h/(d*d)+f*f/(c*c);if(x>1){const ie=Math.sqrt(x);d*=ie,c*=ie}const C=o===r?-1:1,y=d*d*f*f+c*c*h*h,S=Math.max(0,d*d*c*c-y),B=y===0?0:C*Math.sqrt(S/y),N=B*d*f/c,q=-B*c*h/d,D=p*N-v*q+(e.x+l.x)/2,T=v*N+p*q+(e.y+l.y)/2,H=Math.atan2((f-q)/c,(h-N)/d);let I=Math.atan2((-f-q)/c,(-h-N)/d)-H;!r&&I>0&&(I-=Math.PI*2),r&&I<0&&(I+=Math.PI*2);const P=Math.max(1,Math.ceil(Math.abs(I)/(Math.PI/2))),E=I/P,g=4/3*Math.tan(E/4),z=(ie,L)=>({x:D+p*d*ie-v*c*L,y:T+v*d*ie+p*c*L}),F=[];let X=H;for(let ie=0;ie<P;ie+=1){const L=X+E,_=Math.cos(X),V=Math.sin(X),ae=Math.cos(L),re=Math.sin(L);F.push({c1:z(_-g*V,V+g*_),c2:z(ae+g*re,re-g*ae),p:ie===P-1?on(l):z(ae,re)}),X=L}return F}function zo(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},d=null,c=null;const u=()=>{if(o&&i.length>2){const m=i[0],h=i[i.length-1];Math.abs(m.p.x-h.p.x)<1e-6&&Math.abs(m.p.y-h.p.y)<1e-6&&(m.in=h.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,h)=>{i.push({p:m,in:h??null,out:null}),r=m},v=m=>{i.length&&(i[i.length-1].out=m)};Ga.lastIndex=0;let w=Ga.exec(t);for(;w!==null;){const m=w[1],h=m.toUpperCase(),f=m!==h,x=Lw(w[2]),C=y=>f?{x:r.x+x[y],y:r.y+x[y+1]}:{x:x[y],y:x[y+1]};if(h==="Z")o=!0,u(),r=on(l),d=null,c=null;else if(h==="M"){for(let y=0;y+1<x.length;y+=2){const S=C(y);y===0&&(u(),l=on(S)),p(S)}d=null,c=null}else if(h==="L"){for(let y=0;y+1<x.length;y+=2)p(C(y));d=null,c=null}else if(h==="H"){for(const y of x)p({x:f?r.x+y:y,y:r.y});d=null,c=null}else if(h==="V"){for(const y of x)p({x:r.x,y:f?r.y+y:y});d=null,c=null}else if(h==="C"){for(let y=0;y+5<x.length;y+=6){const S=C(y),B=C(y+2),N=C(y+4);v(S),p(N,B),d=B}c=null}else if(h==="S"){for(let y=0;y+3<x.length;y+=4){const S=d?ds(d,r):on(r),B=C(y),N=C(y+2);v(S),p(N,B),d=B}c=null}else if(h==="Q")for(let y=0;y+3<x.length;y+=4){const S=C(y),B=C(y+2);v(gn(r,S,2/3)),p(B,gn(B,S,2/3)),c=S,d=null}else if(h==="T")for(let y=0;y+1<x.length;y+=2){const S=c?ds(c,r):on(r),B=C(y);v(gn(r,S,2/3)),p(B,gn(B,S,2/3)),c=S,d=null}else if(h==="A")for(let y=0;y+6<x.length;y+=7){const S=f?{x:r.x+x[y+5],y:r.y+x[y+6]}:{x:x[y+5],y:x[y+6]};for(const B of Ew(r,x[y],x[y+1],x[y+2],x[y+3]!==0,x[y+4]!==0,S))v(B.c1),p(B.p,B.c2);d=null,c=null}w=Ga.exec(t)}return u(),n}function Rn(e){return`${Number(e.toFixed(2))}`}function Qo(e,t){return!e.out&&!t.in}function $c(e,t){if(Qo(e,t))return`L${Rn(t.p.x)},${Rn(t.p.y)}`;const n=e.out??e.p,i=t.in??t.p;return`C${Rn(n.x)},${Rn(n.y)} ${Rn(i.x)},${Rn(i.y)} ${Rn(t.p.x)},${Rn(t.p.y)}`}function jo(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Rn(i.p.x)},${Rn(i.p.y)}`);let r=i;for(const l of o)t.push($c(r,l)),r=l;if(n.closed){const l=$c(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function lu(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function us(e,t,n){if(Qo(e,t))return gn(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,d=3*r*r*n,c=3*r*n*n,u=n*n*n;return{x:l*e.p.x+d*i.x+c*o.x+u*t.p.x,y:l*e.p.y+d*i.y+c*o.y+u*t.p.y}}function Ks(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of lu(n)){if(Qo(o.from,o.to)){i.push(on(o.from.p));continue}for(let r=0;r<cs;r+=1)i.push(us(o.from,o.to,r/cs))}n.closed||i.push(on(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function wi(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of Ks(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function cu(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function du(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=Tw)return{closed:!0,nodes:t.map(r=>({p:on(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/Iw)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:on(r),...cu(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Mw(e){const t={x:0,y:0,width:jr,height:jr};if(!e||e.pathFit!=="viewbox"||e.pathViewBox!==zr||!e.customPath)return t;const n=zo(e.customPath);if(!n.length)return t;const i=wi(n),o=i.maxX-i.minX,r=i.maxY-i.minY;return!isFinite(i.minX)||!isFinite(i.minY)||!(o>0)||!(r>0)?t:{x:i.minX,y:i.minY,width:o,height:r}}function uu(e,t,n=1){if(!e.length)return!1;const i=wi(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=Math.max(n,t.width*.5),r=Math.max(n,t.height*.5);return i.minX<t.x-o||i.minY<t.y-r||i.maxX>t.x+t.width+o||i.maxY>t.y+t.height+r}function kw(e,t){if(!e.length)return e;const n=wi(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),d=t.x+(t.width-i*l)/2,c=t.y+(t.height-o*l)/2;return ei(e,u=>({x:d+(u.x-n.minX)*l,y:c+(u.y-n.minY)*l}))}function Aw(e,t=1,n){const i=Mw(n),o=ls(e==="custom"?"rectangle":e,t),r=kw(ei(du(o),l=>({x:l.x*i.width+i.x,y:l.y*i.height+i.y})),i);return{shape:e,customPath:jo(r),pathFit:"viewbox",pathViewBox:zr}}function Tc(e,t){return t>0?Math.round(e/t)*t:e}function Fw(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,d=Pn(e),c=d[t].nodes[n];return c.p={x:o.p.x+r,y:o.p.y+l},c.in&&(c.in={x:c.in.x+r,y:c.in.y+l}),c.out&&(c.out={x:c.out.x+r,y:c.out.y+l}),d}function Ic(e,t,n,i){var r;if(!t.length)return e;const o=Pn(e);for(const{contour:l,node:d}of t){const c=(r=o[l])==null?void 0:r.nodes[d];c&&(c.p={x:c.p.x+n,y:c.p.y+i},c.in&&(c.in={x:c.in.x+n,y:c.in.y+i}),c.out&&(c.out={x:c.out.x+n,y:c.out.y+i}))}return o}function _w(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((d,c)=>c-d);for(const d of l)i=pu(i,r,d)}),i}function Nw(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const d=Pn(e),c=d[t].nodes[n];if(c[i]=on(o),r){const p=i==="in"?"out":"in";c[p]=ds(o,c.p)}return d}function Ww(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Pn(e);return r[t].nodes[n][i]=null,r}function Hw(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const d=Pn(e),c=d[t].nodes,u=n+1;if(Qo(r,l))return c.splice(u,0,{p:gn(r.p,l.p,i),in:null,out:null}),{contours:d,nodeIndex:u};const p=r.out??r.p,v=l.in??l.p,w=gn(r.p,p,i),m=gn(p,v,i),h=gn(v,l.p,i),f=gn(w,m,i),x=gn(m,h,i),C=gn(f,x,i),y=(n+1)%o.nodes.length;return c[n].out=w,c[y].in=h,c.splice(u,0,{p:C,in:f,out:x}),{contours:d,nodeIndex:u}}function pu(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Pn(e);return o[t].nodes.splice(n,1),o}function Rc(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Pn(e),l=r[t].nodes[n];if(l.in||l.out)return l.in=null,l.out=null,r;const d=i.nodes.length,c=i.nodes[(n-1+d)%d].p,u=i.nodes[(n+1)%d].p,p=cu(c,l.p,u);return l.in=p.in,l.out=p.out,r}function Dw(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),d={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-d.x,e.y-d.y)}}function Ow(e,t){let n=null;return e.forEach((i,o)=>{for(const r of lu(i)){const l=Qo(r.from,r.to)?1:cs;for(let d=0;d<l;d+=1){const c=d/l,u=(d+1)/l,p=Dw(t,us(r.from,r.to,c),us(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:c+(u-c)*p.t,distance:p.distance})}}}),n}function mu(e){return!e.in&&!e.out}function Bw(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||mu(r)&&n.push(r.p)})}),n}function Lc(e,t,n,i,o){const r=i(t);let l=null,d=o;for(const c of e){const u=i(c),p=Math.abs(u[n]-r[n]);p<=d&&(d=p,l=c[n])}return l}function Pc(e,t="stretch",n=su){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=zo(i),d=Ks(l);if(d.length)return t==="viewbox"?Er(d,n):Pr(d);if(typeof document>"u")return null;const c=i.split(/(?=[Mm])/).map(v=>v.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const v of c){const w=document.createElementNS("http://www.w3.org/2000/svg","path");w.setAttribute("d",v),u.appendChild(w);let m=0;try{m=w.getTotalLength()}catch{m=0}if(!m)continue;const h=[];for(let f=0;f<Bo;f+=1){const x=w.getPointAtLength(f/Bo*m);h.push({x:x.x,y:x.y})}p.push(h)}return p.length?t==="viewbox"?Er(p,n):Pr(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?Er([r],n):Pr([r])}function zw(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],d=o[(r+1)%o.length];(l.y<=t&&d.y>t||d.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(d.y-l.y)*(d.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=Br(n[o]),l=Br(n[o+1]);l>r&&i.push({x0:r,x1:l})}return jw(i)}function jw(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function Vw(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function Gw(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function Xw(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function qw(e,t,n,i){let o=null;for(let r=0;r<Sc;r+=1){const l=Br(t+(n-t)*r/Math.max(1,Sc-1)),d=zw(e,l),c=i==="avoid"?Gw(d):d;if(o=o===null?c:Vw(o,c),o.length===0)return[]}return o??[]}function gu(e){return!!e&&typeof e=="object"&&e.type==="link"}function Yw(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,d)=>{for(const c of r){if(gu(c)){o(c.children??[],c.value,c.target);continue}const u=c,p=(u==null?void 0:u.text)??"";if(p.trim())for(const v of p.split(/\s+/))v&&t.push({text:v,leaf:u,href:l,target:d,para:i})}};o((n==null?void 0:n.children)??[])}),t}function Ec(e){return{...e.fontFamily&&{fontFamily:co(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"}}}function Uw(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(gu(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function Mc(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:d,height:c,allowOverflow:u,capInset:p,capLines:v}=e,w=e.lineHeight*l,m=e.spaceWidth*l,h=[];if(!t.length||d<=0||w<=0)return{segments:h,placed:0,height:0,capLeft:0,capTop:0};const f=Math.max(1,m*.5),x=w*fw;let C=0,y=0,S=0,B=t[0].para,N=0,q=0,D=null;for(;C<t.length&&S<vw;){const T=y+w>c;if(T&&!u)break;const H=t[C].para;if(H>B+1){y+=w*(H-B-1),B=H-1,S+=1;continue}let $=T?[{x0:0,x1:d}]:qw(i,(y+x)/c,(y+w-x)/c,o).map(P=>({x0:P.x0*d,x1:P.x1*d}));p>0&&v>0&&!T&&$.length&&(D===null&&(D=S,N=$[0].x0,q=y),S-D<v&&($=Xw($,{x0:N,x1:N+p})));const I=$.reduce((P,E)=>Math.max(P,E.x1-E.x0),0);for(const P of $){const E=P.x1-P.x0;if(E<f)continue;if(C>=t.length||t[C].para!==H)break;const g=C;let z=0;for(;C<t.length&&t[C].para===H;){const F=n[C]*l,X=C===g?F:m+F;if(z+X>E&&!(C===g&&E>=I-.5&&F>d-.5))break;z+=X,C+=1}if(C>g){const F=C>=t.length||t[C].para!==H;h.push({top:y,left:P.x0,width:E,from:g,to:C,justify:r==="justify"&&!F})}if(C>=t.length||t[C].para!==H)break}B=H,y+=w,S+=1}return{segments:h,placed:C,height:h.length?y:0,capLeft:N,capTop:q}}function Kw(e){return`
23600
23600
  .${e}-wrapper {
23601
23601
  box-sizing: border-box;
23602
23602
  display: flex;
@@ -23783,6 +23783,20 @@ export function Helix({
23783
23783
  .${e}-editor-anchor-selected {
23784
23784
  fill: #FF5C02;
23785
23785
  }
23786
+ /* The part of the photo the mask crops away, shown while the image is armed.
23787
+ Dimmed rather than desaturated on purpose: a filter would be re-rasterized
23788
+ every frame of a pan drag, and dimming is what a crop UI reads as anyway. */
23789
+ .${e}-editor-ghost {
23790
+ opacity: 0.3;
23791
+ pointer-events: none;
23792
+ }
23793
+ .${e}-editor-image-bounds {
23794
+ fill: none;
23795
+ stroke: #FF5C02;
23796
+ stroke-width: 1;
23797
+ opacity: 0.7;
23798
+ pointer-events: none;
23799
+ }
23786
23800
  .${e}-a11y {
23787
23801
  position: absolute;
23788
23802
  width: 1px;
@@ -23795,7 +23809,7 @@ export function Helix({
23795
23809
  clip-path: inset(50%);
23796
23810
  white-space: nowrap;
23797
23811
  }
23798
- `}const vo=7,Kw=3.5,xo=9,Zn=8,Jn=14,Ic=10,Zw=24,Rc=14,Jw=1,Qw=.05,jr=1.08;function Vr(e,t){switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}}function pu(e){switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}}function us(e,t){const n=Vr(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Ic,y:n.y+o*Ic}}const Lc=.1,Pc=8,eS=4;function tS(e,t){return!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height)}function Pr(e,t,n){const i=tS(e,t)*n;return{width:t.width*i,height:t.height*i}}function Oi(e,t,n){return(e-t)*n}function xr(e,t,n){const i=e-t;return Math.abs(i)<eS?.5:Or(n/i)}function nS({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,stage:l,onStageChange:d,onChange:c,onCommit:u}){const p=s.useRef(null),x=s.useRef(null),b=s.useRef(i);b.current=i;const g=s.useRef(null),h=s.useRef(null),f=s.useRef(null),v=s.useRef(null),[C,y]=s.useState([]),T=l==="shape";s.useEffect(()=>{var S;T&&((S=p.current)==null||S.focus({preventScroll:!0}))},[T]);const W=n.width>0?t.width/n.width:1,_=n.height>0?t.height/n.height:1,X=s.useCallback(S=>r?{x:(S.x-n.x)*W,y:(S.y-n.y)*_}:{x:S.x-n.x,y:S.y-n.y},[r,n,W,_]),D=s.useCallback((S,$)=>{var O;const F=(O=p.current)==null?void 0:O.getBoundingClientRect();return!F||F.width<=0||F.height<=0?{x:0,y:0}:r?{x:n.x+(S-F.left)/F.width*n.width,y:n.y+($-F.top)/F.height*n.height}:{x:n.x+(S-F.left),y:n.y+($-F.top)}},[r,n]),w=s.useCallback((S,$)=>{var O;const F=(O=p.current)==null?void 0:O.getBoundingClientRect();return!F||F.width<=0||F.height<=0?{x:0,y:0}:{x:(S-F.left)/F.width*t.width,y:($-F.top)/F.height*t.height}},[t.width,t.height]),R=s.useCallback((S,$)=>{u(S,$)},[u]),m=S=>{const $=f.current;if($&&S.pointerId===$.pointerId){if(S.stopPropagation(),S.preventDefault(),$.startDistance<=0)return;const G=D(S.clientX,S.clientY),$e=Math.hypot(G.x-$.origin.x,G.y-$.origin.y),he=Math.max(Qw,$e/$.startDistance);if(!$.moved&&Math.abs(he-1)<1e-4)return;$.moved=!0,c(xc($.startContours,$.origin,he));return}const F=h.current;if(F&&S.pointerId===F.pointerId){S.stopPropagation(),S.preventDefault();const G=D(S.clientX,S.clientY),{bbox:$e}=F,he=$e.maxX-$e.minX,Re=$e.maxY-$e.minY,ge=G.x-F.origin.x,ye=G.y-F.origin.y;let Se=ge,ee=ye;if(isFinite(he)&&isFinite(Re))if(r){const ce=Math.min(n.x,n.x+n.width-he),ue=Math.max(n.x,n.x+n.width-he),Te=Math.min(n.y,n.y+n.height-Re),ke=Math.max(n.y,n.y+n.height-Re),Ce=Math.min(ue,Math.max(ce,$e.minX+ge)),U=Math.min(ke,Math.max(Te,$e.minY+ye));Se=Ce-$e.minX,ee=U-$e.minY}else{const ce=$e.minX-n.x,ue=$e.minY-n.y,Te=Math.min(0,t.width-he),ke=Math.max(0,t.width-he),Ce=Math.min(0,t.height-Re),U=Math.max(0,t.height-Re),fe=Math.min(ke,Math.max(Te,ce+ge)),me=Math.min(U,Math.max(Ce,ue+ye));Se=fe-ce,ee=me-ue}if(!F.moved&&Se===0&&ee===0)return;F.moved=!0,c(Qn(F.startContours,ce=>({x:ce.x+Se,y:ce.y+ee})));return}const O=v.current;if(O&&S.pointerId===O.pointerId){S.stopPropagation(),S.preventDefault();const G=D(S.clientX,S.clientY);let $e=G.x-O.origin.x,he=G.y-O.origin.y;if(S.shiftKey&&(Math.abs($e)>Math.abs(he)?he=0:$e=0),!O.moved&&$e===0&&he===0)return;O.moved=!0,c(Sc(O.startContours,O.selection,$e,he));return}const te=g.current;if(!te||S.pointerId!==te.pointerId)return;S.stopPropagation(),S.preventDefault();const xe=D(S.clientX,S.clientY),ne=te.snapEligible?Dw(b.current,{contour:te.contour,node:te.node}):[],ae=te.snapEligible?$c(ne,xe,"x",X,Rc):null,Z=te.snapEligible?$c(ne,xe,"y",X,Rc):null,B={x:ae??wc(xe.x,o),y:Z??wc(xe.y,o)};if(te.kind==="anchor"){let G=B.x-te.origin.x,$e=B.y-te.origin.y;if(S.shiftKey&&(Math.abs(G)>Math.abs($e)?$e=0:G=0),!te.moved&&G===0&&$e===0)return;te.moved=!0,c(Mw(b.current,te.contour,te.node,{x:te.anchor.x+G,y:te.anchor.y+$e}));return}te.moved=!0,c(Aw(b.current,te.contour,te.node,te.kind,B,te.mirror&&!S.altKey))},E=S=>{const $=f.current;if($&&S.pointerId===$.pointerId){f.current=null,S.stopPropagation();const ne=p.current;ne!=null&&ne.hasPointerCapture($.pointerId)&&ne.releasePointerCapture($.pointerId),$.moved&&R(b.current,{preserveShape:!0});return}const F=h.current;if(F&&S.pointerId===F.pointerId){h.current=null,S.stopPropagation();const ne=p.current;ne!=null&&ne.hasPointerCapture(F.pointerId)&&ne.releasePointerCapture(F.pointerId),F.moved?R(b.current,{preserveShape:!0}):y([]);return}const O=v.current;if(O&&S.pointerId===O.pointerId){v.current=null,S.stopPropagation();const ne=p.current;ne!=null&&ne.hasPointerCapture(O.pointerId)&&ne.releasePointerCapture(O.pointerId),O.moved&&R(b.current);return}const te=g.current;if(!te||S.pointerId!==te.pointerId)return;g.current=null,S.stopPropagation();const xe=p.current;xe!=null&&xe.hasPointerCapture(te.pointerId)&&xe.releasePointerCapture(te.pointerId),te.moved&&R(b.current)},I=S=>{S.stopPropagation()},J=S=>{var $,F;S.stopPropagation(),S.preventDefault(),($=p.current)==null||$.focus({preventScroll:!0}),h.current={pointerId:S.pointerId,origin:D(S.clientX,S.clientY),startContours:Ln(i),bbox:bi(i),moved:!1},(F=p.current)==null||F.setPointerCapture(S.pointerId)},A=(S,$)=>{var ne,ae;S.stopPropagation(),S.preventDefault(),(ne=p.current)==null||ne.focus({preventScroll:!0}),y([]),d("shape");const F=bi(i),O=Vr(F,pu($)),te=us(F,$),xe=Math.hypot(te.x-O.x,te.y-O.y);!isFinite(xe)||xe<=0||(f.current={pointerId:S.pointerId,corner:$,origin:O,startDistance:xe,startContours:Ln(i),moved:!1},(ae=p.current)==null||ae.setPointerCapture(S.pointerId))},Q=(S,$,F,O)=>{var xe,ne,ae,Z;S.stopPropagation(),S.preventDefault(),(xe=p.current)==null||xe.focus({preventScroll:!0});const te=(ne=i[F])==null?void 0:ne.nodes[O];if(te){if(S.altKey){const B=$==="anchor"?cu(i,F,O):Fw(i,F,O,$);if(B===i)return;y($==="anchor"?[]:[{contour:F,node:O}]),c(B),R(B);return}if($==="anchor"&&S.shiftKey){y(B=>B.some(G=>G.contour===F&&G.node===O)?B.filter(G=>!(G.contour===F&&G.node===O)):[...B,{contour:F,node:O}]);return}if($==="anchor"&&C.length>1&&C.some(B=>B.contour===F&&B.node===O)){v.current={pointerId:S.pointerId,origin:D(S.clientX,S.clientY),startContours:Ln(i),selection:C,moved:!1},(ae=p.current)==null||ae.setPointerCapture(S.pointerId);return}y([{contour:F,node:O}]),g.current={kind:$,contour:F,node:O,pointerId:S.pointerId,origin:D(S.clientX,S.clientY),anchor:te.p,mirror:$!=="anchor"&&!!(te.in&&te.out),snapEligible:$==="anchor"&&du(te),moved:!1},(Z=p.current)==null||Z.setPointerCapture(S.pointerId)}},q=S=>{S.stopPropagation(),S.preventDefault();const $=Qn(i,X),F=Hw($,w(S.clientX,S.clientY));if(!F||F.distance>Zw)return;const{contours:O,nodeIndex:te}=_w(i,F.contour,F.segment,F.t);te<0||(y([{contour:F.contour,node:te}]),c(O),R(O))},Y=S=>{if(S.key==="="||S.key==="+"||S.key==="-"||S.key==="_"){S.preventDefault(),S.stopPropagation();const xe=bi(i);if(!isFinite(xe.minX)||!isFinite(xe.maxX))return;const ne={x:(xe.minX+xe.maxX)/2,y:(xe.minY+xe.maxY)/2},Z=S.key==="="||S.key==="+"?jr:1/jr,B=xc(i,ne,Z);c(B),R(B,{preserveShape:!0});return}if(S.key==="Escape"){S.stopPropagation(),y([]),d("none");return}if(!C.length)return;if(S.key==="Backspace"||S.key==="Delete"){S.preventDefault(),S.stopPropagation();const xe=kw(i,C);if(xe===i)return;y([]),c(xe),R(xe);return}const $=o>0?o:Jw,F=S.shiftKey?$*10:$,O={ArrowLeft:[-F,0],ArrowRight:[F,0],ArrowUp:[0,-F],ArrowDown:[0,F]}[S.key];if(!O)return;S.preventDefault(),S.stopPropagation();const te=Sc(i,C,O[0],O[1]);c(te),R(te)},oe=s.useMemo(()=>Bo(Qn(i,X)),[i,X]),L=s.useMemo(()=>bi(i),[i]),N=X({x:L.minX,y:L.minY}),V={width:X({x:L.maxX,y:L.minY}).x-N.x,height:X({x:L.minX,y:L.maxY}).y-N.y},de=T&&C.length===0&&isFinite(L.minX)&&isFinite(L.maxX)&&L.maxX>L.minX&&L.maxY>L.minY,re=C.length>0||T,M=re;return a.jsxs("svg",{ref:p,className:`${e}-editor${re?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:Y,onPointerDown:()=>{var S;return(S=p.current)==null?void 0:S.focus({preventScroll:!0})},onPointerMove:m,onPointerUp:E,onPointerCancel:E,onLostPointerCapture:E,"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{y([]),d("none")},onClick:q}),M&&a.jsx("path",{className:`${e}-editor-hit`,d:oe,onClick:q}),M&&a.jsx("path",{className:`${e}-editor-outline`,d:oe}),a.jsx("path",{ref:x,className:`${e}-editor-body`,d:oe,fillRule:"evenodd",onPointerDown:J,onClick:q}),M&&i.map((S,$)=>S.nodes.map((F,O)=>{const te=C.some(ne=>ne.contour===$&&ne.node===O),xe=X(F.p);return a.jsxs("g",{children:[te&&C.length===1&&["in","out"].map(ne=>{const ae=F[ne];if(!ae)return null;const Z=X(ae);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:xe.x,y1:xe.y,x2:Z.x,y2:Z.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:Z.x,cy:Z.y,r:Kw}),a.jsx("circle",{className:`${e}-editor-grab`,cx:Z.x,cy:Z.y,r:xo,onPointerDown:B=>Q(B,ne,$,O),onClick:I})]},ne)}),a.jsx("rect",{className:`${e}-editor-anchor${te?` ${e}-editor-anchor-selected`:""}`,x:xe.x-vo/2,y:xe.y-vo/2,width:vo,height:vo,rx:F.in||F.out?vo/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:xe.x-xo,y:xe.y-xo,width:xo*2,height:xo*2,onPointerDown:ne=>Q(ne,"anchor",$,O),onClick:I,onDoubleClick:ne=>{ne.stopPropagation(),ne.preventDefault();const ae=Nw(i,$,O);c(ae),R(ae)}})]},`${$}-${O}`)})),de&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:N.x,y:N.y,width:V.width,height:V.height}),["nw","ne","se","sw"].map(S=>{const $=X(us(L,S)),F=S==="ne"||S==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:$.x-Zn/2,y:$.y-Zn/2,width:Zn,height:Zn}),a.jsx("rect",{className:`${e}-editor-scale-grab${F?` ${e}-editor-scale-grab-nesw`:""}`,x:$.x-Jn/2,y:$.y-Jn/2,width:Jn,height:Jn,onPointerDown:O=>A(O,S),onClick:I})]},S)})]})]})}function iS({P:e,box:t,bounds:n,natural:i,stage:o,onStageChange:r,focalX:l,focalY:d,scale:c,onChange:u,onCommit:p}){const x=s.useRef(null),b=s.useRef(null),g=s.useRef(null),h=s.useRef({focalX:l,focalY:d,scale:c});h.current={focalX:l,focalY:d,scale:c};const f=o==="image";s.useEffect(()=>{var w;f&&((w=x.current)==null||w.focus({preventScroll:!0}))},[f]);const v=s.useCallback((w,R)=>{var E;const m=(E=x.current)==null?void 0:E.getBoundingClientRect();return!m||m.width<=0||m.height<=0?{x:0,y:0}:{x:(w-m.left)/m.width*t.width,y:(R-m.top)/m.height*t.height}},[t.width,t.height]),C=w=>{var m,E;if(!i)return;w.stopPropagation(),w.preventDefault(),(m=x.current)==null||m.focus({preventScroll:!0});const R=Pr(n,i,c);b.current={pointerId:w.pointerId,origin:v(w.clientX,w.clientY),startX:Oi(n.width,R.width,l),startY:Oi(n.height,R.height,d),width:R.width,height:R.height,moved:!1},(E=x.current)==null||E.setPointerCapture(w.pointerId)},y=(w,R)=>{var Q,q;if(!i)return;w.stopPropagation(),w.preventDefault(),(Q=x.current)==null||Q.focus({preventScroll:!0});const m={minX:0,minY:0,maxX:n.width,maxY:n.height},E=Vr(m,pu(R)),I=Vr(m,R),J=Math.hypot(I.x-E.x,I.y-E.y);if(!isFinite(J)||J<=0)return;const A=Pr(n,i,c);g.current={pointerId:w.pointerId,anchor:E,startDistance:J,startScale:c,startX:Oi(n.width,A.width,l),startY:Oi(n.height,A.height,d),moved:!1},(q=x.current)==null||q.setPointerCapture(w.pointerId)},T=w=>{if(!i)return;const R=g.current;if(R&&w.pointerId===R.pointerId){w.stopPropagation(),w.preventDefault();const E=v(w.clientX,w.clientY),I={x:E.x-n.x,y:E.y-n.y},J=Math.hypot(I.x-R.anchor.x,I.y-R.anchor.y),A=Math.min(Pc,Math.max(Lc,R.startScale*(J/R.startDistance)));if(!R.moved&&Math.abs(A-R.startScale)<1e-4)return;R.moved=!0;const Q=A/R.startScale,q=R.anchor.x+(R.startX-R.anchor.x)*Q,Y=R.anchor.y+(R.startY-R.anchor.y)*Q,oe=Pr(n,i,A);u({focalX:xr(n.width,oe.width,q),focalY:xr(n.height,oe.height,Y),scale:A});return}const m=b.current;if(m&&w.pointerId===m.pointerId){w.stopPropagation(),w.preventDefault();const E=v(w.clientX,w.clientY),I=E.x-m.origin.x,J=E.y-m.origin.y;if(!m.moved&&I===0&&J===0)return;m.moved=!0,u({focalX:xr(n.width,m.width,m.startX+I),focalY:xr(n.height,m.height,m.startY+J),scale:c})}},W=w=>{var E,I;const R=b.current;if(R&&w.pointerId===R.pointerId){b.current=null,w.stopPropagation(),(E=x.current)!=null&&E.hasPointerCapture(R.pointerId)&&x.current.releasePointerCapture(R.pointerId),R.moved&&p(h.current);return}const m=g.current;m&&w.pointerId===m.pointerId&&(g.current=null,w.stopPropagation(),(I=x.current)!=null&&I.hasPointerCapture(m.pointerId)&&x.current.releasePointerCapture(m.pointerId),m.moved&&p(h.current))},_=w=>{if(w.key==="Escape"){w.stopPropagation(),r("none");return}if(w.key==="="||w.key==="+"||w.key==="-"||w.key==="_"){w.preventDefault(),w.stopPropagation();const R=w.key==="="||w.key==="+",m=Math.min(Pc,Math.max(Lc,c*(R?jr:1/jr))),E={focalX:l,focalY:d,scale:m};u(E),p(E)}},X=["nw","ne","se","sw"],D={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height};return a.jsxs("svg",{ref:x,className:`${e}-editor${f?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:_,onPointerMove:T,onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>r("none")}),f&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:C}),X.map(w=>{const R=us(D,w),m=w==="ne"||w==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:R.x-Zn/2,y:R.y-Zn/2,width:Zn,height:Zn}),a.jsx("rect",{className:`${e}-editor-scale-grab${m?` ${e}-editor-scale-grab-nesw`:""}`,x:R.x-Jn/2,y:R.y-Jn/2,width:Jn,height:Jn,onPointerDown:E=>y(E,w)})]},w)})]})]})}function oS(e){const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}function rS(e,t){return Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5}function aS(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const d=oS(e);(!r||!rS(r,d))&&(r=d,i(d)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n}function sS(){return typeof document>"u"?null:document.body}function lS({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:d,allowOverflow:c,fitEnabled:u,scale:p,onFitScale:x,dropCapLines:b,dropCapSize:g,showGuides:h,typography:f,imageUrl:v,imageFocalX:C,imageFocalY:y,imageScale:T,pathEditor:W,imageEditor:_}){var me,K;const X=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[D,w]=s.useState(null),R=s.useRef(null),[m,E]=s.useState({width:0,height:0}),[I,J]=s.useState(null),[A,Q]=s.useState(0),[q,Y]=s.useState("none");s.useEffect(()=>{!W&&!_&&Y("none")},[W,_]);const[oe,L]=s.useState(null);s.useEffect(()=>{if(!v||typeof Image>"u"){L(null);return}let z=!1;const be=new Image;return be.onload=()=>{z||L({width:be.naturalWidth,height:be.naturalHeight})},be.src=v,()=>{z=!0}},[v]);const N=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),V=s.useMemo(()=>qw(N),[N]),de=s.useMemo(()=>Yw(N),[N]),re=b>0?((K=(me=V[0])==null?void 0:me.text)==null?void 0:K.charAt(0))??"":"",M=m.height>0?m.width/m.height:1,S=(W==null?void 0:W.contours)??null,$=s.useMemo(()=>{if(S){const se=Xs(S);if(se.length)return Lr(se,r)}const z=i.trim(),be=z?Ow(z,o,r):null;return be&&be.length?be:iu(n==="custom"?"rectangle":n,M)},[S,n,i,o,r,Math.round(M*100)/100]),F=W==null?void 0:W.onConvert,O=(W==null?void 0:W.needsConversion)??!1,te=s.useMemo(()=>{const z=S??(i.trim()?Oo(i):null);return!!(z&&lu(z,r))},[S,i,r]),[xe,ne]=s.useState(null);za(()=>{if(!te){xe&&ne(null);return}!xe&&m.width>0&&m.height>0&&ne({width:m.width,height:m.height})},[te,m.width,m.height,xe]);const ae=s.useMemo(()=>{if(!te||m.width<=0||m.height<=0)return $;const z=xe??m,be=r.width/z.width,se=r.height/z.height;return $.map(j=>j.map(_e=>({x:_e.x*be,y:_e.y*se})))},[$,te,xe,r.width,r.height,m.width,m.height]),Z=s.useRef(null);s.useEffect(()=>{if(!(!F||m.width<=0||m.height<=0)){if(te){if(Z.current===i)return;const z=S??(i.trim()?Oo(i):null);if(!(z!=null&&z.length))return;const be=Qn(z,se=>({x:r.x+(se.x-r.x)/m.width*r.width,y:r.y+(se.y-r.y)/m.height*r.height}));Z.current=Bo(be),F(be);return}!O||!$.length||F(Qn(su($),z=>({x:z.x*zr,y:z.y*zr})))}},[O,te,F,$,S,i,r,m.width,m.height]),za(()=>{const z=D;if(!z||typeof ResizeObserver>"u")return;const be=()=>{const j=z.getBoundingClientRect();E(_e=>Math.abs(_e.width-j.width)<.5&&Math.abs(_e.height-j.height)<.5?_e:{width:j.width,height:j.height})};be();const se=new ResizeObserver(be);return se.observe(z),()=>se.disconnect()},[D]),s.useEffect(()=>{const z=typeof document<"u"?document.fonts:void 0;z!=null&&z.ready&&z.ready.then(()=>{Q(be=>be+1)})},[]),za(()=>{const z=R.current;if(!z)return;if(!V.length){J(null);return}const be=[],se=document.createDocumentFragment();for(const Ne of V){const Oe=document.createElement("span");Object.assign(Oe.style,Cc(Ne.leaf)),Oe.textContent=Ne.text,se.appendChild(Oe),be.push(Oe)}const j=document.createElement("span");j.textContent=" ",se.appendChild(j);const _e=document.createElement("span");_e.textContent=re||"H",_e.style.lineHeight="1",se.appendChild(_e),z.replaceChildren(se);const We=window.getComputedStyle(z),lt=parseFloat(We.fontSize)||16,Je=parseFloat(We.lineHeight),ct=Number.isNaN(Je)?lt*1.2:Je;_e.style.fontSize=`${ct*g}px`;const it=be.map(Ne=>Ne.getBoundingClientRect().width),Ve=j.getBoundingClientRect().width,Ie=re?_e.getBoundingClientRect().width:0;z.replaceChildren(),J({widths:it,spaceWidth:Ve,lineHeight:ct,capWidth:Ie})},[V,f,re,b,g,A,m.width]);const B=I&&re?I.capWidth+I.lineHeight*fw:0,G=Math.max(b,Math.ceil(g)),$e=s.useMemo(()=>{if(!I||!V.length||m.width<=0||m.height<=0||!u)return 1;const z=j=>Tc({tokens:V,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:m.width,height:m.height,rings:ae,mode:l,align:d,scale:j,allowOverflow:!1,capInset:B*j,capLines:re?G:0});if(z(1).placed>=V.length)return 1;if(z(ja).placed<V.length)return ja;let be=ja,se=1;for(let j=0;j<gw;j+=1){const _e=(be+se)/2;z(_e).placed>=V.length?be=_e:se=_e}return be},[I,V,m.width,m.height,ae,l,d,u,B,re,G]);s.useEffect(()=>{x($e)},[$e,x]);const he=u?Math.min(p,$e):1,Re=s.useMemo(()=>!I||!V.length||m.width<=0||m.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0}:Tc({tokens:V,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:m.width,height:m.height,rings:ae,mode:l,align:d,scale:he,allowOverflow:c,capInset:B*he,capLines:re?G:0}),[I,V,m.width,m.height,ae,l,d,he,c,B,re,G]),ge=I?I.lineHeight*he:0,ye=d==="justify"?"left":d,Se=!!(W&&S&&m.width>0&&m.height>0),ee=!!_,ce=(Se||ee)&&m.width>0&&m.height>0,ue=aS(D,ce),Te=ce&&ue?sS():null;s.useEffect(()=>{if(!Se&&!ee)return;const z=be=>{const se=D;if(!se)return;const j=se.getBoundingClientRect();be.clientX>=j.left&&be.clientX<=j.right&&be.clientY>=j.top&&be.clientY<=j.bottom&&(be.preventDefault(),be.stopPropagation(),Y(We=>We==="shape"&&ee?"image":Se?"shape":"image"))};return document.addEventListener("dblclick",z,!0),()=>document.removeEventListener("dblclick",z,!0)},[Se,ee,D]);const ke=s.useMemo(()=>v&&m.width>0&&m.height>0?xw(ae,m):"",[v,ae,m.width,m.height]),Ce=s.useMemo(()=>v&&m.width>0&&m.height>0?bw(ae,m):null,[v,ae,m.width,m.height]),U=`${X}-clip`,fe=s.useMemo(()=>{if(!Ce)return null;const z=oe??{width:Ce.width,height:Ce.height},be=Pr(Ce,z,T);return{x:Oi(Ce.width,be.width,C),y:Oi(Ce.height,be.height,y),width:be.width,height:be.height}},[Ce,oe,C,y,T]);return a.jsxs("div",{className:`${e}-column`,ref:w,children:[v&&ke&&Ce&&fe?a.jsxs("svg",{className:`${e}-shape-image`,viewBox:`0 0 ${m.width} ${m.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("defs",{children:a.jsx("clipPath",{id:U,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:ke,fillRule:"evenodd"})})}),a.jsx("image",{href:v,x:Ce.x+fe.x,y:Ce.y+fe.y,width:fe.width,height:fe.height,preserveAspectRatio:"none",clipPath:`url(#${U})`})]}):null,a.jsxs("div",{className:`${e}-flow${c?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:he},children:[a.jsx("div",{className:`${e}-measure`,ref:R,style:f,"aria-hidden":!0}),Re.segments.map((z,be)=>{const se=V.slice(z.from,z.to),j=be===0;return a.jsx("div",{className:`${e}-line${z.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${z.top}px`,left:`${z.left}px`,width:`${z.width}px`,textAlign:z.justify?void 0:ye},children:se.map((_e,We)=>{const Je=re&&j&&z.from===0&&We===0?_e.text.slice(1):_e.text,ct=Cc(_e.leaf),it=_e.href?a.jsx("a",{className:`${e}-link`,href:_e.href,target:_e.target,style:ct,children:Je}):a.jsx("span",{style:ct,children:Je});return a.jsxs("span",{children:[!z.justify&&We>0?" ":null,it]},We)})},`${z.from}-${z.to}-${be}`)}),h&&!S&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:ae.map((z,be)=>a.jsx("polygon",{points:z.map(se=>`${se.x},${se.y}`).join(" ")},be))})]}),re&&I&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${Re.capTop}px`,left:`${Re.capLeft}px`,fontSize:`${ge*g}px`,lineHeight:`${ge*g}px`},children:re}),Te&&ue&&(S&&W||_)&&Bn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:ue.top,left:ue.left,width:ue.width,height:ue.height,zIndex:vw,pointerEvents:"none"},children:[S&&W&&a.jsx(nS,{P:e,box:{width:ue.width,height:ue.height},viewBox:r,contours:S,snap:W.snap,stretchToBox:!te,stage:q,onStageChange:Y,onChange:W.onChange,onCommit:W.onCommit}),_&&Ce&&a.jsx(iS,{P:e,box:{width:ue.width,height:ue.height},bounds:Ce,natural:oe,stage:q,onStageChange:Y,focalX:C,focalY:y,scale:T,onChange:_.onChange,onCommit:_.onCommit})]}),Te),a.jsx("div",{className:`${e}-a11y`,children:de.map((z,be)=>a.jsx("p",{children:z},be))})]})}function cS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:d}=H.useScopedStyles(),c=s.useMemo(()=>Uw(d),[d]),u=n??!1,p=!!r||!!o,x=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),b=(e==null?void 0:e.shape)??"rectangle",g=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",f=s.useMemo(()=>ww(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),v=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",C=(e==null?void 0:e.textAlign)??"left",y=((e==null?void 0:e.overflowMode)??"clip")==="visible",T=((e==null?void 0:e.fitText)??"off")==="on",W=((e==null?void 0:e.dropCap)??"off")==="on"?Math.max(2,Math.round((e==null?void 0:e.dropCapLines)??3)):0,_=(e==null?void 0:e.dropCapSize)??yw,X=u&&p&&!i,[D,w]=s.useState(!1);s.useEffect(()=>{if(!u||!p){w(!1);return}const B=()=>w(!0),G=()=>w(!1),$e=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],he=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const Re of $e)window.addEventListener(Re,B);for(const Re of he)window.addEventListener(Re,G);return()=>{for(const Re of $e)window.removeEventListener(Re,B);for(const Re of he)window.removeEventListener(Re,G)}},[u,p]);const R=u&&p&&!i&&typeof l=="function",m=!D,E=Math.max(0,(e==null?void 0:e.pathSnap)??0),[I,J]=s.useState(null),A=s.useMemo(()=>{if(!R)return null;if(I&&(I.base===g||I.serialized===g))return I.contours;const B=Oo(g);return B.length?B:null},[R,I,g]),Q=h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Br&&!!(A&&!lu(A,f)),q=s.useCallback((B,G,$e)=>{const he=Bo(B);if(J(Re=>({base:Re&&(Re.base===g||Re.serialized===g)?Re.base:g,serialized:he,contours:B})),G){const Re=$e!=null&&$e.preserveShape?e==null?void 0:e.shape:"custom";l==null||l({...e,shape:Re,customPath:he})}},[g,l,e]),Y=s.useMemo(()=>R?{contours:Q?A:null,snap:E,needsConversion:!Q,onConvert:B=>{const G=Bo(B);J({base:G,serialized:G,contours:B}),l==null||l({...e,pathFit:"viewbox",pathViewBox:Br,customPath:G})},onChange:B=>q(B,!1),onCommit:(B,G)=>q(B,!0,G)}:null,[R,Q,A,E,l,e,q]),oe=v==="avoid"&&!!(e!=null&&e.image),L=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[N,V]=s.useState(null),de=N??L,re=s.useCallback(B=>V(B),[]),M=s.useCallback(B=>{V(B),l==null||l({...e,imageFocalX:B.focalX,imageFocalY:B.focalY,imageScale:B.scale})},[l,e]);s.useEffect(()=>{N&&Math.abs(N.focalX-L.focalX)<1e-9&&Math.abs(N.focalY-L.focalY)<1e-9&&Math.abs(N.scale-L.scale)<1e-9&&V(null)},[N,L]);const S=s.useMemo(()=>!R||!oe?null:{onChange:re,onCommit:M},[R,oe,re,M]),[$,F]=s.useState(void 0),O=s.useRef(void 0),te=s.useCallback(B=>{const G=O.current;G!==void 0&&Math.abs(G-B)<.005||(O.current=B,F(B))},[]),xe=s.useMemo(()=>T&&typeof $=="number"?$:1,[$,T]),ne=B=>`calc(${B} * var(--${d}-fit, 1))`,ae=s.useMemo(()=>{var B,G,$e,he,Re;return{fontFamily:so(e==null?void 0:e.textFontFamily),fontWeight:(B=e==null?void 0:e.textFontSettings)==null?void 0:B.fontWeight,fontStyle:(G=e==null?void 0:e.textFontSettings)==null?void 0:G.fontStyle,fontSize:ne(H.scalingValue((e==null?void 0:e.textFontSize)??.012,u)),lineHeight:ne(H.scalingValue((e==null?void 0:e.textLineHeight)??(e==null?void 0:e.textFontSize)??.012,u)),letterSpacing:ne(H.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:ne(H.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:($e=e==null?void 0:e.textTextAppearance)==null?void 0:$e.textTransform,textDecoration:(he=e==null?void 0:e.textTextAppearance)==null?void 0:he.textDecoration,fontVariant:(Re=e==null?void 0:e.textTextAppearance)==null?void 0:Re.fontVariant}},[e,u,d]),Z={[`--${d}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${d}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${d}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{className:`${d}-wrapper`,style:{...Z},children:a.jsx(lS,{P:d,item:x,shape:b,customPath:g,pathFit:h,viewBox:f,mode:v,align:C,allowOverflow:y,fitEnabled:T,scale:xe,onFitScale:te,dropCapLines:W,dropCapSize:_,showGuides:(X||R)&&m,typography:ae,imageUrl:v==="avoid"?e==null?void 0:e.image:null,imageFocalX:de.focalX,imageFocalY:de.focalY,imageScale:de.scale,pathEditor:m?Y:null,imageEditor:m?S:null})})]})}const dS=`import { useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from 'react';
23812
+ `}const bo=7,Zw=3.5,wo=9,Jn=8,Qn=14,kc=10,Jw=24,Ac=14,Qw=1,eS=.05,Vr=1.08;function Gr(e,t){switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}}function hu(e){switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}}function ps(e,t){const n=Gr(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*kc,y:n.y+o*kc}}const ms=.1,gs=8,tS=4;function hs(e,t){return!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height)}function Si(e,t,n){const i=hs(e,t)*n;return{width:t.width*i,height:t.height*i}}function Ln(e,t,n){return(e-t)*n}function zi(e,t,n){const i=e-t;return Math.abs(i)<tS?.5:Br(n/i)}function nS(e,t,n,i,o,r){const l=Si(e,n,r),d=e.x+Ln(e.width,l.width,i),c=e.y+Ln(e.height,l.height,o),u=hs(e,n),p=hs(t,n),v=Math.min(gs,Math.max(ms,p>0?r*(u/p):r)),w=Si(t,n,v);return{focalX:zi(t.width,w.width,d-t.x),focalY:zi(t.height,w.height,c-t.y),scale:v}}function iS({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,stage:l,onStageChange:d,onSelectionChange:c,onChange:u,onCommit:p}){const v=s.useRef(null),w=s.useRef(null),m=s.useRef(i);m.current=i;const h=s.useRef(null),f=s.useRef(null),x=s.useRef(null),C=s.useRef(null),[y,S]=s.useState([]),B=l==="shape";s.useEffect(()=>{var b;B&&((b=v.current)==null||b.focus({preventScroll:!0}))},[B]),s.useEffect(()=>{B||S(b=>b.length?[]:b)},[B]);const N=y.length>0;s.useEffect(()=>{c==null||c(N)},[N,c]),s.useEffect(()=>()=>c==null?void 0:c(!1),[c]);const q=n.width>0?t.width/n.width:1,D=n.height>0?t.height/n.height:1,T=s.useCallback(b=>r?{x:(b.x-n.x)*q,y:(b.y-n.y)*D}:{x:b.x-n.x,y:b.y-n.y},[r,n,q,D]),H=s.useCallback((b,k)=>{var he;const G=(he=v.current)==null?void 0:he.getBoundingClientRect();return!G||G.width<=0||G.height<=0?{x:0,y:0}:r?{x:n.x+(b-G.left)/G.width*n.width,y:n.y+(k-G.top)/G.height*n.height}:{x:n.x+(b-G.left),y:n.y+(k-G.top)}},[r,n]),$=s.useCallback((b,k)=>{var he;const G=(he=v.current)==null?void 0:he.getBoundingClientRect();return!G||G.width<=0||G.height<=0?{x:0,y:0}:{x:(b-G.left)/G.width*t.width,y:(k-G.top)/G.height*t.height}},[t.width,t.height]),I=s.useCallback((b,k)=>{p(b,k)},[p]),P=b=>{const k=x.current;if(k&&b.pointerId===k.pointerId){if(b.stopPropagation(),b.preventDefault(),k.startDistance<=0)return;const ve=H(b.clientX,b.clientY),Ie=Math.hypot(ve.x-k.origin.x,ve.y-k.origin.y),pe=Math.max(eS,Ie/k.startDistance);if(!k.moved&&Math.abs(pe-1)<1e-4)return;k.moved=!0,u(Cc(k.startContours,k.origin,pe));return}const G=f.current;if(G&&b.pointerId===G.pointerId){b.stopPropagation(),b.preventDefault();const ve=H(b.clientX,b.clientY),{bbox:Ie}=G,pe=Ie.maxX-Ie.minX,oe=Ie.maxY-Ie.minY,ye=ve.x-G.origin.x,U=ve.y-G.origin.y;let ce=ye,le=U;if(isFinite(pe)&&isFinite(oe))if(r){const Ce=Math.min(n.x,n.x+n.width-pe),Fe=Math.max(n.x,n.x+n.width-pe),Ee=Math.min(n.y,n.y+n.height-oe),Y=Math.max(n.y,n.y+n.height-oe),be=Math.min(Fe,Math.max(Ce,Ie.minX+ye)),de=Math.min(Y,Math.max(Ee,Ie.minY+U));ce=be-Ie.minX,le=de-Ie.minY}else{const Ce=Ie.minX-n.x,Fe=Ie.minY-n.y,Ee=Math.min(0,t.width-pe),Y=Math.max(0,t.width-pe),be=Math.min(0,t.height-oe),de=Math.max(0,t.height-oe),K=Math.min(Y,Math.max(Ee,Ce+ye)),ue=Math.min(de,Math.max(be,Fe+U));ce=K-Ce,le=ue-Fe}if(!G.moved&&ce===0&&le===0)return;G.moved=!0,u(ei(G.startContours,Ce=>({x:Ce.x+ce,y:Ce.y+le})),{carryImage:!0});return}const he=C.current;if(he&&b.pointerId===he.pointerId){b.stopPropagation(),b.preventDefault();const ve=H(b.clientX,b.clientY);let Ie=ve.x-he.origin.x,pe=ve.y-he.origin.y;if(b.shiftKey&&(Math.abs(Ie)>Math.abs(pe)?pe=0:Ie=0),!he.moved&&Ie===0&&pe===0)return;he.moved=!0,u(Ic(he.startContours,he.selection,Ie,pe));return}const J=h.current;if(!J||b.pointerId!==J.pointerId)return;b.stopPropagation(),b.preventDefault();const ee=H(b.clientX,b.clientY),O=J.snapEligible?Bw(m.current,{contour:J.contour,node:J.node}):[],Z=J.snapEligible?Lc(O,ee,"x",T,Ac):null,te=J.snapEligible?Lc(O,ee,"y",T,Ac):null,Le={x:Z??Tc(ee.x,o),y:te??Tc(ee.y,o)};if(J.kind==="anchor"){let ve=Le.x-J.origin.x,Ie=Le.y-J.origin.y;if(b.shiftKey&&(Math.abs(ve)>Math.abs(Ie)?Ie=0:ve=0),!J.moved&&ve===0&&Ie===0)return;J.moved=!0,u(Fw(m.current,J.contour,J.node,{x:J.anchor.x+ve,y:J.anchor.y+Ie}));return}J.moved=!0,u(Nw(m.current,J.contour,J.node,J.kind,Le,J.mirror&&!b.altKey))},E=b=>{const k=x.current;if(k&&b.pointerId===k.pointerId){x.current=null,b.stopPropagation();const O=v.current;O!=null&&O.hasPointerCapture(k.pointerId)&&O.releasePointerCapture(k.pointerId),k.moved&&I(m.current,{preserveShape:!0});return}const G=f.current;if(G&&b.pointerId===G.pointerId){f.current=null,b.stopPropagation();const O=v.current;O!=null&&O.hasPointerCapture(G.pointerId)&&O.releasePointerCapture(G.pointerId),G.moved?I(m.current,{preserveShape:!0}):S([]);return}const he=C.current;if(he&&b.pointerId===he.pointerId){C.current=null,b.stopPropagation();const O=v.current;O!=null&&O.hasPointerCapture(he.pointerId)&&O.releasePointerCapture(he.pointerId),he.moved&&I(m.current);return}const J=h.current;if(!J||b.pointerId!==J.pointerId)return;h.current=null,b.stopPropagation();const ee=v.current;ee!=null&&ee.hasPointerCapture(J.pointerId)&&ee.releasePointerCapture(J.pointerId),J.moved&&I(m.current)},g=b=>{b.stopPropagation()},z=b=>{var k,G;b.stopPropagation(),b.preventDefault(),(k=v.current)==null||k.focus({preventScroll:!0}),f.current={pointerId:b.pointerId,origin:H(b.clientX,b.clientY),startContours:Pn(i),bbox:wi(i),moved:!1},(G=v.current)==null||G.setPointerCapture(b.pointerId)},F=(b,k)=>{var O,Z;b.stopPropagation(),b.preventDefault(),(O=v.current)==null||O.focus({preventScroll:!0}),S([]),d("shape");const G=wi(i),he=Gr(G,hu(k)),J=ps(G,k),ee=Math.hypot(J.x-he.x,J.y-he.y);!isFinite(ee)||ee<=0||(x.current={pointerId:b.pointerId,corner:k,origin:he,startDistance:ee,startContours:Pn(i),moved:!1},(Z=v.current)==null||Z.setPointerCapture(b.pointerId))},X=(b,k,G,he)=>{var ee,O,Z,te;b.stopPropagation(),b.preventDefault(),(ee=v.current)==null||ee.focus({preventScroll:!0});const J=(O=i[G])==null?void 0:O.nodes[he];if(J){if(b.altKey){const Le=k==="anchor"?pu(i,G,he):Ww(i,G,he,k);if(Le===i)return;S(k==="anchor"?[]:[{contour:G,node:he}]),u(Le),I(Le);return}if(b.metaKey||b.ctrlKey){const Le=Rc(i,G,he);if(Le===i)return;S([{contour:G,node:he}]),u(Le),I(Le);return}if(k==="anchor"&&b.shiftKey){S(Le=>Le.some(ve=>ve.contour===G&&ve.node===he)?Le.filter(ve=>!(ve.contour===G&&ve.node===he)):[...Le,{contour:G,node:he}]);return}if(k==="anchor"&&y.length>1&&y.some(Le=>Le.contour===G&&Le.node===he)){C.current={pointerId:b.pointerId,origin:H(b.clientX,b.clientY),startContours:Pn(i),selection:y,moved:!1},(Z=v.current)==null||Z.setPointerCapture(b.pointerId);return}S([{contour:G,node:he}]),h.current={kind:k,contour:G,node:he,pointerId:b.pointerId,origin:H(b.clientX,b.clientY),anchor:J.p,mirror:k!=="anchor"&&!!(J.in&&J.out),snapEligible:k==="anchor"&&mu(J),moved:!1},(te=v.current)==null||te.setPointerCapture(b.pointerId)}},ie=b=>{b.stopPropagation(),b.preventDefault();const k=ei(i,T),G=Ow(k,$(b.clientX,b.clientY));if(!G||G.distance>Jw)return;const{contours:he,nodeIndex:J}=Hw(i,G.contour,G.segment,G.t);J<0||(S([{contour:G.contour,node:J}]),u(he),I(he))},L=b=>{if(b.key==="="||b.key==="+"||b.key==="-"||b.key==="_"){b.preventDefault(),b.stopPropagation();const ee=wi(i);if(!isFinite(ee.minX)||!isFinite(ee.maxX))return;const O={x:(ee.minX+ee.maxX)/2,y:(ee.minY+ee.maxY)/2},te=b.key==="="||b.key==="+"?Vr:1/Vr,Le=Cc(i,O,te);u(Le),I(Le,{preserveShape:!0});return}if(b.key==="Escape"){b.stopPropagation(),S([]),d("none");return}if(!y.length)return;if(b.key==="Backspace"||b.key==="Delete"){b.preventDefault(),b.stopPropagation();const ee=_w(i,y);if(ee===i)return;S([]),u(ee),I(ee);return}const k=o>0?o:Qw,G=b.shiftKey?k*10:k,he={ArrowLeft:[-G,0],ArrowRight:[G,0],ArrowUp:[0,-G],ArrowDown:[0,G]}[b.key];if(!he)return;b.preventDefault(),b.stopPropagation();const J=Ic(i,y,he[0],he[1]);u(J),I(J)},_=s.useMemo(()=>jo(ei(i,T)),[i,T]),V=s.useMemo(()=>wi(i),[i]),ae=T({x:V.minX,y:V.minY}),re={width:T({x:V.maxX,y:V.minY}).x-ae.x,height:T({x:V.minX,y:V.maxY}).y-ae.y},M=B&&y.length===0&&isFinite(V.minX)&&isFinite(V.maxX)&&V.maxX>V.minX&&V.maxY>V.minY,se=y.length>0||B,j=se;return a.jsxs("svg",{ref:v,className:`${e}-editor${se?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:L,onPointerDown:()=>{var b;return(b=v.current)==null?void 0:b.focus({preventScroll:!0})},onPointerMove:P,onPointerUp:E,onPointerCancel:E,onLostPointerCapture:E,"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{S([]),d("none")},onClick:ie}),j&&a.jsx("path",{className:`${e}-editor-hit`,d:_,onClick:ie}),j&&a.jsx("path",{className:`${e}-editor-outline`,d:_}),a.jsx("path",{ref:w,className:`${e}-editor-body`,d:_,fillRule:"evenodd",onPointerDown:z,onClick:ie}),j&&i.map((b,k)=>b.nodes.map((G,he)=>{const J=y.some(O=>O.contour===k&&O.node===he),ee=T(G.p);return a.jsxs("g",{children:[J&&y.length===1&&["in","out"].map(O=>{const Z=G[O];if(!Z)return null;const te=T(Z);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:ee.x,y1:ee.y,x2:te.x,y2:te.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:te.x,cy:te.y,r:Zw}),a.jsx("circle",{className:`${e}-editor-grab`,cx:te.x,cy:te.y,r:wo,onPointerDown:Le=>X(Le,O,k,he),onClick:g})]},O)}),a.jsx("rect",{className:`${e}-editor-anchor${J?` ${e}-editor-anchor-selected`:""}`,x:ee.x-bo/2,y:ee.y-bo/2,width:bo,height:bo,rx:G.in||G.out?bo/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:ee.x-wo,y:ee.y-wo,width:wo*2,height:wo*2,onPointerDown:O=>X(O,"anchor",k,he),onClick:g,onDoubleClick:O=>{O.stopPropagation(),O.preventDefault();const Z=Rc(i,k,he);u(Z),I(Z)}})]},`${k}-${he}`)})),M&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:ae.x,y:ae.y,width:re.width,height:re.height}),["nw","ne","se","sw"].map(b=>{const k=T(ps(V,b)),G=b==="ne"||b==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:k.x-Jn/2,y:k.y-Jn/2,width:Jn,height:Jn}),a.jsx("rect",{className:`${e}-editor-scale-grab${G?` ${e}-editor-scale-grab-nesw`:""}`,x:k.x-Qn/2,y:k.y-Qn/2,width:Qn,height:Qn,onPointerDown:he=>F(he,b),onClick:g})]},b)})]})]})}function oS({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:d,focalX:c,focalY:u,scale:p,onChange:v,onCommit:w}){const m=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,f=s.useRef(null),x=s.useRef(null),C=s.useRef({focalX:c,focalY:u,scale:p});C.current={focalX:c,focalY:u,scale:p};const y=l==="image";s.useEffect(()=>{var E;y&&((E=m.current)==null||E.focus({preventScroll:!0}))},[y]);const S=s.useCallback((E,g)=>{var F;const z=(F=m.current)==null?void 0:F.getBoundingClientRect();return!z||z.width<=0||z.height<=0?{x:0,y:0}:{x:(E-z.left)/z.width*t.width,y:(g-z.top)/z.height*t.height}},[t.width,t.height]),B=E=>{var z,F;if(!i)return;E.stopPropagation(),E.preventDefault(),(z=m.current)==null||z.focus({preventScroll:!0});const g=Si(n,i,p);f.current={pointerId:E.pointerId,origin:S(E.clientX,E.clientY),startX:Ln(n.width,g.width,c),startY:Ln(n.height,g.height,u),width:g.width,height:g.height,moved:!1},(F=m.current)==null||F.setPointerCapture(E.pointerId)},N=(E,g)=>{var ae,re;if(!i)return;E.stopPropagation(),E.preventDefault(),(ae=m.current)==null||ae.focus({preventScroll:!0});const z=Si(n,i,p),F=Ln(n.width,z.width,c),X=Ln(n.height,z.height,u),ie={minX:F,minY:X,maxX:F+z.width,maxY:X+z.height},L=Gr(ie,hu(g)),_=Gr(ie,g),V=Math.hypot(_.x-L.x,_.y-L.y);!isFinite(V)||V<=0||(x.current={pointerId:E.pointerId,anchor:L,startDistance:V,startScale:p,startX:F,startY:X,moved:!1},(re=m.current)==null||re.setPointerCapture(E.pointerId))},q=E=>{if(!i)return;const g=x.current;if(g&&E.pointerId===g.pointerId){E.stopPropagation(),E.preventDefault();const F=S(E.clientX,E.clientY),X={x:F.x-n.x,y:F.y-n.y},ie=Math.hypot(X.x-g.anchor.x,X.y-g.anchor.y),L=Math.min(gs,Math.max(ms,g.startScale*(ie/g.startDistance)));if(!g.moved&&Math.abs(L-g.startScale)<1e-4)return;g.moved=!0;const _=L/g.startScale,V=g.anchor.x+(g.startX-g.anchor.x)*_,ae=g.anchor.y+(g.startY-g.anchor.y)*_,re=Si(n,i,L);v({focalX:zi(n.width,re.width,V),focalY:zi(n.height,re.height,ae),scale:L});return}const z=f.current;if(z&&E.pointerId===z.pointerId){E.stopPropagation(),E.preventDefault();const F=S(E.clientX,E.clientY),X=F.x-z.origin.x,ie=F.y-z.origin.y;if(!z.moved&&X===0&&ie===0)return;z.moved=!0,v({focalX:zi(n.width,z.width,z.startX+X),focalY:zi(n.height,z.height,z.startY+ie),scale:p})}},D=E=>{var F,X;const g=f.current;if(g&&E.pointerId===g.pointerId){f.current=null,E.stopPropagation(),(F=m.current)!=null&&F.hasPointerCapture(g.pointerId)&&m.current.releasePointerCapture(g.pointerId),g.moved&&w(C.current);return}const z=x.current;z&&E.pointerId===z.pointerId&&(x.current=null,E.stopPropagation(),(X=m.current)!=null&&X.hasPointerCapture(z.pointerId)&&m.current.releasePointerCapture(z.pointerId),z.moved&&w(C.current))},T=E=>{if(E.key==="Escape"){E.stopPropagation(),d("none");return}if(E.key==="="||E.key==="+"||E.key==="-"||E.key==="_"){E.preventDefault(),E.stopPropagation();const g=E.key==="="||E.key==="+",z=Math.min(gs,Math.max(ms,p*(g?Vr:1/Vr))),F={focalX:c,focalY:u,scale:z};v(F),w(F)}},H=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},I=s.useMemo(()=>{const E=i??{width:n.width,height:n.height},g=Si(n,E,p);return!(g.width>0)||!(g.height>0)?null:{x:n.x+Ln(n.width,g.width,c),y:n.y+Ln(n.height,g.height,u),width:g.width,height:g.height}},[i,n.x,n.y,n.width,n.height,c,u,p]),P=I?{minX:I.x,minY:I.y,maxX:I.x+I.width,maxY:I.y+I.height}:$;return a.jsxs("svg",{ref:m,className:`${e}-editor${y?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:T,onPointerMove:q,onPointerUp:D,onPointerCancel:D,onLostPointerCapture:D,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>d("none")}),y&&o&&I&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:I.x,y:I.y,width:I.width,height:I.height,children:[a.jsx("rect",{x:I.x,y:I.y,width:I.width,height:I.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:I.x,y:I.y,width:I.width,height:I.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:I.x,y:I.y,width:I.width,height:I.height})]}),y&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:B}),H.map(E=>{const g=ps(P,E),z=E==="ne"||E==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:g.x-Jn/2,y:g.y-Jn/2,width:Jn,height:Jn}),a.jsx("rect",{className:`${e}-editor-scale-grab${z?` ${e}-editor-scale-grab-nesw`:""}`,x:g.x-Qn/2,y:g.y-Qn/2,width:Qn,height:Qn,onPointerDown:F=>N(F,E)})]},E)})]})]})}function rS(e){const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}function aS(e,t){return Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5}function sS(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const d=rS(e);(!r||!aS(r,d))&&(r=d,i(d)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n}function lS(){return typeof document>"u"?null:document.body}function cS({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:d,allowOverflow:c,fitEnabled:u,scale:p,onFitScale:v,dropCapLines:w,dropCapSize:m,showGuides:h,typography:f,imageUrl:x,imageFocalX:C,imageFocalY:y,imageScale:S,imageCustomPath:B,pathDragActive:N,pathCarryImage:q,onCarryImageConsumed:D,pathEditor:T,imageEditor:H}){var _e,Ze;const $=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[I,P]=s.useState(null),E=s.useRef(null),[g,z]=s.useState({width:0,height:0}),[F,X]=s.useState(null),[ie,L]=s.useState(0),[_,V]=s.useState("none");s.useEffect(()=>{!T&&!H&&V("none")},[T,H]);const[ae,re]=s.useState(null);s.useEffect(()=>{if(!x||typeof Image>"u"){re(null);return}let we=!1;const $e=new Image;return $e.onload=()=>{we||re({width:$e.naturalWidth,height:$e.naturalHeight})},$e.src=x,()=>{we=!0}},[x]);const M=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),se=s.useMemo(()=>Yw(M),[M]),j=s.useMemo(()=>Uw(M),[M]),b=w>0?((Ze=(_e=se[0])==null?void 0:_e.text)==null?void 0:Ze.charAt(0))??"":"",k=g.height>0?g.width/g.height:1,G=(T==null?void 0:T.contours)??null,he=s.useMemo(()=>{if(G){const Xe=Ks(G);if(Xe.length)return Er(Xe,r)}const we=i.trim(),$e=we?Pc(we,o,r):null;return $e&&$e.length?$e:ls(n==="custom"?"rectangle":n,k)},[G,n,i,o,r,Math.round(k*100)/100]),J=T==null?void 0:T.onConvert,ee=(T==null?void 0:T.needsConversion)??!1,O=s.useMemo(()=>{const we=G??(i.trim()?zo(i):null);return!!(we&&uu(we,r))},[G,i,r]),[Z,te]=s.useState(null);wr(()=>{if(!O){Z&&te(null);return}!Z&&g.width>0&&g.height>0&&te({width:g.width,height:g.height})},[O,g.width,g.height,Z]);const Le=s.useMemo(()=>{if(!O||g.width<=0||g.height<=0)return he;const we=Z??g,$e=r.width/we.width,Xe=r.height/we.height;return he.map(ze=>ze.map(Te=>({x:Te.x*$e,y:Te.y*Xe})))},[he,O,Z,r.width,r.height,g.width,g.height]),ve=s.useMemo(()=>{const we=B.trim(),$e=we?Pc(we,o,r):null;return $e&&$e.length?$e:ls(n==="custom"?"rectangle":n,k)},[n,B,o,r,Math.round(k*100)/100]),Ie=s.useMemo(()=>{if(!O||g.width<=0||g.height<=0)return ve;const we=Z??g,$e=r.width/we.width,Xe=r.height/we.height;return ve.map(ze=>ze.map(Te=>({x:Te.x*$e,y:Te.y*Xe})))},[ve,O,Z,r.width,r.height,g.width,g.height]),pe=s.useRef(null);s.useEffect(()=>{if(!(!J||g.width<=0||g.height<=0)){if(O){if(pe.current===i)return;const we=G??(i.trim()?zo(i):null);if(!(we!=null&&we.length))return;const $e=ei(we,Xe=>({x:r.x+(Xe.x-r.x)/g.width*r.width,y:r.y+(Xe.y-r.y)/g.height*r.height}));pe.current=jo($e),J($e);return}!ee||!he.length||J(ei(du(he),we=>({x:we.x*jr,y:we.y*jr})))}},[ee,O,J,he,G,i,r,g.width,g.height]),wr(()=>{const we=I;if(!we||typeof ResizeObserver>"u")return;const $e=()=>{const ze=we.getBoundingClientRect();z(Te=>Math.abs(Te.width-ze.width)<.5&&Math.abs(Te.height-ze.height)<.5?Te:{width:ze.width,height:ze.height})};$e();const Xe=new ResizeObserver($e);return Xe.observe(we),()=>Xe.disconnect()},[I]),s.useEffect(()=>{const we=typeof document<"u"?document.fonts:void 0;we!=null&&we.ready&&we.ready.then(()=>{L($e=>$e+1)})},[]),wr(()=>{const we=E.current;if(!we)return;if(!se.length){X(null);return}const $e=[],Xe=document.createDocumentFragment();for(const zt of se){const ft=document.createElement("span");Object.assign(ft.style,Ec(zt.leaf)),ft.textContent=zt.text,Xe.appendChild(ft),$e.push(ft)}const ze=document.createElement("span");ze.textContent=" ",Xe.appendChild(ze);const Te=document.createElement("span");Te.textContent=b||"H",Te.style.lineHeight="1",Xe.appendChild(Te),we.replaceChildren(Xe);const Ve=window.getComputedStyle(we),De=parseFloat(Ve.fontSize)||16,tt=parseFloat(Ve.lineHeight),nt=Number.isNaN(tt)?De*1.2:tt;Te.style.fontSize=`${nt*m}px`;const st=$e.map(zt=>zt.getBoundingClientRect().width),St=ze.getBoundingClientRect().width,Bt=b?Te.getBoundingClientRect().width:0;we.replaceChildren(),X({widths:st,spaceWidth:St,lineHeight:nt,capWidth:Bt})},[se,f,b,w,m,ie,g.width]);const oe=F&&b?F.capWidth+F.lineHeight*xw:0,ye=Math.max(w,Math.ceil(m)),U=s.useMemo(()=>{if(!F||!se.length||g.width<=0||g.height<=0||!u)return 1;const we=ze=>Mc({tokens:se,widths:F.widths,spaceWidth:F.spaceWidth,lineHeight:F.lineHeight,width:g.width,height:g.height,rings:Le,mode:l,align:d,scale:ze,allowOverflow:!1,capInset:oe*ze,capLines:b?ye:0});if(we(1).placed>=se.length)return 1;if(we(ja).placed<se.length)return ja;let $e=ja,Xe=1;for(let ze=0;ze<yw;ze+=1){const Te=($e+Xe)/2;we(Te).placed>=se.length?$e=Te:Xe=Te}return $e},[F,se,g.width,g.height,Le,l,d,u,oe,b,ye]);s.useEffect(()=>{v(U)},[U,v]);const ce=u?Math.min(p,U):1,le=s.useMemo(()=>!F||!se.length||g.width<=0||g.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0}:Mc({tokens:se,widths:F.widths,spaceWidth:F.spaceWidth,lineHeight:F.lineHeight,width:g.width,height:g.height,rings:Le,mode:l,align:d,scale:ce,allowOverflow:c,capInset:oe*ce,capLines:b?ye:0}),[F,se,g.width,g.height,Le,l,d,ce,c,oe,b,ye]),Ce=F?F.lineHeight*ce:0,Fe=d==="justify"?"left":d,Ee=!!(T&&G&&g.width>0&&g.height>0),Y=!!H,be=(Ee||Y)&&g.width>0&&g.height>0,de=sS(I,be),K=be&&de?lS():null,ue=s.useRef(!1),He=s.useCallback(we=>{ue.current=we},[]);s.useEffect(()=>{if(!Ee&&!Y)return;const we=$e=>{const Xe=I;if(!Xe)return;const ze=Xe.getBoundingClientRect();$e.clientX>=ze.left&&$e.clientX<=ze.right&&$e.clientY>=ze.top&&$e.clientY<=ze.bottom&&($e.preventDefault(),$e.stopPropagation(),V(Ve=>Ve==="shape"&&ue.current?Ve:Ve==="shape"&&Y?"image":Ee?"shape":"image"))};return document.addEventListener("dblclick",we,!0),()=>document.removeEventListener("dblclick",we,!0)},[Ee,Y,I]);const fe=s.useMemo(()=>x&&g.width>0&&g.height>0?Cw(Ie,g):null,[x,Ie,g.width,g.height]),Q=N&&!q&&_!=="image",Je=s.useRef(null);!N&&x&&fe&&(Je.current={rings:Ie,bounds:fe,focalX:C,focalY:y,scale:S,customPath:B});const Ne=Q?Je.current:null,ct=s.useRef(null),Ke=(()=>{const we=ct.current;return N||q||!H||!ae||!fe||!we||B===we.customPath?null:nS(we.bounds,fe,ae,we.focalX,we.focalY,we.scale)})();wr(()=>{if(N||!H||!ae||!fe)return;const we=ct.current,$e=!!(we&&B!==we.customPath);$e&&Ke&&H.onCommit(Ke),$e&&q&&(D==null||D()),ct.current={rings:Ie,bounds:fe,focalX:(Ke==null?void 0:Ke.focalX)??C,focalY:(Ke==null?void 0:Ke.focalY)??y,scale:(Ke==null?void 0:Ke.scale)??S,customPath:B}},[N,q,B,Ie,fe,H,ae,C,y,S,Ke,D]);const ut=(Ne==null?void 0:Ne.rings)??Ie,lt=(Ne==null?void 0:Ne.bounds)??fe,Ye=(Ne==null?void 0:Ne.focalX)??(Ke==null?void 0:Ke.focalX)??C,Re=(Ne==null?void 0:Ne.focalY)??(Ke==null?void 0:Ke.focalY)??y,We=(Ne==null?void 0:Ne.scale)??(Ke==null?void 0:Ke.scale)??S,Be=s.useMemo(()=>x&&g.width>0&&g.height>0?Sw(ut,g):"",[x,ut,g.width,g.height]),Ue=lt,ge=`${$}-clip`,xe=s.useMemo(()=>{if(!Ue)return null;const we=ae??{width:Ue.width,height:Ue.height},$e=Si(Ue,we,We);return{x:Ln(Ue.width,$e.width,Ye),y:Ln(Ue.height,$e.height,Re),width:$e.width,height:$e.height}},[Ue,ae,Ye,Re,We]);return a.jsxs("div",{className:`${e}-column`,ref:P,children:[x&&Be&&Ue&&xe?a.jsxs("svg",{className:`${e}-shape-image`,viewBox:`0 0 ${g.width} ${g.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("defs",{children:a.jsx("clipPath",{id:ge,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:Be,fillRule:"evenodd"})})}),a.jsx("image",{href:x,x:Ue.x+xe.x,y:Ue.y+xe.y,width:xe.width,height:xe.height,preserveAspectRatio:"none",clipPath:`url(#${ge})`})]}):null,a.jsxs("div",{className:`${e}-flow${c?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:ce},children:[a.jsx("div",{className:`${e}-measure`,ref:E,style:f,"aria-hidden":!0}),le.segments.map((we,$e)=>{const Xe=se.slice(we.from,we.to),ze=$e===0;return a.jsx("div",{className:`${e}-line${we.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${we.top}px`,left:`${we.left}px`,width:`${we.width}px`,textAlign:we.justify?void 0:Fe},children:Xe.map((Te,Ve)=>{const tt=b&&ze&&we.from===0&&Ve===0?Te.text.slice(1):Te.text,nt=Ec(Te.leaf),st=Te.href?a.jsx("a",{className:`${e}-link`,href:Te.href,target:Te.target,style:nt,children:tt}):a.jsx("span",{style:nt,children:tt});return a.jsxs("span",{children:[!we.justify&&Ve>0?" ":null,st]},Ve)})},`${we.from}-${we.to}-${$e}`)}),h&&!G&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:Le.map((we,$e)=>a.jsx("polygon",{points:we.map(Xe=>`${Xe.x},${Xe.y}`).join(" ")},$e))})]}),b&&F&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${le.capTop}px`,left:`${le.capLeft}px`,fontSize:`${Ce*m}px`,lineHeight:`${Ce*m}px`},children:b}),K&&de&&(G&&T||H)&&zn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:de.top,left:de.left,width:de.width,height:de.height,zIndex:ww,pointerEvents:"none"},children:[G&&T&&a.jsx(iS,{P:e,box:{width:de.width,height:de.height},viewBox:r,contours:G,snap:T.snap,stretchToBox:!O,stage:_,onStageChange:V,onSelectionChange:He,onChange:T.onChange,onCommit:T.onCommit}),H&&Ue&&a.jsx(oS,{P:e,box:{width:de.width,height:de.height},bounds:Ue,natural:ae,imageUrl:x,maskPath:Be,stage:_,onStageChange:V,focalX:Ye,focalY:Re,scale:We,onChange:H.onChange,onCommit:H.onCommit})]}),K),a.jsx("div",{className:`${e}-a11y`,children:j.map((we,$e)=>a.jsx("p",{children:we},$e))})]})}function dS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:d}=W.useScopedStyles(),c=s.useMemo(()=>Kw(d),[d]),u=n??!1,p=!!r||!!o,v=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),w=(e==null?void 0:e.shape)??"rectangle",m=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",f=s.useMemo(()=>$w(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),x=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",C=(e==null?void 0:e.textAlign)??"left",y=((e==null?void 0:e.overflowMode)??"clip")==="visible",S=((e==null?void 0:e.fitText)??"off")==="on",B=((e==null?void 0:e.dropCap)??"off")==="on"?Math.max(2,Math.round((e==null?void 0:e.dropCapLines)??3)):0,N=(e==null?void 0:e.dropCapSize)??bw,q=u&&p&&!i,[D,T]=s.useState(!1);s.useEffect(()=>{if(!u||!p){T(!1);return}const oe=()=>T(!0),ye=()=>T(!1),U=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],ce=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const le of U)window.addEventListener(le,oe);for(const le of ce)window.addEventListener(le,ye);return()=>{for(const le of U)window.removeEventListener(le,oe);for(const le of ce)window.removeEventListener(le,ye)}},[u,p]);const H=u&&p&&!i&&typeof l=="function",$=!D,I=Math.max(0,(e==null?void 0:e.pathSnap)??0),[P,E]=s.useState(null),[g,z]=s.useState(!1),[F,X]=s.useState(!1),ie=s.useCallback(()=>X(!1),[]),L=s.useMemo(()=>!P||P.serialized===m?m:P.serialized,[P,m]);s.useEffect(()=>{H||(z(!1),X(!1))},[H]);const _=s.useMemo(()=>{if(!H)return null;if(P&&(P.base===m||P.serialized===m))return P.contours;const oe=zo(m);return oe.length?oe:null},[H,P,m]),V=h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===zr&&!!(_&&!uu(_,f)),ae=s.useCallback((oe,ye,U)=>{const ce=jo(oe);if(E(le=>({base:le&&(le.base===m||le.serialized===m)?le.base:m,serialized:ce,contours:oe})),ye){const le=U!=null&&U.preserveShape?e==null?void 0:e.shape:"custom";l==null||l({...e,shape:le,customPath:ce})}},[m,l,e]),re=s.useMemo(()=>H?{contours:V?_:null,snap:I,needsConversion:!V,onConvert:oe=>{const ye=jo(oe);E({base:ye,serialized:ye,contours:oe}),l==null||l({...e,pathFit:"viewbox",pathViewBox:zr,customPath:ye})},onChange:(oe,ye)=>{z(!0),X(!!(ye!=null&&ye.carryImage)),ae(oe,!1)},onCommit:(oe,ye)=>{ae(oe,!0,ye),z(!1)}}:null,[H,V,_,I,l,e,ae]),M=x==="avoid"&&!!(e!=null&&e.image),se=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[j,b]=s.useState(null),k=j??se,G=s.useCallback(oe=>b(oe),[]),he=s.useCallback(oe=>{b(oe),l==null||l({...e,imageFocalX:oe.focalX,imageFocalY:oe.focalY,imageScale:oe.scale})},[l,e]);s.useEffect(()=>{j&&Math.abs(j.focalX-se.focalX)<1e-9&&Math.abs(j.focalY-se.focalY)<1e-9&&Math.abs(j.scale-se.scale)<1e-9&&b(null)},[j,se]);const J=s.useMemo(()=>!H||!M?null:{onChange:G,onCommit:he},[H,M,G,he]),[ee,O]=s.useState(void 0),Z=s.useRef(void 0),te=s.useCallback(oe=>{const ye=Z.current;ye!==void 0&&Math.abs(ye-oe)<.005||(Z.current=oe,O(oe))},[]),Le=s.useMemo(()=>S&&typeof ee=="number"?ee:1,[ee,S]),ve=oe=>`calc(${oe} * var(--${d}-fit, 1))`,Ie=s.useMemo(()=>{var oe,ye,U,ce,le;return{fontFamily:co(e==null?void 0:e.textFontFamily),fontWeight:(oe=e==null?void 0:e.textFontSettings)==null?void 0:oe.fontWeight,fontStyle:(ye=e==null?void 0:e.textFontSettings)==null?void 0:ye.fontStyle,fontSize:ve(W.scalingValue((e==null?void 0:e.textFontSize)??.012,u)),lineHeight:ve(W.scalingValue((e==null?void 0:e.textLineHeight)??(e==null?void 0:e.textFontSize)??.012,u)),letterSpacing:ve(W.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:ve(W.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(U=e==null?void 0:e.textTextAppearance)==null?void 0:U.textTransform,textDecoration:(ce=e==null?void 0:e.textTextAppearance)==null?void 0:ce.textDecoration,fontVariant:(le=e==null?void 0:e.textTextAppearance)==null?void 0:le.fontVariant}},[e,u,d]),pe={[`--${d}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${d}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${d}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{className:`${d}-wrapper`,style:{...pe},children:a.jsx(cS,{P:d,item:v,shape:w,customPath:m,pathFit:h,viewBox:f,mode:x,align:C,allowOverflow:y,fitEnabled:S,scale:Le,onFitScale:te,dropCapLines:B,dropCapSize:N,showGuides:(q||H)&&$,typography:Ie,imageUrl:x==="avoid"?e==null?void 0:e.image:null,imageFocalX:k.focalX,imageFocalY:k.focalY,imageScale:k.scale,imageCustomPath:L,pathDragActive:g,pathCarryImage:F,onCarryImageConsumed:ie,pathEditor:$?re:null,imageEditor:$?J:null})})]})}const uS=`import { useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from 'react';
23799
23813
  import type React from 'react';
23800
23814
  import { createPortal } from 'react-dom';
23801
23815
  import { CommonComponentProps } from '../props';
@@ -25376,6 +25390,20 @@ function getCSS(P: string): string {
25376
25390
  .\${P}-editor-anchor-selected {
25377
25391
  fill: #FF5C02;
25378
25392
  }
25393
+ /* The part of the photo the mask crops away, shown while the image is armed.
25394
+ Dimmed rather than desaturated on purpose: a filter would be re-rasterized
25395
+ every frame of a pan drag, and dimming is what a crop UI reads as anyway. */
25396
+ .\${P}-editor-ghost {
25397
+ opacity: 0.3;
25398
+ pointer-events: none;
25399
+ }
25400
+ .\${P}-editor-image-bounds {
25401
+ fill: none;
25402
+ stroke: #FF5C02;
25403
+ stroke-width: 1;
25404
+ opacity: 0.7;
25405
+ pointer-events: none;
25406
+ }
25379
25407
  .\${P}-a11y {
25380
25408
  position: absolute;
25381
25409
  width: 1px;
@@ -25497,6 +25525,20 @@ function scaleHandlePoint(
25497
25525
  };
25498
25526
  }
25499
25527
 
25528
+ type PathChangeOptions = {
25529
+ /**
25530
+ * Set by the whole-shape body drag, which moves the mask and the photo as one
25531
+ * piece. \`focalX\`/\`focalY\`/\`scale\` are relative to the mask bbox's *size*, so
25532
+ * a pure translation already carries the photo along for free — this flag
25533
+ * just tells the column to stand down the machinery that otherwise pins the
25534
+ * photo in place while the mask slides over it.
25535
+ *
25536
+ * Left unset by the gestures that should still re-crop rather than move:
25537
+ * node drags, whole-shape scale, and keyboard nudge/scale.
25538
+ */
25539
+ carryImage?: boolean;
25540
+ };
25541
+
25500
25542
  type PathCommitOptions = {
25501
25543
  /** Whole-shape move/scale keeps the preset id; point edits diverge to \`custom\`. */
25502
25544
  preserveShape?: boolean;
@@ -25557,6 +25599,36 @@ function focalFromImageOffset(boundsSize: number, renderedSize: number, offset:
25557
25599
  return clamp01(offset / span);
25558
25600
  }
25559
25601
 
25602
+ /**
25603
+ * Keep the image's box-absolute size and placement when the shape mask bbox
25604
+ * changes (path-point edits). \`imageScale\` is extra zoom on top of cover, so a
25605
+ * new cover fit would otherwise resize the photo with the mask.
25606
+ */
25607
+ function preserveImageTransformAcrossBoundsChange(
25608
+ prevBounds: { x: number; y: number; width: number; height: number },
25609
+ nextBounds: { x: number; y: number; width: number; height: number },
25610
+ natural: { width: number; height: number },
25611
+ focalX: number,
25612
+ focalY: number,
25613
+ scale: number,
25614
+ ): ImageTransform {
25615
+ const oldSize = coveredImageSize(prevBounds, natural, scale);
25616
+ const absX = prevBounds.x + imageOffsetFromFocal(prevBounds.width, oldSize.width, focalX);
25617
+ const absY = prevBounds.y + imageOffsetFromFocal(prevBounds.height, oldSize.height, focalY);
25618
+ const prevCover = coverScale(prevBounds, natural);
25619
+ const nextCover = coverScale(nextBounds, natural);
25620
+ const nextScale = Math.min(
25621
+ MAX_IMAGE_SCALE,
25622
+ Math.max(MIN_IMAGE_SCALE, nextCover > 0 ? scale * (prevCover / nextCover) : scale),
25623
+ );
25624
+ const newSize = coveredImageSize(nextBounds, natural, nextScale);
25625
+ return {
25626
+ focalX: focalFromImageOffset(nextBounds.width, newSize.width, absX - nextBounds.x),
25627
+ focalY: focalFromImageOffset(nextBounds.height, newSize.height, absY - nextBounds.y),
25628
+ scale: nextScale,
25629
+ };
25630
+ }
25631
+
25560
25632
  type EditStage = 'none' | 'shape' | 'image';
25561
25633
 
25562
25634
  type PathEditorProps = {
@@ -25570,11 +25642,13 @@ type PathEditorProps = {
25570
25642
  /** Shape and image editing are mutually exclusive; the host (PretextColumn) owns the cycle. */
25571
25643
  stage: EditStage;
25572
25644
  onStageChange: (stage: EditStage) => void;
25573
- onChange: (contours: VecContour[]) => void;
25645
+ /** Lifts the node selection up to the column, which owns the double-click cycle. */
25646
+ onSelectionChange?: (hasSelection: boolean) => void;
25647
+ onChange: (contours: VecContour[], options?: PathChangeOptions) => void;
25574
25648
  onCommit: (contours: VecContour[], options?: PathCommitOptions) => void;
25575
25649
  };
25576
25650
 
25577
- function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stage, onStageChange, onChange, onCommit }: PathEditorProps) {
25651
+ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stage, onStageChange, onSelectionChange, onChange, onCommit }: PathEditorProps) {
25578
25652
  const svgRef = useRef<SVGSVGElement | null>(null);
25579
25653
  const bodyPathRef = useRef<SVGPathElement | null>(null);
25580
25654
  const contoursRef = useRef(contours);
@@ -25593,6 +25667,24 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
25593
25667
  if (shapeArmed) svgRef.current?.focus({ preventScroll: true });
25594
25668
  }, [shapeArmed]);
25595
25669
 
25670
+ // Handing the stage to the image editor (or dropping out entirely) has to
25671
+ // drop the node selection too: \`armed\` ORs the selection in, so a point left
25672
+ // selected from the shape pass would keep anchors, handles and the outline
25673
+ // painted on top of the image the user just stepped into. Keyed on the
25674
+ // transition only, so the selection \`insertNode\` sets from a near-outline
25675
+ // click — which lands after the surface has already set the stage to 'none'
25676
+ // — still re-arms the editor the way it does today.
25677
+ useEffect(() => {
25678
+ if (!shapeArmed) setSelection(current => (current.length ? [] : current));
25679
+ }, [shapeArmed]);
25680
+
25681
+ const hasSelection = selection.length > 0;
25682
+ useEffect(() => {
25683
+ onSelectionChange?.(hasSelection);
25684
+ }, [hasSelection, onSelectionChange]);
25685
+ // Unmounting with a point still selected would strand the column's flag on.
25686
+ useEffect(() => () => onSelectionChange?.(false), [onSelectionChange]);
25687
+
25596
25688
  const scaleX = viewBox.width > 0 ? box.width / viewBox.width : 1;
25597
25689
  const scaleY = viewBox.height > 0 ? box.height / viewBox.height : 1;
25598
25690
 
@@ -25703,7 +25795,10 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
25703
25795
  }
25704
25796
  if (!shapeDrag.moved && dx === 0 && dy === 0) return;
25705
25797
  shapeDrag.moved = true;
25706
- onChange(mapContours(shapeDrag.startContours, p => ({ x: p.x + dx, y: p.y + dy })));
25798
+ onChange(
25799
+ mapContours(shapeDrag.startContours, p => ({ x: p.x + dx, y: p.y + dy })),
25800
+ { carryImage: true },
25801
+ );
25707
25802
  return;
25708
25803
  }
25709
25804
  const groupDrag = groupDragRef.current;
@@ -25864,6 +25959,19 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
25864
25959
  commitContours(next);
25865
25960
  return;
25866
25961
  }
25962
+ // Cmd (ctrl off Mac) switches the node's type instead of dragging: a
25963
+ // straight corner grows bezier handles from its neighbours, a curve point
25964
+ // drops them. Handles crowd the anchor on tight curves, so a click that
25965
+ // lands on one still targets the node it belongs to rather than missing.
25966
+ if (event.metaKey || event.ctrlKey) {
25967
+ const next = toggleNodeSmooth(contours, contourIndex, nodeIndex);
25968
+ if (next === contours) return;
25969
+ // Single selection so the new handles (single-node controls) show up.
25970
+ setSelection([{ contour: contourIndex, node: nodeIndex }]);
25971
+ onChange(next);
25972
+ commitContours(next);
25973
+ return;
25974
+ }
25867
25975
  // Shift-click an anchor toggles it into/out of the multi-selection
25868
25976
  // instead of dragging — mirrors the usual vector-editor convention.
25869
25977
  if (kind === 'anchor' && event.shiftKey) {
@@ -26144,6 +26252,10 @@ type ImageEditorProps = {
26144
26252
  /** The shape's own bbox, in the same px space as \`box\` — the mask the image is clipped to. */
26145
26253
  bounds: { x: number; y: number; width: number; height: number };
26146
26254
  natural: { width: number; height: number } | null;
26255
+ /** Source of the ghost drawn outside the mask while cropping. */
26256
+ imageUrl?: string | null;
26257
+ /** The mask itself, as a px path in the same space as \`bounds\`. */
26258
+ maskPath: string;
26147
26259
  stage: EditStage;
26148
26260
  onStageChange: (stage: EditStage) => void;
26149
26261
  focalX: number;
@@ -26159,8 +26271,9 @@ type ImageEditorProps = {
26159
26271
  * \`PretextColumn\`) instead of shape editing, so the two never fight over
26160
26272
  * the pointer at once.
26161
26273
  */
26162
- function PretextImageEditor({ P, box, bounds, natural, stage, onStageChange, focalX, focalY, scale, onChange, onCommit }: ImageEditorProps) {
26274
+ function PretextImageEditor({ P, box, bounds, natural, imageUrl, maskPath, stage, onStageChange, focalX, focalY, scale, onChange, onCommit }: ImageEditorProps) {
26163
26275
  const svgRef = useRef<SVGSVGElement | null>(null);
26276
+ const ghostMaskId = \`pretext-image-ghost-\${useId().replace(/:/g, '')}\`;
26164
26277
  const panRef = useRef<ImagePan | null>(null);
26165
26278
  const scaleRef = useRef<ImageScaleDrag | null>(null);
26166
26279
  const liveRef = useRef<ImageTransform>({ focalX, focalY, scale });
@@ -26204,19 +26317,24 @@ function PretextImageEditor({ P, box, bounds, natural, stage, onStageChange, foc
26204
26317
  event.stopPropagation();
26205
26318
  event.preventDefault();
26206
26319
  svgRef.current?.focus({ preventScroll: true });
26207
- const localBBox = { minX: 0, minY: 0, maxX: bounds.width, maxY: bounds.height };
26320
+ const size = coveredImageSize(bounds, natural, scale);
26321
+ const startX = imageOffsetFromFocal(bounds.width, size.width, focalX);
26322
+ const startY = imageOffsetFromFocal(bounds.height, size.height, focalY);
26323
+ // The photo's own rect, in the bounds-local space the drag math runs in.
26324
+ // Anchoring on its opposite corner is what pins that corner while you drag
26325
+ // — anchored on the mask's corner instead, the photo slid as it resized.
26326
+ const localBBox = { minX: startX, minY: startY, maxX: startX + size.width, maxY: startY + size.height };
26208
26327
  const anchor = bboxCorner(localBBox, oppositeScaleCorner(corner));
26209
26328
  const handle = bboxCorner(localBBox, corner);
26210
26329
  const startDistance = Math.hypot(handle.x - anchor.x, handle.y - anchor.y);
26211
26330
  if (!isFinite(startDistance) || startDistance <= 0) return;
26212
- const size = coveredImageSize(bounds, natural, scale);
26213
26331
  scaleRef.current = {
26214
26332
  pointerId: event.pointerId,
26215
26333
  anchor,
26216
26334
  startDistance,
26217
26335
  startScale: scale,
26218
- startX: imageOffsetFromFocal(bounds.width, size.width, focalX),
26219
- startY: imageOffsetFromFocal(bounds.height, size.height, focalY),
26336
+ startX,
26337
+ startY,
26220
26338
  moved: false,
26221
26339
  };
26222
26340
  svgRef.current?.setPointerCapture(event.pointerId);
@@ -26306,6 +26424,33 @@ function PretextImageEditor({ P, box, bounds, natural, stage, onStageChange, foc
26306
26424
  const corners: ScaleCorner[] = ['nw', 'ne', 'se', 'sw'];
26307
26425
  const boundsBBox = { minX: bounds.x, minY: bounds.y, maxX: bounds.x + bounds.width, maxY: bounds.y + bounds.height };
26308
26426
 
26427
+ // The photo's full extent, in the same px space as \`bounds\` — the same
26428
+ // construction the column uses to place the clipped <image>, so the ghost
26429
+ // stays welded to the real thing through a pan or zoom.
26430
+ const imageRect = useMemo(() => {
26431
+ const source = natural ?? { width: bounds.width, height: bounds.height };
26432
+ const size = coveredImageSize(bounds, source, scale);
26433
+ if (!(size.width > 0) || !(size.height > 0)) return null;
26434
+ return {
26435
+ x: bounds.x + imageOffsetFromFocal(bounds.width, size.width, focalX),
26436
+ y: bounds.y + imageOffsetFromFocal(bounds.height, size.height, focalY),
26437
+ width: size.width,
26438
+ height: size.height,
26439
+ };
26440
+ }, [natural, bounds.x, bounds.y, bounds.width, bounds.height, focalX, focalY, scale]);
26441
+
26442
+ // Scale handles sit on the photo, not on the mask — so the frame you grab is
26443
+ // the size of the thing you're resizing. Falls back to the mask bbox for the
26444
+ // moment before \`natural\` loads, when the two are the same rect anyway.
26445
+ const handleBBox = imageRect
26446
+ ? {
26447
+ minX: imageRect.x,
26448
+ minY: imageRect.y,
26449
+ maxX: imageRect.x + imageRect.width,
26450
+ maxY: imageRect.y + imageRect.height,
26451
+ }
26452
+ : boundsBBox;
26453
+
26309
26454
  return (
26310
26455
  <svg
26311
26456
  ref={svgRef}
@@ -26327,6 +26472,36 @@ function PretextImageEditor({ P, box, bounds, natural, stage, onStageChange, foc
26327
26472
  height={box.height}
26328
26473
  onPointerDown={() => onStageChange('none')}
26329
26474
  />
26475
+ {armed && imageUrl && imageRect && maskPath && (
26476
+ <>
26477
+ {/* Luminance mask: white over the whole photo, the shape punched out
26478
+ in black. Only the cropped-away remainder gets painted, so the
26479
+ live image inside the mask is never double-covered and dulled. */}
26480
+ <defs>
26481
+ <mask id={ghostMaskId} maskUnits="userSpaceOnUse" x={imageRect.x} y={imageRect.y} width={imageRect.width} height={imageRect.height}>
26482
+ <rect x={imageRect.x} y={imageRect.y} width={imageRect.width} height={imageRect.height} fill="#FFFFFF" />
26483
+ <path d={maskPath} fillRule="evenodd" fill="#000000" />
26484
+ </mask>
26485
+ </defs>
26486
+ <image
26487
+ className={\`\${P}-editor-ghost\`}
26488
+ href={imageUrl ?? undefined}
26489
+ x={imageRect.x}
26490
+ y={imageRect.y}
26491
+ width={imageRect.width}
26492
+ height={imageRect.height}
26493
+ preserveAspectRatio="none"
26494
+ mask={\`url(#\${ghostMaskId})\`}
26495
+ />
26496
+ <rect
26497
+ className={\`\${P}-editor-image-bounds\`}
26498
+ x={imageRect.x}
26499
+ y={imageRect.y}
26500
+ width={imageRect.width}
26501
+ height={imageRect.height}
26502
+ />
26503
+ </>
26504
+ )}
26330
26505
  {armed && (
26331
26506
  <>
26332
26507
  <rect
@@ -26345,7 +26520,7 @@ function PretextImageEditor({ P, box, bounds, natural, stage, onStageChange, foc
26345
26520
  onPointerDown={startPan}
26346
26521
  />
26347
26522
  {corners.map((corner) => {
26348
- const point = scaleHandlePoint(boundsBBox, corner);
26523
+ const point = scaleHandlePoint(handleBBox, corner);
26349
26524
  const nesw = corner === 'ne' || corner === 'sw';
26350
26525
  return (
26351
26526
  <g key={corner}>
@@ -26460,6 +26635,13 @@ type ColumnProps = {
26460
26635
  imageFocalX: number;
26461
26636
  imageFocalY: number;
26462
26637
  imageScale: number;
26638
+ /** Path used for the image mask — may lead \`customPath\` while settings sync. */
26639
+ imageCustomPath: string;
26640
+ pathDragActive: boolean;
26641
+ /** The live drag moves the whole shape: let the photo ride along with it. */
26642
+ pathCarryImage: boolean;
26643
+ /** Fired once the carried placement has been adopted, to clear the flag. */
26644
+ onCarryImageConsumed?: () => void;
26463
26645
  pathEditor?: PathEditorBinding | null;
26464
26646
  imageEditor?: ImageEditorBinding | null;
26465
26647
  };
@@ -26474,7 +26656,7 @@ type PathEditorBinding = {
26474
26656
  snap: number;
26475
26657
  needsConversion: boolean;
26476
26658
  onConvert: (contours: VecContour[]) => void;
26477
- onChange: (contours: VecContour[]) => void;
26659
+ onChange: (contours: VecContour[], options?: PathChangeOptions) => void;
26478
26660
  onCommit: (contours: VecContour[], options?: PathCommitOptions) => void;
26479
26661
  };
26480
26662
 
@@ -26484,6 +26666,16 @@ type ImageEditorBinding = {
26484
26666
  onCommit: (next: ImageTransform) => void;
26485
26667
  };
26486
26668
 
26669
+ /** Image mask/placement frozen for the duration of a path-edit session. */
26670
+ type FrozenShapeImage = {
26671
+ rings: Ring[];
26672
+ bounds: { x: number; y: number; width: number; height: number };
26673
+ focalX: number;
26674
+ focalY: number;
26675
+ scale: number;
26676
+ customPath: string;
26677
+ };
26678
+
26487
26679
  function PretextColumn({
26488
26680
  P,
26489
26681
  item,
@@ -26505,6 +26697,10 @@ function PretextColumn({
26505
26697
  imageFocalX,
26506
26698
  imageFocalY,
26507
26699
  imageScale,
26700
+ imageCustomPath,
26701
+ pathDragActive,
26702
+ pathCarryImage,
26703
+ onCarryImageConsumed,
26508
26704
  pathEditor,
26509
26705
  imageEditor,
26510
26706
  }: ColumnProps) {
@@ -26593,6 +26789,25 @@ function PretextColumn({
26593
26789
  return unitRings.map(ring => ring.map(point => ({ x: point.x * scaleX, y: point.y * scaleY })));
26594
26790
  }, [unitRings, exceedsEditViewBox, legacyRefBox, viewBox.width, viewBox.height, box.width, box.height]);
26595
26791
 
26792
+ // The shape image reads from the *committed* path, not the in-progress drag
26793
+ // draft — text reflows live as nodes are dragged, but the image mask should
26794
+ // hold still until the edit is committed rather than warping every frame.
26795
+ const committedUnitRings = useMemo(() => {
26796
+ const spec = imageCustomPath.trim();
26797
+ const parsed = spec ? parsePathSpec(spec, pathFit, viewBox) : null;
26798
+ if (parsed && parsed.length) return parsed;
26799
+ return getPresetRings(shape === 'custom' ? 'rectangle' : shape, aspect);
26800
+ // aspect only matters for the circle preset; round it to avoid churn
26801
+ }, [shape, imageCustomPath, pathFit, viewBox, Math.round(aspect * 100) / 100]);
26802
+
26803
+ const imageRings = useMemo(() => {
26804
+ if (!exceedsEditViewBox || box.width <= 0 || box.height <= 0) return committedUnitRings;
26805
+ const ref = legacyRefBox ?? box;
26806
+ const scaleX = viewBox.width / ref.width;
26807
+ const scaleY = viewBox.height / ref.height;
26808
+ return committedUnitRings.map(ring => ring.map(point => ({ x: point.x * scaleX, y: point.y * scaleY })));
26809
+ }, [committedUnitRings, exceedsEditViewBox, legacyRefBox, viewBox.width, viewBox.height, box.width, box.height]);
26810
+
26596
26811
  const migratedPathRef = useRef<string | null>(null);
26597
26812
  useEffect(() => {
26598
26813
  if (!onConvertPath || box.width <= 0 || box.height <= 0) return;
@@ -26765,6 +26980,13 @@ function PretextColumn({
26765
26980
  const editorRect = useFloatingRect(columnEl, showOverlayPortal);
26766
26981
  const portalTarget = showOverlayPortal && editorRect ? resolveEditorPortalTarget() : null;
26767
26982
 
26983
+ // Read at event time rather than held in state: the cycle listener below
26984
+ // should not rebind every time a point is selected or dropped.
26985
+ const pathHasSelectionRef = useRef(false);
26986
+ const onPathSelectionChange = useCallback((hasSelection: boolean) => {
26987
+ pathHasSelectionRef.current = hasSelection;
26988
+ }, []);
26989
+
26768
26990
  // Double-click anywhere over the column (capture, before the host item's own
26769
26991
  // dblclick enters preview) cycles shape → image editing — the single place
26770
26992
  // that decides which of the two overlays gets the pointer next.
@@ -26781,6 +27003,11 @@ function PretextColumn({
26781
27003
  event.preventDefault();
26782
27004
  event.stopPropagation();
26783
27005
  setEditStage((current) => {
27006
+ // Mid node-edit with a point selected, hold the stage. The anchor's own
27007
+ // dblclick (toggle smooth) calls stopPropagation, but this listener is
27008
+ // on document in the capture phase and runs first, so the guard has to
27009
+ // be here — nothing downstream can prevent it.
27010
+ if (current === 'shape' && pathHasSelectionRef.current) return current;
26784
27011
  if (current === 'shape' && canArmImage) return 'image';
26785
27012
  return showPathEditor ? 'shape' : 'image';
26786
27013
  });
@@ -26789,28 +27016,116 @@ function PretextColumn({
26789
27016
  return () => document.removeEventListener('dblclick', onDblClick, true);
26790
27017
  }, [showPathEditor, canArmImage, columnEl]);
26791
27018
 
26792
- const shapeImagePath = useMemo(
26793
- () => (imageUrl && box.width > 0 && box.height > 0 ? ringsToPathPx(rings, box) : ''),
26794
- [imageUrl, rings, box.width, box.height],
27019
+ const committedShapeImageBounds = useMemo(
27020
+ () => (imageUrl && box.width > 0 && box.height > 0 ? ringsBBoxPx(imageRings, box) : null),
27021
+ [imageUrl, imageRings, box.width, box.height],
26795
27022
  );
26796
- const shapeImageBounds = useMemo(
26797
- () => (imageUrl && box.width > 0 && box.height > 0 ? ringsBBoxPx(rings, box) : null),
26798
- [imageUrl, rings, box.width, box.height],
27023
+
27024
+ // Freeze the image mask only while a path handle is actively dragged. Between
27025
+ // commits, \`imageCustomPath\` tracks the local draft so the clip updates without
27026
+ // waiting on settings sync.
27027
+ const freezeImageForPathEdit = pathDragActive && !pathCarryImage && editStage !== 'image';
27028
+ const lastStableImageRef = useRef<FrozenShapeImage | null>(null);
27029
+
27030
+ if (!pathDragActive && imageUrl && committedShapeImageBounds) {
27031
+ lastStableImageRef.current = {
27032
+ rings: imageRings,
27033
+ bounds: committedShapeImageBounds,
27034
+ focalX: imageFocalX,
27035
+ focalY: imageFocalY,
27036
+ scale: imageScale,
27037
+ customPath: imageCustomPath,
27038
+ };
27039
+ }
27040
+
27041
+ const dragFrozen = freezeImageForPathEdit ? lastStableImageRef.current : null;
27042
+
27043
+ const imagePathAnchorRef = useRef<FrozenShapeImage | null>(null);
27044
+ const pathPreservedTransform = (() => {
27045
+ const anchor = imagePathAnchorRef.current;
27046
+ if (
27047
+ pathDragActive
27048
+ // Stays true through the commit and the re-anchor below, so the moved
27049
+ // photo is adopted as the new resting state instead of being corrected
27050
+ // back. The next drag's first onChange resets it.
27051
+ || pathCarryImage
27052
+ || !imageEditor
27053
+ || !naturalImageSize
27054
+ || !committedShapeImageBounds
27055
+ || !anchor
27056
+ || imageCustomPath === anchor.customPath
27057
+ ) {
27058
+ return null;
27059
+ }
27060
+ return preserveImageTransformAcrossBoundsChange(
27061
+ anchor.bounds,
27062
+ committedShapeImageBounds,
27063
+ naturalImageSize,
27064
+ anchor.focalX,
27065
+ anchor.focalY,
27066
+ anchor.scale,
27067
+ );
27068
+ })();
27069
+
27070
+ useIsomorphicLayoutEffect(() => {
27071
+ if (pathDragActive || !imageEditor || !naturalImageSize || !committedShapeImageBounds) return;
27072
+ const anchor = imagePathAnchorRef.current;
27073
+ const pathChanged = Boolean(anchor && imageCustomPath !== anchor.customPath);
27074
+ if (pathChanged && pathPreservedTransform) {
27075
+ imageEditor.onCommit(pathPreservedTransform);
27076
+ }
27077
+ // The carry has now been folded into the anchor below, so retire the flag —
27078
+ // otherwise it would keep suppressing the correction for the *next* path
27079
+ // change, whatever caused it (undo, the shape dropdown, the path field).
27080
+ if (pathChanged && pathCarryImage) onCarryImageConsumed?.();
27081
+ imagePathAnchorRef.current = {
27082
+ rings: imageRings,
27083
+ bounds: committedShapeImageBounds,
27084
+ focalX: pathPreservedTransform?.focalX ?? imageFocalX,
27085
+ focalY: pathPreservedTransform?.focalY ?? imageFocalY,
27086
+ scale: pathPreservedTransform?.scale ?? imageScale,
27087
+ customPath: imageCustomPath,
27088
+ };
27089
+ }, [
27090
+ pathDragActive,
27091
+ pathCarryImage,
27092
+ imageCustomPath,
27093
+ imageRings,
27094
+ committedShapeImageBounds,
27095
+ imageEditor,
27096
+ naturalImageSize,
27097
+ imageFocalX,
27098
+ imageFocalY,
27099
+ imageScale,
27100
+ pathPreservedTransform,
27101
+ onCarryImageConsumed,
27102
+ ]);
27103
+
27104
+ const activeImageRings = dragFrozen?.rings ?? imageRings;
27105
+ const activeImageBounds = dragFrozen?.bounds ?? committedShapeImageBounds;
27106
+ const activeImageFocalX = dragFrozen?.focalX ?? pathPreservedTransform?.focalX ?? imageFocalX;
27107
+ const activeImageFocalY = dragFrozen?.focalY ?? pathPreservedTransform?.focalY ?? imageFocalY;
27108
+ const activeImageScale = dragFrozen?.scale ?? pathPreservedTransform?.scale ?? imageScale;
27109
+
27110
+ const shapeImagePath = useMemo(
27111
+ () => (imageUrl && box.width > 0 && box.height > 0 ? ringsToPathPx(activeImageRings, box) : ''),
27112
+ [imageUrl, activeImageRings, box.width, box.height],
26799
27113
  );
27114
+ const shapeImageBounds = activeImageBounds;
26800
27115
  const clipId = \`\${imageId}-clip\`;
26801
27116
  // Before the natural size loads, fall back to filling the mask bbox exactly
26802
27117
  // (equivalent to the old xMidYMid-slice default) rather than a jump cut once it's known.
26803
27118
  const imageRect = useMemo(() => {
26804
27119
  if (!shapeImageBounds) return null;
26805
27120
  const natural = naturalImageSize ?? { width: shapeImageBounds.width, height: shapeImageBounds.height };
26806
- const size = coveredImageSize(shapeImageBounds, natural, imageScale);
27121
+ const size = coveredImageSize(shapeImageBounds, natural, activeImageScale);
26807
27122
  return {
26808
- x: imageOffsetFromFocal(shapeImageBounds.width, size.width, imageFocalX),
26809
- y: imageOffsetFromFocal(shapeImageBounds.height, size.height, imageFocalY),
27123
+ x: imageOffsetFromFocal(shapeImageBounds.width, size.width, activeImageFocalX),
27124
+ y: imageOffsetFromFocal(shapeImageBounds.height, size.height, activeImageFocalY),
26810
27125
  width: size.width,
26811
27126
  height: size.height,
26812
27127
  };
26813
- }, [shapeImageBounds, naturalImageSize, imageFocalX, imageFocalY, imageScale]);
27128
+ }, [shapeImageBounds, naturalImageSize, activeImageFocalX, activeImageFocalY, activeImageScale]);
26814
27129
 
26815
27130
  return (
26816
27131
  <div className={\`\${P}-column\`} ref={setColumnEl}>
@@ -26920,6 +27235,7 @@ function PretextColumn({
26920
27235
  stretchToBox={!exceedsEditViewBox}
26921
27236
  stage={editStage}
26922
27237
  onStageChange={setEditStage}
27238
+ onSelectionChange={onPathSelectionChange}
26923
27239
  onChange={pathEditor.onChange}
26924
27240
  onCommit={pathEditor.onCommit}
26925
27241
  />
@@ -26930,11 +27246,13 @@ function PretextColumn({
26930
27246
  box={{ width: editorRect.width, height: editorRect.height }}
26931
27247
  bounds={shapeImageBounds}
26932
27248
  natural={naturalImageSize}
27249
+ imageUrl={imageUrl}
27250
+ maskPath={shapeImagePath}
26933
27251
  stage={editStage}
26934
27252
  onStageChange={setEditStage}
26935
- focalX={imageFocalX}
26936
- focalY={imageFocalY}
26937
- scale={imageScale}
27253
+ focalX={activeImageFocalX}
27254
+ focalY={activeImageFocalY}
27255
+ scale={activeImageScale}
26938
27256
  onChange={imageEditor.onChange}
26939
27257
  onCommit={imageEditor.onCommit}
26940
27258
  />
@@ -27011,6 +27329,24 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
27011
27329
  // matches the setting, the draft is the truth; anything else means the path
27012
27330
  // was changed elsewhere (the text field, undo) and the draft is dropped.
27013
27331
  const [draft, setDraft] = useState<{ base: string; serialized: string; contours: VecContour[] } | null>(null);
27332
+ const [pathDragActive, setPathDragActive] = useState(false);
27333
+ // Latched by the drag that set it and deliberately *not* cleared on commit —
27334
+ // the column reads it again after \`pathDragActive\` drops, to decide whether
27335
+ // the photo's new spot is the intended one. Cleared by the next drag.
27336
+ const [pathCarryImage, setPathCarryImage] = useState(false);
27337
+ const onCarryImageConsumed = useCallback(() => setPathCarryImage(false), []);
27338
+
27339
+ const imageCustomPath = useMemo(() => {
27340
+ if (!draft || draft.serialized === customPath) return customPath;
27341
+ return draft.serialized;
27342
+ }, [draft, customPath]);
27343
+
27344
+ useEffect(() => {
27345
+ if (!pathEditing) {
27346
+ setPathDragActive(false);
27347
+ setPathCarryImage(false);
27348
+ }
27349
+ }, [pathEditing]);
27014
27350
 
27015
27351
  const editContours = useMemo(() => {
27016
27352
  if (!pathEditing) return null;
@@ -27056,8 +27392,15 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
27056
27392
  customPath: serialized,
27057
27393
  });
27058
27394
  },
27059
- onChange: (next: VecContour[]) => writePath(next, false),
27060
- onCommit: (next: VecContour[], options?: PathCommitOptions) => writePath(next, true, options),
27395
+ onChange: (next: VecContour[], options?: PathChangeOptions) => {
27396
+ setPathDragActive(true);
27397
+ setPathCarryImage(Boolean(options?.carryImage));
27398
+ writePath(next, false);
27399
+ },
27400
+ onCommit: (next: VecContour[], options?: PathCommitOptions) => {
27401
+ writePath(next, true, options);
27402
+ setPathDragActive(false);
27403
+ },
27061
27404
  };
27062
27405
  }, [pathEditing, isEditablePath, editContours, pathSnap, onUpdateSettings, settings, writePath]);
27063
27406
 
@@ -27162,6 +27505,10 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
27162
27505
  imageFocalX={liveImageTransform.focalX}
27163
27506
  imageFocalY={liveImageTransform.focalY}
27164
27507
  imageScale={liveImageTransform.scale}
27508
+ imageCustomPath={imageCustomPath}
27509
+ pathDragActive={pathDragActive}
27510
+ pathCarryImage={pathCarryImage}
27511
+ onCarryImageConsumed={onCarryImageConsumed}
27165
27512
  pathEditor={shapeOverlayVisible ? pathEditor : null}
27166
27513
  imageEditor={shapeOverlayVisible ? imageEditor : null}
27167
27514
  />
@@ -27169,4 +27516,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
27169
27516
  </>
27170
27517
  );
27171
27518
  }
27172
- `,Ec=[...nu],uS={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},pS={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",title:"Shape",display:{type:"drop-down",label:"Shape",enum:Ec},enum:Ec},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},dropCap:{type:"string",scope:"common",title:"Drop cap",display:{type:"toggle-cycle",enum:["off","on"]}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:2,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:.5,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"Background",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...uS.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{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"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link",display:{type:"style-panel-color-picker"}}},defaults:{shape:"diamond",customPath:"",pathSnap:0,pathFit:"stretch",shapeMode:"A",fitText:"off",dropCap:"off",dropCapLines:3,dropCapSize:3,image:null,backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0},d:{textFontSize:.011,textLineHeight:.0155,textLetterSpacing:0,textWordSpacing:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","dropCap","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"dropCap",value:"on",isNotEqual:!0},then:{name:"properties.dropCapSize.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",items:["shape"]},{type:"row",items:["image","dropCap"]},{type:"row",items:["dropCapSize"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Style is viewed by many as a shallow obsession with disembodied surfaces. However our activities as designers are based on style’s function as a cultural communicator. A vocabulary or set of formal characteristics constitutes a particular style, recognized most frequently in retrospect. Style itself is the visual language of a culture: in fashion, in consumer goods, in art, in literature, in all media. Style is ephemeral; it is timely. To be in style is to embody the influences and values of your time."}]}]}]}},mS={element:cS,id:"pretext",name:"Pretext",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||nu.indexOf(n)===-1?e:{...e,...Ew(n,1,t)}},defaultSize:{d:{width:380,height:382},t:{width:380,height:382},m:{width:334,height:336}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:pS,sourceCode:dS,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},gS=[Cm,Mm,Ix,$g,kg,zg,sh,kh,Dh,Xh,vf,uy,hv,Cv,ax,yx,Hx,F0,Ux,Z0,Lb,pw,mS];exports.components=gS;exports.isSchemaV1=hu;
27519
+ `,Fc=[...au],pS={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},mS={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",title:"Shape",display:{type:"drop-down",label:"Shape",enum:Fc},enum:Fc},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},dropCap:{type:"string",scope:"common",title:"Drop cap",display:{type:"toggle-cycle",enum:["off","on"]}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:2,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:.5,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"Background",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...pS.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{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"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link",display:{type:"style-panel-color-picker"}}},defaults:{shape:"diamond",customPath:"",pathSnap:0,pathFit:"stretch",shapeMode:"A",fitText:"off",dropCap:"off",dropCapLines:3,dropCapSize:3,image:null,backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0},d:{textFontSize:.011,textLineHeight:.0155,textLetterSpacing:0,textWordSpacing:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","dropCap","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"dropCap",value:"on",isNotEqual:!0},then:{name:"properties.dropCapSize.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",items:["shape"]},{type:"row",items:["image","dropCap"]},{type:"row",items:["dropCapSize"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Style is viewed by many as a shallow obsession with disembodied surfaces. However our activities as designers are based on style’s function as a cultural communicator. A vocabulary or set of formal characteristics constitutes a particular style, recognized most frequently in retrospect. Style itself is the visual language of a culture: in fashion, in consumer goods, in art, in literature, in all media. Style is ephemeral; it is timely. To be in style is to embody the influences and values of your time."}]}]}]}},gS={element:dS,id:"pretext",name:"Pretext",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||au.indexOf(n)===-1?e:{...e,...Aw(n,1,t)}},defaultSize:{d:{width:380,height:382},t:{width:380,height:382},m:{width:334,height:336}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:mS,sourceCode:uS,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},hS=[Rm,Fm,Px,Ig,_g,Gg,dh,_h,zh,Uh,wf,gy,vv,Rv,cx,bx,Bx,W0,Jx,eb,Mb,hw,gS];exports.components=hS;exports.isSchemaV1=vu;